feat: WIP add support for native fetch; undici on node.js < 18, and refactor conversation support
Showing
... | @@ -19,13 +19,14 @@ | ... | @@ -19,13 +19,14 @@ |
"build" | "build" | ||
], | ], | ||
"engines": { | "engines": { | ||
"node": ">=14" | "node": ">=16.8" | ||
}, | }, | ||
"scripts": { | "scripts": { | ||
"build": "tsup", | "build": "tsup", | ||
"dev": "tsup --watch", | "dev": "tsup --watch", | ||
"clean": "del build", | "clean": "del build", | ||
"prebuild": "run-s clean", | "prebuild": "run-s clean", | ||
"postbuild": "sed -i 's/ *\\?\\? *(await import(\"undici\")).fetch//' build/browser/index.js", | |||
"predev": "run-s clean", | "predev": "run-s clean", | ||
"pretest": "run-s build", | "pretest": "run-s build", | ||
"docs": "typedoc", | "docs": "typedoc", | ||
... | @@ -38,7 +39,6 @@ | ... | @@ -38,7 +39,6 @@ |
"dependencies": { | "dependencies": { | ||
"eventsource-parser": "^0.0.5", | "eventsource-parser": "^0.0.5", | ||
"expiry-map": "^2.0.0", | "expiry-map": "^2.0.0", | ||
"node-fetch": "2", | |||
"remark": "^14.0.2", | "remark": "^14.0.2", | ||
"strip-markdown": "^5.0.0", | "strip-markdown": "^5.0.0", | ||
"uuid": "^9.0.0" | "uuid": "^9.0.0" | ||
... | @@ -46,7 +46,6 @@ | ... | @@ -46,7 +46,6 @@ |
"devDependencies": { | "devDependencies": { | ||
"@trivago/prettier-plugin-sort-imports": "^4.0.0", | "@trivago/prettier-plugin-sort-imports": "^4.0.0", | ||
"@types/node": "^18.11.9", | "@types/node": "^18.11.9", | ||
"@types/node-fetch": "2", | |||
"@types/uuid": "^9.0.0", | "@types/uuid": "^9.0.0", | ||
"ava": "^5.1.0", | "ava": "^5.1.0", | ||
"del-cli": "^5.0.0", | "del-cli": "^5.0.0", | ||
... | @@ -89,5 +88,8 @@ | ... | @@ -89,5 +88,8 @@ |
"ai", | "ai", | ||
"ml", | "ml", | ||
"bot" | "bot" | ||
] | ], | ||
"optionalDependencies": { | |||
"undici": "^5.13.0" | |||
} | |||
} | } |
src/chatgpt-conversation.ts
0 → 100644
Please register or sign in to comment