diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2907428..2d1deb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: - name: Get GitHub OIDC Token if: github.repository == 'stainless-sdks/zeroentropy-node' id: github-oidc - uses: actions/github-script@v6 + uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 332798e..347d8bf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.8" + ".": "0.1.0-alpha.9" } diff --git a/CHANGELOG.md b/CHANGELOG.md index dd947f0..785e433 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.1.0-alpha.9 (2026-02-03) + +Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/zeroentropy-ai/zeroentropy-node/compare/v0.1.0-alpha.8...v0.1.0-alpha.9) + +### Chores + +* **ci:** upgrade `actions/github-script` ([055cbcb](https://github.com/zeroentropy-ai/zeroentropy-node/commit/055cbcbdb5c87322ee175428f0e89c791fe56148)) +* **client:** do not parse responses with empty content-length ([2e11491](https://github.com/zeroentropy-ai/zeroentropy-node/commit/2e114913288d1d1ad63bb8b452984e95531d2dff)) + ## 0.1.0-alpha.8 (2026-01-21) Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/zeroentropy-ai/zeroentropy-node/compare/v0.1.0-alpha.7...v0.1.0-alpha.8) diff --git a/package.json b/package.json index d810099..08a5782 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zeroentropy", - "version": "0.1.0-alpha.8", + "version": "0.1.0-alpha.9", "description": "The official TypeScript library for the ZeroEntropy API", "author": "ZeroEntropy ", "types": "dist/index.d.ts", diff --git a/src/core.ts b/src/core.ts index ef2aacf..acb5e51 100644 --- a/src/core.ts +++ b/src/core.ts @@ -70,6 +70,12 @@ async function defaultParseResponse(props: APIResponseProps): Promise { const mediaType = contentType?.split(';')[0]?.trim(); const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json'); if (isJSON) { + const contentLength = response.headers.get('content-length'); + if (contentLength === '0') { + // if there is no content we can't do anything + return undefined as T; + } + const json = await response.json(); debug('response', response.status, response.url, response.headers, json); diff --git a/src/version.ts b/src/version.ts index 2cc4fcd..fdbf689 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.1.0-alpha.8'; // x-release-please-version +export const VERSION = '0.1.0-alpha.9'; // x-release-please-version