Skip to content

UrlDiscoveryPlugin: produce strict JSON via JsonReporter #2076

Description

@waldekmastykarz

Problem

With UrlDiscoveryPlugin, JsonReporter writes UrlDiscoveryPlugin_JsonReporter.jsonc (UrlDiscoveryPluginReport.FileExtension => ".jsonc"), prefixed with tutorial comments (// Wildcards, // You can use wildcards…). Every other plugin's JSON report is plain .json. As a result:

  • The agent's script waited for *.json and missed the file, so it had to be patched.
  • .jsonc with comments can't be consumed with JSON.parse or jq in CI without first stripping the comments.

Related: #1965 fixed the extension leaking to later reports; this issue is about the UrlDiscovery report itself.

Proposal

Have JsonReporter always emit strict .json, for example { "urlsToWatch": [...] }. If the commented, paste-ready snippet is valuable, emit it from PlainTextReporter or MarkdownReporter, or as an additional .jsonc file behind an option.

Found while evaluating how coding agents use Dev Proxy: VS Code + GitHub Copilot Chat with Claude Sonnet 5.5, Dev Proxy 4.0.0 on Windows, 5 runs of the task "add a CI script that starts Dev Proxy in the background, starts and stops recording through the API around npm start, and shuts Dev Proxy down through the API".

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

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions