|
@@ -1,18 +1,27 @@
|
|
|
{
|
|
|
- "type": "module",
|
|
|
"name": "ollama",
|
|
|
"version": "0.0.0",
|
|
|
"description": "Ollama Javascript library",
|
|
|
- "main": "dist/index.js",
|
|
|
+ "main": "dist/index.cjs",
|
|
|
+ "module": "dist/index.mjs",
|
|
|
"types": "dist/index.d.ts",
|
|
|
"exports": {
|
|
|
- ".": "./dist/index.js",
|
|
|
- "./browser": "./dist/browser.js"
|
|
|
+ ".": {
|
|
|
+ "require": "./dist/index.cjs",
|
|
|
+ "import": "./dist/index.mjs",
|
|
|
+ "types": "./dist/index.d.ts"
|
|
|
+ },
|
|
|
+ "./browser": {
|
|
|
+ "require": "./dist/browser.cjs",
|
|
|
+ "import": "./dist/browser.mjs",
|
|
|
+ "types": "./dist/browser.d.ts"
|
|
|
+ },
|
|
|
+ "./*": "./*"
|
|
|
},
|
|
|
"scripts": {
|
|
|
"format": "prettier --write .",
|
|
|
"test": "jest --config=jest.config.cjs ./test/*",
|
|
|
- "build": "mkdir -p dist && touch dist/cleanup && rm dist/* && tsc -b",
|
|
|
+ "build": "unbuild",
|
|
|
"lint": "eslint ./src/*",
|
|
|
"prepublishOnly": "npm run build"
|
|
|
},
|
|
@@ -34,7 +43,8 @@
|
|
|
"jest": "^29.3.0",
|
|
|
"prettier": "^3.2.4",
|
|
|
"ts-jest": "^29.0.3",
|
|
|
- "typescript": "^4.8.4"
|
|
|
+ "typescript": "^5.3.2",
|
|
|
+ "unbuild": "^2.0.0"
|
|
|
},
|
|
|
"dependencies": {
|
|
|
"whatwg-fetch": "^3.6.20"
|