Skip to content

Commit ee3507f

Browse files
committed
fixes
1 parent b71a640 commit ee3507f

25 files changed

+1107
-67
lines changed

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,25 @@
1818
"build": "pnpm -r run build",
1919
"clean": "pnpm -r run clean",
2020
"test": "pnpm -r run test",
21-
"lint": "pnpm -r run lint"
21+
"lint": "pnpm -r run lint",
22+
"deps": "pnpm up -r -i -L"
2223
},
2324
"devDependencies": {
2425
"@types/jest": "^29.5.14",
2526
"@types/node": "^22.10.2",
2627
"@typescript-eslint/eslint-plugin": "^8.15.0",
2728
"@typescript-eslint/parser": "^8.15.0",
28-
"eslint": "^9.13.0",
2929
"cpy-cli": "^6.0.0",
30-
"rimraf": "4.4.1",
30+
"eslint": "^9.13.0",
3131
"eslint-config-prettier": "^10.1.1",
3232
"eslint-plugin-simple-import-sort": "^12.1.1",
3333
"eslint-plugin-unused-imports": "^4.3.0",
34-
"jest": "^29.7.0",
34+
"jest": "^30.2.0",
3535
"lerna": "^8.2.4",
3636
"prettier": "^3.3.3",
37+
"rimraf": "4.4.1",
3738
"ts-jest": "^29.2.5",
3839
"ts-node": "^10.9.2",
3940
"typescript": "^5.6.3"
4041
}
41-
}
42+
}

packages/schema-sdk/__tests__/__snapshots__/openapi.extended.generate.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`full-name-strategy 1`] = `
44
"import { APIClient, APIClientRequestOpts, APIClientOptions } from "@interweb/fetch-api-client";

packages/schema-sdk/__tests__/__snapshots__/openapi.generate.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`merged 1`] = `
44
"import { APIClient, APIClientRequestOpts, APIClientOptions } from "@interweb/fetch-api-client";

packages/schema-sdk/__tests__/__snapshots__/openapi.overrides.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`useLastSegment false 1`] = `
44
"/* io.k8s.api.admissionregistration.v1.MutatingWebhook */

packages/schema-sdk/__tests__/__snapshots__/openapi.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`naming 1`] = `
44
"/* io.k8s.api.admissionregistration.v1.MutatingWebhook */

packages/schema-sdk/__tests__/template.literal.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { createPathTemplateLiteral, getDefaultSchemaSDKOptions } from '../src';
55
const options = getDefaultSchemaSDKOptions();
66
export const renderTemplateTag = (str: string) => {
77
return generate(
8+
// @ts-ignore
89
createPathTemplateLiteral(
910
{
1011
...options,

packages/schema-sdk/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@
2929
"test:watch": "jest --watch"
3030
},
3131
"dependencies": {
32-
"@babel/generator": "^7.24.4",
33-
"@babel/types": "^7.24.0",
34-
"@interweb-utils/casing": "^0.2.0",
32+
"@babel/generator": "7.28.5",
33+
"@babel/parser": "^7.23.6",
34+
"@babel/traverse": "7.28.5",
35+
"@babel/types": "7.28.5",
36+
"@interweb-utils/casing": "^0.3.0",
3537
"@interweb/fetch-api-client": "^0.6.1",
3638
"deepmerge": "^4.3.1",
3739
"fast-json-patch": "^3.1.1",
@@ -45,6 +47,7 @@
4547
"openapi"
4648
],
4749
"devDependencies": {
50+
"@types/babel__generator": "^7.27.0",
4851
"jest-diff": "^30.0.4"
4952
}
5053
}

packages/schema-sdk/src/openapi.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,7 @@ export function generateOpenApiClient(
10591059
const gvkOpsStmts = options.opsIndex?.enabled ? generateGVKOpsStatements(options, patchedSchema) : [];
10601060

10611061
let code = generate(
1062+
// @ts-ignore
10621063
t.file(
10631064
t.program([
10641065
t.importDeclaration(
@@ -1078,9 +1079,13 @@ export function generateOpenApiClient(
10781079
],
10791080
t.stringLiteral(options.npmApiClient)
10801081
),
1082+
// @ts-ignore
10811083
...types,
1084+
// @ts-ignore
10821085
...openApiTypes,
1086+
// @ts-ignore
10831087
clientClass,
1088+
// @ts-ignore
10841089
...gvkOpsStmts,
10851090
])
10861091
)
@@ -1412,7 +1417,7 @@ export function generateReactQueryHooks(
14121417
const funcDecls = components.map((comp) => comp.funcDecl);
14131418
// Build AST and generate code
14141419
const ast = t.file(t.program([...uniqueImportDecls, ...uniqueConstDecls, ...funcDecls]));
1415-
const code = generate(ast).code;
1420+
const code = generate(ast as any).code;
14161421
return code;
14171422
}
14181423

packages/schema-typescript/__tests__/__snapshots__/additional-props.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`additional 1`] = `
44
"export interface Person {

packages/schema-typescript/__tests__/__snapshots__/arrays.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`works 1`] = `
44
"export interface Dog {

0 commit comments

Comments
 (0)