Skip to content

Commit c6fc9d3

Browse files
committed
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit into configs
2 parents 729fbb4 + 6037afa commit c6fc9d3

File tree

8 files changed

+48
-16
lines changed

8 files changed

+48
-16
lines changed

packages/rtk-query-codegen-openapi/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"dependencies": {
5959
"@apidevtools/swagger-parser": "^10.0.2",
6060
"commander": "^6.2.0",
61-
"oazapfts": "^4.8.0",
61+
"oazapfts": "^6.0.2",
6262
"prettier": "^3.2.5",
6363
"semver": "^7.3.5",
6464
"swagger2openapi": "^7.0.4",

packages/rtk-query-codegen-openapi/src/generate.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ import ApiGenerator, {
55
getReferenceName,
66
isReference,
77
supportDeepObjects,
8-
} from 'oazapfts/lib/codegen/generate';
9-
import {
108
createPropertyAssignment,
119
createQuestionToken,
1210
isValidIdentifier,
1311
keywordType,
14-
} from 'oazapfts/lib/codegen/tscodegen';
12+
} from 'oazapfts/generate';
1513
import type { OpenAPIV3 } from 'openapi-types';
1614
import ts from 'typescript';
1715
import type { ObjectPropertyDefinitions } from './codegen';

packages/rtk-query-codegen-openapi/src/generators/react-hooks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import ts from 'typescript';
2-
import { getOperationName } from 'oazapfts/lib/codegen/generate';
2+
import { getOperationName } from 'oazapfts/generate';
33
import { capitalize, isQuery } from '../utils';
44
import type { OperationDefinition, EndpointOverrides, ConfigFile } from '../types';
55
import { getOverrides } from '../generate';

packages/rtk-query-codegen-openapi/test/__snapshots__/cli.test.ts.snap

