Luca Casonato
bff235a8ec
fix(ext/http): actually await goAhead
promise ( #24226 )
2024-06-19 01:31:28 +02:00
Richard Carson
e92d44fbff
fix(ext/permissions): add correct feature flags to winapi ( #24218 )
2024-06-19 01:31:28 +02:00
Bartek Iwańczuk
330896458d
fix(ext/node): better support for node:diagnostics_channel
module ( #24088 )
...
Closes https://github.com/denoland/deno/issues/24060
2024-06-19 01:31:28 +02:00
Bartek Iwańczuk
45b05db843
fix(inspector): crash on "Debugger.setBlackboxPatterns" ( #24204 )
...
Closes https://github.com/denoland/deno/issues/24196
---------
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-06-19 01:31:27 +02:00
David Sherret
6fe5f041c9
fix(no-slow-types): handle named type in mapped type ( #24205 )
...
Fixed via the swc upgrade.
Tests here: https://github.com/denoland/deno_graph/pull/499
Closes #23284
2024-06-19 01:31:27 +02:00
Satya Rohith
7aa672e563
chore: upgrade to rust 1.79 ( #24207 )
2024-06-19 01:31:27 +02:00
Divy Srivastava
1c871a8dc1
fix(ext/node): server.close()
does graceful shutdown ( #24184 )
2024-06-19 01:31:27 +02:00
Nathan Whitaker
f7a31f4398
fix(napi): Read reference ownership before calling finalizer to avoid crash ( #24203 )
...
Fixes #23493 .
What was happening here was that napi-rs was freeing the napi reference
([here](19e3488efc/crates/napi/src/bindgen_runtime/mod.rs (L62)
))
during its finalize callback (which we call
[here](fb31eaa9ca/cli/napi/js_native_api.rs (L132)
)).
We then were [reading the `ownership`
field](fb31eaa9ca/cli/napi/js_native_api.rs (L136)
)
of that freed reference.
For some reason on arm macs the freed memory gets zeroed, so the value
of `ownership` was `0` when we read it (i.e. it was
`ReferenceOwnership::Runtime`). We then freed it again (since we thought
we owned it), causing the segfault.
2024-06-19 01:31:27 +02:00
David Sherret
b0fc1118fd
fix(npm): use more relaxed package.json version constraint parsing ( #24202 )
2024-06-19 01:31:27 +02:00
Bartek Iwańczuk
22f277969e
chore: upgrade to reqwest 0.12.4 and rustls 0.22 ( #24056 )
...
This commit updates Deno to use `reqwest` at 0.12.4
and `rustls` at 0.22. Other related crates were updated
as well to match versions accepted by `reqwest` and `rustls`.
Note: we are not using the latest available `rustls` yet,
but this upgrade was non-trivial already, so a bump to
0.23 for `rustls` will be done in a separate commit.
Closes #23370
---------
Signed-off-by: Ryan Dahl <ry@tinyclouds.org>
Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-06-19 01:31:26 +02:00
Nayeem Rahman
dfafb948e2
perf(lsp): store settings in Arc ( #24191 )
2024-06-19 01:31:26 +02:00
Luca Casonato
df3bd12431
tests: update wpt ( #24198 )
2024-06-19 01:31:26 +02:00
Divy Srivastava
6f2ad6e1e2
fix(ext/webgpu): fix surface creation panic when adapter not initialized ( #24201 )
...
Fixes https://github.com/denoland/deno/issues/23433
2024-06-19 01:31:26 +02:00
Luca Casonato
4525facb02
fix(cli): missing flag for --unstable-process
( #24199 )
2024-06-19 01:31:26 +02:00
denobot
9ca1320746
1.44.2 ( #24192 )
...
Bumped versions for 1.44.2
Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com>
2024-06-12 17:51:19 -07:00
snek
a38bd0f8a9
fix: node-api get_value_string_utf8 should use utf8_length
2024-06-12 17:48:59 -07:00
Luca Casonato
d87bde0dc8
fix: don't panic when cache is not available ( #24175 )
...
Fixes #22144
2024-06-12 17:15:02 -07:00
Nathan Whitaker
4af7fb8b81
fix(cli): Explicitly cache NPM packages during deno install
( #24190 )
...
Fixes a regression introduced in
https://github.com/denoland/deno/pull/24170 , where we wouldn't actually
set up the node modules dir on `deno install` if there was an up to date
deno lockfile present.
Previously we were relying on the fact that resolving pending module
resolution called `cache_packages` (which sets up the node modules dir).
When pending resolutions were removed, and the `resolve_pending`
function with it, we also removed the `cache_packages` call needed to
set up node modules.
2024-06-12 17:15:02 -07:00
Nayeem Rahman
5bc78de808
fix(lsp): strip .js before probing for valid import fix ( #24188 )
2024-06-12 17:15:02 -07:00
Divy Srivastava
bf9e6c4df9
fix(ext/node): fix vm memory usage and context initialization ( #23976 )
...
Fixes https://github.com/denoland/deno/issues/22441
Fixes https://github.com/denoland/deno/issues/23913
Fixes https://github.com/denoland/deno/issues/23852
Fixes https://github.com/denoland/deno/issues/23917
2024-06-12 17:15:02 -07:00
Nayeem Rahman
7dcbc3b674
feat(lsp): respect editor indentation options ( #24181 )
2024-06-12 17:15:02 -07:00
Divy Srivastava
284ba71362
chore: remove dead code ( #24185 )
2024-06-12 17:15:02 -07:00
snek
f13742cc73
fix: clean up some node-api details ( #24178 )
...
- fix a few napi_* types
- clean up env hooks
- implement blocking queue in tsfn
- reduce transmutes
- use new `DataView::new` api from rusty_v8
2024-06-12 17:15:01 -07:00
Bartek Iwańczuk
1400f57449
build: fix 'deno_core' PR title lint ( #24183 )
2024-06-12 17:15:01 -07:00
Nayeem Rahman
ee48647065
fix(lsp): don't sort workspace files ( #24180 )
2024-06-12 17:15:01 -07:00
Nayeem Rahman
8fe9d2fcc8
refactor(lsp): collect npm reqs by scope ( #24172 )
2024-06-12 17:15:01 -07:00
David Sherret
78c30b1eff
ci: error on chore:
deno_core upgrade pr titles ( #24179 )
2024-06-12 17:15:01 -07:00
Divy Srivastava
0a1cafe9bf
chore: upgrade deno_core ( #24146 )
...
With changes for https://github.com/denoland/deno_core/pull/778
2024-06-12 17:15:01 -07:00
David Sherret
7cf15a4097
fix(npm): resolve dynamic npm imports individually ( #24170 )
...
* https://github.com/denoland/deno_npm/pull/57
* https://github.com/denoland/deno_graph/pull/498
Closes https://github.com/denoland/deno/issues/17802
2024-06-12 17:15:01 -07:00
Bartek Iwańczuk
03436e8f50
chore: sync up Node.js test files for v20.11.1 ( #24066 )
...
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-06-12 17:15:01 -07:00
Luca Casonato
fc896e58e9
fix(ext/node): ServerResponse header array handling ( #24149 )
...
Previously res.setHeader("foo", ["bar", "baz"]) added a single header
with a value of `bar,baz`. Really this should add two separate headers.
This is visible in `set-cookie` for example.
2024-06-12 17:15:00 -07:00
David Sherret
5b3c51aa26
FUTURE: support deno install <alias>@npm:<package>
( #24156 )
...
Closes #23144
2024-06-12 17:15:00 -07:00
Nathan Whitaker
4e4cb5d284
fix(jupyter): Avoid panicking when DEBUG
env var is set ( #24168 )
...
Fixes #22050 .
It seems very unlikely that a user would be intending to enable deno's
internal debug logs by setting the DEBUG env var. If they really want
that, they can set `RUST_LOG=debug` instead.
2024-06-12 17:15:00 -07:00
snek
21736392dc
fix: Rewrite Node-API ( #24101 )
...
Phase 1 node-api rewrite
2024-06-12 17:15:00 -07:00
Nayeem Rahman
44a4e2bcca
feat(lsp): workspace jsr resolution ( #24121 )
2024-06-12 17:15:00 -07:00
Satya Rohith
702235b65c
fix(ext/node): send data frame with end_stream flag on _final call ( #24147 )
2024-06-12 17:15:00 -07:00
David Sherret
ef1fa7ff2f
chore: add test for worker shutting down during npm import ( #24109 )
2024-06-12 17:15:00 -07:00
David Sherret
4cd6a81619
fix(check): attempt to resolve types from pkg before @types
pkg ( #24152 )
...
I've been meaning to fix this for ages, but I finally ran into it here:
https://github.com/dsherret/ts-ast-viewer/actions/runs/9432038675/job/25981325408
We need to resolve the `@types` package as a fallback instead of eagerly
resolving it.
2024-06-12 17:15:00 -07:00
Luca Casonato
2ca9466dcd
fix(ext/web): correct string tag for MessageEvent ( #24134 )
2024-06-12 17:15:00 -07:00
Luca Casonato
da10286869
fix(ext/http): print []
around ipv6 addresses ( #24150 )
2024-06-12 17:15:00 -07:00
Luca Casonato
b21082c918
fix(ext/node): add crypto and zlib constants ( #24151 )
2024-06-12 17:14:59 -07:00
Bartek Iwańczuk
f60bf84722
fix(ext/net): make node:http2 work with DENO_FUTURE=1 ( #24144 )
2024-06-12 17:14:59 -07:00
Luca Casonato
81a05e837b
fix(ext/websocket): correctly order messages when sending blobs ( #24133 )
...
Previously the asynchronous read of the blob would not block sends that
are started later. We now do this, but in such a way as to not regress
performance in the common case of not using `Blob`.
2024-06-12 17:14:59 -07:00
Luca Casonato
52c8428674
fix(ext/node): lossy UTF-8 read node_modules files ( #24140 )
...
Previously various reads of files in `node_modules` would error on
invalid UTF-8. These were cases involving:
- reading package.json from Rust
- reading package.json from JS
- reading CommonJS files from JS
- reading CommonJS files from Rust (for ESM translation)
- reading ESM files from Rust
2024-06-12 17:14:59 -07:00
Bartek Iwańczuk
898616daeb
chore: upgrade deno_core to 0.287.0 ( #24145 )
...
Includes:
- [fix: lossily UTF8 decode module source
text](ec38e428c6
)
- [fix: `ModuleMap` was not dropped if it had pending
futures](5d12f510a1
)
2024-06-12 17:14:59 -07:00
Bartek Iwańczuk
2304a3f414
fix: upgrade deno_core ( #24128 )
...
Includes https://github.com/denoland/deno_core/pull/770 necessary
for https://github.com/denoland/deno/pull/24101 .
Also includes https://github.com/denoland/deno_core/pull/769 that
fixes https://github.com/denoland/deno/issues/24098 and
https://github.com/denoland/deno/issues/24069 and
https://github.com/denoland/deno/issues/24089 .
2024-06-12 17:14:59 -07:00
Divy Srivastava
8994b51771
fix(ext/node): support stdin child_process IPC & fd stdout/stderr ( #24106 )
...
Add supports for "ipc" and fd options in child_process spawn API.
Internal changes: Adds a hidden rid and "ipc_for_internal_use" option to
Deno.Command. Used by `node:child_process`
Example:
```js
const out = fs.openSync("./logfile.txt", 'a')
const proc = spawn(process.execPath, ["./main.mjs", "child"], {
stdio: ["ipc", out, "inherit"]
});
```
Ref #16753
2024-06-12 17:14:59 -07:00
David Sherret
3eb7a2a6d3
fix: make writing to the deps cache more reliable ( #24135 )
...
I was able to reproduce this locally.
```
[error] Failed to execute snippet:
import { validate } from "@std/uuid";
import { assert, assertFalse } from "@std/assert";
assert(validate("6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b"));
assertFalse(validate("not a UUID"));
Download https://jsr.io/@std/uuid/meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1_meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/common.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/constants.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v1.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v3.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v4.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v5.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/_common.ts
error: Access is denied. (os error 5) (for 'V:\.cache\deno\deps\https\jsr.io\2ae5bb614c7526d0876be0b76da1372fd51304ae27d6202ee94df720b3523d08')
at file:///V:/deno_std/uuid/common.ts:43
[error] Failed to execute snippet:
import { v5, NAMESPACE_DNS, NIL_UUID } from "@std/uuid";
import { assert, assertFalse } from "@std/assert";
const data = new TextEncoder().encode("deno.land");
const uuid = await v5.generate(NAMESPACE_DNS, data);
assert(v5.validate(uuid));
assertFalse(v5.validate(NIL_UUID));
Download https://jsr.io/@std/uuid/meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1_meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/common.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/constants.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v1.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v3.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v4.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v5.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/_common.ts
error: Access is denied. (os error 5) (for 'V:\.cache\deno\deps\https\jsr.io\63dd818c5fc1ac39c04df9b42bd9dd4bbc07f7d1b174e405d003731125778da1')
at https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts:30:15
at file:///V:/deno_std/uuid/mod.ts:4
[error] Failed to execute snippet:
import { isNil } from "@std/uuid";
import { assert, assertFalse } from "@std/assert";
assert(isNil("00000000-0000-0000-0000-000000000000"));
assertFalse(isNil(crypto.randomUUID()));
Download https://jsr.io/@std/uuid/meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1_meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/common.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/constants.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v1.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v3.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v4.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v5.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/_common.ts
error: Access is denied. (os error 5) (for 'V:\.cache\deno\deps\https\jsr.io\fd3a12fc091d16ee29f10fa7a05eeeb8bd6c3cc014642e72478c757f00e7261e')
at https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts:34:40
at file:///V:/deno_std/uuid/common.ts:23
[error] Failed to execute snippet:
import { version } from "@std/uuid";
import { assertEquals } from "@std/assert/assert-equals";
assertEquals(version("d9428888-122b-11e1-b85c-61cd3cbb3210"), 1);
assertEquals(version("6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b"), 4);
Download https://jsr.io/@std/uuid/meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1_meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/common.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/constants.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v1.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v3.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v4.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v5.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/_common.ts
error: Access is denied. (os error 5) (for 'V:\.cache\deno\deps\https\jsr.io\2ae5bb614c7526d0876be0b76da1372fd51304ae27d6202ee94df720b3523d08')
at file:///V:/deno_std/uuid/common.ts:66
4 errors found
```
It occurs when many Deno processes are writing to the deps cache at the
same time. Fix is to use `atomic_write_with_retries` which is much more
reliable (and the function that helped make the ecosystem tests more
reliable too). After this change I no longer have this issue.
Closes https://github.com/denoland/deno/issues/24073
2024-06-12 17:14:59 -07:00
David Sherret
d2a8619162
fix: do not panic linting files with UTF-8 BOM ( #24136 )
...
Closes #24122
2024-06-12 17:14:59 -07:00
Satya Rohith
5a7241694d
chore(ext/node): remove dead op ( #24131 )
2024-06-12 17:14:58 -07:00