Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 30b8bb0

Browse filesBrowse files
committed
src: add process.versions.icu
If i18n support is present, add the icu version to process.versions Fixes: #3089 PR-URL: #3102 Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rod Vagg <rod@vagg.org>
1 parent 20dae2a commit 30b8bb0
Copy full SHA for 30b8bb0

File tree

Expand file treeCollapse file tree

3 files changed

+15
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+15
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/process.markdown‎

Copy file name to clipboardExpand all lines: doc/api/process.markdown
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ Will print something like:
648648
zlib: '1.2.8',
649649
ares: '1.10.0-DEV',
650650
modules: '43',
651+
icu: '55.1',
651652
openssl: '1.0.1k' }
652653

653654
## process.config
Collapse file

‎src/node.cc‎

Copy file name to clipboardExpand all lines: src/node.cc
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
#include <string.h>
5353
#include <sys/types.h>
5454

55+
#if defined(NODE_HAVE_I18N_SUPPORT)
56+
#include <unicode/uvernum.h>
57+
#endif
58+
5559
#if defined(LEAK_SANITIZER)
5660
#include <sanitizer/lsan_interface.h>
5761
#endif
@@ -2669,6 +2673,12 @@ void SetupProcessObject(Environment* env,
26692673
"ares",
26702674
FIXED_ONE_BYTE_STRING(env->isolate(), ARES_VERSION_STR));
26712675

2676+
#if defined(NODE_HAVE_I18N_SUPPORT) && defined(U_ICU_VERSION)
2677+
READONLY_PROPERTY(versions,
2678+
"icu",
2679+
OneByteString(env->isolate(), U_ICU_VERSION));
2680+
#endif
2681+
26722682
const char node_modules_version[] = NODE_STRINGIFY(NODE_MODULE_VERSION);
26732683
READONLY_PROPERTY(
26742684
versions,
Collapse file

‎test/parallel/test-process-versions.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-process-versions.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ if (common.hasCrypto) {
99
expected_keys.push('openssl');
1010
}
1111

12+
if (typeof Intl !== 'undefined') {
13+
expected_keys.push('icu');
14+
}
15+
1216
assert.deepEqual(Object.keys(process.versions).sort(), expected_keys.sort());

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.