0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-11 06:37:12 -04:00
deno/tests/registry/npm/@denotest
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
..
add fix(cli): Create child node_modules for conflicting dependency versions, respect aliases in package.json (#24609) 2024-07-16 20:30:28 +00:00
augments-global/1.0.0 fix(check/lsp): fix bugs with tsc type resolution, allow npm packages to augment ImportMeta (#27690) 2025-01-16 19:20:04 +00:00
better-say-hello/1.0.0 feat(npm): support --allow-scripts on deno run (and deno add, deno test, etc) (#26075) 2024-10-12 12:14:32 -07:00
bin fix(installl): make bin entries executable even if not put in node_modules/.bin (#25873) 2024-09-26 09:36:25 -07:00
bin-created-by-lifecycle/1.0.0 fix(install): re-setup bin entries after running lifecycle scripts (#26752) 2024-11-12 09:23:39 -08:00
binary-package/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
binary-package-linux/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
binary-package-mac/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
binary-package-windows/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
breaking-change-between-versions chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
builtin-module-module/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
CAPITALS/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
check-error/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
check-worker-globals/1.0.0 fix(ext/node): fix prismjs compatibiliy in Web Worker (#25062) 2024-08-17 11:16:43 +09:00
child-process-fork/1.0.0 fix(node): Pass NPM_PROCESS_STATE to subprocesses via temp file instead of env var (#25896) 2024-09-27 12:35:37 -07:00
cjs-default-export/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
cjs-import-dual/1.0.0 fix(check): CJS types importing dual ESM/CJS package should prefer CJS types (#24492) 2024-07-10 14:46:25 -04:00
cjs-internal-types-default-export/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
cjs-invalid-name-exports/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
cjs-local-global-decls/1.0.0 refactor: don't virtualize the console global for node mode (#25263) 2024-08-28 21:13:34 +02:00
cjs-module-export-assignment/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
cjs-module-export-assignment-number/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
cjs-multiple-exports/1.0.0 fix(ext/node): resolve exports even if parent module filename isn't present (#26553) 2024-10-31 10:02:31 -07:00
cjs-pkg-imports/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
cjs-reexport-collision/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
cjs-reexport-relative-parent/1.0.0 fix(compile/windows): handle cjs re-export of relative path with parent component (#24795) 2024-07-30 16:46:15 -04:00
cjs-reexport-same-specifier-in-sub-folder/1.0.0 fix(node): better cjs re-export handling (#23760) 2024-05-10 09:55:20 -04:00
cjs-require-esm/1.0.0 feat: require(esm) (#25501) 2024-09-10 20:12:36 +00:00
cjs-this-in-exports/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
cjs-with-file-stem/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
cli-with-permissions/1.0.0 feat: Deno.cwd() no longer requires --allow-read permission (#27192) 2025-01-27 15:13:59 +01:00
conditional-exports/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
conditional-exports-node/1.0.0 fix(node): Include "node" condition during CJS re-export analysis (#25785) 2024-09-21 16:10:38 -07:00
conditional-exports-strict/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
create-require/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
css-export/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
d-ext/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
dep-cannot-parse/1.0.0 fix(npm): resolve dynamic npm imports individually (#24170) 2024-06-11 08:55:12 -04:00
deprecated-package/1.0.0 feat: Print deprecation message for npm packages (#24992) 2024-08-20 19:53:53 +02:00
different-nested-dep/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
different-nested-dep-child chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
dual-cjs-esm/1.0.0 fix(check): CJS types importing dual ESM/CJS package should prefer CJS types (#24492) 2024-07-10 14:46:25 -04:00
dual-cjs-esm-dep/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
dual-cjs-esm-dep-missing/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
dynamic-import/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
env-var-re-export/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
esm-basic/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
esm-import-cjs-default/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
exec-file/1.0.0 fix(ext/node): improve shelljs compat with managed npm execution (#24912) 2024-08-16 12:48:48 +09:00
file-dts-dmts-dcts/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
globals/1.0.0 feat(cli): give access to process global everywhere (#25291) 2024-09-04 11:04:06 +02:00
has-patch-versions feat: subcommand to view and update outdated dependencies (#26942) 2024-11-20 15:22:15 -08:00
has-pre-release fix(outdated): ensure "Latest" version is greater than "Update" version (#27390) 2024-12-17 23:56:03 +00:00
imports-package-json/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
index-export-no-types/1.0.0 fix(check/lsp): fall back to @types/* packages if npm package doesn't have types (#28185) 2025-02-19 23:55:06 +00:00
install-launch-cjs-temp-dir/1.0.0 feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
install-no-ext/1.0.0 feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
lifecycle-scripts-cjs/1.0.0 fix(node): Fix --allow-scripts with no deno.json (#24533) 2024-07-15 12:11:09 -07:00
lossy-utf8-module/1.0.0 fix(ext/node): lossy UTF-8 read node_modules files (#24140) 2024-06-08 18:36:13 +02:00
lossy-utf8-package-json/1.0.0 fix(ext/node): lossy UTF-8 read node_modules files (#24140) 2024-06-08 18:36:13 +02:00
lossy-utf8-script/1.0.0 fix(ext/node): lossy UTF-8 read node_modules files (#24140) 2024-06-08 18:36:13 +02:00
MixedCase/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
mjs-reexport-cjs/1.0.0 fix(node): Include "node" condition during CJS re-export analysis (#25785) 2024-09-21 16:10:38 -07:00
monaco-editor/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
no-types-cjs/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
no-types-in-conditional-exports/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
node-addon/1.0.0 chore: serve node headers from a test server to fix flaky node-gyp test (#26749) 2024-11-06 19:52:46 -08:00
node-addon-implicit-node-gyp/1.0.0 feat(node): Support executing npm package lifecycle scripts (preinstall/install/postinstall) (#24487) 2024-07-10 03:06:08 +00:00
node-lifecycle-scripts/1.0.0 feat(npm): support --allow-scripts on deno run (and deno add, deno test, etc) (#26075) 2024-10-12 12:14:32 -07:00
non-existent-dep/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
non-existent-dep-version/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
non-existent-optional-peer/1.0.0 fix: Update deno_npm to fix deno install with crossws (#25837) 2024-09-24 02:12:48 +00:00
peer-dep-test-child chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
peer-dep-test-grandchild/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
peer-dep-test-peer chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
permissions-outside-package/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
print-npm-user-agent/1.0.0 fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639) 2024-10-31 22:19:19 -07:00
require-added-nm-folder/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
require-resolve/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
reserved-word-exports/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
say-hello/1.0.0 feat(npm): support --allow-scripts on deno run (and deno add, deno test, etc) (#26075) 2024-10-12 12:14:32 -07:00
say-hello-on-install/1.0.0 feat(node): Support executing npm package lifecycle scripts (preinstall/install/postinstall) (#24487) 2024-07-10 03:06:08 +00:00
special-chars-in-bin-name/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
specifier-two-slashes/1.0.0 fix(node): handle resolving ".//<something>" in npm packages (#26920) 2024-11-19 09:57:12 -05:00
sub-folders/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
subtract/1.0.0 feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979) 2024-05-28 14:58:43 -04:00
tarballs-privateserver2/1.0.0 fix(npm): use configured auth for tarball urls instead of scope auth (#24111) 2024-06-05 21:24:52 +00:00
transitive-bin/1.0.0 fix(cli): Prefer npm bin entries provided by packages closer to the root (#24024) 2024-05-29 17:45:22 -07:00
type-commonjs/1.0.0 fix: improved support for cjs and cts modules (#26558) 2024-11-01 12:27:00 -04:00
types/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
types-ambient/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
types-entry-value-not-exists/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
types-exports-import-types/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
types-exports-subpaths/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
types-nested-js-dts/1.0.0 fix(cli): use CliNodeResolver::resolve() for managed node_modules (#23902) 2024-05-21 17:54:15 +01:00
types-no-types-entry/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
types-pkg-json-import/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
types_imported/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
typescript-file/1.0.0 chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
unstable/1.0.0-beta.1 fix(add/install): default to "latest" tag for npm packages in deno add npm:pkg (#25858) 2024-09-25 01:10:01 +00:00