microsoft / tfs-cli

Cross-platform CLI for Microsoft Team Foundation Server and Visual Studio Team Services
MIT License
372 stars 132 forks source link

fixing json5 parsing issue #470

Open polatengin opened 2 months ago

polatengin commented 2 months ago

Fixes #466

When parsing manifest json files, no need to check if it's json5 (supports comments, unquoted keys, etc.) or json

jju.parse() method already support json and json5 formats.

test.json

{
  name: "test",
  version: "1.0.0",
  "publisher": "test",
  categories: ["test"],
  contributions: [
    {
      "id": "home",
      "type": "ms.vss-web.hub",
    }
  ],
  // A comment
}

test command

node ./_build/tfx-cli.js extension create --manifests ./_build/test.json --trace-level debug