estools / esquery

ECMAScript AST query library.
http://estools.github.io/esquery/
Other
816 stars 88 forks source link

Do not bundle estraverse dependency? #104

Closed nikaspran closed 4 years ago

nikaspran commented 4 years ago

I'd like to suggest creating another rollup artifact without the bundled estraverse.

This would have a few advantages:

  1. Smaller footprint if estraverse is already included in dependencies of the project that brings this in.
  2. Allow modifying estraverse.VisitorKeys, which would allow using esquery with things like TypeScript and JSX (and be a sensible workaround for https://github.com/estools/esquery/pull/57)
  3. Work more canonically with Node.js projects (i.e. ability to use require cache, dependency resolutions and so on)

If this works, I can prepare a small PR over the next few days. To keep backwards compatibility, I can set it up as a new output artifact that wouldn't impact anything - would that work?

michaelficarra commented 4 years ago

Fixed by #105.