-
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 #18550 from asgerf/js/vue-ts-notsconfig
JS: Avoid inconsistent DB when embedded TS has no associated tsconfig.json
- Loading branch information
Showing
6 changed files
with
27 additions
and
1 deletion.
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
6 changes: 6 additions & 0 deletions
6
javascript/ql/src/change-notes/2025-01-21-vue-ts-notsconfig.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,6 @@ | ||
--- | ||
category: fix | ||
--- | ||
* Fixed a bug that would occur when TypeScript code was found in an HTML-like file, such as a `.vue` file, | ||
but where it could not be associated with any `tsconfig.json` file. Previously the embedded code was not | ||
extracted in this case, but should now be extracted properly. |
7 changes: 7 additions & 0 deletions
7
...ary-tests/TypeScript/RegressionTests/EmbeddedTypeScriptNoTSConfig/embedded-typescript.vue
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 @@ | ||
<template> | ||
<p v-html="input" /> | ||
</template> | ||
<script setup lang="ts"> | ||
console.log("hello"); | ||
</script> | ||
<style></style> |
2 changes: 2 additions & 0 deletions
2
.../test/library-tests/TypeScript/RegressionTests/EmbeddedTypeScriptNoTSConfig/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,2 @@ | ||
| embedded-typescript.vue:5:1:6:0 | <toplevel> | | ||
| test.js:1:1:2:0 | <toplevel> | |
1 change: 1 addition & 0 deletions
1
...ipt/ql/test/library-tests/TypeScript/RegressionTests/EmbeddedTypeScriptNoTSConfig/test.js
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("hello"); |
3 changes: 3 additions & 0 deletions
3
...ipt/ql/test/library-tests/TypeScript/RegressionTests/EmbeddedTypeScriptNoTSConfig/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,3 @@ | ||
import javascript | ||
|
||
query predicate toplevels(TopLevel top) { any() } |