1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

5 commits

Author SHA1 Message Date
Bartek Iwańczuk
5508a0f45e
feat(compat): pin specific version of std/node (#12396) 2021-10-11 23:14:46 +02:00
Bartek Iwańczuk
c49a057599
feat(compat): inject Node globals in REPL (#12352) 2021-10-08 17:11:33 +02:00
Bartek Iwańczuk
b686907a45
feat(compat): inject Node globals (#12342)
This commit adds automatic injection of Node globals when "--compat" flag
is present.

This is done by executing "https://deno.land/std/node/global.ts" as a "side module",
before main module is executed.

This commit makes "--compat" required to be used with "--unstable" flag, as some
of Node globals require unstable Deno APIs.
2021-10-06 19:07:04 +02:00
Bartek Iwańczuk
37a24c7bdf
feat(compat): add support for node: prefixed built-ins (#12337)
Adds support for "node:" prefix for Node built-ins in "--compat" mode.

As per https://nodejs.org/api/esm.html#esm_node_imports
2021-10-06 01:25:13 +02:00
Bartek Iwańczuk
f1d3a17043
feat: add --compat flag to provide built-in Node modules (#12293)
This commit adds "--compat" flag. When the flag is passed a set of mappings for
built-in Node modules is injected into the import map. If user doesn't
explicitly provide an import map (using "--import-map" flag) then a map is
created on the fly. If there are already existing mappings in import map that
would clash with built-in Node modules a set of diagnostics is printed to the
terminal with suggestions how to proceed.
2021-10-05 01:35:55 +02:00