Skip to content

Commit b7f3312

Browse files
committed
chore(internal): remove file import and conditionally run prepare (#533)
1 parent b3036a1 commit b7f3312

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"prepack": "echo 'to pack, run yarn build && (cd dist; yarn pack)' && exit 1",
1616
"prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1",
1717
"format": "prettier --write --cache --cache-strategy metadata . !dist",
18-
"prepare": "npm run build",
18+
"prepare": "if [ $(basename $(dirname $PWD)) = 'node_modules' ]; then npm run build; fi",
1919
"tsn": "ts-node -r tsconfig-paths/register",
2020
"lint": "eslint --ext ts,js .",
2121
"fix": "eslint --fix --ext ts,js ."
@@ -39,7 +39,6 @@
3939
"eslint-plugin-prettier": "^4.0.0",
4040
"eslint-plugin-unused-imports": "^2.0.0",
4141
"jest": "^29.4.0",
42-
"openai": "file:.",
4342
"prettier": "rattrayalex/prettier#postfix-ternaries",
4443
"ts-jest": "^29.1.0",
4544
"ts-morph": "^19.0.0",
@@ -56,6 +55,10 @@
5655
"./shims/web.js",
5756
"./shims/web.mjs"
5857
],
58+
"imports": {
59+
"openai": ".",
60+
"openai/*": "./src/*"
61+
},
5962
"exports": {
6063
"./_shims/auto/*": {
6164
"deno": {

yarn.lock

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3062,19 +3062,6 @@ onetime@^5.1.2:
30623062
dependencies:
30633063
mimic-fn "^2.1.0"
30643064

3065-
"openai@file:.":
3066-
version "4.20.0"
3067-
dependencies:
3068-
"@types/node" "^18.11.18"
3069-
"@types/node-fetch" "^2.6.4"
3070-
abort-controller "^3.0.0"
3071-
agentkeepalive "^4.2.1"
3072-
digest-fetch "^1.3.0"
3073-
form-data-encoder "1.7.2"
3074-
formdata-node "^4.3.2"
3075-
node-fetch "^2.6.7"
3076-
web-streams-polyfill "^3.2.1"
3077-
30783065
optionator@^0.9.3:
30793066
version "0.9.3"
30803067
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64"

0 commit comments

Comments
 (0)