-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Class private properties #7555
Class private properties #7555
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/7334/ |
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/7216/ |
Great to see this being picked up. Thanks for your hard work here! It would be a good next step if you could get the test262 tests passing as well. These test against several things that were buggy in the previous PR (see my review of that PR for an explanation). You can run test262 tests against Babel by using test262-harness with the |
thanks @littledan, that sounds good. after i finish correcting the rebase on this pr, the test262 suite will be my next step! |
7d511ff
to
68ee94a
Compare
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@babel/plugin-codemod-optional-catch-binding", | |||
"version": "7.0.0-beta.40", | |||
"version": "0.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to worry about the version, they are managed by lerna
helpers.classPrivateFieldKey = () => template.program.ast` | ||
var id = 0; | ||
export default function _classPrivateFieldKey(name) { | ||
// Can we use a middle finger emoji? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha that would be so cool, but the comment is kinda useless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove my snark.
741ff33
to
a8e842d
Compare
@littledan ok, I could use a pointer on how to run
But I get the following error:
Can you help me interpret what I should be doing to fix that error? Also, what should I do to run the tests against my local babel checkout? |
@CodingItWrong The |
Still needs @hzoo to publish a new version of babylon.
93391d2
to
288da8b
Compare
288da8b
to
ccd9410
Compare
Yes, the output is uglier. But, this is necessary for me to refactor `replaceSupers` for babel#7733, which is necessary for both babel#7555 and babel#7553 (comment). I'm still in the middle of cleaning up all this code. Don't expect `transformClass` to survive much longer as it's written currently.
How is this PR going? Is there anything more I could do? |
@littledan it sounds like @jridgewell is intending to pick up the work in a sequence of smaller PRs like #7750. If I get a chance to contribute again, I'll follow the same sequence 👍 |
@littledan: I'm slowly picking away at this through smaller PRs to fix classes.
Particularly, once I get #7750 in, I can work on #7733, which'll remove a few hundred lines from this PR. |
Great, thanks @jridgewell ! |
Yes, the output is uglier. But, this is necessary for me to refactor `replaceSupers` for babel#7733, which is necessary for both babel#7555 and babel#7553 (comment). I'm still in the middle of cleaning up all this code. Don't expect `transformClass` to survive much longer as it's written currently.
Yes, the output is uglier. But, this is necessary for me to refactor `replaceSupers` for #7733, which is necessary for both #7555 and #7553 (comment). I'm still in the middle of cleaning up all this code. Don't expect `transformClass` to survive much longer as it's written currently.
It looks like all those PRs are merged now (awesome work!) - so I guess the question now is: what are the remaining steps? |
Final step is the class-properties transform! Working on it now. |
Have an updated branch on my personal repo. Relevant commit for the transform is jridgewell@d004652 (at 177 fewer lines!). All that's needed are tests. |
Superceded by #7842 |
Closing via #7842 👍 |
Rebases #6120 off of latest master, and attempts to get tests passing.
Note: I need to do some more significant rebasing; the work from #6120 was applied to the old
transform-class-properties
folder, not the newproposal-class-properties
folder.