Deps 04 08 2026 - #601
Conversation
Bumps Next 16.2.10 -> 16.3.0, TypeScript 6 -> 7, and the usual minor and patch updates across the workspace. TypeScript 7 no longer ships the JavaScript Compiler API that vite-plugin-dts needs to emit declarations, so the library gains @typescript/typescript6 as a devDependency. Next 16.3 runs the project-local tsc for type checking by default, so `next build` now uses TypeScript 7 directly. pnpm added minimumReleaseAgeExclude entries for next@16.3.0 and its prebuilt SWC binaries to waive the release-age delay. They pin exact versions, so they can be pruned once Next moves past 16.3.0.
getScaleFactor called Math.random() during render, so the server and the client produced different module sizes. That desynced hydration, and a static prerender froze one arbitrary result into the HTML: every visitor saw the same "random" code until the next deploy. Under Next's Cache Components it is a hard prerender error. Scale factors now come from a hash of the module's position and a seed derived from the code's own module grid, so the same value always renders the same layout and different values still differ. The seed is taken from the pre-excavation grid, so resizing an image with excavate set no longer reshuffles the modules around the logo. This required threading cells through to DataModules; the prop is required rather than defaulted to modules, since a silent fallback would reintroduce the same bug. The qrcodegen change is a whitespace-only reformat from oxfmt 0.62, grouped here because oxlint ignores that path and rejects a commit where it is the only staged file under packages/.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 52 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. WalkthroughThe PR replaces render-time randomness in QR module sizing with deterministic, grid-seeded scaling. It passes pre-excavation cells through ChangesDeterministic QR module sizing
Repository maintenance
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ReactQrCode
participant DataModules
participant SizingUtils
ReactQrCode->>DataModules: pass pre-excavation cells
DataModules->>SizingUtils: derive seed from cells
DataModules->>SizingUtils: calculate scale using x, y, and seed
SizingUtils-->>DataModules: return deterministic module scale
DataModules-->>ReactQrCode: render scaled modules
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Line 38: Update the Vitest setup path in vitest.setup.ts to import the
Vitest-specific `@testing-library/jest-dom/vitest` entry point instead of the Jest
entry point, while preserving the existing DOM matcher setup.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f0171a5e-86fe-492b-a912-5f780907294b
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (13)
.changeset/fix-random-size-hydration.mdapps/docs/package.jsonpackage.jsonpackages/react-qr-code/package.jsonpackages/react-qr-code/src/components/data-modules.test.tsxpackages/react-qr-code/src/components/data-modules.tsxpackages/react-qr-code/src/lib/qrcodegen/index.tspackages/react-qr-code/src/react-qr-code.test.tsxpackages/react-qr-code/src/react-qr-code.tsxpackages/react-qr-code/src/types/utils.tspackages/react-qr-code/src/utils/data-modules.test.tspackages/react-qr-code/src/utils/data-modules.tspnpm-workspace.yaml
| "@changesets/cli": "^2.31.0", | ||
| "@testing-library/jest-dom": "^6.9.1", | ||
| "@changesets/cli": "^2.31.1", | ||
| "@testing-library/jest-dom": "^7.0.0", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== package files =="
git ls-files | rg '(^|/)(package\.json|vite\.config\.(ts|js|r?mts?|cts?)|vitest\.(config|setup)\.(ts|js|r?mts?|cts?)|\.config/vitest.*)$' || true
echo
echo "== package.json deps around `@testing-library` =="
if [ -f package.json ]; then
node -e "const p=require('./package.json'); console.log('test:', JSON.stringify(Object.fromEntries(Object.entries(p.devDependencies||{}).filter(([k])=>k.includes('testing')||k.includes('vitest')||k.includes('jest')), null, 2)))"
fi
echo
echo "== vitest setup import(s) =="
for f in $(git ls-files | rg '(^|/)vitest\.setup\.(ts|js|m?ts)$|(^|/)vite\.config\.(ts|js)$'); do
echo "-- $f"
sed -n '1,160p' "$f" | nl -ba -v1 | rg -n '`@testing-library/jest-dom`|vite/config|test|globals|setupFiles|environment' -C 2 || true
done
echo
echo "== package manager lock files =="
git ls-files | rg '(^|/)(package-lock\.json|pnpm-lock\.yaml|yarn\.lock|bun\.lockb|bun\.lock)$' || trueRepository: LGLabGreg/react-qr-code
Length of output: 716
🌐 Web query:
@testing-library/jest-dom Vitest import @testing-library/jest-dom/vitest documentation
💡 Result:
To use @testing-library/jest-dom with Vitest, you must import the dedicated Vitest entry point in your test setup file [1][2]. Setup Instructions: 1. Create a setup file (e.g., vitest-setup.ts or vitest-setup.js) and add the following import [1][2]: import '@testing-library/jest-dom/vitest'; 2. Update your vitest.config.js (or vitest.config.ts) to include this file in the setupFiles configuration [1][2]: export default defineConfig({ test: { setupFiles: ['./vitest-setup.ts'], // or your filename }, }); 3. If you are using TypeScript, ensure your setup file is included in your tsconfig.json and that the necessary types are configured. Add @testing-library/jest-dom to your compilerOptions.types to ensure the matchers are correctly recognized by your IDE and TypeScript compiler [1][2]: { "compilerOptions": { "types": ["vitest/globals", "@testing-library/jest-dom"] }, "include": [ "./vitest-setup.ts" ] } Using the /vitest entry point is required for compatibility, as it correctly hooks into Vitest's expect interface rather than the global Jest object [1][3][2]. If you encounter type errors, verifying that the setup file is included in your tsconfig and that the types are referenced in the configuration is often the solution [4][5].
Citations:
- 1: https://github.com/testing-library/jest-dom/
- 2: https://www.npmjs.com/package/@testing-library/jest-dom
- 3: https://markus.oberlehner.net/blog/using-testing-library-jest-dom-with-vitest
- 4: Instructions for usage with Vitest don't work for me testing-library/jest-dom#587
- 5: Readme - how to update tsconfig for vitest matchers extension testing-library/jest-dom#624
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== vitest.setup.ts =="
python3 - <<'PY'
from pathlib import Path
for p in ["vitest.setup.ts", "vitest.config.ts", "vitest.config.js"]:
try:
text = Path(p).read_text()
except FileNotFoundError:
continue
print(f"-- {p} ({len(text.splitlines())} lines)")
for i, line in enumerate(text.splitlines(), 1):
if 1 <= i <= 220:
print(f"{i:4d}: {line}")
PY
echo
echo "== check setupFiles =="
python3 - <<'PY'
from pathlib import Path
import re
p=Path("vitest.config.ts")
if p.exists():
text=p.read_text()
print(text)
PYRepository: LGLabGreg/react-qr-code
Length of output: 1436
Use the Vitest entry point for @testing-library/jest-dom.
vitest.setup.ts is loaded by the Vitest setup path and imports the Jest entry point. Since this setup files DOM matchers, import @testing-library/jest-dom/vitest so Vitest matchers are registered correctly.
Suggested setup change
-import '`@testing-library/jest-dom`'
+import '`@testing-library/jest-dom/vitest`'🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` at line 38, Update the Vitest setup path in vitest.setup.ts to
import the Vitest-specific `@testing-library/jest-dom/vitest` entry point instead
of the Jest entry point, while preserving the existing DOM matcher setup.
Source: MCP tools
Summary by CodeRabbit
Bug Fixes
Tests
Chores