diff --git a/package.json b/package.json index c972f3e..64ef7a5 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,13 @@ "author": "Travis Fischer ", "repository": "transitive-bullshit/chatgpt-api", "license": "MIT", - "type": "module", "source": "./src/index.ts", "types": "./build/index.d.ts", + "main": "./build/index.js", "exports": { ".": { - "import": "./build/index.js", - "default": "./build/index.js", + "import": "./build/index.mjs", + "require": "./build/index.js", "types": "./build/index.d.ts" } }, @@ -37,15 +37,15 @@ "dependencies": { "eventsource-parser": "^0.0.5", "expiry-map": "^2.0.0", - "node-fetch": "2", - "remark": "^14.0.2", - "strip-markdown": "^5.0.0", + "node-fetch": "^2.6.7", + "remark": "^13.0.0", + "strip-markdown": "^4.2.0", "uuid": "^9.0.0" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.0.0", "@types/node": "^18.11.9", - "@types/node-fetch": "2", + "@types/node-fetch": "^2.6.2", "@types/uuid": "^9.0.0", "del-cli": "^5.0.0", "dotenv-safe": "^8.2.0", diff --git a/src/utils.ts b/src/utils.ts index 724f3b2..3c3d026 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,4 @@ -import { remark } from 'remark' +import remark from 'remark' import stripMarkdown from 'strip-markdown' export function markdownToText(markdown?: string): string { diff --git a/tsup.config.ts b/tsup.config.ts index 5dedfd7..4953fc3 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ outDir: 'build', target: 'node14', platform: 'node', - format: ['esm'], + format: ['esm', 'cjs'], splitting: false, sourcemap: true, minify: true,