1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
Commit graph

653 commits

Author SHA1 Message Date
Bartek Iwańczuk
207006c801
Revert "chore: upgrade to reqwest 0.12.4 and rustls 0.22 (#24056)" (#24262)
This reverts commit fb31eaa9ca.

Reverting because users reported spurious errors when downloading
dependencies - https://github.com/denoland/deno/issues/24260.

Closes https://github.com/denoland/deno/issues/24260
2024-06-19 16:14:09 +02:00
Divy Srivastava
5c5b4d7355
fix(ext/node): Add SIGPOLL and SIGUNUSED signals (#24259) 2024-06-19 16:14:08 +02:00
Divy Srivastava
e3904a784e
fix(ext/node): Add Dirent.path and Dirent.parentPath (#24257) 2024-06-19 16:14:08 +02:00
Nayeem Rahman
bc4c97b858
fix(lsp): use import map from workspace root (#24246)
Follow up to #24206 which broke deno_std intellisense.
2024-06-19 01:31:30 +02:00
Tom Alcorn
9f7b0083be
fix(ext/web): fix AbortSignal.timeout() leak (#23842)
<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/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.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->

Fixes #20663.

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-06-19 01:31:30 +02:00
David Sherret
37128321ae
perf(node): ensure cjs wrapper module has deterministic output (#24248) 2024-06-19 01:31:29 +02:00
Luca Casonato
bc7db0f703
fix(ext/console): bump default max str lengthto 10_00 (#24245) 2024-06-19 01:31:29 +02:00
Divy Srivastava
d0a7ec981c
fix(ext/node): make process.versions own property (#24240) 2024-06-19 01:31:29 +02:00
Satya Rohith
573bf3c160
feat(ext/node): add BlockList & SocketAddress classes (#24229)
Closes https://github.com/denoland/deno/issues/24059
2024-06-19 01:31:29 +02:00
Asher Gomez
a8c7aec937
fix(ext/node): use Deno.FsFile.statSync() (#24234) 2024-06-19 01:31:29 +02:00
Nayeem Rahman
b318d51822
feat(lsp): multi deno.json resolver scopes (#24206) 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
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
Luca Casonato
df3bd12431
tests: update wpt (#24198) 2024-06-19 01:31:26 +02: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
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
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
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
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
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
d2a8619162
fix: do not panic linting files with UTF-8 BOM (#24136)
Closes #24122
2024-06-12 17:14:59 -07:00
Nathan Whitaker
4338be6c6d
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-12 17:14:58 -07:00
David Sherret
012779edad
chore: support -- --nocapture in the spec tests (#24113) 2024-06-12 17:14:58 -07: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
7ed90a20d0
fix: better handling of npm resolution occurring on workers (#24094)
Closes https://github.com/denoland/deno/issues/24063
2024-06-05 17:04:16 +02:00
Bartek Iwańczuk
eb218c0f33
chore: upgrade dlint to 0.60.0 (#24041)
Factoring out `dlint` upgrade from
https://github.com/denoland/deno/pull/24034 as it
requires us to change the lint step on mac to use ARM runners.

---------

Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-06-05 01:09:29 +02:00
ud2
29a075de2b
chore(ext/web): use Error.captureStackTrace in DOMException constructor (#23986)
This makes `DOMException`'s `stack` property behave the same as native
errors' – `stack` is now an own accessor property on every instance, and
the getter calls `Error.prepareStackTrace`.

Upgrades `deno_core` to 0.284.0.
---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-06-05 01:09:13 +02:00
Nayeem Rahman
72088f2f52
fix(lsp): complete exports for import mapped jsr specifiers (#24054) 2024-06-03 21:32:28 +01:00
David Sherret
b1f776adef
refactor: extract structs for downloading tarballs and npm registry packuments (#24067) 2024-06-03 01:39:13 +00:00
Kenta Moriuchi
eda43c46de
fix: validate integer values in Deno.exitCode setter (#24068) 2024-06-02 21:29:01 -04:00
Bartek Iwańczuk
754f21f0cd
chore: disable part of test-fs-read-stream.js (#24085) 2024-06-02 21:12:52 -04:00
Kenta Moriuchi
f8fdaa082b
chore: update wpt suite (#24070) 2024-06-02 22:47:47 +02:00
David Sherret
2d3b596cf5
feat: do not require DENO_FUTURE=1 for npmrc support (#24043) 2024-05-30 04:07:57 +00:00