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(es/decorators): Implement decorator version 2023-11 #8970

Closed
wants to merge 12 commits into from

Conversation

@kdy1 kdy1 added this to the Planned milestone May 23, 2024
@kdy1 kdy1 self-assigned this May 23, 2024
Copy link

changeset-bot bot commented May 23, 2024

⚠️ No Changeset found

Latest commit: d0d572d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kdy1 kdy1 changed the title feat(es/decorators): Implement latest stage 3 decorators feat(es/decorators): Implement decorator version 2023-11 May 23, 2024
pub use self::{
decorators::decorators, export_default_from::export_default_from,
import_assertions::import_assertions,
};

#[derive(Debug, Default, Clone, Copy, Serialize, Deserialize)]
#[serde(deny_unknown_fields, rename_all = "camelCase")]
pub enum DecoratorVersion {
Copy link
Member

Choose a reason for hiding this comment

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

Babel 8 keeps only the newest and the oldest versions; I think we should also keep just two versions.

Keeping the latest version is sensible, but another that leverages TypeScript's legacy decorators (experimentalDecorators) is preferable.

It is necessary to specify the exact version. SWC references the TypeScript version with the date 2021-12, whereas Babel uses 2018-09.

The TypeScript documentation states that it adopts a Stage 2 version, but it doesn't specify the exact year and month of the draft.

Copy link
Member Author

Choose a reason for hiding this comment

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

But some users will complain that removal of implementations is a breaking change, and I'm not sure if it's fine to remove an option.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please only remove an option in a major version 😂

Copy link

codspeed-hq bot commented Aug 19, 2024

CodSpeed Performance Report

Merging #8970 will not alter performance

Comparing kdy1:deco (251282e) with main (238ba8b)

Summary

✅ 178 untouched benchmarks

@kdy1 kdy1 force-pushed the deco branch 2 times, most recently from abc7888 to 92a3c11 Compare August 20, 2024 06:51
@kdy1
Copy link
Member Author

kdy1 commented Aug 23, 2024

Closing in favor of #9488

@kdy1 kdy1 closed this Aug 23, 2024
@kdy1 kdy1 deleted the deco branch August 23, 2024 02:40
@kdy1 kdy1 modified the milestones: Planned, v1.7.17 Aug 23, 2024
@swc-project swc-project locked as resolved and limited conversation to collaborators Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
3 participants