David Sherret
aad62f6422
refactor: make it easier to get closest package.json files ( #30420 )
2025-08-15 15:48:03 -04:00
David Sherret
4ade335fc8
fix: support cjs, cts, mjs, and mts for the --ext
flag ( #30398 )
2025-08-14 12:02:49 -04:00
林炳权
68297b5f10
chore: Rust 1.89.0 ( #30364 )
...
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
Related PR: https://github.com/denoland/deno/pull/30354
2025-08-09 11:11:48 +00:00
David Sherret
a17c53cfe4
fix: reduce progress bar flickering ( #30349 )
...
Also goes back to showing a single line instead of 3 lines.
2025-08-07 17:13:29 +02:00
David Sherret
32baa286b7
refactor: update to deno_path_util 0.5.2 ( #30211 )
2025-07-27 08:44:29 -04:00
David Sherret
990dbc6e4e
Revert "fix(unstable): always require --allow-read permissions for raw imports ( #30184 )" ( #30196 )
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-07-24 22:38:04 +00:00
David Sherret
147bbcf8dd
fix(unstable): always require --allow-read permissions for raw imports ( #30184 )
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-07-24 08:26:36 -04:00
David Sherret
7b154300b8
refactor: upgrade to deno_core 0.353.0 ( #30164 )
2025-07-22 10:38:38 -04:00
David Sherret
874cb8e1ae
refactor(bundle): remove usage of cli module loader ( #30086 )
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 / 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 / publish canary (push) Blocked by required conditions
2025-07-15 14:06:42 +00:00
David Sherret
489d9bbdcf
refactor(loader): extract out more module loading code from cli crate ( #30084 )
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 libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-07-14 11:27:51 -04:00
David Sherret
cf441584a4
fix(unstable): support importing files in npm packages as bytes and text ( #30065 )
2025-07-10 15:06:33 -04:00
David Sherret
2617b4ec6b
refactor(permissions): push down special file checking to permissions container ( #30005 )
2025-07-09 20:50:26 +00:00
David Sherret
90058d6732
refactor(emitter): ability to not transpile and specify a source map base ( #29996 )
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
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
David Sherret
c1751d7ef4
refactor: extract PreparedModuleLoader from CLI ( #29977 )
...
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
Nathan Whitaker
9379a74e08
chore: update to edition 2024 ( #29923 )
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
7a1e949c47
refactor: extract DenoDir
, Emitter
, EmitCache
and ParsedSourceCache
from cli crate ( #29961 )
2025-07-02 08:56:02 -04:00
David Sherret
ec32c6e5ba
feat(unstable): bytes and text imports ( #29855 )
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
David Sherret
0f08eb076b
fix(jsr): allow using import.meta.resolve
to resolve non-jsr remote urls ( #29831 )
...
ci / pre-build (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 / 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 / build libs (push) Has been cancelled
ci / publish canary (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
This was too restrictive.
Closes https://github.com/denoland/deno/issues/25579
2025-06-20 22:05:38 +00:00
Nathan Whitaker
b383433708
fix(install): ignore unknown JSR export errors on top level install ( #29807 )
...
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
Couldn't write a test, but it happens in some edge cases.
2025-06-18 18:37:14 +00:00
Nathan Whitaker
bf6292b170
fix(bundle): improve error handling and reporting ( #29744 )
...
We were effectively ignoring our diagnostics, and instead falling back
to esbuild (and then displaying the esbuild diagnostics). That was
mostly for simplicity and so we would fall back to esbuild handling
unsupported things (for instance css imports).
This does a small refactor on the module loader to give us an API that
doesn't have to adhere to the deno_core ModuleLoader API. That lets us
return and handle errors more concretely, instead of having indirection
and downcasting.
Now, we only ignore our errors about being unable to load unsupport file
types, and the rest we handle ourselves.
I've also aligned the formatting of esbuild errors with ours, so it
should be more uniform. A few examples (dbgdeno is just an alias for the
debug build of this PR):

2025-06-16 14:11:14 -07:00
David Sherret
c064b6d594
fix: import.meta.resolve
- do not error for non-existent files in npm packages ( #29741 )
...
ci / test debug 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 / publish canary (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 release windows-x86_64 (push) Blocked by required conditions
This further improves `import.meta.resolve` to not error in many more
scenarios (better alignment with Node).
1. Non-existent files in npm packages
1. Non-existent built-in node modules (ex. `node:non-existent`)
1. Many things that were previously errors with byonm.
1. No longer surfaces some deno_graph resolution errors
Additionally, this defers resolving npm specifiers until loading for
dynamic imports in order to have `prepare_load` properly install them
loading. Before it could potentially error when loading the same npm
specifier on multiple workers (reason for flaky
`specs::npm::worker_shutdown_during_npm_import`).
2025-06-16 12:03:12 +02:00
David Sherret
3d5ff3cf1c
fix(npm): support resolving npm specifiers not in graph with import.meta.resolve
for resolved packages ( #29732 )
2025-06-13 09:23:19 -04:00
David Sherret
b42d5906cd
refactor: upgrade to deno_graph 0.95 ( #29575 )
2025-06-03 17:52:23 +00:00
David Sherret
4d47fcac55
refactor: extract out resolving with graph to deno_resolver ( #29549 )
2025-06-02 10:05:13 -04:00
David Sherret
75762194ff
refactor: move CliFileFetcher
and DenoGraphLoader
into deno_resolver::file_fetcher
( #29473 )
2025-05-30 10:10:33 -04:00
David Sherret
e7bb7cca24
fix: load changed non-remote dynamic imports at runtime ( #29413 )
2025-05-26 21:38:51 +00:00
林炳权
cb738ee5da
chore: Rust 1.86.0 ( #29435 )
...
Since `rust 1.87.0` reported `undefined symbol:
ring::pbkdf2::PBKDF2_HMAC_SHA1::*` in CI and it was difficult to debug
locally, use `rust 1.86.0` in CI tests for troubleshoot the errors
2025-05-25 23:40:48 +02:00
David Sherret
0d6fac61f0
fix(node): do not look up node_module paths when using global resolver ( #29398 )
...
It doesn't make sense for the global resolver to search for npm packages
because the structure of the folder there doesn't do node_resolution.
2025-05-21 13:52:23 -04:00
David Sherret
c4412ffb13
refactor: add deno_npm_installer
crate ( #29319 )
...
More changes/improvements will following in follow-up PRs.
2025-05-16 18:11:05 -04: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
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
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
David Sherret
ed2fac89eb
refactor: handle deno_media_type having Html
and Sql
variants ( #28495 )
2025-03-15 00:19:08 +09: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
761a9b62ce
refactor(cli): extract TypeChecker to separate module ( #28235 )
...
Extracts it out of tools/check.rs to type_checker.rs which makes more
sense because this is used across sub commands.
2025-02-21 21:00:29 +00:00
Nathan Whitaker
d20c6b5b7d
fix(install): don't error on unknown media types in install ( #28234 )
...
Fixes https://github.com/denoland/deno/issues/28223
This is kind of an ugly fix, but it works, and I think is the easiest
way to handle the fact that when caching the module graph we might
encounter imports that won't actually error at runtime (for instance in
files that will be bundled).
2025-02-21 12:20:55 -08:00
David Sherret
4648fc4570
fix(check): compiler options from workspace members ( #27785 )
...
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2025-01-28 10:49:58 -05:00
David Sherret
679902a108
perf(node_resolver): reduce url to/from path conversions ( #27839 )
...
Extracted out of https://github.com/denoland/deno/pull/27838/files
Reduces some allocations by accepting either a pathbuf or url for the
referrer for resolution and returning either a pathbuf or url at the
end, which the caller can then convert into to their preferred state.
This is about 4% faster when still converting the final result to a url
and 6% faster when keeping the result as a path in a benchmark I ran.
2025-01-27 15:23:20 -05:00
Divy Srivastava
8ccc05e503
fix(core): handle dyn imports exceeding call stack size ( #27825 )
...
Fixes https://github.com/denoland/deno/issues/27736
2025-01-27 09:10:12 +05:30
David Sherret
769f748dd9
fix(node): align type stripping in node_modules error message with Node ( #27809 )
2025-01-24 13:05:04 -05:00
David Sherret
273ec9fbf2
refactor: add WorkspaceFactory
and ResolverFactory
( #27766 )
...
Allows easily constructing a `DenoResolver` using the exact same logic
that we use in the CLI (useful for dnt and for external bundlers). This
code is then used in the CLI to ensure the logic is always up-to-date.
```rs
use std::rc::Rc;
use deno_resolver:🏭 :ResolverFactory;
use deno_resolver:🏭 :WorkspaceFactory;
use sys_traits::impls::RealSys;
let sys = RealSys;
let cwd = sys.env_current_dir()?;
let workspace_factory = Rc::new(WorkspaceFactory::new(sys, cwd, Default::default()));
let resolver_factory = ResolverFactory::new(workspace_factory.clone(), Default::default());
let deno_resolver = resolver_factory.deno_resolver().await?;
```
2025-01-23 18:52:55 -05:00
David Sherret
57dd66ec3d
refactor: move denort to separate crate ( #27688 )
...
This slightly degrades the performance of CJS export analysis on
subsequent runs because I changed it to no longer cache in the DENO_DIR
with this PR (denort now properly has no idea about the DENO_DIR). We'll
have to change it to embed this data in the binary and that will also
allow us to get rid of swc in denort (will do that in a follow-up PR).
2025-01-17 20:39:29 +00:00
Leo Kettmeir
054075730c
refactor: update deno_core and use more concrete errors ( #27620 )
...
waiting for https://github.com/denoland/deno_core/pull/1043
Fixes #27672
2025-01-17 09:41:52 -08:00
David Sherret
05dc69932d
refactor: create deno_lib crate ( #27673 )
...
Shifts just some code down for now. I'll do the rest of the refactor in
the next pr, but didn't want to drop a huge refactor.
2025-01-15 09:35:46 -05:00
David Sherret
0b033140c0
refactor: move CliNpmResolver
to deno_resolver::npm::NpmResolver
( #27659 )
...
As title. After this PR all npm resolution will be out of the CLI crate.
2025-01-14 10:01:05 -05:00
Leo Kettmeir
ea30e188a8
refactor: update deno_core for error refactor ( #26867 )
...
Closes #26171
---------
Co-authored-by: David Sherret <dsherret@gmail.com>
2025-01-08 14:52:32 -08:00
David Sherret
89c92b84fa
fix(check): move module not found errors to typescript diagnostics ( #27533 )
...
Instead of hard erroring, we now surface module not found errors as
TypeScript diagnostics (we have yet to show the source code of the
error, but something we can improve over time).
2025-01-03 21:49:56 +00:00
David Sherret
9215aa60a6
refactor(node/npm): separate out permission check from npm resolvers ( #27511 )
...
Decouples permissions from the npm resolvers (towards moving the
resolvers out of the cli crate)
2025-01-02 10:05:52 -05:00
Kenta Moriuchi
8fb073d7b4
chore: Happy New Year 2025 ( #27509 )
2024-12-31 19:12:39 +00:00