Skip to content

Conversation

joffeoja
Copy link
Contributor

@joffeoja joffeoja commented Sep 29, 2025

Summary

Removes the bundled esbuild binary from the VS Code extension. The extension no longer ships esbuild.exe or @esbuild/* platform packages in the .vsix. Build-time esbuild usage is still retained.

Details

  • Runtime esbuild removal

    • Deleted all staging/copy logic for esbuild and @esbuild/* in prepackage scripts.
    • Dropped esbuild from runtime dependencies.
    • Added .vscodeignore entries to block esbuild binaries or *.exe from slipping into the packaged VSIX.
  • Build-time esbuild retained

    • scripts/esbuild.js still uses esbuild for bundling during development/build.
    • esbuild remains a devDependency.
  • Config.ts behavior

    • config.ts is still supported but no longer auto-installs esbuild.
    • If a user loads config.ts without having esbuild, the extension shows a clear error with instructions:
      config.ts has been deprecated and esbuild is no longer automatically installed by Continue.
      To use config.ts, run: npm i esbuild@<supported-version> --prefix ~/.continue
      
  • Other changes

    • Renamed download-copy-sqlite-esbuild.jsdownload-copy-sqlite.js.
    • Removed unused copyTreeSitterTagQryFiles helper.
    • Updated lockfiles to reflect dependency changes.

Verification

  • Built and packaged extension locally:
    • npm run package produces a .vsix.
    • ✅ No 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

    • Removed esbuild from runtime dependencies and deleted @esbuild staging/copy logic.
    • Updated packaging scripts to stop downloading/copying esbuild; renamed download-copy-sqlite-esbuild.js to download-copy-sqlite.js and fixed imports.
    • Added .vscodeignore rules to exclude esbuild/@esbuild and any .exe files from the VSIX.
    • Removed the unused copyTreeSitterTagQryFiles helper and esbuild-related checks.
  • Migration

    • config.ts no longer auto-installs esbuild. To use config.ts, install esbuild manually: npm i esbuild@ --prefix ~/.continue.

@joffeoja joffeoja changed the title Remove bundled esbuild from VS Code extension, keep build-time only build(vscode): remove bundled esbuild; require user-installed esbuild for config.ts Sep 29, 2025
@joffeoja joffeoja marked this pull request as ready for review September 29, 2025 20:39
@joffeoja joffeoja requested a review from a team as a code owner September 29, 2025 20:39
@joffeoja joffeoja requested review from RomneyDa and removed request for a team September 29, 2025 20:39
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 29, 2025
@joffeoja
Copy link
Contributor Author

joffeoja commented Sep 29, 2025

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.

RomneyDa
RomneyDa previously approved these changes Sep 30, 2025
Copy link
Collaborator

@RomneyDa RomneyDa left a 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

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Sep 30, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 30, 2025
@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Oct 1, 2025
@joffeoja
Copy link
Contributor Author

joffeoja commented Oct 4, 2025

Hi @sestinj @RomneyDa & @Patrick-Erichsen, any update on this one? Would you like me to file an issue in order to track this work?

Copy link
Collaborator

@Patrick-Erichsen Patrick-Erichsen left a 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.

Comment on lines +809 to +817
// 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();
}
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

@RomneyDa RomneyDa Oct 9, 2025

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

@sestinj sestinj removed their request for review October 8, 2025 14:16
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants