0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-04 18:12:59 -05:00
deno/tests/integration
Nathan Whitaker 08f5e797b6
fix(check/lsp): fall back to @types/* packages if npm package doesn't have types (#28185)
Fixes https://github.com/denoland/deno/issues/27569.
Fixes https://github.com/denoland/deno/issues/27215.

This PR makes it so type resolution falls back to looking for definitely
typed packages (`@types/foo`) if a given NPM package does not contain
type declarations.

One complication is choosing _which_ version of the `@types/*` package
to use, if the project depends on multiple versions. The heuristic here
is to try to match the major and minor versions, falling back to the
latest version. So if you have
```
@types/foo: 0.1.0, 0.2.0, 3.1.0, 3.1.2, 4.0.0
foo: 3.1.0
```
we would choose `@types/foo@3.1.2` when resolving types for `foo`.

---

Note that this only uses `@types/` packages if you _already_ depend on
them. So a follow up to this PR could be to add a diagnostic and
quickfix to install `@types/foo` if we don't find types for `foo`.
2025-02-19 23:55:06 +00:00
..
bench_tests.rs chore: move bench test to spec test (#27970) 2025-02-05 10:49:10 -05:00
cache_tests.rs feat: TypeScript 5.7 (#27857) 2025-01-31 16:07:42 -05:00
check_tests.rs fix(check): compiler options from workspace members (#27785) 2025-01-28 10:49:58 -05:00
compile_tests.rs fix(check): compiler options from workspace members (#27785) 2025-01-28 10:49:58 -05:00
coverage_tests.rs refactor: move denort to separate crate (#27688) 2025-01-17 20:39:29 +00:00
eval_tests.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
flags_tests.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
fmt_tests.rs refactor: move denort to separate crate (#27688) 2025-01-17 20:39:29 +00:00
init_tests.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
inspector_tests.rs refactor: move denort to separate crate (#27688) 2025-01-17 20:39:29 +00:00
install_tests.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
js_unit_tests.rs feat(lint): add JavaScript plugin support (#27203) 2025-02-05 16:59:24 +01:00
jsr_tests.rs fix(check): compiler options from workspace members (#27785) 2025-01-28 10:49:58 -05:00
jupyter_tests.rs refactor: move denort to separate crate (#27688) 2025-01-17 20:39:29 +00:00
lsp_tests.rs fix(check/lsp): fall back to @types/* packages if npm package doesn't have types (#28185) 2025-02-19 23:55:06 +00:00
mod.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
node_unit_tests.rs feat(ext/node): implement node:sqlite (#27308) 2025-01-28 19:30:03 +05:30
npm_tests.rs chore: update ensure_registry_files_local to handle scoped packages (#27801) 2025-01-24 21:47:15 +09:00
pm_tests.rs refactor: move denort to separate crate (#27688) 2025-01-17 20:39:29 +00:00
publish_tests.rs refactor: move denort to separate crate (#27688) 2025-01-17 20:39:29 +00:00
repl_tests.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
run_tests.rs chore: fix some broken pty tests on windows (#27899) 2025-01-31 12:08:29 -05:00
serve_tests.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
shared_library_tests.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
task_tests.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
test_tests.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
upgrade_tests.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
watcher_tests.rs fix(check): compiler options from workspace members (#27785) 2025-01-28 10:49:58 -05:00