We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, thanks for the work!
It seems astring does not handle module specifier when they are literals and not identifiers.
astring
import { parse } from "acorn"; import { generate } from "astring"; const root = parse("export { 'foo-bar' as 'qux-baz' } from 'source';", { sourceType: "module", ecmaVersion: 2024, }); console.dir(root, { depth: 1 / 0 }); console.log(generate(root));
Node { type: 'Program', start: 0, end: 48, body: [ Node { type: 'ExportNamedDeclaration', start: 0, end: 48, declaration: null, specifiers: [ Node { type: 'ExportSpecifier', start: 9, end: 31, local: Node { type: 'Literal', start: 9, end: 18, value: 'foo-bar', raw: "'foo-bar'" }, exported: Node { type: 'Literal', start: 22, end: 31, value: 'qux-baz', raw: "'qux-baz'" } } ], source: Node { type: 'Literal', start: 39, end: 47, value: 'source', raw: "'source'" } } ], sourceType: 'module' } export {undefined} from 'source';
export { 'foo-bar' as 'qux-baz' } from 'source';
export {undefined} from 'source';
The text was updated successfully, but these errors were encountered:
tested on v1.9.0
v1.9.0
Sorry, something went wrong.
chore: Bump astring to upstream
d78fae4
Since davidbonnet/astring#713 is merged we are bumping the astring dependency to upstream again.
73b37ed
Successfully merging a pull request may close this issue.
Motivation
Hi, thanks for the work!
It seems
astring
does not handle module specifier when they are literals and not identifiers.Expected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: