mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 00:29:09 -05:00
fix(install): cache type only module deps in deno install
(#26497)
Fixes https://github.com/denoland/deno/issues/26180.
This commit is contained in:
parent
92ed4d38db
commit
69e1d7a4ed
9 changed files with 40 additions and 0 deletions
|
@ -963,6 +963,9 @@ impl CliOptions {
|
|||
match self.sub_command() {
|
||||
DenoSubcommand::Cache(_) => GraphKind::All,
|
||||
DenoSubcommand::Check(_) => GraphKind::TypesOnly,
|
||||
DenoSubcommand::Install(InstallFlags {
|
||||
kind: InstallKind::Local(_),
|
||||
}) => GraphKind::All,
|
||||
_ => self.type_check_mode().as_graph_kind(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
export interface Foo {
|
||||
bar: string;
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
import type { Foo } from "./foo.ts";
|
||||
|
||||
export const foo: Foo = { bar: "foo" };
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"exports": {
|
||||
".": "./mod.ts"
|
||||
}
|
||||
}
|
5
tests/registry/jsr/@denotest/type-only-import/meta.json
Normal file
5
tests/registry/jsr/@denotest/type-only-import/meta.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"versions": {
|
||||
"1.0.0": {}
|
||||
}
|
||||
}
|
10
tests/specs/install/type_only_import/__test__.jsonc
Normal file
10
tests/specs/install/type_only_import/__test__.jsonc
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"tempDir": true,
|
||||
"steps": [
|
||||
{ "args": "install -e main.ts", "output": "install.out" },
|
||||
{
|
||||
"args": "run --check --cached-only main.ts",
|
||||
"output": "run.out"
|
||||
}
|
||||
]
|
||||
}
|
6
tests/specs/install/type_only_import/install.out
Normal file
6
tests/specs/install/type_only_import/install.out
Normal file
|
@ -0,0 +1,6 @@
|
|||
Download http://127.0.0.1:4250/@denotest/type-only-import/meta.json
|
||||
Download http://127.0.0.1:4250/@denotest/type-only-import/1.0.0_meta.json
|
||||
[UNORDERED_START]
|
||||
Download http://127.0.0.1:4250/@denotest/type-only-import/1.0.0/mod.ts
|
||||
Download http://127.0.0.1:4250/@denotest/type-only-import/1.0.0/foo.ts
|
||||
[UNORDERED_END]
|
3
tests/specs/install/type_only_import/main.ts
Normal file
3
tests/specs/install/type_only_import/main.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
import { foo } from "jsr:@denotest/type-only-import";
|
||||
|
||||
console.log(foo.bar);
|
2
tests/specs/install/type_only_import/run.out
Normal file
2
tests/specs/install/type_only_import/run.out
Normal file
|
@ -0,0 +1,2 @@
|
|||
Check [WILDCARD]main.ts
|
||||
foo
|
Loading…
Reference in a new issue