Skip to content

Commit 1dcf4b7

Browse files
committed
chore: update adopted-style-sheets dependency to version 1.1.9-rc.18 across all packages
Refs: #7778
1 parent aa6d899 commit 1dcf4b7

File tree

7 files changed

+52
-41
lines changed

7 files changed

+52
-41
lines changed

packages/components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
},
7777
"dependencies": {
7878
"@floating-ui/dom": "1.6.13",
79-
"adopted-style-sheets": "1.1.9-rc.17",
79+
"adopted-style-sheets": "1.1.9-rc.18",
8080
"clsx": "2.1.1",
8181
"color-convert": "2.0.1",
8282
"color-rgba": "2.4.0",
@@ -136,7 +136,7 @@
136136
"typescript": "5.8.2"
137137
},
138138
"peerDependencies": {
139-
"adopted-style-sheets": "1.1.9-rc.17"
139+
"adopted-style-sheets": "1.1.9-rc.18"
140140
},
141141
"files": [
142142
"assets",

packages/samples/angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@angular/compiler-cli": "17.3.12",
3131
"@types/jasmine": "5.1.8",
3232
"@tailwindcss/postcss": "4.1.8",
33-
"adopted-style-sheets": "1.1.9-rc.17",
33+
"adopted-style-sheets": "1.1.9-rc.18",
3434
"cpy-cli": "5.0.0",
3535
"karma-jasmine": "5.1.0",
3636
"karma-chrome-launcher": "3.2.0",

packages/samples/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@typescript-eslint/parser": "8.27.0",
4141
"@unocss/preset-uno": "0.58.9",
4242
"@unocss/webpack": "0.58.9",
43-
"adopted-style-sheets": "1.1.9-rc.17",
43+
"adopted-style-sheets": "1.1.9-rc.18",
4444
"ajv": "8.17.1",
4545
"chromedriver": "130.0.4",
4646
"cpy-cli": "5.0.0",

packages/tools/benchmark-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@playwright/test": "1.49.1",
3636
"@public-ui/components": "workspace:*",
3737
"@public-ui/theme-default": "workspace:*",
38-
"adopted-style-sheets": "1.1.9-rc.17",
38+
"adopted-style-sheets": "1.1.9-rc.18",
3939
"cpy-cli": "5.0.0",
4040
"knip": "5.46.0",
4141
"npm-run-all2": "8.0.4",

packages/tools/benchmark-tests/scripts/compare-benchmark.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
22

33
const loadJson = (path) => (existsSync(path) ? JSON.parse(readFileSync(path, 'utf-8')) : []);
44

5-
const current = loadJson('benchmark-result.json');
6-
const baseline = loadJson('benchmark-baseline.json');
5+
const current = loadJson(`benchmark-result.json`);
6+
const baseline = loadJson(`benchmark-baseline.json`);
77

88
const rows = [];
99
let hasRegression = false;
@@ -59,10 +59,10 @@ markdown += `|-----------|---------|----------|-----|--------|\n`;
5959
markdown += rest.map((r) => r.markdown).join('\n') + '\n';
6060
markdown += `</details>\n`;
6161

62-
writeFileSync('benchmark-report.md', markdown);
62+
writeFileSync(`benchmark-report.md`, markdown);
6363

6464
if (hasRegression) {
65-
console.error('❌ Performance regression detected.');
65+
console.warn(`❌ Performance regression detected.`);
6666
} else {
67-
console.log('✅ No significant regression.');
67+
console.log(`✅ No significant regression.`);
6868
}

packages/tools/benchmark-tests/tests/benchmark.test.ts

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,28 +65,35 @@ const TEST_TIMEOUT = parseInt(process.env.TEST_TIMEOUT || '5000', 10);
6565

6666
test.beforeEach(async ({ page }) => {
6767
await page.goto('http://localhost:3000/test-page.html');
68+
await page.waitForLoadState('networkidle');
6869
});
6970

7071
for (const tag of TAGS) {
7172
for (let idx = 0; idx < TEST_ITERATIONS; idx++) {
72-
test(`${tag} hydration iteration ${idx + 1}`, async ({ page }) => {
73-
await page.evaluate(() => window.gc?.());
74-
75-
const duration = await page.evaluate(
76-
async ({ tag, timeout, idx }) => {
73+
test(`${tag} hydration (${idx + 1})`, async ({ page }) => {
74+
const { hydratedTime } = await page.evaluate(
75+
async ({ tag, timeout }) => {
76+
window.gc?.();
7777
await customElements.whenDefined(tag);
78-
7978
const el = document.createElement(tag);
80-
el.setAttribute('data-test', `hydration-${idx}`);
81-
const start = performance.now();
8279
document.body.appendChild(el);
80+
const start = performance.now();
81+
let hydratedTime: number | null = null;
82+
let themedTime: number | null = null;
8383

8484
await new Promise<void>((resolve) => {
8585
let cleaned = false;
8686

8787
const timeoutId = setTimeout(cleanup, timeout);
88+
8889
const observer = new MutationObserver(() => {
89-
if (el.classList.contains('hydrated')) cleanup();
90+
if (!hydratedTime && el.classList.contains('hydrated')) {
91+
hydratedTime = performance.now() - start;
92+
}
93+
if (hydratedTime && el.hasAttribute('data-themed')) {
94+
themedTime = performance.now() - hydratedTime;
95+
cleanup();
96+
}
9097
});
9198

9299
function cleanup() {
@@ -100,24 +107,28 @@ for (const tag of TAGS) {
100107

101108
observer.observe(el, {
102109
attributes: true,
103-
attributeFilter: ['class'],
110+
attributeFilter: ['class', 'data-themed'],
104111
});
105112
});
106113

107-
const end = performance.now();
108-
return end - start;
114+
return {
115+
hydratedTime,
116+
themedTime,
117+
};
109118
},
110-
{ tag, timeout: TEST_TIMEOUT, idx },
119+
{ tag, timeout: TEST_TIMEOUT },
111120
);
112121

113-
if (!results.has(tag)) {
114-
results.set(tag, {
115-
name: tag,
116-
values: [],
117-
unit: 'ms',
118-
});
122+
if (hydratedTime !== null) {
123+
if (!results.has(tag)) {
124+
results.set(tag, {
125+
name: tag,
126+
values: [],
127+
unit: 'ms',
128+
});
129+
}
130+
results.get(tag)!.values.push(Math.round(hydratedTime));
119131
}
120-
results.get(tag)!.values.push(Math.round(duration));
121132
});
122133
}
123134
}

pnpm-lock.yaml

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)