You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.
By returning a 'full' instance of the acorn-walk API, the library kind of suggests that the methods on that interface have been extended to support the new node type... but by default, if you don't pass them an explicit base walker, they'll use the base object that they closed over, which is the old, non-extended one. See acornjs/acorn#746.
I think a reasonable solution would be to create a module that just extends the base walker object, i.e. takes such an object and returns an extended version. That both works better with ES modules (less dynamic munging of exported interfaces) and steers people towards using the code correctly.
That'd be a breaking change, so if bumping the major version number is an issue, we could leave the old interface around and implement this in a separate file.
Would be happy to create a PR if this sounds reasonable.
The text was updated successfully, but these errors were encountered:
By returning a 'full' instance of the
acorn-walk
API, the library kind of suggests that the methods on that interface have been extended to support the new node type... but by default, if you don't pass them an explicit base walker, they'll use the base object that they closed over, which is the old, non-extended one. See acornjs/acorn#746.I think a reasonable solution would be to create a module that just extends the base walker object, i.e. takes such an object and returns an extended version. That both works better with ES modules (less dynamic munging of exported interfaces) and steers people towards using the code correctly.
That'd be a breaking change, so if bumping the major version number is an issue, we could leave the old interface around and implement this in a separate file.
Would be happy to create a PR if this sounds reasonable.
The text was updated successfully, but these errors were encountered: