Files
ECC/scripts
Hemang Varshney ced82ccf9f fix(install): tolerate JSONC comments in the OpenCode config membership check
The read-only plugin-membership check in activationIsInactive and the
validation inside disableOpenCodeHookPluginRegistration used strict
JSON.parse, so any user whose ~/.config/opencode/opencode.json contains
JSONC comments (which OpenCode itself accepts) could not install the
OpenCode catalog. The plan never writes the user-owned config; this
parse is purely a membership read (issue #3546).

Add a string-aware JSONC parser (line/block comments, the trailing
commas they hide, URL strings untouched) and route both call sites
through it. Truly malformed JSON keeps its source-context error.

Tests: unit coverage for comment/trailing-comma/URL handling, plus an
apply-level regression test that installs over an inactive JSONC user
config byte-for-byte, across default and declined consent modes.
2026-10-15 17:02:16 +05:30
..