0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/cli/tests/testdata/compat
Bartek Iwańczuk a65ce33fab
feat(compat): CJS/ESM interoperability (#13553)
This commit adds CJS/ESM interoperability when running in --compat mode.

Before executing files, they are analyzed and all CommonJS modules are
transformed on the fly to a ES modules. This is done by utilizing analyze_cjs()
functionality from deno_ast. After discovering exports and reexports, an ES
module is rendered and saved in memory for later use.

There's a caveat that all files ending with ".js" extension are considered as
CommonJS modules (unless there's a related "package.json" with "type": "module").
2022-02-27 14:38:45 +01:00
..
import_cjs_from_esm feat(compat): CJS/ESM interoperability (#13553) 2022-02-27 14:38:45 +01:00
import_esm_from_cjs compat: support compat mode in REPL (#12882) 2021-11-24 16:55:10 +01:00
test_runner feat(test): Add support for "deno test --compat" (#13235) 2021-12-30 17:18:30 +01:00
worker compat: support --compat in web workers (#13629) 2022-02-11 13:41:56 +01:00
dyn_import_reject.js feat(compat): add .code to dyn import error (#12633) 2021-11-08 16:02:40 +09:00
dyn_import_reject.out compat: support compat mode in REPL (#12882) 2021-11-24 16:55:10 +01:00
fs_promises.mjs feat(unstable): Node CJS and ESM resolvers for compat mode (#12424) 2021-10-18 19:36:28 +02:00
fs_promises.out feat: add --compat flag to provide built-in Node modules (#12293) 2021-10-05 01:35:55 +02:00
globals.out feat(unstable): Node CJS and ESM resolvers for compat mode (#12424) 2021-10-18 19:36:28 +02:00
globals.ts feat(compat): inject Node globals (#12342) 2021-10-06 19:07:04 +02:00
import_cjs_from_esm.out feat(compat): CJS/ESM interoperability (#13553) 2022-02-27 14:38:45 +01:00
import_map.json v1.19.0 2022-02-17 01:54:07 +01:00
import_map_https_imports.mjs v1.19.0 2022-02-17 01:54:07 +01:00
import_map_https_imports.out feat(compat): integrate import map and classic resolutions in ESM resolution (#12549) 2021-10-28 10:11:38 +02:00
node_fs_promises.mjs feat(unstable): Node CJS and ESM resolvers for compat mode (#12424) 2021-10-18 19:36:28 +02:00
test.txt feat: add --compat flag to provide built-in Node modules (#12293) 2021-10-05 01:35:55 +02:00