salesforce / lwc

⚡️ LWC - A Blazing Fast, Enterprise-Grade Web Components Foundation
https://lwc.dev
Other
1.59k stars 386 forks source link

fix(engine-dom): make native lifecycle all-or-nothing #4316

Closed nolanlawson closed 1 week ago

nolanlawson commented 1 week ago

Details

Refactor native lifecycle to make it better reflect reality, by making it all-or-nothing rather than API versioned.

We attempted to ship native lifecycle via API versioning in 250, but we ended up having to revert it due to various breakages, including issues when components of different API versions (and thus lifecycle modes) are composed together: #4248.

The reality is this:

This PR makes our code better reflect this reality by detaching native lifecycle from the API versioning code, and making the DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE flag all-or-nothing.

Does this pull request introduce a breaking change?

Technically yes, but only if an OSS consumer is using the apiVersion option in the compiler to pin to an older version, which nobody should be doing. The apiVersion option is intended to be used only on the Lightning Platform.

Does this pull request introduce an observable change?