Skip to content

Pin @types/react and @types/react-dom to 18.x - #4461

Closed
deepshekhardas wants to merge 1 commit into
triggerdotdev:mainfrom
deepshekhardas:pr-3267
Closed

Pin @types/react and @types/react-dom to 18.x#4461
deepshekhardas wants to merge 1 commit into
triggerdotdev:mainfrom
deepshekhardas:pr-3267

Conversation

@deepshekhardas

Copy link
Copy Markdown

Fixes TS errors from mixed react versions. See original #3267.

@changeset-bot

changeset-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: eed2f1e

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

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot closed this Aug 2, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

Open in Devin Review

Comment thread package.json
Comment on lines +97 to +98
"@types/react": "18.2.69",
"@types/react-dom": "18.2.7",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 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.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread package.json
Comment on lines +97 to +98
"@types/react": "18.2.69",
"@types/react-dom": "18.2.7",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 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.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f418829a-cd1b-4b2c-9e02-04c9c9d97526

📥 Commits

Reviewing files that changed from the base of the PR and between 14824b0 and eed2f1e.

📒 Files selected for processing (1)
  • package.json

Walkthrough

Added pnpm overrides that pin @types/react to 18.2.69 and @types/react-dom to 18.2.7.

✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch pr-3267
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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