Compare commits

...

1 Commits

Author SHA1 Message Date
Alex Yang 972dda5e9b fix: bundle output incorrect 2025-02-10 21:22:24 +08:00
37 changed files with 497 additions and 201 deletions
+38
View File
@@ -0,0 +1,38 @@
---
"@llamaindex/pinecone": patch
"@llamaindex/postgres": patch
"@llamaindex/weaviate": patch
"@llamaindex/mongodb": patch
"@llamaindex/upstash": patch
"@llamaindex/chroma": patch
"@llamaindex/milvus": patch
"@llamaindex/qdrant": patch
"@llamaindex/astra": patch
"@llamaindex/azure": patch
"@llamaindex/huggingface": patch
"@llamaindex/mixedbread": patch
"@llamaindex/portkey-ai": patch
"@llamaindex/anthropic": patch
"@llamaindex/deepinfra": patch
"@llamaindex/replicate": patch
"@llamaindex/mistral": patch
"@llamaindex/cohere": patch
"@llamaindex/google": patch
"@llamaindex/ollama": patch
"@llamaindex/openai": patch
"@llamaindex/vercel": patch
"@llamaindex/clip": patch
"@llamaindex/groq": patch
"@llamaindex/vllm": patch
"@llamaindex/node-parser": patch
"@llamaindex/community": patch
"@llamaindex/autotool": patch
"@llamaindex/workflow": patch
"@llamaindex/readers": patch
"@llamaindex/cloud": patch
"@llamaindex/core": patch
"@llamaindex/env": patch
"llamaindex": patch
---
fix: bundle output incorrect
+5
View File
@@ -37,5 +37,10 @@
"packageManager": "pnpm@9.12.3",
"lint-staged": {
"(!apps/docs/i18n/**/docusaurus-plugin-content-docs/current/api/*).{js,jsx,ts,tsx,md}": "prettier --write"
},
"pnpm": {
"patchedDependencies": {
"bunchee": "patches/bunchee.patch"
}
}
}
+1 -1
View File
@@ -70,7 +70,7 @@
"@swc/types": "^0.1.12",
"@types/json-schema": "^7.0.15",
"@types/node": "^22.9.0",
"bunchee": "6.2.0",
"bunchee": "6.3.3",
"llamaindex": "workspace:*",
"next": "15.0.3",
"rollup": "^4.28.1",
+1 -1
View File
@@ -68,7 +68,7 @@
"@hey-api/openapi-ts": "^0.61.0",
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"peerDependencies": {
"@llamaindex/core": "workspace:*",
+1 -1
View File
@@ -43,7 +43,7 @@
},
"devDependencies": {
"@types/node": "^22.9.0",
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@aws-sdk/client-bedrock-agent-runtime": "^3.706.0",
+1 -1
View File
@@ -391,7 +391,7 @@
"devDependencies": {
"@edge-runtime/vm": "^4.0.4",
"ajv": "^8.17.1",
"bunchee": "6.2.0",
"bunchee": "6.3.3",
"happy-dom": "^15.11.6",
"natural": "^8.0.1"
},
+1 -1
View File
@@ -125,7 +125,7 @@
"@huggingface/transformers": "^3.0.2",
"@types/node": "^22.9.0",
"@types/readable-stream": "^4.0.15",
"bunchee": "6.2.0",
"bunchee": "6.3.3",
"gpt-tokenizer": "^2.6.2",
"pathe": "^1.1.2",
"vitest": "^2.1.5"
+1 -1
View File
@@ -43,7 +43,7 @@
"@llamaindex/env": "workspace:*",
"@types/html-to-text": "^9.0.4",
"@types/node": "^22.9.0",
"bunchee": "6.2.0",
"bunchee": "6.3.3",
"tree-sitter": "^0.22.1",
"web-tree-sitter": "^0.24.4"
},
+1 -1
View File
@@ -31,7 +31,7 @@
"test": "vitest run"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@anthropic-ai/sdk": "0.32.1",
+1 -1
View File
@@ -39,7 +39,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@huggingface/transformers": "^3.0.2",
+1 -1
View File
@@ -30,7 +30,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
+1 -1
View File
@@ -30,7 +30,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
+4 -4
View File
@@ -30,12 +30,12 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"@google-cloud/vertexai": "1.9.0",
"@google/generative-ai": "0.21.0",
"@google-cloud/vertexai": "1.9.0"
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*"
}
}
+1 -1
View File
@@ -30,7 +30,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/env": "workspace:*",
+1 -1
View File
@@ -39,7 +39,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@huggingface/inference": "^2.8.1",
+1 -1
View File
@@ -30,7 +30,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
+1 -1
View File
@@ -30,7 +30,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
+1 -1
View File
@@ -30,7 +30,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
+1 -1
View File
@@ -30,7 +30,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
+1 -1
View File
@@ -30,7 +30,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
+1 -1
View File
@@ -38,7 +38,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
@@ -38,11 +38,11 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@datastax/astra-db-ts": "^1.4.1",
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"@datastax/astra-db-ts": "^1.4.1"
"@llamaindex/env": "workspace:*"
}
}
@@ -56,15 +56,15 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0",
"@types/node": "^22.9.0"
"@types/node": "^22.9.0",
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"@azure/cosmos": "^4.1.1",
"@azure/identity": "^4.4.1",
"@azure/search-documents": "^12.1.0",
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"mongodb": "^6.7.0"
}
}
@@ -38,7 +38,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
@@ -38,12 +38,12 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@grpc/grpc-js": "^1.12.2",
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"@grpc/grpc-js": "^1.12.2",
"@zilliz/milvus2-sdk-node": "^2.4.6"
}
}
@@ -38,7 +38,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
@@ -38,7 +38,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
@@ -38,9 +38,9 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0",
"@types/pg": "^8.11.8",
"@vercel/postgres": "^0.10.0",
"bunchee": "6.3.3",
"pg": "^8.12.0",
"pgvector": "0.2.0",
"postgres": "^3.4.4"
@@ -38,7 +38,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
@@ -38,7 +38,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
@@ -38,7 +38,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
+1 -1
View File
@@ -38,7 +38,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/core": "workspace:*",
+1 -1
View File
@@ -30,7 +30,7 @@
"dev": "bunchee --watch"
},
"devDependencies": {
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"dependencies": {
"@llamaindex/openai": "workspace:*"
+1 -1
View File
@@ -212,7 +212,7 @@
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"@types/node": "^22.9.0",
"bunchee": "6.2.0",
"bunchee": "6.3.3",
"p-limit": "^6.1.0",
"string-strip-html": "^13.4.8"
},
+1 -1
View File
@@ -56,7 +56,7 @@
"devDependencies": {
"@llamaindex/env": "workspace:*",
"@types/node": "^22.9.0",
"bunchee": "6.2.0"
"bunchee": "6.3.3"
},
"peerDependencies": {
"@llamaindex/env": "workspace:*"
+30
View File
@@ -0,0 +1,30 @@
diff --git a/dist/bin/cli.js b/dist/bin/cli.js
old mode 100755
new mode 100644
diff --git a/dist/index.js b/dist/index.js
index b77587c074ea9d6072cd1de209a786dfbeebf105..66c0eba9bbbb68ec7308e7a7fe528c6a764e09e7 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1369,10 +1369,19 @@ function aliasEntries({ entry: sourceFilePath, conditionNames, entries, format,
})) == null ? undefined : _exportMapEntries_find1.bundlePath;
}
} else {
- var _exportMapEntries_find2;
- matchedBundlePath = (_exportMapEntries_find2 = exportMapEntries.find((item)=>{
+ var _exportMapEntries_sort_find;
+ matchedBundlePath = (_exportMapEntries_sort_find = exportMapEntries.sort(// always put special condition after the general condition (default, cjs, esm)
+ (a, b)=>{
+ if (a.conditionNames.has(specialCondition)) {
+ return -1;
+ }
+ if (b.conditionNames.has(specialCondition)) {
+ return 1;
+ }
+ return 0;
+ }).find((item)=>{
return findJsBundlePathCallback(item, specialCondition);
- })) == null ? undefined : _exportMapEntries_find2.bundlePath;
+ })) == null ? undefined : _exportMapEntries_sort_find.bundlePath;
}
if (matchedBundlePath) {
if (!sourceToRelativeBundleMap.has(exportCondition.source)) sourceToRelativeBundleMap.set(exportCondition.source, matchedBundlePath);
+382 -159
View File
File diff suppressed because it is too large Load Diff