mirror of
https://github.com/denoland/deno.git
synced 2024-10-30 09:08:00 -04:00
40a72f3555
Supports package names that aren't all lowercase. This stores the package with a leading underscore (since that's not allowed in npm's registry and no package exists with a leading underscore) then base32 encoded (A-Z0-9) so it can be lowercased and avoid collisions. Global cache dir: ``` $DENO_DIR/npm/registry.npmjs.org/_{base32_encode(package_name).to_lowercase()}/{version} ``` node_modules dir `.deno` folder: ``` node_modules/.deno/_{base32_encode(package_name).to_lowercase()}@{version}/node_modules/<package-name> ``` Within node_modules folder: ``` node_modules/<package-name> ``` So, direct childs of the node_modules folder can have collisions between packages like `JSON` vs `json`, but this is already something npm itself doesn't handle well. Plus, Deno doesn't actually ever resolve to the `node_modules/<package-name>` folder, but just has that for compatibility. Additionally, packages in the `.deno` dir could have collissions if they have multiple dependencies that only differ in casing or a dependency that has different casing, but if someone is doing that then they're already going to have trouble with npm and they are asking for trouble in general. |
||
---|---|---|
.. | ||
bin/1.0.0 | ||
builtin-module-module/1.0.0 | ||
CAPITALS/1.0.0 | ||
check-error/1.0.0 | ||
child-process-fork/1.0.0 | ||
cjs-default-export/1.0.0 | ||
cjs-local-global-decls/1.0.0 | ||
cjs-module-export-assignment/1.0.0 | ||
cjs-module-export-assignment-number/1.0.0 | ||
cjs-reexport-collision/1.0.0 | ||
cjs-this-in-exports/1.0.0 | ||
cjs-with-file-stem/1.0.0 | ||
conditional-exports/1.0.0 | ||
dual-cjs-esm/1.0.0 | ||
env-var-re-export/1.0.0 | ||
esm-import-cjs-default/1.0.0 | ||
globals/1.0.0 | ||
MixedCase/1.0.0 | ||
no-types-in-conditional-exports/1.0.0 | ||
peer-dep-test-child | ||
peer-dep-test-grandchild/1.0.0 | ||
peer-dep-test-peer | ||
require-added-nm-folder/1.0.0 | ||
types-ambient/1.0.0 |