diff --git a/package.json b/package.json index c36545437..bc88fa747 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "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", + "prepare": "if [ $(basename $(dirname $PWD)) = 'node_modules' ]; then npm run build; fi", "tsn": "ts-node -r tsconfig-paths/register", "lint": "eslint --ext ts,js .", "fix": "eslint --fix --ext ts,js ." @@ -39,7 +39,6 @@ "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", @@ -56,6 +55,10 @@ "./shims/web.js", "./shims/web.mjs" ], + "imports": { + "openai": ".", + "openai/*": "./src/*" + }, "exports": { "./_shims/auto/*": { "deno": { diff --git a/yarn.lock b/yarn.lock index f64db8cd5..4ddf947ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3062,19 +3062,6 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -"openai@file:.": - version "4.20.0" - 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" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64"