0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-07 23:06:50 -05:00
Commit graph

11015 commits

Author SHA1 Message Date
denobot
0d7662e155
1.41.3 (#22925)
Bumped versions for 1.41.3

Please ensure:
- [x] Target branch is correct (`vX.XX` if a patch release, `main` if
minor)
- [x] Crate versions are bumped correctly
- [x] deno_std version is incremented in the code (see
`cli/deno_std.rs`)
- [x] Releases.md is updated correctly (think relevancy and remove
reverts)

To make edits to this PR:
```shell
git fetch upstream release_1_41.3 && git checkout -b release_1_41.3 upstream/release_1_41.3
```

cc @nathanwhit

---------

Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com>
Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-03-14 11:13:46 -07:00
Divy Srivastava
6d7cbce342
fix(ext/node): Support private EC key signing (#22914)
Fixes https://github.com/denoland/deno/issues/18972

Support for web-push VAPID keys & jws signing

- Fixes EC keygen to return raw private key and uncompressed public key
point.
- Support for `EC PRIVATE KEY`
2024-03-14 10:11:32 -07:00
Divy Srivastava
d66d518b1a
fix(ext/node): support spki format in createPublicKey (#22918) 2024-03-14 10:11:32 -07:00
Divy Srivastava
d557209b67
fix(ext/node): crypto.getCipherInfo() (#22916)
Stub implementation of getCipherInfo(). Good enough for most cases.

Note: We do not support all OpenSSL ciphers (likely never will)

Fixes https://github.com/denoland/deno/issues/21805
2024-03-14 10:11:32 -07:00
guangwu
8e758da801
fix: typo in error from GPUBuffer.prototype.mapAsync (#22913) 2024-03-14 10:11:32 -07:00
Divy Srivastava
81c3dbdf48
fix(ext/node): DH (dhKeyAgreement) support for createPrivateKey (#22891)
Ref https://github.com/denoland/deno/pull/22511
2024-03-14 10:11:31 -07:00
Matt Mastracci
12ac8f0a16
fix(cli): unbreak extension example and fix __runtime_js_sources (#22906)
Better example to close https://github.com/denoland/deno/issues/22600

---------

Signed-off-by: Matt Mastracci <matthew@mastracci.com>
2024-03-14 10:11:31 -07:00
Matt Mastracci
a090aa7827
fix(cli): show asserts before leaks (#22904)
Fixes #22837
2024-03-14 10:11:31 -07:00
David Sherret
d27831dc4f
fix(node): resolve types via package.json for directory import (#22878)
Does a package resolve when resolving types for a directory (copying the
behaviour that typescript does).
2024-03-14 10:11:31 -07:00
David Sherret
a3fc3a1d22
chore: improve spec tests output (#22908) 2024-03-14 10:11:31 -07:00
Nayeem Rahman
2b0726e9bc
fix(node): add nul byte to statfs path on windows (#22905) 2024-03-14 10:11:31 -07:00
David Sherret
66b68d7520
fix: stop type checking during runtime (#22854)
In addition to the reasons for this outlined by @nayeemrmn in #14877
(which I think are reasons alone to not do this), this simplifies things
a lot because then we don't need to implement the following:

1. Need to handle a JSR module dynamically importing a module within it.
2. Need to handle importing an export of a JSR dep then another export
dynamically loaded later.

Additionally, people should be running `deno check dynamic_import.ts`
instead of relying on this behaviour.

Landing this as a fix because it's blocking people in some scenarios and
the current behaviour is broken (I didn't even have to change any tests
to remove this, which is bad).

Closes #22852
Closes #14877
Closes #22580
2024-03-14 10:11:31 -07:00
Matt Mastracci
aaba2b6b67
perf(permissions): Fast exit from checks when permission is in "fully-granted" state (#22894)
Skips the access check if the specific unary permission is in an
all-granted state. Generally prevents an allocation or two.

Hooks up a quiet "all" permission that is automatically inherited. This
permission will be used in the future to indicate that the user wishes
to accept all side-effects of the permissions they explicitly granted.

The "all" permission is an "ambient flag"-style permission that states
whether "allow-all" was passed on the command-line.
2024-03-14 10:11:31 -07:00
Nayeem Rahman
b7f8f9ac1a
chore(lsp): remove enablePaths compat path (#22895) 2024-03-14 10:11:31 -07:00
Satya Rohith
4f41d6abeb
fix(ext/node): make worker ids sequential (#22884) 2024-03-14 10:11:31 -07:00
Satya Rohith
dd88f6a7da
fix(ext/node): allow automatic worker_thread termination (#22647)
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-03-14 10:11:31 -07:00
David Sherret
316339f40e
chore: rough first pass on spec tests (#22877) 2024-03-14 10:11:31 -07:00
Matt Mastracci
3d2f5b2c2d
chore(permissions): add allow_all flag (#22890)
Unlocking a potential perf optimization at a later date -- carry the
`allow_all` flag into the permission container.
2024-03-14 10:11:31 -07:00
Divy Srivastava
7e9da01b16
chore: upgrade deno_core to 0.270.0 (#22826)
Upgrade to V8 12.3
2024-03-14 10:11:31 -07:00
Nayeem Rahman
49eaeede47
feat(node): implement fs.statfs() (#22862) 2024-03-14 10:11:30 -07:00
Asher Gomez
cae190b92b
fix(ext/node): initial crypto.createPublicKey() support (#22509)
Closes #21807

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-03-14 10:11:30 -07:00
Asher Gomez
9f8f87f27a
feat(ext/node): add more named curves in crypto.generateKeyPair[Sync]() (#22882)
Towards fixing #21761
2024-03-14 10:11:30 -07:00
Divy Srivastava
c3dbc0b38d
chore: explicitly type state.put for permissions (#22881) 2024-03-14 10:11:30 -07:00
Nayeem Rahman
8e6044ecc3
fix(runtime): negate partial condition for deny flags (#22866) 2024-03-14 10:11:30 -07:00
David Sherret
5b3658f448
fix(slow-types): improved exports tracing and infer type literals in as exprs (#22849)
Several fixes in deno_graph:

* https://github.com/denoland/deno_graph/pull/411
* https://github.com/denoland/deno_graph/pull/413
* https://github.com/denoland/deno_graph/pull/414
* https://github.com/denoland/deno_graph/pull/415
* https://github.com/denoland/deno_graph/pull/416
* https://github.com/denoland/deno_graph/pull/417

Also created https://github.com/denoland/publish_smoke_tests to help
prevent regressions in the future.

Closes https://github.com/denoland/deno/issues/22829
Closes https://github.com/denoland/deno/issues/22819
Closes https://github.com/denoland/deno/issues/22802
2024-03-14 10:11:30 -07:00
Divy Srivastava
c8034cef73
refactor: add deno_permissions crate (#22236)
Issue https://github.com/denoland/deno/issues/22222


![image](https://github.com/denoland/deno/assets/34997667/2af8474b-b919-4519-98ce-9d29bc7829f2)

This PR moves `runtime/permissions` code to a upstream crate called
`deno_permissions`. The `deno_permissions::PermissionsContainer` is put
into the OpState and can be used instead of the current trait-based
permissions system.

For this PR, I've migrated `deno_fetch` to the new crate but kept the
rest of the trait-based system as a wrapper of `deno_permissions` crate.
Doing the migration all at once is error prone and hard to review.

Comparing incremental compile times for `ext/fetch` on Mac M1:

| profile | `cargo build --bin deno` | `cargo plonk build --bin deno` |
| --------- | ------------- | ------------------- |
| `debug`   | 20 s          | 0.8s                |
| `release` | 4 mins 12 s   | 1.4s                  |
2024-03-14 10:11:30 -07:00
Divy Srivastava
530f073688
fix(ext/node): flush brotli decompression stream (#22856)
Fixes https://github.com/denoland/deno/issues/22259

The decompressed input size was not restored because of improper
flushing of the CBrotliDecompressStream state.
2024-03-14 10:11:30 -07:00
David Sherret
ba48299f81
chore: enable clippy unused_async rule (#22834) 2024-03-14 10:11:30 -07:00
Asher Gomez
66f57efaf6
chore: make Node setup script less sensitive to changes (#22855)
This change tweaks the Node setup script less sensitive to changes by
removing the test counter line in `tools/node_compat/TODO.md`.
Previously, this line would cause linting issues when two Node compat
changes occured one after another.

See
https://github.com/denoland/deno/actions/runs/8226735149/job/22493585874

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-03-14 10:11:30 -07:00
Matt Mastracci
915546bea8
fix(cli): use Instant for test times (#22853)
Fixes https://github.com/denoland/deno_std/issues/4473
2024-03-14 10:11:30 -07:00
Bartek Iwańczuk
cd918c482b
test(ext/node): add worker_threads test for SharedArrayBuffer (#22850)
Follow up to https://github.com/denoland/deno/pull/22815
2024-03-14 10:11:30 -07:00
Nathan Whitaker
93c6f927d4
fix(ext/node): Match punycode module behavior to node (#22847)
Fixes #19214.

We were using the `idna` crate to implement our polyfill for
`punycode.toASCII` and `punycode.toUnicode`. The `idna` crate is
correct, and adheres to the IDNA2003/2008 spec, but it turns out
`node`'s implementations don't really follow any spec! Instead, node
splits the domain by `'.'` and punycode encodes/decodes each part. This
means that node's implementations will happily work on codepoints that
are disallowed by the IDNA specs, causing the error in #19214.

While fixing this, I went ahead and matched the node behavior on all of
the punycode functions and enabled node's punycode test in our
`node_compat` suite.
2024-03-14 10:11:30 -07:00
Bartek Iwańczuk
5d1bb44929
fix(ext/node): make worker setup synchronous (#22815)
This commit fixes race condition in "node:worker_threads" module were
the first message did a setup of "threadId", "workerData" and
"environmentData".
Now this data is passed explicitly during workers creation and is set up
before any user code is executed.

Closes https://github.com/denoland/deno/issues/22783
Closes https://github.com/denoland/deno/issues/22672

---------

Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-03-14 10:11:30 -07:00
Nathan Whitaker
54fd0e3a42
fix(runtime): Restore default signal handler after user handlers are unregistered (#22757)
<!--
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 #22724. Fixes #7164.

This does add a dependency on `signal-hook`, but it's just a higher
level API on top of `signal-hook-registry` (which we and `tokio` already
depend on) and doesn't add any transitive deps.
2024-03-14 10:11:29 -07:00
David Sherret
88fab1829a
chore: fix child_process test (#22845)
This was failing in old versions of git.
2024-03-14 10:11:29 -07:00
David Sherret
465af5cedf
chore: hidden tool for overwriting files with fast check output (#22822)
Not sure if we should do this, but it's a nice hidden tool that
overwrites the working tree with the fast check output.
2024-03-14 10:11:29 -07:00
Bartek Iwańczuk
ed20d2bc73
build: fix node_compat/setup.ts check (#22842) 2024-03-14 10:11:29 -07:00
Bartek Iwańczuk
6263bcb8bd
fix(ext/node): worker_threads.parentPort is updated on startup (#20794)
This addresses
https://github.com/denoland/deno/issues/20613#issuecomment-1739962483.
2024-03-14 10:11:29 -07:00
mash-graz
9e49afb2c8
fix(ext/node) implement receiveMessageOnPort for node:worker_threads (#22766)
Implementation of `receiveMessageOnPort` for `node:worker_threads`

Fixes: #22702
2024-03-14 10:11:29 -07:00
mash-graz
6057dddbaf
fix(node:http) Export validateHeaderName and validateHeaderValue functions (#22616)
Modify `_http_outgoing.ts` to support the extended signature of
`validateHeaderName()` used since node v19.5.0/v18.14.0 by adding the
`label` parameter. (see:
https://nodejs.org/api/http.html#httpvalidateheadernamename-label)

Making both validation functions accessible as public exports of
`node:http`

Fixes: #22614
2024-03-14 10:11:29 -07:00
Asher Gomez
df69c2b98a
chore: update WPT expectations (#22838)
Fixes the latest failure.

See
https://github.com/denoland/deno/actions/runs/8218359853/job/22475137521
2024-03-14 10:11:29 -07:00
Kenta Moriuchi
730e0acee4
chore: replace 'call' to 'execute' in error messages (#22579)
Since both "call" and "execute" were used in error messages, I replaced them with "execute," which is more used.
2024-03-14 10:11:29 -07:00
David Sherret
109d66bb78
fix(publish): regression - publishing with vendor folder (#22830)
In
https://github.com/denoland/deno/pull/22720/files#diff-d62d85de2a7ffb816cd2fdbaa47e588352f521c7c43d058b75649bbb255e0ae1R70
, I copy and pasted from another area of the code and didn't think about
removing how it ignores the vendor folder by default.
2024-03-14 10:11:29 -07:00
Dimitris Apostolou
3b21518f93
fix: fix crate vulnerabilities (#22825)
https://rustsec.org/advisories/RUSTSEC-2024-0003
https://rustsec.org/advisories/RUSTSEC-2024-0020
2024-03-14 10:11:29 -07:00
David Sherret
84b36001b8
fix(node): require of pkg json imports was broken (#22821) 2024-03-14 10:11:29 -07:00
Divy Srivastava
010272a6c2
fix(ext/websocket): do not continue reading if socket rid closes (#21849)
Fixes https://github.com/denoland/deno/issues/21379
2024-03-14 10:11:29 -07:00
Divy Srivastava
4419fc340b
fix(ext/node): support junction symlinks on Windows (#22762)
Fixes https://github.com/denoland/deno/issues/20609

Vitepress support! `vitepress dev` and `vitepress build` via BYONM
2024-03-14 10:11:28 -07:00
Nathan Whitaker
7f99b968fc
fix(ext/node): Implement isBuiltin in node:module (#22817)
Fixes #22502

Implements the
[`isBuiltin`](https://nodejs.org/api/module.html#moduleisbuiltinmodulename)
function in `node:module`. I had to update the version of `@types/node`
in the test registry in order to get the test I added to typecheck.
2024-03-14 10:11:28 -07:00
Nathan Whitaker
1e1d0410a4
fix(ext/node): Add Immediate class to mirror NodeJS.Immediate (#22808)
Fixes #21660

Adds a basic `Immediate` class to mirror `NodeJS.Immediate`, and changes
`setImmediate` and `clearImmediate` to return and accept (respectively)
`Immediate` objects.

Note that for now {ref,unref,hasRef} are effectively stubs, as deno_core
doesn't really natively support immediates (they're currently modeled as
timers with delay of 0). Eventually we probably want to actually
implement these properly.
2024-03-14 10:11:28 -07:00
David Sherret
8b9a9a7411
fix(config): remove pkg name example and add pattern to schema (#22813) 2024-03-14 10:11:28 -07:00