Skip to content

build(deps): upgrade some dependencies#6962

Merged
diegolmello merged 14 commits intodevelopfrom
chore/upgrade-deps-safely
Feb 19, 2026
Merged

build(deps): upgrade some dependencies#6962
diegolmello merged 14 commits intodevelopfrom
chore/upgrade-deps-safely

Conversation

@tassoevan
Copy link
Copy Markdown
Member

@tassoevan tassoevan commented Feb 3, 2026

Proposed changes

  • It uses tilde for some dependencies' semver ranges.
    This ensures higher stability in the dependency resolutions, since it will block implicit minor upgrades.
  • It upgrades TypeScript to the latest version.
    It aligns with other project in the organization and enables more strict type safety.
  • It aligns the versions of Babel dependencies.
    Babel dependencies usually are released under a single semver, so misalignments at the minor version number are usually a mistake.

Issue(s)

ARCH-1939

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

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

Summary by CodeRabbit

  • Chores

    • Updated many dependencies to broader version ranges, added Axios and a Volta block for Node/Yarn management, and removed unused dev dependencies
  • Other Changes

    • Tightened callback typings across header and view components for stronger type safety
    • Adjusted forwarding access control behavior when certain account settings are absent
    • Made room-actions navigation behavior more consistent across views

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 3, 2026

Walkthrough

Tightened several callback prop types from Function to () => void; added navigation typing and a cast in RoomView navigation; made TeamChannelsView.goRoomActionsView accept an optional screen argument; replaced a nullish fallback with boolean coercion for blockUnauthenticatedAccess; updated dependencies and added Volta.

Changes

Cohort / File(s) Summary
RoomHeader props
app/containers/RoomHeader/RoomHeader.tsx, app/containers/RoomHeader/index.tsx
Replaced generic onPress: Function with onPress: () => void in exported interfaces/props.
LeftButtons prop
app/views/RoomView/LeftButtons.tsx
Replaced goRoomActionsView: Function with goRoomActionsView: () => void in props interface.
RoomView navigation typing
app/views/RoomView/index.tsx
Added NavigatorScreenParams and TNavigation imports; when isMasterDetail is true, the navigation call now casts params as NavigatorScreenParams<ModalStackParamList & TNavigation> while preserving target screen selection.
TeamChannelsView signature
app/views/TeamChannelsView.tsx
Made goRoomActionsView parameter optional (screen?: string).
ForwardMessageView logic
app/views/ForwardMessageView/index.tsx
Removed ?? true fallback and now uses !!state.settings.Accounts_AvatarBlockUnauthenticatedAccess to compute blockUnauthenticatedAccess.
Dependencies / tooling
package.json
Added axios; loosened several dependency/devDependency versions to ~ ranges; updated many tooling entries; added a Volta block (node 24.13.1, yarn 1.22.22).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nudged the types and straightened a line,
Made a screen argument optional — now fine,
A boolean no longer leans on a fall,
Axios arrived and Volta joined the call,
Tiny hops, tidy code — a rabbit’s short rhyme.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'build(deps): upgrade some dependencies' is generic and vague, using non-descriptive terms that don't clearly convey which dependencies were upgraded or the scope of changes. Consider a more specific title that identifies key upgrades like 'build(deps): upgrade TypeScript, Babel, and align semver ranges' to better communicate the primary changes.
Out of Scope Changes check ❓ Inconclusive Type safety improvements in RoomHeader, LeftButtons, RoomView, and TeamChannelsView files appear to be incidental refactoring; while these improve code quality and align with the TypeScript upgrade objective, they extend beyond the explicit scope of safe dependency upgrades. Clarify whether the type signature updates were planned as part of the dependency upgrade work or if they should be separated into a distinct type-safety improvement PR for clearer change tracking.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR successfully addresses all coding objectives from ARCH-1939: dependency upgrades completed, tilde (~) semver ranges applied to package.json, TypeScript upgraded, and Babel versions aligned; supporting type safety improvements across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@tassoevan tassoevan changed the title poc: upgrade yarn and dependencies poc: upgrade yarn, use workspaces and upgrade dependencies Feb 3, 2026
@tassoevan tassoevan force-pushed the chore/upgrade-deps-safely branch from f36518f to 0883f73 Compare February 3, 2026 13:47
@tassoevan tassoevan had a problem deploying to experimental_android_build February 3, 2026 13:51 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to official_android_build February 3, 2026 13:51 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to experimental_ios_build February 3, 2026 13:51 — with GitHub Actions Error
@tassoevan tassoevan force-pushed the chore/upgrade-deps-safely branch from 0883f73 to 5b28778 Compare February 12, 2026 03:24
@tassoevan tassoevan had a problem deploying to experimental_ios_build February 12, 2026 03:28 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to experimental_android_build February 12, 2026 03:28 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to official_android_build February 12, 2026 03:28 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to experimental_ios_build February 12, 2026 04:39 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to official_android_build February 12, 2026 04:39 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to experimental_android_build February 12, 2026 04:39 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to experimental_android_build February 12, 2026 04:47 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to official_android_build February 12, 2026 04:47 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to experimental_ios_build February 12, 2026 04:47 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to experimental_ios_build February 12, 2026 05:02 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to experimental_android_build February 12, 2026 05:02 — with GitHub Actions Error
@tassoevan tassoevan had a problem deploying to official_android_build February 12, 2026 05:02 — with GitHub Actions Error
Copy link
Copy Markdown
Contributor

