Skip to content

Monorepo dependency pinning#3055

Draft
gabrielmfern wants to merge 3 commits intocanaryfrom
cursor/monorepo-dependency-pinning-7488
Draft

Monorepo dependency pinning#3055
gabrielmfern wants to merge 3 commits intocanaryfrom
cursor/monorepo-dependency-pinning-7488

Conversation

@gabrielmfern
Copy link
Member

@gabrielmfern gabrielmfern commented Mar 12, 2026

Checklist: Misc/Chore

  • I have followed the PR name format: <type>(<scope>): <Message>
  • I have written a concise and clear description of the changes.

Description

This PR refines the check-dependency-versions script to apply more targeted dependency pinning rules across the monorepo.

Why:
The previous check was not granular enough for a monorepo structure. This update ensures:

  • Workspace root, apps/*, benchmarks/*, and playground: Both dependencies and devDependencies are strictly pinned to ensure consistent and stable builds for applications and the root.
  • packages/*: Only devDependencies are checked for pinning. Production dependencies in publishable library packages are intentionally left flexible, as they are typically peer dependencies or consumed via catalog references, allowing consumers to define their versions.

This change improves the relevance and effectiveness of the dependency pinning check, already identifying existing unpinned dependencies that require attention.

Slack Thread

Open in Web Open in Cursor 

Summary by cubic

Expand monorepo dependency pinning with scoped rules (root, apps/*, benchmarks/*, playground: all deps; packages/*: only devDependencies) and stricter CI. Pinned @react-three/drei, @react-three/fiber, lucide-react, three, cross-env, and rimraf, improved check error handling and messages, and updated the lockfile.

  • Migration
    • Pin any unpinned versions where required to pass CI.
    • Allowed formats: workspace:, catalog:, npm:, or exact SemVer (e.g., 1.2.3 or 1.2.3-beta.1).

Written for commit 73a2e82. Summary will update on new commits.

- Run checks across all workspace members (apps/*, benchmarks/*, packages/*, playground)
- For packages/*: only enforce pinned dev dependencies
- For apps/*, benchmarks/*, playground, and workspace root: enforce all dependencies are pinned

Co-authored-by: Gabriel Miranda <gabrielmfern@outlook.com>
@cursor
Copy link

cursor bot commented Mar 12, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@changeset-bot
Copy link

changeset-bot bot commented Mar 12, 2026

⚠️ No Changeset found

Latest commit: 73a2e82

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 1 file

Confidence score: 3/5

  • There is some risk here: scripts/check-dependency-versions.ts currently swallows readFile and readdir errors beyond ENOENT, which could let dependency checks silently pass on real failures.
  • The impact is user-facing in CI/validation—unexpected filesystem errors would be ignored instead of failing fast, so regressions could slip through.
  • Pay close attention to scripts/check-dependency-versions.ts - ensure only ENOENT is ignored and other errors are surfaced.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="scripts/check-dependency-versions.ts">

<violation number="1" location="scripts/check-dependency-versions.ts:32">
P2: Do not swallow all `readFile` errors; only ignore missing files (`ENOENT`) and rethrow other failures so dependency checks cannot silently pass.</violation>

<violation number="2" location="scripts/check-dependency-versions.ts:58">
P2: Avoid treating all `readdir` failures as empty directories; only ignore `ENOENT` when intentional and rethrow other errors.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

- apps/web: pin @react-three/drei, @react-three/fiber, lucide-react, three to exact versions
- packages/preview-server: pin cross-env and rimraf to exact versions
- scripts/check-dependency-versions.ts: fix biome formatting

Co-authored-by: Gabriel Miranda <gabrielmfern@outlook.com>
@vercel
Copy link

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-email Ready Ready Preview, Comment Mar 12, 2026 3:29pm
react-email-demo Ready Ready Preview, Comment Mar 12, 2026 3:29pm

Request Review

- Regenerate pnpm-lock.yaml to match exact specifiers for cross-env and rimraf
- Only swallow ENOENT errors in readFile/readdir; rethrow all other errors

Co-authored-by: Gabriel Miranda <gabrielmfern@outlook.com>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@react-email/preview-server@3055

commit: 08f67f4

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