-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18622 from asgerf/js/typescript-tsconfig-names
JS: Treat more file patterns as tsconfig-like files
- Loading branch information
Showing
8 changed files
with
47 additions
and
4 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
5 changes: 5 additions & 0 deletions
5
javascript/ql/src/change-notes/2025-01-30-typescript-tsconfig-names.md
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,5 @@ | ||
--- | ||
category: majorAnalysis | ||
--- | ||
* TypeScript extraction is now better at analyzing projects where the main `tsconfig.json` file does not include any | ||
source files, but references other `tsconfig.json`-like files that do include source files. |
4 changes: 4 additions & 0 deletions
4
javascript/ql/test/library-tests/TypeScript/TSConfigReferences/src/main.ts
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,4 @@ | ||
export function main(foo: string) { | ||
let x = foo; | ||
console.log(x); | ||
} |
9 changes: 9 additions & 0 deletions
9
javascript/ql/test/library-tests/TypeScript/TSConfigReferences/test.expected
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,9 @@ | ||
types | ||
| (...data: any[]) => void | | ||
| (foo: string) => void | | ||
| Console | | ||
| any | | ||
| any[] | | ||
| string | | ||
| void | | ||
jsonFiles |
5 changes: 5 additions & 0 deletions
5
javascript/ql/test/library-tests/TypeScript/TSConfigReferences/test.ql
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,5 @@ | ||
import javascript | ||
|
||
query predicate types(Type type) { any() } | ||
|
||
query predicate jsonFiles(File file) { file.getExtension() = "json" } |
9 changes: 9 additions & 0 deletions
9
javascript/ql/test/library-tests/TypeScript/TSConfigReferences/tsconfig.foo.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,9 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": [ | ||
"src" | ||
], | ||
"compilerOptions": { | ||
"composite": true | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
javascript/ql/test/library-tests/TypeScript/TSConfigReferences/tsconfig.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,7 @@ | ||
{ | ||
"include": [], | ||
"files": [], | ||
"references": [ | ||
{ "path": "./tsconfig.foo.json" }, | ||
], | ||
} |