Skip to content

Releases: salesforce/lwc

v8.3.0

23 Oct 20:28
cc298dd
Compare
Choose a tag to compare

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 than node: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

16 Oct 17:49
Compare
Choose a tag to compare

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

10 Oct 02:40
86682ec
Compare
Choose a tag to compare

What's Changed

Full Changelog: v7.1.4...v7.1.5

v8.1.3

04 Oct 21:16
2868e53
Compare
Choose a tag to compare

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 in lwc 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

27 Sep 18:47
e97cb39
Compare
Choose a tag to compare

What's Changed

Full Changelog: v8.1.1...v8.1.2

v8.1.1

26 Sep 17:01
bdde92f
Compare
Choose a tag to compare

What's Changed

Full Changelog: v8.1.0...v8.1.1

v8.1.0

18 Sep 16:57
5889f3a
Compare
Choose a tag to compare

What's Changed

Full Changelog: v8.0.0...v8.1.0

v8.0.0

06 Sep 19:53
1f9e31f
Compare
Choose a tag to compare

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 a const 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 type string 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.
  • 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

05 Sep 17:56
1a775cc
Compare
Choose a tag to compare

What's Changed

Full Changelog: v7.2.5...v7.2.6

v7.1.4

05 Sep 18:55
43bf9cd
Compare
Choose a tag to compare

What's Changed

Full Changelog: v7.1.3...v7.1.4