@OtavioStasiak OtavioStasiak left a comment

Choose a reason for hiding this comment

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

Tested on android and iOS, working as expected on both platforms.
Also tested and ensured that it works in MasterStackDetail.

Copy link
Copy Markdown
Contributor

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/views/RoomView/index.tsx (1)

578-595: ⚠️ Potential issue | 🟡 Minor

Unnecessary type widening in NavigatorScreenParams cast reduces type precision.

The screen parameter is constrained to keyof ModalStackParamList, but the cast to NavigatorScreenParams<ModalStackParamList & TNavigation> expands the accepted type beyond that constraint. Since TNavigation includes PickerView and AttachmentView (which don't exist in ModalStackParamList), the intersection widens the type at the cast site. Using a narrower cast to NavigatorScreenParams<ModalStackParamList> would better match the actual parameter constraints. If the navigation prop's wider type (ChatsStackParamList & TNavigation) requires the intersection, address the mismatch upstream rather than at this call site.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/views/RoomView/index.tsx` around lines 578 - 595, The call in
goRoomActionsView currently casts params to
NavigatorScreenParams<ModalStackParamList & TNavigation>, which unnecessarily
widens the allowed screens and loses type precision; change the cast to
NavigatorScreenParams<ModalStackParamList> so the screen param stays constrained
to keyof ModalStackParamList (and if the navigation prop type requires
TNavigation, fix that mismatch at the ChatsStack/parent navigation typing
instead of widening here), keeping the same params object and referencing
goRoomActionsView, ModalStackParamList, TNavigation, and NavigatorScreenParams
to locate the site to update.
🧹 Nitpick comments (1)
app/views/RoomView/index.tsx (1)

10-12: Import path inconsistency: module alias vs. relative paths.

'stacks/stackType' uses a module alias while every other import in this file uses relative paths (e.g., '../../stacks/MasterDetailStack/types' on Line 78). For consistency—and to avoid potential resolution surprises in environments where the alias is not configured—consider using the relative path here too.

♻️ Suggested fix
-import { type TNavigation } from 'stacks/stackType';
+import { type TNavigation } from '../../stacks/stackType';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/views/RoomView/index.tsx` around lines 10 - 12, The import for
TNavigation uses the module alias 'stacks/stackType' which is inconsistent with
the file's other relative imports; update the import of TNavigation to use the
correct relative path that matches the project's folder layout (for example the
same base as '../../stacks/MasterDetailStack/types') so that the statement
importing TNavigation from 'stacks/stackType' is replaced with the equivalent
relative path import; verify the symbol name TNavigation and any related types
still resolve after the change.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d9829f8 and 1890593.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (7)
  • app/containers/RoomHeader/RoomHeader.tsx
  • app/containers/RoomHeader/index.tsx
  • app/views/ForwardMessageView/index.tsx
  • app/views/RoomView/LeftButtons.tsx
  • app/views/RoomView/index.tsx
  • app/views/TeamChannelsView.tsx
  • package.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/views/RoomView/LeftButtons.tsx
  • app/containers/RoomHeader/RoomHeader.tsx
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-02-05T13:55:00.974Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6930
File: package.json:101-101
Timestamp: 2026-02-05T13:55:00.974Z
Learning: In this repository, the dependency on react-native-image-crop-picker should reference the RocketChat fork (RocketChat/react-native-image-crop-picker) with explicit commit pins, not the upstream ivpusic/react-native-image-crop-picker. Update package.json dependencies (and any lockfile) to point to the fork URL and a specific commit, ensuring edge-to-edge Android fixes are included. This pattern should apply to all package.json files in the repo that declare this dependency.

Applied to files:

  • package.json
🧬 Code graph analysis (1)
app/views/RoomView/index.tsx (2)
app/stacks/MasterDetailStack/types.ts (1)
  • ModalStackParamList (30-204)
app/stacks/stackType.ts (1)
  • TNavigation (4-20)
