-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lockfile): track dependencies specified in TypeScript compiler op…
…tions (#26551) We should track dependencies in `jsxImportSource`, `jsxImportSourceTypes`, and `types`. That way, for example, if someone removes or changes the `jsxImportSource` then we can remove those items from the lockfile.
- Loading branch information
Showing
7 changed files
with
109 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
tests/specs/lockfile/jsx_import_source_and_types/__test__.jsonc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"tempDir": true, | ||
"steps": [{ | ||
"args": "run index.tsx", | ||
"output": "index.out" | ||
}, { | ||
"args": [ | ||
"eval", | ||
"console.log(Deno.readTextFileSync('deno.lock').trim())" | ||
], | ||
"output": "deno.lock.out" | ||
}] | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/specs/lockfile/jsx_import_source_and_types/deno.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"jsx": "react-jsx", | ||
"jsxImportSource": "npm:react", | ||
"jsxImportSourceTypes": "npm:@types/react", | ||
"types": [ | ||
"npm:@types/node" | ||
] | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
tests/specs/lockfile/jsx_import_source_and_types/deno.lock.out
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Download http://localhost:4260/react | ||
Download http://localhost:4260/loose-envify | ||
Download http://localhost:4260/js-tokens | ||
Download http://localhost:4260/react/react-18.2.0.tgz | ||
Download http://localhost:4260/loose-envify/loose-envify-1.4.0.tgz | ||
Download http://localhost:4260/js-tokens/js-tokens-4.0.0.tgz | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log(1); |