summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2022-11-18fix(types/unstable): change interface base for `CommandOutput` (#16696)Jesse Jackson
extend from `CommandStatus` instead of `ChildStatus`. Resolves #16680.
2022-11-17perf(npm): make dependency resolution faster (#16694)David Sherret
2022-11-17fix(info): handle circular npm dependencies (#16692)David Sherret
2022-11-18chore: use Rust 1.65.0 (#16688)Aaron O'Mullan
2022-11-17chore: forward v1.28.1 release commit to main (#16678)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
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(lock): ensure npm dependencies are written with --lock-write (#16668)Bartek Iwańczuk
If "--lock-write" flag was present we never passed instance of the lockfile to the npm resolver, which made it skip adding discovered npm packages to the lockfile. This commit fixes that, by always passing lockfile to the npm resolver and only regenerating resolver snapshot is "--lock-write" is not present. Closes https://github.com/denoland/deno/issues/16666
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-17fix(ext/webstorage): make web storages re-assignable (#16661)Yoshiya Hinosawa
2022-11-15fix(npm): properly handle getting `@types` package for scoped packages (#16655)David Sherret
2022-11-15fix(npm): support dist tags specified in npm package dependencies (#16652)David Sherret
Closes #16321
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-15test: don't use remote std for tests (#16631)Bartek Iwańczuk
2022-11-15test: don't use lock file in JSX tests (#16639)Bartek Iwańczuk
2022-11-15perf(runtime/spawn): collect output using `op_read_all` (#16596)Marcos Casagrande
**This patch** ``` benchmark time (avg) (min … max) p75 p99 p995 ------------------------------------------------- ----------------------------- echo deno 23.99 ms/iter (22.51 ms … 33.61 ms) 23.97 ms 33.61 ms 33.61 ms cat 16kb 24.27 ms/iter (22.5 ms … 35.21 ms) 24.2 ms 35.21 ms 35.21 ms cat 1mb 25.88 ms/iter (25.04 ms … 30.28 ms) 26.12 ms 30.28 ms 30.28 ms cat 15mb 38.41 ms/iter (35.7 ms … 50 ms) 38.31 ms 50 ms 50 ms ``` **main** ``` benchmark time (avg) (min … max) p75 p99 p995 ------------------------------------------------- ----------------------------- echo deno 35.66 ms/iter (34.53 ms … 41.84 ms) 35.79 ms 41.84 ms 41.84 ms cat 16kb 35.99 ms/iter (34.52 ms … 44.94 ms) 36.05 ms 44.94 ms 44.94 ms cat 1mb 38.68 ms/iter (36.67 ms … 50.44 ms) 37.95 ms 50.44 ms 50.44 ms cat 15mb 48.4 ms/iter (46.19 ms … 58.41 ms) 49.16 ms 58.41 ms 58.41 ms ```
2022-11-15fix(npm): probing for files that have a file stem (#16641)Bartek Iwańczuk
2022-11-14fix(install): support npm specifiers (#16634)David Sherret
Supports npm specifiers for `deno install`. This will by default always use a lockfile (which is generated on first run) unless `--no-lock` is specified.
2022-11-14fix(npm): handle peer dep being resolved without resolved dep higher in tree ↵David Sherret
and then with (#16640) Peer dependency resolution wasn't handling a peer dependency being resolved without a dep higher in the tree and then with one being found higher in the tree.
2022-11-14fix(bundle): explicit error when using an npm specifier with deno bundle ↵David Sherret
(#16637)
2022-11-13fix(cli): add a jsdoc tag for `UnstableRunOptions` (#16525)Shogo Hida
2022-11-131.28.0 (#16620)denobot
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-11-13feat(unstable): "Deno.Command()" API (#16516)Leo Kettmeir
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-13feat(npm): require --unstable for npm specifiers in remote modules (#16612)David Sherret
2022-11-13fix(ext/flash): revert #16383 (graceful server startup/shutdown) (#16610)Yoshiya Hinosawa
#16383 made some of Node compat test cases flaky in deno_std (and when it fails it causes segfaults). See https://github.com/denoland/deno_std/issues/2882 for details
2022-11-12fix(npm): specifier resolution - handle data urls and modules at a directory ↵David Sherret
(#16611)
2022-11-12chore: upgrade rusty_v8 to 0.55.0 (#16604)Bartek Iwańczuk
<!-- Before submitting a PR, please read http://deno.land/manual/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. -->
2022-11-11feat(unstable/npm): module graph derived npm specifier resolution order (#16602)David Sherret
2022-11-11fix(npm): disable npm specifiers in import.meta.resolve() (#16599)Bartek Iwańczuk
2022-11-11perf: more efficient `deno cache` and npm package info usage (#16592)David Sherret
1. There was a lot of cloning going on with `NpmPackageInfo`. This is now stored in an `Arc<NpmPackageInfo>` and cloning only happens on the individual version. 2. The package cache is now cleared from memory after resolution. 3. This surfaced a bug in `deno cache` and I noticed it can be more efficient if we have multiple root specifiers if we provide all the specifiers as roots.
2022-11-11fix(npm): remove forgotten unstable check (#16598)Bartek Iwańczuk
2022-11-11fix(ext/flash): graceful server startup/shutdown (#16383)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/16267 Co-authored-by: Yusuke Tanaka <yusuktan@maguro.dev>
2022-11-11feat: Stabilize Deno.bench() and 'deno bench' subcommand (#16485)Bartek Iwańczuk
2022-11-10test: update lockfile for tests (#16591)Bartek Iwańczuk
2022-11-10feat: don't require --unstable flag for npm programs (#16520)Bartek Iwańczuk
This PR adds copies of several unstable APIs that are available in "Deno[Deno.internal].nodeUnstable" namespace. These copies do not perform unstable check (ie. don't require "--unstable" flag to be present). Otherwise they work exactly the same, including permission checks. These APIs are not meant to be used by users directly and can change at any time. Copies of following APIs are available in that namespace: - Deno.spawnChild - Deno.spawn - Deno.spawnSync - Deno.serve - Deno.upgradeHttpRaw - Deno.listenDatagram
2022-11-10feat: remove --unstable flag requirement for npm: specifiers (#16473)Bartek Iwańczuk
This commit makes "npm:" specifiers not require "--unstable" flag. At the moment some APIs used by Node polyfills still require "--unstable" which will be addressed in follow up PRs.
2022-11-10chore: update crates (#16588)Bartek Iwańczuk
2022-11-10feat(runtime): support creating workers with custom v8 snapshots (#16553)Mathias Lafeldt
This PR makes it possible for applications to create workers from custom snapshots to improve runtime performance (without having to fork/copy `runtime/workers.rs`).
2022-11-10feat(lock): don't require --unstable for auto discovery (#16582)Bartek Iwańczuk
Enables discovery of lock file unconditionally (ie. not requiring "--unstable" flag) as long as there's a config file discovered.
2022-11-09feat: stabilize Deno.uid() and Deno.gid() (#16424)Colin Ihrig
Closes https://github.com/denoland/deno_std/issues/2791
2022-11-09feat: stabilize Deno.systemMemoryInfo() (#16445)Colin Ihrig
2022-11-09feat: stabilize Deno.networkInterfaces() (#16451)Colin Ihrig
2022-11-09fix(ext/flash): revert #16284 and add test case (#16576)Yoshiya Hinosawa
2022-11-09chore: forward v1.27.2 release commit to main (#16572)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
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-08fix(lock): only store integrities for http: and https: imports (#16558)Bartek Iwańczuk
2022-11-06fix(npm): fix CJS resolution with local node_modules dir (#16547)Bartek Iwańczuk
This commit fixes CJS resolution when there's a local "node_modules/" directory. Before this commit relative imports from CJS files where resolved relative to root directory of the package instead of relative to referrer file.
2022-11-05fix(upgrade): don't prompt if current version has changed (#16542)sigmaSd
fix https://github.com/denoland/deno/issues/16539 fix https://github.com/denoland/deno/issues/16537
2022-11-04fix(ext/http): flush chunk when streaming resource (#16536)Luca Casonato
When streaming a resource in ext/http, with compression enabled, we didn't flush individual chunks. This became very problematic when we enabled `req.body` from `fetch` for FastStream recently. This commit now correctly flushes each resource chunk after compression.
2022-11-04chore: forward v1.27.1 release commit to main (#16533)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-04fix(runtime): fix Deno.hostname on windows (#16530)Yoshiya Hinosawa