Commit graph

693 commits

Author SHA1 Message Date
Bartek Iwańczuk
32db2db121
fix(ext/node): createInterface doesn't require env permission (#29472)
Closes https://github.com/denoland/deno/issues/29441
2025-05-28 11:59:26 +02:00
David Sherret
e7bb7cca24
fix: load changed non-remote dynamic imports at runtime (#29413) 2025-05-26 21:38:51 +00:00
Yoshiya Hinosawa
79a9868d5e
fix(fmt): allow expressions used as key-value pair in css template literals (#29369) 2025-05-26 10:50:36 +09:00
Kenta Moriuchi
6023ca1f53
chore(tests): use docs.deno.com in tests to prevent GitHub rate limits (#29400) 2025-05-20 16:40:27 +00:00
David Sherret
224908c39a
fix(node): do not require permission checks for require's node_modules stats (#29397)
This change specifically allows op_require_stat to stat node_module
directories without having to go through the permission system.

Closes https://github.com/denoland/deno/issues/20484
2025-05-20 15:50:41 +00:00
Leo Kettmeir
97b84669a8
fix(node): use JsErrorClass for code property on node resolver errors (#29294)
Some checks are pending
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / build wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Superseeds #26631

---------

Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
2025-05-16 20:54:47 +02:00
Yoshiya Hinosawa
637bcffea7
fix(check): ignore errors on ambient modules (#29135)
This commit makes `deno check` ignore `Cannot find module` diagnostic if the
missing module specifier matches one of ambient module pattern. (For
example if there's `declare module "*.svg" { ... }` declaration in one
of d.ts files, importing of `<any>.svg` doesn't cause type error with
this change. This is necessary for passing the type checking of default
vite template.)

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2025-05-16 15:06:34 +09:00
Yoshiya Hinosawa
fab9b06878
fix(fmt): fail command when embedded language has syntax error (#29259)
Some checks are pending
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / build wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-05-15 10:51:48 +09:00
David Sherret
784c6a5296
fix(check): do not add @types/node@* to lockfile if a @types/node req already exists (#29270) 2025-05-13 18:44:54 -04:00
Bartek Iwańczuk
5ea90de199
feat(jupyter): allow to install and maintain multiple kernels (#29249)
Some checks are pending
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / build wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
This commit changes the `deno jupyter` subcommand:
- `deno jupyter` now accepts additional `--name` argument to 
allow installing and maintaing multiple kernelsspec - useful when 
one wants to install a stable kernel and a debug/canary kernel
- `deno jupyter --install` now accepts additional `--display` 
argument to allow customizing display name of the kernel - the 
default one is "Deno"
- `deno jupyter --install` no longer blindly installs kernelspec, 
instead it first checks if a kernelspec already exists and if so, 
returns an error suggesting to use `--force` flag
- `deno jupyter --help` no longer shows `--unstable` flag

Closes https://github.com/denoland/deno/issues/29219
Closes https://github.com/denoland/deno/issues/29220
2025-05-13 16:56:16 +00:00
Nayeem Rahman
9b0707baa2
fix(check): don't assert unique normalized specifiers (#29274) 2025-05-13 16:16:38 +00:00
David Sherret
1b36304381
fix(check): write lockfile after type checking (#29265)
Type checking might discover `npm:@types/node`, so write after type
checking.
2025-05-12 15:31:38 -04:00
David Sherret
e601df6bfb
fix: allow specifying otel config in --env-file (#29240)
Alternative to https://github.com/denoland/deno/pull/28127 that does cli
flag parsing, then env file loading, then resolves config with env vars.

This also fixes several other issues related to env vars in the
--env-file not being used for certain config.

Closes https://github.com/denoland/deno/issues/27851
Closes https://github.com/denoland/deno/issues/29171
Closes https://github.com/denoland/deno/pull/28127
Closes #29256
2025-05-11 21:09:52 -04:00
Bartek Iwańczuk
2fe200f6ef
fix(coverage): don't panic if all covered files are ignored via directive (#29250)
Closes https://github.com/denoland/deno/issues/29218
2025-05-12 02:47:32 +02:00
Divy Srivastava
7852806c3a
fix(ext/node): Fix export loadEnvFile from node:process (#29237)
Fixes https://github.com/denoland/deno/issues/29236
2025-05-10 09:21:26 +05:30
David Sherret
cd877fd16f
fix(node/test): basic support for t.skip and t.todo (#29222)
Adds basic support for `t.skip` and `t.todo`
2025-05-09 01:40:16 +02:00
Jonh Alexis
f8615e404c
fix(fmt): indent width should be ignored when formatting with use tabs set to true (#29205) 2025-05-08 22:00:13 +00:00
snek
c28cb56357
fix: inspector rewrite resource name to url (#29216)
Fixes: https://github.com/denoland/deno/issues/27003
2025-05-08 21:12:54 +00:00
Marvin Hagemeister
c015b8affd
feat(unstable): support comments in lint plugin (#29189)
This PR adds support for comments in the AST for lint plugins.

- The `Program` node has a `comments` field pointing to an array of all
comments.
- `SourceCode.getAllComments()`: Returns all comments (same as
`program.comments`)
- `SourceCode.getCommentsBefore(node)`: Get all comments before this
Node
- `SourceCode.getCommentsAfter(node)`: Get all comments after this Node
- `SourceCode.getCommentsInside(node)`: Get all comments inside this
Node

ESLint docs:
-
https://eslint.org/docs/latest/extend/custom-rules#accessing-the-source-code
- https://eslint.org/docs/latest/extend/custom-rules#accessing-comments
2025-05-08 21:59:36 +02:00
Divy Srivastava
9d0a833e7b
fix: bump default @types/node version range to 22.15.14 (#28407)
Fixes https://github.com/denoland/deno/pull/28168#discussion_r1982740706

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-05-08 17:44:22 +00:00
snek
842a07710f
fix: terminate control sock event with newline (#29184)
these should be newline terminated
2025-05-06 14:51:40 +00:00
snek
f47c4ea5e7
feat(unstable): notify control sock on serving (#29173)
send an event over the control socket when deno.serve is listening.
2025-05-05 17:27:17 +00:00
Laurence Rowe
8b0b3e9567
chore(cli): test support --single-threaded v8 flag (#29099) 2025-05-02 10:33:26 -04:00
David Sherret
539e41b8d4
fix(npm): respect etag for npm packument caching (#29130)
Stores the etag in a `_deno.etag` property on the json object of the
packument.
2025-05-02 09:49:05 -04:00
snek
bc1ced8260
refactor: allow lazy main module (#28929)
implement lazy(?) mode. an unconfigured jsruntime is created if
DENO_UNSTABLE_CONTROL_SOCK is present, and later passed into deno_runtime to be
configured and used.
2025-04-30 19:59:20 +00:00
David Sherret
2b746c3137
feat(check): support erasableSyntaxOnly for type checking (#29097)
Only when using `--check` or `deno check`. Doesn't have this hooked up
as part of the swc emit.
2025-04-30 02:38:07 +00:00
Nathan Whitaker
05574665b2
fix(ext/node): work correctly with wrapper Response objects, use correct rawHeaders structure (#29056)
Fixes https://github.com/denoland/deno/issues/28022

Basically drizzle-kit studio uses hono with the node-server adapter.
That creates wrapper objects for responses that forward property getters
to the underlying response (the one we provided). However, in deno.serve
we were assuming that the response was actually the same response we
initially gave and crashed when it wasn't. instead, just call the
property getters if we can't find the inner response.

The raw headers bug is that we were exposing the `rawHeaders` field on
`Incoming` as a `Headers` object, instead it's supposed to be a flat
array of the header keys + values. I.e. `["Content-Type:",
"application/json", "Host:", "http://localhost"]`
2025-04-30 00:14:29 +00:00
Nathan Whitaker
6d0035411b
feat(clean): deno clean --except <paths>, remove all cache data except what's needed to run paths (#28424)
Closes https://github.com/denoland/deno/issues/27229.


TODO:
- [x] Tests
- [x] Make some changes to `deno_cache_dir` so we can get the paths for
the local http cache
- [x] Right now this leaves the node modules setup cache in an incorrect
state (removes the symlinks, but doesn't update the setup cache)
- [ ] ~~Handle code cache and other sqlite caches?~~
2025-04-29 22:42:17 +00:00
Yoshiya Hinosawa
58b679a1d6
feat(check): detect tsconfig.json at workspace root (#29092)
This PR adds detection of `tsconfig.json` at the root of a workspace
when there exists either a deno.json or package.json. If a project
already has `deno.json` with a `compilerOptions` value the
`tsconfig.json` is ignored.
2025-04-29 21:54:22 +00:00
David Sherret
490c9c9099
fix: break unstable lockfile v5 to remove "has" from property names (#29095)
Lockfile v5 hasn't stabilized yet, so going to do this breaking change
in order to make the property names shorter.
2025-04-29 14:17:54 -04:00
David Sherret
5357bc0b9b
fix(npm): support registries that have no shasums or integrity (#29093)
This was actually fixed via the deno_npm and lockfile updates, but it
would be good to have an explicit entry for this in the release notes so
labeling this as a "fix"

Closes https://github.com/denoland/deno/issues/27758
2025-04-29 12:16:55 -04:00
Efe
49dbe697e5
fix(compile): pass default v8 args during compile (#29084) 2025-04-29 10:13:54 -04:00
Yoshiya Hinosawa
41fc04c00c
feat(fmt): support formatting of embedded css, html, and sql (#29014)
This commit adds the formatting of CSS, HTML, and SQL which are embedded in
Tagged Template Literal strings. The embedded languages are detected by
the tag name of the literal.

```ts
// triggers CSS formatting
const Div = styled.div`
  margin: 5px;
  padding: ${padding}px;
`;

// triggers HTML formatting
document.body.innerHTML = html`
  <main>
    <h1>Hello ${name}!<h1>
  </main>
`;

// triggers SQL formatting when `--unstable-sql` passed
const query = sql`
  SELECT
    ${table}.${field}
  FROM
    ${table};
`
```

See https://github.com/dprint/dprint-plugin-typescript/pull/701 for more
details
2025-04-29 22:17:55 +09:00
Nayeem Rahman
f44329fc56
feat(info): include deno version (#29080) 2025-04-28 18:41:30 +01:00
Bartek Iwańczuk
f2ae7a19f4
fix: make --allow-env stronger that --deny-env (#29079) 2025-04-28 19:28:38 +02:00
Luca Casonato
733ffd9dd9
fix(otel): recording metrics with more than 3 attributes (#28898)
We were calling `op_otel_metric_attribute3` with the wrong arguments.
2025-04-26 20:15:21 +02:00
Leo Kettmeir
0134f268cb
fix: better error message for bare run in file-like case (#29055)
Fixes #28996
2025-04-26 15:54:41 +02:00
Lach
ec8e683de9
fix(otel): support attributes on links and events (#28584) 2025-04-25 18:26:33 +02:00
David Sherret
1c6a2445c3
feat: TypeScript 5.8 (#29041)
* https://github.com/denoland/TypeScript/pull/18

Closes https://github.com/denoland/deno/issues/28711
2025-04-25 10:09:31 -04:00
Lucas Wasilewski
9ed2fad9ed
feat(ext/http): Show that is also listening on localhost (#28171)
Closes #27722

This will show `Listening on http://0.0.0.0:8000 (http://localhost:8000)`

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-04-25 08:36:20 +00:00
Bert Belder
90e90cda34
feat: code sign deno.exe (#28963)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-04-25 08:27:12 +02:00
David Sherret
2eeccf1045
fix(compile): use a memory mapped file for fallback (#29039) 2025-04-24 17:19:52 +00:00
David Sherret
3d16eb8ff3
fix(compile): temporarily fallback to reading resource data from file on windows (#29024)
Temp hacky fix for https://github.com/denoland/deno/issues/28982
2025-04-23 22:08:15 -04:00
David Sherret
bbe24337b9
fix: remove warnings for bare node builtins (#29000) 2025-04-23 15:30:59 -04:00
Leo Kettmeir
b77871e0c8
fix(publish): support virtual: and cloudflare: schemes (#28922)
For https://github.com/jsr-io/jsr/pull/1035
2025-04-22 01:41:32 -07:00
Nathan Whitaker
713bf3266b
fix(npm): only print deprecation warnings on first install (#28990)
Fixes https://github.com/denoland/deno/issues/28933.

This was a regression from the packument refactor.
2025-04-21 20:18:38 +00:00
Leo Kettmeir
79e36b0ccd
feat(doc): add darkmode for HTML output (#28989) 2025-04-21 13:02:50 -07:00
Nathan Whitaker
dbb5373eab
fix(lockfile): re-fetch packuments if version not found, properly pass patch packages (#28964)
Fixes two issues:
- If a cached packument was out of date and missing a version from the
lockfile, we would fail. Instead we should try again with a forced
re-fetch
- We weren't threading through the workspace patch packages correctly
2025-04-18 23:08:15 +00:00
Nathan Whitaker
6ce1e9b7f7
fix(install): error gracefully if user passes --no-config to deno install <package> (#28965)
Fixes #28090. Fixes #28961.
2025-04-18 22:13:20 +00:00
Bartek Iwańczuk
33b4d3a6eb
test: temporarily ignore specs::install::package_extra_nmd test (#28954)
These tests are failing randomly on Windows at the moment. The PR that
added them was released in Deno v2.2.10 and users haven't reported any
problems so far. So temporarily ignoring these tests to unblock another
patch release.
2025-04-18 12:48:30 +02:00