Skip to content
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

Fix decorated class static field private access #16344

Merged

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Mar 12, 2024

Q                       A
Fixed Issues? Fixes #16176
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

To recap, when a class is decorated we move non-static elements into an inner class since they will be defined on the class prototype before the class is replaced in the class decorator. However, the static class element can still capture the instance private elements. By splitting the class the static class element can no longer resolve the private name defined by an instance element.

In this PR we move the closure of static element into the inner class, to ensure that they can still resolve the private name. For static private methods, we have to also replace the super usage.

This PR also respects the ignoreFunctionLength compiler assumption when generating the delegate for the static private methods.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Decorators labels Mar 12, 2024
@babel-bot
Copy link
Collaborator

babel-bot commented Mar 12, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/56503

@dec
class B extends idFactory("B") {
#x = "B#x";
static [(fns.push(super.idA(o => o.#x)), "iter")] = () => {
Copy link
Contributor Author

@JLHwung JLHwung Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This failing test is disabled. It is already failing on main. I think it should be fixed after #16341 is fixed.

@dec
class B extends idFactory("B") {
#x = "B#x";
@(yield super.idA(o => o.#x), dummy)
Copy link
Contributor Author

@JLHwung JLHwung Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the Node.js 16 CI is failing but Node.js >= 18 is fine, I guess it was an engine bug, I will investigate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting.

According to CI, this test is failing on Node.js 16 + *nix, but it works on Node.js 16 + Windows.
If I only run this test on Node.js + macOS, it works fine.

So it points to an OS-specific optimizer bug. I will mark this test as node.js 18+.

}
}
expect([...A].map(fn => fn(b)).join()).toBe("B#x,B#x");
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hang tight. This test can be very confusing, I have to carefully specify the receiver to make it a valid JavaScript. I think it is worthy of a compiler assumption such as DecoratorDoesNotReplaceClass, to avoid the inner class completely, because once a class is replaced in a class decorator, the common this element access could be easily broken.

@@ -1,3 +1,4 @@
{
"plugins": [["proposal-decorators", { "version": "2023-11" }]]
"plugins": [["proposal-decorators", { "version": "2023-11" }]],
"minNodeVersion": "16.11.0"
Copy link
Contributor Author

@JLHwung JLHwung Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside: WDYT about a minNodeExecVersion option? So for old Node.js version we can still transform the input and see if the output matches the fixture, but the test runner will ignore the exec.js. I guess most minNodeVersion can be replaced by minNodeExecVersion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me. I wonder if any test needs to skip compiling on old versions, or if we can just update minNodeVersion to only skip execution.

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test case with static fields too, other than static block and methods? And one with all of them at the same time.

m() {}
}];
#method() {
return _method.call(this, ...arguments);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we generate _method.apply(this, arguments), without spread?

m() {}
}];
#method(...arg) {
return _method.call(this, ...arg);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not much better than _method.apply(this, arguments) :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the output will be marginally smaller after minification. Do you want to always generate the spec output?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to always use .apply so that the generated code doesn't have to go through the iterator protocol, but still we can avoid making sure that #method has the correct length when the assumption is enabled.

@JLHwung
Copy link
Contributor Author

JLHwung commented Mar 12, 2024

Can you add a test case with static fields too, other than static block and methods?

As for static fields test, does this test look good?

{
"instance private access in a static field initializer";
let hasX, getX, setX, hasA, getA, setA, hasM, callM, staticThis, OriginalFoo;
class Bar {}
const dec = (Foo) => {
OriginalFoo = Foo;
return Bar;
};
@dec
class Foo {
#x;
accessor #a;
#m() { return "#m" }
x;
accessor a;
m() {}
static field = (
staticThis = this,
hasX = (o) => #x in o,
getX = (o) => o.#x,
setX = (o, v) => o.#x = v,
hasA = (o) => #a in o,
getA = (o) => o.#a,
setA = (o, v) => o.#a = v,
hasM = (o) => #m in o,
callM = (o) => o.#m()
);
}
const foo = new OriginalFoo();
const bar = new Foo();
expect(hasX(foo)).toBe(true);
expect(getX((setX(foo, "#x"), foo))).toBe("#x");
expect(hasA(foo)).toBe(true);
expect(getA((setA(foo, "#a"), foo))).toBe("#a");
expect(hasM(foo)).toBe(true);
expect(callM(foo)).toBe("#m");
expect(hasX(bar)).toBe(false);
expect(hasA(bar)).toBe(false);
expect(hasM(bar)).toBe(false);
expect(foo.hasOwnProperty("x")).toBe(true);
expect(bar.hasOwnProperty("x")).toBe(false);
expect(OriginalFoo.prototype.hasOwnProperty("a")).toBe(true);
expect(Bar.prototype.hasOwnProperty("a")).toBe(false);
expect(OriginalFoo.prototype.hasOwnProperty("m")).toBe(true);
expect(Bar.prototype.hasOwnProperty("m")).toBe(false);
expect(staticThis).toBe(Bar);
}

And one with all of them at the same time.

Sure.

@nicolo-ribaudo
Copy link
Member

As for static fields test, does this test look good?

Yes 🙃 I promise I actually reviewed this PR, I don't know how I missed it.

Comment on lines +24 to +27
callM = _p3 => {
var m = babelHelpers.assertClassBrand(_Foo3_brand, _p3, _m);
return m();
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can optimize it in the future.

babelHelpers.assertClassBrand(_Foo3_brand, _p3);
return _m();

or

return babelHelpers.assertClassBrand(_Foo3_brand, _p3, _m)();

@JLHwung JLHwung merged commit dc891b6 into babel:main Mar 14, 2024
50 checks passed
@JLHwung JLHwung deleted the fix-decorated-class-static-field-private-access branch March 14, 2024 13:09
Vylpes pushed a commit to Vylpes/random-bunny that referenced this pull request Apr 15, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@babel/traverse](https://babel.dev/docs/en/next/babel-traverse) ([source](https://github.com/babel/babel)) | resolutions | minor | [`7.23.9` -> `7.24.1`](https://renovatebot.com/diffs/npm/@babel%2ftraverse/7.23.9/7.24.1) |

---

### Release Notes

<details>
<summary>babel/babel (@&#8203;babel/traverse)</summary>

### [`v7.24.1`](https://github.com/babel/babel/blob/HEAD/CHANGELOG.md#v7241-2024-03-19)

[Compare Source](babel/babel@v7.24.0...v7.24.1)

##### 🐛 Bug Fix

-   `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`
    -   [#&#8203;16350](babel/babel#16350) Fix decorated class computed keys ordering ([@&#8203;JLHwung](https://github.com/JLHwung))
    -   [#&#8203;16344](babel/babel#16344) Fix decorated class static field private access ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-plugin-proposal-decorators`, `babel-plugin-proposal-json-modules`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`
    -   [#&#8203;16329](babel/babel#16329) Respect `moduleName` for `@babel/runtime/regenerator` imports ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties`
    -   [#&#8203;16331](babel/babel#16331) Fix decorator memoiser binding kind ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-helper-create-class-features-plugin`, `babel-helper-replace-supers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`
    -   [#&#8203;16325](babel/babel#16325) Fix decorator evaluation private environment ([@&#8203;JLHwung](https://github.com/JLHwung))

##### 📝 Documentation

-   [#&#8203;16319](babel/babel#16319) Update SECURITY.md ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

##### 🏠 Internal

-   `babel-code-frame`, `babel-highlight`
    -   [#&#8203;16359](babel/babel#16359) Replace `chalk` with `picocolors` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-fixtures`, `babel-helpers`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-unicode-sets-regex`, `babel-preset-env`, `babel-preset-flow`
    -   [#&#8203;16352](babel/babel#16352) Run Babel transform tests on old node if possible ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone`
    -   [#&#8203;16323](babel/babel#16323) Allow separate helpers to be excluded in Babel 8 ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-helper-module-imports`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-proposal-json-modules`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx`
    -   [#&#8203;16349](babel/babel#16349) Support merging imports in import injector ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-create-class-features-plugin`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-proposal-export-default-from`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-import-attributes-to-assertions`, `babel-plugin-proposal-import-defer`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-proposal-json-modules`, `babel-plugin-proposal-optional-chaining-assign`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-proposal-regexp-modifiers`, `babel-plugin-proposal-throw-expressions`, `babel-plugin-syntax-async-do-expressions`, `babel-plugin-syntax-decimal`, `babel-plugin-syntax-decorators`, `babel-plugin-syntax-destructuring-private`, `babel-plugin-syntax-do-expressions`, `babel-plugin-syntax-explicit-resource-management`, `babel-plugin-syntax-export-default-from`, `babel-plugin-syntax-flow`, `babel-plugin-syntax-function-bind`, `babel-plugin-syntax-function-sent`, `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-import-attributes`, `babel-plugin-syntax-import-defer`, `babel-plugin-syntax-import-reflection`, `babel-plugin-syntax-import-source`, `babel-plugin-syntax-jsx`, `babel-plugin-syntax-module-blocks`, `babel-plugin-syntax-optional-chaining-assign`, `babel-plugin-syntax-partial-application`, `babel-plugin-syntax-pipeline-operator`, `babel-plugin-syntax-record-and-tuple`, `babel-plugin-syntax-throw-expressions`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoped-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-dotall-regex`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-export-namespace-from`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-function-name`, `babel-plugin-transform-instanceof`, `babel-plugin-transform-jscript`, `babel-plugin-transform-json-strings`, `babel-plugin-transform-literals`, `babel-plugin-transform-logical-assignment-operators`, `babel-plugin-transform-member-expression-literals`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-new-target`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-numeric-separator`, `babel-plugin-transform-object-assign`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-object-set-prototype-of-to-assign`, `babel-plugin-transform-object-super`, `babel-plugin-transform-optional-catch-binding`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-parameters`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-property-literals`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-display-name`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-compat`, `babel-plugin-transform-react-jsx-self`, `babel-plugin-transform-react-jsx-source`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-reserved-words`, `babel-plugin-transform-runtime`, `babel-plugin-transform-shorthand-properties`, `babel-plugin-transform-spread`, `babel-plugin-transform-sticky-regex`, `babel-plugin-transform-strict-mode`, `babel-plugin-transform-template-literals`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-plugin-transform-unicode-escapes`, `babel-plugin-transform-unicode-property-regex`, `babel-plugin-transform-unicode-regex`, `babel-plugin-transform-unicode-sets-regex`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript`
    -   [#&#8203;16332](babel/babel#16332) Test Babel 7 plugins compatibility with Babel 8 core ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-compat-data`, `babel-plugin-transform-object-rest-spread`, `babel-preset-env`
    -   [#&#8203;16318](babel/babel#16318) \[babel 8] Fix `@babel/compat-data` package.json ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

##### 🔬 Output optimization

-   `babel-helper-replace-supers`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-parameters`, `babel-plugin-transform-runtime`
    -   [#&#8203;16345](babel/babel#16345) Optimize the use of `assertThisInitialized` after `super()` ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`
    -   [#&#8203;16343](babel/babel#16343) Use simpler `assertThisInitialized` more often ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-object-rest-spread`, `babel-traverse`
    -   [#&#8203;16342](babel/babel#16342) Consider well-known and registered symbols as literals ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-core`, `babel-plugin-external-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-function-bind`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-function-name`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-parameters`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-runtime`, `babel-plugin-transform-spread`, `babel-plugin-transform-typescript`, `babel-preset-env`
    -   [#&#8203;16326](babel/babel#16326) Reduce the use of class names ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))

### [`v7.24.0`](https://github.com/babel/babel/blob/HEAD/CHANGELOG.md#v7240-2024-02-28)

[Compare Source](babel/babel@v7.23.9...v7.24.0)

##### 🚀 New Feature

-   `babel-standalone`
    -   [#&#8203;11696](babel/babel#11696) Export babel tooling packages in `@babel/standalone` ([@&#8203;ajihyf](https://github.com/ajihyf))
-   `babel-core`, `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-transform-class-properties`
    -   [#&#8203;16267](babel/babel#16267) Implement `noUninitializedPrivateFieldAccess` assumption ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-decorators`, `babel-plugin-transform-class-properties`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`
    -   [#&#8203;16242](babel/babel#16242) Support decorator 2023-11 normative updates ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-preset-flow`
    -   [#&#8203;16309](babel/babel#16309) \[babel 7] Allow setting `ignoreExtensions` in Flow preset ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
    -   [#&#8203;16284](babel/babel#16284) Add `experimental_useHermesParser` option in `preset-flow` ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-helper-import-to-platform-api`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-proposal-json-modules`, `babel-standalone`
    -   [#&#8203;16172](babel/babel#16172) Add transform support for JSON modules imports ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-plugin-transform-runtime`
    -   [#&#8203;16241](babel/babel#16241) Add back `moduleName` option to `@babel/plugin-transform-runtime` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-parser`, `babel-types`
    -   [#&#8203;16277](babel/babel#16277) Allow import attributes for `TSImportType` ([@&#8203;sosukesuzuki](https://github.com/sosukesuzuki))

##### 🐛 Bug Fix

-   `babel-plugin-proposal-do-expressions`, `babel-traverse`
    -   [#&#8203;16305](babel/babel#16305) fix: avoid `popContext` on unvisited node paths ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-helper-create-class-features-plugin`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`
    -   [#&#8203;16312](babel/babel#16312) Fix class private properties when `privateFieldsAsSymbols` ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-helper-create-class-features-plugin`, `babel-plugin-transform-private-methods`
    -   [#&#8203;16307](babel/babel#16307) Fix the support of `arguments` in private `get/set` method ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`
    -   [#&#8203;16287](babel/babel#16287) Reduce decorator static property size ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`
    -   [#&#8203;16281](babel/babel#16281) Fix evaluation order of decorators with cached receiver ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
    -   [#&#8203;16279](babel/babel#16279) Fix decorator this memoization ([@&#8203;JLHwung](https://github.com/JLHwung))
    -   [#&#8203;16266](babel/babel#16266) Preserve `static` on decorated private `accessor` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
    -   [#&#8203;16258](babel/babel#16258) fix: handle decorated async private method and generator ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-typescript`, `babel-preset-env`
    -   [#&#8203;16275](babel/babel#16275) Fix class private properties when `privateFieldsAsProperties` ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-helpers`
    -   [#&#8203;16268](babel/babel#16268) Do not consider `arguments` in a helper as a global reference ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helpers`, `babel-plugin-proposal-decorators`
    -   [#&#8203;16270](babel/babel#16270) Handle symbol key class elements decoration ([@&#8203;JLHwung](https://github.com/JLHwung))
    -   [#&#8203;16265](babel/babel#16265) Do not define `access.get` for public setter decorators ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

##### 💅 Polish

-   `babel-core`, `babel-helper-create-class-features-plugin`, `babel-preset-env`
    -   [#&#8203;12428](babel/babel#12428) Suggest using `BABEL_SHOW_CONFIG_FOR` for config problems ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

##### 🏠 Internal

-   `babel-helper-transform-fixture-test-runner`
    -   [#&#8203;16278](babel/babel#16278) Continue writing `output.js` when `exec.js` throws ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))

##### 🔬 Output optimization

-   `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`
    -   [#&#8203;16306](babel/babel#16306) Avoid intermediate functions for private accessors with decs ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties`
    -   [#&#8203;16294](babel/babel#16294) More aggressively inline decorators in the static block ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-transform-private-methods`
    -   [#&#8203;16283](babel/babel#16283) Do not use `classPrivateMethodGet` ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`
    -   [#&#8203;16287](babel/babel#16287) Reduce decorator static property size ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`
    -   [#&#8203;16280](babel/babel#16280) Reduce element decorator temp variables ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-helper-create-class-features-plugin`, `babel-helper-fixtures`, `babel-helpers`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-optional-chaining-assign`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`
    -   [#&#8203;16261](babel/babel#16261) Do not use descriptors for private class elements ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helpers`, `babel-plugin-proposal-decorators`
    -   [#&#8203;16263](babel/babel#16263) Reduce helper size for decorator 2023-11 ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/random-bunny/pulls/156
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Decorators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Instance brand checks defined in static class elements do not work when the class is decorated
4 participants