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

feat(pluginutils): add includeArbitraryNames: true to dataToEsm #1635

Merged

Conversation

sapphi-red
Copy link
Contributor

Rollup Plugin Name: pluginutils

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

resolves #1437

Description

This PR adds namedExports: 'include-arbitrary-name' option to dataToEsm function in pluginutils.
When this option is set, dataToEsm will generate named export for keys that was not a valid identifier by leveraging Arbitrary module namespace identifier names feature (tc39/ecma262#2154).

packages/pluginutils/types/index.d.ts Outdated Show resolved Hide resolved
@sapphi-red sapphi-red changed the title feat(pluginutils): add namedExports: 'include-arbitrary-name' to dataToEsm feat(pluginutils): add includeArbitraryNames: true to dataToEsm Nov 26, 2023
@shellscape shellscape merged commit 3c53a29 into rollup:master Nov 28, 2023
5 checks passed
@shellscape
Copy link
Collaborator

thanks!

@shellscape
Copy link
Collaborator

We've got a regex issue with our release step. I'll fix that this week and we'll get this published.

@sapphi-red sapphi-red deleted the feat/support-arbitrary-name-data-to-esm branch November 29, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an option to include non-legal identifier named exports to dataToEsm function of pluginutils
2 participants