Skip to content

lume upgrade --dev fails to parse deno.json #746

@iacore

Description

@iacore

Version

/

Platform

/

What steps will reproduce the bug?

Add an extra comma in deno.json, then run deno task lume upgrade --dev.

How often does it reproduce? Is there a required condition?

100%

What is the expected behavior?

It should work.

What do you see instead?

Task lume echo "import 'lume/cli.ts'" | deno run -A - "upgrade" "--dev"
SyntaxError: Expected double-quoted property name in JSON at position 211 (line 9 column 3)
    at JSON.parse (<anonymous>)
    at https://deno.land/x/[email protected]/steps/load.ts:10:27
    at eventLoopTick (ext:core/01_core.js:178:7)
    at async Init.run (https://deno.land/x/[email protected]/init.ts:115:22)
    at async default (https://deno.land/x/[email protected]/cli/upgrade.ts:5:3)
    at async Command.fn (https://deno.land/x/[email protected]/cli.ts:18:5)
    at async Command.execute (https://deno.land/x/[email protected]/command/command.ts:1794:7)
    at async Command.parseCommand (https://deno.land/x/[email protected]/command/command.ts:1639:14)
    at async https://deno.land/x/[email protected]/cli.ts:175:3

Additional information

I believe Deno uses json5 for its config, not JSON.parse.

Maybe elsewhere in Lume has this bug too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions