fix: correctly transform __proto__ properties#12664
fix: correctly transform __proto__ properties#12664nicolo-ribaudo merged 2 commits intobabel:mainfrom
__proto__ properties#12664Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/37981/ |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0357fe1:
|
This can be put either in one plugin or in the other, we don't have a general rule for choosing where to put cross-plugin tests.
Imo we can leave it as |
Fixes #11882
Fixes #12647
This fixes the transform of
__proto__to match the spec, where only the non‑computed, non‑shorthand form of__proto__({ __proto__: prototype }) is special. All other forms create an own enumerable__proto__property.To do:
@babel/plugin‑transform‑computed‑propertiesand@babel/plugin‑transform‑shorthand‑propertiesare used.{ ["__proto__"]: anything }as special (always use[[Define]]) insetComputedPropertiesmode.RESOLVED: Leave it as
[[Set]](fix: correctly transform__proto__properties #12664 (comment))