Releases: salesforce/lwc
v8.3.0
What's Changed
- test(hydration): ignore expected console warnings by @nolanlawson in #4649
- feat(ssr): implement native slots @W-14631061 by @wjhsf in #4646
- feat(ssr): implement lwc:inner-html @W-16872197 by @wjhsf in #4652
- chore(integration-karma): avoid conditional tests by @cardoso in #4647
- test(hydration): test non-static-optimized by @nolanlawson in #4657
- chore(integration-karma): replace done callback with async/await by @cardoso in #4658
- feat(ssr): explicitly disallow lwc:dynamic @W-16946933 by @wjhsf in #4623
- test(engine-server): add render mode mismatch test by @nolanlawson in #4664
- test(engine-server): more slot tests by @nolanlawson in #4666
- test(engine-server): test scoped slot forwarding by @nolanlawson in #4669
- chore(engine): report
renderMode
mismatch by @nolanlawson in #4667 - refactor(ssr): add back references to
esTemplate
and infer types by @wjhsf in #4660 - build(deps): bump the theoretically-non-breaking group with 12 updates by @dependabot in #4672
- fix(integration-karma): run hydration preprocessor just for focused tests by @cardoso in #4673
- test: use
glob
package rather thannode:fs
by @nolanlawson in #4677 - chore(ssr): implement stubs for
@lwc/engine-server
exports by @wjhsf in #4674 - fix(ssr-compiler): protect internals from userland by @ekashida in #4679
- test(ssr): add basic slot tests by @nolanlawson in #4675
- fix(template-compiler): disable static content optimization for iframes by @nolanlawson in #4678
- fix(ssr-compiler): only track attribute mutations during connectedCallback by @ekashida in #4680
- fix(ssr): use relative imports for implicit templates @W-16975723 by @wjhsf in #4681
- feat(ssr): implement light DOM slots (part 1 -- fallback content) @W-16869599 by @wjhsf in #4682
- feat(signals): add a way to set symbol as key by @rax-it in #4665
- chore: release
v8.3.0
by @rax-it in #4686 - chore: release
v8.3.0
by @rax-it in #4687
Full Changelog: v8.2.0...v8.3.0
v8.2.0
What's Changed
- fix(ssr-compiler): define setters for reflected attributes by @ekashida in #4611
- build(deps-dev): bump the theoretically-non-breaking group with 3 updates by @dependabot in #4613
- feat(ssr-compiler): track mutated attributes by @ekashida in #4616
- build(deps-dev): bump the nx group with 2 updates by @dependabot in #4612
- chore(eslint): restore header rule by @wjhsf in #4619
- fix(ssr): disallow imports from
lwc
in SSR context by @wjhsf in #4617 - refactor(ssr-runtime): split index into multiple files by @wjhsf in #4618
- test(ssr): add ability to diverge from engine-server by @wjhsf in #4620
- chore(test): avoid timeout when debugging by @wjhsf in #4624
- feat(ssr): implement
iterator:*
directive @W-16872183 by @wjhsf in #4615 - fix(ssr): add comments to the output of lwc:if blocks @W-16946260 by @wjhsf in #4622
- chore(deps): pin typescript version by @wjhsf in #4627
- fix: bump parse5, remove
<noframes>
special case by @nolanlawson in #4635 - feat(ssr-runtime): export
renderComponent
alias by @nolanlawson in #4636 - test(ssr): add test for mutate in
render()
by @nolanlawson in #4634 - build(deps): bump the theoretically-non-breaking group across 1 directory with 22 updates by @dependabot in #4639
- chore(tests): use eslint-plugin-vitest by @cardoso in #4629
- build(deps-dev): bump the rollup group with 3 updates by @dependabot in #4587
- chore: release v8.2.0 by @nolanlawson in #4644
- chore: release v8.2.0 by @nolanlawson in #4645
Full Changelog: v8.1.3...v8.2.0
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