Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"typescript": "^5.2.2"
},
"peerDependencies": {
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-native": ">=0.57"
Comment on lines 66 to 68
Copy link

@coderabbitai coderabbitai bot Jun 30, 2025

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Eh, mismatch alert, doc!

You juiced up the peer range to include React 19, but the devDependencies are still munchin’ on the old v16 carrots ("react": "^16.0.0" and "@types/react": "^16.0.0"). That can bite you during local builds, tests, and type-checking because Yarn/NPM will hoist v16 while downstream apps expect v19 compatibility.

Consider bumping the dev deps (or dropping them entirely and relying on workspaces/PNPM resolutions) so your CI environment compiles against the highest supported version.

@@
-    "@types/react": "^16.0.0",
-    "react": "^16.0.0",
+    "@types/react": "^18.2.37",   // latest available typings; adjust when 19 typings land
+    "react": "^19.0.0",

Give it a quick spin to be sure no type or lint carrots pop up.


Eh, doc, let’s take a peek under the hood and see what versions are munchin’ on carrots in devDependencies:


🏁 Script executed:

#!/bin/bash
# Show the devDependencies block in package.json
rg -A10 '"devDependencies"' package.json

Length of output: 357


DevDependencies Update Required
What’s up, doc? Our peerDependencies now support React 19, but devDependencies are still stuck on React 16—this can lead to hoisting surprises and type-checking hiccups in CI. Let’s bump them so we’re compiling against the highest supported version.

• File: package.json (devDependencies block)

Suggested diff:

"devDependencies": {
-   "@types/react": "^16.0.0",
-   "react": "^16.0.0",
+   "@types/react": "^18.2.37",   // latest available typings; adjust when React 19 types land
+   "react": "^19.0.0",
    "@types/react-native": "^0.57.0",
    "prettier": "^2.1.1",
    "react-native": "^0.57.0",
    "typescript": "^5.2.2"
},

Give it a quick spin to make sure no type or lint carrots pop up.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"peerDependencies": {
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-native": ">=0.57"
"devDependencies": {
"@types/react": "^18.2.37", // latest available typings; adjust when React 19 types land
"react": "^19.0.0",
"@types/react-native": "^0.57.0",
"prettier": "^2.1.1",
"react-native": "^0.57.0",
"typescript": "^5.2.2"
},
🤖 Prompt for AI Agents
In package.json around lines 66 to 68, the devDependencies for React are
outdated compared to the peerDependencies which support React 19. Update the
React and React Native versions in the devDependencies block to match the
highest versions allowed in peerDependencies, specifically bump React to version
19 and React Native to at least 0.57 or higher as appropriate. After updating,
run the type checks and linting to ensure no errors or warnings appear.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What are the implications of leaving this as is? We would want maximum compatibility but also recognize that certain libs are kinda old.

Copy link

Choose a reason for hiding this comment

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

@angelxmoreno Eh, what's up doc? Great question about keepin' those carrots fresh vs. old! Let me break down the implications of leavin' things as-is:

Implications of Keeping devDependencies at React 16:

🥕 The Good:

  • Backward compatibility confidence - You're literally developing against the oldest supported version, so you know it works
  • Simpler maintenance - No need to chase the latest React changes during development
  • Smaller bundle - React 16 is lighter than newer versions for your dev environment

🐰 The Not-So-Good:

  • Type blindness - You're missing newer React APIs, hooks improvements, and type definitions from v17-19
  • CI gap - Your tests run against v16, but users might hit issues with v17-19 that you never see
  • Hoisting hijinks - Package managers might hoist v16 during development, causing confusing behavior
  • Developer experience - Contributors using newer React versions might get type mismatches

The Bugs Bunny Recommendation:

Since this is a library (not an app), I'd suggest a hybrid approach:

"devDependencies": {
  "@types/react": "^18.2.37",  // Latest stable types
  "react": "^18.0.0",          // Middle ground - not bleeding edge
  // ... other deps
}

Why React 18 in devDependencies?

  • It's stable and well-tested
  • Gives you better type coverage than v16
  • React 19 is still pretty fresh - let it bake a bit more
  • You still support v16-19 in peerDependencies

Pro tip: Consider adding a CI matrix that tests against multiple React versions if you really want belt-and-suspenders compatibility:

strategy:
  matrix:
    react-version: ['16', '17', '18', '19']

What's your take, doc? Want to play it safe with the middle ground, or stick with the current approach for maximum backward compatibility?

(°◡°)♡

},
"repository": {
Expand Down