sindresorhus/parse-json

Ambiguous errors on Node 7.0.0

Closed this issue · 3 comments

If I have an invalid json file such as {wrong: }, the current error on node 0.11 through 6.9.1 is the following

        throw jsonErr;
        ^
JSONError: Unexpected token 'w' at 1:3
{ wrong: }
  ^

On Node 7.0.0 the error is

        Object.defineProperty(this, 'stack', stackDescriptor);
               ^

TypeError: Invalid property descriptor. Cannot both specify accessors and a value or writable attribute, #<Object>
Qix- commented

The PR didn't fix it, I'm still working on a fix. Sorry for the delay, we had holiday the last few days.

Qix- commented

Can everyone npm i and re-run their tests? :) Bugfix should be published.

// cc @sindresorhus @eight04 @mhkeller