andreyvit / json-diff

Structural diff for JSON files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Breaking change in v0.7.2

ljharb opened this issue · comments

https://unpkg.com/browse/json-diff@0.7.2/lib/colorize.js contains the ?? operator (added in #73); v0.7.1 does not.

package.json explicitly says all node versions in engines.node (https://unpkg.com/browse/json-diff@0.7.1/package.json), and in npm's semver, v0.8.0 would be a breaking change, but v0.7.2 can only be minor or patch.

Can you publish a v0.7.3 that avoids this operator?

There's the additional issue (that doesn't happen to affect me here) that it uses arrow function syntax but doesn't require a node version that supports it; perhaps it'd be better to just add babel, so you don't have to worry about it in the future?

Additionally, it might be good to add eslint and target the appropriate syntax level, so that CI can't pass with too-new syntax.

Thank you @ljharb -- I've reverted usage of the ?? operator.

We've reverted usage of the ?? operator.

Thank you for the fast fix!!