summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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(npm): use start directory deno.json as "root deno.json config" in npm ↵David Sherret
workspace (#24538)
2024-07-11fix(node): revert invalid package target change (#24539)David Sherret
Reason is that `e` may contain an invalid package target nested deeply in the returned errors. We should probably add a `.code()` to all errors to make matching easier or make the errors flatter.
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(workspace): allow using --import-map flag with workspace (#24527)Bartek Iwańczuk
This is a temporary fix, which is not perfect - specifying `--import-map` will break resolution of packages defined in `workspace` setting, but erroring on `--import-map` currently causes regression in code that worked fine in v1.44.x.
2024-07-11fix(npm): only warn about lifecycle scripts not being run when setting up ↵David Sherret
directory (#24530) Closes #24518
2024-07-11chore: add std import mapping for tests (#24521)Marvin Hagemeister
This makes the LSP understand `@std/` imports in our tests.
2024-07-10chore: format yaml internally (#24520)David Sherret
Uses https://github.com/g-plane/pretty_yaml
2024-07-11build: update wgpu-core to unblock release (#24515)Bartek Iwańczuk
`wgpu-core` version 0.20 was yanked and it caused failure to publish `deno_webgpu`. I bumped and published locally to unblock the release.
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-10chore: fix flaky publish::npm_workspace test (#24511)David Sherret
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(node/perf_hooks): stub eventLoopUtilization (#24501)Marvin Hagemeister
This PR stubs `perf_hooks.eventLoopUtilization` to make the tests of [hapi](https://github.com/hapijs/hapi) start. Previously, they'd all error because of this function throwing a not implemented error. This brings down the test failures in their suite from 982 to 68 failures.
2024-07-10fix(node/v8): stub serializer methods (#24502)Marvin Hagemeister
Stubbing a few of Node's `v8` serializer methods makes the `tap` test runner at least start. Previously, it would fail to boot up as some instances of `DefaultSerializer` are constructed eagerly :tada: Before: <img width="1041" alt="Screenshot 2024-07-10 at 16 41 30" src="https://github.com/denoland/deno/assets/1062408/58f1157f-cef8-4176-9239-9d724ca0a677"> After: <img width="830" alt="Screenshot 2024-07-10 at 16 39 35" src="https://github.com/denoland/deno/assets/1062408/710ef673-8120-405a-b9d3-a5ca826b4829"> Fixes https://github.com/denoland/deno/issues/24409
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(node/http): don't send destroyed requests (#24498)Marvin Hagemeister
Make sure that already destroyed requests are not actually sent. This error was discovered in jsdom's test suite.
2024-07-10fix(node/http): don't error if request destroyed before send (#24497)Marvin Hagemeister
A request can be destroyed before it was even made in the Node http API. We errored on that. This issue was discovered in the JSDOM test suite.
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-10fix(net): set correct max size for Datagram (#21611)Andrew Johnston
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-09ci: update release steps related to dotcom (#24467)Leo Kettmeir
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: test in presence of .npmrc (#24486)snek
override home dir so .npmrc on the dev machine doesn't break it Signed-off-by: snek <snek@deno.com>
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-09fix: do not return undefined for missing global properties (#24474)snek
accessing e.g. `Buffer` in `Mode::Deno` mode should throw, not return undefined. --------- 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(node/http): support all `.writeHead()` signatures (#24469)Marvin Hagemeister
Implement the missing `.writeHead()` signatures from Node's `ServerResponse` class that we didn't support. Fixes https://github.com/denoland/deno/issues/24468
2024-07-09feat: upgrade deno_core to 0.293.0 (#24482)Bartek Iwańczuk
Upgrades to V8 12.7.224.12
2024-07-09fix(lsp): do sloppy resolution for node-to-node imports in byonm (#24481)Nayeem Rahman
2024-07-09fix(net): handle panic on Windows for Unix socket usage in Deno.serve() ↵Yazan AbdAl-Rahman
(#24423) This PR addresses the issue where Deno.serve() panics on Windows when trying to use a Unix socket. Fixes #21967
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-09feat: support wildcards in npm workspaces (#24471)David Sherret
Implemented in https://github.com/denoland/deno_config/pull/74 Closes https://github.com/denoland/deno/issues/24420
2024-07-08fix(lsp): inherit workspace-root-only fields in members (#24440)Nayeem Rahman
2024-07-08fix(node/assert): throws not checking error instance (#24466)Marvin Hagemeister
The implementation for `assert.throws()` from `node:assert` didn't work when the expected value was an `Error` constructor. In this case the thrown error should checked if it's an instance of said constructor. Fixes https://github.com/denoland/deno/issues/24464
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>