Skip to content

fix: VS Code extension activation and YAML file support#35

Merged
ctate merged 1 commit intomainfrom
fix-vscode-extension-activation
Apr 8, 2026
Merged

fix: VS Code extension activation and YAML file support#35
ctate merged 1 commit intomainfrom
fix-vscode-extension-activation

Conversation

@ctate
Copy link
Copy Markdown
Collaborator

@ctate ctate commented Apr 8, 2026

Summary

  • Fix extension failing to activate with Cannot find module './impl/format' by adding mainFields: ["module", "main"] to esbuild config so jsonc-parser ESM build is bundled instead of UMD
  • Add onCommand:visualJson.openWithVisualJson activation event so the command works before the custom editor or panel is opened
  • Support docker-compose.yml and other YAML-derived language IDs (dockercompose, github-actions-workflow, home-assistant)

- Add mainFields to esbuild config so jsonc-parser ESM build is used, fixing the unbundled ./impl/format require
- Add onCommand activation event so the command works before the editor/panel is opened
- Support dockercompose, github-actions-workflow, and home-assistant language IDs
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
visual-json Ready Ready Preview, Comment Apr 8, 2026 5:52pm

Copy link
Copy Markdown

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

The syncWithActiveEditor method in panel-provider.ts only accepts json, jsonc, and yaml language IDs, causing the panel to reject docker-compose, GitHub Actions workflow, and Home Assistant YAML files despite those being enabled in the when clause and command handler.

Fix on Vercel

@ctate ctate merged commit 626b02c into main Apr 8, 2026
6 checks passed
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.

1 participant