Skip to content

Commit 0e7014a

Browse files
committed
fix ignoreDeprecations usage
1 parent eb631ee commit 0e7014a

3 files changed

Lines changed: 29 additions & 6 deletions

File tree

.github/workflows/tests-e2e.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,28 @@ jobs:
158158
working-directory: ../test-website
159159
env:
160160
E2E_TEST: true
161+
161162
- name: TypeCheck website
162163
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
163164
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'
164165
working-directory: ../test-website
165166
run: yarn typecheck
167+
166168
- name: TypeCheck website - min version - v5.1
167169
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
168170
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'
169171
working-directory: ../test-website
170172
run: |
171173
yarn add typescript@5.1.6 --exact
174+
175+
# Downgrade TS ignoreDeprecations option
176+
jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json
177+
172178
yarn typecheck
179+
180+
# Restore TS ignoreDeprecations option
181+
jq '.compilerOptions.ignoreDeprecations = "6.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json
182+
173183
- name: TypeCheck website - max version - Latest
174184
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
175185
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'

.github/workflows/tests-windows.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,23 @@ jobs:
6161
- name: TypeCheck website
6262
# see https://github.com/facebook/docusaurus/pull/10486
6363
run: yarn workspace website typecheck
64+
65+
- name: TypeCheck website - max version - Latest
66+
# For latest TS there are often lib check errors, so we disable it
67+
# Details: https://github.com/facebook/docusaurus/pull/10486
68+
run: |
69+
yarn add typescript@latest --exact -D -W --ignore-scripts
70+
yarn workspace website typecheck --project tsconfig.skipLibCheck.json
71+
6472
- name: TypeCheck website - min version - v5.1
6573
run: |
6674
yarn add typescript@5.1.6 --exact -D -W --ignore-scripts
6775
76+
# Downgrade TS ignoreDeprecations option
77+
jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -Force tsconfig.json.tmp tsconfig.json
78+
6879
# DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false)
6980
jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -Force package.json.tmp package.json
7081
yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts
7182
7283
yarn workspace website typecheck
73-
- name: TypeCheck website - max version - Latest
74-
# For latest TS there are often lib check errors, so we disable it
75-
# Details: https://github.com/facebook/docusaurus/pull/10486
76-
run: |
77-
yarn add typescript@latest --exact -D -W --ignore-scripts
78-
yarn workspace website typecheck --project tsconfig.skipLibCheck.json

.github/workflows/tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,23 @@ jobs:
5858
- name: TypeCheck website
5959
# see https://github.com/facebook/docusaurus/pull/10486
6060
run: yarn workspace website typecheck
61+
6162
- name: TypeCheck website - min version - v5.1
6263
run: |
6364
yarn add typescript@5.1.6 --exact -D -W --ignore-scripts
6465
66+
# Downgrade TS ignoreDeprecations option
67+
jq '.compilerOptions.ignoreDeprecations = "5.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json
68+
6569
# DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false)
6670
jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -f package.json.tmp package.json
6771
yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts
6872
6973
yarn workspace website typecheck
74+
75+
# Restore TS ignoreDeprecations option
76+
jq '.compilerOptions.ignoreDeprecations = "6.0"' tsconfig.json > tsconfig.json.tmp && mv -f tsconfig.json.tmp tsconfig.json
77+
7078
- name: TypeCheck website - max version - Latest
7179
# For latest TS there are often lib check errors, so we disable it
7280
# Details: https://github.com/facebook/docusaurus/pull/10486

0 commit comments

Comments
 (0)