From 617eeabe8369d7bfca7951d1cd55ac58ede1f9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 18 Oct 2021 19:36:28 +0200 Subject: feat(unstable): Node CJS and ESM resolvers for compat mode (#12424) This commit adds CJS and ESM Node resolvers to the "--compat" mode. The functionality is spread across "cli/compat" module and Node compatibility layer in "deno_std/node"; this stems from the fact that ES module resolution can only be implemented in Rust as it needs to directly integrated with "deno_core"; however "deno_std/node" already provided CJS module resolution. Currently this resolution is only active when running a files using "deno run --compat --unstable ", and is not available in other subcommands, which will be changed in follow up commits. --- cli/tests/testdata/compat/node_fs_promises.js | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 cli/tests/testdata/compat/node_fs_promises.js (limited to 'cli/tests/testdata/compat/node_fs_promises.js') diff --git a/cli/tests/testdata/compat/node_fs_promises.js b/cli/tests/testdata/compat/node_fs_promises.js deleted file mode 100644 index b2174b22b..000000000 --- a/cli/tests/testdata/compat/node_fs_promises.js +++ /dev/null @@ -1,3 +0,0 @@ -import fs from "node:fs/promises"; -const data = await fs.readFile("compat/test.txt", "utf-8"); -console.log(data); -- cgit v1.2.3