diff --git a/.github/workflows/argos.yml b/.github/workflows/argos.yml index 276d7f25eabf..727cebcc4fa9 100644 --- a/.github/workflows/argos.yml +++ b/.github/workflows/argos.yml @@ -32,7 +32,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: 18 + node-version: 20 - name: Install dependencies run: yarn install --frozen-lockfile diff --git a/.github/workflows/build-blog-only.yml b/.github/workflows/build-blog-only.yml index 8749510fbbe3..2fdc977cba4d 100644 --- a/.github/workflows/build-blog-only.yml +++ b/.github/workflows/build-blog-only.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '18' + node-version: 20 cache: yarn - name: Installation run: yarn diff --git a/.github/workflows/build-perf.yml b/.github/workflows/build-perf.yml index 96464b28b7fd..533a4ade0015 100644 --- a/.github/workflows/build-perf.yml +++ b/.github/workflows/build-perf.yml @@ -40,7 +40,7 @@ jobs: - name: Set up Node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '18' + node-version: 20 cache: yarn - name: Track build size changes uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c # v2 diff --git a/.github/workflows/canary-release.yml b/.github/workflows/canary-release.yml index f8be24fdfd8b..10290cc51e9f 100644 --- a/.github/workflows/canary-release.yml +++ b/.github/workflows/canary-release.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '18' + node-version: 20 cache: yarn - name: Prepare git run: | diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml index 35d35356f08c..7d6a7cd2c836 100644 --- a/.github/workflows/lighthouse-report.yml +++ b/.github/workflows/lighthouse-report.yml @@ -26,7 +26,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: 18 + node-version: 20 - name: Install dependencies run: yarn install --frozen-lockfile diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 82f5b3fee190..195ea6aab4f5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '18' + node-version: 20 cache: yarn - name: Installation run: yarn diff --git a/.github/workflows/showcase-test.yml b/.github/workflows/showcase-test.yml index ceedc91bdcf8..1720cdf67641 100644 --- a/.github/workflows/showcase-test.yml +++ b/.github/workflows/showcase-test.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '20' + node-version: 20 cache: yarn - name: Installation run: yarn diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index b98cb3270ba6..f15227fbf54f 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ['18.0', '18', '20'] + node: ['18.0', '20', '22'] steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -76,10 +76,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Use Node.js 18 + - name: Use Node.js LTS uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '18' + node-version: lts/* cache: yarn - name: Installation run: yarn @@ -146,10 +146,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Use Node.js 18 + - name: Use Node.js LTS uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '18' + node-version: lts/* cache: yarn - name: Installation run: yarn @@ -176,10 +176,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Use Node.js 18 + - name: Use Node.js LTS uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '18' + node-version: lts/* cache: yarn - name: Installation run: yarn diff --git a/.github/workflows/tests-swizzle.yml b/.github/workflows/tests-swizzle.yml index 7fd0a85dbf5e..493c970228e3 100644 --- a/.github/workflows/tests-swizzle.yml +++ b/.github/workflows/tests-swizzle.yml @@ -27,10 +27,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Set up Node + - name: Set up Node LTS uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '18' + node-version: lts/* cache: yarn - name: Installation run: yarn diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index c280e4fd9608..eea285ad6be9 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -11,6 +11,7 @@ on: - jest.config.mjs - packages/** - tsconfig.*.json + - .github/workflows/tests-windows.yml concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -26,7 +27,7 @@ jobs: runs-on: windows-latest strategy: matrix: - node: ['18.0', '18', '20'] + node: ['18.0', '20', '22'] steps: - name: Support longpaths run: git config --system core.longpaths true @@ -57,9 +58,9 @@ jobs: run: yarn workspace website typecheck - name: TypeCheck website - min version - v5.1 run: | - yarn workspace website add typescript@5.1.6 --exact + yarn add typescript@5.1.6 --exact -D -W yarn workspace website typecheck - name: TypeCheck website - max version - Latest run: | - yarn workspace website add typescript@latest --exact + yarn add typescript@latest --exact -D -W yarn workspace website typecheck diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ae170e8b25d7..42ae9276a24e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,7 @@ on: - jest.config.mjs - packages/** - tsconfig.*.json + - .github/workflows/tests.yml concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -26,7 +27,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ['18.0', '18', '20'] + node: ['18.0', '20', '22'] steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -48,9 +49,9 @@ jobs: run: yarn workspace website typecheck - name: TypeCheck website - min version - v5.1 run: | - yarn workspace website add typescript@5.1.6 --exact + yarn add typescript@5.1.6 --exact -D -W yarn workspace website typecheck - name: TypeCheck website - max version - Latest run: | - yarn workspace website add typescript@latest --exact + yarn add typescript@latest --exact -D -W yarn workspace website typecheck diff --git a/package.json b/package.json index c9abfeb1997c..848d2fe562ae 100644 --- a/package.json +++ b/package.json @@ -115,6 +115,6 @@ "stylelint": "^14.16.1", "stylelint-config-prettier": "^9.0.5", "stylelint-config-standard": "^29.0.0", - "typescript": "~5.4.5" + "typescript": "~5.5.2" } } diff --git a/packages/create-docusaurus/templates/classic-typescript/package.json b/packages/create-docusaurus/templates/classic-typescript/package.json index a6a6fde33f30..0988d3690ecf 100644 --- a/packages/create-docusaurus/templates/classic-typescript/package.json +++ b/packages/create-docusaurus/templates/classic-typescript/package.json @@ -27,7 +27,7 @@ "@docusaurus/module-type-aliases": "3.4.0", "@docusaurus/tsconfig": "3.4.0", "@docusaurus/types": "3.4.0", - "typescript": "~5.2.2" + "typescript": "~5.5.2" }, "browserslist": { "production": [ diff --git a/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx b/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx index 2f95bb284285..eea0a71187d1 100644 --- a/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx +++ b/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx @@ -221,6 +221,8 @@ function SearchPageContent(): JSX.Element { const algoliaClient = algoliaSearch(appId, apiKey); const algoliaHelper = algoliaSearchHelper(algoliaClient, indexName, { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore: why errors happens after upgrading to TS 5.5 ? hitsPerPage: 15, advancedSyntax: true, disjunctiveFacets, diff --git a/yarn.lock b/yarn.lock index d8f095addb55..1dea0ad4c8ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16080,15 +16080,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== -typescript@~5.2.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.4.5: - version "5.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" - integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== +typescript@~5.5.2: + version "5.5.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.2.tgz#c26f023cb0054e657ce04f72583ea2d85f8d0507" + integrity sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew== uglify-js@^3.1.4: version "3.17.4"