Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ updates:
patterns:
- 'webdriverio'
- '@wdio/*'
update-types:
- 'major'
prettier:
patterns:
- 'prettier'
Expand Down
29 changes: 24 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import gitignore from 'eslint-config-flat-gitignore';
import vitest from '@vitest/eslint-plugin';
import * as espree from 'espree';

import { PUBLIC_PACKAGES as publicPackageData } from './scripts/shared/packages.mjs';
// convert filepath to eslint glob
const PUBLIC_PACKAGES = publicPackageData.map(({ path }) => `${path}/**`);
Expand All @@ -27,7 +29,7 @@ export default tseslint.config(

gitignore(),
{
ignores: ['**/fixtures'],
ignores: ['packages/**/fixtures/**/*.js'],
},
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
Expand Down Expand Up @@ -403,18 +405,35 @@ export default tseslint.config(

{
// These are empty files used to help debug test fixtures
files: ['**/.only'],
files: ['**/.only', '**/.skip'],
plugins: { '@lwc/lwc-internal': lwcInternal },
languageOptions: {
// Using the default eslint parser because typescript-eslint doesn't
// seem to correctly support `extraFileExtensions`
parser: espree,
parserOptions: {
extraFileExtensions: ['only', 'skip'],
},
},
rules: {
'@lwc/lwc-internal/forbidden-filename': 'error',
// Disable all TS rules because they complain about the parser being espree
...Object.fromEntries(
tseslint.configs.all
.flatMap((cfg) => Object.keys(cfg.rules ?? {}))
.map((rule) => [rule, 'off'])
),
},
},
{
// These are empty files used to help debug test fixtures
files: ['**/.skip'],
plugins: { '@lwc/lwc-internal': lwcInternal },
rules: {
'@lwc/lwc-internal/forbidden-filename': 'off',
// We want to avoid accidentally committing .skip files, but sometimes there are
// legitimate reasons to do so. So we complain when trying to commit, but not any
// other time.
'@lwc/lwc-internal/forbidden-filename':
// eslint-disable-next-line no-undef
process.env.npm_lifecycle_event === 'lint-staged' ? 'error' : 'off',
},
}
);
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lwc-monorepo",
"version": "8.16.3",
"version": "8.16.4",
"private": true,
"description": "Lightning Web Components",
"repository": {
Expand Down Expand Up @@ -76,11 +76,10 @@
"vitest": "^3.0.8"
},
"lint-staged": {
"*.{js,mjs,ts}": "eslint --cache",
"*.{js,mjs,ts,only,skip}": "eslint --cache",
"*.{css,js,json,md,mjs,ts,yaml,yml}": "prettier --check",
"{packages/**/package.json,scripts/tasks/check-and-rewrite-package-json.js}": "node ./scripts/tasks/check-and-rewrite-package-json.js --test",
"{LICENSE-CORE.md,**/LICENSE.md,yarn.lock,scripts/tasks/generate-license-files.js,scripts/shared/bundled-dependencies.js}": "node ./scripts/tasks/generate-license-files.js --test",
"*.{only,skip}": "eslint --cache --plugin '@lwc/eslint-plugin-lwc-internal' --rule '@lwc/lwc-internal/forbidden-filename: error'"
"{LICENSE-CORE.md,**/LICENSE.md,yarn.lock,scripts/tasks/generate-license-files.js,scripts/shared/bundled-dependencies.js}": "node ./scripts/tasks/generate-license-files.js --test"
},
"workspaces": [
"packages/@lwc/*",
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": "8.16.3",
"version": "8.16.4",
"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": "8.16.3",
"version": "8.16.4",
"description": "Babel plugin to transform a LWC module",
"keywords": [
"lwc"
Expand Down Expand Up @@ -47,8 +47,8 @@
},
"dependencies": {
"@babel/helper-module-imports": "7.25.9",
"@lwc/errors": "8.16.3",
"@lwc/shared": "8.16.3",
"@lwc/errors": "8.16.4",
"@lwc/shared": "8.16.4",
"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": "8.16.3",
"version": "8.16.4",
"description": "LWC compiler",
"keywords": [
"lwc"
Expand Down Expand Up @@ -52,11 +52,11 @@
"@babel/plugin-transform-class-properties": "7.25.9",
"@babel/plugin-transform-object-rest-spread": "7.25.9",
"@locker/babel-plugin-transform-unforgeables": "0.22.0",
"@lwc/babel-plugin-component": "8.16.3",
"@lwc/errors": "8.16.3",
"@lwc/shared": "8.16.3",
"@lwc/ssr-compiler": "8.16.3",
"@lwc/style-compiler": "8.16.3",
"@lwc/template-compiler": "8.16.3"
"@lwc/babel-plugin-component": "8.16.4",
"@lwc/errors": "8.16.4",
"@lwc/shared": "8.16.4",
"@lwc/ssr-compiler": "8.16.4",
"@lwc/style-compiler": "8.16.4",
"@lwc/template-compiler": "8.16.4"
}
}
8 changes: 4 additions & 4 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": "8.16.3",
"version": "8.16.4",
"description": "Core LWC engine APIs.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,9 +46,9 @@
}
},
"dependencies": {
"@lwc/features": "8.16.3",
"@lwc/shared": "8.16.3",
"@lwc/signals": "8.16.3"
"@lwc/features": "8.16.4",
"@lwc/shared": "8.16.4",
"@lwc/signals": "8.16.4"
},
"devDependencies": {
"observable-membrane": "2.0.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/@lwc/engine-dom/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-dom",
"version": "8.16.3",
"version": "8.16.4",
"description": "Renders LWC components in a DOM environment.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,9 +46,9 @@
}
},
"devDependencies": {
"@lwc/engine-core": "8.16.3",
"@lwc/shared": "8.16.3",
"@lwc/features": "8.16.3"
"@lwc/engine-core": "8.16.4",
"@lwc/shared": "8.16.4",
"@lwc/features": "8.16.4"
},
"lwc": {
"modules": [
Expand Down
10 changes: 5 additions & 5 deletions packages/@lwc/engine-server/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-server",
"version": "8.16.3",
"version": "8.16.4",
"description": "Renders LWC components in a server environment.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,10 +46,10 @@
}
},
"devDependencies": {
"@lwc/engine-core": "8.16.3",
"@lwc/rollup-plugin": "8.16.3",
"@lwc/shared": "8.16.3",
"@lwc/features": "8.16.3",
"@lwc/engine-core": "8.16.4",
"@lwc/rollup-plugin": "8.16.4",
"@lwc/shared": "8.16.4",
"@lwc/features": "8.16.4",
"@rollup/plugin-virtual": "^3.0.2",
"parse5": "^7.2.1"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
W-17972327
// W-17972327

This test fails in CI and has been doing so intermittently in recent PRs. Unfortunately, it has been difficult to reproduce and resolve when running locally. Since the failure is unrelated to this PR, we're disabling the test and have filed a work item (reference above) to investigate separately.
// This test fails in CI and has been doing so intermittently in recent PRs. Unfortunately, it has been difficult to reproduce and resolve when running locally. Since the failure is unrelated to this PR, we're disabling the test and have filed a work item (reference above) to investigate separately.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"entry": "x/wire"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<fixture-test>
<template shadowrootmode="open">
Wire adapter invoked: true
</template>
</fixture-test>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export let isAdapterInvoked = false;

class Adapter {
constructor(dataCallback) {
this.dc = dataCallback;
}

connect() {}

update() {
isAdapterInvoked = true;
this.dc(true);
}

disconnect() {}
}

const arrowFnWithAdapter = () => {};
arrowFnWithAdapter.adapter = Adapter;

export { arrowFnWithAdapter };
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
Wire adapter invoked: {isAdapterInvoked}
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { LightningElement, wire } from 'lwc';

import { arrowFnWithAdapter, isAdapterInvoked } from './adapter';

export default class Wire extends LightningElement {
@wire(arrowFnWithAdapter)
wiredProp;

get isAdapterInvoked() {
return isAdapterInvoked;
}
}
2 changes: 1 addition & 1 deletion packages/@lwc/errors/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/errors",
"version": "8.16.3",
"version": "8.16.4",
"description": "LWC Error Utilities",
"keywords": [
"lwc"
Expand Down
4 changes: 2 additions & 2 deletions packages/@lwc/features/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/features",
"version": "8.16.3",
"version": "8.16.4",
"description": "LWC Features Flags",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,6 +46,6 @@
}
},
"dependencies": {
"@lwc/shared": "8.16.3"
"@lwc/shared": "8.16.4"
}
}
41 changes: 2 additions & 39 deletions packages/@lwc/integration-karma/helpers/test-hydrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,15 @@ window.HydrateTest = (function (lwc, testUtils) {
sanitizeHtmlContent: (content) => content,
});

