From 2dd8ce6fba8b822f460a19d3e40094390c653c13 Mon Sep 17 00:00:00 2001 From: izzy Date: Mon, 1 Sep 2025 18:12:44 +0200 Subject: [PATCH] fix: actually build new oapi version [skip ci] --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- src/index.ts | 5 ++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 92504d9..def62c7 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "prepublish": "in-publish && pnpm build || echo Skipping build." }, "devDependencies": { - "@insertish/oapi": "0.2.5", + "@insertish/oapi": "0.2.6", "in-publish": "^2.0.1", "openapi-typescript": "^5.4.2", "typescript": "^5.8.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b4a362e..a80518a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: devDependencies: '@insertish/oapi': - specifier: 0.2.5 - version: 0.2.5 + specifier: 0.2.6 + version: 0.2.6 in-publish: specifier: ^2.0.1 version: 2.0.1 @@ -27,8 +27,8 @@ packages: resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} - '@insertish/oapi@0.2.5': - resolution: {integrity: sha512-qepXfQz/jrT2DhvzMYzNzQN9HsuEZkDCPJFbszBuftIahXosmkoxgBHIyxYMCo1yVvBnMnfwSqYJTm9GmJ0JNw==} + '@insertish/oapi@0.2.6': + resolution: {integrity: sha512-6IWpLFhygWu+hN8+bNXH3pK0hypxoS522Vn6AOhphzXrWQlDo6IhEWRWXV/XlyYQIPiugkDcqtD2p0dtB9Wftg==} hasBin: true argparse@2.0.1: @@ -88,7 +88,7 @@ snapshots: '@fastify/busboy@2.1.1': {} - '@insertish/oapi@0.2.5': + '@insertish/oapi@0.2.6': dependencies: typescript: 4.9.5 optionalDependencies: diff --git a/src/index.ts b/src/index.ts index fc698d2..dce7657 100644 --- a/src/index.ts +++ b/src/index.ts @@ -205,7 +205,10 @@ export class API { body: passbody, }); - const data = await fetchdata[config?.responseType || "json"](); + const data = + fetchdata.status === 204 + ? null + : await fetchdata[config?.responseType || "json"](); if (fetchdata.ok) { return data;