diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e5a652cc9..85b77e4e6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.15.1" + ".": "4.15.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 862072779..559ee76d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.15.2 (2023-11-04) + +Full Changelog: [v4.15.1...v4.15.2](https://github.com/openai/openai-node/compare/v4.15.1...v4.15.2) + +### Documentation + +* fix deno.land import ([#423](https://github.com/openai/openai-node/issues/423)) ([e5415a2](https://github.com/openai/openai-node/commit/e5415a29ab447ced8535fafda7928b0a6748c8d1)) + ## 4.15.1 (2023-11-04) Full Changelog: [v4.15.0...v4.15.1](https://github.com/openai/openai-node/compare/v4.15.0...v4.15.1) diff --git a/README.md b/README.md index f88338db8..8f9808973 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,10 @@ yarn add openai You can import in Deno via: - - ```ts -import OpenAI from 'https://raw.githubusercontent.com/openai/openai-node/v4.15.0-deno/mod.ts'; +import OpenAI from 'https://deno.land/x/openai'; ``` - - ## Usage The full API of this library can be found in [api.md file](https://github.com/openai/openai-node/blob/master/api.md). The code below shows how to get started using the chat completions API. diff --git a/package.json b/package.json index 3a151d484..8655de2c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.15.1", + "version": "4.15.2", "description": "Client library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/scripts/git-publish-deno.sh b/scripts/git-publish-deno.sh index 81e0d9544..77238067d 100755 --- a/scripts/git-publish-deno.sh +++ b/scripts/git-publish-deno.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -exuo pipefail # This script pushes the contents of the `deno`` directory to the `deno` branch, # and creates a `vx.x.x-deno` tag, so that Deno users can @@ -10,6 +11,7 @@ # - Set the following environment variables when running this script: # - DENO_PUSH_REMOTE_URL - the remote url of the separate GitHub repo # - DENO_PUSH_BRANCH - the branch you want to push to in that repo (probably `main`) +# - DENO_MAIN_BRANCH - the branch you want as the main branch in that repo (probably `main`, sometimes `master`) # - DENO_PUSH_VERSION - defaults to version in package.json # - DENO_PUSH_RELEASE_TAG - defaults to v$DENO_PUSH_VERSION-deno @@ -18,8 +20,6 @@ die () { exit 1 } -set -exuo pipefail - # Allow caller to set the following environment variables, but provide defaults # if unset # : "${FOO:=bar}" sets FOO=bar unless it's set and non-empty @@ -28,8 +28,15 @@ set -exuo pipefail : "${DENO_PUSH_VERSION:=$(node -p 'require("./package.json").version')}" : "${DENO_PUSH_BRANCH:=deno}" +: "${DENO_MAIN_BRANCH:=main}" : "${DENO_PUSH_REMOTE_URL:=$(git remote get-url origin)}" -: "${DENO_PUSH_RELEASE_TAG:="v$DENO_PUSH_VERSION-deno"}" +: "${DENO_GIT_USER_NAME:="Stainless Bot"}" +: "${DENO_GIT_USER_NAME:="bot@stainlessapi.com"}" +if [[ $DENO_PUSH_BRANCH = "deno" ]]; then + : "${DENO_PUSH_RELEASE_TAG:="v$DENO_PUSH_VERSION-deno"}" +else + : "${DENO_PUSH_RELEASE_TAG:="v$DENO_PUSH_VERSION"}" +fi if [ ! -e deno ]; then ./build; fi @@ -41,7 +48,7 @@ if [ ! -e deno ]; then ./build; fi cd deno rm -rf .git -git init +git init -b "$DENO_MAIN_BRANCH" git remote add origin "$DENO_PUSH_REMOTE_URL" if git fetch origin "$DENO_PUSH_RELEASE_TAG"; then die "Tag $DENO_PUSH_RELEASE_TAG already exists" @@ -56,6 +63,10 @@ else # the branch doesn't exist on the remote yet git checkout -b "$DENO_PUSH_BRANCH" fi + +git config user.email "$DENO_GIT_USER_EMAIL" +git config user.name "$DENO_GIT_USER_NAME" + git add . git commit -m "chore(deno): release $DENO_PUSH_VERSION" git tag -a "$DENO_PUSH_RELEASE_TAG" -m "release $DENO_PUSH_VERSION" diff --git a/src/version.ts b/src/version.ts index ee8ab7a77..1d1cd7337 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.15.1'; // x-release-please-version +export const VERSION = '4.15.2'; // x-release-please-version