Commit 6920b08cc8b for nodejs
commit 6920b08cc8bd99cb9f14891de3c5e89d1c6c212c
Author: Geoffrey Booth <webadmin@geoffreybooth.com>
Date: Mon Nov 2 09:25:30 2026 -0800
deps: load amaro from dist/internal.js
amaro 1.3.0 turned dist/index.js into a thin wrapper that requires
./internal.js, where the implementation now lives. Register and
require internal.js as the built-in instead of index.js, which would
otherwise fail to resolve its sibling.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PR-URL: https://github.com/nodejs/node/pull/66144
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
diff --git a/configure.py b/configure.py
index d00bf6cf60a..791f8da0ea0 100755
--- a/configure.py
+++ b/configure.py
@@ -59,7 +59,7 @@ maglev_enabled_architectures = ('x64', 'arm', 'arm64', 'ppc64', 's390x', 'riscv6
# builtins may be removed later if they have been disabled by options
shareable_builtins = {'undici/undici': 'deps/undici/undici.js',
- 'amaro/dist/index': 'deps/amaro/dist/index.js'
+ 'amaro/dist/internal': 'deps/amaro/dist/internal.js'
}
# create option groups
@@ -3000,7 +3000,7 @@ configure_section_file(output)
# remove builtins that have been disabled
if options.without_amaro:
- del shareable_builtins['amaro/dist/index']
+ del shareable_builtins['amaro/dist/internal']
# configure shareable builtins
output['variables']['node_builtin_shareable_builtins'] = []
diff --git a/lib/internal/modules/typescript.js b/lib/internal/modules/typescript.js
index ebe41e308bc..3c33a7befcd 100644
--- a/lib/internal/modules/typescript.js
+++ b/lib/internal/modules/typescript.js
@@ -34,7 +34,7 @@ const {
*/
const loadTypeScriptParser = getLazy(() => {
assertTypeScript();
- const amaro = require('internal/deps/amaro/dist/index');
+ const amaro = require('internal/deps/amaro/dist/internal');
return amaro.transformSync;
});
diff --git a/node.gni b/node.gni
index af0b066d80e..721fa81a039 100644
--- a/node.gni
+++ b/node.gni
@@ -18,7 +18,7 @@ declare_args() {
# the list between configure.py and GN configurations.
node_builtin_shareable_builtins = [
"deps/undici/undici.js",
- "deps/amaro/dist/index.js",
+ "deps/amaro/dist/internal.js",
]
}
diff --git a/test/parallel/test-process-versions.js b/test/parallel/test-process-versions.js
index 9cb122448ed..c6eb09693cd 100644
--- a/test/parallel/test-process-versions.js
+++ b/test/parallel/test-process-versions.js
@@ -29,7 +29,7 @@ const expected_keys = [
const hasUndici = process.config.variables.node_builtin_shareable_builtins.includes('deps/undici/undici.js');
-const hasAmaro = process.config.variables.node_builtin_shareable_builtins.includes('deps/amaro/dist/index.js');
+const hasAmaro = process.config.variables.node_builtin_shareable_builtins.includes('deps/amaro/dist/internal.js');
const hasLief = process.config.variables.node_use_lief;
if (process.config.variables.node_use_amaro) {