diff --git a/build/npm/dirs.js b/build/npm/dirs.js index bd332502..cb026785 100644 --- a/build/npm/dirs.js +++ b/build/npm/dirs.js @@ -7,8 +7,6 @@ const fs = require('fs'); // Complete list of directories where npm should be executed to install node modules const dirs = [ - 'extensions/void', // <-- Void - '', 'build', 'extensions', @@ -55,6 +53,11 @@ const dirs = [ 'test/smoke', '.vscode/extensions/vscode-selfhost-import-aid', '.vscode/extensions/vscode-selfhost-test-provider', + + // Void added these: + 'extensions/void', + 'void-imports', + ]; if (fs.existsSync(`${__dirname}/../../.build/distro/npm`)) { diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js index e38c2cb0..f36c0ac8 100644 --- a/build/npm/postinstall.js +++ b/build/npm/postinstall.js @@ -139,3 +139,21 @@ for (let dir of dirs) { cp.execSync('git config pull.rebase merges'); cp.execSync('git config blame.ignoreRevsFile .git-blame-ignore-revs'); + + +// Void added this (inject void-imports into project): +const buildVoidImports = () => { + console.log('\n\nVoid is injecting void-imports...') + cp.execSync(`npm install`, { // this goes here, not in postinstall, because we need to + env: process.env, + cwd: path.join(__dirname, '..', '..', '/void-imports'), + stdio: 'inherit' + }); + cp.execSync(`node build-index.mjs`, { + env: process.env, + cwd: path.join(__dirname, '..', '..', '/void-imports'), + stdio: 'inherit' + }); + console.log('Done injecting void-imports.') +} +buildVoidImports() diff --git a/void-imports/build-index.mjs b/void-imports/build-index.mjs index ee90ea65..11aa38ee 100755 --- a/void-imports/build-index.mjs +++ b/void-imports/build-index.mjs @@ -6,7 +6,7 @@ tsup.build({ sourcemap: false, bundle: true, clean: true, - minify: true, + // minify: true, // no need to minify since it all gets bundled later outDir: '../src/vs/workbench/contrib/void/browser/out', dts: false, name: 'void-imports', diff --git a/void-imports/package-lock.json b/void-imports/package-lock.json index 93f46f8b..7ac4c36a 100644 --- a/void-imports/package-lock.json +++ b/void-imports/package-lock.json @@ -6,7 +6,6 @@ "packages": { "": { "name": "void-imports", - "version": "1.0.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", "openai": "^4.71.0"