From cf446401e55a43a5604b12a790a1ee508dec466d Mon Sep 17 00:00:00 2001
From: Alex Yang <himself65@outlook.com>
Date: Wed, 31 Jan 2024 12:45:02 -0600
Subject: [PATCH] fix: instanceof issue (#492)

---
 .changeset/unlucky-penguins-invent.md |  7 +++
 packages/core/package.json            | 79 ++++++++++++++++++++++++++-
 2 files changed, 84 insertions(+), 2 deletions(-)
 create mode 100644 .changeset/unlucky-penguins-invent.md

diff --git a/.changeset/unlucky-penguins-invent.md b/.changeset/unlucky-penguins-invent.md
new file mode 100644
index 000000000..f2862b6bb
--- /dev/null
+++ b/.changeset/unlucky-penguins-invent.md
@@ -0,0 +1,7 @@
+---
+"llamaindex": patch
+---
+
+fix: `instanceof` issue
+
+This will fix QueryEngine cannot run.
diff --git a/packages/core/package.json b/packages/core/package.json
index 34e66b5ca..7db0964b8 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -63,6 +63,81 @@
       "edge-light": "./dist/env.edge-light.mjs",
       "require": "./dist/env.js"
     },
+    "./ChatEngine": {
+      "types": "./dist/ChatEngine.d.mts",
+      "import": "./dist/ChatEngine.mjs",
+      "require": "./dist/ChatEngine.js"
+    },
+    "./ChatHistory": {
+      "types": "./dist/ChatHistory.d.mts",
+      "import": "./dist/ChatHistory.mjs",
+      "require": "./dist/ChatHistory.js"
+    },
+    "./constants": {
+      "types": "./dist/constants.d.mts",
+      "import": "./dist/constants.mjs",
+      "require": "./dist/constants.js"
+    },
+    "./GlobalsHelper": {
+      "types": "./dist/GlobalsHelper.d.mts",
+      "import": "./dist/GlobalsHelper.mjs",
+      "require": "./dist/GlobalsHelper.js"
+    },
+    "./Node": {
+      "types": "./dist/Node.d.mts",
+      "import": "./dist/Node.mjs",
+      "require": "./dist/Node.js"
+    },
+    "./OutputParser": {
+      "types": "./dist/OutputParser.d.mts",
+      "import": "./dist/OutputParser.mjs",
+      "require": "./dist/OutputParser.js"
+    },
+    "./Prompt": {
+      "types": "./dist/Prompt.d.mts",
+      "import": "./dist/Prompt.mjs",
+      "require": "./dist/Prompt.js"
+    },
+    "./PromptHelper": {
+      "types": "./dist/PromptHelper.d.mts",
+      "import": "./dist/PromptHelper.mjs",
+      "require": "./dist/PromptHelper.js"
+    },
+    "./QueryEngine": {
+      "types": "./dist/QueryEngine.d.mts",
+      "import": "./dist/QueryEngine.mjs",
+      "require": "./dist/QueryEngine.js"
+    },
+    "./QuestionGenerator": {
+      "types": "./dist/QuestionGenerator.d.mts",
+      "import": "./dist/QuestionGenerator.mjs",
+      "require": "./dist/QuestionGenerator.js"
+    },
+    "./Response": {
+      "types": "./dist/Response.d.mts",
+      "import": "./dist/Response.mjs",
+      "require": "./dist/Response.js"
+    },
+    "./Retriever": {
+      "types": "./dist/Retriever.d.mts",
+      "import": "./dist/Retriever.mjs",
+      "require": "./dist/Retriever.js"
+    },
+    "./ServiceContext": {
+      "types": "./dist/ServiceContext.d.mts",
+      "import": "./dist/ServiceContext.mjs",
+      "require": "./dist/ServiceContext.js"
+    },
+    "./TextSplitter": {
+      "types": "./dist/TextSplitter.d.mts",
+      "import": "./dist/TextSplitter.mjs",
+      "require": "./dist/TextSplitter.js"
+    },
+    "./Tool": {
+      "types": "./dist/Tool.d.mts",
+      "import": "./dist/Tool.mjs",
+      "require": "./dist/Tool.js"
+    },
     "./readers/AssemblyAIReader": {
       "types": "./dist/readers/AssemblyAIReader.d.mts",
       "import": "./dist/readers/AssemblyAIReader.mjs",
@@ -125,12 +200,12 @@
   "scripts": {
     "lint": "eslint .",
     "test": "jest",
-    "build": "bunchee",
+    "build": "NODE_OPTIONS=\"--max-old-space-size=8192\" bunchee",
     "postbuild": "pnpm run copy && pnpm run modify-package-json",
     "copy": "cp -r package.json CHANGELOG.md ../../README.md ../../LICENSE examples src dist/",
     "modify-package-json": "node ./scripts/modify-package-json.mjs",
     "prepublish": "pnpm run modify-package-json && echo \"please cd ./dist and run pnpm publish\" && exit 1",
-    "dev": "bunchee -w",
+    "dev": "NODE_OPTIONS=\"--max-old-space-size=8192\" bunchee -w",
     "circular-check": "madge -c ./src/index.ts"
   }
 }
-- 
GitLab