Skip to content

Commit b4d89f7

Browse files
committed
Replace 'assert' with 'with' in QL test files
1 parent 3d45944 commit b4d89f7

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

javascript/ql/test/library-tests/TypeScript/ImportAssertions/test.expected

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ getImportAttributesFromImport
77
| js-import-assertions.js:16:1:16:53 | import ... son" }; | js-import-assertions.js:16:37:16:52 | { type: "json" } |
88
| js-import-assertions.js:17:1:17:52 | import ... son" }; | js-import-assertions.js:17:36:17:51 | { type: "json" } |
99
| js-import-assertions.js:18:1:18:48 | import ... son" }; | js-import-assertions.js:18:32:18:47 | { type: "json" } |
10-
| ts-import-assertions.ts:3:1:3:40 | import ... son" }; | ts-import-assertions.ts:3:24:3:39 | { type: "json" } |
11-
| ts-import-assertions.ts:4:1:4:53 | import ... son" }; | ts-import-assertions.ts:4:37:4:52 | { type: "json" } |
12-
| ts-import-assertions.ts:5:1:5:52 | import ... son" }; | ts-import-assertions.ts:5:36:5:51 | { type: "json" } |
13-
| ts-import-assertions.ts:6:1:6:48 | import ... son" }; | ts-import-assertions.ts:6:32:6:47 | { type: "json" } |
10+
| ts-import-assertions.ts:3:1:3:38 | import ... son" }; | ts-import-assertions.ts:3:22:3:37 | { type: "json" } |
11+
| ts-import-assertions.ts:4:1:4:51 | import ... son" }; | ts-import-assertions.ts:4:35:4:50 | { type: "json" } |
12+
| ts-import-assertions.ts:5:1:5:50 | import ... son" }; | ts-import-assertions.ts:5:34:5:49 | { type: "json" } |
13+
| ts-import-assertions.ts:6:1:6:46 | import ... son" }; | ts-import-assertions.ts:6:30:6:45 | { type: "json" } |
1414
getImportAttributesFromExport
1515
| js-import-assertions.js:6:1:6:50 | export ... son" }; | js-import-assertions.js:6:34:6:49 | { type: "json" } |
1616
| js-import-assertions.js:7:1:7:45 | export ... son" }; | js-import-assertions.js:7:29:7:44 | { type: "json" } |
1717
| js-import-assertions.js:8:1:8:51 | export ... son" }; | js-import-assertions.js:8:35:8:50 | { type: "json" } |
1818
| js-import-assertions.js:20:1:20:52 | export ... son" }; | js-import-assertions.js:20:36:20:51 | { type: "json" } |
1919
| js-import-assertions.js:21:1:21:47 | export ... son" }; | js-import-assertions.js:21:31:21:46 | { type: "json" } |
2020
| js-import-assertions.js:22:1:22:53 | export ... son" }; | js-import-assertions.js:22:37:22:52 | { type: "json" } |
21-
| ts-import-assertions.ts:8:1:8:52 | export ... son" }; | ts-import-assertions.ts:8:36:8:51 | { type: "json" } |
22-
| ts-import-assertions.ts:9:1:9:47 | export ... son" }; | ts-import-assertions.ts:9:31:9:46 | { type: "json" } |
23-
| ts-import-assertions.ts:10:1:10:53 | export ... son" }; | ts-import-assertions.ts:10:37:10:52 | { type: "json" } |
21+
| ts-import-assertions.ts:8:1:8:50 | export ... son" }; | ts-import-assertions.ts:8:34:8:49 | { type: "json" } |
22+
| ts-import-assertions.ts:9:1:9:45 | export ... son" }; | ts-import-assertions.ts:9:29:9:44 | { type: "json" } |
23+
| ts-import-assertions.ts:10:1:10:51 | export ... son" }; | ts-import-assertions.ts:10:35:10:50 | { type: "json" } |
2424
getImportOptions
2525
| js-import-assertions.js:10:12:10:55 | import( ... n" } }) | js-import-assertions.js:10:29:10:54 | { with: ... on" } } |
2626
| js-import-assertions.js:24:12:24:57 | import( ... n" } }) | js-import-assertions.js:24:29:24:56 | { asser ... on" } } |
27-
| ts-import-assertions.ts:12:12:12:57 | import( ... n" } }) | ts-import-assertions.ts:12:29:12:56 | { asser ... on" } } |
27+
| ts-import-assertions.ts:12:12:12:55 | import( ... n" } }) | ts-import-assertions.ts:12:29:12:54 | { with: ... on" } } |
2828
errors
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// TypeScript
22