+6
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ export type Pet = {
192192
category?: Category;
193193
photoUrls: string[];
194194
tags?: Tag[];
195+
/** pet status in the store */
195196
status?: 'available' | 'pending' | 'sold';
196197
};
197198
export type ApiResponse = {
@@ -204,6 +205,7 @@ export type Order = {
204205
petId?: number;
205206
quantity?: number;
206207
shipDate?: string;
208+
/** Order Status */
207209
status?: 'placed' | 'approved' | 'delivered';
208210
complete?: boolean;
209211
};
@@ -215,6 +217,7 @@ export type User = {
215217
email?: string;
216218
password?: string;
217219
phone?: string;
220+
/** User Status */
218221
userStatus?: number;
219222
};
220223
"
@@ -412,6 +415,7 @@ export type Pet = {
412415
category?: Category;
413416
photoUrls: string[];
414417
tags?: Tag[];
418+
/** pet status in the store */
415419
status?: 'available' | 'pending' | 'sold';
416420
};
417421
export type ApiResponse = {
@@ -424,6 +428,7 @@ export type Order = {
424428
petId?: number;
425429
quantity?: number;
426430
shipDate?: string;
431+
/** Order Status */
427432
status?: 'placed' | 'approved' | 'delivered';
428433
complete?: boolean;
429434
};
@@ -435,6 +440,7 @@ export type User = {
435440
email?: string;
436441
password?: string;
437442
phone?: string;
443+
/** User Status */
438444
userStatus?: number;
439445
};
440446
"

packages/rtk-query-codegen-openapi/test/__snapshots__/generateEndpoints.test.ts.snap

+15
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ export type Pet = {
258258
category?: Category | undefined;
259259
photoUrls: string[];
260260
tags?: Tag[] | undefined;
261+
/** pet status in the store */
261262
status?: ("available" | "pending" | "sold") | undefined;
262263
};
263264
export type ApiResponse = {
@@ -270,6 +271,7 @@ export type Order = {
270271
petId?: number | undefined;
271272
quantity?: number | undefined;
272273
shipDate?: string | undefined;
274+
/** Order Status */
273275
status?: ("placed" | "approved" | "delivered") | undefined;
274276
complete?: boolean | undefined;
275277
};
@@ -281,6 +283,7 @@ export type User = {
281283
email?: string | undefined;
282284
password?: string | undefined;
283285
phone?: string | undefined;
286+
/** User Status */
284287
userStatus?: number | undefined;
285288
};
286289
"
@@ -386,6 +389,7 @@ export type Order = {
386389
petId?: number | undefined;
387390
quantity?: number | undefined;
388391
shipDate?: string | undefined;
392+
/** Order Status */
389393
status?: ("placed" | "approved" | "delivered") | undefined;
390394
complete?: boolean | undefined;
391395
};
@@ -494,6 +498,7 @@ export type Pet = {
494498
category?: Category | undefined;
495499
photoUrls: string[];
496500
tags?: Tag[] | undefined;
501+
/** pet status in the store */
497502
status?: ("available" | "pending" | "sold") | undefined;
498503
};
499504
export const { useAddPetMutation, useGetPetByIdQuery } = injectedRtkApi;
@@ -680,6 +685,7 @@ export type Pet = {
680685
category?: Category;
681686
photoUrls: string[];
682687
tags?: Tag[];
688+
/** pet status in the store */
683689
status?: "available" | "pending" | "sold";
684690
};
685691
export const { useAddPetMutation, useGetPetByIdQuery, useLazyGetPetByIdQuery } =
@@ -729,6 +735,7 @@ export type Pet = {
729735
category?: Category;
730736
photoUrls: string[];
731737
tags?: Tag[];
738+
/** pet status in the store */
732739
status?: "available" | "pending" | "sold";
733740
};
734741
export const { useLazyGetPetByIdQuery } = injectedRtkApi;
@@ -777,6 +784,7 @@ export type Pet = {
777784
category?: Category;
778785
photoUrls: string[];
779786
tags?: Tag[];
787+
/** pet status in the store */
780788
status?: "available" | "pending" | "sold";
781789
};
782790
export const { useAddPetMutation } = injectedRtkApi;
@@ -825,6 +833,7 @@ export type Pet = {
825833
category?: Category;
826834
photoUrls: string[];
827835
tags?: Tag[];
836+
/** pet status in the store */
828837
status?: "available" | "pending" | "sold";
829838
};
830839
export const { useGetPetByIdQuery } = injectedRtkApi;
@@ -1153,6 +1162,7 @@ export type Pet = {
11531162
category?: Category | undefined;
11541163
photoUrls: string[];
11551164
tags?: Tag[] | undefined;
1165+
/** pet status in the store */
11561166
status?: ("available" | "pending" | "sold") | undefined;
11571167
};
11581168
export type ApiResponse = {
@@ -1165,6 +1175,7 @@ export type Order = {
11651175
petId?: number | undefined;
11661176
quantity?: number | undefined;
11671177
shipDate?: string | undefined;
1178+
/** Order Status */
11681179
status?: ("placed" | "approved" | "delivered") | undefined;
11691180
complete?: boolean | undefined;
11701181
};
@@ -1176,6 +1187,7 @@ export type User = {
11761187
email?: string | undefined;
11771188
password?: string | undefined;
11781189
phone?: string | undefined;
1190+
/** User Status */
11791191
userStatus?: number | undefined;
11801192
};
11811193
export const {
@@ -1537,6 +1549,7 @@ export type Pet = {
15371549
category?: Category | undefined;
15381550
photoUrls: string[];
15391551
tags?: Tag[] | undefined;
1552+
/** pet status in the store */
15401553
status?: ("available" | "pending" | "sold") | undefined;
15411554
};
15421555
export type ApiResponse = {
@@ -1549,6 +1562,7 @@ export type Order = {
15491562
petId?: number | undefined;
15501563
quantity?: number | undefined;
15511564
shipDate?: string | undefined;
1565+
/** Order Status */
15521566
status?: ("placed" | "approved" | "delivered") | undefined;
15531567
complete?: boolean | undefined;
15541568
};
@@ -1560,6 +1574,7 @@ export type User = {
15601574
email?: string | undefined;
15611575
password?: string | undefined;
15621576
phone?: string | undefined;
1577+
/** User Status */
15631578
userStatus?: number | undefined;
15641579
};
15651580
export const {
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
{
22
"extends": "@reduxjs/tsconfig/base",
33
"compilerOptions": {
4-
"module": "CommonJS",
4+
"declaration": true,
5+
"esModuleInterop": true,
6+
"forceConsistentCasingInFileNames": true,
7+
"module": "ESNext",
8+
"moduleResolution": "Bundler",
9+
"noUnusedLocals": false,
510
"outDir": "lib",
11+
"resolveJsonModule": true,
612
"rootDir": "src",
7-
"sourceMap": true
13+
"skipLibCheck": true,
14+
"sourceMap": true,
15+
"strict": true,
16+
"target": "ESNext",
17+
"types": ["vitest/globals", "vitest/importMeta"]
818
},
919
"exclude": ["test", "lib", "vitest.config.mts"]
1020
}

packages/toolkit/src/query/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export type {
3434
} from './endpointDefinitions'
3535
export { fetchBaseQuery } from './fetchBaseQuery'
3636
export type {
37+
FetchBaseQueryArgs,
3738
FetchBaseQueryError,
3839
FetchBaseQueryMeta,
3940
FetchArgs,

yarn.lock

+11-9
Original file line numberDiff line numberDiff line change
@@ -7860,7 +7860,7 @@ __metadata:
78607860
husky: "npm:^4.3.6"
78617861
msw: "npm:^2.1.5"
78627862
node-fetch: "npm:^3.3.2"
7863-
oazapfts: "npm:^4.8.0"
7863+
oazapfts: "npm:^6.0.2"
78647864
openapi-types: "npm:^9.1.0"
78657865
prettier: "npm:^3.2.5"
78667866
pretty-quick: "npm:^4.0.0"
@@ -21832,18 +21832,20 @@ __metadata:
2183221832
languageName: node
2183321833
linkType: hard
2183421834

21835-
"oazapfts@npm:^4.8.0":
21836-
version: 4.10.0
21837-
resolution: "oazapfts@npm:4.10.0"
21835+
"oazapfts@npm:^6.0.2":
21836+
version: 6.0.2
21837+
resolution: "oazapfts@npm:6.0.2"
2183821838
dependencies:
2183921839
"@apidevtools/swagger-parser": "npm:^10.1.0"
2184021840
lodash: "npm:^4.17.21"
2184121841
minimist: "npm:^1.2.8"
2184221842
swagger2openapi: "npm:^7.0.8"
21843-
typescript: "npm:^5.2.2"
21843+
typescript: "npm:^5.3.3"
21844+
peerDependencies:
21845+
"@oazapfts/runtime": "*"
2184421846
bin:
21845-
oazapfts: lib/codegen/cli.js
21846-
checksum: 10/361915b5bafea470b63e54274a54ec19a1d5de09f017f11a4dc380f6e00bd7fb043ae7e0b6a166a46276c41e19a9206cc13b9213d7e7a4e0e08f783ef7b4ec07
21847+
oazapfts: dist/cli.js
21848+
checksum: 10/9132e4bbc589cefba2b93a2421309c89e7685cf75108ac8611d93f78c4e985a0d95829feb2f2b109fa22cb6feb12a6a1e03a679bba9892633c22fe9fb21bd91c
2184721849
languageName: node
2184821850
linkType: hard
2184921851

@@ -28692,7 +28694,7 @@ __metadata:
2869228694
languageName: node
2869328695
linkType: hard
2869428696

28695-
"typescript@npm:5.3.3, typescript@npm:^5.2.2, typescript@npm:^5.3.3":
28697+
"typescript@npm:5.3.3, typescript@npm:^5.3.3":
2869628698
version: 5.3.3
2869728699
resolution: "typescript@npm:5.3.3"
2869828700
bin:
@@ -28762,7 +28764,7 @@ __metadata:
2876228764
languageName: node
2876328765
linkType: hard
2876428766

28765-
"typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.2.2#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.3.3#optional!builtin<compat/typescript>":
28767+
"typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.3.3#optional!builtin<compat/typescript>":
2876628768
version: 5.3.3
2876728769
resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"
2876828770
bin:

0 commit comments

Comments
 (0)