1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 09:10:40 -05:00
denoland-deno/cli
David Sherret 890780a9e9
feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464)
Adds an `--unstable-sloppy-imports` flag which supports the
following for `file:` specifiers:

* Allows writing `./mod` in a specifier to do extension probing.
- ex. `import { Example } from "./example"` instead of `import { Example
} from "./example.ts"`
* Allows writing `./routes` to do directory extension probing for files
like `./routes/index.ts`
* Allows writing `./mod.js` for *mod.ts* files.

This functionality is **NOT RECOMMENDED** for general use with Deno:

1. It's not as optimal for perf:
https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-2/
1. It makes tooling in the ecosystem more complex in order to have to
understand this.
1. The "Deno way" is to be explicit about what you're doing. It's better
in the long run.
1. It doesn't work if published to the Deno registry because doing stuff
like extension probing with remote specifiers would be incredibly slow.

This is instead only recommended to help with migrating existing
projects to Deno. For example, it's very useful for getting CJS projects
written with import/export declaration working in Deno without modifying
module specifiers and for supporting TS ESM projects written with
`./mod.js` specifiers.

This feature will output warnings to guide the user towards correcting
their specifiers. Additionally, quick fixes are provided in the LSP to
update these specifiers:
2023-12-07 00:03:18 +00:00
..
args feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464) 2023-12-07 00:03:18 +00:00
bench chore: update std to 0.208.0 (#21318) 2023-12-02 03:20:06 +01:00
cache feat(unstable): tar up directory with deno.json (#21228) 2023-11-23 23:38:07 +00:00
js refactor: snapshotting of runtime/ and cli/ (#21430) 2023-12-02 23:40:27 +00:00
lsp feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464) 2023-12-07 00:03:18 +00:00
napi chore: forward v1.38.5 release commit to main (#21472) 2023-12-06 00:53:16 +00:00
npm fix(npm): do not create symlink for non-system optional dep in node_modules directory (#21478) 2023-12-06 14:24:00 -05:00
ops refactor: snapshotting of runtime/ and cli/ (#21430) 2023-12-02 23:40:27 +00:00
schemas feat: precompile JSX (#20962) 2023-11-01 20:30:23 +00:00
standalone fix(compile/npm): ignore symlinks to non-existent paths in node_modules directory (#21479) 2023-12-06 16:25:24 -05:00
tests feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464) 2023-12-07 00:03:18 +00:00
tools feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464) 2023-12-07 00:03:18 +00:00
tsc feat: TypeScript 5.3 (#21480) 2023-12-06 18:49:34 -05:00
util feat(compile): support discovering modules for more dynamic arguments (#21381) 2023-12-01 20:12:10 +00:00
auth_tokens.rs chore: update base64 crate (#20877) 2023-10-26 18:39:04 +02:00
build.rs feat: TypeScript 5.3 (#21480) 2023-12-06 18:49:34 -05:00
Cargo.toml feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464) 2023-12-07 00:03:18 +00:00
cdp.rs refactor: unify CDP types in a single module (#21094) 2023-11-05 22:58:59 +00:00
deno.ico
deno_std.rs chore: forward v1.38.3 release commit to main (#21320) 2023-11-24 07:09:15 +01:00
emit.rs feat: deno run --unstable-hmr (#20876) 2023-10-31 01:25:58 +01:00
entitlements.plist chore: start codesigning mac release builds (#21303) 2023-11-23 15:30:26 -07:00
errors.rs fix: improve deno doc --lint error messages (#21156) 2023-11-10 18:40:39 +00:00
factory.rs feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464) 2023-12-07 00:03:18 +00:00
file_fetcher.rs chore: fix and deflake cert store fetch tests (#21241) 2023-11-17 19:16:11 +00:00
graph_util.rs feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464) 2023-12-07 00:03:18 +00:00
http_util.rs feat(unstable): tar up directory with deno.json (#21228) 2023-11-23 23:38:07 +00:00
js.rs build: allow disabling snapshots for dev (#20048) 2023-08-06 01:47:15 +02:00
main.rs fix: display unstable flags at bottom of help text (#21468) 2023-12-06 09:22:30 -05:00
module_loader.rs feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464) 2023-12-07 00:03:18 +00:00
node.rs chore: rename some helpers on the Fs trait (#20097) 2023-08-08 16:28:18 -04:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464) 2023-12-07 00:03:18 +00:00
version.rs refactor: make version and user_agent &'static str (#18400) 2023-03-23 23:27:58 +01:00
worker.rs refactor: snapshotting of runtime/ and cli/ (#21430) 2023-12-02 23:40:27 +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.