fix(vscode-extension): keep build artifacts in sync with source #18

Merged
abiwab merged 1 commit from fix/vscode-extension-build-sync into main 2026-08-25 07:54:47 +02:00
Owner

The VS Code extension ships two committed files (media/gantt-webview.js,
media/preview.css) that are supposed to be generated from the renderer
source, but nothing actually enforced that. I found a stale copy by
accident.

Now package always rebuilds first, and a pre-commit hook catches it
if the generated files fall out of sync again.

The VS Code extension ships two committed files (media/gantt-webview.js, media/preview.css) that are supposed to be generated from the renderer source, but nothing actually enforced that. I found a stale copy by accident. Now `package` always rebuilds first, and a pre-commit hook catches it if the generated files fall out of sync again.
fix(vscode-extension): guarantee build artifacts stay in sync with source
All checks were successful
CI / ci (pull_request) Successful in 2m19s
73a35b41f9
media/gantt-webview.js and media/preview.css are committed build output
(esbuild bundle of @gram-lang/renderer, and a copy of gram.css) but
build.cjs never rebuilds @gram-lang/renderer first, and `vsce package
--no-dependencies` skips building entirely — so a stale renderer dist
could silently ship in the packaged .vsix with no diff to catch it in
review.

- `package` script now runs the full turbo build graph (which rebuilds
  @gram-lang/renderer first per its dependsOn) before invoking vsce, so
  packaging is safe regardless of what's committed.
- New `vscode-webview-sync` pre-commit hook rebuilds and diffs the two
  generated media files whenever renderer or vscode-extension source
  changes, mirroring the existing grammar-sync hook for grammar.ohm.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
abiwab merged commit 744f57f058 into main 2026-08-25 07:54:47 +02:00
abiwab deleted branch fix/vscode-extension-build-sync 2026-08-25 07:54:47 +02:00
Sign in to join this conversation.
No description provided.