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
7.24.0 fields & decorators improvement #16252
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JLHwung
force-pushed
the
feat-7.24.0/decorators
branch
from
February 14, 2024 15:07
e9fd071
to
ff2288d
Compare
The feature branch is now rebased to include the quality-of-life change #16278. |
nicolo-ribaudo
changed the title
7.24.0 decorators improvement
7.24.0 fields & decorators improvement
Feb 14, 2024
nicolo-ribaudo
force-pushed
the
feat-7.24.0/decorators
branch
from
February 26, 2024 08:53
0646bb4
to
774e467
Compare
Rebased |
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/56371 |
* copy test cases from 2023-05 * update 2023-11 test options * copy applyDecs2305 to applyDecs2311 * allow 2023-11 decorator version * feat: support per-field intitializers * update test fixtures OVERWRITE=1 yarn jest decorators -t "2023 11" * update generated helpers * update other class tests * expand field-initializers-after-methods case * Add failing private flavour test * update pipeline operator tests * Don't run Babel 8 test with 2023-05 decorator * add release todo item
* refactor: reuse staticFieldInitializerAssignments * refactor: rename fieldInitializerAssignments to expressions * test: expand replacement-static-installed-on-correct-class case * chore: maybePrivateBrandName typo * wrap version "2023-05" check within Babel 7 branch
Co-authored-by: Nicolò Ribaudo <hello@nicr.dev>
* Do not define `ctx.access.set` for setter decorators * chore --------- Co-authored-by: Babel Bot <30521560+liuxingbaoyu@users.noreply.github.com>
* fix: handle symbol key class elements decoration * update generated helpers * Expand test cases
* optimize: allocate temp variable for every decorated element * update test fixtures * refactor: sort decorator info once * refactor: simplify maybeExtractDecorators interface Also improve decoratorThis storage. It turns out we don't have to maintain the map from decorator to its this value. * refactor: rename maybeExtractDecorators to handleDecoratorExpressions * unify haveThis and hasThis
* Add failing test * Fix evaluation order of decorators with cached receiver * Use one temp var per decorated element * Use one temp var per class
* improve * fix new test * fix test * add test * Apply suggestions from code review Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> * lint --------- Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
classPrivateMethodGet
* fix arguments * Update packages/babel-plugin-transform-private-methods/test/fixtures/accessors/arguments/exec.js Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> * review * fix types --------- Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
nicolo-ribaudo
force-pushed
the
feat-7.24.0/decorators
branch
from
February 27, 2024 20:44
9905eb2
to
450c20e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This umbrella PR tracks decorators improvement progress
static
on decorated privateaccessor
#16266)applyDecs2311
helper size (Reduce helper size for decorator 2023-11 #16263)Needs Docs
2023-11
docs website#2860)noUninitializedPrivateFieldAccess
assumption #16267 (AddnoUninitializedPrivateFieldAccess
assumption docs website#2865)Fixes: #16257
Fixes: #16292