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: 2 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jobs:
run: yarn test:types
- name: Run unit tests
run: yarn test:ci
- name: Run unit tests in production mode
run: yarn test:production --no-watch
- name: Upload unit test coverage report
uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lwc-monorepo",
"version": "8.16.0",
"version": "8.16.1",
"private": true,
"description": "Lightning Web Components",
"repository": {
Expand All @@ -19,6 +19,7 @@
"copy-fork": "./scripts/tasks/unsafe-external-contributor-ci-workaround.sh",
"dev": "nx run-many --target=dev --all --parallel=999 --exclude=@lwc/perf-benchmarks,@lwc/perf-benchmarks-components,@lwc/integration-tests",
"test": "vitest --workspace vitest.workspace.mjs",
"test:production": "VITE_NODE_ENV=production vitest --workspace vitest.workspace.mjs",
"test:bespoke": "nx run-many --target=test",
"test:debug": "vitest --workspace vitest.workspace.mjs --inspect-brk --no-file-parallelism",
"test:ci": "vitest run --workspace vitest.workspace.mjs --coverage",
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.0",
"version": "8.16.1",
"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.0",
"version": "8.16.1",
"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.0",
"@lwc/shared": "8.16.0",
"@lwc/errors": "8.16.1",
"@lwc/shared": "8.16.1",
"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.0",
"version": "8.16.1",
"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.0",
"@lwc/errors": "8.16.0",
"@lwc/shared": "8.16.0",
"@lwc/ssr-compiler": "8.16.0",
"@lwc/style-compiler": "8.16.0",
"@lwc/template-compiler": "8.16.0"
"@lwc/babel-plugin-component": "8.16.1",
"@lwc/errors": "8.16.1",
"@lwc/shared": "8.16.1",
"@lwc/ssr-compiler": "8.16.1",
"@lwc/style-compiler": "8.16.1",
"@lwc/template-compiler": "8.16.1"
}
}
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.0",
"version": "8.16.1",
"description": "Core LWC engine APIs.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,9 +46,9 @@
}
},
"dependencies": {
"@lwc/features": "8.16.0",
"@lwc/shared": "8.16.0",
"@lwc/signals": "8.16.0"
"@lwc/features": "8.16.1",
"@lwc/shared": "8.16.1",
"@lwc/signals": "8.16.1"
},
"devDependencies": {
"observable-membrane": "2.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ export function checkVersionMismatch(
) {
const versionMatcher = func.toString().match(LWC_VERSION_COMMENT_REGEX);
if (!isNull(versionMatcher) && !warned) {
if (typeof process === 'object' && process.env.SKIP_LWC_VERSION_MISMATCH_CHECK === 'true') {
if (
typeof process === 'object' &&
typeof process?.env === 'object' &&
process.env &&
process.env.SKIP_LWC_VERSION_MISMATCH_CHECK === 'true'
) {
warned = true; // skip printing out version mismatch errors when env var is set
return;
}
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.0",
"version": "8.16.1",
"description": "Renders LWC components in a DOM environment.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,9 +46,9 @@
}
},
"devDependencies": {
"@lwc/engine-core": "8.16.0",
"@lwc/shared": "8.16.0",
"@lwc/features": "8.16.0"
"@lwc/engine-core": "8.16.1",
"@lwc/shared": "8.16.1",
"@lwc/features": "8.16.1"
},
"lwc": {
"modules": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { LOWEST_API_VERSION } from '@lwc/shared';

// it needs to be imported from the window, otherwise the checks for associated vms is done against "@lwc/engine-core"
const LightningElementFormatter = (globalThis as any)['devtoolsFormatters'].find((f: any) => {
const LightningElementFormatter = (globalThis as any)['devtoolsFormatters']?.find((f: any) => {
return f.name === 'LightningElementFormatter';
});

Expand All @@ -33,8 +33,9 @@ class WireAdapter {
disconnect() {}
}

describe('Lightning Element formatter', () => {
const { header } = LightningElementFormatter;
// LightningElementFormatter is not exposed in prod mode
describe.skipIf(process.env.NODE_ENV === 'production')('Lightning Element formatter', () => {
const header = LightningElementFormatter?.header;

it('should not contain body', () => {
expect(LightningElementFormatter.hasBody()).toBe(false);
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.0",
"version": "8.16.1",
"description": "Renders LWC components in a server environment.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,10 +46,10 @@
}
},
"devDependencies": {
"@lwc/engine-core": "8.16.0",
"@lwc/rollup-plugin": "8.16.0",
"@lwc/shared": "8.16.0",
"@lwc/features": "8.16.0",
"@lwc/engine-core": "8.16.1",
"@lwc/rollup-plugin": "8.16.1",
"@lwc/shared": "8.16.1",
"@lwc/features": "8.16.1",
"@rollup/plugin-virtual": "^3.0.2",
"parse5": "^7.2.1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { testFixtureDir, formatHTML, pluginVirtual } from '@lwc/test-utils-lwc-i
import { setFeatureFlagForTest } from '../index';
import type { LightningElementConstructor } from '@lwc/engine-core/dist/framework/base-lightning-element';
import type { RollupLwcOptions } from '@lwc/rollup-plugin';
import type { FeatureFlagName } from '@lwc/features/dist/types';

vi.mock('lwc', async () => {
const lwcEngineServer = await import('../index');
Expand All @@ -33,6 +34,9 @@ interface FixtureConfig {

/** Props to provide to the root component. */
props?: Record<string, string>;

/** Feature flags to enable for the test. */
features: FeatureFlagName[];
}

async function compileFixture({
Expand Down Expand Up @@ -162,7 +166,8 @@ function testFixtures(options?: RollupLwcOptions) {
);
}

describe.concurrent('fixtures', () => {
// TODO [#5134]: Enable these tests in production mode
describe.skipIf(process.env.NODE_ENV === 'production').concurrent('fixtures', () => {
beforeAll(() => {
// ENABLE_WIRE_SYNC_EMIT is used because this mimics the behavior for LWR in SSR mode. It's also more reasonable
// for how both `engine-server` and `ssr-runtime` behave, which is to use sync rendering.
Expand Down
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.0",
"version": "8.16.1",
"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.0",
"version": "8.16.1",
"description": "LWC Features Flags",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,6 +46,6 @@
}
},
"dependencies": {
"@lwc/shared": "8.16.0"
"@lwc/shared": "8.16.1"
}
}
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.0",
"version": "8.16.1",
"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.0",
"@lwc/engine-dom": "8.16.0",
"@lwc/engine-server": "8.16.0",
"@lwc/rollup-plugin": "8.16.0",
"@lwc/synthetic-shadow": "8.16.0",
"@lwc/compiler": "8.16.1",
"@lwc/engine-dom": "8.16.1",
"@lwc/engine-server": "8.16.1",
"@lwc/rollup-plugin": "8.16.1",
"@lwc/synthetic-shadow": "8.16.1",
"@types/jasmine": "^5.1.6",
"chokidar": "^4.0.3",
"istanbul-lib-coverage": "^3.2.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/@lwc/integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@lwc/integration-tests",
"private": true,
"version": "8.16.0",
"version": "8.16.1",
"scripts": {
"build": "node scripts/build.js",
"build:dev": "MODE=dev yarn build",
Expand All @@ -18,7 +18,7 @@
"sauce:prod:ci": "MODE=prod yarn build:prod && MODE=prod ../../../scripts/ci/retry.sh wdio ./scripts/wdio.sauce.conf.js"
},
"devDependencies": {
"@lwc/rollup-plugin": "8.16.0",
"@lwc/rollup-plugin": "8.16.1",
"@wdio/cli": "^9.9.1",
"@wdio/local-runner": "^9.9.1",
"@wdio/mocha-framework": "^9.9.0",
Expand All @@ -27,7 +27,7 @@
"@wdio/static-server-service": "^9.9.0",
"deepmerge": "^4.3.1",
"dotenv": "^16.4.7",
"lwc": "8.16.0",
"lwc": "8.16.1",
"minimist": "^1.2.8",
"webdriverio": "^9.0.7"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/@lwc/integration-types/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@lwc/integration-types",
"private": true,
"version": "8.16.0",
"version": "8.16.1",
"description": "Type validation for LWC packages",
"type": "module",
"scripts": {
"test": "node ./scripts/update-paths.js --check && tsc",
"playground": "rollup -c src/playground/rollup.config.js --watch"
},
"dependencies": {
"@lwc/rollup-plugin": "8.16.0",
"lwc": "8.16.0"
"@lwc/rollup-plugin": "8.16.1",
"lwc": "8.16.1"
},
"devDependencies": {
"@rollup/plugin-replace": "^6.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/@lwc/module-resolver/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/module-resolver",
"version": "8.16.0",
"version": "8.16.1",
"description": "Resolves paths for LWC components",
"keywords": [
"lwc"
Expand Down
4 changes: 2 additions & 2 deletions packages/@lwc/perf-benchmarks-components/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@lwc/perf-benchmarks-components",
"version": "8.16.0",
"version": "8.16.1",
"private": true,
"scripts": {
"build": "rm -fr dist && rollup -c ./rollup.config.mjs"
},
"devDependencies": {
"@lwc/rollup-plugin": "8.16.0"
"@lwc/rollup-plugin": "8.16.1"
},
"nx": {
"targets": {
Expand Down
12 changes: 6 additions & 6 deletions packages/@lwc/perf-benchmarks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lwc/perf-benchmarks",
"version": "8.16.0",
"version": "8.16.1",
"private": true,
"scripts": {
"build": "rm -fr dist && rollup -c ./rollup.config.mjs && node scripts/build.js && ./scripts/fix-deps.sh",
Expand All @@ -15,11 +15,11 @@
"Don't forget to add these to fix-deps.sh as well."
],
"dependencies": {
"@lwc/engine-dom": "8.16.0",
"@lwc/engine-server": "8.16.0",
"@lwc/perf-benchmarks-components": "8.16.0",
"@lwc/ssr-runtime": "8.16.0",
"@lwc/synthetic-shadow": "8.16.0"
"@lwc/engine-dom": "8.16.1",
"@lwc/engine-server": "8.16.1",
"@lwc/perf-benchmarks-components": "8.16.1",
"@lwc/ssr-runtime": "8.16.1",
"@lwc/synthetic-shadow": "8.16.1"
},
"devDependencies": {
"@best/cli": "^14.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/@lwc/rollup-plugin/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/rollup-plugin",
"version": "8.16.0",
"version": "8.16.1",
"description": "Rollup plugin to compile LWC",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,13 +46,13 @@
}
},
"dependencies": {
"@lwc/compiler": "8.16.0",
"@lwc/module-resolver": "8.16.0",
"@lwc/shared": "8.16.0",
"@lwc/compiler": "8.16.1",
"@lwc/module-resolver": "8.16.1",
"@lwc/shared": "8.16.1",
"@rollup/pluginutils": "~5.1.4"
},
"devDependencies": {
"@lwc/errors": "8.16.0"
"@lwc/errors": "8.16.1"
},
"peerDependencies": {
"rollup": "^1.2.0||^2.0.0||^3.0.0||^4.0.0"
Expand Down
4 changes: 3 additions & 1 deletion packages/@lwc/rollup-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,6 @@ export default function lwc(pluginOptions: RollupLwcOptions = {}): Plugin {
}

// For backward compatibility with commonjs format
module.exports = lwc;
if (typeof module !== 'undefined') {
module.exports = lwc;
}
Loading
Loading