GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: allow amaro to be externalizable · nodejs/node@0659516

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • configure.py
  • node.gni
  • node.gyp
  • src
    • node_builtins.cc
    • node_metadata.cc
    • node_metadata.h
  • test/parallel
    • test-process-versions.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎configure.py‎

Copy file name to clipboardExpand all lines: configure.py
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@
5757
valid_intl_modes = ('none', 'small-icu', 'full-icu', 'system-icu')
5858
icu_versions = json.loads((tools_path / 'icu' / 'icu_versions.json').read_text(encoding='utf-8'))
5959

60+
# builtins may be removed later if they have been disabled by options
6061
shareable_builtins = {'cjs_module_lexer/lexer': 'deps/cjs-module-lexer/lexer.js',
6162
'cjs_module_lexer/dist/lexer': 'deps/cjs-module-lexer/dist/lexer.js',
62-
'undici/undici': 'deps/undici/undici.js'
63+
'undici/undici': 'deps/undici/undici.js',
64+
'amaro/dist/index': 'deps/amaro/dist/index.js'
6365
}
6466

6567
# create option groups
@@ -2199,6 +2201,10 @@ def make_bin_override():
21992201
configure_inspector(output)
22002202
configure_section_file(output)
22012203

2204+
# remove builtins that have been disabled
2205+
if options.without_amaro:
2206+
del shareable_builtins['amaro/dist/index']
2207+
22022208
# configure shareable builtins
22032209
output['variables']['node_builtin_shareable_builtins'] = []
22042210
for builtin, value in shareable_builtins.items():
Collapse file

‎node.gni‎

Copy file name to clipboardExpand all lines: node.gni
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ declare_args() {
2020
"deps/cjs-module-lexer/lexer.js",
2121
"deps/cjs-module-lexer/dist/lexer.js",
2222
"deps/undici/undici.js",
23+
"deps/amaro/dist/index.js",
2324
]
2425
}
2526

Collapse file

‎node.gyp‎

Copy file name to clipboardExpand all lines: node.gyp
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,6 @@
465465
}, {
466466
'use_openssl_def%': 0,
467467
}],
468-
[ 'node_use_amaro=="true"', {
469-
'deps_files': [
470-
'deps/amaro/dist/index.js',
471-
]
472-
} ]
473468
],
474469
},
475470

Collapse file

‎src/node_builtins.cc‎

Copy file name to clipboardExpand all lines: src/node_builtins.cc
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ BuiltinLoader::BuiltinLoader()
5050
AddExternalizedBuiltin("internal/deps/undici/undici",
5151
STRINGIFY(NODE_SHARED_BUILTIN_UNDICI_UNDICI_PATH));
5252
#endif // NODE_SHARED_BUILTIN_UNDICI_UNDICI_PATH
53+
54+
#if HAVE_AMARO
55+
#ifdef NODE_SHARED_BUILTIN_AMARO_DIST_INDEX_PATH
56+
AddExternalizedBuiltin("internal/deps/amaro/dist/index",
57+
STRINGIFY(NODE_SHARED_BUILTIN_AMARO_DIST_INDEX_PATH));
58+
#endif // NODE_SHARED_BUILTIN_AMARO_DIST_INDEX_PATH
59+
#endif // HAVE_AMARO
5360
}
5461

5562
bool BuiltinLoader::Exists(const char* id) {
Collapse file

‎src/node_metadata.cc‎

Copy file name to clipboardExpand all lines: src/node_metadata.cc
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,11 @@ Metadata::Versions::Versions() {
127127
cjs_module_lexer = CJS_MODULE_LEXER_VERSION;
128128
uvwasi = UVWASI_VERSION_STRING;
129129

130+
#ifndef NODE_SHARED_BUILTIN_AMARO_DIST_INDEX_PATH
130131
#if HAVE_AMARO
131132
amaro = AMARO_VERSION;
132133
#endif
134+
#endif
133135

134136
#if HAVE_OPENSSL
135137
openssl = GetOpenSSLVersion();
Collapse file

‎src/node_metadata.h‎

Copy file name to clipboardExpand all lines: src/node_metadata.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace node {
2727
#define NODE_HAS_RELEASE_URLS
2828
#endif
2929

30-
#if HAVE_AMARO
30+
#if HAVE_AMARO && !defined(NODE_SHARED_BUILTIN_AMARO_DIST_INDEX_PATH)
3131
#define NODE_VERSIONS_KEY_AMARO(V) V(amaro)
3232
#else
3333
#define NODE_VERSIONS_KEY_AMARO(V)
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-process-versions.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ const expected_keys = [
2727
];
2828

2929
const hasUndici = process.config.variables.node_builtin_shareable_builtins.includes('deps/undici/undici.js');
30+
const hasAmaro = process.config.variables.node_builtin_shareable_builtins.includes('deps/amaro/dist/index.js');
3031

3132
if (process.config.variables.node_use_amaro) {
32-
expected_keys.push('amaro');
33+
if (hasAmaro) {
34+
expected_keys.push('amaro');
35+
}
3336
}
3437
if (hasUndici) {
3538
expected_keys.push('undici');

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.