Elffuss BraidHub

kikocis/continue public

skip installations and downloads on extension run
Changeset3407abe9e658ab662256105a5fd0bb69889c316601776d19ab2216bbe2ee10a9
Authoruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-06-19 16:41 +05:30
Committeruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-06-19 16:41 +05:30
Parentsd0cd3fef8227

Browse the files at this changeset

3 files changed

modified .vscode/tasks.json +3 −0
@@ -103,6 +103,9 @@
103103 "clear": true
104104 },
105105 "options": {
106+ "env": {
107+ "SKIP_INSTALLS": "true"
108+ },
106109 "cwd": "${workspaceFolder}/extensions/vscode"
107110 }
108111 },
modified extensions/vscode/scripts/prepackage.js +29 −23
@@ -27,6 +27,8 @@
2727 fs.mkdirSync(guiDist, { recursive: true });
2828 }
2929
30+const skipInstalls = process.env.SKIP_INSTALLS === "true";
31+
3032 // Get the target to package for
3133 let target = undefined;
3234 const args = process.argv;
@@ -70,7 +72,9 @@
7072 // Make sure we have an initial timestamp file
7173 writeBuildTimestamp();
7274
73- await Promise.all([generateAndCopyConfigYamlSchema(), npmInstall()]);
75+ if (!skipInstalls) {
76+ await Promise.all([generateAndCopyConfigYamlSchema(), npmInstall()]);
77+ }
7478
7579 process.chdir(path.join(continueDir, "gui"));
7680
@@ -264,28 +268,30 @@
264268 );
265269 });
266270
267- // GitHub Actions doesn't support ARM, so we need to download pre-saved binaries
268- // 02/07/25 - the above comment is out of date, there is now support for ARM runners on GitHub Actions
269- if (isArmTarget) {
270- // lancedb binary
271- const packageToInstall = {
272- "darwin-arm64": "@lancedb/vectordb-darwin-arm64",
273- "linux-arm64": "@lancedb/vectordb-linux-arm64-gnu",
274- "win32-arm64": "@lancedb/vectordb-win32-arm64-msvc",
275- }[target];
276- console.log(
277- "[info] Downloading pre-built lancedb binary: " + packageToInstall,
278- );
279-
280- await Promise.all([
281- copyEsbuild(target),
282- copySqlite(target),
283- installAndCopyNodeModules(packageToInstall, "@lancedb"),
284- ]);
285- } else {
286- // Download esbuild from npm in tmp and copy over
287- console.log("[info] npm installing esbuild binary");
288- await installAndCopyNodeModules("esbuild@0.17.19", "@esbuild");
271+ if (!skipInstalls) {
272+ // GitHub Actions doesn't support ARM, so we need to download pre-saved binaries
273+ // 02/07/25 - the above comment is out of date, there is now support for ARM runners on GitHub Actions
274+ if (isArmTarget) {
275+ // lancedb binary
276+ const packageToInstall = {
277+ "darwin-arm64": "@lancedb/vectordb-darwin-arm64",
278+ "linux-arm64": "@lancedb/vectordb-linux-arm64-gnu",
279+ "win32-arm64": "@lancedb/vectordb-win32-arm64-msvc",
280+ }[target];
281+ console.log(
282+ "[info] Downloading pre-built lancedb binary: " + packageToInstall,
283+ );
284+
285+ await Promise.all([
286+ copyEsbuild(target),
287+ copySqlite(target),
288+ installAndCopyNodeModules(packageToInstall, "@lancedb"),
289+ ]);
290+ } else {
291+ // Download esbuild from npm in tmp and copy over
292+ console.log("[info] npm installing esbuild binary");
293+ await installAndCopyNodeModules("esbuild@0.17.19", "@esbuild");
294+ }
289295 }
290296
291297 console.log("[info] Copying sqlite node binding from core");
modified scripts/install-dependencies.sh +1 −1
@@ -57,7 +57,7 @@
5757 # This does way too many things inline but is the common denominator between many of the scripts
5858 npm install
5959 npm link @continuedev/core
60-npm run prepackage
60+# npm run prepackage # not required since npm run package has prescript of prepackage
6161 npm run package
6262 popd
6363