Commit graph

7271 commits

Author SHA1 Message Date
David Sherret
becf24c8c2
fix(compile): ensure atime/birthtime/mtime/ctime is set in vfs (#28731)
Co-authored-by: XYCode <xycode-xyc@outlook.com>
2025-04-04 09:50:44 -04:00
WWRS
dca9f7c0c3
fix(fmt): use non-zero exit code when formatting fails (#28523) 2025-04-04 14:48:47 +01:00
Divy Srivastava
88b1f4a29a
chore: upgrade v8 to 135.1.0 (#28697) 2025-04-04 18:52:19 +05:30
denobot
08274e0621
chore: forward v2.2.7 release commit to main (#28746)
This is the release commit being forwarded back to main for 2.2.7

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-04-04 16:14:30 +05:30
Nayeem Rahman
67a1029b3b
fix(lsp): url_to_uri() encoding on windows (#28737) 2025-04-04 05:24:53 +00:00
David Sherret
52e243bd9a
fix(install): remove duplicate deprecated messages (#28738)
We were keying on package id instead of nv.
2025-04-04 01:53:54 +00:00
Nayeem Rahman
7509fc26dd
fix(lsp): preserve notification order after init flag is raised (#28733) 2025-04-03 23:54:09 +01:00
Nayeem Rahman
ec05282346
fix(test): ignore write errors in reporter (#28722) 2025-04-03 17:48:55 +01:00
David Sherret
8dd7c3dfb6
fix(npm): use Deno instead of Node in more cases for lifecycle scripts (#28715) 2025-04-03 02:45:58 +00:00
David Sherret
800a687951
fix(task): filter empty elements in xargs (#28714) 2025-04-02 16:38:59 -04:00
Nayeem Rahman
a0d6411088
fix(lsp): format vscode-userdata schemed documents (#28706) 2025-04-02 11:55:08 +01:00
Divy Srivastava
e10101347c
perf: remote symbolicate stack traces (#28470)
Fixes #28136 
Closes #28415

Publish symcache to GCS and generate trace URL during panic.

```
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 2.2.5
Args: ["C:\Users\divy\.deno\bin\deno.exe"]

View stack trace at:
https://panic.deno.com/v2.2.5/aarch64-apple-darwin/gszD49_B4utrqB4vrrqBozirqB49prqBwjkwqBw_jBg31Cw5tCg5sDoo3pqB41sDgkkB
```

## Design

<img
src=https://github.com/user-attachments/assets/396d53cd-1fe7-4d88-9ecd-ea7b74a9a1ed
height=500>

Example:
`https://panic.deno.com/v2.2.3/aarch64-apple-darwin/g4couawkboxb4tbg9oHwqbw6a`

Stack walking and symbolicate code is at
https://github.com/denoland/panic/
2025-04-02 08:42:28 +05:30
Nathan Whitaker
5e20982a30
feat(add/install): --npm and --jsr flags for deno add/install (#28666)
Flags to set the default registry for "bare" package names (no `npm:` or
`jsr:` prefix)
```
deno add --npm chalk react @types/react jsr:@std/fs
deno add --jsr @std/fs @std/async @std/fmt npm:chalk
```
2025-04-01 19:12:48 +00:00
Nayeem Rahman
d91658b45e
refactor(lsp): separate document and module storage (#28469) 2025-03-31 22:25:27 +01:00
Kenta Moriuchi
76a18a2220
fix(types): add Error.isError type (#28679) 2025-03-31 17:22:31 -04:00
David Sherret
1e65d21071
fix: show referrer for Wasm module dependency errors (#28653) 2025-03-28 09:13:39 -04:00
Kenta Moriuchi
f2299353a0
fix(webgpu): move isFallbackAdapter from GPUAdapter to GPUAdapterInfo (#28650)
fix #28618

I also fixed `Deno.privateCustomInspect`, which was defined as static
methods of the classes and was not working properly.
2025-03-28 03:08:57 -07:00
denobot
a1724f5d5a
chore: forward v2.2.6 release commit to main (#28657)
This is the release commit being forwarded back to main for 2.2.6

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2025-03-28 13:32:27 +05:30
David Sherret
e2f66d4059
fix(npm): improve optional peer dep handling (#28651) 2025-03-27 22:53:41 +00:00
Nathan Whitaker
ec4391f412
chore: downgrade warning to debug log on clonefile failure (#28637)
Ref https://github.com/denoland/deno/issues/26928.

This was originally a warning so potential bugs would be visible. Now
that the code has been working for a while without issues, and since the
warning can be triggered in a valid case (as in the issue above, where
the warnings also hid the real diagnostic), let's downgrade this from a
warning to a debug log.
2025-03-26 22:01:55 +00:00
Nathan Whitaker
863ab45436
fix(npm): set up bin entries for package even if it's already downloaded (#28626)
Fixes #28617
2025-03-25 22:32:15 +00:00
David Sherret
31f6c05c9c
feat(unstable/run): ability to lazily load statically analyzable dynamic imports (#28593)
This allows lazily loading statically analyzable dynamic imports when
not type checking.
2025-03-25 11:38:45 -04:00
David Sherret
c239d37d20
fix(npm): resolve non-version matching peer deps and warn instead (#28616)
This improves peer dependency resolution to be more relaxed and resolve
non-version matching ancestors similar to pnpm rather than introducing
duplicate dependencies. Deno will warn when this occurs. In the future,
we should look into introducing an option to have Deno error in this
scenario.
2025-03-25 11:10:13 -04:00
Divy Srivastava
48ccb67131
chore(ext/http): add "legacy_abort" runtime flag (#28371)
Deno.serve `Request` abort signals are aborted by default even when it
is finished successfully. This PR gates this behavior behind the
"legacy_abort" which is the default right now.

Turning the `no_legacy_abort` runtime option on is a **breaking change**
and will only abort request signals when there is a failure, thereby
cannot be used to determine if the request finished. This aligns with
`fetch` API.

Ref https://github.com/denoland/deno/issues/27005
2025-03-22 08:13:57 +05:30
denobot
43f6137d92
chore: forward v2.2.5 release commit to main (#28579)
NOTE: Commit 27363d389 was incorrectly landed in main before the release
completed and is not included in v2.2.5. The official v2.2.5 release was made
from the v2.2 branch.
2025-03-21 06:25:03 -07:00
David Sherret
94c9681385
feat(unstable): support using a local copy of npm packages (#28512)
This adds support for using a local copy of an npm package.

```js
// deno.json
{
  "patch": [
    "../path/to/local_npm_package"
  ],
  // required until Deno 2.3, but it will still be considered unstable
  "unstable": ["npm-patch"]
}
```

1. Requires using a node_modules folder.
2. When using `"nodeModulesDir": "auto"`, it recreates the folder in the
node_modules directory on each run which will slightly increase startup
time.
3. When using the default with a package.json (`"nodeModulesDir":
"manual"`), updating the package requires running `deno install`. This
is to get the package into the node_modules directory of the current
workspace. This is necessary instead of linking because packages can
have multiple "copy packages" due to peer dep resolution.

Caveat: Specifying a local copy of an npm package or making changes to
its dependencies will purge npm packages from the lockfile. This might
cause npm resolution to resolve differently and it may end up not using
the local copy of the npm package. It's very difficult to only
invalidate resolution midway through the graph and then only rebuild
that part of the resolution, so this is just a first pass that can be
improved in the future. In practice, this probably won't be an issue for
most people.

Another limitation is this also requires the npm package name to exist
in the registry at the moment.
2025-03-21 03:09:57 +00:00
Jo Franchetti
177d5b1476
docs: add docs for some webgpu APIs (#28548) 2025-03-20 23:35:21 +00:00
David Sherret
60b502db80
fix(lsp): do not show import-map-remap diagnostic when referrer and target are within the entry base (#28560)
For example, if someone has `"$src/": "./src"` in their import map, this
will no longer show a diagnostic when someone imports `"./a.ts"` from
./src/b.ts`
2025-03-20 11:20:24 -04:00
Jo Franchetti
3e547da20b
docs: adding jsdocs for temporalAPI (#28542) 2025-03-18 11:49:15 -07:00
Jake Champion
5aeb04f443
fix: add stackTraceLimit to ErrorConstructor interface and removed ErrorWithStackTraceLimit interface (#28539)
Signed-off-by: Jake Champion <me@jakechampion.name>
2025-03-18 09:56:39 -04:00
Jo Franchetti
1eaac23af8
docs: adding jsdocs for url and workers (#28528) 2025-03-18 06:33:46 -07:00
Paolo Barbolini
1516e3ef58
refactor: reduce dependency on futures crate (#28515)
Over time many `futures` APIs have been stabilized in `std`. This
migrates most uses to the std variants.
2025-03-17 14:14:19 +00:00
Paolo Barbolini
bb4c662660
refactor: replace memmem with memchr (#28516) 2025-03-17 09:33:51 -04:00
denobot
5f00b9700f
chore: forward v2.2.4 release commit to main (#28500) 2025-03-14 15:40:38 -07:00
Ryan Dahl
6d53bb9c9e
docs: randomUUID and getRandomValues (#28496) 2025-03-14 18:06:06 +00:00
David Sherret
ed2fac89eb
refactor: handle deno_media_type having Html and Sql variants (#28495) 2025-03-15 00:19:08 +09:00
Ryan Dahl
4f738660b9
feat: support FORCE_COLOR (#28490)
fixes https://github.com/denoland/deno/issues/17229
2025-03-14 07:15:29 -07:00
Nayeem Rahman
30aa94010a
fix(lsp): auto-import from npm package exports with manual node_modules (#28414) 2025-03-13 20:29:17 +00:00
Jo Franchetti
ea982cba78
docs: making copy a little clearer (#28481)
Updating compile help text copy to make it a little clearer
Reported in https://github.com/denoland/docs/issues/1500
2025-03-13 14:21:21 -04:00
Leo Kettmeir
28e5c388b4
feat(otel): span context propagators (#28460)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2025-03-13 16:32:45 +01:00
Ryan Dahl
f3e9325a91
docs: ignore absent window global variable in d.ts (#28456) 2025-03-12 06:10:15 -07:00
Luca Casonato
5c8d894aa3
fix(otel): don't print otel warning when variable is not set (#28475) 2025-03-12 06:37:08 +01:00
Jo Franchetti
fa51d5de44
docs: adding a missing full stop to context help text (#28465)
Full top missing from help text of config
2025-03-11 14:36:55 +00:00
David Sherret
ff28ecd91a
fix(bench): lower bench time budget when n is specified (#28454)
Closes #28430
2025-03-10 16:17:19 -04:00
David Sherret
9ea4f82643
fix(check): support types@ export conditions (#28450) 2025-03-10 13:20:48 -04:00
Nayeem Rahman
0ef3f6ba88
perf(lsp): lazily start the ts server (#28392) 2025-03-06 18:05:25 +00:00
Nayeem Rahman
e579440170
fix(lsp): silence errors from "codeAction/resolve" (#28400) 2025-03-06 18:00:44 +00:00
Bartek Iwańczuk
e6637ab6f1
chore(internal): reland eszip changes (#28294)
Co-authored-by: David Sherret <dsherret@gmail.com>
2025-03-05 22:25:56 +00:00
David Sherret
2292eb1c92
fix(node): support re-exported esm modules in cjs export analysis (#28379)
Adds support for re-exporting an ES module from a CJS one and then
importing the CJS module from ESM. Also fixes a bug where require esm
wasn't working in deno compile.
2025-03-05 16:37:46 -05:00
Nathan Whitaker
0c0757fe66
fix(install): exclude npm workspace packages from graph roots in install (#28401)
Fixes #28374.
2025-03-05 20:41:05 +00:00