From 30e0238fb1a327cb67281a3e6276ee335b5fffc3 Mon Sep 17 00:00:00 2001 From: Josh Fraser Date: Tue, 26 Jul 2022 16:23:59 +1000 Subject: [PATCH 1/6] =?UTF-8?q?=E2=9A=97=EF=B8=8F=20Add=20TS=20`next`=20ba?= =?UTF-8?q?ck=20to=20type=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4169f951b8..a281dff27c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -96,7 +96,7 @@ jobs: fail-fast: false matrix: node: ['16.x'] - ts: ['4.1', '4.2', '4.3', '4.4', '4.5', '4.6', '4.7'] + ts: ['4.1', '4.2', '4.3', '4.4', '4.5', '4.6', '4.7', 'next'] steps: - name: Checkout repo uses: actions/checkout@v2 From 6b6d015f3ebdc4fde4faa1e7ab96d096f805231b Mon Sep 17 00:00:00 2001 From: Josh Fraser Date: Tue, 26 Jul 2022 16:46:30 +1000 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20Update=20ValidateSl?= =?UTF-8?q?iceCaseReducer=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update type to account for TS version changes See https://github.com/microsoft/TypeScript/issues/49307#issuecomment-1176748097 --- packages/toolkit/src/createSlice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index 341929b15a..a91178188a 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -228,7 +228,7 @@ export type ValidateSliceCaseReducers< S, ACR extends SliceCaseReducers > = ACR & { - [T in keyof ACR]: ACR[T] extends { + [T in (keyof ACR) & symbol]: ACR[T] extends { reducer(s: S, action?: infer A): any } ? { From d5020758cf0a92c4a613478616ee87dd7ebde385 Mon Sep 17 00:00:00 2001 From: Josh Fraser Date: Wed, 27 Jul 2022 10:08:52 +1000 Subject: [PATCH 3/6] =?UTF-8?q?=E2=9A=97=EF=B8=8F=20Remove=20tsc=20--versi?= =?UTF-8?q?on=20from=20gh=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a281dff27c..6064bb6648 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -128,6 +128,4 @@ jobs: run: sed -i -e 's/@pre41-ts-ignore/@ts-ignore/' -e '/pre41-remove-start/,/pre41-remove-end/d' ./src/tests/*.* ./src/query/tests/*.ts* - name: Test types - run: | - yarn tsc --version - yarn type-tests + run: yarn type-tests From ef28f014ec23204cba1f1d60120ce814ac9f1695 Mon Sep 17 00:00:00 2001 From: Josh Fraser Date: Wed, 27 Jul 2022 10:17:59 +1000 Subject: [PATCH 4/6] =?UTF-8?q?Revert=20"=F0=9F=8F=B7=EF=B8=8F=20Update=20?= =?UTF-8?q?ValidateSliceCaseReducer=20type"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6b6d015f3ebdc4fde4faa1e7ab96d096f805231b. --- packages/toolkit/src/createSlice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index a91178188a..341929b15a 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -228,7 +228,7 @@ export type ValidateSliceCaseReducers< S, ACR extends SliceCaseReducers > = ACR & { - [T in (keyof ACR) & symbol]: ACR[T] extends { + [T in keyof ACR]: ACR[T] extends { reducer(s: S, action?: infer A): any } ? { From 815317c00826817db3d20a9202303f1fc725afc9 Mon Sep 17 00:00:00 2001 From: Josh Fraser Date: Wed, 27 Jul 2022 10:26:50 +1000 Subject: [PATCH 5/6] =?UTF-8?q?Revert=20"=E2=9A=97=EF=B8=8F=20Remove=20tsc?= =?UTF-8?q?=20--version=20from=20gh=20workflow"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d5020758cf0a92c4a613478616ee87dd7ebde385. --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6064bb6648..a281dff27c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -128,4 +128,6 @@ jobs: run: sed -i -e 's/@pre41-ts-ignore/@ts-ignore/' -e '/pre41-remove-start/,/pre41-remove-end/d' ./src/tests/*.* ./src/query/tests/*.ts* - name: Test types - run: yarn type-tests + run: | + yarn tsc --version + yarn type-tests From 99934d8c78b6e207c394c079bba0562d2903481a Mon Sep 17 00:00:00 2001 From: Josh Fraser Date: Wed, 27 Jul 2022 10:28:17 +1000 Subject: [PATCH 6/6] =?UTF-8?q?=E2=9A=97=EF=B8=8F=20Check=20tsc=20version?= =?UTF-8?q?=20via=20package.json=20cmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 2 +- packages/toolkit/package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a281dff27c..11b95a9aae 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -129,5 +129,5 @@ jobs: - name: Test types run: | - yarn tsc --version + yarn tsc-version yarn type-tests diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 5bb5d71de2..20aeec2a9c 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -85,6 +85,7 @@ "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", "test": "jest --runInBand", + "tsc-version": "yarn tsc --version", "type-tests": "yarn tsc -p src/tests && yarn tsc -p src/query/tests", "prepack": "npm run build-prepare" },