From 75209e12f19ca5d4a2a7c9008fba63a487ad8e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 15 Feb 2023 19:44:52 +0100 Subject: feat: wire up ext/node to the Node compatibility layer (#17785) This PR changes Node.js/npm compatibility layer to use polyfills for built-in Node.js embedded in the snapshot (that are coming from "ext/node" extension). As a result loading `std/node`, either from "https://deno.land/std@/" or from "DENO_NODE_COMPAT_URL" env variable were removed. All code that is imported via "npm:" specifiers now uses code embedded in the snapshot. Several fixes were applied to various modules in "ext/node" to make tests pass. --------- Co-authored-by: Yoshiya Hinosawa Co-authored-by: Divy Srivastava --- cli/tests/integration/run_tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/tests/integration/run_tests.rs') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 6baa408e9..02fa5c2a0 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -3830,14 +3830,14 @@ fn stdio_streams_are_locked_in_permission_prompt() { } itest!(node_builtin_modules_ts { - args: "run --quiet run/node_builtin_modules/mod.ts", + args: "run --quiet --allow-read run/node_builtin_modules/mod.ts hello there", output: "run/node_builtin_modules/mod.ts.out", envs: env_vars_for_npm_tests_no_sync_download(), exit_code: 0, }); itest!(node_builtin_modules_js { - args: "run --quiet run/node_builtin_modules/mod.js", + args: "run --quiet --allow-read run/node_builtin_modules/mod.js hello there", output: "run/node_builtin_modules/mod.js.out", envs: env_vars_for_npm_tests_no_sync_download(), exit_code: 0, -- cgit v1.2.3