Skip to content

Conversation

@EhabY
Copy link
Collaborator

@EhabY EhabY commented Jan 7, 2026

Summary

This PR modernizes the build infrastructure, resulting in >2x faster CI builds through better caching (pnpm) and faster tooling (esbuild).

Build System

  • Replace Webpack with esbuild for extension bundling - (x5 - x10 improvement)
  • Add esbuild.mjs configuration with watch mode support and openpgp CJS alias fix
  • Remove webpack, webpack-cli, and ts-loader dependencies
  • Add --no-dependencies to vsce packaging (dependencies are bundled by esbuild)

Package Manager Migration

  • Migrate from yarn to pnpm - enables better dependency caching in CI
  • Add pnpm-workspace.yaml with onlyBuiltDependencies for native modules
  • Enable caching for prettier and eslint (--cache --cache-strategy content)

CI/CD Improvements

  • Use pnpm/action-setup@v4 with built-in caching
  • Remove global npm install -g @vscode/vsce - use local devDependency instead
  • Add multi-version test matrix:
    • Unit tests: Electron 32 (VS Code 1.95 minimum) and latest
    • Integration tests: VS Code 1.95.0 and stable
  • Add scripts/test-electron.sh for version-specific test runs

Other Changes

  • Update minimum VS Code engine: 1.73.0 → 1.95.0
  • Update @types/node to v20, add explicit node >= 20 engine requirement

- Add esbuild.mjs build configuration
- Update build/watch/package scripts to use esbuild
- Enable caching for prettier and eslint commands
- Remove webpack, ts-loader, and eslint-plugin-prettier
@EhabY EhabY force-pushed the speed-up-build branch 2 times, most recently from 232ada8 to 0c0946b Compare January 9, 2026 11:01
@EhabY EhabY changed the title Replace Webpack with esbuild and add multi-version CI testing Modernize build tooling: esbuild + pnpm and add multi-version CI testing Jan 9, 2026
EhabY added 2 commits January 13, 2026 11:42
- Bundle openpgp as CJS to avoid ESM runtime errors
- Add type checking to build scripts
- Fix iconPath to use vscode.Uri.file()
- Update @types/node, @types/vscode, and VS Code engine to 1.95.0
- Run unit tests against Electron 32 and latest via matrix
- Add integration test job for VS Code 1.95.0 and stable
- Add test-electron.sh script for version-specific test runs
Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems chill to me

Comment on lines +56 to +62
- name: Run tests with Electron ${{ matrix.electron-version }}
run: ./scripts/test-electron.sh ${{ matrix.electron-version }}
env:
CI: true

test-integration:
name: Integration Test (VS Code ${{ matrix.vscode-version }})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice indeed!

},

// Webpack config - CommonJS with Node globals
// Build config - ESM with Node globals
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be me being dense but it looks like the esbuild.mjs outputs CJS, not ESM like implied in this comment?

Or is this just saying that the build config itself is ESM, not that the output of it is ESM?

@@ -0,0 +1,9 @@
# Native modules allowed to run install scripts (pnpm blocks by default for security)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh interesting, did not know about this. Definitely a plus for pnpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants