Releases: salesforce/lwc
v7.1.5
What's Changed
- chore(nucleus): use
winter25
dist-tag by @nolanlawson in #4531 - fix(engine-core): gated slot forwarding fix by @ekashida in #4625
- chore: v7.1.5 @W-16948407 by @ekashida in #4626
Full Changelog: v7.1.4...v7.1.5
v8.1.3
What's Changed
- fix(ssr): avoid undefined appended to tag name by @nolanlawson in #4583
- fix(ssr): add missing methods from LightningElement @W-16614337 by @wjhsf in #4585
- build(deps): bump the theoretically-non-breaking group with 14 updates by @dependabot in #4588
- fix(ssr): use style normalizer from template compiler by @nolanlawson in #4584
- fix(ssr): normalize class names @W-16869035 by @wjhsf in #4590
- fix(ssr): add more LightningElement methods @W-16867451 by @wjhsf in #4589
- fix(ssr): improve error message when test succeeds but formatting fails by @wjhsf in #4591
- fix(engine-server): setAttribute should gracefully handle non-string values by @ekashida in #4593
- fix(hydration): fix
validationOptOut
with auto-detection by @nolanlawson in #4592 - test(fixtures): add option to have human-friendly description by @wjhsf in #4595
- feat(lwc): re-export @lwc/ssr-compiler and @lwc/ssr-runtime @W-16856898 by @wjhsf in #4596
- fix(ssr): disallow </style> in CSS files @W-16882876 by @wjhsf in #4598
- fix(ssr-compiler): define IR to ES map for lwc:external nodes by @ekashida in #4599
- fix(ssr-compiler): generate scope tokens using component name and namespace by @ekashida in #4597
- test(imports): add fixture for LWC imports from helper file @W-16872166 by @wjhsf in #4601
- chore: remove quotes from error message by @wjhsf in #4602
- fix(ssr-compiler): setAttribute and getAttribute by @ekashida in #4603
- chore: update dependencies by @jye-sf in #4604
- chore: add
DataCallback
as type export inlwc
by @jmsjtu in #4607 - fix(ssr-compiler): boolean attribute value as empty string by @ekashida in #4606
Full Changelog: v8.1.2...v8.1.3
v8.1.2
What's Changed
- fix(template-compiler): styles containing newlines by @nolanlawson in #4580
- fix(engine): disallow
innerHTML
outsidelwc:inner-html
by @nolanlawson in #4578 - chore: release v8.1.2 by @nolanlawson in #4581
- chore: release v8.1.2 by @nolanlawson in #4582
Full Changelog: v8.1.1...v8.1.2
v8.1.1
What's Changed
- build(deps): bump vite from 5.3.4 to 5.4.6 by @dependabot in #4557
- test(karma): test API version 62 in CI by @nolanlawson in #4562
- test: add top-level karma watch script by @nolanlawson in #4563
- test(ssr): add more stylesheet fixtures by @nolanlawson in #4566
- build(deps-dev): bump rollup from 4.21.3 to 4.22.4 by @dependabot in #4573
- fix(compiler): fix noframes rendering by @nolanlawson in #4571
- test(ssr): add
static stylesheets
fixtures by @nolanlawson in #4572 - fix(ssr): remove class and style attributes when empty @W-16772409@ by @wjhsf in #4565
- build(deps-dev): bump the theoretically-non-breaking group across 1 directory with 18 updates by @dependabot in #4574
- fix(ssr-compiler): implement scoped styles and scope tokens by @nolanlawson in #4567
- chore: release v8.1.1 by @nolanlawson in #4575
- chore: release v8.1.1 by @nolanlawson in #4576
Full Changelog: v8.1.0...v8.1.1
v8.1.0
What's Changed
- build(deps): bump the theoretically-non-breaking group with 19 updates by @dependabot in #4536
- chore(rollup-plugin): speed up and reduce memory usage in tests by @cardoso in #4534
- feat(engine): enhance performance timings by @cardoso in #4535
- feat(engine): add tooltips for performance timings by @nolanlawson in #4541
- feat(template-compiler): enable quoted attribute expressions by @ekashida in #4543
- feat: add mutation logging to DevTools profiler by @nolanlawson in #4544
- build(deps): bump the theoretically-non-breaking group with 16 updates by @dependabot in #4549
- build(deps-dev): bump chokidar from 3.6.0 to 4.0.0 by @dependabot in #4551
- build(deps): bump meriyah from 5.0.0 to 6.0.0 by @dependabot in #4550
- fix: revert "build(deps): bump meriyah from 5.0.0 to 6.0.0 (#4550)" by @nolanlawson in #4558
- chore(template-compiler): normalize class and style attribute values by @ekashida in #4553
- fix(ssr): allow capital letters in component names by @nolanlawson in #4561
- chore: release v8.1.0 by @nolanlawson in #4560
- chore: release v8.1.0 by @nolanlawson in #4564
Full Changelog: v8.0.0...v8.1.0
v8.0.0
What's Changed
The breaking changes in this release only impact TypeScript users; there is no change in runtime behavior, as compared to v7.2.6.
Important
TypeScript's experimentalDecorators
is no longer supported; you must either specify "experimentalDecorators": false
or remove the option from your TSConfig.
This release contains changes to the type signature of the @wire
decorator, to enable better type checking of the provided values. Given @wire(adapter, config) prop
, the types of config
and prop
now must match the types used by adapter
. The type checking also successfully resolves reactive props (string starting with $
) to the type used by the component.
In the example below, the component passes type checking with LWC v7, but has three new type errors in LWC v8.
type Config = { id: number }
type Book = { title: string, author: string }
declare const getBook: WireAdapterConstructor<Config, Book>
class Component extends LightningElement {
bookId = 123
authorName = 'Codey the Bear'
// Valid: simple case
@wire(getBook, { id: 123 }) valid?: Book
// Valid: `bookId` on the component is a number
@wire(getBook, {id: '$bookId'} as const) validReactiveProp?: Book
// Invalid: `Author` is not `Book`
@wire(getBook, { id: 123 }) invalidPropType?: Author
// Invalid: `true` is not a number
@wire(getBook, { id: true }) invalidConfigType: Book
// Invalid: `authorName` prop on the component is not a number
@wire(getBook, {id: '$authorName'} as const) invalidReactiveProp?: Book
Limitations
- Due to the way decorators are implemented in TypeScript, the type of the prop cannot be inferred from the wire adapter; you must provide an explicit type.
- To get the most accurate validation of your types, use
const
assertions on your config object. Without aconst
assertion, the type system cannot distinguish between a reactive prop (e.g."$authorName"
) and a regular string (e.g."Codey the Bear"
). As a consequence, all values of typestring
are not type checked.- For example, for a config of type
{id: number}
, providing the object{id: "123"}
will pass validation, but{id: "123"} as const
will not.
- For example, for a config of type
- Due to the above constraints, the reported type errors can appear complex and hard to understand. They typically boil down to validating that your config object and prop type both match the type expected by the wire adapter.
Full Changelog: v7.2.6...v8.0.0
v7.2.6
What's Changed
- perf(template-compiler): static-optimize on event listener object by @cardoso in #4468
- chore: release v7.2.6 by @nolanlawson in #4527
- chore: release v7.2.6 by @nolanlawson in #4528
Full Changelog: v7.2.5...v7.2.6
v7.1.4
What's Changed
- fix: backport several validation fixes by @nolanlawson in #4529
- chore: release v7.1.4 by @nolanlawson in #4530
Full Changelog: v7.1.3...v7.1.4
v7.2.5
What's Changed
- chore(release): allow providing release version directly by @wjhsf in #4523
- fix(engine): avoid invalid scope tokens entirely by @nolanlawson in #4524
- chore: release v7.2.5 by @nolanlawson in #4525
- chore: release v7.2.5 by @nolanlawson in #4526
Full Changelog: v7.2.4...v7.2.5
v7.2.4
What's Changed
- chore(nucleus): remove downstreams that always fail by @wjhsf in #4509
- chore(tachometer): fix remote branches by @nolanlawson in #4510
- build(deps): bump the theoretically-non-breaking group with 7 updates by @dependabot in #4516
- build(deps-dev): bump rollup from 4.21.1 to 4.21.2 in the rollup group by @dependabot in #4515
- build(deps-dev): bump the nx group with 2 updates by @dependabot in #4514
- build(deps): bump the babel group with 2 updates by @dependabot in #4513
- chore(dependabot): only use groups for major bumps by @wjhsf in #4518
- fix(engine): avoid non-string scope tokens by @nolanlawson in #4519
- chore: release v7.2.4 by @nolanlawson in #4521
- chore: release v7.2.4 by @nolanlawson in #4522
Full Changelog: v7.2.3...v7.2.4