Skip to content

Commit

Permalink
Manual TypeScript 5.3 and @types/node@18 updates (#212)
Browse files Browse the repository at this point in the history
* Update to TS 5.3

* update error message

* update @types/node@18

* update snapshot
  • Loading branch information
danvk authored Nov 27, 2023
1 parent bafd0e5 commit 5c1babe
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 28 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
},
"cSpell.words": [
"nums"
]
],
"asciidoc.antora.enableAntoraSupport": false
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
"prettier": "^3.0.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
"typescript": "^5.3.2"
}
}
38 changes: 18 additions & 20 deletions src/test/__snapshots__/asciidoc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ exports[`checker asciidoc checker snapshots "./src/test/inputs/empty-twoslash.as
"Code passed type checker.",
"💥 ./src/test/inputs/empty-twoslash.asciidoc:15:1-13: Failed type assertion for \`fetchANumber\`
Expected:
Actual: function fetchANumber(input: RequestInfo | URL, init?: RequestInit | undefined): Promise<number>",
Actual: function fetchANumber(input: RequestInfo, init?: RequestInit | undefined): Promise<number>",
" 0/1 twoslash type assertions matched.",
"async function fetchANumber(...args: Parameters<typeof fetch>): Promise<number> {
const response = await fetch(...args);
Expand Down Expand Up @@ -251,20 +251,19 @@ END #././src/test/inputs/prepend-as-file.asciidoc:10 (--- ms)
"BEGIN #././src/test/inputs/prepend-as-file.asciidoc:21 (--filter prepend-as-file-21)
",
"matched errors:",
" expected: Type '{ x: number; y: number; z: number; }' is not assignable to type 'Point' Object literal may only specify known properties, and 'z' does not exist in type 'Point'.",
" actual: Type '{ x: number; y: number; z: number; }' is not assignable to type 'Point'.
Object literal may only specify known properties, and 'z' does not exist in type 'Point'.",
" error messages could not be matched!",
" expected: Object literal may only specify known properties, and 'z' does not exist in type 'Point'.",
" actual: Object literal may only specify known properties, and 'z' does not exist in type 'Point'.",
" error messages match: perfect",
"Matched 1/1 errors.",
"
END #././src/test/inputs/prepend-as-file.asciidoc:21 (--- ms)
",
"BEGIN #././src/test/inputs/prepend-as-file.asciidoc:37 (--filter prepend-as-file-37)
"BEGIN #././src/test/inputs/prepend-as-file.asciidoc:36 (--filter prepend-as-file-36)
",
"
END #././src/test/inputs/prepend-as-file.asciidoc:37 (--- ms)
END #././src/test/inputs/prepend-as-file.asciidoc:36 (--- ms)
",
"BEGIN #././src/test/inputs/prepend-as-file.asciidoc:53 (--filter prepend-as-file-53)
"BEGIN #././src/test/inputs/prepend-as-file.asciidoc:52 (--filter prepend-as-file-52)
",
"Code passed type checker.",
"Twoslash type assertion match:",
Expand All @@ -275,7 +274,7 @@ END #././src/test/inputs/prepend-as-file.asciidoc:37 (--- ms)
" Actual: (property) "months": string[]",
" 2/2 twoslash type assertions matched.",
"
END #././src/test/inputs/prepend-as-file.asciidoc:53 (--- ms)
END #././src/test/inputs/prepend-as-file.asciidoc:52 (--- ms)
",
"---- END FILE ./src/test/inputs/prepend-as-file.asciidoc
",
Expand All @@ -284,8 +283,8 @@ END #././src/test/inputs/prepend-as-file.asciidoc:53 (--- ms)
"1/1: ././src/test/inputs/prepend-as-file.asciidoc",
"1/1: ././src/test/inputs/prepend-as-file.asciidoc: 1/4 ././src/test/inputs/prepend-as-file.asciidoc:10",
"1/1: ././src/test/inputs/prepend-as-file.asciidoc: 2/4 ././src/test/inputs/prepend-as-file.asciidoc:21",
"1/1: ././src/test/inputs/prepend-as-file.asciidoc: 3/4 ././src/test/inputs/prepend-as-file.asciidoc:37",
"1/1: ././src/test/inputs/prepend-as-file.asciidoc: 4/4 ././src/test/inputs/prepend-as-file.asciidoc:53",
"1/1: ././src/test/inputs/prepend-as-file.asciidoc: 3/4 ././src/test/inputs/prepend-as-file.asciidoc:36",
"1/1: ././src/test/inputs/prepend-as-file.asciidoc: 4/4 ././src/test/inputs/prepend-as-file.asciidoc:52",
],
}
`;
Expand Down Expand Up @@ -1088,8 +1087,7 @@ const pt: Point = {
x: 3,
y: 4,
z: 5,
// ~ Type '{ x: number; y: number; z: number; }' is not assignable to type 'Point'
// Object literal may only specify known properties, and 'z' does not exist in type 'Point'.
// ~ Object literal may only specify known properties, and 'z' does not exist in type 'Point'.
}",
"descriptor": "./prepend-as-file.asciidoc:21",
"id": "prepend-as-file-21",
Expand Down Expand Up @@ -1123,11 +1121,11 @@ const pt: Point = {
"Dec"
]
}",
"descriptor": "./prepend-as-file.asciidoc:37",
"id": "prepend-as-file-37",
"descriptor": "./prepend-as-file.asciidoc:36",
"id": "prepend-as-file-36",
"isTSX": false,
"language": "json",
"lineNumber": 36,
"lineNumber": 35,
"nodeModules": [],
"prefixes": [],
"prefixesLength": 0,
Expand All @@ -1146,15 +1144,15 @@ console.log(data.year);
// ^? (property) "year": number
console.log(data.months);
// ^? (property) "months": string[]",
"descriptor": "./prepend-as-file.asciidoc:53",
"id": "prepend-as-file-53",
"descriptor": "./prepend-as-file.asciidoc:52",
"id": "prepend-as-file-52",
"isTSX": false,
"language": "ts",
"lineNumber": 52,
"lineNumber": 51,
"nodeModules": [],
"prefixes": [
{
"id": "prepend-as-file-37",
"id": "prepend-as-file-36",
},
],
"prefixesLength": 0,
Expand Down
3 changes: 1 addition & 2 deletions src/test/inputs/prepend-as-file.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ const pt: Point = {
x: 3,
y: 4,
z: 5,
// ~ Type '{ x: number; y: number; z: number; }' is not assignable to type 'Point'
// Object literal may only specify known properties, and 'z' does not exist in type 'Point'.
// ~ Object literal may only specify known properties, and 'z' does not exist in type 'Point'.
}
----
// verifier:reset
Expand Down
15 changes: 11 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -852,9 +852,11 @@
undici-types "~5.26.4"

