From 51926d7a0092744e49de39f4988feddf313adafa Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Tue, 21 Nov 2023 14:22:02 -0500 Subject: [PATCH 1/3] feat: allow installing package directly from github (#522) --- package.json | 79 +++++++++++++++--------------- scripts/make-dist-package-json.cjs | 1 + yarn.lock | 15 ++++-- 3 files changed, 53 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index 6600364aa..36db4724f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "openai", "version": "4.19.1", - "description": "Client library for the OpenAI API", + "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", "main": "dist/index.js", @@ -9,6 +9,45 @@ "repository": "github:openai/openai-node", "license": "Apache-2.0", "private": false, + "scripts": { + "test": "bin/check-test-server && yarn jest", + "build": "bash ./build", + "prepack": "echo 'to pack, run yarn build && (cd dist; yarn pack)' && exit 1", + "prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1", + "format": "prettier --write --cache --cache-strategy metadata . !dist", + "prepare": "npm run build", + "tsn": "ts-node -r tsconfig-paths/register", + "lint": "eslint --ext ts,js .", + "fix": "eslint --fix --ext ts,js ." + }, + "dependencies": { + "@types/node": "^18.11.18", + "@types/node-fetch": "^2.6.4", + "abort-controller": "^3.0.0", + "agentkeepalive": "^4.2.1", + "digest-fetch": "^1.3.0", + "form-data-encoder": "1.7.2", + "formdata-node": "^4.3.2", + "node-fetch": "^2.6.7", + "web-streams-polyfill": "^3.2.1" + }, + "devDependencies": { + "@types/jest": "^29.4.0", + "@typescript-eslint/eslint-plugin": "^6.7.0", + "@typescript-eslint/parser": "^6.7.0", + "eslint": "^8.49.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-unused-imports": "^2.0.0", + "jest": "^29.4.0", + "openai": "file:.", + "prettier": "rattrayalex/prettier#postfix-ternaries", + "ts-jest": "^29.1.0", + "ts-morph": "^19.0.0", + "ts-node": "^10.5.0", + "tsc-multi": "^1.1.0", + "tsconfig-paths": "^4.0.0", + "typescript": "^4.8.2" + }, "sideEffects": [ "./_shims/index.js", "./_shims/index.mjs", @@ -75,43 +114,5 @@ "default": "./dist/*.mjs" } }, - "scripts": { - "test": "bin/check-test-server && yarn jest", - "build": "bash ./build", - "prepack": "echo 'to pack, run yarn build && (cd dist; yarn pack)' && exit 1", - "prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1", - "format": "prettier --write --cache --cache-strategy metadata . !dist", - "tsn": "ts-node -r tsconfig-paths/register", - "lint": "eslint --ext ts,js .", - "fix": "eslint --fix --ext ts,js ." - }, - "dependencies": { - "@types/node": "^18.11.18", - "@types/node-fetch": "^2.6.4", - "abort-controller": "^3.0.0", - "agentkeepalive": "^4.2.1", - "digest-fetch": "^1.3.0", - "form-data-encoder": "1.7.2", - "formdata-node": "^4.3.2", - "node-fetch": "^2.6.7", - "web-streams-polyfill": "^3.2.1" - }, - "devDependencies": { - "@types/jest": "^29.4.0", - "@typescript-eslint/eslint-plugin": "^6.7.0", - "@typescript-eslint/parser": "^6.7.0", - "eslint": "^8.49.0", - "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-unused-imports": "^2.0.0", - "jest": "^29.4.0", - "openai": "link:.", - "prettier": "rattrayalex/prettier#postfix-ternaries", - "ts-jest": "^29.1.0", - "ts-morph": "^19.0.0", - "ts-node": "^10.5.0", - "tsc-multi": "^1.1.0", - "tsconfig-paths": "^4.0.0", - "typescript": "^4.8.2" - }, "bin": "./bin/cli" } diff --git a/scripts/make-dist-package-json.cjs b/scripts/make-dist-package-json.cjs index 8c5889fa8..b0ee528a3 100644 --- a/scripts/make-dist-package-json.cjs +++ b/scripts/make-dist-package-json.cjs @@ -16,5 +16,6 @@ for (const key of ['types', 'main', 'module']) { delete pkgJson.devDependencies; delete pkgJson.scripts.prepack; delete pkgJson.scripts.prepublishOnly; +delete pkgJson.scripts.postinstall; console.log(JSON.stringify(pkgJson, null, 2)); diff --git a/yarn.lock b/yarn.lock index d01ab81de..6c1f3ddbb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3062,9 +3062,18 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -"openai@link:.": - version "0.0.0" - uid "" +"openai@file:.": + version "4.19.1" + dependencies: + "@types/node" "^18.11.18" + "@types/node-fetch" "^2.6.4" + abort-controller "^3.0.0" + agentkeepalive "^4.2.1" + digest-fetch "^1.3.0" + form-data-encoder "1.7.2" + formdata-node "^4.3.2" + node-fetch "^2.6.7" + web-streams-polyfill "^3.2.1" optionator@^0.9.3: version "0.9.3" From d09411ebaa28d6610e1b880d03339d520b4a1833 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Tue, 21 Nov 2023 15:15:48 -0500 Subject: [PATCH 2/3] chore(internal): don't call prepare in dist (#525) --- scripts/make-dist-package-json.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make-dist-package-json.cjs b/scripts/make-dist-package-json.cjs index b0ee528a3..def768ed0 100644 --- a/scripts/make-dist-package-json.cjs +++ b/scripts/make-dist-package-json.cjs @@ -16,6 +16,6 @@ for (const key of ['types', 'main', 'module']) { delete pkgJson.devDependencies; delete pkgJson.scripts.prepack; delete pkgJson.scripts.prepublishOnly; -delete pkgJson.scripts.postinstall; +delete pkgJson.scripts.prepare; console.log(JSON.stringify(pkgJson, null, 2)); From e15c34ce4419a93b8d3a28e22ed491ce82ac3d89 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:17:34 -0500 Subject: [PATCH 3/3] release: 4.20.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ README.md | 2 +- build-deno | 2 +- package.json | 2 +- src/version.ts | 2 +- 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 07aa952c2..fd68703c5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.19.1" + ".": "4.20.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d88ec3f5c..2e1282079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 4.20.0 (2023-11-22) + +Full Changelog: [v4.19.1...v4.20.0](https://github.com/openai/openai-node/compare/v4.19.1...v4.20.0) + +### Features + +* allow installing package directly from github ([#522](https://github.com/openai/openai-node/issues/522)) ([51926d7](https://github.com/openai/openai-node/commit/51926d7a0092744e49de39f4988feddf313adafa)) + + +### Chores + +* **internal:** don't call prepare in dist ([#525](https://github.com/openai/openai-node/issues/525)) ([d09411e](https://github.com/openai/openai-node/commit/d09411ebaa28d6610e1b880d03339d520b4a1833)) + ## 4.19.1 (2023-11-20) Full Changelog: [v4.19.0...v4.19.1](https://github.com/openai/openai-node/compare/v4.19.0...v4.19.1) diff --git a/README.md b/README.md index 1434126e7..d94e078d5 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ You can import in Deno via: ```ts -import OpenAI from 'https://deno.land/x/openai@v4.19.1/mod.ts'; +import OpenAI from 'https://deno.land/x/openai@v4.20.0/mod.ts'; ``` diff --git a/build-deno b/build-deno index 8f91b48fe..4d09c455a 100755 --- a/build-deno +++ b/build-deno @@ -14,7 +14,7 @@ This is a build produced from https://github.com/openai/openai-node – please g Usage: \`\`\`ts -import OpenAI from "https://deno.land/x/openai@v4.19.1/mod.ts"; +import OpenAI from "https://deno.land/x/openai@v4.20.0/mod.ts"; const client = new OpenAI(); \`\`\` diff --git a/package.json b/package.json index 36db4724f..c36545437 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.19.1", + "version": "4.20.0", "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 5673c14ed..2963d8825 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.19.1'; // x-release-please-version +export const VERSION = '4.20.0'; // x-release-please-version