Pin @types/react and @types/react-dom to 18.x - #4461
Conversation
|
|
Hi @deepshekhardas, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details. |
| "@types/react": "18.2.69", | ||
| "@types/react-dom": "18.2.7", |
There was a problem hiding this comment.
🔴 Dependency lock file wasn't refreshed, so installs and every CI job fail
New pinned type-package versions were added to the dependency overrides (@types/react/@types/react-dom at package.json:97-98) without regenerating the lock file, so strict installs abort because the recorded overrides no longer match.
Impact: Every CI workflow and any fresh install fails immediately at the install step until the lock file is regenerated.
Lock file overrides block is out of sync with package.json
pnpm-lock.yaml:7-49 lists the overrides map and does not contain @types/react or @types/react-dom. pnpm validates this block against the root package.json when running with --frozen-lockfile, which every workflow uses (e.g. .github/workflows/typecheck.yml:32, .github/workflows/code-quality.yml:32, .github/workflows/unit-tests-webapp.yml:106). The fix is to run pnpm i at the repo root and commit the resulting pnpm-lock.yaml, as described in AGENTS.md's dependency-installation guidance.
Prompt for agents
The root package.json now declares two new pnpm overrides (@types/react 18.2.69 and @types/react-dom 18.2.7) but pnpm-lock.yaml's overrides section was not regenerated, so `pnpm install --frozen-lockfile` (used by all GitHub workflows) will fail with an ERR_PNPM_OUTDATED_LOCKFILE-style error. Run `pnpm i` from the repo root and commit the updated pnpm-lock.yaml along with the package.json change.
Was this helpful? React with 👍 or 👎 to provide feedback.
| "@types/react": "18.2.69", | ||
| "@types/react-dom": "18.2.7", |
There was a problem hiding this comment.
🔍 Unconditional override contradicts trigger-sdk's declared @types/react ^19 dev dependency
The new overrides are unscoped (unlike the neighbouring react@^18 / react-dom@^18 selectors), so every workspace gets React 18 typings regardless of what it declares. packages/trigger-sdk/package.json:94 declares @types/react: ^19.2.14 and packages/rsc/package.json pins react/react-dom to 19.0.0-rc.1 with @types/react: "*". I checked the sources: packages/trigger-sdk/src/v3/chat-react.ts only uses useCallback/useEffect/useRef/useState, packages/react-hooks/src only uses classic hooks, and packages/rsc/src never imports React types, so nothing currently requires React 19-only typings and the override should be safe today. Still, the SDK's declared range is now silently unsatisfied — consider aligning that dev dependency to 18.x or scoping the override (e.g. @types/react@^18) so future React 19 type usage in those packages isn't type-checked against the wrong typings.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughAdded pnpm overrides that pin ✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
🧪 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 |
Fixes TS errors from mixed react versions. See original #3267.