Skip to content

Commit

Permalink
Support named evaluation for decorated anonymous class exp (#16148)
Browse files Browse the repository at this point in the history
* cleanup

* refactor: decouple needsDeclaraionForClassBinding from replaceClassWithVar

* avoid redundant node clone

* refactor: refactor variable declarator named evaluation to visitor factory

* handle other named evaluation cases

* Add test cases

* Update test fixtures

* update properties test fixtures

* allow literals in keys of transpiled accessors

* Update packages/babel-plugin-proposal-decorators/src/transformer-2023-05.ts

Co-authored-by: Nicol貌 Ribaudo <hello@nicr.dev>

* address review comments

---------

Co-authored-by: Nicol貌 Ribaudo <hello@nicr.dev>
  • Loading branch information
JLHwung and nicolo-ribaudo committed Dec 4, 2023
1 parent d93c702 commit c5c3d45
Show file tree
Hide file tree
Showing 16 changed files with 1,038 additions and 61 deletions.
1 change: 1 addition & 0 deletions packages/babel-plugin-proposal-decorators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@babel/helper-create-class-features-plugin": "workspace:^",
"@babel/helper-plugin-utils": "workspace:^",
"@babel/helper-replace-supers": "workspace:^",
"@babel/helper-skip-transparent-expression-wrappers": "workspace:^",
"@babel/helper-split-export-declaration": "workspace:^",
"@babel/plugin-syntax-decorators": "workspace:^"
},
Expand Down

0 comments on commit c5c3d45

Please sign in to comment.