Skip to content

Releases: salesforce/lwc

v8.21.2

15 Aug 23:50
0b744c8
Compare
Choose a tag to compare

What's Changed

  • chore(release): update scripts for other git configs and backports by @wjhsf in #5454
  • build(deps-dev): bump the theoretically-non-breaking group with 4 updates by @dependabot[bot] in #5456
  • fix: remove redundant optional chaining on process.env which is breaking testing by @jhefferman-sfdc in #5459
  • chore: bump version to 8.21.2 by @jye-sf in #5461
  • chore: release v8.21.2 by @jye-sf in #5462

Full Changelog: v8.21.1...v8.21.2

v8.21.1

08 Aug 16:56
233b384
Compare
Choose a tag to compare

What's Changed

Full Changelog: v8.20.3...v8.21.1

v8.20.4

08 Aug 17:26
7cadcf2
Compare
Choose a tag to compare

What's Changed

Full Changelog: v8.20.3...v8.20.4

v8.20.3

04 Aug 17:34
20ad10e
Compare
Choose a tag to compare

What's Changed

v8.20.2

30 Jul 16:38
58e9794
Compare
Choose a tag to compare

What's Changed

  • test(ts): add assertion so we don't accidentally bump TS again @W-18978621 by @wjhsf in #5410
  • test(web-test-runner): run hydration tests in CI @W-18780671 by @wjhsf in #5398
  • chore(ci): run perf testing on release branches @W-18882666 by @wjhsf in #5408
  • test(integration): add missing bits to make more tests pass @W-18763051 by @wjhsf in #5411
  • test(integration): more web-test-runner test fixes @W-18763051 by @wjhsf in #5414
  • build(deps): bump the theoretically-non-breaking group across 1 directory with 41 updates by @dependabot[bot] in #5413
  • build(deps-dev): bump dotenv from 16.5.0 to 17.2.0 by @dependabot[bot] in #5417
  • build(deps-dev): bump parse5 from 7.3.0 to 8.0.0 by @dependabot[bot] in #5418
  • build(deps): bump form-data from 4.0.1 to 4.0.4 by @dependabot[bot] in #5424
  • fix(types): add synthetic prop to component template by @wjhsf in #5426
  • docs: architecture.md preview. by @TitanCmd in #5427
  • chore: bump version to 8.20.2 by @wjhsf in #5430
  • chore: release 8.20.2 by @wjhsf in #5434

New Contributors

Full Changelog: v8.20.1...v8.20.2

v8.20.1

01 Jul 00:54
6bec826
Compare
Choose a tag to compare

What's Changed

Full Changelog: v8.20.0...v8.20.1

v8.20.0

04 Jun 18:41
1ff3a21
Compare
Choose a tag to compare

What's Changed

  • chore: remove structuredClone workaround by @wjhsf in #5367
  • fix(release): oops shell scripts are relative to cwd by @wjhsf in #5368
  • build(deps): bump undici from 6.21.1 to 6.21.3 by @dependabot in #5373
  • test(engine-server): update global attributes spec by @ekashida in #5378
  • feat(ssr): make SSR compiler recognize lwc:on directive @W-18158832 by @gaurav-rk9 in #5377
  • fix(ssr): massive compiled outputs when nested slots are present by @divmain in #5379
  • chore: bump version to 8.20.0 by @wjhsf in #5381
  • chore: release 8.20.0 by @wjhsf in #5382

New Contributors

Full Changelog: v8.19.1...v8.20.0

v8.19.1

16 May 17:05
107a414
Compare
Choose a tag to compare

What's Changed

v8.19.0

09 May 19:11
7417320
Compare
Choose a tag to compare

Better types for template elements

TypeScript component authors can now specify a new property, __lwc_public_property_types__, to indicate to TypeScript which properties are available on the element created by a component. This prevents erroneous property definitions, which are otherwise unavoidable due to the way that TypeScript implements decorators.

Example

// <c-inferred-props>
class InferredProps extends LightningElement {
  @api exposed = 'hello'
  internal = 'secret'
}

// <c-explicit-props>
class ExplicitProps extends InferredProps {
  __lwc_public_property_types__?: {
    exposed: string
  }
}

class Container extends LightningElement {
  checkInferred() {
    const inferred = this.querySelector<LightningHTMLElement<InferredProps>>('c-inferred-props')!
    inferred.exposed // ✅ Valid, no type error
    inferred.internal // ❌ Invalid, but no type error!
  }

  checkExplicit() {
    const explicit = this.querySelector<LightningHTMLElement<ExplicitProps>>('c-explicit-props')!
    explicit.exposed // ✅ Valid, no type error
    explicit.internal // ✅ Invalid, and a type error occurs!
  }
}

In this example, the element interface for c-inferred-props is defined by LightningHTMLElement<InferredProps>. That interface has an erroneous property definition, internal. The internal property is part of the component interface, but is not decorated with @api, so it should not be part of the element interface.

The element interface for c-explicit-props is defined by LightningHTMLElement<ExplicitProps>. Because ExplicitProps defines __lwc_public_property_types__, the element interface does not include the internal property, which is the correct behavior.

What else changed?

Full Changelog: v8.18.2...v8.19.0

v8.16.5

05 May 20:31
826b829
Compare
Choose a tag to compare

What's Changed