Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release v6.4.0 #4109

Merged
merged 18 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c49478f
perf: apply static parts optimization to dynamic attributes (#4055)
jmsjtu Mar 19, 2024
b7e8a98
fix: fix iframe onload with static content optimization (#4082)
nolanlawson Mar 19, 2024
81907c3
fix: remove unnecessary nullish coalescing (#4086)
nolanlawson Mar 20, 2024
55112b7
chore: update non-breaking dependencies (#4085)
jye-sf Mar 20, 2024
675655f
perf: Apply static parts optimization to dynamic style (#4084)
jmsjtu Mar 20, 2024
989d810
perf(synthetic-shadow): optimize recursivelySetShadowResolver
nolanlawson Mar 20, 2024
53adcd6
perf(template-compiler): support `key` in static content (#4091)
nolanlawson Mar 22, 2024
998e5d5
perf: optimize `createUpgradableConstructor` (#4092)
nolanlawson Mar 22, 2024
90745b5
perf: apply static parts optimization to dynamic class attributes (#4…
jmsjtu Mar 22, 2024
583ce52
chore: update jest snapshot (#4095)
nolanlawson Mar 22, 2024
2870fc3
fix: support arguments for FACE callbacks (#4094)
nolanlawson Mar 22, 2024
3665f31
fix(engine-core): fix warnings for invalid keys (#4097)
nolanlawson Mar 26, 2024
a256925
perf(engine-core): optimize `patchClassAttribute` (#4102)
nolanlawson Mar 27, 2024
8d9da28
fix: error accessing tagName on fragment (#4103)
jmsjtu Mar 27, 2024
ea41be4
perf: apply static parts optimization to dynamic text (#4099)
jmsjtu Mar 27, 2024
8643706
fix: children and childNodes not returning top-level slotted children…
abdulsattar Mar 27, 2024
8ab5109
fix: add signals as dependency (#4106)
jmsjtu Mar 27, 2024
cc75ef4
chore: release v6.4.0 (#4108)
jmsjtu Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lwc-monorepo",
"version": "6.3.4",
"version": "6.4.0",
"private": true,
"description": "Lightning Web Components",
"repository": {
Expand Down Expand Up @@ -31,7 +31,7 @@
"prettier": "v3 requires ESM, and we use prettier in our Jest tests. Jest does not support ESM yet."
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@commitlint/cli": "^19.0.3",
"@lwc/eslint-plugin-lwc-internal": "link:./scripts/eslint-plugin",
"@lwc/jest-utils-lwc-internals": "link:./scripts/jest/utils",
Expand All @@ -42,12 +42,12 @@
"@rollup/plugin-typescript": "^11.1.6",
"@types/babel__core": "^7.20.5",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.26",
"@types/node": "^20.11.30",
"@types/prettier": "^2.7.3",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"bytes": "^3.1.2",
"es-module-lexer": "^1.4.1",
"es-module-lexer": "^1.4.2",
"eslint": "^8.57.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.29.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/@lwc/aria-reflection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
],
"name": "@lwc/aria-reflection",
"version": "6.3.4",
"version": "6.4.0",
"description": "ARIA element reflection polyfill for strings",
"keywords": [
"aom",
Expand Down
6 changes: 3 additions & 3 deletions packages/@lwc/babel-plugin-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
],
"name": "@lwc/babel-plugin-component",
"version": "6.3.4",
"version": "6.4.0",
"description": "Babel plugin to transform a LWC module",
"keywords": [
"lwc"
Expand Down Expand Up @@ -43,8 +43,8 @@
},
"dependencies": {
"@babel/helper-module-imports": "7.22.15",
"@lwc/errors": "6.3.4",
"@lwc/shared": "6.3.4",
"@lwc/errors": "6.4.0",
"@lwc/shared": "6.4.0",
"line-column": "~1.0.2"
},
"devDependencies": {
Expand Down
14 changes: 7 additions & 7 deletions packages/@lwc/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
],
"name": "@lwc/compiler",
"version": "6.3.4",
"version": "6.4.0",
"description": "LWC compiler",
"keywords": [
"lwc"
Expand Down Expand Up @@ -42,16 +42,16 @@
}
},
"dependencies": {
"@babel/core": "7.24.0",
"@babel/core": "7.24.1",
"@babel/plugin-proposal-async-generator-functions": "7.20.7",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
"@babel/plugin-transform-async-to-generator": "7.23.3",
"@locker/babel-plugin-transform-unforgeables": "0.20.0",
"@lwc/babel-plugin-component": "6.3.4",
"@lwc/errors": "6.3.4",
"@lwc/shared": "6.3.4",
"@lwc/style-compiler": "6.3.4",
"@lwc/template-compiler": "6.3.4"
"@lwc/babel-plugin-component": "6.4.0",
"@lwc/errors": "6.4.0",
"@lwc/shared": "6.4.0",
"@lwc/style-compiler": "6.4.0",
"@lwc/template-compiler": "6.4.0"
}
}
10 changes: 5 additions & 5 deletions packages/@lwc/engine-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
],
"name": "@lwc/engine-core",
"version": "6.3.4",
"version": "6.4.0",
"description": "Core LWC engine APIs.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -42,11 +42,11 @@
}
},
"dependencies": {
"@lwc/features": "6.3.4",
"@lwc/shared": "6.3.4"
"@lwc/features": "6.4.0",
"@lwc/shared": "6.4.0",
"@lwc/signals": "6.4.0"
},
"devDependencies": {
"observable-membrane": "2.0.0",
"@lwc/signals": "6.3.4"
"observable-membrane": "2.0.0"
}
}
38 changes: 23 additions & 15 deletions packages/@lwc/engine-core/src/framework/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ import { RenderMode, ShadowMode, SlotSet, VM } from './vm';
import { LightningElementConstructor } from './base-lightning-element';
import { markAsDynamicChildren } from './rendering';
import {
isVBaseElement,
isVScopedSlotFragment,
isVStatic,
Key,
VComment,
VCustomElement,
Expand All @@ -47,11 +49,10 @@ import {
VNodeType,
VScopedSlotFragment,
VStatic,
VText,
VStaticPart,
VStaticPartData,
isVBaseElement,
isVStatic,
VStaticPartType,
VText,
} from './vnodes';
import { getComponentRegisteredName } from './component';

Expand All @@ -62,10 +63,14 @@ function addVNodeToChildLWC(vnode: VCustomElement) {
}

// [s]tatic [p]art
function sp(partId: number, data: VStaticPartData): VStaticPart {
function sp(partId: number, data: VStaticPartData | null, text: string | null): VStaticPart {
// Static part will always have either text or data, it's guaranteed by the compiler.
const type = isNull(text) ? VStaticPartType.Element : VStaticPartType.Text;
return {
type,
partId,
data,
text,
elm: undefined, // elm is defined later
};
}
Expand All @@ -84,8 +89,13 @@ function ssf(slotName: unknown, factory: (value: any, key: any) => VFragment): V
}

// [st]atic node
function st(fragment: Element, key: Key, parts?: VStaticPart[]): VStatic {
function st(
fragmentFactory: (parts?: VStaticPart[]) => Element,
key: Key,
parts?: VStaticPart[]
): VStatic {
const owner = getVMBeingRendered()!;
const fragment = fragmentFactory(parts);
const vnode: VStatic = {
type: VNodeType.Static,
sel: undefined,
Expand Down Expand Up @@ -144,12 +154,7 @@ function h(sel: string, data: VElementData, children: VNodes = EmptyArray): VEle
data.styleDecls && data.style,
`vnode.data.styleDecls and vnode.data.style ambiguous declaration.`
);
if (data.style && !isString(data.style)) {
logError(
`Invalid 'style' attribute passed to <${sel}> is ignored. This attribute must be a string value.`,
vmBeingRendered
);
}

forEach.call(children, (childVnode: VNode | null | undefined) => {
if (childVnode != null) {
assert.isTrue(
Expand Down Expand Up @@ -377,7 +382,7 @@ function i(
const list: VNodes = [];
// TODO [#1276]: compiler should give us some sort of indicator when a vnodes collection is dynamic
sc(list);
const vmBeingRendered = getVMBeingRendered();
const vmBeingRendered = getVMBeingRendered()!;
if (isUndefined(iterable) || iterable === null) {
if (process.env.NODE_ENV !== 'production') {
logError(
Expand Down Expand Up @@ -432,15 +437,18 @@ function i(
if (process.env.NODE_ENV !== 'production') {
const vnodes = isArray(vnode) ? vnode : [vnode];
forEach.call(vnodes, (childVnode: VNode | null) => {
if (!isNull(childVnode) && isObject(childVnode) && !isUndefined(childVnode.sel)) {
// Check that the child vnode is either an element or VStatic
if (!isNull(childVnode) && (isVBaseElement(childVnode) || isVStatic(childVnode))) {
const { key } = childVnode;
// In @lwc/engine-server the fragment doesn't have a tagName, default to the VM's tagName.
const { tagName } = vmBeingRendered;
if (isString(key) || isNumber(key)) {
if (keyMap[key] === 1 && isUndefined(iterationError)) {
iterationError = `Duplicated "key" attribute value for "<${childVnode.sel}>" in ${vmBeingRendered} for item number ${j}. A key with value "${childVnode.key}" appears more than once in the iteration. Key values must be unique numbers or strings.`;
iterationError = `Duplicated "key" attribute value in "<${tagName}>" for item number ${j}. A key with value "${key}" appears more than once in the iteration. Key values must be unique numbers or strings.`;
}
keyMap[key] = 1;
} else if (isUndefined(iterationError)) {
iterationError = `Invalid "key" attribute value in "<${childVnode.sel}>" in ${vmBeingRendered} for item number ${j}. Set a unique "key" value on all iterated child elements.`;
iterationError = `Invalid "key" attribute value in "<${tagName}>" for item number ${j}. Set a unique "key" value on all iterated child elements.`;
}
}
});
Expand Down