hasundue / molt

Update dependencies the Deno way
https://jsr.io/@molt
MIT License
78 stars 5 forks source link

cli: comments are removed from JSONC files #207

Closed Milly closed 1 month ago

Milly commented 1 month ago

Problem

Run @molt/cli --write will remove comments from the deno.jsonc file.

Expected

Keep comments in JSONC files.

Actual

Before run: deno.jsonc

{
  "tasks": {
    // Update dependencies
    "update": "deno run --unstable-kv -A jsr:@molt/cli@0.19.0 deno.jsonc --write"
  },
  "imports": {
    "@std/assert": "jsr:@std/assert@1.0.0"
  }
}

Run: deno task update

After run: deno.jsonc

{
  "tasks": {
    "update": "deno run --unstable-kv -A jsr:@molt/cli@0.19.0 deno.jsonc --write"
  },
  "imports": {
    "@std/assert": "jsr:@std/assert@1.0.0"
  }
}
hasundue commented 1 month ago

OMG thank you for reporting. I'm fixing