mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
test(e2e): TypeCheck website/starter in min/max range of TS versions (#10063)
This commit is contained in:
parent
eb07e9d6d4
commit
e736dcb879
11 changed files with 58 additions and 24 deletions
20
.github/workflows/tests-e2e.yml
vendored
20
.github/workflows/tests-e2e.yml
vendored
|
@ -114,11 +114,27 @@ jobs:
|
||||||
working-directory: ../test-website
|
working-directory: ../test-website
|
||||||
env:
|
env:
|
||||||
E2E_TEST: true
|
E2E_TEST: true
|
||||||
- name: Type check
|
|
||||||
|
- name: TypeCheck website
|
||||||
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
|
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
|
||||||
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'
|
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'
|
||||||
run: yarn typecheck
|
|
||||||
working-directory: ../test-website
|
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
|
||||||
|
yarn typecheck
|
||||||
|
- 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'
|
||||||
|
working-directory: ../test-website
|
||||||
|
run: |
|
||||||
|
yarn add typescript@latest --exact
|
||||||
|
yarn typecheck
|
||||||
|
|
||||||
- name: Build test-website project
|
- name: Build test-website project
|
||||||
run: yarn build
|
run: yarn build
|
||||||
working-directory: ../test-website
|
working-directory: ../test-website
|
||||||
|
|
9
.github/workflows/tests-windows.yml
vendored
9
.github/workflows/tests-windows.yml
vendored
|
@ -52,5 +52,14 @@ jobs:
|
||||||
run: yarn workspace website test:swizzle:wrap:ts
|
run: yarn workspace website test:swizzle:wrap:ts
|
||||||
- name: Docusaurus Build
|
- name: Docusaurus Build
|
||||||
run: yarn build:website:fast
|
run: yarn build:website:fast
|
||||||
|
|
||||||
- name: TypeCheck website
|
- name: TypeCheck website
|
||||||
run: yarn workspace website typecheck
|
run: yarn workspace website typecheck
|
||||||
|
- name: TypeCheck website - min version - v5.1
|
||||||
|
run: |
|
||||||
|
yarn workspace website add typescript@5.1.6 --exact
|
||||||
|
yarn workspace website typecheck
|
||||||
|
- name: TypeCheck website - max version - Latest
|
||||||
|
run: |
|
||||||
|
yarn workspace website add typescript@latest --exact
|
||||||
|
yarn workspace website typecheck
|
||||||
|
|
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
|
@ -39,9 +39,18 @@ jobs:
|
||||||
run: yarn
|
run: yarn
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn test
|
run: yarn test
|
||||||
- name: TypeCheck website
|
|
||||||
run: yarn workspace website typecheck
|
|
||||||
- name: Remove Theme Internal Re-export
|
- name: Remove Theme Internal Re-export
|
||||||
run: yarn workspace @docusaurus/theme-common removeThemeInternalReexport
|
run: yarn workspace @docusaurus/theme-common removeThemeInternalReexport
|
||||||
- name: Docusaurus Build
|
- name: Docusaurus Build
|
||||||
run: yarn build:website:fast
|
run: yarn build:website:fast
|
||||||
|
|
||||||
|
- name: TypeCheck website
|
||||||
|
run: yarn workspace website typecheck
|
||||||
|
- name: TypeCheck website - min version - v5.1
|
||||||
|
run: |
|
||||||
|
yarn workspace website add typescript@5.1.6 --exact
|
||||||
|
yarn workspace website typecheck
|
||||||
|
- name: TypeCheck website - max version - Latest
|
||||||
|
run: |
|
||||||
|
yarn workspace website add typescript@latest --exact
|
||||||
|
yarn workspace website typecheck
|
||||||
|
|
|
@ -36,7 +36,7 @@ Docusaurus v3 now uses the following dependencies:
|
||||||
- Node.js v18.0+
|
- Node.js v18.0+
|
||||||
- React v18.0+
|
- React v18.0+
|
||||||
- MDX v3.0+
|
- MDX v3.0+
|
||||||
- TypeScript v5.0+
|
- TypeScript v5.1+
|
||||||
- prism-react-renderer v2.0+
|
- prism-react-renderer v2.0+
|
||||||
- react-live v4.0+
|
- react-live v4.0+
|
||||||
- remark-emoji v4.0+
|
- remark-emoji v4.0+
|
||||||
|
@ -98,7 +98,7 @@ For TypeScript users:
|
||||||
// upgrade React types to v18.0+
|
// upgrade React types to v18.0+
|
||||||
- "@types/react": "^17.0.69",
|
- "@types/react": "^17.0.69",
|
||||||
+ "@types/react": "^18.2.29",
|
+ "@types/react": "^18.2.29",
|
||||||
// upgrade TypeScript to v5.0+
|
// upgrade TypeScript to v5.1+
|
||||||
- "typescript": "~4.7.4"
|
- "typescript": "~4.7.4"
|
||||||
+ "typescript": "~5.2.2"
|
+ "typescript": "~5.2.2"
|
||||||
}
|
}
|
||||||
|
@ -689,9 +689,9 @@ However, this is a new major library version containing breaking changes, and we
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### TypeScript v5.0+
|
### TypeScript v5.1+
|
||||||
|
|
||||||
Docusaurus v3 now requires **TypeScript >= 5.0**.
|
Docusaurus v3 now requires **TypeScript >= 5.1**.
|
||||||
|
|
||||||
:::info How to upgrade
|
:::info How to upgrade
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ description: Docusaurus is written in TypeScript and provides first-class TypeSc
|
||||||
|
|
||||||
Docusaurus is written in TypeScript and provides first-class TypeScript support.
|
Docusaurus is written in TypeScript and provides first-class TypeScript support.
|
||||||
|
|
||||||
The minimum required version is **TypeScript 5.0**.
|
The minimum required version is **TypeScript 5.1**.
|
||||||
|
|
||||||
## Initialization {#initialization}
|
## Initialization {#initialization}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ Docusaurus v3 now uses the following dependencies:
|
||||||
- Node.js v18.0+
|
- Node.js v18.0+
|
||||||
- React v18.0+
|
- React v18.0+
|
||||||
- MDX v3.0+
|
- MDX v3.0+
|
||||||
- TypeScript v5.0+
|
- TypeScript v5.1+
|
||||||
- prism-react-renderer v2.0+
|
- prism-react-renderer v2.0+
|
||||||
- react-live v4.0+
|
- react-live v4.0+
|
||||||
- remark-emoji v4.0+
|
- remark-emoji v4.0+
|
||||||
|
@ -98,7 +98,7 @@ For TypeScript users:
|
||||||
// upgrade React types to v18.0+
|
// upgrade React types to v18.0+
|
||||||
- "@types/react": "^17.0.69",
|
- "@types/react": "^17.0.69",
|
||||||
+ "@types/react": "^18.2.29",
|
+ "@types/react": "^18.2.29",
|
||||||
// upgrade TypeScript to v5.0+
|
// upgrade TypeScript to v5.1+
|
||||||
- "typescript": "~4.7.4"
|
- "typescript": "~4.7.4"
|
||||||
+ "typescript": "~5.2.2"
|
+ "typescript": "~5.2.2"
|
||||||
}
|
}
|
||||||
|
@ -601,9 +601,9 @@ However, this is a new major library version containing breaking changes, and we
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### TypeScript v5.0+
|
### TypeScript v5.1+
|
||||||
|
|
||||||
Docusaurus v3 now requires **TypeScript >= 5.0**.
|
Docusaurus v3 now requires **TypeScript >= 5.1**.
|
||||||
|
|
||||||
:::info How to upgrade
|
:::info How to upgrade
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ description: Docusaurus is written in TypeScript and provides first-class TypeSc
|
||||||
|
|
||||||
Docusaurus is written in TypeScript and provides first-class TypeScript support.
|
Docusaurus is written in TypeScript and provides first-class TypeScript support.
|
||||||
|
|
||||||
The minimum required version is **TypeScript 5.0**.
|
The minimum required version is **TypeScript 5.1**.
|
||||||
|
|
||||||
## Initialization {#initialization}
|
## Initialization {#initialization}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ Docusaurus v3 now uses the following dependencies:
|
||||||
- Node.js v18.0+
|
- Node.js v18.0+
|
||||||
- React v18.0+
|
- React v18.0+
|
||||||
- MDX v3.0+
|
- MDX v3.0+
|
||||||
- TypeScript v5.0+
|
- TypeScript v5.1+
|
||||||
- prism-react-renderer v2.0+
|
- prism-react-renderer v2.0+
|
||||||
- react-live v4.0+
|
- react-live v4.0+
|
||||||
- remark-emoji v4.0+
|
- remark-emoji v4.0+
|
||||||
|
@ -98,7 +98,7 @@ For TypeScript users:
|
||||||
// upgrade React types to v18.0+
|
// upgrade React types to v18.0+
|
||||||
- "@types/react": "^17.0.69",
|
- "@types/react": "^17.0.69",
|
||||||
+ "@types/react": "^18.2.29",
|
+ "@types/react": "^18.2.29",
|
||||||
// upgrade TypeScript to v5.0+
|
// upgrade TypeScript to v5.1+
|
||||||
- "typescript": "~4.7.4"
|
- "typescript": "~4.7.4"
|
||||||
+ "typescript": "~5.2.2"
|
+ "typescript": "~5.2.2"
|
||||||
}
|
}
|
||||||
|
@ -689,9 +689,9 @@ However, this is a new major library version containing breaking changes, and we
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### TypeScript v5.0+
|
### TypeScript v5.1+
|
||||||
|
|
||||||
Docusaurus v3 now requires **TypeScript >= 5.0**.
|
Docusaurus v3 now requires **TypeScript >= 5.1**.
|
||||||
|
|
||||||
:::info How to upgrade
|
:::info How to upgrade
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ description: Docusaurus is written in TypeScript and provides first-class TypeSc
|
||||||
|
|
||||||
Docusaurus is written in TypeScript and provides first-class TypeScript support.
|
Docusaurus is written in TypeScript and provides first-class TypeScript support.
|
||||||
|
|
||||||
The minimum required version is **TypeScript 5.0**.
|
The minimum required version is **TypeScript 5.1**.
|
||||||
|
|
||||||
## Initialization {#initialization}
|
## Initialization {#initialization}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ Docusaurus v3 now uses the following dependencies:
|
||||||
- Node.js v18.0+
|
- Node.js v18.0+
|
||||||
- React v18.0+
|
- React v18.0+
|
||||||
- MDX v3.0+
|
- MDX v3.0+
|
||||||
- TypeScript v5.0+
|
- TypeScript v5.1+
|
||||||
- prism-react-renderer v2.0+
|
- prism-react-renderer v2.0+
|
||||||
- react-live v4.0+
|
- react-live v4.0+
|
||||||
- remark-emoji v4.0+
|
- remark-emoji v4.0+
|
||||||
|
@ -98,7 +98,7 @@ For TypeScript users:
|
||||||
// upgrade React types to v18.0+
|
// upgrade React types to v18.0+
|
||||||
- "@types/react": "^17.0.69",
|
- "@types/react": "^17.0.69",
|
||||||
+ "@types/react": "^18.2.29",
|
+ "@types/react": "^18.2.29",
|
||||||
// upgrade TypeScript to v5.0+
|
// upgrade TypeScript to v5.1+
|
||||||
- "typescript": "~4.7.4"
|
- "typescript": "~4.7.4"
|
||||||
+ "typescript": "~5.2.2"
|
+ "typescript": "~5.2.2"
|
||||||
}
|
}
|
||||||
|
@ -689,9 +689,9 @@ However, this is a new major library version containing breaking changes, and we
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### TypeScript v5.0+
|
### TypeScript v5.1+
|
||||||
|
|
||||||
Docusaurus v3 now requires **TypeScript >= 5.0**.
|
Docusaurus v3 now requires **TypeScript >= 5.1**.
|
||||||
|
|
||||||
:::info How to upgrade
|
:::info How to upgrade
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ description: Docusaurus is written in TypeScript and provides first-class TypeSc
|
||||||
|
|
||||||
Docusaurus is written in TypeScript and provides first-class TypeScript support.
|
Docusaurus is written in TypeScript and provides first-class TypeScript support.
|
||||||
|
|
||||||
The minimum required version is **TypeScript 5.0**.
|
The minimum required version is **TypeScript 5.1**.
|
||||||
|
|
||||||
## Initialization {#initialization}
|
## Initialization {#initialization}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue