Skip to content

Conversation

@peterlazar1993
Copy link

@peterlazar1993 peterlazar1993 commented Nov 10, 2025

Howdy folks, thank you for the wonderful library and congratulations on enabling Fabric compaitablity.
I want to bring to your attention an issue I noticed in how the library is packaged.

Recent releases of the package specifies some dependencies, that are not used by the library. They are only used by the sample/example apps.
They should be specified in the sample app's package.json instead, or atleast moved to devDependencies.

On top of this, two dependencies 'npm' and 'install' are also installed. This is most definitely a mistake. At some point yarn add npm install was ran and these packages were added.

Please consider using npm/yarn workspaces.

Summary by CodeRabbit

  • Chores
    • Reorganized package dependencies configuration.

@coderabbitai
Copy link

coderabbitai bot commented Nov 10, 2025

Walkthrough

Four runtime dependencies—hermes-engine, react-native-safe-area-context, react-native-screens, and react-native-webview—were moved from the dependencies field to devDependencies in package.json. These packages are now classified as development-only dependencies rather than production runtime requirements.

Changes

Cohort / File(s) Summary
Dependency Reclassification
package.json
Moved four React Native packages (hermes-engine, react-native-safe-area-context, react-native-screens, react-native-webview) from runtime dependencies to devDependencies

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Verify that these packages are genuinely not required at runtime and are only needed during development/build phases
  • Confirm that production builds and application runtime will not be affected by this reclassification

Poem

🐰 Four packages hopped away,
From production's light of day,
To dev tools' cozy burrow deep,
Where only builders dare to creep,
Lighter loads, the project cheers! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately reflects the main change: moving unused runtime dependencies to devDependencies, which aligns with the PR's primary objective.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@pantoaibot
Copy link

pantoaibot bot commented Nov 10, 2025

PR Summary:

Summary:
This PR removes the duplicated dependencies block from package.json, ensuring that packages like hermes-engine, react-native-safe-area-context, react-native-screens, and react-native-webview are maintained only in devDependencies.

Changes:

  • Deleted the "dependencies" block that included packages already listed in devDependencies.
  • Streamlined package.json to reduce redundancy and potential conflicts.

Reviewed by Panto AI

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 11d34c1 and 70ad214.

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

"babel-jest": "^29.5.0",
"eslint": "^8.44.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"hermes-engine": "^0.11.0",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify these dependencies are not used by the library's source code and confirm the ideal location.

Moving these four packages to devDependencies ensures they won't be installed as runtime dependencies for library consumers. However, per the PR objectives, these should ideally be in the example app's package.json rather than the root devDependencies, since they appear to be example/sample-app-only dependencies.

Verify the following:

  1. Confirm that the library's source code in src/ does not import any of these packages: hermes-engine, react-native-safe-area-context, react-native-screens, react-native-webview
  2. Check whether an example app directory exists with its own package.json that should contain these dependencies
  3. Confirm that moving these to devDependencies (rather than the example app's package.json) is the intended final state, or if this is a temporary measure

Also applies to: 68-70


🏁 Script executed:

#!/bin/bash
# Description: Verify that the four moved packages are not imported in library source code

# Search for imports of the four moved packages in the src/ directory
echo "=== Searching for hermes-engine imports ==="
rg -n --type=ts --type=tsx --type=js --type=jsx 'from.*hermes|import.*hermes' src/

echo "=== Searching for react-native-safe-area-context imports ==="
rg -n --type=ts --type=tsx --type=js --type=jsx 'from.*safe-area-context|import.*safe-area-context' src/

echo "=== Searching for react-native-screens imports ==="
rg -n --type=ts --type=tsx --type=js --type=jsx 'from.*react-native-screens|import.*react-native-screens' src/

echo "=== Searching for react-native-webview imports ==="
rg -n --type=ts --type=tsx --type=js --type=jsx 'from.*react-native-webview|import.*react-native-webview' src/

echo "=== Checking if example directory exists ==="
fd -t d '^example$' .

echo "=== Listing contents of example directory if present ==="
find . -maxdepth 2 -type d -name example -exec ls -la {} \;

Length of output: 2088


🏁 Script executed:

#!/bin/bash
# Description: Verify package locations and verify no imports in library source

# Fix: Use simpler approach without problematic type flags
echo "=== Checking root package.json devDependencies section ==="
grep -A 30 '"devDependencies"' package.json | grep -E 'hermes-engine|react-native-safe-area-context|react-native-screens|react-native-webview'

echo "=== Checking example/package.json for these packages ==="
grep -E 'hermes-engine|react-native-safe-area-context|react-native-screens|react-native-webview' example/package.json

echo "=== Searching for package imports in src/ (hermes) ==="
rg -n 'hermes' src/ 2>/dev/null || echo "No hermes matches"

echo "=== Searching for package imports in src/ (safe-area-context) ==="
rg -n 'safe-area-context' src/ 2>/dev/null || echo "No safe-area-context matches"

echo "=== Searching for package imports in src/ (screens) ==="
rg -n 'react-native-screens' src/ 2>/dev/null || echo "No react-native-screens matches"

echo "=== Searching for package imports in src/ (webview) ==="
rg -n 'react-native-webview' src/ 2>/dev/null || echo "No react-native-webview matches"

echo "=== Full example/package.json contents ==="
cat example/package.json

Length of output: 3016


Move these packages to example/package.json instead of root devDependencies.

Verification confirms the library source code does not import any of these packages, so moving them from dependencies was correct. However, moving them to root devDependencies is problematic:

  1. hermes-engine is now duplicated: exists in both root devDependencies (from this PR) and example/package.json (existing)
  2. react-native-safe-area-context, react-native-screens, react-native-webview are in root devDependencies but missing from example/package.json where the example app needs them
  3. Root devDependencies should only contain dev tooling (linters, compilers, etc.), not app dependencies

Add these packages to example/package.json where the example app requires them, remove the duplication for hermes-engine, and remove all three from root devDependencies.

🤖 Prompt for AI Agents
In package.json around line 61, the PR incorrectly added app libraries to the
root devDependencies; remove "hermes-engine", "react-native-safe-area-context",
"react-native-screens", and "react-native-webview" from the root
devDependencies, ensure "hermes-engine" is not duplicated (keep it only in
example/package.json), and add "react-native-safe-area-context",
"react-native-screens", and "react-native-webview" into example/package.json (as
dependencies or devDependencies as appropriate for the example app) so the
example app has the required packages and the root devDependencies only contain
tooling.

@pantoaibot
Copy link

pantoaibot bot commented Nov 10, 2025

Reviewed up to commit:70ad21480fa5548321500e32a6304a2f0390780b

Additional Suggestion
scripts/check-requirements.sh, line:285-317 The script checks for the string 'minSdkVersion 23' in the react-native-screens build.gradle to confirm patch application, but the patches now update the minSdkVersion to 24. Update the grep condition to search for 'minSdkVersion 24' to ensure correct detection.

if grep -q "minSdkVersion 24" "$PROJECT_ROOT/sample/node_modules/react-native-screens/android/build.gradle"; then

Reviewed by Panto AI


Few more points:

  • [REFACTORING] The dependencies block is removed as the business context requires. Please ensure that none of the removed dependencies (such as 'npm' and 'install') are required at runtime and that any needed packages are properly relocated to the sample project's package.json or listed in devDependencies as appropriate.

@peterlazar1993 peterlazar1993 changed the title fix: Remove dependecies block fix: Move unused dependencies to devDependencies Nov 10, 2025
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.

1 participant