Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
b08e9e5
vibe-wip
jrieken Jan 22, 2026
d6a69b9
vibe-wip
jrieken Jan 22, 2026
7896df9
ts boilerplate cleanup not needed
jrieken Jan 22, 2026
b4d5f56
Fix esbuild resource copying for development and test builds
jrieken Jan 22, 2026
da67537
Merge branch 'main' into joh/esbuild-the-things
jrieken Jan 23, 2026
07eb6b4
fix: suppress log warnings for unsupported require calls in esbuild c…
jrieken Jan 23, 2026
b14c8c9
fix: remove logOverride for unsupported require calls in esbuild conf…
jrieken Jan 23, 2026
3138cd6
refactor: improve transpile process and add incremental build support
jrieken Jan 23, 2026
aba6094
Merge branch 'main' into joh/esbuild-the-things
jrieken Jan 30, 2026
e4c62aa
updates
jrieken Jan 30, 2026
ddbeee8
feat: enhance TypeScript transpilation and bundling process with esbu…
jrieken Jan 30, 2026
5aa871a
feat: add UTF-8 BOM handling for test files in copy process
jrieken Jan 30, 2026
b513b49
feat(nls): add NLS plugin for esbuild and analysis utilities
jrieken Jan 30, 2026
f87458c
feat: refactor CLI command handling and enhance bundling options for …
jrieken Jan 30, 2026
7642c07
feat(nls): implement NLS plugin for esbuild with message extraction a…
jrieken Jan 30, 2026
73dcb47
feat: implement esbuild-based bundling tasks and enhance NLS processing
jrieken Feb 2, 2026
9213327
Merge branch 'main' into joh/esbuild-the-things
jrieken Feb 3, 2026
286945b
feat: enhance esbuild bundling with target support for desktop, serve…
jrieken Feb 3, 2026
35f4232
TRY use esbuild for core-ci
jrieken Feb 3, 2026
ebe5d39
better error handling
jrieken Feb 3, 2026
fa93faf
feat: add copyCodiconsTask to core CI and esbuild tasks
jrieken Feb 3, 2026
fddb80a
no out-build needed
jrieken Feb 3, 2026
07e68d1
fix: update date handling in jsonEditor for product.json and add buil…
jrieken Feb 3, 2026
cacf5f8
feat: enhance finalizeNLS to support writing to multiple output direc…
jrieken Feb 3, 2026
ed6fcf2
feat: add esbuild transpile task with support for excluding test file…
jrieken Feb 4, 2026
2b8a35b
Merge branch 'main' into joh/esbuild-the-things
jrieken Feb 4, 2026
7cf0cec
feat: enhance build process with product configuration and built-in e…
jrieken Feb 4, 2026
ca10b50
fix: update regex in replaceInOutput to handle both single and double…
jrieken Feb 4, 2026
02e60e2
feat: add esbuild-based bundling tasks for standalone web target
jrieken Feb 4, 2026
ab64672
Merge branch 'main' into joh/esbuild-the-things
jrieken Feb 4, 2026
467980a
remove query arg from codicon.css
jrieken Feb 4, 2026
ae8e3c3
feat: add copyCodiconsTask to vscode-web CI build process
jrieken Feb 5, 2026
1ab650b
Merge branch 'main' into joh/esbuild-the-things
jrieken Feb 5, 2026
772a2d0
Refactor build system: replace createFileContentMapper with fileConte…
jrieken Feb 5, 2026
67cd70d
Merge branch 'main' into joh/esbuild-the-things
jrieken Feb 6, 2026
878df8b
Refactor build system to support esbuild with new transpile and typec…
jrieken Feb 6, 2026
696c09b
add
jrieken Feb 9, 2026
d27f42a
use
jrieken Feb 9, 2026
eabd95d
Add Type-check task using tsgo to the build process
jrieken Feb 9, 2026
450ee67
Merge remote-tracking branch 'origin/main' into joh/esbuild-the-things
jrieken Feb 9, 2026
6d6e9a4
Refactor build process: remove unused entry points and update resourc…
jrieken Feb 9, 2026
2ef2abb
Merge remote-tracking branch 'origin/main' into joh/esbuild-the-things
jrieken Feb 9, 2026
6a3282d
Merge remote-tracking branch 'origin/main' into joh/esbuild-the-things
jrieken Feb 9, 2026
9a9079b
esbuild:
jrieken Feb 9, 2026
18456cc
source maps: sourcesContent, CDN URL rewriting, replace @parcel/watcher
jrieken Feb 10, 2026
5ea70f9
refactor: streamline vscode build tasks and remove esbuild variants
jrieken Feb 10, 2026
1974429
fix: restore check for out-build
jrieken Feb 10, 2026
edc58f9
delete: remove obsolete compare-builds script
jrieken Feb 10, 2026
b8f398d
Merge remote-tracking branch 'origin/main' into joh/esbuild-the-things
jrieken Feb 10, 2026
dbf3cdf
fix: update date handling in jsonEditor for product.json
jrieken Feb 10, 2026
3180e94
fix: remove test file exclusion from watch stream
jrieken Feb 10, 2026
e562211
fix: remove keyboardMapEntryPoints from desktop entry points and nls.…
jrieken Feb 10, 2026
eae6d8b
fix: update error pattern and file location in tasks.json for improve…
jrieken Feb 10, 2026
ed009cc
include
jrieken Feb 10, 2026
2cb8fc3
Merge remote-tracking branch 'origin/main' into joh/esbuild-the-things
jrieken Feb 11, 2026
34ced5f
write
jrieken Feb 11, 2026
bce5388
adds component explorer (#294075)
hediet Feb 11, 2026
46f41a8
Adjust icon size in ActivitybarPart from 24 to 16
mrleemurray Feb 11, 2026
22f0a71
Merge pull request #294536 from microsoft/mrleemurray/free-olive-snipe
mrleemurray Feb 11, 2026
6441536
Chat context API feedback (#294537)
alexr00 Feb 11, 2026
341b0df
Update @vscode/codicons to version 0.0.45-6 in package.json and packa…
mrleemurray Feb 11, 2026
7ae568a
refactor: streamline NLS messages writing in finalizeNLS function
jrieken Feb 11, 2026
f4ca471
Be explicit about tasks running shell commands
Tyriar Feb 11, 2026
4ec289c
Merge pull request #294541 from microsoft/mrleemurray/chosen-bronze-p…
mrleemurray Feb 11, 2026
e23d246
Update src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.ts
Tyriar Feb 11, 2026
0f090cc
Merge pull request #294573 from microsoft/tyriar/shell
Tyriar Feb 11, 2026
0749dc9
adds component explorer (#294548)
hediet Feb 11, 2026
a7cc092
Adding lineHeightsAdded array to onLinesInserted (#289634)
aiday-mar Feb 11, 2026
c600be4
Merge pull request #294145 from microsoft/joh/esbuild-the-things
jrieken Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,17 @@
"order": 4
}
},
{
"name": "Component Explorer",
"type": "chrome",
"request": "launch",
"url": "http://localhost:5199/___explorer",
"preLaunchTask": "Launch Monaco Editor Vite",
"presentation": {
"group": "monaco",
"order": 4
}
},
{
"name": "Monaco Editor - Self Contained Diff Editor",
"type": "chrome",
Expand Down
52 changes: 48 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,40 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch-client-transpiled",
"label": "Core - Transpile",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "buildWatchers",
"close": false
},
"problemMatcher": {
"owner": "esbuild",
"applyTo": "closedDocuments",
"fileLocation": [
"relative",
"${workspaceFolder}/src"
],
"pattern": {
"regexp": "^(.+?):(\\d+):(\\d+): ERROR: (.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
},
"background": {
"beginsPattern": "Starting transpilation...",
"endsPattern": "Finished transpilation with"
}
}
},
{
"type": "npm",
"script": "watch-clientd",
"label": "Core - Build",
"label": "Core - Typecheck",
"isBackground": true,
"presentation": {
"reveal": "never",
Expand Down Expand Up @@ -60,7 +90,8 @@
{
"label": "VS Code - Build",
"dependsOn": [
"Core - Build",
"Core - Transpile",
"Core - Typecheck",
"Ext - Build"
],
"group": {
Expand All @@ -69,10 +100,22 @@
},
"problemMatcher": []
},
{
"type": "npm",
"script": "kill-watch-client-transpiled",
"label": "Kill Core - Transpile",
"group": "build",
"presentation": {
"reveal": "never",
"group": "buildKillers",
"close": true
},
"problemMatcher": "$tsc"
},
{
"type": "npm",
"script": "kill-watch-clientd",
"label": "Kill Core - Build",
"label": "Kill Core - Typecheck",
"group": "build",
"presentation": {
"reveal": "never",
Expand All @@ -96,7 +139,8 @@
{
"label": "Kill VS Code - Build",
"dependsOn": [
"Kill Core - Build",
"Kill Core - Transpile",
"Kill Core - Typecheck",
"Kill Ext - Build"
],
"group": "build",
Expand Down
12 changes: 12 additions & 0 deletions build/buildConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

/**
* When `true`, self-hosting uses esbuild for fast transpilation (build/next)
* and gulp-tsb only for type-checking (`noEmit`).
*
* When `false`, gulp-tsb does both transpilation and type-checking (old behavior).
*/
export const useEsbuildTranspile = true;
5 changes: 4 additions & 1 deletion build/gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { compileExtensionMediaTask, compileExtensionsTask, watchExtensionsTask }
import * as compilation from './lib/compilation.ts';
import * as task from './lib/task.ts';
import * as util from './lib/util.ts';
import { useEsbuildTranspile } from './buildConfig.ts';

const require = createRequire(import.meta.url);

Expand All @@ -32,7 +33,9 @@ gulp.task(transpileClientTask);
const compileClientTask = task.define('compile-client', task.series(util.rimraf('out'), compilation.copyCodiconsTask, compilation.compileApiProposalNamesTask, compilation.compileTask('src', 'out', false)));
gulp.task(compileClientTask);

const watchClientTask = task.define('watch-client', task.series(util.rimraf('out'), task.parallel(compilation.watchTask('out', false), compilation.watchApiProposalNamesTask, compilation.watchCodiconsTask)));
const watchClientTask = useEsbuildTranspile
? task.define('watch-client', task.parallel(compilation.watchTask('out', false, 'src', { noEmit: true }), compilation.watchApiProposalNamesTask, compilation.watchCodiconsTask))
: task.define('watch-client', task.series(util.rimraf('out'), task.parallel(compilation.watchTask('out', false), compilation.watchApiProposalNamesTask, compilation.watchCodiconsTask)));
gulp.task(watchClientTask);

// All
Expand Down
142 changes: 128 additions & 14 deletions build/gulpfile.vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ import { createAsar } from './lib/asar.ts';
import minimist from 'minimist';
import { compileBuildWithoutManglingTask, compileBuildWithManglingTask } from './gulpfile.compile.ts';
import { compileNonNativeExtensionsBuildTask, compileNativeExtensionsBuildTask, compileAllExtensionsBuildTask, compileExtensionMediaBuildTask, cleanExtensionsBuildTask } from './gulpfile.extensions.ts';
import { copyCodiconsTask } from './lib/compilation.ts';
import { useEsbuildTranspile } from './buildConfig.ts';
import { promisify } from 'util';
import globCallback from 'glob';
import rceditCallback from 'rcedit';
import * as cp from 'child_process';


const glob = promisify(globCallback);
Expand Down Expand Up @@ -152,6 +155,81 @@ const bundleVSCodeTask = task.define('bundle-vscode', task.series(
));
gulp.task(bundleVSCodeTask);

// esbuild-based bundle tasks (drop-in replacement for bundle-vscode / minify-vscode)
function runEsbuildTranspile(outDir: string, excludeTests: boolean): Promise<void> {
return new Promise((resolve, reject) => {
const scriptPath = path.join(root, 'build/next/index.ts');
const args = [scriptPath, 'transpile', '--out', outDir];
if (excludeTests) {
args.push('--exclude-tests');
}

const proc = cp.spawn(process.execPath, args, {
cwd: root,
stdio: 'inherit'
});

proc.on('error', reject);
proc.on('close', code => {
if (code === 0) {
resolve();
} else {
reject(new Error(`esbuild transpile failed with exit code ${code} (outDir: ${outDir})`));
}
});
});
}

function runEsbuildBundle(outDir: string, minify: boolean, nls: boolean, target: 'desktop' | 'server' | 'server-web' = 'desktop', sourceMapBaseUrl?: string): Promise<void> {
return new Promise((resolve, reject) => {
// const tsxPath = path.join(root, 'build/node_modules/tsx/dist/cli.mjs');
const scriptPath = path.join(root, 'build/next/index.ts');
const args = [scriptPath, 'bundle', '--out', outDir, '--target', target];
if (minify) {
args.push('--minify');
}
if (nls) {
args.push('--nls');
}
if (sourceMapBaseUrl) {
args.push('--source-map-base-url', sourceMapBaseUrl);
}

const proc = cp.spawn(process.execPath, args, {
cwd: root,
stdio: 'inherit'
});

proc.on('error', reject);
proc.on('close', code => {
if (code === 0) {
resolve();
} else {
reject(new Error(`esbuild bundle failed with exit code ${code} (outDir: ${outDir}, minify: ${minify}, nls: ${nls}, target: ${target})`));
}
});
});
}

function runTsGoTypeCheck(): Promise<void> {
return new Promise((resolve, reject) => {
const proc = cp.spawn('tsgo', ['--project', 'src/tsconfig.json', '--noEmit', '--skipLibCheck'], {
cwd: root,
stdio: 'inherit',
shell: true
});

proc.on('error', reject);
proc.on('close', code => {
if (code === 0) {
resolve();
} else {
reject(new Error(`tsgo typecheck failed with exit code ${code}`));
}
});
});
}

const sourceMappingURLBase = `https://main.vscode-cdn.net/sourcemaps/${commit}`;
const minifyVSCodeTask = task.define('minify-vscode', task.series(
bundleVSCodeTask,
Expand All @@ -160,15 +238,35 @@ const minifyVSCodeTask = task.define('minify-vscode', task.series(
));
gulp.task(minifyVSCodeTask);

const coreCI = task.define('core-ci', task.series(
const coreCIOld = task.define('core-ci-old', task.series(
gulp.task('compile-build-with-mangling') as task.Task,
task.parallel(
gulp.task('minify-vscode') as task.Task,
gulp.task('minify-vscode-reh') as task.Task,
gulp.task('minify-vscode-reh-web') as task.Task,
)
));
gulp.task(coreCI);
gulp.task(coreCIOld);

const coreCIEsbuild = task.define('core-ci-esbuild', task.series(
copyCodiconsTask,
cleanExtensionsBuildTask,
compileNonNativeExtensionsBuildTask,
compileExtensionMediaBuildTask,
// Type-check with tsgo (no emit)
task.define('tsgo-typecheck', () => runTsGoTypeCheck()),
// Transpile individual files to out-build first (for unit tests)
task.define('esbuild-out-build', () => runEsbuildTranspile('out-build', false)),
// Then bundle for shipping (bundles also write NLS files to out-build)
task.parallel(
task.define('esbuild-vscode-min', () => runEsbuildBundle('out-vscode-min', true, true, 'desktop', `${sourceMappingURLBase}/core`)),
task.define('esbuild-vscode-reh-min', () => runEsbuildBundle('out-vscode-reh-min', true, true, 'server', `${sourceMappingURLBase}/core`)),
task.define('esbuild-vscode-reh-web-min', () => runEsbuildBundle('out-vscode-reh-web-min', true, true, 'server-web', `${sourceMappingURLBase}/core`)),
)
));
gulp.task(coreCIEsbuild);

gulp.task(task.define('core-ci', useEsbuildTranspile ? coreCIEsbuild : coreCIOld));

const coreCIPR = task.define('core-ci-pr', task.series(
gulp.task('compile-build-without-mangling') as task.Task,
Expand Down Expand Up @@ -516,27 +614,43 @@ BUILD_TARGETS.forEach(buildTarget => {
const sourceFolderName = `out-vscode${dashed(minified)}`;
const destinationFolderName = `VSCode${dashed(platform)}${dashed(arch)}`;

const tasks = [
const packageTasks: task.Task[] = [
compileNativeExtensionsBuildTask,
util.rimraf(path.join(buildRoot, destinationFolderName)),
packageTask(platform, arch, sourceFolderName, destinationFolderName, opts)
];

if (platform === 'win32') {
tasks.push(patchWin32DependenciesTask(destinationFolderName));
packageTasks.push(patchWin32DependenciesTask(destinationFolderName));
}

const vscodeTaskCI = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}-ci`, task.series(...tasks));
const vscodeTaskCI = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}-ci`, task.series(...packageTasks));
gulp.task(vscodeTaskCI);

const vscodeTask = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}`, task.series(
minified ? compileBuildWithManglingTask : compileBuildWithoutManglingTask,
cleanExtensionsBuildTask,
compileNonNativeExtensionsBuildTask,
compileExtensionMediaBuildTask,
minified ? minifyVSCodeTask : bundleVSCodeTask,
vscodeTaskCI
));
let vscodeTask: task.Task;
if (useEsbuildTranspile) {
const esbuildBundleTask = task.define(
`esbuild-bundle${dashed(platform)}${dashed(arch)}${dashed(minified)}`,
() => runEsbuildBundle(sourceFolderName, !!minified, true, 'desktop', minified ? `${sourceMappingURLBase}/core` : undefined)
);
vscodeTask = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}`, task.series(
copyCodiconsTask,
cleanExtensionsBuildTask,
compileNonNativeExtensionsBuildTask,
compileExtensionMediaBuildTask,
esbuildBundleTask,
vscodeTaskCI
));
} else {
vscodeTask = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}`, task.series(
minified ? compileBuildWithManglingTask : compileBuildWithoutManglingTask,
cleanExtensionsBuildTask,
compileNonNativeExtensionsBuildTask,
compileExtensionMediaBuildTask,
minified ? minifyVSCodeTask : bundleVSCodeTask,
vscodeTaskCI
));
}
gulp.task(vscodeTask);

return vscodeTask;
Expand Down Expand Up @@ -568,7 +682,7 @@ const innoSetupConfig: Record<string, { codePage: string; defaultInfo?: { name:
gulp.task(task.define(
'vscode-translations-export',
task.series(
coreCI,
gulp.task('core-ci') as task.Task,
compileAllExtensionsBuildTask,
function () {
const pathToMetadata = './out-build/nls.metadata.json';
Expand Down
Loading
Loading