summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/registry
AgeCommit message (Collapse)Author
2022-12-19fix(npm): conditional exports with --node-modules-dir (#17111)Bartek Iwańczuk
This commit fixes conditional exports in `require()` implementation if `--node-modules-dir` flag is used.
2022-12-15fix(npm): improve exports resolution when type checking (#17071)David Sherret
Closes #17012
2022-12-05fix(npm): dependency types were sometimes not being resolved when package ↵David Sherret
had no types entry (#16958) Closes #16957
2022-11-30fix(npm): improve package.json exports support for types (#16880)David Sherret
2022-11-29fix(ext/node): allow absolute path in createRequire (#16853)Yoshiya Hinosawa
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-11-28fix(npm): don't resolve JS files when resolving types (#16854)David Sherret
Closes #16851
2022-11-25fix(npm): better error message when attempting to use typescript in npm ↵David Sherret
packages (#16813)
2022-11-24fix(npm/types): resolve main entrypoint declaration file when no types entry ↵David Sherret
(#16791) Closes #16782
2022-11-24fix(npm/check): prioritize exports over types entry (#16788)David Sherret
2022-11-19fix(npm): handle directory resolution when resolving declaration files (#16706)David Sherret
Also fixes resolving specifiers like `./something.generated` in declaration files. Closes #16695
2022-11-19fix(ext/node): handle URL in createRequire (#16682)Yoshiya Hinosawa
2022-11-16fix(npm): using types for packages with subpath (#16656)Bartek Iwańczuk
For CommonJS packages we were not trying different extensions for files specified as subpath of the package ([package_name]/[subpath]). This commit fixes that.
2022-11-16fix(npm): support non-all lowercase package names (#16669)David Sherret
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.
2022-11-16fix(npm): don't fail if conditional exports don't contains types (#16651)Bartek Iwańczuk
If resolving types for an npm package, we didn't find "types" entry in the conditional exports declaration we were falling-through to regular resolution, instead of short-circuiting and giving up on resolving types, which might lead to unwarranted errors. Closes https://github.com/denoland/deno/issues/16649
2022-11-15fix(npm): probing for files that have a file stem (#16641)Bartek Iwańczuk
2022-11-08feat(unstable/npm): support peer dependencies (#16561)David Sherret
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
2022-11-02fix(npm): add `console` global for node environment (#16519)David Sherret
This global is already isolated to node during type checking. Closes #16518
2022-10-27chore(npm): add explicit tests for `module.exports` assignment with type ↵David Sherret
checking (#16435)
2022-10-21feat(unstable/npm): initial type checking of npm specifiers (#16332)David Sherret
2022-10-01fix(npm): handle json files in require (#16125)Bartek Iwańczuk
2022-09-28feat(npm): functionality to support child_process.fork (#15891)David Sherret
2022-09-22feat(npm): add flag for creating and resolving npm packages to a local ↵David Sherret
node_modules folder (#15971)
2022-09-17fix(ext/node): fix builtin module module (#15904)Yoshiya Hinosawa
2022-09-14fix(npm): binary entrypoint for .js or no extension (#15900)Bartek Iwańczuk
2022-09-12fix(npm): use shim from deno_node crate for 'module' built-in module (#15881)Bartek Iwańczuk
2022-09-12fix(npm): support cjs resolution of package subpath with package.json (#15855)David Sherret
2022-09-10fix(npm): align Node esm code importing cjs with Node (#15838)David Sherret
2022-09-10fix(npm): remove export binding to match node (#15837)David Sherret
2022-09-08fix(npm): recursive translation of reexports, remove window global in node ↵Bartek Iwańczuk
code (#15806) Co-authored-by: David Sherret <dsherret@gmail.com>
2022-09-03fix(npm): add more context to errors when file doesn't exist (#15749)Bartek Iwańczuk
2022-08-31fix(npm): translate CJS to ESM with name clashes for files and dirs (#15697)Bartek Iwańczuk
2022-08-30fix(npm): prefer importing esm from esm (#15676)David Sherret
2022-08-30fix(npm): skip extracting pax_global_header from tarballs (#15677)Bartek Iwańczuk
2022-08-29fix(npm): conditional exports with wildcards (#15652)Bartek Iwańczuk
2022-08-26fix(npm): handle cjs re-exports with the same name as an export (#15626)David Sherret
2022-08-26fix(ext/node): fix global in node env (#15622)Yoshiya Hinosawa
2022-08-26chore(npm): add test for esm npm binary package (#15609)David Sherret
2022-08-25fix: avoid global declaration collisions in cjs (#15608)David Sherret
* Use a default stack size * 2 in debug for Windows because swc using so much stack size. We should look into this more later though.
2022-08-24feat: support subpaths in npm package references (#15578)David Sherret
2022-08-23feat(npm): support packages with multiple command names (#15565)David Sherret
2022-08-23feat: binary npm commands (#15542)David Sherret
2022-08-20feat(unstable): initial support for npm specifiers (#15484)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>