Skip to content

test: assert new minified error message on react canary#1199

Merged
hi-ogawa merged 5 commits intomainfrom
chore-debug-canary
Apr 23, 2026
Merged

test: assert new minified error message on react canary#1199
hi-ogawa merged 5 commits intomainfrom
chore-debug-canary

Conversation

@hi-ogawa
Copy link
Copy Markdown
Contributor

@hi-ogawa hi-ogawa commented Apr 23, 2026

Description

There's minor change in a production error message facebook/react#36277. This PR updates assertions to match the new form.

@hi-ogawa hi-ogawa changed the title test: update test for react canary test: assert minified error message for react canary Apr 23, 2026
@hi-ogawa hi-ogawa marked this pull request as ready for review April 23, 2026 05:08
@hi-ogawa hi-ogawa changed the title test: assert minified error message for react canary test: assert new minified error message on react canary Apr 23, 2026
@hi-ogawa hi-ogawa requested a review from Copilot April 23, 2026 05:08
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

Updates the plugin-rsc e2e suite and CI React override logic to accommodate React canary/experimental’s newly minified production error message format.

Changes:

  • Update e2e assertion to accept the new minified React canary/experimental production error text.
  • Unskip react-router e2e suites previously gated by React canary/experimental.
  • Replace inline sed YAML edits in CI with a reusable yq-based script for overriding React packages.

Reviewed changes

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

File Description
scripts/override-react.sh Adds a helper script to update pnpm-workspace.yaml overrides for React packages via yq.
packages/plugin-rsc/e2e/react-router.test.ts Removes canary/experimental skip gates so these suites run under canary/experimental.
packages/plugin-rsc/e2e/basic.test.ts Adds a canary/experimental-specific assertion for the minified production error message.
.github/workflows/ci-rsc.yml Switches CI React override logic from sed to the new helper script.

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

Comment thread scripts/override-react.sh
Comment on lines +10 to +13
echo "yq is required to update pnpm-workspace.yaml" >&2
exit 1
fi

Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

The script only checks that yq exists, but the expression syntax used here relies on mikefarah/yq v4. If a developer has a different yq implementation (e.g. the Python wrapper), this will fail with a confusing parse error. Consider validating yq --version is v4 (and improving the error message with install/version guidance).

Suggested change
echo "yq is required to update pnpm-workspace.yaml" >&2
exit 1
fi
echo "yq is required to update pnpm-workspace.yaml." >&2
echo "Please install mikefarah/yq v4: https://github.com/mikefarah/yq/" >&2
exit 1
fi
yq_version=$(yq --version 2>&1 || true)
if [[ ! $yq_version =~ version[[:space:]]+v?4\. ]]; then
echo "This script requires mikefarah/yq v4 to update pnpm-workspace.yaml." >&2
echo "Detected: $yq_version" >&2
echo "Please install mikefarah/yq v4 and verify with: yq --version" >&2
exit 1
fi

Copilot uses AI. Check for mistakes.
Comment on lines 68 to 72
- name: install react
if: ${{ matrix.react_version }}
run: |
sed -i "/^overrides:/a\ react: \"$REACT_VERSION\"" pnpm-workspace.yaml
sed -i "/^overrides:/a\ react-dom: \"$REACT_VERSION\"" pnpm-workspace.yaml
sed -i "/^overrides:/a\ react-server-dom-webpack: \"$REACT_VERSION\"" pnpm-workspace.yaml
./scripts/override-react.sh "$REACT_VERSION"
pnpm i --no-frozen-lockfile
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

This step now depends on ./scripts/override-react.sh, which requires yq, but the workflow never installs/pins yq. Relying on a preinstalled yq on GitHub-hosted runners is brittle (runner images can change) and can break scheduled canary/experimental runs. Consider adding an explicit install/pin step for the expected yq v4 binary on Linux before any yq usage (this also covers the later Vite override step).

Copilot uses AI. Check for mistakes.
@hi-ogawa hi-ogawa merged commit cbac17c into main Apr 23, 2026
25 checks passed
@hi-ogawa hi-ogawa deleted the chore-debug-canary branch April 23, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants