Skip to content

fix: support Bun runtime for esbuild installation - #26

Merged
ambar merged 1 commit into
mainfrom
fix/support-bun-runtime
Apr 7, 2026
Merged

ambar merged 1 commit into
mainfrom
fix/support-bun-runtime

Conversation

@ambar

@ambar ambar commented Apr 7, 2026

Copy link
Copy Markdown
Owner

Summary

Changes

  • esbuild.ts: Add bun i --production to the package manager fallback chain (pnpm → yarn → npm → bun), so users in Bun-only environments can use the extension
  • esbuild.ts: Replace hasEsbuild() with getEsbuildVersion() to log the resolved version
  • esbuild.ts: Add log messages for each install attempt (failed/skipping, success with version, already found)
  • extension.ts: Pass log directly to install() so messages go to the "Bundle Size" output channel

Testing

  1. With Node.js available: extension should install esbuild via pnpm/yarn/npm as before
  2. With only Bun available: extension should fall back to bun i --production
  3. Check "Bundle Size" output channel for install logs

Closes #21

🤖 Generated with Claude Code

Add `bun i --production` as a fallback package manager for installing
esbuild, so users without Node.js (e.g. Bun-only environments) can use
the extension. Also add install logging to the output channel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown

Size Change: +93 B (+0.64%)

Total Size: 14.6 kB

📦 View Changed
Filename Size Change
vscode-bundle-size/out/esbuild.js 646 B +116 B (+21.89%) 🚨
vscode-bundle-size/out/extension.js 2.8 kB -23 B (-0.81%)
ℹ️ View Unchanged
Filename Size
measure-bundle-size/dist/analyzeMetafile.d.ts 194 B
measure-bundle-size/dist/analyzeMetafile.js 1.79 kB
measure-bundle-size/dist/findPkg.d.ts 267 B
measure-bundle-size/dist/findPkg.js 1.01 kB
measure-bundle-size/dist/index.d.ts 47 B
measure-bundle-size/dist/index.js 411 B
measure-bundle-size/dist/measure.d.ts 730 B
measure-bundle-size/dist/measure.js 4.17 kB
measure-bundle-size/dist/parse.d.ts 223 B
measure-bundle-size/dist/parse.js 1.59 kB
measure-bundle-size/dist/stripFlowTypes.d.ts 237 B
measure-bundle-size/dist/stripFlowTypes.js 489 B

compressed-size-action

@ambar
ambar merged commit daecd55 into main Apr 7, 2026
2 checks passed
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 24086442577

Coverage remained the same at 90.437%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 308
Covered Lines: 295
Line Coverage: 95.78%
Relevant Branches: 173
Covered Branches: 140
Branch Coverage: 80.92%
Branches in Coverage %: Yes
Coverage Strength: 32.6 hits per line

💛 - Coveralls

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.

Requires NODEjs, not usable with Bun JS env

2 participants