This patch moves from esprima to acorn-node, which has support for many new JS syntax features. It aims to keep up parity with Node.js. For example, async functions and object rest spread now work.
I've mostly kept the old logic intact, comparing nodes with === doesn't work in acorn so I've added an equalNodes function that I think covers all necessary bases.
Note this does not add support for destructuring process.env yet (eg #58), it just prevents envify from erroring out on files that contain new syntax features.
This patch moves from esprima to acorn-node, which has support for many new JS syntax features. It aims to keep up parity with Node.js. For example, async functions and object rest spread now work.
I've mostly kept the old logic intact, comparing nodes with === doesn't work in acorn so I've added an
equalNodes
function that I think covers all necessary bases.Note this does not add support for destructuring process.env yet (eg #58), it just prevents envify from erroring out on files that contain new syntax features.
Fixes https://github.com/browserify/tinyify/issues/18