guybedford / es-module-lexer

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

Parsing `vscode-uri` ESM file returns nothing #153

Closed alex-kinokon closed 1 year ago

alex-kinokon commented 1 year ago

Parsing vscode-uri/lib/esm/index.js which ends in export const{URI,Utils}=LIB gives imports: [], exports: [].

guybedford commented 1 year ago

This is because this library doesn't support full syntax parsing of arbitrary destructuring and variable declarations, see the limitations section.

That said, I've put together some initial prototyping of simple destructuring for a case like this in https://github.com/guybedford/es-module-lexer/pull/154.

guybedford commented 1 year ago

1.3.0 is now released with simple destructuring support, that should resolve this case.