Releases: salesforce/lwc
v8.19.1
What's Changed
- feat: CSR/SSRv1 context by @jhefferman-sfdc in #5356
v8.19.0
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?
- feat: make it pop! (over) @W-18425406 by @wjhsf in #5357
- chore: add summer25 def to nucleus.yaml by @jhefferman-sfdc in #5365
- feat(types): add hidden helper to make inferring element types better @W-18442478 by @wjhsf in #5362
- chore: bump version to 8.19.0 by @wjhsf in #5370
- chore: release 8.19.0 by @wjhsf in #5371
Full Changelog: v8.18.2...v8.19.0
v8.16.5
What's Changed
- fix: remove perf regression for signals re-enablement (256 patch) by @jhefferman-sfdc in #5358
v8.18.2
What's Changed
- chore: fix sauce labs integration by @divmain in #5342
- chore: update SL action to reference
v3.0.0
by @divmain in #5343 - feat: add
lwc:on
directive by @divmain in #5344 - chore: remove perf regression for signals re-enablement by @jhefferman-sfdc in #5347
Full Changelog: v8.18.0...v8.18.2
v8.18.1
What's Changed
- fix: invert locker contructor gate by @jhefferman-sfdc in #5337
v8.18.0
What's Changed
- chore: simplify style dedupe config by @wjhsf in #5271
- feat(ssr-compiler): only mutate things if we're in a component @W-17748892 by @wjhsf in #5310
- chore(ssr-compiler): remove fixed FIXMEs by @wjhsf in #5311
- chore: bump version to 8.17.0 by @wjhsf in #5317
- build(deps): bump vite from 6.2.3 to 6.2.4 by @dependabot in #5315
- build(deps): bump the theoretically-non-breaking group with 15 updates by @dependabot in #5313
- chore: re-introduce new constructor validation with gate by @jhefferman-sfdc in #5320
- fix(ssr): don't break on unused default templates @W-18170898 by @wjhsf in #5319
- test(decorators): add tests for decorated static props by @wjhsf in #5314
- fix(wire): connect wire before calling connectedCallback @W-18205007 by @wjhsf in #5322
- build(deps): bump vite from 6.2.4 to 6.2.5 by @dependabot in #5321
- build(deps): bump the theoretically-non-breaking group with 9 updates by @dependabot in #5323
- fix(ssr): address scope token test failures by @wjhsf in #5324
- build(deps): bump koa from 2.15.4 to 2.16.1 by @dependabot in #5325
- build(deps): bump vite from 6.2.5 to 6.2.6 by @dependabot in #5328
- chore(fixtures): remove some empty files by @wjhsf in #5326
- build(deps-dev): bump the theoretically-non-breaking group with 11 updates by @dependabot in #5332
- feat(release): add shell scripts to automate PR creation by @wjhsf in #5330
- chore: enable engine-server fixture tests in production mode @W-17972327 by @wjhsf in #5327
- chore: bump version to v8.18.0 by @wjhsf in #5333
- @W-18268582 chore: release 8.18.0 by @wjhsf in #5334
Full Changelog: v8.16.4...v8.18.0
v8.17.0
What's Changed
- chore: simplify style dedupe config by @wjhsf in #5271
- WARNING: This is a breaking change for users of the experimental new SSR packages
- feat(ssr-compiler): only mutate things if we're in a component @W-17748892 by @wjhsf in #5310
- chore(ssr-compiler): remove fixed FIXMEs by @wjhsf in #5311
- chore: bump version to 8.17.0 by @wjhsf in #5317
- chore: release 8.17.0 @W-18174087 by @wjhsf in #5318
Full Changelog: v8.16.4...v8.17.0
v8.16.4
What's Changed
- chore(integration-karma): remove programmatic DSD check by @wjhsf in #5299
- chore(dependabot): separate out all @wdio packages by @wjhsf in #5300
- build(deps): bump vite from 6.0.11 to 6.2.3 by @dependabot in #5305
- chore(eslint): update config to catch .only and .skip files by @wjhsf in #5303
- fix(ssr): callable wire adapter behavior by @divmain in #5304
v8.16.3
What's Changed
- wire api fix by @jhefferman-sfdc in #5294
v8.16.2
What's Changed
- chore(rollup): use less confusing implementation for default true by @wjhsf in #5263
- chore: expose
lwc-style
register util by @wjhsf in #5277 - chore: use
__lwc
for transmogrified function names by @wjhsf in #5278 - chore: upgrade dependencies by @jye-sf in #5288
- fix: colliding error prop delta by @jhefferman-sfdc in #5287
- fix: added readonly function and tests by @jhefferman-sfdc in #5286