Skip to content

Commit

Permalink
Merge pull request #1546 from hey-api/fix/deps
Browse files Browse the repository at this point in the history
chore: fix deps
  • Loading branch information
mrlubos authored Jan 10, 2025
2 parents 836d8a9 + a121a30 commit a22d34f
Show file tree
Hide file tree
Showing 24 changed files with 1,269 additions and 1,475 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
# node-version: [18.x, 20.x, 22.x]
# tests decided to fail for Node 18 out of nowhere, disable for now
node-version: [20.x, 22.x]
node-version: ['18.20.5', '20.11.1', '22.11.0']
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8.15.7
- uses: pnpm/[email protected]

- uses: actions/setup-node@v4
with:
Expand All @@ -36,8 +32,12 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Build library
run: pnpm build
- name: Build packages
run: pnpm --filter './packages/**' run build

- name: Build examples
if: matrix.node-version == '22.11.0' && matrix.os == 'ubuntu-latest'
run: pnpm --filter './examples/**' run build

- name: Run linter
run: pnpm lint
Expand All @@ -52,5 +52,5 @@ jobs:
run: pnpm test:e2e

- name: Publish previews
if: matrix.node-version == '22.x' && matrix.os == 'ubuntu-latest'
if: matrix.node-version == '22.11.0' && matrix.os == 'ubuntu-latest'
run: pnpx pkg-pr-new publish --compact --pnpm './packages/*'
4 changes: 1 addition & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8.15.7
- uses: pnpm/[email protected]

- uses: actions/setup-node@v4
with:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8.15.7
- uses: pnpm/[email protected]

- uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"editor.quickSuggestions": {
"strings": true
},
"eslint.experimental.useFlatConfig": true,
"eslint.format.enable": true,
"eslint.nodePath": "./node_modules",
"eslint.workingDirectories": [{ "pattern": "./packages/*/" }],
"typescript.preferences.autoImportFileExcludePatterns": ["dist/**"],
"typescript.tsdk": "node_modules/typescript/lib"
Expand Down
8 changes: 4 additions & 4 deletions examples/openapi-ts-axios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
"@hey-api/openapi-ts": "workspace:*",
"@types/react": "19.0.1",
"@types/react-dom": "19.0.1",
"@typescript-eslint/eslint-plugin": "7.15.0",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.15.0",
"@vitejs/plugin-react": "4.3.1",
"autoprefixer": "10.4.19",
"eslint": "9.6.0",
"eslint": "9.17.0",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-react-refresh": "0.4.7",
"postcss": "8.4.39",
"prettier": "3.3.2",
"prettier": "3.4.2",
"tailwindcss": "3.4.4",
"typescript": "5.5.3",
"vite": "5.4.6"
"vite": "6.0.7"
}
}
6 changes: 3 additions & 3 deletions examples/openapi-ts-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
},
"devDependencies": {
"@hey-api/openapi-ts": "workspace:*",
"eslint": "9.6.0",
"prettier": "3.3.2",
"eslint": "9.17.0",
"prettier": "3.4.2",
"typescript": "5.5.3",
"vitest": "2.1.5"
"vitest": "1.6.0"
}
}
8 changes: 4 additions & 4 deletions examples/openapi-ts-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
"@hey-api/openapi-ts": "workspace:*",
"@types/react": "19.0.1",
"@types/react-dom": "19.0.1",
"@typescript-eslint/eslint-plugin": "7.15.0",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.15.0",
"@vitejs/plugin-react": "4.3.1",
"autoprefixer": "10.4.19",
"eslint": "9.6.0",
"eslint": "9.17.0",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-react-refresh": "0.4.7",
"postcss": "8.4.39",
"prettier": "3.3.2",
"prettier": "3.4.2",
"tailwindcss": "3.4.4",
"typescript": "5.5.3",
"vite": "5.4.6"
"vite": "6.0.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.5.2"
"typescript": "5.5.3"
}
}
8 changes: 4 additions & 4 deletions examples/openapi-ts-tanstack-react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
"@hey-api/openapi-ts": "workspace:*",
"@types/react": "19.0.1",
"@types/react-dom": "19.0.1",
"@typescript-eslint/eslint-plugin": "7.15.0",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.15.0",
"@vitejs/plugin-react": "4.3.1",
"autoprefixer": "10.4.19",
"eslint": "9.6.0",
"eslint": "9.17.0",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-react-refresh": "0.4.7",
"postcss": "8.4.39",
"prettier": "3.3.2",
"prettier": "3.4.2",
"tailwindcss": "3.4.4",
"typescript": "5.5.3",
"vite": "5.4.6"
"vite": "6.0.7"
}
}
12 changes: 6 additions & 6 deletions examples/openapi-ts-tanstack-svelte-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
"@sveltejs/kit": "2.8.3",
"@sveltejs/vite-plugin-svelte": "3.0.0",
"@types/eslint": "9.6.0",
"eslint": "9.0.0",
"eslint": "9.17.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-svelte": "2.36.0",
"globals": "15.0.0",
"prettier": "3.1.1",
"globals": "15.14.0",
"prettier": "3.4.2",
"prettier-plugin-svelte": "3.1.2",
"svelte": "4.2.19",
"svelte-check": "3.6.0",
"typescript": "5.5.3",
"typescript-eslint": "8.0.0",
"vite": "5.4.6",
"vitest": "2.0.0"
"typescript-eslint": "8.19.1",
"vite": "6.0.7",
"vitest": "1.6.0"
}
}
28 changes: 14 additions & 14 deletions examples/openapi-ts-tanstack-vue-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@
},
"devDependencies": {
"@hey-api/openapi-ts": "workspace:*",
"@rushstack/eslint-patch": "1.10.4",
"@rushstack/eslint-patch": "1.10.5",
"@tsconfig/node20": "20.1.4",
"@types/jsdom": "21.1.7",
"@types/node": "20.14.5",
"@vitejs/plugin-vue": "5.0.5",
"@vitejs/plugin-vue-jsx": "4.0.0",
"@vue/eslint-config-prettier": "9.0.0",
"@vue/eslint-config-typescript": "13.0.0",
"@types/node": "22.10.5",
"@vitejs/plugin-vue": "5.2.1",
"@vitejs/plugin-vue-jsx": "4.1.1",
"@vue/eslint-config-prettier": "10.1.0",
"@vue/eslint-config-typescript": "14.2.0",
"@vue/test-utils": "2.4.6",
"@vue/tsconfig": "0.5.1",
"@vue/tsconfig": "0.7.0",
"autoprefixer": "10.4.20",
"eslint": "9.6.0",
"eslint-plugin-vue": "9.27.0",
"jsdom": "24.1.0",
"eslint": "9.17.0",
"eslint-plugin-vue": "9.32.0",
"jsdom": "23.0.0",
"npm-run-all2": "6.2.0",
"postcss": "8.4.41",
"prettier": "3.3.2",
"prettier": "3.4.2",
"tailwindcss": "3.4.9",
"typescript": "5.5.3",
"vite": "5.4.6",
"vite-plugin-vue-devtools": "7.3.1",
"vite": "6.0.7",
"vite-plugin-vue-devtools": "7.7.0",
"vitest": "1.6.0",
"vue-tsc": "2.0.29"
"vue-tsc": "2.2.0"
}
}
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,30 @@
"typecheck": "pnpm --recursive typecheck"
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
"node": "^18.20.5 || ^20.11.1 || >=22.11.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "0.16.4",
"@arethetypeswrong/cli": "0.17.2",
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.8",
"@types/node": "20.14.10",
"@typescript-eslint/eslint-plugin": "7.15.0",
"@types/node": "22.10.5",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@vitest/coverage-v8": "1.6.0",
"eslint": "9.6.0",
"eslint": "9.17.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-simple-import-sort": "12.1.1",
"eslint-plugin-sort-destructure-keys": "2.0.0",
"eslint-plugin-sort-keys-fix": "1.1.2",
"eslint-plugin-typescript-sort-keys": "3.2.0",
"eslint-plugin-vue": "9.23.0",
"globals": "15.8.0",
"husky": "9.0.11",
"lint-staged": "15.2.7",
"prettier": "3.3.2",
"tsup": "8.3.0",
"eslint-plugin-typescript-sort-keys": "3.3.0",
"eslint-plugin-vue": "9.32.0",
"globals": "15.14.0",
"husky": "9.1.7",
"lint-staged": "15.3.0",
"prettier": "3.4.2",
"tsup": "8.3.5",
"typescript": "5.5.3",
"typescript-eslint": "7.15.0",
"typescript-eslint": "8.19.1",
"vitest": "1.6.0"
}
},
"packageManager": "[email protected]+sha512.1acb565e6193efbebda772702950469150cf12bcc764262e7587e71d19dc98a423dff9536e57ea44c49bdf790ff694e83c27be5faa23d67e0c033b583be4bfcf"
}
3 changes: 0 additions & 3 deletions packages/client-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,5 @@
"test:watch:disabled": "vitest watch",
"test:disabled": "vitest run",
"typecheck:disabled": "tsc --noEmit"
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/client-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const isSuccess = (status: number): boolean =>
export const base64 = (str: string): string => {
try {
return btoa(str);
} catch (err) {
} catch {
return Buffer.from(str).toString('base64');
}
};
Expand Down Expand Up @@ -249,7 +249,7 @@ export const catchErrorCodes = (
const errorBody = (() => {
try {
return JSON.stringify(result.body, null, 2);
} catch (e) {
} catch {
return undefined;
}
})();
Expand Down
8 changes: 4 additions & 4 deletions packages/openapi-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"typecheck": "tsc --noEmit"
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
"node": "^18.20.5 || ^20.11.1 || >=22.11.0"
},
"dependencies": {
"@hey-api/json-schema-ref-parser": "1.0.1",
Expand All @@ -82,7 +82,7 @@
"handlebars": "4.7.8"
},
"peerDependencies": {
"typescript": "^5.x"
"typescript": "^5.5.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "19.0.6",
Expand All @@ -107,12 +107,12 @@
"@types/express": "4.17.21",
"axios": "1.7.9",
"cross-spawn": "7.0.5",
"eslint": "9.6.0",
"eslint": "9.17.0",
"express": "4.21.0",
"fastify": "5.2.0",
"glob": "10.4.3",
"node-fetch": "3.3.2",
"prettier": "3.3.2",
"prettier": "3.4.2",
"puppeteer": "22.12.1",
"rxjs": "7.8.1",
"ts-node": "10.9.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ type JsonSchemaFormats =
| 'ipv4'
| 'ipv6'
| 'uri'
// eslint-disable-next-line @typescript-eslint/ban-types
| (string & {});

type JsonSchemaTypes =
Expand Down
8 changes: 2 additions & 6 deletions packages/openapi-ts/src/openApi/3.0.x/types/spec.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export interface ExternalDocumentationObject {
*
* TODO: examples
*/
export interface HeaderObject extends Omit<ParameterObject, 'in' | 'name'> {}
export type HeaderObject = Omit<ParameterObject, 'in' | 'name'>;

/**
* The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
Expand Down Expand Up @@ -1279,8 +1279,4 @@ type OpenApiSchemaFormats =
| 'date-time'
| 'password';

type Format =
| JsonSchemaFormats
| OpenApiSchemaFormats
// eslint-disable-next-line @typescript-eslint/ban-types
| (string & {});
type Format = JsonSchemaFormats | OpenApiSchemaFormats | (string & {});
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ type JsonSchemaFormats =
| 'uri-reference'
| 'uri-template'
| 'uuid'
// eslint-disable-next-line @typescript-eslint/ban-types
| (string & {});

type JsonSchemaTypes =
Expand Down
4 changes: 2 additions & 2 deletions packages/openapi-ts/src/openApi/3.1.x/types/spec.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ export interface ExternalDocumentationObject {
* type: integer
* ```
*/
export interface HeaderObject extends Omit<ParameterObject, 'in' | 'name'> {}
export type HeaderObject = Omit<ParameterObject, 'in' | 'name'>;

/**
* The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
Expand Down Expand Up @@ -1660,7 +1660,7 @@ export interface ResponsesObject {
*
* This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}, though as noted, additional properties MAY omit the `x-` prefix within this object.
*/
export interface SchemaObject extends JsonSchemaDraft2020_12 {}
export type SchemaObject = JsonSchemaDraft2020_12;

/**
* Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsSecuritySchemes Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Components Object}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const getModelProperties = ({
exclusiveMinimum: property.exclusiveMinimum,
format:
property.type === 'array'
? property.items?.format ?? property.format
? (property.items?.format ?? property.format)
: property.format,
in: '',
isDefinition: false,
Expand Down
Loading

0 comments on commit a22d34f

Please sign in to comment.