0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

26 commits

Author SHA1 Message Date
David Sherret
9102ba9b0f
fix(node): add dns/promises and stream/consumers (#16169) 2022-10-05 19:33:52 -04:00
Bartek Iwańczuk
048c06f84f
fix(npm): handle json files in require (#16125) 2022-10-01 22:21:19 +02:00
David Sherret
ecfafda9d8
perf: node cjs & esm analysis cache (#16097)
This commit adds a cache for CJS and ESM analysis that is backed by an
SQLite file.

The connection to the DB is lazily created on first use, so shouldn't
have impact on the startup time.

Benched with running Vite

Deno v1.26:
```
$ deno task dev
Warning deno task is unstable and may drastically change in the future
Task dev deno run -A --unstable --node-modules-dir npm:vite

  VITE v3.1.4  ready in 961 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
```

This branch:
```
../deno/target/release/deno task dev
Warning deno task is unstable and may drastically change in the future
Task dev deno run -A --unstable --node-modules-dir npm:vite

  VITE v3.1.4  ready in 330 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
```

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-01 12:15:56 +02:00
David Sherret
d677ba67f5
feat(npm): functionality to support child_process.fork (#15891) 2022-09-28 13:04:16 -04:00
David Sherret
716005a0d4
feat(npm): add flag for creating and resolving npm packages to a local node_modules folder (#15971) 2022-09-22 11:17:02 -04:00
Bartek Iwańczuk
7b98282993
fix(npm): binary entrypoint for .js or no extension (#15900) 2022-09-14 10:41:47 -04:00
David Sherret
73efed218f
refactor(npm): create general use NpmPackageResolver (#15882) 2022-09-13 11:59:01 -04:00
Bartek Iwańczuk
233d5422fd
fix(npm): use shim from deno_node crate for 'module' built-in module (#15881) 2022-09-12 18:11:32 -04:00
David Sherret
98454c1eb8
fix(npm): support cjs resolution of package subpath with package.json (#15855) 2022-09-12 15:47:54 -04:00
David Sherret
a3a4760831
fix(npm): align Deno importing Node cjs with Node esm importing cjs (#15879) 2022-09-12 14:28:51 -04:00
David Sherret
dee9f0acaf
fix(npm): align Node esm code importing cjs with Node (#15838) 2022-09-10 15:00:45 -04:00
David Sherret
3b0de03b59
fix(npm): remove export binding to match node (#15837) 2022-09-10 11:38:11 -04:00
Bartek Iwańczuk
6c179daff0
fix(npm): recursive translation of reexports, remove window global in node code (#15806)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-09-08 22:01:48 +02:00
Bartek Iwańczuk
d20e80fa50
refactor(npm): reorganize remapping built-in Node modules to remote URLs (#15755)
Changes how built-in Node modules are mapped to polyfills
from "deno_std". Instead of intertwining this logic into Node
resolution logic, we map them to "NodeResolution::BuiltIn"
which are remapped to "deno_std" URLs in ProcState.
2022-09-06 12:57:28 +02:00
Bartek Iwańczuk
f2448c5de2
fix(npm): conditional exports in npm: specifiers (#15778) 2022-09-06 12:56:34 +02:00
Bartek Iwańczuk
264ad49e18
refactor: cleanup Node compatibility code (#15766)
- move errors related to Node compat from cli/node/errors.rs to "ext/node" crate
- remove dependency on "node_resolver" crate
- make some of structures private to the "cli/node" module
2022-09-05 12:36:35 +02:00
Bartek Iwańczuk
adec4f575e
fix(npm): translate CJS to ESM with name clashes for files and dirs (#15697) 2022-08-31 00:31:59 +02:00
David Sherret
5f251b283b
fix(npm): prefer importing esm from esm (#15676) 2022-08-30 14:09:22 -04:00
Bartek Iwańczuk
b62ef4d37b
refactor(cli): Remove cli/node dependency on cli/compat (#15654) 2022-08-29 20:19:54 +02:00
David Sherret
ec98d86d21
fix(npm): handle cjs re-exports with the same name as an export (#15626) 2022-08-26 14:34:35 -04:00
David Sherret
18fcef8b29
fix(npm): cjs export analysis should take into consideration exports with dashes (#15582) 2022-08-24 13:37:34 -04:00
David Sherret
684aabbc25
feat: support subpaths in npm package references (#15578) 2022-08-24 11:25:32 -04:00
Bartek Iwańczuk
5268fa0e0f
fix(unstable): various resolution bugs for npm: specifiers (#15546)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-24 14:54:20 +02:00
David Sherret
452df99222
feat(npm): support packages with multiple command names (#15565) 2022-08-23 22:01:21 -04:00
David Sherret
e7367044d9
feat: binary npm commands (#15542) 2022-08-23 10:39:19 -04:00
David Sherret
87f80ff6be
feat(unstable): initial support for npm specifiers (#15484)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-20 11:31:33 -04:00