1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-18 03:44:05 -05:00
denoland-deno/cli
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
..
args feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
bench chore: update dlint to v0.68.0 for internal (#26711) 2024-11-04 12:17:11 -05:00
cache fix: clear dep analysis when module loading is done (#27204) 2024-12-05 15:48:50 +00:00
js feat(jupyter): Add Deno.jupyter.image API (#26284) 2024-11-16 15:13:50 +00:00
lsp feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
npm feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
ops feat: permission stack traces in ops (#26938) 2024-11-20 21:24:04 +00:00
schemas refactor(lint): manage schema files for linter in Deno repo (#27324) 2024-12-11 02:06:04 +01:00
standalone feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
tools feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
tsc fix: support bun specifiers in JSR publish (#24588) 2024-11-28 14:51:24 +01:00
util chore: reduce allocations in a few places (#27288) 2024-12-09 19:28:53 -05:00
auth_tokens.rs fix: trim space around DENO_AUTH_TOKENS (#25147) 2024-08-22 15:14:50 +02:00
build.rs perf(windows): delay load webgpu and some other dlls (#26917) 2024-11-18 20:44:17 +00:00
Cargo.toml chore: forward v2.1.3 release commit to main (#27248) 2024-12-06 02:12:57 +01:00
cdp.rs chore: upgrade to rust 1.79 (#24207) 2024-06-14 17:10:57 +05:30
clippy.toml fix: otel resiliency (#26857) 2024-11-14 12:16:28 +00:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
emit.rs feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
entitlements.plist chore: start codesigning mac release builds (#21303) 2023-11-23 15:30:26 -07:00
errors.rs feat: Wasm module support (#26668) 2024-11-19 18:59:23 -05:00
factory.rs feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
file_fetcher.rs refactor: remove usages of deno_core::resolve_import for resolving redirects (#27234) 2024-12-04 17:39:58 -05:00
graph_container.rs feat: add --allow-import flag (#25469) 2024-09-26 01:50:54 +00:00
graph_util.rs feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
http_util.rs fix: .npmrc settings not being passed to install/add command (#26473) 2024-10-24 20:03:56 +02:00
integration_tests_runner.rs chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00
js.rs chore: rename __runtime_js_source to hmr (#24442) 2024-07-05 17:47:53 +05:30
jsr.rs refactor(permissions): split up Descriptor into Allow, Deny, and Query (#25508) 2024-09-16 21:39:37 +01:00
main.rs refactor(unstable): move telemetry to own ext (#27067) 2024-11-26 11:22:18 +00:00
mainrt.rs refactor(unstable): move telemetry to own ext (#27067) 2024-11-26 11:22:18 +00:00
module_loader.rs feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
node.rs perf(compile): read embedded files as static references when UTF-8 and reading as strings (#27033) 2024-11-27 21:28:41 -05:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
shared.rs chore: Rust 1.80.1 (#25089) 2024-08-18 22:24:56 -04:00
task_runner.rs fix(task): do not always kill child on ctrl+c on windows (#27269) 2024-12-09 11:01:57 -05:00
version.rs build: Allow building 'rc' release from source (#25227) 2024-08-28 14:31:25 +00:00
worker.rs feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.