Skip to content

Fixes#8564

Merged
wmertens merged 2 commits into
build/v2from
fixes
Apr 17, 2026
Merged

Fixes#8564
wmertens merged 2 commits into
build/v2from
fixes

Conversation

@wmertens
Copy link
Copy Markdown
Member

No description provided.

@wmertens wmertens requested a review from a team as a code owner April 17, 2026 12:40
Copilot AI review requested due to automatic review settings April 17, 2026 12:40
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 17, 2026

⚠️ No Changeset found

Latest commit: f8e23a4

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 makes small fixes to improve developer experience around Qwik error links and to adjust how the SSG snapshot e2e test reads/updates its expected outputs.

Changes:

  • Update the Qwik error documentation anchor URL to use a lowercase #q fragment.
  • Refactor the SSG snapshot e2e test to load expected snapshot content earlier and allow updating in-place.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/qwik/src/core/shared/error/error.ts Adjusts the base URL fragment used when linking error codes to the docs page.
e2e/qwik-e2e/tests/qwikrouter/ssg-snapshot.e2e.ts Changes snapshot read/update flow and variable mutability during UPDATE mode.

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

Comment on lines +38 to +48
let expectedHtml = (await readFile(expectedHtmlPath, 'utf-8')).replace(/\r\n/g, '\n');
let expectedState = (await readFile(expectedStatePath, 'utf-8')).replace(/\r\n/g, '\n');

warnIfSizeChanged('readable state dump', expectedState, normalizedState);
warnIfSizeChanged('HTML', expectedHtml, normalizedHtml);

if (process.env.UPDATE_SSG_SNAPSHOT === '1') {
await writeFile(expectedHtmlPath, normalizedHtml, 'utf-8');
await writeFile(expectedStatePath, normalizedState, 'utf-8');
expectedHtml = normalizedHtml;
expectedState = normalizedState;
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

When UPDATE_SSG_SNAPSHOT=1, the test now reads the existing snapshot files and calls warnIfSizeChanged before writing the updated snapshots. This makes snapshot-update runs noisy (warnings even though changes are intentional) and also regresses the ability to bootstrap/update snapshots when the expected files don't exist yet (readFile will throw before writeFile can create them). Consider handling UPDATE_SSG_SNAPSHOT first (write + set expected to normalized) and only reading/warning when not updating (or only warning if the expected files were successfully read).

Suggested change
let expectedHtml = (await readFile(expectedHtmlPath, 'utf-8')).replace(/\r\n/g, '\n');
let expectedState = (await readFile(expectedStatePath, 'utf-8')).replace(/\r\n/g, '\n');
warnIfSizeChanged('readable state dump', expectedState, normalizedState);
warnIfSizeChanged('HTML', expectedHtml, normalizedHtml);
if (process.env.UPDATE_SSG_SNAPSHOT === '1') {
await writeFile(expectedHtmlPath, normalizedHtml, 'utf-8');
await writeFile(expectedStatePath, normalizedState, 'utf-8');
expectedHtml = normalizedHtml;
expectedState = normalizedState;
let expectedHtml: string;
let expectedState: string;
if (process.env.UPDATE_SSG_SNAPSHOT === '1') {
await writeFile(expectedHtmlPath, normalizedHtml, 'utf-8');
await writeFile(expectedStatePath, normalizedState, 'utf-8');
expectedHtml = normalizedHtml;
expectedState = normalizedState;
} else {
expectedHtml = (await readFile(expectedHtmlPath, 'utf-8')).replace(/\r\n/g, '\n');
expectedState = (await readFile(expectedStatePath, 'utf-8')).replace(/\r\n/g, '\n');
warnIfSizeChanged('readable state dump', expectedState, normalizedState);
warnIfSizeChanged('HTML', expectedHtml, normalizedHtml);

Copilot uses AI. Check for mistakes.
@wmertens wmertens disabled auto-merge April 17, 2026 12:52
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 17, 2026

Open in StackBlitz

@qwik.dev/core

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@8564

@qwik.dev/router

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@8564

eslint-plugin-qwik

npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@8564

create-qwik

npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@8564

@qwik.dev/optimizer

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/optimizer@8564

commit: dfbec11

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

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

@wmertens wmertens merged commit 8b86d9b into build/v2 Apr 17, 2026
26 checks passed
@wmertens wmertens deleted the fixes branch April 17, 2026 13:13
@github-project-automation github-project-automation Bot moved this from Waiting For Review to Done in Qwik Development Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants