Commit graph

7551 commits

Author SHA1 Message Date
David Sherret
90058d6732
refactor(emitter): ability to not transpile and specify a source map base (#29996)
Some checks failed
ci / pre-build (push) Has been cancelled
ci / build libs (push) Has been cancelled
ci / test debug linux-aarch64 (push) Has been cancelled
ci / test release linux-aarch64 (push) Has been cancelled
ci / test debug macos-aarch64 (push) Has been cancelled
ci / test release macos-aarch64 (push) Has been cancelled
ci / bench release linux-x86_64 (push) Has been cancelled
ci / lint debug linux-x86_64 (push) Has been cancelled
ci / lint debug macos-x86_64 (push) Has been cancelled
ci / lint debug windows-x86_64 (push) Has been cancelled
ci / test debug linux-x86_64 (push) Has been cancelled
ci / test release linux-x86_64 (push) Has been cancelled
ci / test debug macos-x86_64 (push) Has been cancelled
ci / test release macos-x86_64 (push) Has been cancelled
ci / test debug windows-x86_64 (push) Has been cancelled
ci / test release windows-x86_64 (push) Has been cancelled
ci / publish canary (push) Has been cancelled
2025-07-04 12:51:17 -04:00
Nathan Whitaker
51c43ce8b4
fix(bundle): make the "dynamic require" hack work on minified output (#29997)
Some checks are pending
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 / 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 / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
It's terrible and I hate it but it works
2025-07-04 02:11:09 +00:00
David Sherret
cfa5273096
refactor: ability to preserve jsx internally (#29994) 2025-07-03 21:39:54 +00:00
David Sherret
dc95c566d6
fix(unstable): bytes and text imports from npm dependencies should require --allow-read (#29990)
npm dependencies doing a bytes/text import should require read
permissions because it's not possible to use `deno info` to inspect
them.
2025-07-03 20:33:13 +00:00
Nathan Whitaker
c5d06179a1
fix(bundle): resolve "sloppy imports" in npm packages when bundling (#29989)
Fixes a case reported in discord. At runtime node (and us) would fail on
this, but all major bundlers permit this. So as a fix, just allow it
during bundling only.
2025-07-03 12:46:45 -07:00
David Sherret
c1751d7ef4
refactor: extract PreparedModuleLoader from CLI (#29977)
Some checks are pending
ci / build libs (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 / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Extracts out a `PreparedModuleLoader` from the cli's `ModuleLoader`.
This is specific to loading from the `ModuleGraph`.
2025-07-03 14:11:46 -04:00
David Sherret
f2129e4f94
perf: bust emit cache only on deno_ast version change (#29984)
The emit cache is pretty stable nowadays, so we could probably just
cache bust whenever the deno_ast version changes instead of the CLI
version. This will also allow stuff like deno-js-loader to reuse cached
emits.
2025-07-03 12:59:29 -04:00
Nathan Whitaker
9379a74e08
chore: update to edition 2024 (#29923)
Some checks are pending
ci / publish canary (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 / 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 / build libs (push) Blocked by required conditions
2025-07-02 17:59:39 -07:00
David Sherret
efac7cd67a
refactor: extract CJS analysis from CLI crate (#29975)
Moves the `CliCjsCodeAnalyzer` out of the CLI crate and into
deno_resolver.
2025-07-02 15:31:25 -04:00
Nathan Whitaker
0470cb3ada
fix(serve): actually wire up resolving main module with import map for deno serve (#29974)
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 / build libs (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 / publish canary (push) Blocked by required conditions
Closes https://github.com/denoland/deno/issues/29897
2025-07-02 11:29:23 -07:00
David Sherret
7a1e949c47
refactor: extract DenoDir, Emitter, EmitCache and ParsedSourceCache from cli crate (#29961) 2025-07-02 08:56:02 -04:00
denobot
45dfae18ee
2.4.0 (#29959)
Some checks are pending
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 / 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 / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2025-07-01 16:21:05 -04:00
Kingsword
1946d35d6e
feat(cli): alias --unstable-sloppy-imports to --sloppy-imports (#29780) 2025-07-01 18:45:08 +00:00
Nathan Whitaker
44d489c811
feat(process): add detached option to Deno.Command (#29933)
Some checks are pending
ci / build libs (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 / 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 / publish canary (push) Blocked by required conditions
Closes #5501.

Now that we support detached processes on all platforms, we can support
this!

TODO: add a test
2025-07-01 09:20:28 -07:00
David Sherret
3ae11d889a
fix(publish): disallow publishing with bytes or text imports (#29954) 2025-07-01 15:47:54 +00:00
Bartek Iwańczuk
f6176a1674
feat: add support for --preload/--import flag (#29626)
This commit adds initial support for `--preload` (aliased to `--import`)
flag that allows to load and execute multiple ES modules before the
entry point modules is executed.

This command is available in `deno run`, `deno test` and `deno bench`
subcommands.

Closes https://github.com/denoland/deno/issues/29776
2025-07-01 16:21:00 +05:30
Nathan Whitaker
033da85781
chore(bundle): rename --one-file to --inline-imports (#29946)
Some checks are pending
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 / 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 / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-06-30 23:13:32 +00:00
David Sherret
8fcbb0fa43
feat(unstable): support bytes and text imports in deno compile (#29924)
Also includes:

- https://github.com/denoland/deno_graph/pull/593

Closes https://github.com/denoland/deno/issues/29903
Closes https://github.com/denoland/deno/issues/29927
2025-06-28 12:24:07 -04:00
sgasho
b5e41f605d
feat: Add --deny-import flag (#29702)
Closes: #29502

This commit adds a complementary flag to the "--allow-import" flag, that
allows to deny certain hosts.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-06-28 12:59:18 +00:00
Kingsword
64525d289a
feat(fmt): remove UTF-8 BOM instead of maintaining it (#29796)
Some checks are pending
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 / 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 / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2025-06-28 00:50:22 -04:00
Nathan Whitaker
c36a20f6bb
feat(run): resolve main module with workspace resolver (#29928)
Closes https://github.com/denoland/deno/issues/29897.
Closes https://github.com/denoland/deno/issues/14066.
Closes https://github.com/denoland/deno/issues/19955.

With this PR we'll attempt to resolve bare specifiers passed to `run` or
`serve` with the workspace resolver. This means you can run specifiers
that are defined in your import map/package.json.

If the specifier looks like a path (starts with `.`, or is an absolute
path) then we won't try to resolve it via the import map.

This does have the potential to break someone, in the case that you have
something like

```
{
  "imports": { "foo.ts": "./bar.ts" }
}
```

and you have a file named `foo.ts`, previously `deno run foo.ts` would
run `./foo.ts`, now we would run `./bar.ts`. I can't see a way around
that without doing an extra stat to see if the file exists, or deferring
this to module load time (which seems complex). I don't think many
people would hit that, and if someone does there's a simple fix – just
add `./` to the front.

From my benchmarking, this change has no effect on startup time
2025-06-27 19:14:30 -07:00
Nayeem Rahman
8019d9db95
fix(check): don't detect tsconfigs with no deno.json/package.json or --no-config (#29925)
Some checks are pending
ci / build libs (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 / 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 / publish canary (push) Blocked by required conditions
2025-06-27 22:09:55 +00:00
Nathan Whitaker
de02d99a17
feat(bundle): support text and bytes imports in bundle (#29908) 2025-06-26 22:39:58 +00:00
Nayeem Rahman
7a9ab843bd
feat(check): tsconfig "references", "extends", "files", "include" and "exclude" (#29843)
- Each workspace directory is probed for a `tsconfig.json`.
- These and any that are included by their `references` are put into a
list ordered by priority.
  - A tsconfig has lower priority than its `references`.
- An earlier listed entry in `references` has higher priority than a
later one.
- A probed tsconfig in an inner directory has higher priority than an
outer one. Their `references` would be interspersed between them.
- Each tsconfig has a filter based on its `files`, `include` and
`exclude` fields. If it doesn't have `files` or `include`, it will match
any path in its containing directory not exempted by `exclude`.
- For type-checking, each root path will be allocated compiler options
based on the first tsconfig it whose filter it matches from this list.
- Only if it doesn't match any tsconfig, it will fall back to using the
nearest `deno.json`. If it's a workspace member and the root `deno.json`
has `compilerOptions`, these will be merged using the same logic from
`extends`.

Inheritance between configs strictly occurs via `extends` in a
`tsconfig.json`, and between workspace member and root `deno.json`s'
`compilerOptions`. There is no implicit inheritance between
`tsconfig.json` and `deno.json`.

The default compiler options currently applied against tsconfigs are
Deno's normal defaults, with the exception of `lib`. The default value
for `lib` is `["deno.window", "deno.unstable", "dom"]` for files in the
scope of a tsconfig with `lib` unspecified. This behaviour is depended
on by, for example, the template project created by `create-vite ->
svelte`. I expect we'll add more such exceptions over time with other
fields.
2025-06-26 21:17:07 +00:00
Bartek Iwańczuk
9913311860
feat: stabilize --node-conditions flag (#29628)
Stabilizes `--conditions` flag added in
https://github.com/denoland/deno/pull/29586.

Closes https://github.com/denoland/deno/issues/23757
2025-06-26 22:52:04 +02:00
Simon Lecoq
7554b28a04
fix: support Deno.permissions.query({name:"import"}) (#29610)
Closes #27050
2025-06-26 22:13:56 +02:00
David Emanuel Buchmann
3cefece2da
feat: --allow-net supports CIDR ranges (#29704)
This commit adds support for specifying CIDR ranges in
`--allow-net` and `--deny-net` flag:

Eg: trying to run `deno run --allow-net --deny-net=192.168.0.0/16`
and `fetch` from `http://127.0.0.1:4545/` will raise `NotCapable`
error.
2025-06-26 22:13:04 +02:00
Nathan Whitaker
8cefe97b09
fix(bundle): only replace require shim in js files, spruce up output (#29892)
We were trying to do the hack of replacing the esbuild require shim on
every output file, regardless of whether it was js/ts.
This fixes that.

In addition, this spruces up the output of deno bundle a bit.

before:
![Screenshot 2025-06-25 at 6 33
55 PM](https://github.com/user-attachments/assets/9f2a4bfb-7f00-422e-8b45-84141b8447b7)

after:
![Screenshot 2025-06-25 at 6 33
32 PM](https://github.com/user-attachments/assets/567cee6b-8f72-4722-878a-849704ecbe79)
2025-06-26 18:35:19 +00:00
Bartek Iwańczuk
0a4f946fd9
feat: add 'deno update' subcommand (#29187)
Just to save a few characters, because it's an alias to "deno outdated
--update"

Ref https://github.com/denoland/deno/issues/29778
2025-06-26 19:13:29 +02:00
David Sherret
2ed8a1d675
chore: add back node-globals to json schema (#29899) 2025-06-26 17:11:18 +00:00
Nayeem Rahman
99ae41f6bb
feat: stabilize --allow-net subdomain wildcards (#29902)
Closes #29499.
2025-06-26 17:00:43 +00:00
David Sherret
ec32c6e5ba
feat(unstable): bytes and text imports (#29855)
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 / build libs (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 / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-06-26 11:21:16 -04:00
Nayeem Rahman
880ed76b99
fix(lsp): don't show no-export diagnostics for type-only npm imports (#29888) 2025-06-26 15:53:05 +01:00
Bartek Iwańczuk
e8d9d59b83
feat: deprecate --unstable-node-globals flag (#29887)
`--unstable-node-globals` flag is no longer needed after following
PRs had landed:
- https://github.com/denoland/deno/pull/29877
- https://github.com/denoland/deno/pull/29734
- https://github.com/denoland/deno/pull/29416

This commit hides this flag from the `--help=unstable` output,
but still keep the flag to not break previously working invocations.
2025-06-26 12:49:24 +02:00
Bartek Iwańczuk
a8f59c1af9
feat: add DENO_COMPAT env var (#29889)
This commit adds the `DENO_COMPAT` env var, that
when specified enables several features:
- --unstable-bare-node-builtins
- --unstable-detect-cjs
- --unstable-sloppy-imports

With Deno v2.3.x, it is a common situation where these 3 flags have to
specified
to run an existing Node.js project, causing a friction that many users
experience.

The idea is that this env var could be "set and forget" for many people,
that should
provide better DX for running Node.js projects.

It is necessary to note that using this env var _impacts performance_ -
especially startup time.
2025-06-26 12:06:24 +02:00
Bartek Iwańczuk
1192bc0040
feat: rename --unstable-node-conditions to --unstable-conditions (#29885)
The `DENO_NODE_CONDITIONS` env var was renamed to `DENO_CONDITIONS`.

Ref https://github.com/denoland/deno/pull/29628
Ref https://github.com/denoland/deno/issues/23757
2025-06-26 12:05:57 +02:00
Daniel Osvaldo R
9bcd4366ee
fix(ext/node): add lchmod, lchmod promise, lchmodSync to node:fs (#29833)
Some checks are pending
ci / build libs (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 / 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 / publish canary (push) Blocked by required conditions
2025-06-26 15:46:07 +09:00
David Sherret
4a0cd18a6b
fix(install/global): resolve bin name from npm packument (#29884)
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 / build libs (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 / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-06-25 15:10:26 -04:00
Bartek Iwańczuk
f781796402
feat: Deno.execPath() no longer requires --allow-read permission (#29620)
This commit changes `Deno.execPath()` API to no longer require
read permission.

This change is dictated by the fact that in common scenarios, requiring
read permission is less secure than not requiring permissions - if
a user wants to spawn a Deno subprocess using the current executable,
they would do something like:

```
new Deno.Command(Deno.execPath(), { args: ["eval", "1+1"] }).outputSync();
```

To run this program, currently one needs to pass `--allow-read
--allow-run=deno` flags.
It's possible to limit scope of `--allow-read` flag, but it's really
cumbersome to do,
so most users will opt to give a blanket `--allow-read` permission.

Not requiring read permissions allows the above program to be run with
just `--allow-run=deno` flag.

This change is in similar to relaxing of permissions in `Deno.cwd()` API
done in https://github.com/denoland/deno/pull/27192.

Ref
https://github.com/denoland/deno/issues/20061#issuecomment-2942497783
2025-06-25 20:57:35 +02:00
Asher Gomez
002a18cf03
feat(ext/http): support onListen() callback in deno serve (#29449)
Closes #26070

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-06-25 15:20:27 +02:00
Yoshiya Hinosawa
56d7660ee4
feat(cli): add --coverage flag to deno run command (#29329)
closes #16440

This PR adds `--coverage` flag to `deno run` command. When the flag is
specified, it generates the coverage profile in the directory specified
(default is `coverage`). The coverage directory can also be specified
from the env var `DENO_COVERAGE_DIR`.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-06-25 13:34:30 +02:00
Bartek Iwańczuk
bff09506bd
feat(unstable): add DENO_NODE_CONDITIONS env var (#29848)
Some checks are pending
ci / build libs (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 / 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 / publish canary (push) Blocked by required conditions
Follow up to https://github.com/denoland/deno/pull/29586 that
adds a `DENO_NODE_CONDITIONS` env var that allows to
specify conditional exports when the user can't control
CLI flags passed to the command (eg. on Deploy).
2025-06-25 07:16:11 +00:00
Bartek Iwańczuk
695df57358
fix(fmt/css): prefer collapsing font-family values (#29864)
Some checks are pending
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 / 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 / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Closes https://github.com/denoland/deno/issues/29336
2025-06-24 20:28:53 +00:00
Bartek Iwańczuk
4e23d9b5f0
feat(fmt): add support for .xml, .svg and .mustache files (#29851)
Formatting `.mustache` files still requires `--unstable-component`
flag when running `deno fmt`

Closes https://github.com/denoland/deno/issues/20205
2025-06-24 17:16:33 +02:00
Bartek Iwańczuk
14f9d77f3d
feat(otel): stabilize OpenTelemetry support (#29822)
Some checks are pending
ci / build libs (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 / 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 / publish canary (push) Blocked by required conditions
This commit stabilizes support for OpenTelemetry in Deno,
effectively removing the need to use `--unstable-otel` flag
or using `{ "unstable": ["otel"] }` option in the config file.

Supersedes https://github.com/denoland/deno/pull/29500
Closes https://github.com/denoland/deno/issues/29477
2025-06-24 16:49:04 +02:00
Leo Kettmeir
38f6720185
feat: unflag the deploy subcommand (#29863) 2025-06-24 12:23:58 +00:00
Boye Lillejord-Nygård
ef6ff554b0
fix(bench): Make output table markdown compatible (#29532)
This changes the format of the table outputted by `deno bench` to be
markdown compatible.

Related #29533 
Closes #29466
2025-06-24 11:27:42 +02:00
Boye Lillejord-Nygård
5b65313d48
fix(coverage): Make output table markdown compatible (#29533)
This changes the format of the table outputted by `deno coverage` to be
markdown compatible.

Related #29532 
Closes #29465
2025-06-24 11:27:07 +02:00
Bartek Iwańczuk
fd352537ce
feat: add DENO_AUTO_SERVE env var (#29852)
This commits adds `DENO_AUTO_SERVE` env var, that when specified
makes `deno run` behave like `deno serve` if the entrypoint satisfies
the `Deno.ServeDefaultExport` interface.
2025-06-24 11:05:59 +02:00
denobot
0d76cd50af
2.3.7 (#29853)
Some checks are pending
ci / pre-build (push) Waiting to run
ci / build libs (push) Blocked by required conditions
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 / 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 / publish canary (push) Blocked by required conditions
Bumped versions for 2.3.7

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-06-23 23:51:36 +02:00