From 833225abff52897fb10998b8cdc556d15075cb80 Mon Sep 17 00:00:00 2001 From: Drew Powers Date: Sun, 8 Feb 2026 15:41:41 -0700 Subject: [PATCH 1/4] Fix permissions --- .github/workflows/release.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 255901417..41879da96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,9 +5,6 @@ on: branches: - main -env: - GITHUB_TOKEN: ${{ secrets.OPENAPI_TS_BOT_GITHUB_TOKEN }} - permissions: id-token: write # Required for OIDC contents: write @@ -16,10 +13,6 @@ permissions: jobs: changelog: runs-on: ubuntu-latest - if: ${{ github.repository_owner == 'openapi-ts' }} - permissions: - contents: write - pull-requests: write steps: - name: Git setup uses: actions/checkout@v6 From 4feca6e9120f0eb6a86b1506ff59bbdb24d06b94 Mon Sep 17 00:00:00 2001 From: Drew Powers Date: Sun, 8 Feb 2026 15:45:36 -0700 Subject: [PATCH 2/4] Update deps --- biome.json | 2 +- package.json | 10 +- packages/openapi-fetch/biome.json | 2 +- packages/openapi-fetch/src/index.d.ts | 38 ++-- packages/openapi-react-query/biome.json | 2 +- .../openapi-typescript-helpers/biome.json | 2 +- .../openapi-typescript-helpers/src/index.ts | 14 +- packages/openapi-typescript/biome.json | 2 +- packages/openapi-typescript/src/lib/redoc.ts | 2 +- .../src/transform/parameters-array.ts | 2 +- .../src/transform/schema-object.ts | 2 +- pnpm-lock.yaml | 207 +++++++++--------- 12 files changed, 145 insertions(+), 140 deletions(-) diff --git a/biome.json b/biome.json index f5aac5157..5da38550c 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.2.6/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json", "root": true, "files": { "includes": ["**", "!**/dist", "!**/package.json"] diff --git a/package.json b/package.json index b02289e76..dfacc49ea 100644 --- a/package.json +++ b/package.json @@ -20,15 +20,15 @@ }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", - "@biomejs/biome": "2.2.6", + "@biomejs/biome": "2.3.14", "@changesets/changelog-github": "0.5.2", "@changesets/cli": "2.29.8", "@playwright/test": "1.56.0", - "@size-limit/preset-small-lib": "11.2.0", + "@size-limit/preset-small-lib": "12.0.0", "@types/node": "25.2.2", - "prettier": "3.6.2", - "size-limit": "11.2.0", - "turbo": "2.5.8", + "prettier": "3.8.1", + "size-limit": "12.0.0", + "turbo": "2.8.3", "typescript": "catalog:", "unbuild": "3.6.1", "vitest": "4.0.18" diff --git a/packages/openapi-fetch/biome.json b/packages/openapi-fetch/biome.json index fb18efb77..99724ae16 100644 --- a/packages/openapi-fetch/biome.json +++ b/packages/openapi-fetch/biome.json @@ -1,6 +1,6 @@ { "root": false, - "$schema": "https://biomejs.dev/schemas/2.2.6/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json", "extends": "//", "files": { "includes": ["src/**", "test/**", "!**/examples/**", "!test/**/schemas/**", "!test/bench/**/*.min.js"] diff --git a/packages/openapi-fetch/src/index.d.ts b/packages/openapi-fetch/src/index.d.ts index 387a5642f..6fceeeb43 100644 --- a/packages/openapi-fetch/src/index.d.ts +++ b/packages/openapi-fetch/src/index.d.ts @@ -92,11 +92,12 @@ export type ParamsOption = T extends { : { params: T["parameters"] } : DefaultParamsOption; -export type RequestBodyOption = OperationRequestBodyContent extends never - ? { body?: never } - : IsOperationRequestBodyOptional extends true - ? { body?: OperationRequestBodyContent } - : { body: OperationRequestBodyContent }; +export type RequestBodyOption = + OperationRequestBodyContent extends never + ? { body?: never } + : IsOperationRequestBodyOptional extends true + ? { body?: OperationRequestBodyContent } + : { body: OperationRequestBodyContent }; export type FetchOptions = RequestOptions & Omit; @@ -177,19 +178,17 @@ export type Middleware = }; /** This type helper makes the 2nd function param required if params/requestBody are required; otherwise, optional */ -export type MaybeOptionalInit = RequiredKeysOf< - FetchOptions> -> extends never - ? FetchOptions> | undefined - : FetchOptions>; +export type MaybeOptionalInit = + RequiredKeysOf>> extends never + ? FetchOptions> | undefined + : FetchOptions>; // The final init param to accept. // - Determines if the param is optional or not. // - Performs arbitrary [key: string] addition. // Note: the addition MUST happen after all the inference happens (otherwise TS can’t infer if init is required or not). -type InitParam = RequiredKeysOf extends never - ? [(Init & { [key: string]: unknown })?] - : [Init & { [key: string]: unknown }]; +type InitParam = + RequiredKeysOf extends never ? [(Init & { [key: string]: unknown })?] : [Init & { [key: string]: unknown }]; export type ClientMethod< Paths extends Record>, @@ -240,19 +239,18 @@ export interface Client { eject(...middleware: Middleware[]): void; } -export type ClientPathsWithMethod< - CreatedClient extends Client, - Method extends HttpMethod, -> = CreatedClient extends Client ? PathsWithMethod : never; +export type ClientPathsWithMethod, Method extends HttpMethod> = + CreatedClient extends Client ? PathsWithMethod : never; export type MethodResponse< CreatedClient extends Client, Method extends HttpMethod, Path extends ClientPathsWithMethod, Options = {}, -> = CreatedClient extends Client - ? NonNullable["data"]> - : never; +> = + CreatedClient extends Client + ? NonNullable["data"]> + : never; export default function createClient( clientOptions?: ClientOptions, diff --git a/packages/openapi-react-query/biome.json b/packages/openapi-react-query/biome.json index 6c1a54025..c57c07218 100644 --- a/packages/openapi-react-query/biome.json +++ b/packages/openapi-react-query/biome.json @@ -1,6 +1,6 @@ { "root": false, - "$schema": "https://biomejs.dev/schemas/2.2.6/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json", "extends": "//", "files": { "includes": ["**", "!dist/**", "!test/fixtures/**"] diff --git a/packages/openapi-typescript-helpers/biome.json b/packages/openapi-typescript-helpers/biome.json index e103d52de..50eeaaf54 100644 --- a/packages/openapi-typescript-helpers/biome.json +++ b/packages/openapi-typescript-helpers/biome.json @@ -1,6 +1,6 @@ { "root": false, - "$schema": "https://biomejs.dev/schemas/2.2.6/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json", "extends": "//", "files": { "includes": ["**/*"] diff --git a/packages/openapi-typescript-helpers/src/index.ts b/packages/openapi-typescript-helpers/src/index.ts index 3c8a004ce..50a05246e 100644 --- a/packages/openapi-typescript-helpers/src/index.ts +++ b/packages/openapi-typescript-helpers/src/index.ts @@ -107,14 +107,16 @@ type PickRequestBody = "requestBody" extends keyof T ? Pick export type IsOperationRequestBodyOptional = RequiredKeysOf> extends never ? true : false; /** Internal helper used in OperationRequestBodyContent */ -export type OperationRequestBodyMediaContent = IsOperationRequestBodyOptional extends true - ? ResponseContent>> | undefined - : ResponseContent>; +export type OperationRequestBodyMediaContent = + IsOperationRequestBodyOptional extends true + ? ResponseContent>> | undefined + : ResponseContent>; /** Return first `content` from a Request Object Mapping, allowing any media type */ -export type OperationRequestBodyContent = FilterKeys, MediaType> extends never - ? FilterKeys>, MediaType> | undefined - : FilterKeys, MediaType>; +export type OperationRequestBodyContent = + FilterKeys, MediaType> extends never + ? FilterKeys>, MediaType> | undefined + : FilterKeys, MediaType>; /** Return all 2XX responses from a Response Object Map */ export type SuccessResponse< diff --git a/packages/openapi-typescript/biome.json b/packages/openapi-typescript/biome.json index f13de92b4..79c1fc825 100644 --- a/packages/openapi-typescript/biome.json +++ b/packages/openapi-typescript/biome.json @@ -1,6 +1,6 @@ { "root": false, - "$schema": "https://biomejs.dev/schemas/2.2.6/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json", "extends": "//", "files": { "includes": ["bin/**", "!examples/**", "src/**", "test/**", "!**/fixtures/**/*"] diff --git a/packages/openapi-typescript/src/lib/redoc.ts b/packages/openapi-typescript/src/lib/redoc.ts index 22a2315c2..455695243 100644 --- a/packages/openapi-typescript/src/lib/redoc.ts +++ b/packages/openapi-typescript/src/lib/redoc.ts @@ -84,7 +84,7 @@ export async function parseSchema(schema: unknown, { absoluteRef, resolver }: Pa function _processProblems(problems: NormalizedProblem[], options: { silent: boolean }) { if (problems.length) { - let errorMessage: string | undefined = undefined; + let errorMessage: string | undefined; for (const problem of problems) { const problemLocation = problem.location?.[0].pointer; const problemMessage = problemLocation ? `${problem.message} at ${problemLocation}` : problem.message; diff --git a/packages/openapi-typescript/src/transform/parameters-array.ts b/packages/openapi-typescript/src/transform/parameters-array.ts index 1ecdff4d7..78146f34e 100644 --- a/packages/openapi-typescript/src/transform/parameters-array.ts +++ b/packages/openapi-typescript/src/transform/parameters-array.ts @@ -86,7 +86,7 @@ export function transformParametersArray( if (resolved?.in !== paramIn) { continue; } - let optional: ts.QuestionToken | undefined = undefined; + let optional: ts.QuestionToken | undefined; if (paramIn !== "path" && !(resolved as ParameterObject).required) { optional = QUESTION_TOKEN; } diff --git a/packages/openapi-typescript/src/transform/schema-object.ts b/packages/openapi-typescript/src/transform/schema-object.ts index e8f581877..8621bfc47 100644 --- a/packages/openapi-typescript/src/transform/schema-object.ts +++ b/packages/openapi-typescript/src/transform/schema-object.ts @@ -270,7 +270,7 @@ export function transformSchemaObjectWithComposition( } // compile final type - let finalType: ts.TypeNode | undefined = undefined; + let finalType: ts.TypeNode | undefined; // core + allOf: intersect const coreObjectType = transformSchemaObjectCore(schemaObject, options); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 742a330f3..231fc49e9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,8 +24,8 @@ importers: specifier: 0.18.2 version: 0.18.2 '@biomejs/biome': - specifier: 2.2.6 - version: 2.2.6 + specifier: 2.3.14 + version: 2.3.14 '@changesets/changelog-github': specifier: 0.5.2 version: 0.5.2 @@ -36,20 +36,20 @@ importers: specifier: 1.56.0 version: 1.56.0 '@size-limit/preset-small-lib': - specifier: 11.2.0 - version: 11.2.0(size-limit@11.2.0) + specifier: 12.0.0 + version: 12.0.0(size-limit@12.0.0(jiti@2.6.1)) '@types/node': specifier: 25.2.2 version: 25.2.2 prettier: - specifier: 3.6.2 - version: 3.6.2 + specifier: 3.8.1 + version: 3.8.1 size-limit: - specifier: 11.2.0 - version: 11.2.0 + specifier: 12.0.0 + version: 12.0.0(jiti@2.6.1) turbo: - specifier: 2.5.8 - version: 2.5.8 + specifier: 2.8.3 + version: 2.8.3 typescript: specifier: 'catalog:' version: 5.9.3 @@ -476,59 +476,59 @@ packages: resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==} engines: {node: '>=6.9.0'} - '@biomejs/biome@2.2.6': - resolution: {integrity: sha512-yKTCNGhek0rL5OEW1jbLeZX8LHaM8yk7+3JRGv08my+gkpmtb5dDE+54r2ZjZx0ediFEn1pYBOJSmOdDP9xtFw==} + '@biomejs/biome@2.3.14': + resolution: {integrity: sha512-QMT6QviX0WqXJCaiqVMiBUCr5WRQ1iFSjvOLoTk6auKukJMvnMzWucXpwZB0e8F00/1/BsS9DzcKgWH+CLqVuA==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@2.2.6': - resolution: {integrity: sha512-UZPmn3M45CjTYulgcrFJFZv7YmK3pTxTJDrFYlNElT2FNnkkX4fsxjExTSMeWKQYoZjvekpH5cvrYZZlWu3yfA==} + '@biomejs/cli-darwin-arm64@2.3.14': + resolution: {integrity: sha512-UJGPpvWJMkLxSRtpCAKfKh41Q4JJXisvxZL8ChN1eNW3m/WlPFJ6EFDCE7YfUb4XS8ZFi3C1dFpxUJ0Ety5n+A==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@2.2.6': - resolution: {integrity: sha512-HOUIquhHVgh/jvxyClpwlpl/oeMqntlteL89YqjuFDiZ091P0vhHccwz+8muu3nTyHWM5FQslt+4Jdcd67+xWQ==} + '@biomejs/cli-darwin-x64@2.3.14': + resolution: {integrity: sha512-PNkLNQG6RLo8lG7QoWe/hhnMxJIt1tEimoXpGQjwS/dkdNiKBLPv4RpeQl8o3s1OKI3ZOR5XPiYtmbGGHAOnLA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@2.2.6': - resolution: {integrity: sha512-TjCenQq3N6g1C+5UT3jE1bIiJb5MWQvulpUngTIpFsL4StVAUXucWD0SL9MCW89Tm6awWfeXBbZBAhJwjyFbRQ==} + '@biomejs/cli-linux-arm64-musl@2.3.14': + resolution: {integrity: sha512-LInRbXhYujtL3sH2TMCH/UBwJZsoGwfQjBrMfl84CD4hL/41C/EU5mldqf1yoFpsI0iPWuU83U+nB2TUUypWeg==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] libc: [musl] - '@biomejs/cli-linux-arm64@2.2.6': - resolution: {integrity: sha512-BpGtuMJGN+o8pQjvYsUKZ+4JEErxdSmcRD/JG3mXoWc6zrcA7OkuyGFN1mDggO0Q1n7qXxo/PcupHk8gzijt5g==} + '@biomejs/cli-linux-arm64@2.3.14': + resolution: {integrity: sha512-KT67FKfzIw6DNnUNdYlBg+eU24Go3n75GWK6NwU4+yJmDYFe9i/MjiI+U/iEzKvo0g7G7MZqoyrhIYuND2w8QQ==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] libc: [glibc] - '@biomejs/cli-linux-x64-musl@2.2.6': - resolution: {integrity: sha512-1ZcBux8zVM3JhWN2ZCPaYf0+ogxXG316uaoXJdgoPZcdK/rmRcRY7PqHdAos2ExzvjIdvhQp72UcveI98hgOog==} + '@biomejs/cli-linux-x64-musl@2.3.14': + resolution: {integrity: sha512-KQU7EkbBBuHPW3/rAcoiVmhlPtDSGOGRPv9js7qJVpYTzjQmVR+C9Rfcz+ti8YCH+zT1J52tuBybtP4IodjxZQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] libc: [musl] - '@biomejs/cli-linux-x64@2.2.6': - resolution: {integrity: sha512-1HaM/dpI/1Z68zp8ZdT6EiBq+/O/z97a2AiHMl+VAdv5/ELckFt9EvRb8hDHpk8hUMoz03gXkC7VPXOVtU7faA==} + '@biomejs/cli-linux-x64@2.3.14': + resolution: {integrity: sha512-ZsZzQsl9U+wxFrGGS4f6UxREUlgHwmEfu1IrXlgNFrNnd5Th6lIJr8KmSzu/+meSa9f4rzFrbEW9LBBA6ScoMA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] libc: [glibc] - '@biomejs/cli-win32-arm64@2.2.6': - resolution: {integrity: sha512-h3A88G8PGM1ryTeZyLlSdfC/gz3e95EJw9BZmA6Po412DRqwqPBa2Y9U+4ZSGUAXCsnSQE00jLV8Pyrh0d+jQw==} + '@biomejs/cli-win32-arm64@2.3.14': + resolution: {integrity: sha512-+IKYkj/pUBbnRf1G1+RlyA3LWiDgra1xpS7H2g4BuOzzRbRB+hmlw0yFsLprHhbbt7jUzbzAbAjK/Pn0FDnh1A==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@2.2.6': - resolution: {integrity: sha512-yx0CqeOhPjYQ5ZXgPfu8QYkgBhVJyvWe36as7jRuPrKPO5ylVDfwVtPQ+K/mooNTADW0IhxOZm3aPu16dP8yNQ==} + '@biomejs/cli-win32-x64@2.3.14': + resolution: {integrity: sha512-oizCjdyQ3WJEswpb3Chdngeat56rIdSYK12JI3iI11Mt5T5EXcZ7WLuowzEaFPNJ3zmOQFliMN8QY1Pi+qsfdQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -1649,22 +1649,22 @@ packages: resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} - '@size-limit/esbuild@11.2.0': - resolution: {integrity: sha512-vSg9H0WxGQPRzDnBzeDyD9XT0Zdq0L+AI3+77/JhxznbSCMJMMr8ndaWVQRhOsixl97N0oD4pRFw2+R1Lcvi6A==} - engines: {node: ^18.0.0 || >=20.0.0} + '@size-limit/esbuild@12.0.0': + resolution: {integrity: sha512-r9i+HrtunIu7wAPtqD3t4DqfYin3kxPoMAv8cidkzlCS69IYCe3EG2UbQa10AdvQyaHTEK+MPkr9ifUd3W29og==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} peerDependencies: - size-limit: 11.2.0 + size-limit: 12.0.0 - '@size-limit/file@11.2.0': - resolution: {integrity: sha512-OZHE3putEkQ/fgzz3Tp/0hSmfVo3wyTpOJSRNm6AmcwX4Nm9YtTfbQQ/hZRwbBFR23S7x2Sd9EbqYzngKwbRoA==} - engines: {node: ^18.0.0 || >=20.0.0} + '@size-limit/file@12.0.0': + resolution: {integrity: sha512-OzKYpDzWJ2jo6cAIzVsaPuvzZTmMLDoVCViEvsctmImxpXzwJZcuBEpPohFKKdgVdZuNTU8WstmvywPq55Njdw==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} peerDependencies: - size-limit: 11.2.0 + size-limit: 12.0.0 - '@size-limit/preset-small-lib@11.2.0': - resolution: {integrity: sha512-RFbbIVfv8/QDgTPyXzjo5NKO6CYyK5Uq5xtNLHLbw5RgSKrgo8WpiB/fNivZuNd/5Wk0s91PtaJ9ThNcnFuI3g==} + '@size-limit/preset-small-lib@12.0.0': + resolution: {integrity: sha512-HHHVQjZmj+8vg7qsHs1dd3Hmn8ygUsE5O2CfxnbCbHOGyUw7VodZGERh/+5ogVrF2DYza/DIo2PnCJZZETdTRA==} peerDependencies: - size-limit: 11.2.0 + size-limit: 12.0.0 '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} @@ -3567,8 +3567,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.6.2: - resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} + prettier@3.8.1: + resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} engines: {node: '>=14'} hasBin: true @@ -3798,10 +3798,15 @@ packages: resolution: {integrity: sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==} engines: {node: '>=18'} - size-limit@11.2.0: - resolution: {integrity: sha512-2kpQq2DD/pRpx3Tal/qRW1SYwcIeQ0iq8li5CJHQgOC+FtPn2BVmuDtzUCgNnpCrbgtfEHqh+iWzxK+Tq6C+RQ==} - engines: {node: ^18.0.0 || >=20.0.0} + size-limit@12.0.0: + resolution: {integrity: sha512-JBG8dioIs0m2kHOhs9jD6E/tZKD08vmbf2bfqj/rJyNWqJxk/ZcakixjhYtsqdbi+AKVbfPkt3g2RRZiKaizYA==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true + peerDependencies: + jiti: ^2.0.0 + peerDependenciesMeta: + jiti: + optional: true skin-tone@2.0.0: resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} @@ -4007,38 +4012,38 @@ packages: tuple-result@0.0.7: resolution: {integrity: sha512-ZYh/sV75TPAPZpiNFNXp/R2pKMNzY7xShzV2sGTLLMm66Sf+/ZaBQxdrA7OJgV3vjt37+e0GYSK+smPArmhHGw==} - turbo-darwin-64@2.5.8: - resolution: {integrity: sha512-Dh5bCACiHO8rUXZLpKw+m3FiHtAp2CkanSyJre+SInEvEr5kIxjGvCK/8MFX8SFRjQuhjtvpIvYYZJB4AGCxNQ==} + turbo-darwin-64@2.8.3: + resolution: {integrity: sha512-4kXRLfcygLOeNcP6JquqRLmGB/ATjjfehiojL2dJkL7GFm3SPSXbq7oNj8UbD8XriYQ5hPaSuz59iF1ijPHkTw==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.5.8: - resolution: {integrity: sha512-f1H/tQC9px7+hmXn6Kx/w8Jd/FneIUnvLlcI/7RGHunxfOkKJKvsoiNzySkoHQ8uq1pJnhJ0xNGTlYM48ZaJOQ==} + turbo-darwin-arm64@2.8.3: + resolution: {integrity: sha512-xF7uCeC0UY0Hrv/tqax0BMbFlVP1J/aRyeGQPZT4NjvIPj8gSPDgFhfkfz06DhUwDg5NgMo04uiSkAWE8WB/QQ==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.5.8: - resolution: {integrity: sha512-hMyvc7w7yadBlZBGl/bnR6O+dJTx3XkTeyTTH4zEjERO6ChEs0SrN8jTFj1lueNXKIHh1SnALmy6VctKMGnWfw==} + turbo-linux-64@2.8.3: + resolution: {integrity: sha512-vxMDXwaOjweW/4etY7BxrXCSkvtwh0PbwVafyfT1Ww659SedUxd5rM3V2ZCmbwG8NiCfY7d6VtxyHx3Wh1GoZA==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.5.8: - resolution: {integrity: sha512-LQELGa7bAqV2f+3rTMRPnj5G/OHAe2U+0N9BwsZvfMvHSUbsQ3bBMWdSQaYNicok7wOZcHjz2TkESn1hYK6xIQ==} + turbo-linux-arm64@2.8.3: + resolution: {integrity: sha512-mQX7uYBZFkuPLLlKaNe9IjR1JIef4YvY8f21xFocvttXvdPebnq3PK1Zjzl9A1zun2BEuWNUwQIL8lgvN9Pm3Q==} cpu: [arm64] os: [linux] - turbo-windows-64@2.5.8: - resolution: {integrity: sha512-3YdcaW34TrN1AWwqgYL9gUqmZsMT4T7g8Y5Azz+uwwEJW+4sgcJkIi9pYFyU4ZBSjBvkfuPZkGgfStir5BBDJQ==} + turbo-windows-64@2.8.3: + resolution: {integrity: sha512-YLGEfppGxZj3VWcNOVa08h6ISsVKiG85aCAWosOKNUjb6yErWEuydv6/qImRJUI+tDLvDvW7BxopAkujRnWCrw==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.5.8: - resolution: {integrity: sha512-eFC5XzLmgXJfnAK3UMTmVECCwuBcORrWdewoiXBnUm934DY6QN8YowC/srhNnROMpaKaqNeRpoB5FxCww3eteQ==} + turbo-windows-arm64@2.8.3: + resolution: {integrity: sha512-afTUGKBRmOJU1smQSBnFGcbq0iabAPwh1uXu2BVk7BREg30/1gMnJh9DFEQTah+UD3n3ru8V55J83RQNFfqoyw==} cpu: [arm64] os: [win32] - turbo@2.5.8: - resolution: {integrity: sha512-5c9Fdsr9qfpT3hA0EyYSFRZj1dVVsb6KIWubA9JBYZ/9ZEAijgUEae0BBR/Xl/wekt4w65/lYLTFaP3JmwSO8w==} + turbo@2.8.3: + resolution: {integrity: sha512-8Osxz5Tu/Dw2kb31EAY+nhq/YZ3wzmQSmYa1nIArqxgCAldxv9TPlrAiaBUDVnKA4aiPn0OFBD1ACcpc5VFOAQ==} hasBin: true type-fest@4.41.0: @@ -4682,39 +4687,39 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 - '@biomejs/biome@2.2.6': + '@biomejs/biome@2.3.14': optionalDependencies: - '@biomejs/cli-darwin-arm64': 2.2.6 - '@biomejs/cli-darwin-x64': 2.2.6 - '@biomejs/cli-linux-arm64': 2.2.6 - '@biomejs/cli-linux-arm64-musl': 2.2.6 - '@biomejs/cli-linux-x64': 2.2.6 - '@biomejs/cli-linux-x64-musl': 2.2.6 - '@biomejs/cli-win32-arm64': 2.2.6 - '@biomejs/cli-win32-x64': 2.2.6 + '@biomejs/cli-darwin-arm64': 2.3.14 + '@biomejs/cli-darwin-x64': 2.3.14 + '@biomejs/cli-linux-arm64': 2.3.14 + '@biomejs/cli-linux-arm64-musl': 2.3.14 + '@biomejs/cli-linux-x64': 2.3.14 + '@biomejs/cli-linux-x64-musl': 2.3.14 + '@biomejs/cli-win32-arm64': 2.3.14 + '@biomejs/cli-win32-x64': 2.3.14 - '@biomejs/cli-darwin-arm64@2.2.6': + '@biomejs/cli-darwin-arm64@2.3.14': optional: true - '@biomejs/cli-darwin-x64@2.2.6': + '@biomejs/cli-darwin-x64@2.3.14': optional: true - '@biomejs/cli-linux-arm64-musl@2.2.6': + '@biomejs/cli-linux-arm64-musl@2.3.14': optional: true - '@biomejs/cli-linux-arm64@2.2.6': + '@biomejs/cli-linux-arm64@2.3.14': optional: true - '@biomejs/cli-linux-x64-musl@2.2.6': + '@biomejs/cli-linux-x64-musl@2.3.14': optional: true - '@biomejs/cli-linux-x64@2.2.6': + '@biomejs/cli-linux-x64@2.3.14': optional: true - '@biomejs/cli-win32-arm64@2.2.6': + '@biomejs/cli-win32-arm64@2.3.14': optional: true - '@biomejs/cli-win32-x64@2.2.6': + '@biomejs/cli-win32-x64@2.3.14': optional: true '@blgc/types@0.0.19': {} @@ -5582,21 +5587,21 @@ snapshots: '@sindresorhus/merge-streams@4.0.0': {} - '@size-limit/esbuild@11.2.0(size-limit@11.2.0)': + '@size-limit/esbuild@12.0.0(size-limit@12.0.0(jiti@2.6.1))': dependencies: - esbuild: 0.25.12 + esbuild: 0.27.3 nanoid: 5.1.6 - size-limit: 11.2.0 + size-limit: 12.0.0(jiti@2.6.1) - '@size-limit/file@11.2.0(size-limit@11.2.0)': + '@size-limit/file@12.0.0(size-limit@12.0.0(jiti@2.6.1))': dependencies: - size-limit: 11.2.0 + size-limit: 12.0.0(jiti@2.6.1) - '@size-limit/preset-small-lib@11.2.0(size-limit@11.2.0)': + '@size-limit/preset-small-lib@12.0.0(size-limit@12.0.0(jiti@2.6.1))': dependencies: - '@size-limit/esbuild': 11.2.0(size-limit@11.2.0) - '@size-limit/file': 11.2.0(size-limit@11.2.0) - size-limit: 11.2.0 + '@size-limit/esbuild': 12.0.0(size-limit@12.0.0(jiti@2.6.1)) + '@size-limit/file': 12.0.0(size-limit@12.0.0(jiti@2.6.1)) + size-limit: 12.0.0(jiti@2.6.1) '@standard-schema/spec@1.1.0': {} @@ -7605,7 +7610,7 @@ snapshots: prettier@2.8.8: {} - prettier@3.6.2: {} + prettier@3.8.1: {} pretty-bytes@7.1.0: {} @@ -7909,15 +7914,15 @@ snapshots: mrmime: 2.0.1 totalist: 3.0.1 - size-limit@11.2.0: + size-limit@12.0.0(jiti@2.6.1): dependencies: bytes-iec: 3.1.1 - chokidar: 4.0.3 - jiti: 2.6.1 lilconfig: 3.1.3 nanospinner: 1.2.2 picocolors: 1.1.1 tinyglobby: 0.2.15 + optionalDependencies: + jiti: 2.6.1 skin-tone@2.0.0: dependencies: @@ -8120,32 +8125,32 @@ snapshots: tuple-result@0.0.7: {} - turbo-darwin-64@2.5.8: + turbo-darwin-64@2.8.3: optional: true - turbo-darwin-arm64@2.5.8: + turbo-darwin-arm64@2.8.3: optional: true - turbo-linux-64@2.5.8: + turbo-linux-64@2.8.3: optional: true - turbo-linux-arm64@2.5.8: + turbo-linux-arm64@2.8.3: optional: true - turbo-windows-64@2.5.8: + turbo-windows-64@2.8.3: optional: true - turbo-windows-arm64@2.5.8: + turbo-windows-arm64@2.8.3: optional: true - turbo@2.5.8: + turbo@2.8.3: optionalDependencies: - turbo-darwin-64: 2.5.8 - turbo-darwin-arm64: 2.5.8 - turbo-linux-64: 2.5.8 - turbo-linux-arm64: 2.5.8 - turbo-windows-64: 2.5.8 - turbo-windows-arm64: 2.5.8 + turbo-darwin-64: 2.8.3 + turbo-darwin-arm64: 2.8.3 + turbo-linux-64: 2.8.3 + turbo-linux-arm64: 2.8.3 + turbo-windows-64: 2.8.3 + turbo-windows-arm64: 2.8.3 type-fest@4.41.0: {} From 4c52cbc76fa634cabf9c2b469f4ed36055228008 Mon Sep 17 00:00:00 2001 From: Drew Powers Date: Sun, 8 Feb 2026 15:57:31 -0700 Subject: [PATCH 3/4] Re-add GITHUB_TOKEN --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41879da96..6cc3e86c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,3 +38,5 @@ jobs: publish: pnpm exec changeset publish commit: "[ci] release" title: "[ci] release" + env: + GITHUB_TOKEN: ${{ secrets.OPENAPI_TS_BOT_GITHUB_TOKEN }} From c0aad30f297b7fab09538e4d9b27a965554f29b5 Mon Sep 17 00:00:00 2001 From: Drew Powers Date: Sun, 8 Feb 2026 15:59:27 -0700 Subject: [PATCH 4/4] Lint --- .../test/common/create-client.test.ts | 127 +++++++++--------- .../test/middleware/middleware.test.ts | 2 +- packages/openapi-react-query/src/index.ts | 7 +- .../scripts/update-examples.ts | 4 +- 4 files changed, 67 insertions(+), 73 deletions(-) diff --git a/packages/openapi-fetch/test/common/create-client.test.ts b/packages/openapi-fetch/test/common/create-client.test.ts index b189e3e42..b07c68278 100644 --- a/packages/openapi-fetch/test/common/create-client.test.ts +++ b/packages/openapi-fetch/test/common/create-client.test.ts @@ -98,75 +98,70 @@ describe("createClient options", () => { BODIES.map((body) => [method, body] as const), ); - test.each(METHOD_BODY_COMBINATIONS)( - "implicit default content-type for body-full requests - %s, %j", - async (method, body) => { - const contentType = await fireRequestAndGetContentType({ - method, - fetchOptions: { body }, - }); - - expect(contentType).toBe("application/json"); - }, - ); + test.each( + METHOD_BODY_COMBINATIONS, + )("implicit default content-type for body-full requests - %s, %j", async (method, body) => { + const contentType = await fireRequestAndGetContentType({ + method, + fetchOptions: { body }, + }); - test.each(METHOD_BODY_COMBINATIONS)( - "provided default content-type for body-full requests - %s, %j", - async (method, body) => { - const contentType = await fireRequestAndGetContentType({ - defaultHeaders: { "content-type": "application/my-json" }, - method, - fetchOptions: { body }, - }); - - expect(contentType).toBe("application/my-json"); - }, - ); + expect(contentType).toBe("application/json"); + }); - test.each(METHOD_BODY_COMBINATIONS)( - "native-fetch default content-type for body-full requests, when default is suppressed - %s, %j", - async (method, body) => { - const contentType = await fireRequestAndGetContentType({ - defaultHeaders: { "content-type": null }, - method, - fetchOptions: { body }, - }); - // the fetch implementation won't allow sending a body without content-type, - // and it defaults to `text/plain;charset=UTF-8`, however the actual default value - // is irrelevant and might be flaky across different fetch implementations - // for us, it's important that it's not `application/json` - expect(contentType).not.toBe("application/json"); - }, - ); + test.each( + METHOD_BODY_COMBINATIONS, + )("provided default content-type for body-full requests - %s, %j", async (method, body) => { + const contentType = await fireRequestAndGetContentType({ + defaultHeaders: { "content-type": "application/my-json" }, + method, + fetchOptions: { body }, + }); - test.each(METHOD_BODY_COMBINATIONS)( - "specified content-type for body-full requests - %s, %j", - async (method, body) => { - const contentType = await fireRequestAndGetContentType({ - method, - fetchOptions: { - body, - headers: { "content-type": "application/my-json" }, - }, - }); - - expect(contentType).toBe("application/my-json"); - }, - ); + expect(contentType).toBe("application/my-json"); + }); - test.each(METHOD_BODY_COMBINATIONS)( - "specified content-type for body-full requests, even when default is suppressed - %s, %j", - async (method, body) => { - const contentType = await fireRequestAndGetContentType({ - method, - fetchOptions: { - body, - headers: { "content-type": "application/my-json" }, - }, - }); - - expect(contentType).toBe("application/my-json"); - }, - ); + test.each( + METHOD_BODY_COMBINATIONS, + )("native-fetch default content-type for body-full requests, when default is suppressed - %s, %j", async (method, body) => { + const contentType = await fireRequestAndGetContentType({ + defaultHeaders: { "content-type": null }, + method, + fetchOptions: { body }, + }); + // the fetch implementation won't allow sending a body without content-type, + // and it defaults to `text/plain;charset=UTF-8`, however the actual default value + // is irrelevant and might be flaky across different fetch implementations + // for us, it's important that it's not `application/json` + expect(contentType).not.toBe("application/json"); + }); + + test.each( + METHOD_BODY_COMBINATIONS, + )("specified content-type for body-full requests - %s, %j", async (method, body) => { + const contentType = await fireRequestAndGetContentType({ + method, + fetchOptions: { + body, + headers: { "content-type": "application/my-json" }, + }, + }); + + expect(contentType).toBe("application/my-json"); + }); + + test.each( + METHOD_BODY_COMBINATIONS, + )("specified content-type for body-full requests, even when default is suppressed - %s, %j", async (method, body) => { + const contentType = await fireRequestAndGetContentType({ + method, + fetchOptions: { + body, + headers: { "content-type": "application/my-json" }, + }, + }); + + expect(contentType).toBe("application/my-json"); + }); }); }); diff --git a/packages/openapi-fetch/test/middleware/middleware.test.ts b/packages/openapi-fetch/test/middleware/middleware.test.ts index 2d96ab457..0a1fecdea 100644 --- a/packages/openapi-fetch/test/middleware/middleware.test.ts +++ b/packages/openapi-fetch/test/middleware/middleware.test.ts @@ -421,7 +421,7 @@ test("baseUrl can be overridden", async () => { }); test("auth header", async () => { - let accessToken: string | undefined = undefined; + let accessToken: string | undefined; const authMiddleware: Middleware = { async onRequest({ request }) { if (accessToken) { diff --git a/packages/openapi-react-query/src/index.ts b/packages/openapi-react-query/src/index.ts index 23c996c53..e3c67419f 100644 --- a/packages/openapi-react-query/src/index.ts +++ b/packages/openapi-react-query/src/index.ts @@ -182,9 +182,10 @@ export type MethodResponse< ? PathsWithMethod : never, Options = object, -> = CreatedClient extends OpenapiQueryClient - ? NonNullable["data"]> - : never; +> = + CreatedClient extends OpenapiQueryClient + ? NonNullable["data"]> + : never; // TODO: Add the ability to bring queryClient as argument export default function createClient( diff --git a/packages/openapi-typescript/scripts/update-examples.ts b/packages/openapi-typescript/scripts/update-examples.ts index fad8eed7c..e0ead7201 100644 --- a/packages/openapi-typescript/scripts/update-examples.ts +++ b/packages/openapi-typescript/scripts/update-examples.ts @@ -16,9 +16,7 @@ async function generateSchemas() { const cwd = process.platform === "win32" ? // execa/cross-spawn can not handle URL objects on Windows, so convert it to string and cut away the protocol - rootCWD - .toString() - .slice("file:///".length) + rootCWD.toString().slice("file:///".length) : rootCWD; try {