From a6c57c2e55a0d58eb5550829d73ce7d2bad1a95d Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 30 Jan 2025 10:25:01 -0800 Subject: [PATCH 1/3] chore(deps): upgrade typescript to 5.8 beta --- multichain-testing/package.json | 2 +- multichain-testing/yarn.lock | 26 +++++++++++++++++++++++--- package.json | 2 +- packages/cosmic-proto/package.json | 2 +- yarn.lock | 7 ++++++- 5 files changed, 32 insertions(+), 7 deletions(-) diff --git a/multichain-testing/package.json b/multichain-testing/package.json index cd0bc4a7302..c5dbd7474a2 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -39,7 +39,7 @@ "patch-package": "^8.0.0", "starshipjs": "2.4.1", "ts-blank-space": "^0.4.4", - "typescript": "~5.7.2" + "typescript": "~5.8.0-beta" }, "resolutions": { "axios": "1.6.7", diff --git a/multichain-testing/yarn.lock b/multichain-testing/yarn.lock index 1b9216cff90..9b4e72e19bc 100644 --- a/multichain-testing/yarn.lock +++ b/multichain-testing/yarn.lock @@ -4925,7 +4925,7 @@ __metadata: patch-package: "npm:^8.0.0" starshipjs: "npm:2.4.1" ts-blank-space: "npm:^0.4.4" - typescript: "npm:~5.7.2" + typescript: "npm:~5.8.0-beta" languageName: unknown linkType: soft @@ -5458,7 +5458,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:5.1.6 - 5.7.x, typescript@npm:^5.4.5, typescript@npm:~5.7.2": +"typescript@npm:5.1.6 - 5.7.x, typescript@npm:^5.4.5": version: 5.7.2 resolution: "typescript@npm:5.7.2" bin: @@ -5468,7 +5468,17 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.1.6 - 5.7.x#optional!builtin, typescript@patch:typescript@npm%3A^5.4.5#optional!builtin, typescript@patch:typescript@npm%3A~5.7.2#optional!builtin": +"typescript@npm:~5.8.0-beta": + version: 5.8.0-dev.20250130 + resolution: "typescript@npm:5.8.0-dev.20250130" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/20852f1703f109576c925a6710d6d0001656ecc77d60fca4ea94ecd562290cef4aa529f919f45f6ab3c8334d3746a938ecca700ed7d2fd563d7cbc3dbf75f2bf + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A5.1.6 - 5.7.x#optional!builtin, typescript@patch:typescript@npm%3A^5.4.5#optional!builtin": version: 5.7.2 resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=5786d5" bin: @@ -5478,6 +5488,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A~5.8.0-beta#optional!builtin": + version: 5.8.0-dev.20250130 + resolution: "typescript@patch:typescript@npm%3A5.8.0-dev.20250130#optional!builtin::version=5.8.0-dev.20250130&hash=5786d5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/8cc5b8c72a84ff58ca8c2e3bdd25ea50e98aed8b6c079ddfa43f14744cd20d97529edd61ca930e99deb9c9d6321650fd69030169bbbd546187c426fcff83d360 + languageName: node + linkType: hard + "undici-types@npm:~6.19.2": version: 6.19.8 resolution: "undici-types@npm:6.19.8" diff --git a/package.json b/package.json index 1ecad162abe..4cd023df65e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "type-coverage": "^2.27.1", "typedoc": "^0.26.7", "typedoc-plugin-markdown": "^4.2.1", - "typescript": "~5.7.3", + "typescript": "~5.8.0-beta", "typescript-eslint": "^8.22.0" }, "resolutions": { diff --git a/packages/cosmic-proto/package.json b/packages/cosmic-proto/package.json index 334e50487b0..98f54f314ee 100644 --- a/packages/cosmic-proto/package.json +++ b/packages/cosmic-proto/package.json @@ -157,7 +157,7 @@ "ava": "^5.3.1", "rimraf": "^5.0.0", "tsd": "^0.31.1", - "typescript": "~5.7.1" + "typescript": "^5.8.0-beta" }, "dependencies": { "@endo/base64": "^1.0.9", diff --git a/yarn.lock b/yarn.lock index 8276e3d3936..1c4acf64fe3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12289,7 +12289,7 @@ typescript-eslint@^7.3.1, typescript-eslint@^8.14.0, typescript-eslint@^8.22.0: "@typescript-eslint/parser" "8.22.0" "@typescript-eslint/utils" "8.22.0" -"typescript@5.1.6 - 5.7.x", typescript@^5.4.5, typescript@~5.7.1, typescript@~5.7.3: +"typescript@5.1.6 - 5.7.x", typescript@^5.4.5: version "5.7.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw== @@ -12299,6 +12299,11 @@ typescript-eslint@^7.3.1, typescript-eslint@^8.14.0, typescript-eslint@^8.22.0: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@^5.8.0-beta, typescript@~5.8.0-beta: + version "5.8.0-dev.20250130" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.0-dev.20250130.tgz#eede4cf5d813f9845c6ee2b508d2392d544cb76e" + integrity sha512-qeH56cqOnOE0NO4zUsuuc5kyIQlzOPurHcguomUpSTfUE2He5dABg+fBBUeYIf4MreflM6ArXyj/rIrcHQ5g0g== + typescript@~5.6.3: version "5.6.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" From 306713ce0b1b22c7bb09ed01a1a7c74178e18e77 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 30 Jan 2025 10:32:04 -0800 Subject: [PATCH 2/3] build: typescript erasableSyntaxOnly --- tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tsconfig.json b/tsconfig.json index 142e8387c82..43a026b9a67 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,7 @@ "strictNullChecks": true, "noImplicitThis": true, "noUncheckedSideEffectImports": true, + "erasableSyntaxOnly": true, "verbatimModuleSyntax": true, "noEmit": true }, From 2d784cfccc0909441d3506c2d160a0b2894a2e27 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 30 Jan 2025 12:50:55 -0800 Subject: [PATCH 3/3] test: erasureSyntaxOnly regression --- packages/internal/test/ts-erasureSyntaxOnly.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 packages/internal/test/ts-erasureSyntaxOnly.ts diff --git a/packages/internal/test/ts-erasureSyntaxOnly.ts b/packages/internal/test/ts-erasureSyntaxOnly.ts new file mode 100644 index 00000000000..216dffaa8bb --- /dev/null +++ b/packages/internal/test/ts-erasureSyntaxOnly.ts @@ -0,0 +1,11 @@ +// NB: not a test that runs. + +// Test the `--erasureSyntaxOnly` option of TypeScript 5.8 +// https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option + +// @ts-expect-error ts(1294) This syntax is not allowed when 'erasableSyntaxOnly' is enabled. +enum Foo { + A = 1, + B = 2, + C = 3, +}