Releases: salesforce/lwc
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
v7.2.3
What's Changed
- build(deps-dev): bump the nx group with 2 updates by @dependabot in #4488
- test(engine-server): assert HMR not supported by @nolanlawson in #4482
- chore(integration-karma): add @types/jasmine by @cardoso in #4485
- build(deps-dev): bump jsdom from 24.1.1 to 25.0.0 by @dependabot in #4491
- build(deps): bump the babel group with 4 updates by @dependabot in #4487
- build(deps): bump the theoretically-non-breaking group across 1 directory with 7 updates by @dependabot in #4492
- test(integration-karma): add listener memoization tests by @nolanlawson in #4480
- build(deps-dev): bump typescript-eslint from 7.17.0 to 8.3.0 by @dependabot in #4494
- fix(template-compiler): escape tag names by @nolanlawson in #4498
- fix(template-compiler): escape attribute names by @nolanlawson in #4499
- chore(release): bump version to v7.2.3 by @wjhsf in #4507
- chore: release v7.2.3 by @wjhsf in #4508
Full Changelog: v7.2.2...v7.2.3
v7.2.2
What's Changed
- test(integration-karma): test bare decorator APIs by @nolanlawson in #4434
- build(deps-dev): bump @types/node from 20.14.11 to 22.1.0 by @dependabot in #4437
- build(deps): bump the theoretically-non-breaking group with 12 updates by @dependabot in #4436
- chore: upgrade tachometer by @nolanlawson in #4440
- perf(engine-core): reduce fragment cache objects by @nolanlawson in #4431
- chore(deps): update prettier to v3 by @cardoso in #4443
- test: remove remaining vestiges of jest types by @cardoso in #4435
- chore: remove obsolete comment by @nolanlawson in #4449
- chore(scripts): use nx for (pre-)release by @wjhsf in #4445
- test: improve tests for unhandled rejections by @nolanlawson in #4453
- chore: update dependencies by @jye-sf in #4455
- build(deps): bump postcss-selector-parser from 6.1.1 to 6.1.2 in the theoretically-non-breaking group by @dependabot in #4456
- build(deps): bump axios from 1.7.3 to 1.7.4 by @dependabot in #4459
- build(deps-dev): bump the theoretically-non-breaking group with 7 updates by @dependabot in #4460
- build(deps-dev): bump @wdio/spec-reporter from 8.39.0 to 9.0.4 by @dependabot in #4461
- chore: fix type errors in test files during dev by @cardoso in #4458
- chore(dependabot): add groups, remove outdated by @nolanlawson in #4466
- build(deps-dev): bump the best group with 3 updates by @dependabot in #4469
- build(deps-dev): bump the theoretically-non-breaking group with 3 updates by @dependabot in #4471
- chore(dependabot): add bare package names, nx by @nolanlawson in #4473
- fix: fix light dom slot forwarding bug by @nolanlawson in #4452
- build(deps-dev): bump the webdriverio group with 6 updates by @dependabot in #4474
- chore: restore
release:version
script by @nolanlawson in #4475 - chore: release v7.2.2 by @nolanlawson in #4476
- chore: release v7.2.2 by @nolanlawson in #4477
Full Changelog: v7.2.1...v7.2.2