Skip to content

Commit

Permalink
docs: deno version (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Nov 6, 2023
1 parent 5da63d4 commit 74bf336
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build-deno
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -exuo pipefail
rm -rf deno; mkdir deno
cp -rp src/* deno

# x-release-please-start-version
PACKAGE_VERSION=$(node -p 'require("./package.json").version')

cat << EOF > deno/README.md
# OpenAI Node API Library - Deno build
Expand All @@ -14,7 +15,7 @@ This is a build produced from https://github.com/openai/openai-node – please g
Usage:
\`\`\`ts
import OpenAI from "https://deno.land/x/[email protected]/mod.ts";
import OpenAI from "$(echo 'https://deno.land/x/[email protected]/mod.ts' | sed -E s/@\.+\\//@"$PACKAGE_VERSION"\\//)";
const client = new OpenAI();
\`\`\`
Expand All @@ -25,7 +26,6 @@ Note that in many Deno environments, you can also do this:
import OpenAI from "npm:openai";
\`\`\`
EOF
# x-release-please-end

rm deno/_shims/auto/*-node.ts
for dir in deno/_shims deno/_shims/auto; do
Expand Down

0 comments on commit 74bf336

Please sign in to comment.