Skip to content

Make decoratorsBeforeExport optional for 2021-12 decorators#14217

Merged
nicolo-ribaudo merged 2 commits intobabel:feat-7.16.0/decoratorsfrom
nicolo-ribaudo:decorators-options-update
Feb 1, 2022
Merged

Make decoratorsBeforeExport optional for 2021-12 decorators#14217
nicolo-ribaudo merged 2 commits intobabel:feat-7.16.0/decoratorsfrom
nicolo-ribaudo:decorators-options-update

Conversation

@nicolo-ribaudo
Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo commented Jan 31, 2022

Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

After chatting with @pzuraq, we concluded that it's likely that the proposal will continue having decorators after export (even if it's not set in stone). We can thus make the decoratorsBeforeExport option optional, and if we'll ever need to change it we can just bump the version option.

name: "proposal-decorators",
inherits: syntaxDecorators,
manipulateOptions({ generatorOpts }) {
generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this to the syntax plugin, so that syntax options validation/handling is centralized.

@babel-bot
Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/50994/

@nicolo-ribaudo
Copy link
Copy Markdown
Member Author

I'm really confused - #8113

@nicolo-ribaudo
Copy link
Copy Markdown
Member Author

Oh ok it was reverted by #8465.

@nicolo-ribaudo nicolo-ribaudo merged commit 47b70b8 into babel:feat-7.16.0/decorators Feb 1, 2022
@nicolo-ribaudo nicolo-ribaudo deleted the decorators-options-update branch February 1, 2022 08:57
nicolo-ribaudo added a commit that referenced this pull request Feb 1, 2022
* Make `decoratorsBeforeExport` optional for 2021-12 decorators

* Update fixture options
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue Spec: Decorators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants