Skip to content
New issue

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

ES2022: arbitrary module namespace names #4322

Closed
dnalborczyk opened this issue Dec 27, 2021 · 5 comments · Fixed by #4770
Closed

ES2022: arbitrary module namespace names #4322

dnalborczyk opened this issue Dec 27, 2021 · 5 comments · Fixed by #4770

Comments

@dnalborczyk
Copy link
Contributor

dnalborczyk commented Dec 27, 2021

check if rollup supports arbitrary module names after bumping acorn. (not yet released)

acorn PR: acornjs/acorn#1090

Add ES2022 normative change estree/estree#269
Normative: Arbitrary module namespace identifier names tc39/ecma262#2154

@dnalborczyk dnalborczyk changed the title arbitrary module namespace names TC39: arbitrary module namespace names Dec 27, 2021
@dnalborczyk dnalborczyk changed the title TC39: arbitrary module namespace names ES2022: arbitrary module namespace names Dec 27, 2021
@LongTengDao
Copy link
Contributor

already released now (acorn v8.7.0)

@sapphi-red
Copy link
Contributor

Rollup (v3.7.4) now uses acorn v8.8.0 but it throws the following error. (repro)

TypeError: Cannot read properties of undefined (reading '0')
    at Module.getVariableForExportName (file:///home/projects/rollup-template-3vkcu7/node_modules/rollup/dist/shared/rollup.js:13595:17)
    at getVariableForExportNameRecursive (file:///home/projects/rollup-template-3vkcu7/node_modules/rollup/dist/shared/rollup.js:13281:19)
    at Module.traceVariable (file:///home/projects/rollup-template-3vkcu7/node_modules/rollup/dist/shared/rollup.js:13819:35)
    at ModuleScope.findVariable (file:///home/projects/rollup-template-3vkcu7/node_modules/rollup/dist/shared/rollup.js:12353:39)
    at Identifier.bind (file:///home/projects/rollup-template-3vkcu7/node_modules/rollup/dist/shared/rollup.js:8322:40)
    at CallExpression.bind (file:///home/projects/rollup-template-3vkcu7/node_modules/rollup/dist/shared/rollup.js:6113:28)
    at CallExpression.bind (file:///home/projects/rollup-template-3vkcu7/node_modules/rollup/dist/shared/rollup.js:9839:15)
    at ExpressionStatement.bind (file:///home/projects/rollup-template-3vkcu7/node_modules/rollup/dist/shared/rollup.js:6117:23)
    at Program.bind (file:///home/projects/rollup-template-3vkcu7/node_modules/rollup/dist/shared/rollup.js:6113:28)
    at Module.bindReferences (file:///home/projects/rollup-template-3vkcu7/node_modules/rollup/dist/shared/rollup.js:13451:18)

I guess rollup needs to change the code.

@lukastaegert
Copy link
Member

Thanks for verifying this needs work. I had it somewhere deep in my todo list to check this again, but if someone wants to have a stab at fixing this, this would also be welcome.

@lukastaegert
Copy link
Member

Fix at #4770

@rollup-bot
Copy link
Collaborator

This issue has been resolved via #4770 as part of rollup@3.9.0. You can test it via npm install rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants