1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-19 05:45:09 -05:00
denoland-deno/cli/tools
Nathan Whitaker 6f506208f6
feat(unstable): support caching npm dependencies only as they're needed (#27300)
Currently deno eagerly caches all npm packages in the workspace's npm
resolution. So, for instance, running a file `foo.ts` that imports
`npm:chalk` will also install all dependencies listed in `package.json`
and all `npm` dependencies listed in the lockfile.

This PR refactors things to give more control over when and what npm
packages are automatically cached while building the module graph.

After this PR, by default the current behavior is unchanged _except_ for
`deno install --entrypoint`, which will only cache npm packages used by
the given entrypoint. For the other subcommands, this behavior can be
enabled with `--unstable-npm-lazy-caching`


Fixes #25782.

---------

Signed-off-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-12-10 18:24:23 -08:00
..
bench feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
coverage feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
doc refactor: update deno_doc, use prismjs, remove internal reference html generation logic (#26885) 2024-11-19 08:56:04 -08:00
init fix(init): support scoped npm packages (#27128) 2024-11-28 15:07:32 +01:00
jupyter feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
lint refactor(lint): manage schema files for linter in Deno repo (#27324) 2024-12-11 02:06:04 +01:00
registry feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
repl feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
run feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
test feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
check.rs feat: Wasm module support (#26668) 2024-11-19 18:59:23 -05:00
clean.rs feat(clean): add progress bar (#25026) 2024-08-14 13:04:07 +02:00
compile.rs feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
doc.rs feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
fmt.rs fix(fmt): stable formatting of HTML files with JS (#27164) 2024-12-03 02:04:55 +01:00
info.rs feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
installer.rs feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
mod.rs BREAKING: remove deno vendor (#25343) 2024-09-03 17:00:57 +10:00
serve.rs feat(watch): log which file changed on HMR or watch change (#25801) 2024-11-16 15:59:31 +01:00
task.rs feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
upgrade.rs fix: otel resiliency (#26857) 2024-11-14 12:16:28 +00:00