deno/cli
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
..
args feat(run): resolve main module with workspace resolver (#29928) 2025-06-27 19:14:30 -07:00
bench refactor(lsp): separate document and module storage (#28469) 2025-03-31 22:25:27 +01:00
cache feat(unstable): bytes and text imports (#29855) 2025-06-26 11:21:16 -04:00
js feat(unstable): support comments in lint plugin (#29189) 2025-05-08 21:59:36 +02:00
lib feat: stabilize --allow-net subdomain wildcards (#29902) 2025-06-26 17:00:43 +00:00
lsp feat(unstable): bytes and text imports (#29855) 2025-06-26 11:21:16 -04:00
ops chore: Rust 1.86.0 (#29435) 2025-05-25 23:40:48 +02:00
rt feat: stabilize --allow-net subdomain wildcards (#29902) 2025-06-26 17:00:43 +00:00
schemas chore: add back node-globals to json schema (#29899) 2025-06-26 17:11:18 +00:00
snapshot 2.3.7 (#29853) 2025-06-23 23:51:36 +02:00
standalone feat: stabilize --allow-net subdomain wildcards (#29902) 2025-06-26 17:00:43 +00:00
tools feat(run): resolve main module with workspace resolver (#29928) 2025-06-27 19:14:30 -07:00
tsc fix: support Deno.permissions.query({name:"import"}) (#29610) 2025-06-26 22:13:56 +02:00
util feat(bundle): add watch mode to bundle (#29795) 2025-06-18 08:35:12 -07:00
build.rs fix(dts): add Atomics.pause, Promise.try and RegExp.escape (#29186) 2025-05-08 23:16:35 +02:00
Cargo.toml 2.3.7 (#29853) 2025-06-23 23:51:36 +02:00
cdp.rs fix(cli/hmr): print compile error with exception details (#27597) 2025-05-08 23:39:31 +00:00
clippy.toml refactor: do not use deno_fs::FileSystem everywhere (#27508) 2024-12-31 11:29:07 -05:00
deno.ico
emit.rs feat(check): tsconfig "references", "extends", "files", "include" and "exclude" (#29843) 2025-06-26 21:17:07 +00:00
entitlements.plist chore: start codesigning mac release builds (#21303) 2023-11-23 15:30:26 -07:00
factory.rs feat(check): tsconfig "references", "extends", "files", "include" and "exclude" (#29843) 2025-06-26 21:17:07 +00:00
file_fetcher.rs chore: use aws_lc_rs (#28244) 2025-06-19 01:07:00 -07:00
graph_container.rs fix: load changed non-remote dynamic imports at runtime (#29413) 2025-05-26 21:38:51 +00:00
graph_util.rs feat(check): tsconfig "references", "extends", "files", "include" and "exclude" (#29843) 2025-06-26 21:17:07 +00:00
http_util.rs fix(npm): respect etag for npm packument caching (#29130) 2025-05-02 09:49:05 -04:00
integration_tests_runner.rs refactor: move denort to separate crate (#27688) 2025-01-17 20:39:29 +00:00
jsr.rs fix(vendor): store remote version metadata checksum in vendor folder to ensure lockfile uses that (#29433) 2025-05-29 23:46:15 -04:00
main.rs feat(unstable): bytes and text imports (#29855) 2025-06-26 11:21:16 -04:00
module_loader.rs feat(unstable): bytes and text imports (#29855) 2025-06-26 11:21:16 -04:00
node.rs refactor: upgrade to deno_graph 0.95 (#29575) 2025-06-03 17:52:23 +00:00
npm.rs fix(install/global): resolve bin name from npm packument (#29884) 2025-06-25 15:10:26 -04:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
registry.rs feat(unstable): deploy subcommand (#29407) 2025-05-30 16:28:49 +00:00
resolver.rs refactor: add NpmInstallerFactory and push more functionality down into deno_npm_installer (#29342) 2025-05-17 15:10:06 -04:00
task_runner.rs feat: deprecate --unstable-node-globals flag (#29887) 2025-06-26 12:49:24 +02:00
type_checker.rs feat(check): tsconfig "references", "extends", "files", "include" and "exclude" (#29843) 2025-06-26 21:17:07 +00:00
worker.rs feat: stabilize --allow-net subdomain wildcards (#29902) 2025-06-26 17:00:43 +00:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.