trailheadapps / lwc-recipes-oss

A collection of easy-to-digest code examples for Lightning Web Components on any platform.
https://lwc.dev
Creative Commons Zero v1.0 Universal
326 stars 253 forks source link

build(deps): bump lwc from 5.1.0 to 6.0.0 #487

Closed dependabot[bot] closed 7 months ago

dependabot[bot] commented 8 months ago

Bumps lwc from 5.1.0 to 6.0.0.

Release notes

Sourced from lwc's releases.

v6.0.0

LWC v6.0.0 contains breaking changes. Please read carefully below if you are upgrading from v5.

If you are upgrading from v4, please upgrade to v5 first.

[!NOTE] LWC v6 corresponds to Salesforce release Summer '24 (API version 61).

Summary of breaking change

Breaking changes

[!NOTE] On the Salesforce Lightning platform, this change only applies to components with an API version of 61 or above.

Previous versions of LWC used a synthetic (polyfill) system to call the connectedCallback and disconnectedCallback component lifecycle hooks. This was originally designed for legacy browsers such as Internet Explorer 11. Such browsers are no longer supported, and LWC v6 uses the native browser APIs instead.

This change may affect the firing of connectedCallback and disconnectedCallback hooks in your components, since the previous implementation did not perfectly align with the browser standard. Most commonly, this will occur in unit tests, or when manually creating components using the lwc.createElement() API. The new behavior also fixes common memory leaks caused by disconnectedCallback not firing consistently.

Native lifecycle also adds support for the Form-Associated Custom Elements (FACE) and Element Internals APIs.

Changes you may see to connectedCallback and disconnectedCallback behavior:

[!NOTE]
This situation will probably only occur when writing tests that do not connect elements to the DOM.

LWC components now only fire connectedCallback when they are actually connected to the DOM. If they are disconnected from the DOM (i.e. they are not inside the document), then connectedCallback will not fire.

For instance, if you are testing for an event to be fired from a connectedCallback, this would previously work:

export default class Foo extends LightningElement {
  connectedCallback() {
    this.dispatchEvent(new CustomEvent('foo', { bubbles: true, composed: true }))
  }
}

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
codecov-commenter commented 8 months ago

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (c4e5800) 98.62% compared to head (e71f8db) 97.24%. Report is 141 commits behind head on main.

:exclamation: Current head e71f8db differs from pull request most recent head 7c0e76a. Consider uploading reports for the commit 7c0e76a to get more accurate results

Files Patch % Lines
...ecipe/externalComponentNpm/externalComponentNpm.js 50.00% 4 Missing :warning:
...ecipe/externalComponentCdn/externalComponentCdn.js 72.72% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #487 +/- ## ========================================== - Coverage 98.62% 97.24% -1.38% ========================================== Files 42 46 +4 Lines 218 363 +145 Branches 18 62 +44 ========================================== + Hits 215 353 +138 - Misses 3 10 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dependabot[bot] commented 7 months ago

Superseded by #497.