Skip to content

chore: remove unused react-native-config-reader#7377

Merged
diegolmello merged 2 commits into
developfrom
chore/remove-react-native-config-reader
Jun 11, 2026
Merged

chore: remove unused react-native-config-reader#7377
diegolmello merged 2 commits into
developfrom
chore/remove-react-native-config-reader

Conversation

@diegolmello

@diegolmello diegolmello commented Jun 2, 2026

Copy link
Copy Markdown
Member

Proposed changes

Removes the unused react-native-config-reader dependency.

Its only ever consumer was isOfficial = RNConfigReader.IS_OFFICIAL, deleted in #7322 (remove Experimental code paths) along with the official product flavor that produced the IS_OFFICIAL BuildConfig field (#7325). Since then the package has had zero JS imports — it remained only as an autolinked native module reading BuildConfig values that nothing consumes.

While here, this also removes:

  • the orphaned patches/react-native-config-reader+4.1.1.patchpatch-package was erroring on it (patch-package finished with 1 error(s)) on a clean install
  • the rn_config_reader_custom_package resValue in android/app/build.gradle, read only by the now-removed native module (and one of only two remaining references to the legacy chat.rocket.reactnative namespace)
  • the RNConfigReader pod from ios/Podfile.lock (regenerated via pod install)

Surfaced while investigating the pnpm android launch fix (#7375).

Issue(s)

https://rocketchat.atlassian.net/browse/NATIVE-1223

How to test or reproduce

  1. pnpm install — completes with no patch-package errors (previously errored on the orphaned react-native-config-reader patch).
  2. pnpm pod-install — regenerates ios/Podfile.lock with RNConfigReader removed (already committed here; re-running is a no-op).
  3. tsc passes (verified locally).
  4. Build & launch Android and iOS to confirm no regression — the removed native module had no JS consumers, so runtime behavior is unchanged.

Screenshots

N/A

Types of changes

  • Improvement (non-breaking change which improves a current function)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Dead-code removal only; no runtime behavior change since the module had no JS consumers after #7322 / #7325. Independent of the run-script fix (#7375) and the larger Android namespace-rename discussion. Touches native build inputs (Android build.gradle, iOS Podfile.lock), so an Android + iOS build/launch smoke check is warranted before merge.

Summary by CodeRabbit

  • Chores
    • Removed obsolete dependency and cleaned up associated Android build configurations and TypeScript module declarations.
    • Added support for additional modules to enhance library compatibility.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 714981d5-515e-42ac-ba5e-0de9f3b634a5

📥 Commits

Reviewing files that changed from the base of the PR and between 0e021ac and 77ab4f9.

⛔ Files ignored due to path filters (2)
  • ios/Podfile.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • android/app/build.gradle
  • app/externalModules.d.ts
  • package.json
  • patches/react-native-config-reader+4.1.1.patch
💤 Files with no reviewable changes (3)
  • patches/react-native-config-reader+4.1.1.patch
  • android/app/build.gradle
  • app/externalModules.d.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ESLint and Test / run-eslint-and-test

Walkthrough

This PR removes the react-native-config-reader dependency and its Android and TypeScript configuration, and adds TypeScript ambient module declarations for remove-markdown and @rocket.chat/sdk.

Changes

Dependency Migration

Layer / File(s) Summary
Remove react-native-config-reader dependency and configuration
package.json, app/externalModules.d.ts, android/app/build.gradle
Removes react-native-config-reader from dependencies and @types/react-native-config-reader from devDependencies; removes the ambient react-native-config-reader declaration; and deletes the Android resValue rn_config_reader_custom_package.
Add new module type declarations
app/externalModules.d.ts
Adds ambient module declarations for remove-markdown and @rocket.chat/sdk.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

type: chore

Suggested reviewers

  • OtavioStasiak
  • Rohit3523
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: removing the unused react-native-config-reader dependency and all related configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • NATIVE-1223: Request failed with status code 401

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.

The only consumer was `isOfficial = RNConfigReader.IS_OFFICIAL`, deleted in
#7322 (remove Experimental code paths) along with the `official` product
flavor that produced the `IS_OFFICIAL` BuildConfig field (#7325). Since then
the package has had zero JS imports — it was autolinked dead weight.

Removes:
- the dependency and its @types
- the ambient `declare module` in externalModules.d.ts
- the orphaned iOS podspec patch (patch-package was erroring on it)
- the `rn_config_reader_custom_package` resValue in build.gradle, which only
  the now-removed native module read

Verified: pnpm install + patch-package clean, tsc passes.
@diegolmello diegolmello force-pushed the chore/remove-react-native-config-reader branch from 8867c32 to 77ab4f9 Compare June 11, 2026 12:42
@diegolmello diegolmello requested a deployment to approve_e2e_testing June 11, 2026 12:42 — with GitHub Actions Waiting
@diegolmello diegolmello merged commit d755155 into develop Jun 11, 2026
5 of 8 checks passed
@diegolmello diegolmello deleted the chore/remove-react-native-config-reader branch June 11, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants