From cee4f1fd4531527b437a0701768207f037be1176 Mon Sep 17 00:00:00 2001 From: Guanzhou Song Date: Thu, 30 Jul 2026 10:48:02 -0400 Subject: [PATCH] Move to TypeScript 6 and hold TypeScript 7 until Next.js supports it Dependabot proposed TypeScript 7.0.2 (#95), which cannot build. TS 7 is the native port, and its compiler API is not the one Next.js links against, so `next build` fails outright: TypeScript 7.0.2 does not provide the compiler API required by Next.js. Enable experimental.useTypeScriptCli in your Next.js config to use the TypeScript CLI, or install TypeScript 6 instead. TypeScript 6 is supported, so this takes the upgrade Next.js actually offers rather than sitting on 5.9.3. A `versions: [7.x]` ignore entry holds TypeScript at 6 until Next.js supports the native port, so the same unmergeable PR is not reopened every week. The ignore is scoped to the 7.x line only, so 6.x updates still flow normally. Also drops @types/js-yaml, which became redundant when js-yaml 5 landed in #93. Version 5 ships its own type declarations via its `types` export condition; the DefinitelyTyped package described the v4 API and is no longer used by anything. Generated and verified on GitHub infrastructure rather than locally: the maintainer's machine sits behind a corporate registry proxy that cannot reach registry.npmjs.org, so a locally produced lockfile would carry internal feed URLs unusable by CI and outside contributors. All 706 resolved URLs point at registry.npmjs.org. Verified with `npm install`, `npm run lint`, and `npm run build:next`, all passing on TypeScript 6.0.3. Note that upstream CI does not run lint, so the lint check was run explicitly during generation. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01WWCBtvyCpxc2aqtyLDhDeE --- .github/dependabot.yml | 12 ++++++++++++ package-lock.json | 16 ++++------------ package.json | 3 +-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ad0edc5..d84e5f7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -19,6 +19,18 @@ updates: commit-message: prefix: npm include: scope + ignore: + # TypeScript 7 is the native port, and its compiler API is not the + # one Next.js links against. `next build` fails outright: + # "TypeScript 7.0.2 does not provide the compiler API required by + # Next.js. Enable experimental.useTypeScriptCli in your Next.js + # config to use the TypeScript CLI, or install TypeScript 6 + # instead." + # Hold at 6.x until Next.js supports it, rather than reopening the + # same unmergeable PR every week. + - dependency-name: typescript + versions: + - 7.x groups: # The ESLint packages are peer-locked to each other and must move # together. eslint-config-next@15 peer-requires diff --git a/package-lock.json b/package-lock.json index 1f66f5e..72a53b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,6 @@ "@eslint/eslintrc": "^3.3.3", "@next/eslint-plugin-next": "^16.1.1", "@tailwindcss/postcss": "^4.1.18", - "@types/js-yaml": "^4.0.9", "@types/minimatch": "^6.0.0", "@types/node": "^26.1.2", "@types/pluralize": "^0.0.33", @@ -41,7 +40,7 @@ "serve": "^14.2.5", "tailwindcss": "^4.1.18", "tsx": "^4.21.0", - "typescript": "^5.9.3" + "typescript": "^6.0.3" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2289,13 +2288,6 @@ "@types/unist": "*" } }, - "node_modules/@types/js-yaml": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", - "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -10067,9 +10059,9 @@ } }, "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index 8fd0934..a7fa812 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "@eslint/eslintrc": "^3.3.3", "@next/eslint-plugin-next": "^16.1.1", "@tailwindcss/postcss": "^4.1.18", - "@types/js-yaml": "^4.0.9", "@types/minimatch": "^6.0.0", "@types/node": "^26.1.2", "@types/pluralize": "^0.0.33", @@ -51,6 +50,6 @@ "serve": "^14.2.5", "tailwindcss": "^4.1.18", "tsx": "^4.21.0", - "typescript": "^5.9.3" + "typescript": "^6.0.3" } }