1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 17:49:08 -05:00
denoland-deno/cli/tests/integration
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
..
bench_tests.rs test(bench): mark explicit timer test as flaky (#20304) 2023-08-27 22:22:23 +02:00
bundle_tests.rs feat(cli): --ext parameter for run, compile, and bundle (#17172) 2023-03-22 10:15:53 -04:00
cache_tests.rs chore: switch compile tests over to the TestBuilder (#21180) 2023-11-14 16:58:06 +00:00
cert_tests.rs chore: combine TestCommandBuilder with DenoCmd (#21248) 2023-11-17 22:46:15 -05:00
check_tests.rs feat: granular --unstable-* flags (#20968) 2023-11-01 23:15:08 +01:00
compile_tests.rs chore: bump deno_core and update tests (#21467) 2023-12-06 17:02:52 -07:00
coverage_tests.rs fix: exclude internal JS files from coverage (#20448) 2023-09-11 13:53:42 +00:00
doc_tests.rs feat(compile): support discovering modules for more dynamic arguments (#21381) 2023-12-01 20:12:10 +00:00
eval_tests.rs chore: various improvements to tests (#21222) 2023-11-17 10:05:42 -05:00
flags_tests.rs build(cli): allow to build without upgrade feature (#19910) 2023-11-29 18:52:25 +00:00
fmt_tests.rs feat(fmt): support formatting code blocks in Jupyter notebooks (#21310) 2023-11-27 10:32:12 -05:00
info_tests.rs feat(compile): support discovering modules for more dynamic arguments (#21381) 2023-12-01 20:12:10 +00:00
init_tests.rs fix(init): skip existing files instead of erroring (#20434) 2023-09-12 12:55:26 +02:00
inspector_tests.rs chore: various improvements to tests (#21222) 2023-11-17 10:05:42 -05:00
install_tests.rs chore: combine TestCommandBuilder with DenoCmd (#21248) 2023-11-17 22:46:15 -05:00
js_unit_tests.rs feat(ext/web): add ImageData Web API (#21183) 2023-12-06 14:20:28 +01:00
jsr_tests.rs fix: improve deno doc --lint error messages (#21156) 2023-11-10 18:40:39 +00:00
lint_tests.rs chore: update to Rust 1.72 (#20258) 2023-08-26 22:04:12 -06:00
lsp_tests.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
mod.rs feat(unstable): package manager (#20517) 2023-09-18 10:46:44 -04:00
node_compat_tests.rs chore(cli): use NPM_CONFIG_REGISTRY for all tests (#20320) 2023-08-29 13:02:54 -06:00
node_unit_tests.rs chore: various improvements to tests (#21222) 2023-11-17 10:05:42 -05:00
npm_tests.rs fix(npm): do not create symlink for non-system optional dep in node_modules directory (#21478) 2023-12-06 14:24:00 -05:00
repl_tests.rs chore: bump deno_core and update tests (#21467) 2023-12-06 17:02:52 -07:00
run_tests.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
shared_library_tests.rs Revert "chore: use kqueue backend of notify on macOS" (#21039) 2023-11-01 15:54:27 +00:00
task_tests.rs fix(task): handle node_modules/.bin directory with byonm (#21386) 2023-12-06 16:36:06 -05:00
test_tests.rs fix(test): --junit-path should handle when the dir doesn't exist (#21044) 2023-11-01 19:59:51 +00:00
upgrade_tests.rs ci: make upgrade_lsp_repl_sleeps less flaky (#21363) 2023-11-27 23:12:17 +00:00
vendor_tests.rs chore: various improvements to tests (#21222) 2023-11-17 10:05:42 -05:00
watcher_tests.rs chore: bump deno_core and update tests (#21467) 2023-12-06 17:02:52 -07:00
worker_tests.rs fix: regression in workers using dynamic imports (#20006) 2023-08-02 01:19:44 +00:00