-
Notifications
You must be signed in to change notification settings - Fork 3.6k
build(vscode): remove bundled esbuild; require user-installed esbuild for config.ts #8016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…y-sqlite.js and update imports
Hi @Patrick-Erichsen and @RomneyDa, here is the reworked PR for removing the esbuild executable from the vscode extension along with the downloading logic, while keeping config.ts support (assuming end user installs esbuild themselves). The first upload had all tests pass but when I added the load.ts changes there were some fails. I don't see how they are related though 🤔 Edit: back to green. Let me know your thoughts on this third attempt at fixing the "vulnerable" esbuild situation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joffeoja appreciate the rework!! Looks good to me
Hi @sestinj @RomneyDa & @Patrick-Erichsen, any update on this one? Would you like me to file an issue in order to track this work? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the bump @joffeoja ! Left a comment below.
// Only bother with esbuild if config.ts is actually customized | ||
if (currentContent.trim() !== DEFAULT_CONFIG_TS_CONTENTS.trim()) { | ||
const ok = await handleEsbuildInstallation(ide, ideType); | ||
if (!ok) { | ||
// esbuild not available → we already showed a friendly message; skip building | ||
return; | ||
} | ||
await tryBuildConfigTs(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the goal from @sestinj 's feedback was just to provide the deprecation message to user's that have modified their config.ts , not to attempt to use their locally installed esbuild.
The general goal here is rip out all the config.ts logic but give a heads up to those affected.
Could we modify this to instead just show the toast with that in mind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RomneyDa @Patrick-Erichsen @sestinj : The current code is based on feedback from Dallin in my now closed PR:
#7895 (review)
Spoke with the team further about this and we're thinking let's remove esbuild module installation while still supporting config.ts by assuming users already have esbuild installed and showing them an error with instructions if they don't e.g. config.ts has been deprecated and esbuild is no longer automatically installed by Continue. To use config.ts, you can run npm i [email protected] in ~/.continue`. Sorry for the partial bait and switch on this
As you requested I kept all the config.ts related logic, still letting the end user use config.ts if they have installed esbuild themselves. This PR leaves a deprecation message and the next logical step would be to remove all code pertaining to config.ts.
This PR supersedes my two earlier attempts:
#7790: Upgrade esbuild to less vulnerable version
#7895: Remove esbuild + config.ts support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joffeoja chatted with @Patrick-Erichsen, sounds like we'll move forward with this
Summary
Removes the bundled
esbuild
binary from the VS Code extension. The extension no longer shipsesbuild.exe
or@esbuild/*
platform packages in the.vsix
. Build-timeesbuild
usage is still retained.Details
Runtime esbuild removal
esbuild
and@esbuild/*
in prepackage scripts.esbuild
from runtime dependencies..vscodeignore
entries to blockesbuild
binaries or*.exe
from slipping into the packaged VSIX.Build-time esbuild retained
scripts/esbuild.js
still usesesbuild
for bundling during development/build.esbuild
remains a devDependency.Config.ts behavior
config.ts
is still supported but no longer auto-installsesbuild
.config.ts
without havingesbuild
, the extension shows a clear error with instructions:Other changes
download-copy-sqlite-esbuild.js
→download-copy-sqlite.js
.copyTreeSitterTagQryFiles
helper.Verification
npm run package
produces a.vsix
.esbuild
files in the VSIX (unzip -l continue-*.vsix | rg esbuild
→ no hits).Summary by cubic
Stop bundling esbuild in the VS Code extension; esbuild is now used only at build time. This reduces the VSIX size and removes platform-specific binaries from runtime.
Refactors
Migration