From 647ba7a52311928f604c72b2cc95698c0837887f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 22:37:36 +0000 Subject: [PATCH 1/5] fix(client): fix export map for index exports (#1328) --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index dc61af02c..46f58814d 100644 --- a/package.json +++ b/package.json @@ -112,17 +112,17 @@ "default": "./dist/index.mjs" }, "./*.mjs": { - "types": "./dist/*.d.ts", - "default": "./dist/*.mjs" + "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], + "default": ["./dist/*.mjs", "./dist/*/index.mjs"] }, "./*.js": { - "types": "./dist/*.d.ts", - "default": "./dist/*.js" + "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], + "default": ["./dist/*.js", "./dist/*/index.js"] }, "./*": { - "types": "./dist/*.d.ts", - "require": "./dist/*.js", - "default": "./dist/*.mjs" + "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], + "require": ["./dist/*.js", "./dist/*/index.js"], + "default": ["./dist/*.mjs", "./dist/*/index.mjs"] } }, "bin": "./bin/cli", From e4b554632ab1646da831f29413fefb3378c49cc1 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Fri, 14 Feb 2025 10:19:22 +0000 Subject: [PATCH 2/5] fix(package): add chat/completions.ts back in (#1333) --- src/resources/chat/completions.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/resources/chat/completions.ts diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts new file mode 100644 index 000000000..55b151e8b --- /dev/null +++ b/src/resources/chat/completions.ts @@ -0,0 +1 @@ +export * from './completions/completions'; From 53e0856ec4d36deee4d71b5aaf436df0a59b9402 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Fri, 14 Feb 2025 10:30:35 +0000 Subject: [PATCH 3/5] chore(internal): add missing return type annotation (#1334) --- src/pagination.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pagination.ts b/src/pagination.ts index ad90a3a74..7a513fc44 100644 --- a/src/pagination.ts +++ b/src/pagination.ts @@ -77,7 +77,7 @@ export class CursorPage return this.data ?? []; } - override hasNextPage() { + override hasNextPage(): boolean { if (this.has_more === false) { return false; } From 506c1a6483d55dad23eb36f475af7d71f0567619 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Fri, 14 Feb 2025 10:28:44 +0000 Subject: [PATCH 4/5] CI: add ecosystem tests (#1332) --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ .gitignore | 2 +- ecosystem-tests/cli.ts | 1 + 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6798e38a..85d792c44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,3 +64,36 @@ jobs: - name: Run tests run: ./scripts/test + + ecosystem_tests: + name: ecosystem tests (v${{ matrix.node-version }}) + runs-on: ubuntu-latest + if: github.repository == 'openai/openai-node' + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + node-version: ['20'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '${{ matrix.node-version }}' + + - uses: denoland/setup-deno@v1 + with: + deno-version: v1.39.0 + + - uses: oven-sh/setup-bun@v2 + + - name: Bootstrap + run: ./scripts/bootstrap + + - name: Run ecosystem tests + run: | + yarn tsn ecosystem-tests/cli.ts --live --verbose --parallel --jobs=4 --retry=3 + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} diff --git a/.gitignore b/.gitignore index 81c4c41ca..3fdab1cb7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,4 @@ tmp .pack ecosystem-tests/deno/package.json ecosystem-tests/*/openai.tgz - +.dev.vars diff --git a/ecosystem-tests/cli.ts b/ecosystem-tests/cli.ts index 4803b47c2..77faddec5 100644 --- a/ecosystem-tests/cli.ts +++ b/ecosystem-tests/cli.ts @@ -70,6 +70,7 @@ const projectRunners = { 'cloudflare-worker': async () => { await installPackage(); + await fs.writeFile('.dev.vars', `OPENAI_API_KEY='${process.env['OPENAI_API_KEY']}'`); await run('npm', ['run', 'tsc']); if (state.live) { From b9959e28fcde82b5753391005f511a7c311d1c32 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 10:31:06 +0000 Subject: [PATCH 5/5] release: 4.85.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 +++++++++++++ jsr.json | 2 +- package.json | 37 +++++++++++++++++++++++++++-------- src/version.ts | 2 +- 5 files changed, 46 insertions(+), 11 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f48cc7f57..89f1ce153 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.85.0" + ".": "4.85.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 290b2414d..9850ac460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 4.85.1 (2025-02-14) + +Full Changelog: [v4.85.0...v4.85.1](https://github.com/openai/openai-node/compare/v4.85.0...v4.85.1) + +### Bug Fixes + +* **client:** fix export map for index exports ([#1328](https://github.com/openai/openai-node/issues/1328)) ([647ba7a](https://github.com/openai/openai-node/commit/647ba7a52311928f604c72b2cc95698c0837887f)) +* **package:** add chat/completions.ts back in ([#1333](https://github.com/openai/openai-node/issues/1333)) ([e4b5546](https://github.com/openai/openai-node/commit/e4b554632ab1646da831f29413fefb3378c49cc1)) + + +### Chores + +* **internal:** add missing return type annotation ([#1334](https://github.com/openai/openai-node/issues/1334)) ([53e0856](https://github.com/openai/openai-node/commit/53e0856ec4d36deee4d71b5aaf436df0a59b9402)) + ## 4.85.0 (2025-02-13) Full Changelog: [v4.84.1...v4.85.0](https://github.com/openai/openai-node/compare/v4.84.1...v4.85.0) diff --git a/jsr.json b/jsr.json index 368f86c0b..0e1eea3b3 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@openai/openai", - "version": "4.85.0", + "version": "4.85.1", "exports": { ".": "./index.ts", "./helpers/zod": "./helpers/zod.ts", diff --git a/package.json b/package.json index 46f58814d..45337f85d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.85.0", + "version": "4.85.1", "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", @@ -112,17 +112,38 @@ "default": "./dist/index.mjs" }, "./*.mjs": { - "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], - "default": ["./dist/*.mjs", "./dist/*/index.mjs"] + "types": [ + "./dist/*.d.ts", + "./dist/*/index.d.ts" + ], + "default": [ + "./dist/*.mjs", + "./dist/*/index.mjs" + ] }, "./*.js": { - "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], - "default": ["./dist/*.js", "./dist/*/index.js"] + "types": [ + "./dist/*.d.ts", + "./dist/*/index.d.ts" + ], + "default": [ + "./dist/*.js", + "./dist/*/index.js" + ] }, "./*": { - "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], - "require": ["./dist/*.js", "./dist/*/index.js"], - "default": ["./dist/*.mjs", "./dist/*/index.mjs"] + "types": [ + "./dist/*.d.ts", + "./dist/*/index.d.ts" + ], + "require": [ + "./dist/*.js", + "./dist/*/index.js" + ], + "default": [ + "./dist/*.mjs", + "./dist/*/index.mjs" + ] } }, "bin": "./bin/cli", diff --git a/src/version.ts b/src/version.ts index 6483fa72b..52fb45056 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.85.0'; // x-release-please-version +export const VERSION = '4.85.1'; // x-release-please-version