"@types/node@18":
version "18.18.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.6.tgz#26da694f75cdb057750f49d099da5e3f3824cb3e"
integrity sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==
version "18.18.13"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.13.tgz#ae0f76c0bfe79d8fad0f910b78ae3e59b333c6e8"
integrity sha512-vXYZGRrSCreZmq1rEjMRLXJhiy8MrIeVasx+PCVlP414N7CJLHnMf+juVvjdprHyH+XRy3zKZLHeNueOpJCn0g==
dependencies:
undici-types "~5.26.4"

"@types/normalize-package-data@^2.4.1":
version "2.4.3"
Expand Down Expand Up @@ -3641,11 +3643,16 @@ type-fest@^4.2.0:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.2.0.tgz#e259430307710e77721ecf6f545840acad72195f"
integrity sha512-5zknd7Dss75pMSED270A1RQS3KloqRJA9XbXLe0eCxyw7xXFb3rd+9B0UQ/0E+LQT6lnrLviEolYORlRWamn4w==

typescript@^5.0.2, typescript@^5.1.6:
typescript@^5.0.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==

typescript@^5.3.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.2.tgz#00d1c7c1c46928c5845c1ee8d0cc2791031d4c43"
integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==

undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
Expand Down

0 comments on commit 5c1babe

Please sign in to comment.