snek
8ad25e86da
fix: node-api get_value_string_utf8 should use utf8_length ( #24193 )
...
whoops. also did a drive-by cleanup of `isolate` usage since i noticed
it while using `utf8_length(isolate)`
2024-06-12 21:39:20 -07:00
Divy Srivastava
280f20efd9
chore: update release template ( #24195 )
...
Fix Slack formatting
2024-06-13 04:21:57 +00:00
Divy Srivastava
5bcb46cacf
chore(ext/node): remove old vm ops ( #24187 )
...
Unused; before the recent rewrite of node:vm
2024-06-13 09:19:33 +05:30
denobot
efb2085b61
chore: forward v1.44.2 release commit to main ( #24194 )
...
Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com>
2024-06-13 01:57:22 +00:00
Luca Casonato
6e2d8c969c
fix: don't panic when cache is not available ( #24175 )
...
Fixes #22144
2024-06-12 16:29:02 -07:00
Nathan Whitaker
a7531361ef
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 16:06:41 -07:00
Nayeem Rahman
b30e5c0985
fix(lsp): strip .js before probing for valid import fix ( #24188 )
2024-06-12 22:22:57 +01:00
Divy Srivastava
1d290ccc2a
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 22:32:54 +05:30
Nayeem Rahman
85e9a790c9
feat(lsp): respect editor indentation options ( #24181 )
2024-06-12 17:41:01 +01:00
Divy Srivastava
05ec50672d
chore: remove dead code ( #24185 )
2024-06-12 10:13:03 -04:00
snek
3765e6b3a6
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-11 17:40:44 -07:00
Bartek Iwańczuk
07437acc74
build: fix 'deno_core' PR title lint ( #24183 )
2024-06-11 19:50:02 -04:00
Nayeem Rahman
3b9eeba02c
fix(lsp): don't sort workspace files ( #24180 )
2024-06-11 21:06:43 +01:00
Nayeem Rahman
0c199acb88
refactor(lsp): collect npm reqs by scope ( #24172 )
2024-06-11 18:14:36 +01:00
David Sherret
68e1823426
ci: error on chore:
deno_core upgrade pr titles ( #24179 )
2024-06-11 18:47:44 +02:00
Divy Srivastava
17e1219250
chore: upgrade deno_core ( #24146 )
...
With changes for https://github.com/denoland/deno_core/pull/778
2024-06-11 15:12:38 +02:00
David Sherret
4bc96c5d2a
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-11 08:55:12 -04:00
Bartek Iwańczuk
6a356aff13
chore: sync up Node.js test files for v20.11.1 ( #24066 )
...
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-06-11 11:41:44 +00:00
Luca Casonato
3d41b486da
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-11 13:39:44 +03:00
David Sherret
d74be0842a
FUTURE: support deno install <alias>@npm:<package>
( #24156 )
...
Closes #23144
2024-06-10 23:56:43 +00:00
Nathan Whitaker
7996c0df92
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-10 22:36:39 +00:00
snek
e3b2ee183b
fix: Rewrite Node-API ( #24101 )
...
Phase 1 node-api rewrite
2024-06-10 16:20:44 +00:00
Nayeem Rahman
7c5dbd5d54
feat(lsp): workspace jsr resolution ( #24121 )
2024-06-10 17:03:17 +01:00
Satya Rohith
4fd3d5a86e
fix(ext/node): send data frame with end_stream flag on _final call ( #24147 )
2024-06-10 16:30:56 +02:00
David Sherret
3be0a1e8b4
chore: add test for worker shutting down during npm import ( #24109 )
2024-06-10 13:46:28 +02:00
David Sherret
31154ff958
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-08 20:05:28 -04:00
Luca Casonato
32f5b4808e
fix(ext/web): correct string tag for MessageEvent ( #24134 )
2024-06-09 02:03:24 +02:00
Luca Casonato
f5d749d922
fix(ext/http): print []
around ipv6 addresses ( #24150 )
2024-06-09 02:03:07 +02:00
Luca Casonato
ed13d36e4b
fix(ext/node): add crypto and zlib constants ( #24151 )
2024-06-09 02:02:47 +02:00
Bartek Iwańczuk
3f3bb6a829
fix(ext/net): make node:http2 work with DENO_FUTURE=1 ( #24144 )
2024-06-09 01:54:26 +02:00
Luca Casonato
585ba28d47
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-08 18:36:43 +02:00
Luca Casonato
c1f23c5788
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-08 18:36:13 +02:00
Bartek Iwańczuk
22d34f7012
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-08 07:49:23 +05:30
Bartek Iwańczuk
9dc0e33e67
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-07 17:47:15 +00:00
Divy Srivastava
3735a1a542
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-07 22:51:32 +05:30
David Sherret
ed20102713
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-07 13:06:17 -04:00
David Sherret
78774dd664
fix: do not panic linting files with UTF-8 BOM ( #24136 )
...
Closes #24122
2024-06-07 17:02:47 +00:00
Satya Rohith
708a619693
chore(ext/node): remove dead op ( #24131 )
2024-06-07 18:50:43 +05:30
David Sherret
386d5c8310
refactor: remove PermissionsContainer
in deno_runtime ( #24119 )
...
Also removes permissions being passed in for node resolution. It was
completely useless because we only checked it for reading package.json
files, but Deno reading package.json files for resolution is perfectly
fine.
My guess is this is also a perf improvement because Deno is doing less
work.
2024-06-06 23:37:53 -04:00
snek
a17794d5cf
docs: clarify release instructions ( #24124 )
...
just a small change
Signed-off-by: snek <the@snek.dev>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-06-07 01:15:56 +00:00
David Sherret
7a17eba5a7
refactor: NpmRegistryApi
- #[async_trait(?Send)]
( #24126 )
2024-06-06 22:37:41 +00:00
Nathan Whitaker
47d19461a5
fix(cli): Overwrite existing bin entries in node_modules
( #24123 )
...
Previously we warned on unix and didn't touch them on windows, now we
unconditionally overwrite them. This matches what npm does.
2024-06-06 21:21:25 +00:00
David Sherret
0648f6d70d
ci: bump timeout minutes due to slow mac aarch64 runner ( #24116 )
...
For the future...
2024-06-06 08:51:46 -04:00
David Sherret
e5b2c5ebb8
chore: support -- --nocapture
in the spec tests ( #24113 )
2024-06-06 08:37:13 -04:00
denobot
4d531bf229
chore: forward v1.44.1 release commit to main ( #24115 )
...
This is the release commit being forwarded back to main for 1.44.1
Co-authored-by: devsnek <devsnek@users.noreply.github.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-06-06 03:23:10 +00:00
Ryan Dahl
c7894447eb
chore: upgrade trust-dns-resolver and friends ( #24108 )
...
To avoid duplicate winreg crate in #24056
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-06-05 23:39:39 +02:00
David Sherret
566adb7c0a
fix(npm): use configured auth for tarball urls instead of scope auth ( #24111 )
...
Deno was using the scope auth for the tarball urls, which is not always
correct. We are going to do a release immediately for this issue.
2024-06-05 21:24:52 +00:00
Bartek Iwańczuk
0db73f6333
fix: update deno_npm ( #24065 )
2024-06-05 19:22:40 +00:00
David Sherret
a013b9113d
fix: support importing statically unanalyzable npm specifiers ( #24107 )
...
Closes https://github.com/denoland/deno/issues/20479
Closes https://github.com/denoland/deno/issues/18744
2024-06-05 15:18:06 -04:00
David Sherret
1b355d8a87
refactor(npm): improve locking around updating npm resolution ( #24104 )
...
Introduces a `SyncReadAsyncWriteLock` to make it harder to write to the
npm resolution without first waiting async in a queue. For the npm
resolution, reading synchronously is fine, but when updating, someone
should wait async, clone the data, then write the data at the end back.
2024-06-05 15:17:35 -04:00