-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v5] breaking: require TypeScript 4.5 and update tests (#2257)
* breaking(types): TS requirement * wip: latest only * wip: latest only 2 * drop ts <4.4 * wip: do not skip lib checkes * use latest node types * drop ts 4.4
- Loading branch information
Showing
4 changed files
with
23 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,10 +22,6 @@ jobs: | |
- 4.7.4 | ||
- 4.6.4 | ||
- 4.5.5 | ||
- 4.4.4 | ||
- 4.3.5 | ||
- 4.2.3 | ||
- 4.1.5 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
|
@@ -37,16 +33,11 @@ jobs: | |
- run: yarn build | ||
- name: Patch for Old TS | ||
run: | | ||
sed -i~ 's/\/\/ @ts-expect-error.*\[LATEST-TS-ONLY\]//' tests/*.tsx | ||
sed -i~ 's/"target":/"skipLibCheck":true,"target":/' tsconfig.json | ||
sed -i~ 's/"exactOptionalPropertyTypes": true,//' tsconfig.json | ||
sed -i~ 's/"moduleResolution": "bundler",/"moduleResolution": "node",/' tsconfig.json | ||
sed -i~ 's/"allowImportingTsExtensions": true,//' tsconfig.json | ||
sed -i~ 's/"zustand": \["\.\/src\/index\.ts"\],/"zustand": [".\/dist\/index.d.ts"],/' tsconfig.json | ||
sed -i~ 's/"zustand\/\*": \["\.\/src\/\*\.ts"\]/"zustand\/*": [".\/dist\/*.d.ts"]/' tsconfig.json | ||
sed -i~ 's/"include": .*/"include": ["src\/types.d.ts", "dist\/**\/*", "tests\/**\/*"],/' tsconfig.json | ||
yarn json -I -f package.json -e "this.resolutions={}; this.resolutions['@types/node']='18.13.0';" | ||
yarn add -D @types/[email protected] | ||
- name: Test ${{ matrix.typescript }} | ||
run: | | ||
yarn add -D typescript@${{ matrix.typescript }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters