Skip to content

Conversation

@goto-bus-stop
Copy link

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 browserify/tinyify#18

@niftylettuce
Copy link

Amazing. 👏

@niftylettuce
Copy link

Can this be merged? Ping @goto-bus-stop @hughsk

@goto-bus-stop
Copy link
Author

@goto-bus-stop goto-bus-stop deleted the new-syntax branch October 16, 2022 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: Unexpected token

2 participants