Skip to content

Commit 49d747d

Browse files
slorberiAdramelk
authored andcommitted
test(e2e): TypeCheck website/starter in min/max range of TS versions (facebook#10063)
1 parent b282404 commit 49d747d

File tree

11 files changed

+57
-23
lines changed

11 files changed

+57
-23
lines changed

.github/workflows/tests-e2e.yml

+17-1
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,27 @@ jobs:
114114
working-directory: ../test-website
115115
env:
116116
E2E_TEST: true
117-
- name: Type check
117+
118+
- name: TypeCheck website
118119
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
119120
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'
121+
working-directory: ../test-website
120122
run: yarn typecheck
123+
- name: TypeCheck website - min version - v5.1
124+
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
125+
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'
126+
working-directory: ../test-website
127+
run: |
128+
yarn add typescript@5.1.6 --exact
129+
yarn typecheck
130+
- name: TypeCheck website - max version - Latest
131+
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
132+
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'
121133
working-directory: ../test-website
134+
run: |
135+
yarn add typescript@latest --exact
136+
yarn typecheck
137+
122138
- name: Build test-website project
123139
run: yarn build
124140
working-directory: ../test-website

.github/workflows/tests-windows.yml

+9
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,14 @@ jobs:
5252
run: yarn workspace website test:swizzle:wrap:ts
5353
- name: Docusaurus Build
5454
run: yarn build:website:fast
55+
5556
- name: TypeCheck website
5657
run: yarn workspace website typecheck
58+
- name: TypeCheck website - min version - v5.1
59+
run: |
60+
yarn workspace website add typescript@5.1.6 --exact
61+
yarn workspace website typecheck
62+
- name: TypeCheck website - max version - Latest
63+
run: |
64+
yarn workspace website add typescript@latest --exact
65+
yarn workspace website typecheck

.github/workflows/tests.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,18 @@ jobs:
3939
run: yarn
4040
- name: Test
4141
run: yarn test
42-
- name: TypeCheck website
43-
run: yarn workspace website typecheck
4442
- name: Remove Theme Internal Re-export
4543
run: yarn workspace @docusaurus/theme-common removeThemeInternalReexport
4644
- name: Docusaurus Build
4745
run: yarn build:website:fast
46+
47+
- name: TypeCheck website
48+
run: yarn workspace website typecheck
49+
- name: TypeCheck website - min version - v5.1
50+
run: |
51+
yarn workspace website add typescript@5.1.6 --exact
52+
yarn workspace website typecheck
53+
- name: TypeCheck website - max version - Latest
54+
run: |
55+
yarn workspace website add typescript@latest --exact
56+
yarn workspace website typecheck

website/docs/migration/v3.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Docusaurus v3 now uses the following dependencies:
3636
- Node.js v18.0+
3737
- React v18.0+
3838
- MDX v3.0+
39-
- TypeScript v5.0+
39+
- TypeScript v5.1+
4040
- prism-react-renderer v2.0+
4141
- react-live v4.0+
4242
- remark-emoji v4.0+
@@ -98,7 +98,7 @@ For TypeScript users:
9898
// upgrade React types to v18.0+
9999
- "@types/react": "^17.0.69",
100100
+ "@types/react": "^18.2.29",
101-
// upgrade TypeScript to v5.0+
101+
// upgrade TypeScript to v5.1+
102102
- "typescript": "~4.7.4"
103103
+ "typescript": "~5.2.2"
104104
}
@@ -689,9 +689,9 @@ However, this is a new major library version containing breaking changes, and we
689689

690690
:::
691691

692-
### TypeScript v5.0+
692+
### TypeScript v5.1+
693693

694-
Docusaurus v3 now requires **TypeScript >= 5.0**.
694+
Docusaurus v3 now requires **TypeScript >= 5.1**.
695695

696696
:::info How to upgrade
697697

website/docs/typescript-support.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Docusaurus is written in TypeScript and provides first-class TypeSc
66

77
Docusaurus is written in TypeScript and provides first-class TypeScript support.
88

9-
The minimum required version is **TypeScript 5.0**.
9+
The minimum required version is **TypeScript 5.1**.
1010

1111
## Initialization {#initialization}
1212

