Skip to content

Commit 3001dda

Browse files
committed
Update TS better
1 parent fa3adde commit 3001dda

File tree

4 files changed

+23
-151
lines changed

4 files changed

+23
-151
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
strategy:
3232
matrix:
33-
node: ['16.x']
33+
node: ['18.x']
3434

3535
steps:
3636
- name: Checkout repo
@@ -67,7 +67,7 @@ jobs:
6767
strategy:
6868
fail-fast: false
6969
matrix:
70-
node: ['16.x']
70+
node: ['18.x']
7171
steps:
7272
- name: Checkout repo
7373
uses: actions/checkout@v2
@@ -104,8 +104,8 @@ jobs:
104104
strategy:
105105
fail-fast: false
106106
matrix:
107-
node: ['16.x']
108-
ts: ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2']
107+
node: ['18.x']
108+
ts: ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2', '5.3']
109109
steps:
110110
- name: Checkout repo
111111
uses: actions/checkout@v2
@@ -148,7 +148,7 @@ jobs:
148148
strategy:
149149
fail-fast: false
150150
matrix:
151-
node: ['16.x']
151+
node: ['18.x']
152152
example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm']
153153
defaults:
154154
run:
@@ -184,7 +184,7 @@ jobs:
184184
run: yarn info @reduxjs/toolkit && yarn why @reduxjs/toolkit
185185

186186
- name: Build example
187-
run: yarn build
187+
run: NODE_OPTIONS=--openssl-legacy-provider yarn build
188188

