mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
![]() This adds support for peer dependencies in npm packages. 1. If not found higher in the tree (ancestor and ancestor siblings), peer dependencies are resolved like a dependency similar to npm 7. 2. Optional peer dependencies are only resolved if found higher in the tree. 3. This creates "copy packages" or duplicates of a package when a package has different resolution due to peer dependency resolution—see https://pnpm.io/how-peers-are-resolved. Unlike pnpm though, duplicates of packages will have `_1`, `_2`, etc. added to the end of the package version in the directory in order to minimize the chance of hitting the max file path limit on Windows. This is done for both the local "node_modules" directory and also the global npm cache. The files are hard linked in this case to reduce hard drive space. This is a first pass and the code is definitely more inefficient than it could be. Closes #15823 |
||
---|---|---|
.. | ||
builtin_module_module | ||
cached_only | ||
cached_only_after_first_run | ||
check_errors | ||
child_process_fork_test | ||
cjs_local_global_decls | ||
cjs_module_export_assignment | ||
cjs_module_export_assignment_number | ||
cjs_reexport_collision | ||
cjs_sub_path | ||
cjs_this_in_exports | ||
cjs_with_deps | ||
cjs_yargs | ||
compare_globals | ||
conditional_exports | ||
dual_cjs_esm | ||
dynamic_import | ||
env_var_re_export | ||
error_version_after_subpath | ||
esm | ||
esm_import_cjs_default | ||
import_map | ||
info | ||
invalid_package_name | ||
lock_file | ||
no_npm_after_first_run | ||
no_unstable | ||
nonexistent_file | ||
peer_deps_with_copied_folders | ||
registry | ||
reload | ||
require_added_nm_folder | ||
require_json | ||
sub_paths | ||
tarball_with_global_header | ||
translate_cjs_to_esm | ||
types_ambient_module | ||
deno_cache.out | ||
deno_run_cjs.out | ||
deno_run_cowsay.out | ||
deno_run_cowthink.out | ||
deno_run_esm.out | ||
deno_run_no_ext.out | ||
deno_run_non_existent.out | ||
README.md |
npm test data
This folder contains test data for npm specifiers.
Registry
The registry is served by the test server (server in test_util) at
http://localhost:4545/npm/registry/ via the ./registry
folder.
Updating with real npm packages
- Set the
DENO_TEST_UTIL_UPDATE_NPM=1
environment variable - Run the test and it should download the packages.
Using a custom npm package
- Add the custom package to
./registry/@denotest
- Reference
npm:@denotest/<your-package-name>
in the tests.