mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
![]() 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 |
||
---|---|---|
.. | ||
bench | ||
bundle | ||
coverage | ||
doc | ||
init | ||
installer | ||
jupyter | ||
lint | ||
pm | ||
publish | ||
repl | ||
run | ||
test | ||
check.rs | ||
clean.rs | ||
compile.rs | ||
deploy.rs | ||
doc.rs | ||
fmt.rs | ||
info.rs | ||
mod.rs | ||
serve.rs | ||
task.rs | ||
upgrade.rs |