1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-22 23:19:55 -05:00
Commit graph

1369 commits

Author SHA1 Message Date
ud2
e41bd026bc
fix(unstable/temporal): respect locale in Duration.prototype.toLocaleString (#27000)
Adds a temporary polyfill for `Duration.prototype.toLocaleString()`
that will be removed once native support in V8 lands.
2024-12-05 23:03:55 +01:00
Marvin Hagemeister
2a0658ad20
fix(node/worker_threads): data url not encoded properly with eval (#27184)
When using the `eval` option on Node's `worker_threads` the code is
passed as a `data:` URL. But we didn't encode the actual code for that,
which lead to syntax errors when including characters not allowed in an
URL.

Fixes a part of https://github.com/denoland/deno/issues/27167
2024-12-05 23:03:55 +01:00
David Sherret
a901bbcd10
fix(task): kill descendants when killing task process on Windows (#27163) 2024-12-05 23:03:54 +01:00
David Sherret
a34839e9d0
fix: improve auto-imports for npm packages (#27224)
Improves auto-imports when using `"nodeModulesDir": "auto"`
2024-12-05 23:03:54 +01:00
snek
f32c836520
fix(unstable): otel context with multiple keys (#27230)
`SafeMap` treats its argument as an object with a "length" and index
properties, rather than a generic iterator, so every time we cloned it,
it was dropping all the data.
2024-12-05 23:03:54 +01:00
Marvin Hagemeister
36d8d739f5
fix(task): don't panic with filter on missing task argument (#27180)
We were panicing when running `deno task --filter foo` without a task
argument.

Fixes https://github.com/denoland/deno/issues/27177
2024-12-05 23:03:54 +01:00
Yoshiya Hinosawa
e05a305e4c
test: add node compat test cases (#27134)
This PR enables node compat test cases found passing by using the tool
added in #27122

The percentage of passing test case increases from 16.16% to 30.43% by
this change.
2024-12-05 23:03:53 +01:00
Yoshiya Hinosawa
feba98ab4b
test(ext/node): reduce race condition in test case (#27207) 2024-12-05 23:03:53 +01:00
David Sherret
66f5d4b7e6
refactor: remove CliNpmRegistryApi (#27222)
Extracts more code out of the CLI.
2024-12-05 23:03:53 +01:00
Marvin Hagemeister
1bf665ddcf
fix(task): only pass args to root task (#27213)
When we run `deno task` with args like `deno task foo arg` the argument
should only be passed to the root task, not to its dependencies.

Fixes https://github.com/denoland/deno/issues/27206
2024-12-05 23:03:53 +01:00
Marvin Hagemeister
91d61df296
fix(node/fs): support recursive option in readdir (#27179)
We didn't support the `recursive` option of
`fs.readdir()/fs.readdirSync()`.

Fixes https://github.com/denoland/deno/issues/27175
2024-12-05 23:03:53 +01:00
Ian Bull
770af2dc73
refactor(ext/web): align error messages (#25871)
Aligns the error messages in the ext/web folder to be in-line with the
Deno style guide.
2024-12-05 23:03:53 +01:00
David Sherret
a3a8cc4129
chore: fix cjs_with_deps test to use a temp dir (#27199)
It was creating a node_modules directory.
2024-12-05 23:03:52 +01:00
Bartek Iwańczuk
b86c68dbdd
fix(fmt): stable formatting of HTML files with JS (#27164)
Closes https://github.com/denoland/deno/issues/26407
Closes https://github.com/denoland/deno/issues/26763
Closes https://github.com/denoland/deno/issues/26560
Closes https://github.com/denoland/deno/issues/26744
Closes https://github.com/denoland/deno/issues/27030
2024-12-05 23:03:52 +01:00
snek
dac0226882
feat(unstable): add metrics to otel (#27143)
Refs: https://github.com/denoland/deno/issues/26852

Initial support for exporting metrics.

Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-12-05 23:03:52 +01:00
Mathias Lykkegaard Lorenzen
7513e661bc
chore: export variables from node compat tools script (#27189) 2024-12-05 23:03:51 +01:00
Bartek Iwańczuk
6cac2ab63f
fix: support workspace:^ and workspace:~ version constraints (#27096)
This commit adds support for understanding "workpace:^"
and "workspace:~" version constraints in npm/pnpm workspaces.

This is done by upgrading various crates to their latest versions.

Closes https://github.com/denoland/deno/issues/26726

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2024-12-05 23:03:51 +01:00
David Sherret
3678eff0cb
fix(task): forward signals to spawned sub-processes on unix (#27141)
Closes https://github.com/denoland/deno/issues/18445
2024-12-05 23:03:51 +01:00
Ian Bull
aa100070a4
refactor(ext/fs): align error messages (#25414)
Aligns the error messages in the ext/fs folder to be in-line with the
Deno style guide.
2024-12-05 23:03:51 +01:00
Marvin Hagemeister
da64aa9e6d
fix(node/timers): error when passing id to clearTimeout/clearInterval (#27130)
As pointed out in https://github.com/denoland/deno/issues/27126 we used
a variable which could potentially be of type `number` instead of the
`Timeout` class instance. Ensure that we're always setting `_destroyed`
on the class instead instead.

Fixes https://github.com/denoland/deno/issues/27126
2024-11-28 15:47:29 +01:00
Luca Casonato
4a0bbd0a71
fix: support bun specifiers in JSR publish (#24588)
Fixes https://github.com/denoland/deno/issues/26989

---------

Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-11-28 15:47:29 +01:00
Divy Srivastava
52bcd35d9d
fix(ext/node): tls.connect socket upgrades (#27125)
Fixes https://github.com/denoland/deno/issues/27087
Fixes https://github.com/denoland/deno/issues/26685
Fixes https://github.com/denoland/deno/issues/26660
2024-11-28 15:47:29 +01:00
Nathan Whitaker
27757e83e0
fix(info): resolve bare specifier pointing to workspace member (#27020)
Fixes https://github.com/denoland/deno/issues/26721

Previously, we were applying only the import map, which would result in
`@scope/foo` expanding to (e.g.) `jsr:@scope/foo@1.0.0`. Since that
didn't exist it would error and fail to resolve.
2024-11-28 15:47:29 +01:00
David Sherret
cfd13b0f87
chore: fix lint step due to node compat test changes (#27111)
Seems due to merging this:
https://github.com/denoland/deno/actions/runs/12052779514/job/33606893423
2024-11-28 15:47:28 +01:00
Marvin Hagemeister
9edce4db77
fix(node/http): casing ignored in ServerResponse.hasHeader() (#27105)
We didn't respect casing when checking if a HTTP header is present in
Node's `ServerResponse.hasHeader()`. This lead to us returning incorrect
results when the header was present. Koa assumed that the `Content-Type`
header wasn't present when it actually was and defaulted to a different
`Content-Type` value.

Fixes https://github.com/denoland/deno/issues/27101
2024-11-28 15:47:28 +01:00
Bartek Iwańczuk
a24ce0ec93
fix(task): strip ansi codes and control chars when printing tasks (#27100) 2024-11-28 15:47:28 +01:00
Yoshiya Hinosawa
f64e176d69
test(ext/node): enable parallel/test-fs-promises-file-handle-stat.js (#27074) 2024-11-28 15:47:28 +01:00
David Sherret
bb3e918f4a
feat(unstable): repurpose --unstable-detect-cjs to attempt loading more modules as cjs (#27094)
This resurrects the `--unstable-detect-cjs` flag (which became stable),
and repurposes it to attempt loading .js/.jsx/.ts/.tsx files as CJS in
the following additional scenarios:

1. There is no package.json
1. There is a package.json without a "type" field

Also cleans up the implementation of this in the LSP a lot by hanging
`resolution_mode()` off `Document` (didn't think about doing that until
now).
2024-11-28 15:47:28 +01:00
Divy Srivastava
8171b761c2
perf(ext/webstorage): use object wrap for Storage (#26931)
![image](https://github.com/user-attachments/assets/3f86e2fd-9026-4965-8f3b-512423362f1e)


Depends on:
- https://github.com/denoland/deno_core/pull/970
- https://github.com/denoland/deno_core/pull/976
- https://github.com/denoland/deno_core/pull/980
- https://github.com/denoland/deno_core/pull/981

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-11-28 15:47:27 +01:00
Leo Kettmeir
dbb6263c18
fix(tools/doc): HTML resolve main entrypoint from config file (#27103)
Fixes #26901
2024-11-28 15:47:27 +01:00
Marvin Hagemeister
317aa50476
fix(node/fs): add missing stat path argument validation (#27086)
We didn't validate the `path` argument that's passed to `fs.stat()` and
`fs.statSync()` which lead to wrong errors being thrown. The
`@rollup/plugin-node-resolve` code calls it with `undefined` quite a lot
which lead to `nitro` and `nuxt` failing.

Fixes https://github.com/denoland/deno/issues/26700

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-11-28 15:47:27 +01:00
Leo Kettmeir
6f69f36924
chore(lint): add .out file reference checker (#27078)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-11-28 15:47:27 +01:00
Bartek Iwańczuk
e01df2510c
fix(task): handle carriage return in task description (#27099)
Ref https://github.com/denoland/deno/pull/27069#discussion_r1857702814
2024-11-28 15:47:27 +01:00
David Sherret
461c9a8898
chore: fix flaky specs::publish::npm_workspace_jsr_pkg_with_npm_dep::dep_and_workspace_dep (#27098)
Closes https://github.com/denoland/deno/issues/27097
2024-11-28 15:47:27 +01:00
Kenta Moriuchi
2ee6b1a732
fix(streams): reject string in ReadableStream.from type (#25116)
WebIDL `async iterable<T>` type rejects `string`

Ref https://github.com/whatwg/webidl/pull/1397, #24623
2024-11-28 15:47:26 +01:00
David Sherret
8cd9fa6aae
fix(node): correct resolution of dynamic import of esm from cjs (#27071)
Ensures a dynamic import in a CJS file will consider the referrer as an import for node resolution.

Also adds fixes (adds) support for `"resolution-mode"` in TypeScript.
2024-11-28 15:47:26 +01:00
Leo Kettmeir
525d231c84
fix(ext/webgpu): normalize limits to number (#27072)
Fixes #22029
2024-11-28 15:47:26 +01:00
Divy Srivastava
f34e76a300
fix(ext/fetch): don't throw when bodyUsed inspect after upgrade (#27088)
Fixes https://github.com/denoland/deno/issues/27083
2024-11-28 15:47:26 +01:00
David Sherret
389cde8326
chore(node/tests): increase tolerance of timers test on CI (#27077)
Increases the tolerance of the interval test on the CI.
2024-11-28 15:47:25 +01:00
Yoshiya Hinosawa
f88057643f
chore: update node_compat setup script, show remaining percentage (#27053) 2024-11-28 15:47:25 +01:00
Nayeem Rahman
ec81cbbd86
fix(lsp): support task object notation for tasks request (#27076) 2024-11-28 15:47:25 +01:00
Bartek Iwańczuk
594f59dc1d
fix(task): handle multiline descriptions properly (#27069)
Closes https://github.com/denoland/deno/issues/27049
2024-11-28 15:47:25 +01:00
David Sherret
467bbedf06
fix(check): support jsdoc @import tag (#26991)
* https://github.com/denoland/deno_graph/pull/544

Closes https://github.com/denoland/deno/issues/25516
2024-11-28 15:47:24 +01:00
David Sherret
3a887225ca
fix(compile): do not error embedding same symlink via multiple methods (#27015)
Closes https://github.com/denoland/deno/issues/27012
2024-11-28 15:47:24 +01:00
Espen Hovlandsdal
c380447de7
Merge commit from fork
* fix: drop auth headers, cookies on redirect to different origin

* refactor: destructure StringPrototypeEndsWith

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-28 15:47:24 +01:00
ctrl+d
60760abd87
fix(runtime/ops): Fix watchfs remove event (#27041)
Fix related to #26906. 
Currently, if a file is removed, no event is emitted because the file
path no longer exists. As a result, [this
check](12b377247b/runtime/ops/fs_events.rs (L149))
returns false.

With this PR, an additional check is introduced to verify if the file
exists. If the file does not exist, a custom "remove" event is emitted.
This change is necessary because, based on tests conducted on macOS and
Linux (Ubuntu 24.04.1 LTS), Linux emits a "rename" event instead of a
"remove" event when a file is deleted. Introducing a dedicated "remove"
event ensures consistent and clearer behavior across platforms.
2024-11-28 15:47:24 +01:00
snek
7c9a556922
feat(unstable): Instrument fetch (#27057)
Add basic tracing to `fetch`. Also fix span kinds so that we can
differentiate fetch and serve.
2024-11-28 15:47:24 +01:00
David Sherret
1f1b16d548
fix(compile): handle TypeScript file included as asset (#27032)
Closes #27024
2024-11-28 15:47:23 +01:00
Yoshiya Hinosawa
58c96d3ecb
chore: update node_compat setup script (#27051)
This PR updates the node_compat setup script. Now the copied version in
each test file is corrected. Also `TODO.md` links to the correct files
in Node.js repo.
2024-11-28 15:47:23 +01:00
snek
f64aa29099
feat: Instrument Deno.serve (#26964)
Add basic trace to Deno.serve. Also updates a bit of the testing infra
to make it easier to deal with.
2024-11-28 15:47:23 +01:00