Skip to content

fix(ci): change docs size test with e2e#8545

Open
wmertens wants to merge 3 commits intobuild/v2from
fix-docs-size
Open

fix(ci): change docs size test with e2e#8545
wmertens wants to merge 3 commits intobuild/v2from
fix-docs-size

Conversation

@wmertens
Copy link
Copy Markdown
Member

No description provided.

@wmertens wmertens enabled auto-merge April 10, 2026 12:43
Copilot AI review requested due to automatic review settings April 10, 2026 12:43
@wmertens wmertens requested a review from a team as a code owner April 10, 2026 12:43
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

⚠️ No Changeset found

Latest commit: fdab4b5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the prior docs-size benchmark check (and its stored baselines) with a deterministic router SSG snapshot E2E test, and updates CI/scripts accordingly.

Changes:

  • Removed the docs-size validation script + JSON baseline, and dropped the CI step that ran it.
  • Added a Playwright E2E test that Vite-builds a dedicated router SSG fixture and compares normalized HTML + state dump against checked-in snapshots (with an update mode).
  • Updated root package.json scripts to add dedicated commands for running/updating the new router SSG snapshot test.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/validate-docs-size.ts Deleted the standalone docs-size benchmark/diagnostic script.
scripts/docs-size-results.json Deleted the stored docs-size baseline results.
.github/workflows/ci.yml Removed the “Docs Size Benchmarks” CI step.
package.json Removed docs-size benchmark scripts; added router SSG snapshot e2e run/update scripts.
e2e/qwik-e2e/tests/qwikrouter/ssg-snapshot.e2e.ts New Playwright test that builds an SSG fixture and asserts normalized HTML/state snapshots.
e2e/qwik-e2e/apps/qwikrouter-ssg-snapshot/src/routes/index.tsx New fixture route designed to produce stable, inspectable serialized state.
e2e/qwik-e2e/apps/qwikrouter-ssg-snapshot/src/root.tsx New fixture root wiring RouterOutlet + canonical URL.
e2e/qwik-e2e/apps/qwikrouter-ssg-snapshot/src/entry.ssr.tsx New SSR entry using createRenderer for the fixture.
e2e/qwik-e2e/apps/qwikrouter-ssg-snapshot/package.json Declares the new fixture app as private ESM module.
e2e/qwik-e2e/apps/qwikrouter-ssg-snapshot/expected.ssg.html Checked-in expected normalized SSG HTML snapshot.
e2e/qwik-e2e/apps/qwikrouter-ssg-snapshot/expected.state.txt Checked-in expected normalized serialized-state dump snapshot.
scripts/submodule-core.ts Removed importMetaFix prepend logic from core build outputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 312 to 316
});
code = result.code!;

await writeFile(outPath, importMetaFix + code + '\n');
await writeFile(outPath, code + '\n');

Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

importMetaFix was removed, so the generated core.mjs/core.prod.mjs no longer ensures import.meta.env exists at runtime. The core source still performs direct reads like import.meta.env.DEV/import.meta.env.TEST (no optional chaining), which will throw in Node/other non-Vite runtimes where import.meta.env is undefined. Please restore a runtime-safe initialization (or replace these reads during bundling) so the distributed core modules can be imported outside Vite without crashing.

Copilot uses AI. Check for mistakes.
Comment on lines 342 to 343
await Promise.all([esm]);

Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In submoduleCoreDev, const esm = await build(...) already awaits the build; await Promise.all([esm]) is redundant (and misleading since esm is the resolved build result, not a promise). Consider reverting to a single await build(...) for clarity.

Suggested change
await Promise.all([esm]);

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview fdab4b5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting For Review

Development

Successfully merging this pull request may close these issues.

3 participants