Skip to content

Commit d6ff442

Browse files
committed
feat: add temporary backward compatibility exports in React Query generator
This commit introduces temporary exports in the React Query generator to maintain backward compatibility with existing imports from the client file.
1 parent 46315d1 commit d6ff442

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
"license": "MIT",
55
"description": "Generate Axios API clients and React Query options from OpenAPI specifications",
66
"exports": "./dist/index.js",
7-
"files": [
8-
"src",
9-
"dist"
10-
],
7+
"files": ["src", "dist"],
118
"author": {
129
"name": "Oliver Winter",
1310
"email": "[email protected]"

src/generator/reactQueryGenerator.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ export function generateReactQuery(spec: OpenAPIV3.Document): string {
8181

8282
return `import { queryOptions, skipToken } from '@tanstack/react-query';
8383
import * as apiClient from './${specTitle(spec)}.client';
84+
// TEMPORARY: allows for backward compatibility imports
85+
export * from './${specTitle(spec)}.client';
86+
8487
const hasDefinedProps = <T extends { [P in K]?: any }, K extends PropertyKey>(
8588
obj: T,
8689
...keys: K[]

0 commit comments

Comments
 (0)