Closed guybedford closed 2 years ago
We should also only export local bindings that are valid identifiers
Could you elaborate on what you mean by valid identifiers? I couldn't find an existing function to check that.
Edit: e.g. would you consider "default" a valid identifier, or is that a keyword?
Does the parse()
API need to be backwards-compatible, or can this simply change the second element to be an array of objects?
The following would be highly useful for export tracking in cycles for ES Module Shims.
This does not need to be comprehensive by any means, but a best effort approach would make progress for ES Module Shims cycle support.
exports
replaced by a tracking object of statement start, start, end, statement end. Start and end as the start and end of the exported identifier.n
field. We should also only export local bindings that are valid identifiers (for exampledefault
is not a valid local binding even though it is a valid export).