summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2024-07-15fix(node): Fix `--allow-scripts` with no `deno.json` (#24533)Nathan Whitaker
We would resolve the wrong package.json, resulting in an inability to run CJS (or other node-mode) scripts
2024-07-15fix(workspace): do not resolve to self for npm pkg depending on matching req ↵David Sherret
(#24591) Closes #24584
2024-07-15fix(docs): fix some deno.land/manual broken urls (#24557)Igor Borisoglebski
Fixing some broken urls found after the docs migration
2024-07-14fix(init): use bare specifier for `jsr:@std/assert` (#24581)David Sherret
Closes #24580
2024-07-13Revert "refactor(fetch): reimplement fetch with hyper instead of reqwest ↵Ryan Dahl
(#24237)" (#24574) This reverts commit f6fd6619e708a515831f707438368d81b0c9aa56. I'm seeing a difference between canary and 1.45.2. In `deno-docs/reference_gen` I can't download dax when running `deno task types` ``` ~/src/deno-docs/reference_gen# deno upgrade --canary Looking up latest canary version Found latest version f6fd6619e708a515831f707438368d81b0c9aa56 Downloading https://dl.deno.land/canary/f6fd6619e708a515831f707438368d81b0c9aa56/deno-aarch64-apple-darwin.zip Deno is upgrading to version f6fd6619e708a515831f707438368d81b0c9aa56 Archive: /var/folders/9v/kys6gqns6kl8nksyn4l1f9v40000gn/T/.tmpb5lDnq/deno.zip inflating: deno Upgraded successfully ~/src/deno-docs/reference_gen# deno -v deno 1.45.2+f6fd661 ~/src/deno-docs/reference_gen# rm -rf /Users/ry/Library/Caches/deno ~/src/deno-docs/reference_gen# deno task types Task types deno task types:deno && deno task types:node Task types:deno deno run --allow-read --allow-write --allow-run --allow-env --allow-sys deno-docs.ts error: JSR package manifest for '@david/dax' failed to load. expected value at line 1 column 1 at file:///Users/ry/src/deno-docs/reference_gen/deno-docs.ts:2:15 ~/src/deno-docs/reference_gen# deno upgrade --version 1.45.2 Downloading https://github.com/denoland/deno/releases/download/v1.45.2/deno-aarch64-apple-darwin.zip Deno is upgrading to version 1.45.2 Archive: /var/folders/9v/kys6gqns6kl8nksyn4l1f9v40000gn/T/.tmp3R7uhF/deno.zip inflating: deno Upgraded successfully ~/src/deno-docs/reference_gen# rm -rf /Users/ry/Library/Caches/deno ~/src/deno-docs/reference_gen# deno task types Task types deno task types:deno && deno task types:node Task types:deno deno run --allow-read --allow-write --allow-run --allow-env --allow-sys deno-docs.ts Task types:node deno run --allow-read --allow-write=. --allow-env --allow-sys node-docs.ts ```
2024-07-13refactor(fetch): reimplement fetch with hyper instead of reqwest (#24237)Sean McArthur
This commit re-implements `ext/fetch` and all dependent crates using `hyper` and `hyper-util`, instead of `reqwest`. The reasoning is that we want to have greater control and access to low level `hyper` APIs when implementing `fetch` API as well as `node:http` module. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-12chore: forward v1.45.2 release commit to main (#24564)denobot
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-07-12fix(publish): show dirty files on dirty check failure (#24541)David Sherret
2024-07-12fix(config): regression - should not discover npm workspace for nested ↵David Sherret
deno.json not in workspace (#24559) Closes #24554
2024-07-12fix(cli/init): broken link in deno init sample template (#24545)vwh
This commit fixes the broken link in the sample template provided by the deno init command.
2024-07-12fix: include already seen deps in lockfile dep tracking (#24556)David Sherret
Tests in https://github.com/denoland/deno_graph/pull/504 Closes #24536
2024-07-12refactor: move importMap with imports/scopes diagnostic to deno_config (#24553)David Sherret
2024-07-12chore: forward v1.45.1 release commit to main (#24540)denobot
This is the release commit being forwarded back to main for 1.45.1 Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-07-11fix(node): Ignore broken default install scripts (#24534)Nathan Whitaker
NPM inserts a default install script when a package has a `binding.gyp` file. It's possible, however, for the package to exclude the `binding.gyp` file when they publish, and in this case the install script will never succeed for a user of the package. This happens with `fsevents`, for instance. They don't include the `binding.gyp` file in their published tarball, but the default install script appears in the manifest served by `npm`. This causes us to warn that `fsevents` has an install script, but when you try to run it it fails due to `binding.gyp` not existing.
2024-07-11chore: `@netlify/edge-bundler` workaround until Deno 2.0 (#24532)David Sherret
Hack for a few months until Deno 2.0. See code for details
2024-07-11fix(npm): only warn about lifecycle scripts not being run when setting up ↵David Sherret
directory (#24530) Closes #24518
2024-07-111.45.0 (#24512)denobot
Bumped versions for 1.45.0 --------- Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-10chore: update deno_doc (#24509)Leo Kettmeir
2024-07-10fix(check): CJS types importing dual ESM/CJS package should prefer CJS types ↵David Sherret
(#24492) Closes #16370
2024-07-10feat(jsr): support publishing jsr packages in npm workspaces (#24507)David Sherret
Supports publishing an npm workspace with a directory structure similar to the following: - workspace - package.json - package-a - package.json - jsr.json - package-b - package.json - jsr.json deno_config PR: https://github.com/denoland/deno_config/pull/77 Closes https://github.com/denoland/deno/issues/23638
2024-07-10chore: tweak warning message for un-run install scripts (#24508)Nathan Whitaker
Previously when we printed out the packages that skipped install scripts, we didn't prefix them with `npm:`. When you pass `--allow-scripts` though, we require `npm:`, which means you can't just copy paste the package name from the warning message.
2024-07-10fix: memory leak when transpiling (#24490)Bartek Iwańczuk
This commit fixes memory leak described in https://github.com/denoland/deno/issues/24380. This is done by upgrading following crates: - deno_ast - deno_graph - eszip - dprint-plugin-typescript - deno_lint - deno_doc - deno_emit
2024-07-10fix: Add sys permission kinds for node compat (#24242)Adam Gregory
Fixes #24241 * Support "statfs", "username", "getPriority" and "setPriority" kinds for `--allow-sys`. * Check individual permissions in `node:os.userInfo()` instead of a single "userInfo" permission. * Check for "uid" permission in `node:process.geteuid()` instead of "geteuid". * Add missing "homedir" to `SysPermissionDescriptor.kind` union Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-10fix(ext/webgpu): fix `GPUUncapturedErrorEvent` parent type (#24369)Victor Turansky
https://developer.mozilla.org/en-US/docs/Web/API/GPUUncapturedErrorEvent Signed-off-by: Victor Turansky <victor.turansky@gmail.com>
2024-07-10feat(node): Support executing npm package lifecycle scripts ↵Nathan Whitaker
(preinstall/install/postinstall) (#24487) Adds support for running npm package lifecycle scripts, opted into via a new `--allow-scripts` flag. With this PR, when running `deno cache` (or `DENO_FUTURE=1 deno install`) you can specify the `--allow-scripts=pkg1,pkg2` flag to run lifecycle scripts attached to the given packages. Note at the moment this only works when `nodeModulesDir` is true (using the local resolver). When a package with un-run lifecycle scripts is encountered, we emit a warning suggesting things may not work and to try running lifecycle scripts. Additionally, if a package script implicitly requires `node-gyp` and it's not found on the system, we emit a warning. Extra things in this PR: - Extracted out bits of `task.rs` into a separate module for reuse - Added a couple fields to `process.config` in order to support `node-gyp` (it relies on a few variables being there) - Drive by fix to downloading new npm packages to test registry --- TODO: - [x] validation for allow-scripts args (make sure it looks like an npm package) - [x] make allow-scripts matching smarter - [ ] figure out what issues this closes --- Review notes: - This adds a bunch of deps to our test registry due to using `node-gyp`, so it's pretty noisy
2024-07-10feat: deprecate `deno vendor` (#22183)Asher Gomez
This commit deprecates `deno vendor` subcommand in favor of using `--vendor` flag or `"vendor": true` setting in the config file. The subcommand is still available (until Deno 2) but is hidden from the help output. Closes #20584 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-09feat(cli): `deno init --lib` (#22499)muddlebee
Closes #22287 Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: David Sherret <dsherret@gmail.com>
2024-07-09fix: panic when piping "deno help" or "deno --version" (#22917)muddlebee
Fixes #22863 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-09feat(compile): support --env (#24166)HasanAlrimawi
Supported the use of --env flag with the compile subcommand, so that the generated executable/binary file can access the passed env file.
2024-07-09fix: do not download compilerOptions -> types when not type checking (#24473)David Sherret
Closes https://github.com/denoland/deno/issues/22738
2024-07-09feat(workspace): support object config (#24483)David Sherret
This adds object config for the workspace config: ```json { "workspace": { "members": ["./member-1", "./member-2"] } } ``` This is a more verbose version of `"workspace": ["./member-1", "./member-2"]`. Although we don't need it at the moment, it makes the naming of `"workspace"` more clear and leaves the object open for more config in the future. Closes https://github.com/denoland/deno/issues/24456
2024-07-09fix: restore reference to dom.extras in lib.dom.d.ts (#24489)Bartek Iwańczuk
This was changed by mistake in #24326. Closes https://github.com/denoland/deno/issues/24459.
2024-07-09fix: make .setup-cache.bin in node_modules more reproducible (#24480)Zebreus
2024-07-09fix: only use maglev in DENO_FUTURE for now (#24485)snek
let it bake for a bit before enabling by default Signed-off-by: snek <snek@deno.com>
2024-07-09refactor: use concrete error types for node resolution (#24470)David Sherret
This will help clean up some of the code in the CLI because we'll be able to tell how the resolution failed (not part of this PR).
2024-07-09fix(lsp): do sloppy resolution for node-to-node imports in byonm (#24481)Nayeem Rahman
2024-07-09docs(ext/net): explain `port: 0` behavior (#24475)Asher Gomez
2024-07-09fix: add warning for invalid unstable feature use in deno.json/jsonc (#24120)HasanAlrimawi
2024-07-08fix(lsp): inherit workspace-root-only fields in members (#24440)Nayeem Rahman
2024-07-08fix(workspace): better cli file argument handling (#24447)David Sherret
Closes https://github.com/denoland/deno/issues/24422
2024-07-08feat: add `__tests__` to test file detection defaults (#24443)Marvin Hagemeister
The `jest` test runner popularized putting tests into a `__tests__` folder. Whilst many have switched to going with a `.test` suffix in the file name these days, there are still many jest projects that have `__tests__`. By adding this to the default test detection logic it makes `deno test` discover those out of the box.
2024-07-05fix(permissions): handle ipv6 addresses correctly (#24397)Luca Casonato
Also don't panic on invalid domain names and addresses. Extracted with cleanups up from #24080 Co-authored-by: Yazan AbdAl-Rahman <yazan.abdalrahman@exalt.ps>
2024-07-05refactor: move `FileCollector` to deno_config (#24433)David Sherret
2024-07-05fix(node): Implement `fs.lchown` (and `process.getegid`) (#24418)Nathan Whitaker
Closes https://github.com/denoland/deno/issues/21260. Part of https://github.com/denoland/deno/issues/18218. Implements `node:fs.lchown`, and enables the node_compat test for it. The test uses `process.getegid`, which we didn't have implemented, so I went ahead and implemented that as well to get the test working.
2024-07-05chore: rename `__runtime_js_source` to `hmr` (#24442)Divy Srivastava
Saves some keystrokes and easy to remember ``` cargo b --features hmr ```
2024-07-05feat: Deprecate --lock-write flag (#24436)Bartek Iwańczuk
This commit deprecates `--lock-write` flag by removing it from the help output and printing a warning message when it's used. Users should use `--frozen=false` instead which was added in https://github.com/denoland/deno/pull/24355. Towards https://github.com/denoland/deno/issues/24167.
2024-07-04fix: revert accidentally added `parentPath` on `DirEntry` (#24438)David Sherret
Reverts the accidentally added `.parentPath` on dir entries in https://github.com/denoland/deno/pull/24257/files This should not have been added to the public api and is not documented.
2024-07-05fix(publish): unfurling should always be done with the package json (#24435)David Sherret
Closes https://github.com/denoland/deno/issues/24430
2024-07-04feat(jupyter): support `confirm` and `prompt` in notebooks (#23592)Zander Hill
Closes: https://github.com/denoland/deno/issues/22633 This commit adds support for `confirm` and `prompt` APIs, that instead of reading from stdin are using notebook frontend to show modal boxes and wait for answers. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-04feat: npm workspace and better Deno workspace support (#24334)David Sherret
Adds much better support for the unstable Deno workspaces as well as support for npm workspaces. npm workspaces is still lacking in that we only install packages into the root node_modules folder. We'll make it smarter over time in order for it to figure out when to add node_modules folders within packages. This includes a breaking change in config file resolution where we stop searching for config files on the first found package.json unless it's in a workspace. For the previous behaviour, the root deno.json needs to be updated to be a workspace by adding `"workspace": ["./path-to-pkg-json-folder-goes-here"]`. See details in https://github.com/denoland/deno_config/pull/66 Closes #24340 Closes #24159 Closes #24161 Closes #22020 Closes #18546 Closes #16106 Closes #24160