guybedford / es-module-lexer

Low-overhead lexer dedicated to ES module parsing for fast analysis
MIT License
912 stars 47 forks source link

Fails to parse `export default{}` (no space after `default`) #140

Closed sapphi-red closed 1 year ago

sapphi-red commented 1 year ago

When the following code is passed, es-module-lexer throws an error.

export default{};

This happens from 1.0.5. It worked with 1.0.4 and before.

reproduction: https://stackblitz.com/edit/node-rvshud?file=index.js,input.js

Real world code: https://github.com/nextapps-de/flexsearch/blob/9abb781357f04e7db8529654c6941009771f4bf1/dist/module/lang/latin/advanced.js

guybedford commented 1 year ago

Fix released in 1.1.0.

sapphi-red commented 1 year ago

Thank you!