website/versioned_docs/version-3.0.1/migration/v3.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Docusaurus v3 now uses the following dependencies:
3636
- Node.js v18.0+
3737
- React v18.0+
3838
- MDX v3.0+
39-
- TypeScript v5.0+
39+
- TypeScript v5.1+
4040
- prism-react-renderer v2.0+
4141
- react-live v4.0+
4242
- remark-emoji v4.0+
@@ -98,7 +98,7 @@ For TypeScript users:
9898
// upgrade React types to v18.0+
9999
- "@types/react": "^17.0.69",
100100
+ "@types/react": "^18.2.29",
101-
// upgrade TypeScript to v5.0+
101+
// upgrade TypeScript to v5.1+
102102
- "typescript": "~4.7.4"
103103
+ "typescript": "~5.2.2"
104104
}
@@ -601,9 +601,9 @@ However, this is a new major library version containing breaking changes, and we
601601

602602
:::
603603

604-
### TypeScript v5.0+
604+
### TypeScript v5.1+
605605

606-
Docusaurus v3 now requires **TypeScript >= 5.0**.
606+
Docusaurus v3 now requires **TypeScript >= 5.1**.
607607

608608
:::info How to upgrade
609609

website/versioned_docs/version-3.0.1/typescript-support.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Docusaurus is written in TypeScript and provides first-class TypeSc
66

77
Docusaurus is written in TypeScript and provides first-class TypeScript support.
88

9-
The minimum required version is **TypeScript 5.0**.
9+
The minimum required version is **TypeScript 5.1**.
1010

1111
## Initialization {#initialization}
1212

website/versioned_docs/version-3.1.1/migration/v3.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Docusaurus v3 now uses the following dependencies:
3636
- Node.js v18.0+
3737
- React v18.0+
3838
- MDX v3.0+
39-
- TypeScript v5.0+
39+
- TypeScript v5.1+
4040
- prism-react-renderer v2.0+
4141
- react-live v4.0+
4242
- remark-emoji v4.0+
@@ -98,7 +98,7 @@ For TypeScript users:
9898
// upgrade React types to v18.0+
9999
- "@types/react": "^17.0.69",
100100
+ "@types/react": "^18.2.29",
101-
// upgrade TypeScript to v5.0+
101+
// upgrade TypeScript to v5.1+
102102
- "typescript": "~4.7.4"
103103
+ "typescript": "~5.2.2"
104104
}
@@ -689,9 +689,9 @@ However, this is a new major library version containing breaking changes, and we
689689

690690
:::
691691

692-
### TypeScript v5.0+
692+
### TypeScript v5.1+
693693

694-
Docusaurus v3 now requires **TypeScript >= 5.0**.
694+
Docusaurus v3 now requires **TypeScript >= 5.1**.
695695

696696
:::info How to upgrade
697697

website/versioned_docs/version-3.1.1/typescript-support.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Docusaurus is written in TypeScript and provides first-class TypeSc
66

77
Docusaurus is written in TypeScript and provides first-class TypeScript support.
88

9-
The minimum required version is **TypeScript 5.0**.
9+
The minimum required version is **TypeScript 5.1**.
1010

1111
## Initialization {#initialization}
1212

website/versioned_docs/version-3.2.1/migration/v3.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Docusaurus v3 now uses the following dependencies:
3636
- Node.js v18.0+
3737
- React v18.0+
3838
- MDX v3.0+
39-
- TypeScript v5.0+
39+
- TypeScript v5.1+
4040
- prism-react-renderer v2.0+
4141
- react-live v4.0+
4242
- remark-emoji v4.0+
@@ -98,7 +98,7 @@ For TypeScript users:
9898
// upgrade React types to v18.0+
9999
- "@types/react": "^17.0.69",
100100
+ "@types/react": "^18.2.29",
101-
// upgrade TypeScript to v5.0+
101+
// upgrade TypeScript to v5.1+
102102
- "typescript": "~4.7.4"
103103
+ "typescript": "~5.2.2"
104104
}
@@ -689,9 +689,9 @@ However, this is a new major library version containing breaking changes, and we
689689

690690
:::
691691

692-
### TypeScript v5.0+
692+
### TypeScript v5.1+
693693

694-
Docusaurus v3 now requires **TypeScript >= 5.0**.
694+
Docusaurus v3 now requires **TypeScript >= 5.1**.
695695

696696
:::info How to upgrade
697697

website/versioned_docs/version-3.2.1/typescript-support.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Docusaurus is written in TypeScript and provides first-class TypeSc
66

77
Docusaurus is written in TypeScript and provides first-class TypeScript support.
88

9-
The minimum required version is **TypeScript 5.0**.
9+
The minimum required version is **TypeScript 5.1**.
1010

1111
## Initialization {#initialization}
1212

0 commit comments

Comments
 (0)