⏰ 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
🔇 Additional comments (4)
app/containers/RoomHeader/index.tsx (1)

17-17: LGTM — correct type tightening from Function to () => void.

Both callers (RoomView.goRoomActionsView with screen?: keyof ModalStackParamList and TeamChannelsView.goRoomActionsView with screen?: string) are assignable to () => void, since their only parameter is optional. This accurately reflects how onPress is invoked (no arguments) and removes the overly permissive Function type.

package.json (2)

202-202: TypeScript upgrade to ~5.9.3 is well-placed.

TypeScript 5.9.3 is the current latest stable version on npm. TypeScript 5.9 was released August 1, 2025, with new features including import defer support and improved DOM summaries. TypeScript 5.9 may introduce changes in types and possibly new errors in some codebases due to stricter type variable inference — worth running a full type-check pass to surface any newly exposed errors. The tilde range (~5.9.3) correctly restricts upgrades to patch-level only, avoiding any inadvertent pick-up of TypeScript 6.0's breaking changes.


216-219: Volta block is correct and timely.

Node.js 24 officially entered Long-Term Support (LTS) in October 2025, codename "Krypton". Node.js 24.13.1 LTS is the latest supported version as of February 2026. Pinning the dev environment to the Active LTS version is the right call and aligns with the updated [email protected] in packageManager. No concerns here.

app/views/TeamChannelsView.tsx (1)

309-334: TeamChannelsView uses inconsistent master-detail navigation compared to RoomView.

The goRoomActionsView logic gates the ModalStackNavigator path with isMasterDetail && screen (line 316), which prevents master-detail modal navigation when called from the header (where screen is always undefined). This is a pre-existing pattern, not introduced by making screen optional.

However, this behavior is inconsistent with RoomView.goRoomActionsView (line 580-607), which always uses ModalStackNavigator in master-detail mode and defaults with screen ?? 'RoomActionsView' when screen is undefined. In master-detail layout, TeamChannelsView will use non-modal navigation from the header, which likely breaks consistency.

Consider aligning with the RoomView pattern: remove the && screen gate and default the screen parameter when undefined.

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@app/views/RoomView/index.tsx`:
- Around line 578-595: The call in goRoomActionsView currently casts params to
NavigatorScreenParams<ModalStackParamList & TNavigation>, which unnecessarily
widens the allowed screens and loses type precision; change the cast to
NavigatorScreenParams<ModalStackParamList> so the screen param stays constrained
to keyof ModalStackParamList (and if the navigation prop type requires
TNavigation, fix that mismatch at the ChatsStack/parent navigation typing
instead of widening here), keeping the same params object and referencing
goRoomActionsView, ModalStackParamList, TNavigation, and NavigatorScreenParams
to locate the site to update.

---

Duplicate comments:
In `@app/views/ForwardMessageView/index.tsx`:
- Line 35: The expression assigning blockUnauthenticatedAccess should drop the
redundant nullish fallback; replace any occurrence of
"state.settings.Accounts_AvatarBlockUnauthenticatedAccess ?? true" with a
boolean coercion "!!state.settings.Accounts_AvatarBlockUnauthenticatedAccess"
(or keep the existing !! form) so the code uses the definitive boolean value
from state.settings.Accounts_AvatarBlockUnauthenticatedAccess and removes the
unreachable "?? true" fallback.

In `@package.json`:
- Line 54: Update the pinned axios dependency in package.json from the
unmaintained "~0.28.1" to a maintained 1.x line (e.g. "^1.4.0" or the latest
1.x) to remove known vulnerabilities; after updating package.json, run your
package manager to refresh the lockfile (npm/yarn install) and run tests; verify
the single usage axios.head(...) in Urls.tsx still behaves correctly and adjust
call signatures if any minor 1.x changes affect it.
- Line 183: The dependency "babel-plugin-react-compiler" is pinned to an RC
without a tilde; update package.json to either use a stable release (replace
"19.1.0-rc.3" with a non-RC stable version) or at minimum allow patch updates by
prefixing with a tilde (e.g., "~19.1.0-rc.3") so it matches the other Babel
packages' version style; modify the "babel-plugin-react-compiler" entry
accordingly and run your lockfile update (npm/yarn) to persist the change.

---

Nitpick comments:
In `@app/views/RoomView/index.tsx`:
- Around line 10-12: The import for TNavigation uses the module alias
'stacks/stackType' which is inconsistent with the file's other relative imports;
update the import of TNavigation to use the correct relative path that matches
the project's folder layout (for example the same base as
'../../stacks/MasterDetailStack/types') so that the statement importing
TNavigation from 'stacks/stackType' is replaced with the equivalent relative
path import; verify the symbol name TNavigation and any related types still
resolve after the change.

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.

3 participants