189189
- name: Run test step
190190
run: yarn test
@@ -197,7 +197,7 @@ jobs:
197197
strategy:
198198
fail-fast: false
199199
matrix:
200-
node: ['16.x']
200+
node: ['18.x']
201201
steps:
202202
- name: Checkout repo
203203
uses: actions/checkout@v2

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"netlify-plugin-cache": "^1.0.3",
3636
"prettier": "^2.2.1",
3737
"release-it": "^14.12.5",
38-
"serve": "^14.2.0"
38+
"serve": "^14.2.0",
39+
"typescript": "5.2"
3940
},
4041
"resolutions": {
4142
"@babel/core": "7.19.3",
@@ -67,7 +68,8 @@
6768
"type-fest": "2.19.0",
6869
"console-testing-library@0.6.1": "patch:console-testing-library@npm%3A0.6.1#./.yarn/patches/console-testing-library-npm-0.6.1-4d9957d402.patch",
6970
"@typescript-eslint/eslint-plugin": "6.12.0",
70-
"@typescript-eslint/parser": "6.12.0"
71+
"@typescript-eslint/parser": "6.12.0",
72+
"typescript": "5.2.2"
7173
},
7274
"scripts": {
7375
"build": "yarn build:packages",

packages/toolkit/src/query/tests/devWarnings.test.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ describe('warns on multiple apis using the same `reducerPath`', () => {
205205
test('common: two apis, same order', async () => {
206206
const store = configureStore({
207207
reducer: {
208+
// TS 5.3 now errors on identical object keys. We want to force that behavior.
209+
// @ts-ignore
208210
[api1.reducerPath]: api1.reducer,
211+
// @ts-ignore
209212
[api1_2.reducerPath]: api1_2.reducer,
210213
},
211214
middleware: (gDM) => gDM().concat(api1.middleware, api1_2.middleware),
@@ -222,7 +225,9 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi
222225
test('common: two apis, opposing order', async () => {
223226
const store = configureStore({
224227
reducer: {
228+
// @ts-ignore
225229
[api1.reducerPath]: api1.reducer,
230+
// @ts-ignore
226231
[api1_2.reducerPath]: api1_2.reducer,
227232
},
228233
middleware: (gDM) => gDM().concat(api1_2.middleware, api1.middleware),
@@ -242,7 +247,9 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi
242247
test('common: two apis, only first middleware', async () => {
243248
const store = configureStore({
244249
reducer: {
250+
// @ts-ignore
245251
[api1.reducerPath]: api1.reducer,
252+
// @ts-ignore
246253
[api1_2.reducerPath]: api1_2.reducer,
247254
},
248255
middleware: (gDM) => gDM().concat(api1.middleware),
@@ -266,7 +273,9 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi
266273
test.skip('common: two apis, only second middleware', async () => {
267274
const store = configureStore({
268275
reducer: {
276+
// @ts-ignore
269277
[api1.reducerPath]: api1.reducer,
278+
// @ts-ignore
270279
[api1_2.reducerPath]: api1_2.reducer,
271280
},
272281
middleware: (gDM) => gDM().concat(api1_2.middleware),

yarn.lock

Lines changed: 3 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -25984,6 +25984,7 @@ fsevents@^1.2.7:
2598425984
prettier: ^2.2.1
2598525985
release-it: ^14.12.5
2598625986
serve: ^14.2.0
25987+
typescript: 5.2
2598725988
languageName: unknown
2598825989
linkType: soft
2598925990

@@ -28727,17 +28728,7 @@ fsevents@^1.2.7:
2872728728
languageName: node
2872828729
linkType: hard
2872928730

28730-
"typescript@npm:4.1.3":
28731-
version: 4.1.3
28732-
resolution: "typescript@npm:4.1.3"
28733-
bin:
28734-
tsc: bin/tsc
28735-
tsserver: bin/tsserver
28736-
checksum: 0a25f7d7cebbc5ad23f41cb30918643460477be265bd3bcd400ffedb77d16e97d46f2b0c31393b2f990c5cf5b9f7a829ad6aff8636988b8f30abf81c656237c0
28737-
languageName: node
28738-
linkType: hard
28739-
28740-
"typescript@npm:5.2, typescript@npm:^5.0.0, typescript@npm:^5.2.2":
28731+
"typescript@npm:5.2.2":
2874128732
version: 5.2.2
2874228733
resolution: "typescript@npm:5.2.2"
2874328734
bin:
@@ -28747,77 +28738,7 @@ fsevents@^1.2.7:
2874728738
languageName: node
2874828739
linkType: hard
2874928740

28750-
"typescript@npm:^4.1.3, typescript@npm:^4.3.4":
28751-
version: 4.5.2
28752-
resolution: "typescript@npm:4.5.2"
28753-
bin:
28754-
tsc: bin/tsc
28755-
tsserver: bin/tsserver
28756-
checksum: 74f9ce65d532bdf5d0214b3f60cf37992180023388c87a11ee6f838a803067ef0b63c600fa501b0deb07f989257dce1e244c9635ed79feca40bbccf6e0aa1ebc
28757-
languageName: node
28758-
linkType: hard
28759-
28760-
"typescript@npm:^4.8.0":
28761-
version: 4.8.4
28762-
resolution: "typescript@npm:4.8.4"
28763-
bin:
28764-
tsc: bin/tsc
28765-
tsserver: bin/tsserver
28766-
checksum: 3e4f061658e0c8f36c820802fa809e0fd812b85687a9a2f5430bc3d0368e37d1c9605c3ce9b39df9a05af2ece67b1d844f9f6ea8ff42819f13bcb80f85629af0
28767-
languageName: node
28768-
linkType: hard
28769-
28770-
"typescript@npm:^4.9":
28771-
version: 4.9.5
28772-
resolution: "typescript@npm:4.9.5"
28773-
bin:
28774-
tsc: bin/tsc
28775-
tsserver: bin/tsserver
28776-
checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db
28777-
languageName: node
28778-
linkType: hard
28779-
28780-
"typescript@npm:~4.2.4":
28781-
version: 4.2.4
28782-
resolution: "typescript@npm:4.2.4"
28783-
bin:
28784-
tsc: bin/tsc
28785-
tsserver: bin/tsserver
28786-
checksum: 89c397df192f239359ad798b96d8e8d552e12c0c189ac5676cec4c20c410d6eec636b8e59a88f2aef0a56d961a9678d99c400099be9b7cae2f7b062eb4b7b171
28787-
languageName: node
28788-
linkType: hard
28789-
28790-
"typescript@npm:~4.3.2":
28791-
version: 4.3.4
28792-
resolution: "typescript@npm:4.3.4"
28793-
bin:
28794-
tsc: bin/tsc
28795-
tsserver: bin/tsserver
28796-
checksum: 75e1f2769c7ff38c718523d05eaf1c2611dbf92c0ab0f85f603ead9bb23416af2009a5dac46e76ef6a207a8508fa53f51b43a41f2a91b1241b53cd744c16128c
28797-
languageName: node
28798-
linkType: hard
28799-
28800-
"typescript@npm:~4.9":
28801-
version: 4.9.4
28802-
resolution: "typescript@npm:4.9.4"
28803-
bin:
28804-
tsc: bin/tsc
28805-
tsserver: bin/tsserver
28806-
checksum: e782fb9e0031cb258a80000f6c13530288c6d63f1177ed43f770533fdc15740d271554cdae86701c1dd2c83b082cea808b07e97fd68b38a172a83dbf9e0d0ef9
28807-
languageName: node
28808-
linkType: hard
28809-
28810-
"typescript@patch:typescript@4.1.3#~builtin<compat/typescript>":
28811-
version: 4.1.3
28812-
resolution: "typescript@patch:typescript@npm%3A4.1.3#~builtin<compat/typescript>::version=4.1.3&hash=701156"
28813-
bin:
28814-
tsc: bin/tsc
28815-
tsserver: bin/tsserver
28816-
checksum: ed3df76d9b6efb448e5e73bca671698cda353a3807199ad95c78782a857e7685ccc94b799ac885423ced65ee21c87cbbeb823642c5dfd715efae5ebbc6137070
28817-
languageName: node
28818-
linkType: hard
28819-
28820-
"typescript@patch:typescript@5.2#~builtin<compat/typescript>, typescript@patch:typescript@^5.0.0#~builtin<compat/typescript>, typescript@patch:typescript@^5.2.2#~builtin<compat/typescript>":
28741+
"typescript@patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>":
2882128742
version: 5.2.2
2882228743
resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=701156"
2882328744
bin:
@@ -28827,66 +28748,6 @@ fsevents@^1.2.7:
2882728748
languageName: node
2882828749
linkType: hard
2882928750

28830-
"typescript@patch:typescript@^4.1.3#~builtin<compat/typescript>, typescript@patch:typescript@^4.3.4#~builtin<compat/typescript>":
28831-
version: 4.5.2
28832-
resolution: "typescript@patch:typescript@npm%3A4.5.2#~builtin<compat/typescript>::version=4.5.2&hash=701156"
28833-
bin:
28834-
tsc: bin/tsc
28835-
tsserver: bin/tsserver
28836-
checksum: e25e689eba64f7da7cfc43f8ea76cac7176b56caba42655f0a4cb29c0b7c36e67ca54f33df95902859f56108464245d8b45bcdfe21e3d66d9560feb8db780246
28837-
languageName: node
28838-
linkType: hard
28839-
28840-
"typescript@patch:typescript@^4.8.0#~builtin<compat/typescript>":
28841-
version: 4.8.4
28842-
resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin<compat/typescript>::version=4.8.4&hash=701156"
28843-
bin:
28844-
tsc: bin/tsc
28845-
tsserver: bin/tsserver
28846-
checksum: 301459fc3eb3b1a38fe91bf96d98eb55da88a9cb17b4ef80b4d105d620f4d547ba776cc27b44cc2ef58b66eda23fe0a74142feb5e79a6fb99f54fc018a696afa
28847-
languageName: node
28848-
linkType: hard
28849-
28850-
"typescript@patch:typescript@^4.9#~builtin<compat/typescript>":
28851-
version: 4.9.5
28852-
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=701156"
28853-
bin:
28854-
tsc: bin/tsc
28855-
tsserver: bin/tsserver
28856-
checksum: 2eee5c37cad4390385db5db5a8e81470e42e8f1401b0358d7390095d6f681b410f2c4a0c496c6ff9ebd775423c7785cdace7bcdad76c7bee283df3d9718c0f20
28857-
languageName: node
28858-
linkType: hard
28859-
28860-
"typescript@patch:typescript@~4.2.4#~builtin<compat/typescript>":
28861-
version: 4.2.4
28862-
resolution: "typescript@patch:typescript@npm%3A4.2.4#~builtin<compat/typescript>::version=4.2.4&hash=701156"
28863-
bin:
28864-
tsc: bin/tsc
28865-
tsserver: bin/tsserver
28866-
checksum: eb86e0e8022e5297f7a7b871b6edfbf33b57049416ada8bf97c358760125c7c79f074fbebd1b8e8230f858ae05eb22ad0e805e8f6acd5eae1fa886681624c15e
28867-
languageName: node
28868-
linkType: hard
28869-
28870-
"typescript@patch:typescript@~4.3.2#~builtin<compat/typescript>":
28871-
version: 4.3.4
28872-
resolution: "typescript@patch:typescript@npm%3A4.3.4#~builtin<compat/typescript>::version=4.3.4&hash=701156"
28873-
bin:
28874-
tsc: bin/tsc
28875-
tsserver: bin/tsserver
28876-
checksum: 6ccc2e1148e172da119ea4b72c66395a0c18a53884d21fb82bb4503a948a7169e9961defe24a359040a3d77bf5ff338945804296e0e27c87b5bd22ea1d25781b
28877-
languageName: node
28878-
linkType: hard
28879-
28880-
"typescript@patch:typescript@~4.9#~builtin<compat/typescript>":
28881-
version: 4.9.4
28882-
resolution: "typescript@patch:typescript@npm%3A4.9.4#~builtin<compat/typescript>::version=4.9.4&hash=701156"
28883-
bin:
28884-
tsc: bin/tsc
28885-
tsserver: bin/tsserver
28886-
checksum: 37f6e2c3c5e2aa5934b85b0fddbf32eeac8b1bacf3a5b51d01946936d03f5377fe86255d4e5a4ae628fd0cd553386355ad362c57f13b4635064400f3e8e05b9d
28887-
languageName: node
28888-
linkType: hard
28889-
2889028751
"ua-parser-js@npm:^0.7.18":
2889128752
version: 0.7.28
2889228753
resolution: "ua-parser-js@npm:0.7.28"

0 commit comments

Comments
 (0)