// As of this writing, Firefox does not support programmatic access to parsing DSD,
// i.e. `Document.parseHTMLUnsafe`
// See: https://developer.mozilla.org/en-US/docs/Web/API/Document/parseHTMLUnsafe_static
function testSupportsProgrammaticDSD() {
const html = '<div><template shadowrootmode="open"></template></div>';
try {
return !!Document.parseHTMLUnsafe(html).body.firstChild.shadowRoot;
} catch (_err) {
return false;
}
}

const browserSupportsProgrammaticDSD = testSupportsProgrammaticDSD();

function parseStringToDom(html) {
if (browserSupportsProgrammaticDSD) {
return Document.parseHTMLUnsafe(html).body.firstChild;
} else {
return new DOMParser().parseFromString(html, 'text/html').body.firstChild;
}
}

function polyfillDeclarativeShadowDom(root) {
root.querySelectorAll('template[shadowrootmode]').forEach((template) => {
const mode = template.getAttribute('shadowrootmode');
const shadowRoot = template.parentNode.attachShadow({ mode });
shadowRoot.appendChild(template.content);
template.remove();

polyfillDeclarativeShadowDom(shadowRoot);
});
return Document.parseHTMLUnsafe(html).body.firstChild;
}

function appendTestTarget(ssrText) {
const div = document.createElement('div');

const testTarget = parseStringToDom(ssrText);
if (!browserSupportsProgrammaticDSD) {
polyfillDeclarativeShadowDom(testTarget);
}
div.appendChild(testTarget);

document.body.appendChild(div);

return div;
}

Expand Down Expand Up @@ -91,7 +56,5 @@ window.HydrateTest = (function (lwc, testUtils) {
return testResult;
}

return {
runTest,
};
return { runTest };
})(window.LWC, window.TestUtils);
12 changes: 6 additions & 6 deletions packages/@lwc/integration-karma/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@lwc/integration-karma",
"private": true,
"version": "8.16.3",
"version": "8.16.4",
"scripts": {
"start": "KARMA_MODE=watch karma start ./scripts/karma-configs/test/local.js",
"test": "karma start ./scripts/karma-configs/test/local.js --single-run --browsers ChromeHeadless",
Expand All @@ -21,11 +21,11 @@
"karma-sauce-launcher-fix-firefox": "using a fork to work around https://github.com/karma-runner/karma-sauce-launcher/issues/275"
},
"devDependencies": {
"@lwc/compiler": "8.16.3",
"@lwc/engine-dom": "8.16.3",
"@lwc/engine-server": "8.16.3",
"@lwc/rollup-plugin": "8.16.3",
"@lwc/synthetic-shadow": "8.16.3",
"@lwc/compiler": "8.16.4",
"@lwc/engine-dom": "8.16.4",
"@lwc/engine-server": "8.16.4",
"@lwc/rollup-plugin": "8.16.4",
"@lwc/synthetic-shadow": "8.16.4",
"@types/jasmine": "^5.1.7",
"chokidar": "^4.0.3",
"istanbul-lib-coverage": "^3.2.2",
Expand Down
Loading