Skip to content

Rock - #18

Merged
CD-Z merged 3 commits into
masterfrom
rock
Sep 13, 2025
Merged

Rock#18
CD-Z merged 3 commits into
masterfrom
rock

Conversation

@CD-Z

@CD-ZCD-Z commented Sep 13, 2025

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Adopted Rock-based tooling with a new configuration enabling Metro and Android platform support.
  • Chores
    • Migrated run, start, and build scripts to Rock CLI and added required dependencies.
    • Updated Android and iOS project setup to use Rock for autolinking and CLI integration.
    • Minor .gitignore housekeeping (no functional impact).
  • Documentation
    • Refreshed dev environment hints to use pnpm workflows (pnpm android / pnpm start) for Android development.

@coderabbitai

coderabbitaiBot commented Sep 13, 2025

Copy link
Copy Markdown

Caution

Review failed

Failed to post review comments.

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5d4a46 and 2961f4c.

⛔ Files ignored due to path filters (3)
  • android/gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
  • package-lock.json is excluded by !**/package-lock.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (26)
  • .github/workflows/build.yml (2 hunks)
  • .github/workflows/lint.yml (1 hunks)
  • .github/workflows/types.yml (1 hunks)
  • .gitignore (1 hunks)
  • CONTRIBUTING-NIX.md (5 hunks)
  • CONTRIBUTING.md (3 hunks)
  • android/app/build.gradle (1 hunks)
  • android/app/src/main/java/com/rajarsheechatterjee/LNReader/MainApplication.kt (2 hunks)
  • android/app/src/main/jni/OnLoad.cpp (3 hunks)
  • android/build.gradle (1 hunks)
  • android/gradle.properties (1 hunks)
  • android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • android/gradlew (2 hunks)
  • android/gradlew.bat (2 hunks)
  • android/settings.gradle (1 hunks)
  • babel.config.js (1 hunks)
  • flake.nix (5 hunks)
  • ios/LNReader.xcodeproj/project.pbxproj (1 hunks)
  • ios/Podfile (1 hunks)
  • metro.config.js (2 hunks)
  • package.json (3 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • rock.config.mjs (1 hunks)
  • src/hooks/persisted/usePlugins.ts (3 hunks)
  • strings/translations.ts (1 hunks)
  • tsconfig.json (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/hooks/persisted/usePlugins.ts (1)
src/utils/constants/languages.ts (1)
  • languagesMapping (7-24)
🪛 RuboCop (1.76.1)
ios/Podfile

[fatal] 36-36: unexpected token tLPAREN2
(Using Ruby 2.7 parser; configure using TargetRubyVersion parameter, under AllCops)

(Lint/Syntax)

🪛 markdownlint-cli2 (0.17.2)
CONTRIBUTING-NIX.md

55-55: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

Walkthrough

Migrates tooling to pnpm and Rock across CI, dev, and build systems. Updates Android/iOS configuration to use Rock for autolinking and CLI entrypoints, adjusts Metro and Babel, upgrades Android/Gradle versions, revises localization initialization, and adds Rock config. Documentation and Nix shells updated to pnpm; package.json dependencies/scripts significantly revised.

Changes

Cohort / File(s)Summary
CI: migrate npm→pnpm
.github/workflows/build.yml, .github/workflows/lint.yml, .github/workflows/types.yml
Install pnpm, add pnpm cache for ~/.pnpm-store and node_modules, switch install and commands to pnpm, update cache keys to pnpm-lock.yaml.
Docs & Dev Env (Nix) updates
CONTRIBUTING.md, CONTRIBUTING-NIX.md, flake.nix, .gitignore
Replace npm/yarn instructions with pnpm; add pnpm to devShells; update emulator/help messages; ignore src/sources/en/generators/.rock/.
Tooling & Config (Rock/Metro/Babel/TS)
rock.config.mjs, metro.config.js, babel.config.js, tsconfig.json, pnpm-workspace.yaml
Add Rock config (android enabled, metro bundler); enable Metro symlink resolver for pnpm; switch reanimated plugin to worklets; normalize TS config/paths and extends; add ignoredBuiltDependencies: protobufjs.
Package scripts & deps overhaul
package.json
Switch scripts to Rock (run:android/ios/start/build); migrate to pnpm in rebuild; bump RN/React/Expo and many libs; add rock and RN codegen/gradle-plugin; update dev tooling versions.
Android build system upgrades
android/build.gradle, android/gradle.properties, android/gradle/wrapper/gradle-wrapper.properties, android/gradlew, android/gradlew.bat, android/settings.gradle
Upgrade build/compile/target SDKs to 36 and Kotlin to 2.1.20; add edgeToEdgeEnabled=false; update Gradle to 8.14.3 and wrapper launch to -jar; change autolinking to run ['npx','rock','config','-p','android'].
Android app build CLI
android/app/build.gradle
Set React Native Gradle plugin cliFile to ../../node_modules/rock/dist/src/bin.js.
Android runtime initialization
android/app/src/main/java/.../MainApplication.kt, android/app/src/main/jni/OnLoad.cpp
Replace SoLoader/new-arch bootstrap with loadReactNative(this); switch core module provider from rncore to FBReactNativeSpec and include corresponding header.
iOS autolinking and bundle phase
ios/Podfile, ios/LNReader.xcodeproj/project.pbxproj
Route use_native_modules! through ['npx','rock','config','-p','ios']; replace bundle phase script to source env files and resolve Rock CLI path.
Localization and plugin defaults
src/hooks/persisted/usePlugins.ts, strings/translations.ts
Use Localization.getLocales() for default language/locale; memoize defaultLang; add INSTALLED_PLUGINS key; set i18n/dayjs locale via computed activeLocale with fallbacks and logs.

Sequence Diagram(s)

sequenceDiagram
autonumber
actor Dev
participant CI as CI (GitHub Actions)
participant pnpm as pnpm
participant Rock as Rock CLI
participant Metro as Metro (with pnpm symlinks)
Dev->>CI: Push/PR
CI->>pnpm: Setup + cache (~/.pnpm-store, node_modules)
CI->>pnpm: pnpm install
CI->>Rock: rock start / build / type-check
Rock->>Metro: Start bundler (symlink-aware)
Loading
sequenceDiagram
autonumber
actor User
participant App as Android App
participant Entry as ReactNativeApplicationEntryPoint
participant JNI as OnLoad.cpp
participant Spec as FBReactNativeSpec
User->>App: Launch
App->>Entry: loadReactNative(this)
Note over App,Entry: Replaces SoLoader/new-arch guarded init
Entry->>JNI: Resolve JavaModuleProvider
JNI->>Spec: FBReactNativeSpec_ModuleProvider(name, params)
Spec-->>JNI: Module (or null)
JNI-->>Entry: Provider chain result
Entry-->>App: RN runtime loaded
Loading
sequenceDiagram
autonumber
participant Pod as CocoaPods (install)
participant RN as use_native_modules!
participant Rock as ['npx','rock','config','-p','ios']
Pod->>RN: Generate native modules config
RN->>Rock: Execute rock config -p ios
Rock-->>RN: Config output
RN-->>Pod: Apply config_command
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • Rock #16 — Similar pnpm/Rock migration across CI, package scripts, Android/iOS config, and Metro changes.
  • Pnpm and upgrade #15 — Overlapping edits: pnpm workflows, metro symlink resolver, Android JNI provider, and app bootstrap.
  • Pnpm and upgrade #14 — Broad dependency/tooling upgrades and pnpm adoption mirroring this PR’s changes.

Poem

Hop, hop! I stash my deps in a pnpm burrow,
Rock leads the build down paths sleek and narrow.
SDKs leap higher, Gradle drums beat,
Locales align—such rhythmic feat!
With symlink trails and caches neat,
This bunny ships a buttery treat. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title Check✅ PassedThe title "Rock" is directly related to the primary changes in the branch—introducing the Rock tool and migrating scripts/workflows to use rock and pnpm—so it reflects the main theme of the changeset, but it is very terse and provides little context for reviewers scanning history. A slightly more descriptive single-line title would make the purpose clearer while remaining concise.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rock

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

@CD-Z
CD-Z merged commit 5bbdd6b into masterSep 13, 2025
3 of 4 checks passed
@coderabbitaicoderabbitaiBot mentioned this pull request Feb 25, 2026
This was referenced Mar 25, 2026
@coderabbitaicoderabbitaiBot mentioned this pull request Apr 5, 2026
Sign up for freeto 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

@CD-Z