Skip to content

vscode ext: esbuild-bundling follow-ups from #241 review #243

Description

@Hessesian

Follow-ups from review of #241 (bundle vscode-languageclient with esbuild). The fix itself is correct and merged — these are non-blocking DX/robustness items surfaced during review (mine + Copilot's).

  • Local dev/debug is broken until a manual build step runs. main now points at contrib/vscode/dist/extension.js, which is only produced by the vscode:prepublish esbuild hook (run automatically by vsce package, but not by npm install). Anyone launching the extension via F5 / --extensionDevelopmentPath against a fresh checkout will hit a missing-module error. Add a predebug/watch script or a CONTRIBUTING note documenting npm run vscode:prepublish as a required step before local debugging. (Copilot)
  • npx esbuild can silently fetch an unpinned version. If contrib/vscode/node_modules isn't populated when the prepublish hook runs, npx esbuild falls back to downloading a version from the registry instead of using the pinned ^0.25.0 devDependency. Low practical risk today (bundling would fail earlier anyway since vscode-languageclient wouldn't resolve without node_modules), but safer to invoke via node_modules/.bin/esbuild or npm exec --no so it never silently drifts. (Copilot)
  • Anchor the .vscodeignore exclusion. The added extension.js line is unanchored, so by gitignore semantics it should also match dist/extension.js — empirically it doesn't (vsce appears to special-case the file referenced by main), but relying on that undocumented behavior is fragile. Change to /extension.js to make the intent (exclude only the top-level raw source) explicit and future-proof against any change in vsce's matching behavior.
  • Add dist/ to contrib/vscode/.gitignore. It currently only ignores node_modules/. Since the prepublish hook writes dist/extension.js into the working tree, a contributor who builds locally and runs git add . could accidentally commit the generated bundle.

Reference: PR #241 (#241), merged as 0aa292c.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions