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

Upgrade to latest, stage 2 spec #84

Open
jayphelps opened this Issue Jul 29, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@jayphelps
Owner

jayphelps commented Jul 29, 2016

Latest spec was just approved to stage 2: http://tc39.github.io/proposal-decorators/

Babel may or may not start supporting this spec. It's a non-trivial change and compared to most specs to date, fairly complicated, so I wouldn't be surprised if they continue to be too scared of churn to implement it. https://phabricator.babeljs.io/T2645

That said, I think I'll start trying to implement this anyway mostly so I can see if I can support both the old and new specs in the same library. I'm skeptical that I can.

@jayphelps jayphelps referenced this issue Aug 5, 2016

Open

The Road to 1.0 #15

9 of 18 tasks complete
@jkrems

This comment has been minimized.

jkrems commented Aug 19, 2016

If you're just looking to play around / test out how it might work against the stage-2 spec, I did an initial implementation of a transform for babel 6 here: https://github.com/jkrems/babel-plugin-transform-decorators-stage-2-initial

(Note: class decorators are only partially implemented but method decorators should work mostly according to spec.)

@jayphelps

This comment has been minimized.

Owner

jayphelps commented Aug 19, 2016

@jkrems that's sweet! I will indeed take a look. Thanks for letting me know.

@kevinSuttle

This comment has been minimized.

kevinSuttle commented Sep 16, 2016

@jayphelps Seems they moved back to GitHub: babel/babel#2645

@peey

This comment has been minimized.

peey commented Jun 9, 2017

@jayphelps Babel has begun work on upgrading to stage 2 spec. We may not support the older spec in next major release. Would you like to join the discussion on Babel's slack? I've sent you an invite. (To anyone else who wants to join, you can get a slack invite from here and the discussion channel is #proposal-decorators)

As a decorators library author it'd be useful to get your thoughts on migration from stage 0 spec to stage 2 spec.

@jayphelps

This comment has been minimized.

Owner

jayphelps commented Aug 12, 2017

@peey thanks! Sorry I forgot to comment here, but I did visit the channel and do still plan to update core-decorators to be stage-2 compliant when a compiler (babel or TS) supports it 👍

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