diff --git a/packages/cli/package.json b/packages/cli/package.json index 08ad0c1d38..62a42cc2c8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -72,7 +72,7 @@ "zx": "^8.1.2" }, "scripts": { - "compile": "esbuild src/main.ts --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:tsx --external:dockerode --external:pdfjs-dist --external:llamaindex --external:web-tree-sitter --external:tree-sitter-wasms --external:promptfoo && node ../../scripts/patch-cli.mjs", + "compile": "esbuild src/main.ts --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:tsx --external:esbuild --external:get-tsconfig --external:resolve-pkg-maps --external:dockerode --external:pdfjs-dist --external:llamaindex --external:web-tree-sitter --external:tree-sitter-wasms --external:promptfoo && node ../../scripts/patch-cli.mjs", "postcompile": "node built/genaiscript.cjs info help > ../../docs/src/content/docs/reference/cli/commands.md", "go": "yarn compile && node built/genaiscript.cjs", "test": "node --import tsx --test src/**.test.ts", diff --git a/packages/vscode/package.json b/packages/vscode/package.json index e6aef1c6ab..6ee3369aa8 100644 --- a/packages/vscode/package.json +++ b/packages/vscode/package.json @@ -357,7 +357,7 @@ "vscode:update-dts": "npx @vscode/dts dev && mv vscode.*.d.ts src/", "vscode:prepublish": "yarn run compile", "compile:icons": "node updatefonts.mjs", - "compile:extension": "esbuild src/extension.ts --sourcemap --bundle --format=cjs --platform=node --target=node20 --outfile=built/extension.js --external:tsx --external:vscode --external:pdfjs-dist --external:llamaindex --external:web-tree-sitter --external:tree-sitter-wasms", + "compile:extension": "esbuild src/extension.ts --sourcemap --bundle --format=cjs --platform=node --target=node20 --outfile=built/extension.js --external:tsx --external:esbuild --external:get-tsconfig --external:resolve-pkg-maps --external:vscode --external:pdfjs-dist --external:llamaindex --external:web-tree-sitter --external:tree-sitter-wasms", "compile": "yarn compile:icons && yarn compile:extension", "lint": "eslint src --ext ts", "run-in-browser": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=. ../sample", diff --git a/packages/vscode/prepackage.mjs b/packages/vscode/prepackage.mjs index 94d24d1781..1a4fc5f075 100644 --- a/packages/vscode/prepackage.mjs +++ b/packages/vscode/prepackage.mjs @@ -1,6 +1,7 @@ import "zx/globals" // workaround yarn workspaces +await fs.rmdir("./node_modules", { recursive: true }) for (const m of [ "pdfjs-dist", "tree-sitter-wasms", @@ -8,6 +9,7 @@ for (const m of [ "tsx", "esbuild", "get-tsconfig", + "resolve-pkg-maps" ]) { await fs.copy(`../../node_modules/${m}`, `./node_modules/${m}`, { recursive: true,