Commit Graph

1018 Commits

Author SHA1 Message Date
Leo Kettmeir c519355624
feat(ci): category & unstable tags checker (#23568) 2024-04-26 09:04:29 -07:00
David Sherret f3284529f1
feat(jsr): support importing from jsr via HTTPS specifiers (except for type checking) (#23513)
Closes https://github.com/jsr-io/jsr/issues/322
2024-04-24 21:43:34 +00:00
Matt Mastracci eed2598e6c
feat(ext/http): Implement request.signal for Deno.serve (#23425)
When the response has been successfully send, we abort the
`Request.signal` property to indicate that all resources associated with
this transaction may be torn down.
2024-04-24 14:03:37 -04:00
Bartek Iwańczuk 35220f0069
fix(workspace): provide workspace members as 'imports' in import map (#23492)
This commit changes the workspace support to provide all workspace
members to be available as imports based on their names and versions.

Closes https://github.com/denoland/deno/issues/23343
2024-04-23 17:21:06 +02:00
Marvin Hagemeister 9686a8803e
feat: add jsx precompile skip element option (#23457)
<!--
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.
-->
This PR wires up a new `jsxPrecompileSkipElements` option in
`compilerOptions` that can be used to exempt a list of elements from
being precompiled with the `precompile` JSX transform.
2024-04-22 17:07:36 +02:00
David Sherret f61e1a9796
chore: add lint script to ensure no new `itest!` tests (#23475) 2024-04-20 21:58:14 +00:00
Matt Mastracci d9d3f81f29
chore: remove unused, unstable 'http' namespace (#23436)
Landing parts of #21903 in preparation for the removal of serveHttp.
2024-04-18 11:21:25 -06:00
Bartek Iwańczuk 061bcb5393
chore: update release doc template (#23299)
Adjusts release doc template to changes made by @crowlKats in
`apiland_scripts`.
2024-04-11 12:12:33 -04:00
denobot ca7432b86b
chore: forward v1.42.2 release commit to main (#23315)
Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-04-11 13:37:24 +05:30
Matt Mastracci d3d3582b1f
chore: Make WPT repo shallow (#23205)
This is a particularly large repo and making it shallow improves
checkout time.
2024-04-03 13:40:13 -06:00
Asher Gomez 29085895c9
chore: move `tools/node_compat` to `tests/node_compat/runner` (#23025)
The `tools/node_compat/node` submodule has been moved to
`tests/node_compat/runner/suite` and the remaining files within
`tools/node_compat` to `tests/node_compat/runner`.

Most of the changes are of the header within `tests/node_compat/test`
files. The `setup` and `test` tasks within `tests/node_comapt` execute
successfully.

Towards #22525
CC @mmastrac
2024-04-03 09:24:55 +11:00
Nathan Whitaker 7ad76fd453
fix(ext/node): Add fs.readv, fs.readvSync (#23166)
Part of #18218.

Implements `fs.readv` and `fs.readvSync` and enables the corresponding
`node_compat` tests.
2024-04-01 20:42:49 -07:00
Asher Gomez 858abbe745
chore: update `std` submodule to 0.221.0 (#23112) 2024-04-02 12:57:05 +11:00
Bartek Iwańczuk 0e4d1cb5f9
feat(init): use jsr specifier for @std/assert (#23073)
This commit changes "deno init" subcommand to use "jsr:" specifier for
standard library "assert" module. It is unversioned, but we will change
it to `@^1` once `@std/assert` release version 1.0.

This allows us to start decoupling `deno` and `deno_std` release. The
release scripts have been updated to take that into account.
2024-03-27 18:51:52 +01:00
Bartek Iwańczuk bf9c57aeac
ci: allow "FUTURE" PR title (#23064)
Allows to use `BREAKING` prefix in the PR title.

This change will allow us to land PRs that change behavior with
`DENO_FUTURE=1` env var, and prepare for Deno 2.0 release.
2024-03-25 00:15:12 +00:00
Nathan Whitaker ebbc897b69
fix(ext/node): Reimplement StringDecoder to match node's behavior (#22933)
Fixes #22158.

Basically reimplements the whole `StringDecoder` with a much more direct
translation (read like one-to-one) of node's current logic. The old
implementation was closer to node's super old impl and it was too hard
to keep the code structure while matching the behavior of their new
logic.

This adds support for UTF-16LE, ascii, and latin1. 

This also enables the node_compat test, which now passes without
modification.
2024-03-15 17:24:13 -07:00
David Sherret bc782cee98
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-13 22:37:56 -04:00
David Sherret b3ca3b2f25
chore: rough first pass on spec tests (#22877) 2024-03-13 16:21:13 +00:00
David Sherret ad6b00a2bf
chore: enable clippy unused_async rule (#22834) 2024-03-11 23:48:00 -04:00
Asher Gomez c38c14f51f
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-12 03:31:34 +00:00
Nathan Whitaker a77b2987bc
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-11 15:49:43 -07:00
Bartek Iwańczuk badb42fc23
build: fix node_compat/setup.ts check (#22842) 2024-03-11 13:31:24 +00:00
mash-graz 80dbcd3ddf
fix(ext/node) implement receiveMessageOnPort for node:worker_threads (#22766)
Implementation of `receiveMessageOnPort` for `node:worker_threads`

Fixes: #22702
2024-03-11 00:23:06 +01:00
mash-graz 16dbbfa64a
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-10 22:46:05 +00:00
Divy Srivastava adb0226927
chore: Reuse linux symbols list on openbsd and freebsd (#22706) 2024-03-06 08:33:15 +05:30
Aapo Alasuutari 3333d67335
chore(tests): Remove vestiges of cli/tests folder (#22712) 2024-03-05 13:49:21 -07:00
Asher Gomez 0022c35a23
chore: move `tools/wpt` to `tests/wpt/runner` (#22545)
Towards #22525

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-03-05 00:41:16 +00:00
David Sherret 7ac0408330
ci: actually fix workflow permissions (#22644)
Also adds a lint to ensure this file is kept up to date.
2024-03-01 11:11:32 -05:00
Asher Gomez 3f53b74e6d
chore: fix `wpt_epoch` workflow (#22550)
Should fix #22257

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-02-26 06:41:17 -07:00
Asher Gomez 2b279ad630
chore: move `test_util` to `tests/util/server` (#22444)
As discussed with @mmastrac.

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-02-19 06:34:24 -07:00
Igor Zinkovsky 88d7c50cd5
chore(release): add deno-lambda to release checklist (#22431)
Signed-off-by: Igor Zinkovsky <igor@deno.com>
2024-02-16 09:46:01 -08:00
Asher Gomez 5596de8081
chore: move `test_util/wpt` to `tests/wpt/suite` (#22412)
As discussed with @mmastrac. I'll move `tools/wpt` to `tests/wpt` in a
follow-up PR.

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-02-16 03:32:28 +00:00
Divy Srivastava 052b7d8bbd
chore(release): update asset count for denort (#22425)
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-02-15 13:40:24 +05:30
Asher Gomez 6be389ce29
chore: move `test_util/std` to `tests/util/std` (#22402)
Note: tests are not the only part of the codebase that uses `std`. Other
parts, like `tools/`, do too. So, it could be argued that this is a
little misleading. Either way, I'm doing this as discussed with
@mmastrac.
2024-02-13 09:22:49 -07:00
Asher Gomez 92f6188253
chore: use `@std` import instead of `@test_util/std` (#22398)
This PR:
1. Replaces `@test_util/std`-prefixed imports with `@std`.
2. Adds `@std/` import map entries to a few `deno.json` files.
2024-02-13 02:05:10 +00:00
Matt Mastracci f5e46c9bf2
chore: move cli/tests/ -> tests/ (#22369)
This looks like a massive PR, but it's only a move from cli/tests ->
tests, and updates of relative paths for files.

This is the first step towards aggregate all of the integration test
files under tests/, which will lead to a set of integration tests that
can run without the CLI binary being built.

While we could leave these tests under `cli`, it would require us to
keep a more complex directory structure for the various test runners. In
addition, we have a lot of complexity to ignore various test files in
the `cli` project itself (cargo publish exclusion rules, autotests =
false, etc).

And finally, the `tests/` folder will eventually house the `test_ffi`,
`test_napi` and other testing code, reducing the size of the root repo
directory.

For easier review, the extremely large and noisy "move" is in the first
commit (with no changes -- just a move), while the remainder of the
changes to actual files is in the second commit.
2024-02-10 20:22:13 +00:00
Divy Srivastava 82eba2b53a
chore: update asset count to 9 in release_doc_template (#22347) 2024-02-08 17:58:04 +00:00
Matt Mastracci 64ebd441e9
chore: use @test_util for node_compat tests (#22331) 2024-02-07 23:21:32 +00:00
Bartek Iwańczuk 93e8ece147
chore: update WPT (#22312)
Fixes https://github.com/denoland/deno/issues/22257
2024-02-07 15:46:44 +01:00
Leo Kettmeir 1007358768
refactor: move ImageData to web extension (#22295)
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com>
2024-02-07 01:11:15 +01:00
Bartek Iwańczuk d889f99657
chore: use granular unstable flags in tools/ (#22138) 2024-01-26 22:35:43 +00:00
Leo Kettmeir 8f76762793
feat(web): ImageBitmap (#21898) 2024-01-22 12:08:01 +01:00
Asher Gomez 983c745d4f
chore: use `FsFile[Symbol.dispose]()` (#22007)
This change takes advantage of explicit resources management for
`FsFile` instances and tweaks documentation to encourage the use of it.

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-01-22 00:20:59 +01:00
Kenta Moriuchi c2c115ebd8
fix(ext): enable prefer-primordials for internal TypeScript (#21813)
Enabled prefer-primordials lint for ext/cron and ext/kv.
2024-01-07 23:20:02 +01:00
David Sherret a731647a51
chore: update LICENSE.md to 2024 (#21833) 2024-01-06 19:14:38 -05:00
Divy Srivastava bfd5f1598c
feat(ext/crypto): initial support for p521 in `generateKey` and `importKey` (#21815)
Part 1 of a potential 3 part series. Ref #13449 

The current implementation passes key material back and forth RustCrypto
group of crates and ring. ring does not implement p521 yet.

This PR adds support for P521 named curve in `generateKey` and
`importKey` where we use RustCrypto. Other parts should be moved over to
the RustGroup group of crates for consistency.
2024-01-06 16:48:31 +05:30
Divy Srivastava 1d46ee5129
chore(build): document faster rebuilds with `cargo plonk` (#21823) 2024-01-06 16:27:04 +05:30
David Sherret 7c5c502773
chore: update format script (#21811)
The PR referenced has been released so we can update this now.
2024-01-05 16:02:37 +00:00
Kenta Moriuchi e7e25db24f
chore: update deno_lint for CI (#21802) 2024-01-05 15:03:06 +00:00
Divy Srivastava 642c4a44a5
fix(ext/node): querystring stringify without encode callback (#21740)
Fixes https://github.com/denoland/deno/issues/21734

Changes:
- Use default encode when options do not provide a encode callback.
- Remove internal TS for `node:querystring`. Its not helping catching
bugs like this because of invalid type assumptions and use of `any`,
more of a maintenance burden.
2024-01-02 04:54:11 +00:00