From 451e27a502223e3662b17f0c5df25d409f84c43d Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 11:20:01 +0100 Subject: [PATCH 01/27] fix support for TS 6.0 --- package.json | 2 +- .../templates/classic-typescript/package.json | 2 +- .../templates/classic-typescript/tsconfig.json | 1 - yarn.lock | 10 +++++----- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 885b9fc25850..8b070fd56a6a 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "stylelint": "^14.16.1", "stylelint-config-prettier": "^9.0.5", "stylelint-config-standard": "^29.0.0", - "typescript": "~5.8.2" + "typescript": "~6.0.2" }, "resolutions": { "**/pretty-format/react-is": "^19.2.4" diff --git a/packages/create-docusaurus/templates/classic-typescript/package.json b/packages/create-docusaurus/templates/classic-typescript/package.json index aa4d545ffeae..cc9ed3d5b874 100644 --- a/packages/create-docusaurus/templates/classic-typescript/package.json +++ b/packages/create-docusaurus/templates/classic-typescript/package.json @@ -29,7 +29,7 @@ "@docusaurus/tsconfig": "3.9.2", "@docusaurus/types": "3.9.2", "@types/react": "^19.0.0", - "typescript": "~5.6.2" + "typescript": "~6.0.2" }, "browserslist": { "production": [ diff --git a/packages/create-docusaurus/templates/classic-typescript/tsconfig.json b/packages/create-docusaurus/templates/classic-typescript/tsconfig.json index aceae0dd36e4..dffe73166def 100644 --- a/packages/create-docusaurus/templates/classic-typescript/tsconfig.json +++ b/packages/create-docusaurus/templates/classic-typescript/tsconfig.json @@ -4,7 +4,6 @@ { "extends": "@docusaurus/tsconfig", "compilerOptions": { - "baseUrl": ".", "strict": true }, "exclude": [".docusaurus", "build"] diff --git a/yarn.lock b/yarn.lock index 769b4e0691bf..49506d65002d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17871,6 +17871,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== +typescript@6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.2.tgz#0b1bfb15f68c64b97032f3d78abbf98bdbba501f" + integrity sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ== + "typescript@>=3 < 6": version "5.9.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" @@ -17881,11 +17886,6 @@ typescript@~5.6.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== -typescript@~5.8.2: - version "5.8.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.2.tgz#8170b3702f74b79db2e5a96207c15e65807999e4" - integrity sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ== - ufo@^1.5.4: version "1.6.0" resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.6.0.tgz#97c0729950279476b94b4ccdfd264a7206f7c872" From 2d65ba5168566846b0be94b6c4236ce3665ffd36 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 11:20:15 +0100 Subject: [PATCH 02/27] fix support for TS 6.0 --- website/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/website/tsconfig.json b/website/tsconfig.json index caea2e3443e5..7d22f7c2caa3 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -3,7 +3,6 @@ "extends": "@docusaurus/tsconfig", "compilerOptions": { "lib": ["DOM", "ESNext"], - "baseUrl": ".", "resolveJsonModule": true, "allowArbitraryExtensions": true, From dd8793786d4e41d0640e58d8d98cec2553efd59c Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 11:26:11 +0100 Subject: [PATCH 03/27] add TS ignoreDeprecations 6.0 for now --- packages/docusaurus-tsconfig/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docusaurus-tsconfig/tsconfig.json b/packages/docusaurus-tsconfig/tsconfig.json index b89e41d756c2..802618e7e2d1 100644 --- a/packages/docusaurus-tsconfig/tsconfig.json +++ b/packages/docusaurus-tsconfig/tsconfig.json @@ -12,6 +12,7 @@ "module": "esnext", "noEmit": true, "baseUrl": ".", + "ignoreDeprecations": "6.0", "paths": { "@site/*": ["./*"] }, From 9bffeac313a055de2d5eccb3846188557bf0e35c Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 11:31:30 +0100 Subject: [PATCH 04/27] lockfile --- yarn.lock | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 49506d65002d..5c300618884b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17871,20 +17871,15 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.2.tgz#0b1bfb15f68c64b97032f3d78abbf98bdbba501f" - integrity sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ== - "typescript@>=3 < 6": version "5.9.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== -typescript@~5.6.2: - version "5.6.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" - integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== +typescript@~6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.2.tgz#0b1bfb15f68c64b97032f3d78abbf98bdbba501f" + integrity sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ== ufo@^1.5.4: version "1.6.0" From c6449060d82248700c41968c013220c24370f89a Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 11:41:25 +0100 Subject: [PATCH 05/27] TS 6.0 fixes --- packages/create-docusaurus/tsconfig.json | 3 ++- packages/docusaurus-logger/tsconfig.json | 4 +++- packages/docusaurus/src/server/i18n.ts | 3 +-- packages/docusaurus/tsconfig.client.json | 6 +++++- packages/docusaurus/tsconfig.json | 3 ++- packages/docusaurus/tsconfig.server.json | 3 ++- packages/eslint-plugin/tsconfig.json | 3 ++- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/packages/create-docusaurus/tsconfig.json b/packages/create-docusaurus/tsconfig.json index 3c6fedcdde03..b3f7ccc7f2e9 100644 --- a/packages/create-docusaurus/tsconfig.json +++ b/packages/create-docusaurus/tsconfig.json @@ -3,7 +3,8 @@ "references": [{"path": "./tsconfig.build.json"}], "compilerOptions": { "noEmit": true, - "rootDir": "." + "rootDir": ".", + "types": ["node"] }, "include": ["package.json", "bin"], "exclude": ["**/__tests__/**"] diff --git a/packages/docusaurus-logger/tsconfig.json b/packages/docusaurus-logger/tsconfig.json index 74731e2257e1..225604d6366c 100644 --- a/packages/docusaurus-logger/tsconfig.json +++ b/packages/docusaurus-logger/tsconfig.json @@ -3,7 +3,9 @@ "compilerOptions": { "noEmit": false, "sourceMap": true, - "declarationMap": true + "declarationMap": true, + "types": ["node"], + "lib": ["DOM"] }, "include": ["src"], "exclude": ["**/__tests__/**"] diff --git a/packages/docusaurus/src/server/i18n.ts b/packages/docusaurus/src/server/i18n.ts index 8a80f4e6486f..3b0dab396d9f 100644 --- a/packages/docusaurus/src/server/i18n.ts +++ b/packages/docusaurus/src/server/i18n.ts @@ -64,7 +64,6 @@ function getDefaultCalendar(localeStr: string) { // See https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCalendars // See https://caniuse.com/mdn-javascript_builtins_intl_locale_getcalendars const calendars = - // @ts-expect-error: new std method (Bun/JSC/WebKit) locale.getCalendars?.() ?? // @ts-expect-error: non-std attribute (V8/Chromium/Node) locale.calendars; @@ -84,7 +83,7 @@ function getDefaultDirection(localeStr: string) { // TODO Docusaurus v4: remove the fallback to locale.textInfo // @ts-expect-error: The TC39 proposal was updated const textInto = locale.getTextInfo?.() ?? locale.textInfo; - return textInto.direction; + return textInto.direction ?? 'ltr'; } export function getDefaultLocaleConfig( diff --git a/packages/docusaurus/tsconfig.client.json b/packages/docusaurus/tsconfig.client.json index be1294f32d10..6d70cba8c528 100644 --- a/packages/docusaurus/tsconfig.client.json +++ b/packages/docusaurus/tsconfig.client.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.base.client.json", "include": ["src/client", "src/*.d.ts"], - "exclude": ["**/__tests__/**"] + "exclude": ["**/__tests__/**"], + "compilerOptions": { + "types": ["node"], + "lib": ["DOM"] + } } diff --git a/packages/docusaurus/tsconfig.json b/packages/docusaurus/tsconfig.json index d12d12269341..ce38541f5d90 100644 --- a/packages/docusaurus/tsconfig.json +++ b/packages/docusaurus/tsconfig.json @@ -7,7 +7,8 @@ "compilerOptions": { "noEmit": true, "checkJs": true, - "rootDir": "." + "rootDir": ".", + "types": ["node"] }, "include": ["package.json", "bin"], "exclude": ["**/__tests__/**"] diff --git a/packages/docusaurus/tsconfig.server.json b/packages/docusaurus/tsconfig.server.json index 71c111ccbd72..61d1b6e6384f 100644 --- a/packages/docusaurus/tsconfig.server.json +++ b/packages/docusaurus/tsconfig.server.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "noEmit": false, - "tsBuildInfoFile": "${configDir}/lib/.tsbuildinfo-server" + "tsBuildInfoFile": "${configDir}/lib/.tsbuildinfo-server", + "types": ["node"] }, "include": ["src"], "exclude": ["src/client", "**/__tests__/**"] diff --git a/packages/eslint-plugin/tsconfig.json b/packages/eslint-plugin/tsconfig.json index 343f87c70bdc..9e9fd58fbb8c 100644 --- a/packages/eslint-plugin/tsconfig.json +++ b/packages/eslint-plugin/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "noEmit": false + "noEmit": false, + "types": ["node"] }, "include": ["src"], "exclude": ["**/__tests__/**"] From 2a2622335caaf61ea551eacc7217eee4fb1dfed1 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 11:44:18 +0100 Subject: [PATCH 06/27] TS 6.0 fixes --- packages/docusaurus-plugin-vercel-analytics/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus-plugin-vercel-analytics/tsconfig.json b/packages/docusaurus-plugin-vercel-analytics/tsconfig.json index 8cf281304425..e16ea558903b 100644 --- a/packages/docusaurus-plugin-vercel-analytics/tsconfig.json +++ b/packages/docusaurus-plugin-vercel-analytics/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.base.json", "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { - "noEmit": false + "noEmit": false, + "types": ["node"] }, "include": ["src"], "exclude": ["src/analytics.ts", "**/__tests__/**"] From 0968a73ee4a08cfb2707b6e1a82a0b44b4a4b9a8 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 11:56:59 +0100 Subject: [PATCH 07/27] TS 6.0 fixes --- .../docusaurus-plugin-google-analytics/tsconfig.client.json | 3 +++ packages/docusaurus-plugin-google-gtag/tsconfig.client.json | 3 +++ packages/docusaurus-plugin-vercel-analytics/tsconfig.json | 3 +-- tsconfig.base.client.json | 4 +++- tsconfig.base.json | 1 + 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-plugin-google-analytics/tsconfig.client.json b/packages/docusaurus-plugin-google-analytics/tsconfig.client.json index 830d13ddd749..69f45d9ad97f 100644 --- a/packages/docusaurus-plugin-google-analytics/tsconfig.client.json +++ b/packages/docusaurus-plugin-google-analytics/tsconfig.client.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.base.client.json", + "compilerOptions": { + "lib": ["DOM"] + }, "include": ["src/analytics.ts", "src/*.d.ts"], "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-google-gtag/tsconfig.client.json b/packages/docusaurus-plugin-google-gtag/tsconfig.client.json index 55a83c9a16f4..8ce90029c715 100644 --- a/packages/docusaurus-plugin-google-gtag/tsconfig.client.json +++ b/packages/docusaurus-plugin-google-gtag/tsconfig.client.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.base.client.json", + "compilerOptions": { + "types": ["gtag.js"] + }, "include": ["src/gtag.ts", "src/*.d.ts"], "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-vercel-analytics/tsconfig.json b/packages/docusaurus-plugin-vercel-analytics/tsconfig.json index e16ea558903b..8cf281304425 100644 --- a/packages/docusaurus-plugin-vercel-analytics/tsconfig.json +++ b/packages/docusaurus-plugin-vercel-analytics/tsconfig.json @@ -2,8 +2,7 @@ "extends": "../../tsconfig.base.json", "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { - "noEmit": false, - "types": ["node"] + "noEmit": false }, "include": ["src"], "exclude": ["src/analytics.ts", "**/__tests__/**"] diff --git a/tsconfig.base.client.json b/tsconfig.base.client.json index ae15d13c915e..bd02813b86a4 100644 --- a/tsconfig.base.client.json +++ b/tsconfig.base.client.json @@ -2,9 +2,11 @@ "extends": "./tsconfig.base.json", "compilerOptions": { "tsBuildInfoFile": "${configDir}/lib/.tsbuildinfo-client", + "lib": ["DOM", "ESNext"], "noEmit": false, "moduleResolution": "bundler", "module": "esnext", - "target": "esnext" + "target": "esnext", + "types": [] } } diff --git a/tsconfig.base.json b/tsconfig.base.json index 247a84af9df5..43b39e34593a 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -6,6 +6,7 @@ "incremental": true, "tsBuildInfoFile": "${configDir}/lib/.tsbuildinfo", "erasableSyntaxOnly": true, + "types": ["node"], /* Emit */ "target": "ES2020", "lib": ["ESNext"], From c594ae8c6870bd02fe29c702b95453227be49c7e Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 12:00:09 +0100 Subject: [PATCH 08/27] TS 6.0 fixes --- packages/docusaurus-plugin-content-blog/tsconfig.client.json | 2 +- packages/docusaurus-plugin-content-blog/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-plugin-content-blog/tsconfig.client.json b/packages/docusaurus-plugin-content-blog/tsconfig.client.json index be1294f32d10..ad1fa888de1e 100644 --- a/packages/docusaurus-plugin-content-blog/tsconfig.client.json +++ b/packages/docusaurus-plugin-content-blog/tsconfig.client.json @@ -1,5 +1,5 @@ { "extends": "../../tsconfig.base.client.json", "include": ["src/client", "src/*.d.ts"], - "exclude": ["**/__tests__/**"] + "exclude": ["**/__tests__/**", "**/*.test.ts"] } diff --git a/packages/docusaurus-plugin-content-blog/tsconfig.json b/packages/docusaurus-plugin-content-blog/tsconfig.json index 8cec50ee1327..60dfa46f1b9f 100644 --- a/packages/docusaurus-plugin-content-blog/tsconfig.json +++ b/packages/docusaurus-plugin-content-blog/tsconfig.json @@ -5,5 +5,5 @@ "noEmit": false }, "include": ["src"], - "exclude": ["src/client", "**/__tests__/**"] + "exclude": ["src/client", "**/__tests__/**", "**/*.test.ts"] } From ab77d4dddf50a2946e587e494e9d2de107325a40 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 12:03:22 +0100 Subject: [PATCH 09/27] TS 6.0 fixes --- packages/docusaurus-plugin-content-docs/tsconfig.client.json | 2 +- packages/docusaurus-plugin-content-docs/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-plugin-content-docs/tsconfig.client.json b/packages/docusaurus-plugin-content-docs/tsconfig.client.json index be1294f32d10..ad1fa888de1e 100644 --- a/packages/docusaurus-plugin-content-docs/tsconfig.client.json +++ b/packages/docusaurus-plugin-content-docs/tsconfig.client.json @@ -1,5 +1,5 @@ { "extends": "../../tsconfig.base.client.json", "include": ["src/client", "src/*.d.ts"], - "exclude": ["**/__tests__/**"] + "exclude": ["**/__tests__/**", "**/*.test.ts"] } diff --git a/packages/docusaurus-plugin-content-docs/tsconfig.json b/packages/docusaurus-plugin-content-docs/tsconfig.json index 8cec50ee1327..60dfa46f1b9f 100644 --- a/packages/docusaurus-plugin-content-docs/tsconfig.json +++ b/packages/docusaurus-plugin-content-docs/tsconfig.json @@ -5,5 +5,5 @@ "noEmit": false }, "include": ["src"], - "exclude": ["src/client", "**/__tests__/**"] + "exclude": ["src/client", "**/__tests__/**", "**/*.test.ts"] } From dab48511444fe31b335df33e269e1e528cdeee75 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 12:33:18 +0100 Subject: [PATCH 10/27] Upgrade Node types from v18 to v20 --- package.json | 2 +- yarn.lock | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 8b070fd56a6a..90f0fa334570 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "@types/fs-extra": "^9.0.13", "@types/jest": "^30.0.0", "@types/lodash": "^4.14.197", - "@types/node": "^18.16.19", + "@types/node": "^20.19.37", "@types/prompts": "^2.4.4", "@types/react": "^19.2.10", "@types/semver": "^7.5.0", diff --git a/yarn.lock b/yarn.lock index 5c300618884b..c39ff43d5bc5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4587,12 +4587,12 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== -"@types/node@^18.16.19": - version "18.19.59" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.59.tgz#2de1b95b0b468089b616b2feb809755d70a74949" - integrity sha512-vizm2EqwV/7Zay+A6J3tGl9Lhr7CjZe2HmWS988sefiEmsyP9CeXEleho6i4hJk/8UtZAo0bWN4QPZZr83RxvQ== +"@types/node@^20.19.37": + version "20.19.37" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.37.tgz#b4fb4033408dd97becce63ec932c9ec57a9e2919" + integrity sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw== dependencies: - undici-types "~5.26.4" + undici-types "~6.21.0" "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -4826,6 +4826,11 @@ tapable "^2.2.0" webpack "^5" +"@types/webpack-env@^1.18.8": + version "1.18.8" + resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.18.8.tgz#71f083718c094204d7b64443701d32f1db3989e3" + integrity sha512-G9eAoJRMLjcvN4I08wB5I7YofOb/kaJNd5uoCMX+LbKXTPCF+ZIHuqTnFaK9Jz1rgs035f9JUPUhNFtqgucy/A== + "@types/webpack-sources@*": version "3.2.3" resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-3.2.3.tgz#b667bd13e9fa15a9c26603dce502c7985418c3d8" @@ -17901,16 +17906,16 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - undici-types@~6.19.2: version "6.19.8" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz#cb3173fe47ca743e228216e4a3ddc4c84d628cc2" From e35877edb8c06d67c448eb59e922f7b85a8a35c0 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 12:34:13 +0100 Subject: [PATCH 11/27] various fixes and cleanups --- packages/docusaurus-logger/src/perfLogger.ts | 4 +++- packages/docusaurus-logger/tsconfig.json | 1 - packages/docusaurus/package.json | 1 + packages/docusaurus/src/client/clientEntry.tsx | 6 ------ packages/docusaurus/src/client/docusaurus.ts | 3 +-- packages/docusaurus/src/client/exports/ComponentCreator.tsx | 6 ------ packages/docusaurus/tsconfig.client.json | 4 ++-- 7 files changed, 7 insertions(+), 18 deletions(-) diff --git a/packages/docusaurus-logger/src/perfLogger.ts b/packages/docusaurus-logger/src/perfLogger.ts index 2bc94b7730e0..aa6d31b1cb01 100644 --- a/packages/docusaurus-logger/src/perfLogger.ts +++ b/packages/docusaurus-logger/src/perfLogger.ts @@ -4,7 +4,9 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import {AsyncLocalStorage} from 'async_hooks'; + +import {AsyncLocalStorage} from 'node:async_hooks'; +// import {type PerformanceMark} from 'node:perf_hooks'; import logger from './logger'; // For now this is a private env variable we use internally diff --git a/packages/docusaurus-logger/tsconfig.json b/packages/docusaurus-logger/tsconfig.json index 225604d6366c..7ab48c54dfb5 100644 --- a/packages/docusaurus-logger/tsconfig.json +++ b/packages/docusaurus-logger/tsconfig.json @@ -4,7 +4,6 @@ "noEmit": false, "sourceMap": true, "declarationMap": true, - "types": ["node"], "lib": ["DOM"] }, "include": ["src"], diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 4d683ccc7b7c..2f348c658485 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -86,6 +86,7 @@ "@types/serve-handler": "^6.1.4", "@types/update-notifier": "^6.0.4", "@types/webpack-bundle-analyzer": "^4.7.0", + "@types/webpack-env": "^1.18.8", "tmp-promise": "^3.0.3", "tree-node-cli": "^1.6.0" }, diff --git a/packages/docusaurus/src/client/clientEntry.tsx b/packages/docusaurus/src/client/clientEntry.tsx index eb2f67368a20..db521bb39f50 100644 --- a/packages/docusaurus/src/client/clientEntry.tsx +++ b/packages/docusaurus/src/client/clientEntry.tsx @@ -23,12 +23,6 @@ function Router({children}: {children: ReactNode}): ReactNode { ); } -declare global { - interface NodeModule { - hot?: {accept: () => void}; - } -} - const hydrate = Boolean(process.env.HYDRATE_CLIENT_ENTRY); // Client-side render (e.g: running in browser) to become single-page diff --git a/packages/docusaurus/src/client/docusaurus.ts b/packages/docusaurus/src/client/docusaurus.ts index 79bb4e21c779..24dff371728b 100644 --- a/packages/docusaurus/src/client/docusaurus.ts +++ b/packages/docusaurus/src/client/docusaurus.ts @@ -16,8 +16,7 @@ const fetched = new Set(); const loaded = new Set(); declare global { - // eslint-disable-next-line camelcase, no-underscore-dangle - const __webpack_require__: {gca: (name: string) => string}; + // See https://github.com/microsoft/TypeScript/issues/56962 interface Navigator { connection?: {effectiveType: string; saveData: boolean}; } diff --git a/packages/docusaurus/src/client/exports/ComponentCreator.tsx b/packages/docusaurus/src/client/exports/ComponentCreator.tsx index 48d6640385b7..b5e70812b594 100644 --- a/packages/docusaurus/src/client/exports/ComponentCreator.tsx +++ b/packages/docusaurus/src/client/exports/ComponentCreator.tsx @@ -14,12 +14,6 @@ import flat from '../flat'; import {RouteContextProvider} from '../routeContext'; import type {RouteContext} from '@docusaurus/types'; -declare global { - interface NodeRequire { - resolveWeak: (name: string) => number; - } -} - export default function ComponentCreator( path: string, hash: string, diff --git a/packages/docusaurus/tsconfig.client.json b/packages/docusaurus/tsconfig.client.json index 6d70cba8c528..50df52749abd 100644 --- a/packages/docusaurus/tsconfig.client.json +++ b/packages/docusaurus/tsconfig.client.json @@ -3,7 +3,7 @@ "include": ["src/client", "src/*.d.ts"], "exclude": ["**/__tests__/**"], "compilerOptions": { - "types": ["node"], - "lib": ["DOM"] + "types": ["node", "webpack-env"], + "lib": ["DOM", "ESNext"] } } From 88d73ed0be1cddc53022ebf0a22af655287b74fb Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 12:34:55 +0100 Subject: [PATCH 12/27] cleanup --- packages/docusaurus-logger/src/perfLogger.ts | 2 +- packages/docusaurus-logger/tsconfig.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-logger/src/perfLogger.ts b/packages/docusaurus-logger/src/perfLogger.ts index aa6d31b1cb01..e5e5823afc70 100644 --- a/packages/docusaurus-logger/src/perfLogger.ts +++ b/packages/docusaurus-logger/src/perfLogger.ts @@ -6,7 +6,7 @@ */ import {AsyncLocalStorage} from 'node:async_hooks'; -// import {type PerformanceMark} from 'node:perf_hooks'; +import {type PerformanceMark} from 'node:perf_hooks'; import logger from './logger'; // For now this is a private env variable we use internally diff --git a/packages/docusaurus-logger/tsconfig.json b/packages/docusaurus-logger/tsconfig.json index 7ab48c54dfb5..74731e2257e1 100644 --- a/packages/docusaurus-logger/tsconfig.json +++ b/packages/docusaurus-logger/tsconfig.json @@ -3,8 +3,7 @@ "compilerOptions": { "noEmit": false, "sourceMap": true, - "declarationMap": true, - "lib": ["DOM"] + "declarationMap": true }, "include": ["src"], "exclude": ["**/__tests__/**"] From a2ac2734826891e33d5b8942561bb9919f8569e3 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 12:37:34 +0100 Subject: [PATCH 13/27] cleanup --- .../docusaurus-plugin-google-analytics/tsconfig.client.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/docusaurus-plugin-google-analytics/tsconfig.client.json b/packages/docusaurus-plugin-google-analytics/tsconfig.client.json index 69f45d9ad97f..830d13ddd749 100644 --- a/packages/docusaurus-plugin-google-analytics/tsconfig.client.json +++ b/packages/docusaurus-plugin-google-analytics/tsconfig.client.json @@ -1,8 +1,5 @@ { "extends": "../../tsconfig.base.client.json", - "compilerOptions": { - "lib": ["DOM"] - }, "include": ["src/analytics.ts", "src/*.d.ts"], "exclude": ["**/__tests__/**"] } From 4d5c71561b04393f196e2c1f42d2f27541180e41 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 12:40:53 +0100 Subject: [PATCH 14/27] cleanup --- packages/create-docusaurus/tsconfig.json | 3 +-- packages/docusaurus-plugin-pwa/tsconfig.worker.json | 3 +-- packages/docusaurus/tsconfig.client.json | 3 +-- packages/docusaurus/tsconfig.json | 3 +-- packages/docusaurus/tsconfig.server.json | 3 +-- packages/eslint-plugin/tsconfig.json | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/packages/create-docusaurus/tsconfig.json b/packages/create-docusaurus/tsconfig.json index b3f7ccc7f2e9..3c6fedcdde03 100644 --- a/packages/create-docusaurus/tsconfig.json +++ b/packages/create-docusaurus/tsconfig.json @@ -3,8 +3,7 @@ "references": [{"path": "./tsconfig.build.json"}], "compilerOptions": { "noEmit": true, - "rootDir": ".", - "types": ["node"] + "rootDir": "." }, "include": ["package.json", "bin"], "exclude": ["**/__tests__/**"] diff --git a/packages/docusaurus-plugin-pwa/tsconfig.worker.json b/packages/docusaurus-plugin-pwa/tsconfig.worker.json index d649d9cfe6d7..7270da1d425e 100644 --- a/packages/docusaurus-plugin-pwa/tsconfig.worker.json +++ b/packages/docusaurus-plugin-pwa/tsconfig.worker.json @@ -6,8 +6,7 @@ "tsBuildInfoFile": "lib/.tsbuildinfo-worker", "moduleResolution": "bundler", "module": "esnext", - "target": "esnext", - "types": ["node"] + "target": "esnext" }, "include": ["src/sw.ts"], "exclude": ["**/__tests__/**"] diff --git a/packages/docusaurus/tsconfig.client.json b/packages/docusaurus/tsconfig.client.json index 50df52749abd..e9f8e88e5fd9 100644 --- a/packages/docusaurus/tsconfig.client.json +++ b/packages/docusaurus/tsconfig.client.json @@ -3,7 +3,6 @@ "include": ["src/client", "src/*.d.ts"], "exclude": ["**/__tests__/**"], "compilerOptions": { - "types": ["node", "webpack-env"], - "lib": ["DOM", "ESNext"] + "types": ["node", "webpack-env"] } } diff --git a/packages/docusaurus/tsconfig.json b/packages/docusaurus/tsconfig.json index ce38541f5d90..d12d12269341 100644 --- a/packages/docusaurus/tsconfig.json +++ b/packages/docusaurus/tsconfig.json @@ -7,8 +7,7 @@ "compilerOptions": { "noEmit": true, "checkJs": true, - "rootDir": ".", - "types": ["node"] + "rootDir": "." }, "include": ["package.json", "bin"], "exclude": ["**/__tests__/**"] diff --git a/packages/docusaurus/tsconfig.server.json b/packages/docusaurus/tsconfig.server.json index 61d1b6e6384f..71c111ccbd72 100644 --- a/packages/docusaurus/tsconfig.server.json +++ b/packages/docusaurus/tsconfig.server.json @@ -2,8 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "noEmit": false, - "tsBuildInfoFile": "${configDir}/lib/.tsbuildinfo-server", - "types": ["node"] + "tsBuildInfoFile": "${configDir}/lib/.tsbuildinfo-server" }, "include": ["src"], "exclude": ["src/client", "**/__tests__/**"] diff --git a/packages/eslint-plugin/tsconfig.json b/packages/eslint-plugin/tsconfig.json index 9e9fd58fbb8c..343f87c70bdc 100644 --- a/packages/eslint-plugin/tsconfig.json +++ b/packages/eslint-plugin/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "noEmit": false, - "types": ["node"] + "noEmit": false }, "include": ["src"], "exclude": ["**/__tests__/**"] From 7ddfdfbef2281975ba41950d703cef607dd7bf2d Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 12:46:57 +0100 Subject: [PATCH 15/27] cleanup --- packages/docusaurus/tsconfig.client.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus/tsconfig.client.json b/packages/docusaurus/tsconfig.client.json index e9f8e88e5fd9..789769fad496 100644 --- a/packages/docusaurus/tsconfig.client.json +++ b/packages/docusaurus/tsconfig.client.json @@ -3,6 +3,11 @@ "include": ["src/client", "src/*.d.ts"], "exclude": ["**/__tests__/**"], "compilerOptions": { - "types": ["node", "webpack-env"] + "types": [ + // TODO "node" shouldn't be there + // need to extract serverEntry / renderToHtml in separate dir + "node", + "webpack-env" + ] } } From 374cbadc9c22af7b276721c5bc1b7d915500d300 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 12:52:50 +0100 Subject: [PATCH 16/27] restore baseUrl in site config for now --- website/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/website/tsconfig.json b/website/tsconfig.json index 7d22f7c2caa3..caea2e3443e5 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -3,6 +3,7 @@ "extends": "@docusaurus/tsconfig", "compilerOptions": { "lib": ["DOM", "ESNext"], + "baseUrl": ".", "resolveJsonModule": true, "allowArbitraryExtensions": true, From 868c18afc42f9c216842b0373445ff75bb99ad13 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 12:58:24 +0100 Subject: [PATCH 17/27] restore baseUrl "." to our init template :s otherwise we can't resolve @site aliases --- .../create-docusaurus/templates/classic-typescript/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/create-docusaurus/templates/classic-typescript/tsconfig.json b/packages/create-docusaurus/templates/classic-typescript/tsconfig.json index dffe73166def..aceae0dd36e4 100644 --- a/packages/create-docusaurus/templates/classic-typescript/tsconfig.json +++ b/packages/create-docusaurus/templates/classic-typescript/tsconfig.json @@ -4,6 +4,7 @@ { "extends": "@docusaurus/tsconfig", "compilerOptions": { + "baseUrl": ".", "strict": true }, "exclude": [".docusaurus", "build"] From c5dabe9cb9ee3f683e7504879837fcd7f44ef9b2 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 13:06:56 +0100 Subject: [PATCH 18/27] remove comment --- packages/docusaurus/tsconfig.client.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/docusaurus/tsconfig.client.json b/packages/docusaurus/tsconfig.client.json index 789769fad496..e9f8e88e5fd9 100644 --- a/packages/docusaurus/tsconfig.client.json +++ b/packages/docusaurus/tsconfig.client.json @@ -3,11 +3,6 @@ "include": ["src/client", "src/*.d.ts"], "exclude": ["**/__tests__/**"], "compilerOptions": { - "types": [ - // TODO "node" shouldn't be there - // need to extract serverEntry / renderToHtml in separate dir - "node", - "webpack-env" - ] + "types": ["node", "webpack-env"] } } From eb631ee8732b9cb8555440f8690c0af0bb03cea2 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 13:22:10 +0100 Subject: [PATCH 19/27] move ignoreDeprecations 6.0 from base config to ts template config --- .../create-docusaurus/templates/classic-typescript/tsconfig.json | 1 + packages/docusaurus-tsconfig/tsconfig.json | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-docusaurus/templates/classic-typescript/tsconfig.json b/packages/create-docusaurus/templates/classic-typescript/tsconfig.json index aceae0dd36e4..405d777064cb 100644 --- a/packages/create-docusaurus/templates/classic-typescript/tsconfig.json +++ b/packages/create-docusaurus/templates/classic-typescript/tsconfig.json @@ -5,6 +5,7 @@ "extends": "@docusaurus/tsconfig", "compilerOptions": { "baseUrl": ".", + "ignoreDeprecations": "6.0", "strict": true }, "exclude": [".docusaurus", "build"] diff --git a/packages/docusaurus-tsconfig/tsconfig.json b/packages/docusaurus-tsconfig/tsconfig.json index 802618e7e2d1..b89e41d756c2 100644 --- a/packages/docusaurus-tsconfig/tsconfig.json +++ b/packages/docusaurus-tsconfig/tsconfig.json @@ -12,7 +12,6 @@ "module": "esnext", "noEmit": true, "baseUrl": ".", - "ignoreDeprecations": "6.0", "paths": { "@site/*": ["./*"] }, From 0e7014a661fba04f460c7e48b378967e631d3571 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 13:44:48 +0100 Subject: [PATCH 20/27] fix ignoreDeprecations usage --- .github/workflows/tests-e2e.yml | 10 ++++++++++ .github/workflows/tests-windows.yml | 17 +++++++++++------ .github/workflows/tests.yml | 8 ++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 1ae61a878c01..af0613544d8a 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -158,18 +158,28 @@ jobs: working-directory: ../test-website env: E2E_TEST: true + - name: TypeCheck website # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' working-directory: ../test-website run: yarn typecheck + - name: TypeCheck website - min version - v5.1 # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' working-directory: ../test-website run: | yarn add typescript@5.1.6 --exact + + # Downgrade TS ignoreDeprecations option + jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + yarn typecheck + + # Restore TS ignoreDeprecations option + jq '.compilerOptions.ignoreDeprecations = "6.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + - name: TypeCheck website - max version - Latest # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index 69d7a8b7f523..8b81dfc4db46 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -61,18 +61,23 @@ jobs: - name: TypeCheck website # see https://github.com/facebook/docusaurus/pull/10486 run: yarn workspace website typecheck + + - name: TypeCheck website - max version - Latest + # For latest TS there are often lib check errors, so we disable it + # Details: https://github.com/facebook/docusaurus/pull/10486 + run: | + yarn add typescript@latest --exact -D -W --ignore-scripts + yarn workspace website typecheck --project tsconfig.skipLibCheck.json + - name: TypeCheck website - min version - v5.1 run: | yarn add typescript@5.1.6 --exact -D -W --ignore-scripts + # Downgrade TS ignoreDeprecations option + jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -Force tsconfig.json.tmp tsconfig.json + # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -Force package.json.tmp package.json yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts yarn workspace website typecheck - - name: TypeCheck website - max version - Latest - # For latest TS there are often lib check errors, so we disable it - # Details: https://github.com/facebook/docusaurus/pull/10486 - run: | - yarn add typescript@latest --exact -D -W --ignore-scripts - yarn workspace website typecheck --project tsconfig.skipLibCheck.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 816fcee7b2b2..ef108b338315 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,15 +58,23 @@ jobs: - name: TypeCheck website # see https://github.com/facebook/docusaurus/pull/10486 run: yarn workspace website typecheck + - name: TypeCheck website - min version - v5.1 run: | yarn add typescript@5.1.6 --exact -D -W --ignore-scripts + # Downgrade TS ignoreDeprecations option + jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -f package.json.tmp package.json yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts yarn workspace website typecheck + + # Restore TS ignoreDeprecations option + jq '.compilerOptions.ignoreDeprecations = "6.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + - name: TypeCheck website - max version - Latest # For latest TS there are often lib check errors, so we disable it # Details: https://github.com/facebook/docusaurus/pull/10486 From e41beffc4b330d3e9cd29d8241211dd3658ced8b Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 13:55:48 +0100 Subject: [PATCH 21/27] Revert "fix ignoreDeprecations usage" This reverts commit 0e7014a661fba04f460c7e48b378967e631d3571. --- .github/workflows/tests-e2e.yml | 10 ---------- .github/workflows/tests-windows.yml | 17 ++++++----------- .github/workflows/tests.yml | 8 -------- 3 files changed, 6 insertions(+), 29 deletions(-) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index af0613544d8a..1ae61a878c01 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -158,28 +158,18 @@ jobs: working-directory: ../test-website env: E2E_TEST: true - - name: TypeCheck website # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' working-directory: ../test-website run: yarn typecheck - - name: TypeCheck website - min version - v5.1 # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' working-directory: ../test-website run: | yarn add typescript@5.1.6 --exact - - # Downgrade TS ignoreDeprecations option - jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json - yarn typecheck - - # Restore TS ignoreDeprecations option - jq '.compilerOptions.ignoreDeprecations = "6.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json - - name: TypeCheck website - max version - Latest # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index 8b81dfc4db46..69d7a8b7f523 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -61,23 +61,18 @@ jobs: - name: TypeCheck website # see https://github.com/facebook/docusaurus/pull/10486 run: yarn workspace website typecheck - - - name: TypeCheck website - max version - Latest - # For latest TS there are often lib check errors, so we disable it - # Details: https://github.com/facebook/docusaurus/pull/10486 - run: | - yarn add typescript@latest --exact -D -W --ignore-scripts - yarn workspace website typecheck --project tsconfig.skipLibCheck.json - - name: TypeCheck website - min version - v5.1 run: | yarn add typescript@5.1.6 --exact -D -W --ignore-scripts - # Downgrade TS ignoreDeprecations option - jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -Force tsconfig.json.tmp tsconfig.json - # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -Force package.json.tmp package.json yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts yarn workspace website typecheck + - name: TypeCheck website - max version - Latest + # For latest TS there are often lib check errors, so we disable it + # Details: https://github.com/facebook/docusaurus/pull/10486 + run: | + yarn add typescript@latest --exact -D -W --ignore-scripts + yarn workspace website typecheck --project tsconfig.skipLibCheck.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ef108b338315..816fcee7b2b2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,23 +58,15 @@ jobs: - name: TypeCheck website # see https://github.com/facebook/docusaurus/pull/10486 run: yarn workspace website typecheck - - name: TypeCheck website - min version - v5.1 run: | yarn add typescript@5.1.6 --exact -D -W --ignore-scripts - # Downgrade TS ignoreDeprecations option - jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json - # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -f package.json.tmp package.json yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts yarn workspace website typecheck - - # Restore TS ignoreDeprecations option - jq '.compilerOptions.ignoreDeprecations = "6.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json - - name: TypeCheck website - max version - Latest # For latest TS there are often lib check errors, so we disable it # Details: https://github.com/facebook/docusaurus/pull/10486 From a90567aca16c3bb12fa9ad97c4a091efeb79aeab Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 14:14:41 +0100 Subject: [PATCH 22/27] Reapply "fix ignoreDeprecations usage" This reverts commit e41beffc4b330d3e9cd29d8241211dd3658ced8b. --- .github/workflows/tests-e2e.yml | 10 ++++++++++ .github/workflows/tests-windows.yml | 17 +++++++++++------ .github/workflows/tests.yml | 8 ++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 1ae61a878c01..af0613544d8a 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -158,18 +158,28 @@ jobs: working-directory: ../test-website env: E2E_TEST: true + - name: TypeCheck website # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' working-directory: ../test-website run: yarn typecheck + - name: TypeCheck website - min version - v5.1 # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' working-directory: ../test-website run: | yarn add typescript@5.1.6 --exact + + # Downgrade TS ignoreDeprecations option + jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + yarn typecheck + + # Restore TS ignoreDeprecations option + jq '.compilerOptions.ignoreDeprecations = "6.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + - name: TypeCheck website - max version - Latest # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index 69d7a8b7f523..8b81dfc4db46 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -61,18 +61,23 @@ jobs: - name: TypeCheck website # see https://github.com/facebook/docusaurus/pull/10486 run: yarn workspace website typecheck + + - name: TypeCheck website - max version - Latest + # For latest TS there are often lib check errors, so we disable it + # Details: https://github.com/facebook/docusaurus/pull/10486 + run: | + yarn add typescript@latest --exact -D -W --ignore-scripts + yarn workspace website typecheck --project tsconfig.skipLibCheck.json + - name: TypeCheck website - min version - v5.1 run: | yarn add typescript@5.1.6 --exact -D -W --ignore-scripts + # Downgrade TS ignoreDeprecations option + jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -Force tsconfig.json.tmp tsconfig.json + # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -Force package.json.tmp package.json yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts yarn workspace website typecheck - - name: TypeCheck website - max version - Latest - # For latest TS there are often lib check errors, so we disable it - # Details: https://github.com/facebook/docusaurus/pull/10486 - run: | - yarn add typescript@latest --exact -D -W --ignore-scripts - yarn workspace website typecheck --project tsconfig.skipLibCheck.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 816fcee7b2b2..ef108b338315 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,15 +58,23 @@ jobs: - name: TypeCheck website # see https://github.com/facebook/docusaurus/pull/10486 run: yarn workspace website typecheck + - name: TypeCheck website - min version - v5.1 run: | yarn add typescript@5.1.6 --exact -D -W --ignore-scripts + # Downgrade TS ignoreDeprecations option + jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -f package.json.tmp package.json yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts yarn workspace website typecheck + + # Restore TS ignoreDeprecations option + jq '.compilerOptions.ignoreDeprecations = "6.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + - name: TypeCheck website - max version - Latest # For latest TS there are often lib check errors, so we disable it # Details: https://github.com/facebook/docusaurus/pull/10486 From 3cc7daf744235aa30b96bb8d6a7d2eba26e685af Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 14:15:41 +0100 Subject: [PATCH 23/27] fix ignoreDeprecations usage --- website/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/website/tsconfig.json b/website/tsconfig.json index caea2e3443e5..22c38a19eb6c 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -4,6 +4,7 @@ "compilerOptions": { "lib": ["DOM", "ESNext"], "baseUrl": ".", + "ignoreDeprecations": "6.0", "resolveJsonModule": true, "allowArbitraryExtensions": true, From b19e9588a620e407f7423d09bdb3cd4d537a8f12 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 14:33:58 +0100 Subject: [PATCH 24/27] CI fix --- .github/workflows/tests-e2e.yml | 4 ++-- .github/workflows/tests-windows.yml | 2 +- .github/workflows/tests.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index af0613544d8a..dbd9012baf5c 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -173,12 +173,12 @@ jobs: yarn add typescript@5.1.6 --exact # Downgrade TS ignoreDeprecations option - jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + node -e "const fs = require('fs'); const f = 'tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"6.0\"', '\"ignoreDeprecations\": \"5.0\"'))" yarn typecheck # Restore TS ignoreDeprecations option - jq '.compilerOptions.ignoreDeprecations = "6.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + node -e "const fs = require('fs'); const f = 'tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"5.0\"', '\"ignoreDeprecations\": \"6.0\"'))" - name: TypeCheck website - max version - Latest # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index 8b81dfc4db46..9ed750585c77 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -74,7 +74,7 @@ jobs: yarn add typescript@5.1.6 --exact -D -W --ignore-scripts # Downgrade TS ignoreDeprecations option - jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -Force tsconfig.json.tmp tsconfig.json + node -e "const fs = require('fs'); const f = 'tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"6.0\"', '\"ignoreDeprecations\": \"5.0\"'))" # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -Force package.json.tmp package.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ef108b338315..585c206af19f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -64,7 +64,7 @@ jobs: yarn add typescript@5.1.6 --exact -D -W --ignore-scripts # Downgrade TS ignoreDeprecations option - jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + node -e "const fs = require('fs'); const f = 'tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"6.0\"', '\"ignoreDeprecations\": \"5.0\"'))" # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -f package.json.tmp package.json @@ -73,7 +73,7 @@ jobs: yarn workspace website typecheck # Restore TS ignoreDeprecations option - jq '.compilerOptions.ignoreDeprecations = "6.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json + node -e "const fs = require('fs'); const f = 'tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"5.0\"', '\"ignoreDeprecations\": \"6.0\"'))" - name: TypeCheck website - max version - Latest # For latest TS there are often lib check errors, so we disable it From 9667bd84a01abd423527b35322b589f898ccc9da Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 14:42:36 +0100 Subject: [PATCH 25/27] CI fix --- .github/workflows/tests-windows.yml | 2 +- .github/workflows/tests.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index 9ed750585c77..fb0ae5da29f3 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -74,7 +74,7 @@ jobs: yarn add typescript@5.1.6 --exact -D -W --ignore-scripts # Downgrade TS ignoreDeprecations option - node -e "const fs = require('fs'); const f = 'tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"6.0\"', '\"ignoreDeprecations\": \"5.0\"'))" + node -e "const fs = require('fs'); const f = 'website/tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"6.0\"', '\"ignoreDeprecations\": \"5.0\"'))" # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -Force package.json.tmp package.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 585c206af19f..05e3f3c173f9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -64,7 +64,7 @@ jobs: yarn add typescript@5.1.6 --exact -D -W --ignore-scripts # Downgrade TS ignoreDeprecations option - node -e "const fs = require('fs'); const f = 'tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"6.0\"', '\"ignoreDeprecations\": \"5.0\"'))" + node -e "const fs = require('fs'); const f = 'website/tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"6.0\"', '\"ignoreDeprecations\": \"5.0\"'))" # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -f package.json.tmp package.json @@ -73,7 +73,7 @@ jobs: yarn workspace website typecheck # Restore TS ignoreDeprecations option - node -e "const fs = require('fs'); const f = 'tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"5.0\"', '\"ignoreDeprecations\": \"6.0\"'))" + node -e "const fs = require('fs'); const f = 'website/tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"5.0\"', '\"ignoreDeprecations\": \"6.0\"'))" - name: TypeCheck website - max version - Latest # For latest TS there are often lib check errors, so we disable it From 5826366a66179c04856638baf843cf6763b02ada Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 15:05:42 +0100 Subject: [PATCH 26/27] CI fix --- .github/workflows/tests-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index fb0ae5da29f3..fcf2923be816 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -74,7 +74,7 @@ jobs: yarn add typescript@5.1.6 --exact -D -W --ignore-scripts # Downgrade TS ignoreDeprecations option - node -e "const fs = require('fs'); const f = 'website/tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"6.0\"', '\"ignoreDeprecations\": \"5.0\"'))" + node -e "const fs = require('fs'); const f = 'website/tsconfig.json'; const s = fs.readFileSync(f, 'utf8'); fs.writeFileSync(f, s.replace(/\"ignoreDeprecations\"\s*:\s*\"6\.0\"/, '\"ignoreDeprecations\": \"5.0\"'));" # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -Force package.json.tmp package.json From b2d7c3080a39b212b0775cf14403fd7b0abec7df Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Mar 2026 15:20:53 +0100 Subject: [PATCH 27/27] CI fix --- .github/workflows/tests-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index fcf2923be816..e766abd9cb78 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -74,7 +74,7 @@ jobs: yarn add typescript@5.1.6 --exact -D -W --ignore-scripts # Downgrade TS ignoreDeprecations option - node -e "const fs = require('fs'); const f = 'website/tsconfig.json'; const s = fs.readFileSync(f, 'utf8'); fs.writeFileSync(f, s.replace(/\"ignoreDeprecations\"\s*:\s*\"6\.0\"/, '\"ignoreDeprecations\": \"5.0\"'));" + node -e 'const fs = require("fs"); const f = "website/tsconfig.json"; fs.writeFileSync(f, fs.readFileSync(f, "utf8").replace(/"ignoreDeprecations"\s*:\s*"6\.0"/, "\"ignoreDeprecations\": \"5.0\""));' # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -Force package.json.tmp package.json