1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-18 13:22:55 -05:00
denoland-deno/tests/specs/install
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
..
alias_pkg_json_and_deno_json_jsr_pkg fix(byonm): resolve npm deps of jsr deps (#25399) 2024-09-04 14:00:44 +00:00
alias_pkg_json_and_deno_json_npm_pkg fix: remove recently added deno.json node_modules aliasing (#25542) 2024-09-09 20:19:29 +00:00
byonm_jsr_npm_dep fix(byonm): resolve npm deps of jsr deps (#25399) 2024-09-04 14:00:44 +00:00
byonm_run_tag_after_install fix(install): store tags associated with package in node_modules dir (#26000) 2024-10-02 17:16:46 -07:00
entrypoint_only_used_packages feat(unstable): support caching npm dependencies only as they're needed (#27300) 2024-12-10 18:24:23 -08:00
future_install_add_dist_tag chore: remove DENO_FUTURE=1 from spec tests (#25329) 2024-08-31 21:25:32 +00:00
future_install_global fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
future_install_local_add_deno fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
future_install_local_add_npm fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
future_install_local_deno fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
future_install_node_modules fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
future_install_node_modules_tag chore: remove DENO_FUTURE=1 from spec tests (#25329) 2024-08-31 21:25:32 +00:00
global/pkg_name_same_as_file fix(install/global): do not error if path is an npm pkg and relative file (#26975) 2024-11-21 17:00:10 +00:00
import_map_with_dir fix(install): don't attempt to cache specifiers that point to directories (#26369) 2024-10-17 22:25:22 +00:00
install_add_dep_existing fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
install_add_dev fix(install): better json editing (#26450) 2024-10-21 14:17:08 -04:00
install_add_dev_existing fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
install_deprecated_package fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
install_entrypoint fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
install_single_http_url_without_global_flag fix(install): recommend using deno install -g when using a single http url (#25388) 2024-09-03 17:55:29 +02:00
installs_all_workspace_imports fix(install): cache jsr deps from all workspace config files (#26779) 2024-11-08 12:45:30 -08:00
invalid_scheme fix: surface package.json location on dep parse failure (#26665) 2024-10-31 15:35:17 +00:00
jsr_exports fix(install): cache json exports of JSR packages (#26552) 2024-10-25 20:19:03 +00:00
jsr_exports_uses_locked fix(install): use locked version of jsr package when fetching exports (#27237) 2024-12-05 18:55:35 +00:00
move_after_install chore: remove DENO_FUTURE=1 from spec tests (#25329) 2024-08-31 21:25:32 +00:00
non_existent_optional_peer fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
scripts_install_launch_cjs_temp_dir feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
scripts_install_no_ext feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
type_only_import fix(install): cache type only module deps in deno install (#26497) 2024-10-23 15:01:45 -07:00
workspace_member_with_tag_dep fix(npm): ensure scoped package name is encoded in URLs (#26390) 2024-10-18 20:38:57 +02:00
workspace_node_modules_not_exists fix(install): Make sure target node_modules exists when symlinking (#25494) 2024-09-06 19:08:56 +00:00