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

Add docs for 2023-01 decorators #2715

Merged
merged 2 commits into from Feb 20, 2023

Conversation

nicolo-ribaudo
Copy link
Member

@netlify
Copy link

netlify bot commented Feb 6, 2023

Deploy Preview for babel ready!

Name Link
🔨 Latest commit 0950223
🔍 Latest deploy log https://app.netlify.com/sites/babel/deploys/63f360dda4b0b8000844876c
😎 Deploy Preview https://deploy-preview-2715--babel.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@liuxingbaoyu
Copy link
Member

liuxingbaoyu commented Feb 6, 2023

I will add this in the repl.

By the way, the current repl, the decorator only works when stage-2 is uniquely enabled.
It's a bit strange that an exception will be thrown if both stage-2 and stage-3 are enabled.
We probably need to do something to avoid user confusion.

ref #2677

| `v7.19.0` | Added support for `version: "2022-03"` |
| `v7.17.0` | Added the `version` option with support for `"2021-12"`, `"2018-09"` and `"legacy"` |
</details>

### `version`

`"2022-03"`, `"2021-12"`, `"2018-09"` or `"legacy"`. Defaults to `"2018-09"`.
`"2023-01"`, `"2022-03"`, `"2021-12"`, `"2018-09"` or `"legacy"`.
Copy link
Contributor

@JLHwung JLHwung Feb 6, 2023

Choose a reason for hiding this comment

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

Is version a required option now? If so it would be a breaking change.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, just ["@babel/plugin-proposal-decorators"] has always been invalid. "version" has always been required, except if "decoratorsBeforeExports" was set. Since most people will not need to set it now, it's confusing to say that "version" has a default value (however, this behavior is still mentioned a few lines below).

@nicolo-ribaudo nicolo-ribaudo changed the title Add docs for 2023-01 decorators Add docs for 2023-01 decorators Feb 20, 2023
@nicolo-ribaudo nicolo-ribaudo merged commit e02dc7b into babel:main Feb 20, 2023
@nicolo-ribaudo nicolo-ribaudo deleted the docs-7.21.0/decorators branch February 20, 2023 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants