Skip to content

Commit c337695

Browse files
Merge branch 'master' into synthetic-element-internals
2 parents 318abed + 9223fc6 commit c337695

File tree

214 files changed

+3689
-3837
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+3689
-3837
lines changed

.github/workflows/web-test-runner.yml

Lines changed: 96 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,18 @@ env:
1818
NODE_VERSION: '20.19.4'
1919

2020
jobs:
21-
# Starting with the basics, just get tests running in CI
22-
# TODO: add env var combos we use for Karma tests
2321
# TODO: upload result artifacts
2422
# TODO: make it saucy 🥫
25-
wtr-group-1:
23+
integration-tests:
24+
name: Integration tests (${{ matrix.shadow_mode }} shadow)
25+
strategy:
26+
matrix:
27+
shadow_mode: [native, synthetic]
28+
2629
runs-on: ubuntu-22.04
2730
env:
2831
SAUCE_TUNNEL_ID: github-action-tunnel-wtr-${{github.run_id}}-group-1
32+
SHADOW_MODE_OVERRIDE: ${{ matrix.shadow_mode }}
2933
defaults:
3034
run:
3135
working-directory: ./packages/@lwc/integration-not-karma
@@ -51,4 +55,93 @@ jobs:
5155
# region: us
5256

5357
- run: yarn test
58+
- run: API_VERSION=58 yarn test
59+
- run: API_VERSION=59 yarn test
60+
- run: API_VERSION=60 yarn test
61+
- run: API_VERSION=61 yarn test
62+
- run: API_VERSION=62 yarn test
63+
- run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 yarn test || true
64+
- run: DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn test
65+
- run: ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL=1 yarn test
66+
- run: NODE_ENV_FOR_TEST=production yarn test
67+
68+
integration-tests-not-both-modes:
69+
# Tests that should run in only synthetic or native shadow, not both
70+
name: Integration tests (singleton batch)
71+
runs-on: ubuntu-22.04
72+
env:
73+
SAUCE_TUNNEL_ID: github-action-tunnel-wtr-${{github.run_id}}-group-1
74+
SHADOW_MODE_OVERRIDE: ${{ matrix.shadow_mode }}
75+
defaults:
76+
run:
77+
working-directory: ./packages/@lwc/integration-not-karma
78+
steps:
79+
- name: Checkout repository
80+
uses: actions/checkout@v4
81+
82+
- name: Setup Node
83+
uses: actions/setup-node@v4
84+
with:
85+
node-version: ${{ env.NODE_VERSION }}
86+
cache: 'yarn'
87+
88+
- name: Install dependencies
89+
run: yarn install --frozen-lockfile
90+
working-directory: ./
91+
92+
# - uses: saucelabs/sauce-connect-action@v3.0.0
93+
# with:
94+
# username: ${{ secrets.SAUCE_USERNAME }}
95+
# accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
96+
# tunnelName: ${{ env.SAUCE_TUNNEL_ID }}
97+
# region: us
98+
99+
# Synthetic shadow only
100+
- run: LEGACY_BROWSERS=1 yarn test || true
101+
- run: FORCE_NATIVE_SHADOW_MODE_FOR_TEST=1 yarn test
102+
- run: DISABLE_DETACHED_REHYDRATION=1 yarn test
103+
- run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 DISABLE_DETACHED_REHYDRATION=1 yarn test || true
104+
105+
# Native shadow only -- don't forget SHADOW_MODE_OVERRIDE!
106+
- run: SHADOW_MODE_OVERRIDE=native DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER=1 yarn test
107+
- run: SHADOW_MODE_OVERRIDE=native DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER=1 DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn test
108+
109+
hydration-tests:
110+
runs-on: ubuntu-22.04
111+
env:
112+
SAUCE_TUNNEL_ID: github-action-tunnel-wtr-${{github.run_id}}-group-1
113+
defaults:
114+
run:
115+
working-directory: ./packages/@lwc/integration-not-karma
116+
steps:
117+
- name: Checkout repository
118+
uses: actions/checkout@v4
119+
120+
- name: Setup Node
121+
uses: actions/setup-node@v4
122+
with:
123+
node-version: ${{ env.NODE_VERSION }}
124+
cache: 'yarn'
125+
126+
- name: Install dependencies
127+
run: yarn install --frozen-lockfile
128+
working-directory: ./
129+
130+
# - uses: saucelabs/sauce-connect-action@v3.0.0
131+
# with:
132+
# username: ${{ secrets.SAUCE_USERNAME }}
133+
# accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
134+
# tunnelName: ${{ env.SAUCE_TUNNEL_ID }}
135+
# region: us
136+
- run: ENGINE_SERVER=1 yarn test:hydration
137+
- run: ENGINE_SERVER=1 SHADOW_MODE_OVERRIDE=synthetic yarn test:hydration
138+
- run: ENGINE_SERVER=1 NODE_ENV_FOR_TEST=production yarn test:hydration
139+
- run: ENGINE_SERVER=1 DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 yarn test:hydration
140+
- run: ENGINE_SERVER=1 DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn test:hydration
141+
- run: ENGINE_SERVER=1 DISABLE_DETACHED_REHYDRATION=1 yarn test:hydration
142+
- run: ENGINE_SERVER=1 DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 DISABLE_DETACHED_REHYDRATION=1 yarn test:hydration
54143
- run: yarn test:hydration
144+
- run: SHADOW_MODE_OVERRIDE=synthetic yarn test:hydration
145+
- run: NODE_ENV_FOR_TEST=production yarn test:hydration
146+
- run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 yarn test:hydration
147+
- run: DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn test:hydration

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"release:publish:canary": "nx release publish --registry https://registry.npmjs.org --tag canary"
3838
},
3939
"devDependencies": {
40-
"@commitlint/cli": "^19.8.1",
40+
"@commitlint/cli": "^20.0.0",
4141
"@eslint/js": "9.36.0",
4242
"@lwc/eslint-plugin-lwc-internal": "link:./scripts/eslint-plugin",
4343
"@lwc/test-utils-lwc-internals": "link:./scripts/test-utils",
@@ -53,7 +53,7 @@
5353
"@types/babel__core": "^7.20.5",
5454
"@types/node": "^22.18.4",
5555
"@vitest/coverage-v8": "^3.2.4",
56-
"@vitest/eslint-plugin": "^1.3.12",
56+
"@vitest/eslint-plugin": "^1.3.13",
5757
"@vitest/ui": "^3.2.4",
5858
"bytes": "^3.1.2",
5959
"es-module-lexer": "^1.7.0",
@@ -66,15 +66,15 @@
6666
"husky": "^9.1.7",
6767
"isbinaryfile": "^5.0.6",
6868
"jsdom": "^26.1.0",
69-
"lint-staged": "^16.2.0",
69+
"lint-staged": "^16.2.3",
7070
"magic-string": "^0.30.19",
7171
"nx": "21.5.3",
7272
"prettier": "^3.6.2",
73-
"rollup": "^4.52.0",
73+
"rollup": "^4.52.3",
7474
"terser": "^5.44.0",
7575
"tslib": "^2.8.1",
7676
"typescript": "5.8.2",
77-
"typescript-eslint": "8.44.0",
77+
"typescript-eslint": "8.44.1",
7878
"vitest": "^3.2.4"
7979
},
8080
"lint-staged": {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"entry": "x/attribute-dynamic-complex",
3+
"experimentalComplexExpressions": true,
4+
"ssrFiles": {
5+
"expected": "expected-ssr.html",
6+
"error": "error-ssr.txt"
7+
}
8+
}

packages/@lwc/engine-server/src/__tests__/fixtures/attribute-dynamic-complex/error-ssr.txt

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
LWC1034: Ambiguous attribute value class="{bar() + foo()}". If you want to make it a valid identifier you should remove the surrounding quotes class={bar() + foo()}. If you want to make it a string you should escape it class="\{bar() + foo()}".
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<fixture-test>
2+
<template shadowrootmode="open">
3+
<div class="foobar">
4+
</div>
5+
</template>
6+
</fixture-test>

packages/@lwc/engine-server/src/__tests__/fixtures/attribute-dynamic-complex/expected.html

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<div class="{bar() + foo()}"></div>
3+
</template>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { LightningElement } from 'lwc';
2+
3+
export default class AttributeDynamicComplex extends LightningElement {
4+
bar() {
5+
return 'foo';
6+
}
7+
foo() {
8+
return 'bar';
9+
}
10+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"entry": "x/for-each-block",
3+
"experimentalComplexExpressions": true,
4+
"ssrFiles": {
5+
"expected": "expected-ssr.html",
6+
"error": "error-ssr.txt"
7+
}
8+
}

0 commit comments

Comments
 (0)