3-
import "module" assert { type: "json" };
4-
import * as v1 from "module" assert { type: "json" };
5-
import { v2 } from "module" assert { type: "json" };
6-
import v3 from "module" assert { type: "json" };
3+
import "module" with { type: "json" };
4+
import * as v1 from "module" with { type: "json" };
5+
import { v2 } from "module" with { type: "json" };
6+
import v3 from "module" with { type: "json" };
77

8-
export { v4 } from "module" assert { type: "json" };
9-
export * from "module" assert { type: "json" };
10-
export * as v5 from "module" assert { type: "json" };
8+
export { v4 } from "module" with { type: "json" };
9+
export * from "module" with { type: "json" };
10+
export * as v5 from "module" with { type: "json" };
1111

12-
const v6 = import("module", { assert: { type: "json" } });
12+
const v6 = import("module", { with: { type: "json" } });
1313

1414
import "module" // missing semicolon
1515
assert({ type: "json" }); // function call, not import assertion

javascript/ql/test/library-tests/TypeScript/Types/printAst.expected

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -977,13 +977,13 @@ nodes
977977
| tst.ts:232:28:232:32 | [VarRef] other | semmle.label | [VarRef] other |
978978
| tst.ts:232:28:232:38 | [DotExpr] other.#name | semmle.label | [DotExpr] other.#name |
979979
| tst.ts:232:34:232:38 | [Label] #name | semmle.label | [Label] #name |
980-
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | semmle.label | [ImportDeclaration] import ... son" }; |
981-
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | semmle.order | 60 |
980+
| tst.ts:237:1:237:63 | [ImportDeclaration] import ... son" }; | semmle.label | [ImportDeclaration] import ... son" }; |
981+
| tst.ts:237:1:237:63 | [ImportDeclaration] import ... son" }; | semmle.order | 60 |
982982
| tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | semmle.label | [ImportSpecifier] * as Foo3 |
983983
| tst.ts:237:13:237:16 | [VarDecl] Foo3 | semmle.label | [VarDecl] Foo3 |
984984
| tst.ts:237:23:237:40 | [Literal] "./something.json" | semmle.label | [Literal] "./something.json" |
985-
| tst.ts:237:49:237:64 | [ObjectExpr] { type: "json" } | semmle.label | [ObjectExpr] { type: "json" } |
986-
| tst.ts:237:51:237:62 | [Property] type: "json" | semmle.label | [Property] type: "json" |
985+
| tst.ts:237:47:237:62 | [ObjectExpr] { type: "json" } | semmle.label | [ObjectExpr] { type: "json" } |
986+
| tst.ts:237:49:237:60 | [Property] type: "json" | semmle.label | [Property] type: "json" |
987987
| tst.ts:238:1:238:19 | [DeclStmt] var foo = ... | semmle.label | [DeclStmt] var foo = ... |
988988
| tst.ts:238:1:238:19 | [DeclStmt] var foo = ... | semmle.order | 61 |
989989
| tst.ts:238:5:238:7 | [VarDecl] foo | semmle.label | [VarDecl] foo |
@@ -3758,16 +3758,16 @@ edges
37583758
| tst.ts:232:28:232:38 | [DotExpr] other.#name | tst.ts:232:28:232:32 | [VarRef] other | semmle.order | 1 |
37593759
| tst.ts:232:28:232:38 | [DotExpr] other.#name | tst.ts:232:34:232:38 | [Label] #name | semmle.label | 2 |
37603760
| tst.ts:232:28:232:38 | [DotExpr] other.#name | tst.ts:232:34:232:38 | [Label] #name | semmle.order | 2 |
3761-
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | semmle.label | 1 |
3762-
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | semmle.order | 1 |
3763-
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | tst.ts:237:23:237:40 | [Literal] "./something.json" | semmle.label | 2 |
3764-
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | tst.ts:237:23:237:40 | [Literal] "./something.json" | semmle.order | 2 |
3765-
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | tst.ts:237:49:237:64 | [ObjectExpr] { type: "json" } | semmle.label | 3 |
3766-
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | tst.ts:237:49:237:64 | [ObjectExpr] { type: "json" } | semmle.order | 3 |
3761+
| tst.ts:237:1:237:63 | [ImportDeclaration] import ... son" }; | tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | semmle.label | 1 |
3762+
| tst.ts:237:1:237:63 | [ImportDeclaration] import ... son" }; | tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | semmle.order | 1 |
3763+
| tst.ts:237:1:237:63 | [ImportDeclaration] import ... son" }; | tst.ts:237:23:237:40 | [Literal] "./something.json" | semmle.label | 2 |
3764+
| tst.ts:237:1:237:63 | [ImportDeclaration] import ... son" }; | tst.ts:237:23:237:40 | [Literal] "./something.json" | semmle.order | 2 |
3765+
| tst.ts:237:1:237:63 | [ImportDeclaration] import ... son" }; | tst.ts:237:47:237:62 | [ObjectExpr] { type: "json" } | semmle.label | 3 |
3766+
| tst.ts:237:1:237:63 | [ImportDeclaration] import ... son" }; | tst.ts:237:47:237:62 | [ObjectExpr] { type: "json" } | semmle.order | 3 |
37673767
| tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | tst.ts:237:13:237:16 | [VarDecl] Foo3 | semmle.label | 1 |
37683768
| tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | tst.ts:237:13:237:16 | [VarDecl] Foo3 | semmle.order | 1 |
3769-
| tst.ts:237:49:237:64 | [ObjectExpr] { type: "json" } | tst.ts:237:51:237:62 | [Property] type: "json" | semmle.label | 1 |
3770-
| tst.ts:237:49:237:64 | [ObjectExpr] { type: "json" } | tst.ts:237:51:237:62 | [Property] type: "json" | semmle.order | 1 |
3769+
| tst.ts:237:47:237:62 | [ObjectExpr] { type: "json" } | tst.ts:237:49:237:60 | [Property] type: "json" | semmle.label | 1 |
3770+
| tst.ts:237:47:237:62 | [ObjectExpr] { type: "json" } | tst.ts:237:49:237:60 | [Property] type: "json" | semmle.order | 1 |
37713771
| tst.ts:238:1:238:19 | [DeclStmt] var foo = ... | tst.ts:238:5:238:18 | [VariableDeclarator] foo = Foo3.foo | semmle.label | 1 |
37723772
| tst.ts:238:1:238:19 | [DeclStmt] var foo = ... | tst.ts:238:5:238:18 | [VariableDeclarator] foo = Foo3.foo | semmle.order | 1 |
37733773
| tst.ts:238:5:238:18 | [VariableDeclarator] foo = Foo3.foo | tst.ts:238:5:238:7 | [VarDecl] foo | semmle.label | 1 |

javascript/ql/test/library-tests/TypeScript/Types/tst.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ module TS45 {
234234
}
235235
}
236236

237-
import * as Foo3 from "./something.json" assert { type: "json" };
237+
import * as Foo3 from "./something.json" with { type: "json" };
238238
var foo = Foo3.foo;
239239

240240
module TS46 {

0 commit comments

Comments
 (0)