-
Notifications
You must be signed in to change notification settings - Fork 2
chore: fixes dependabot warnings about packages #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request updates dependency versions across multiple package.json files, extends pnpm overrides with additional package entries, and updates dev tooling versions. The exported Vite config function return type was changed from Pre-merge checks✅ Passed checks (3 passed)
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. Comment |
There was a problem hiding this 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: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
packages/react-native/src/lib/environment/tests/state.test.ts(7 hunks)packages/react-native/src/lib/user/tests/update.test.ts(7 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/react-native/src/lib/environment/tests/state.test.ts (1)
packages/react-native/src/lib/common/api.ts (1)
ApiClient(58-110)
🔇 Additional comments (2)
packages/react-native/src/lib/user/tests/update.test.ts (1)
36-38: Question the necessity of this refactoring in a dependency update PR.Similar to the state.test.ts file, all mock implementations were changed from arrow functions to traditional
functionsyntax. These changes appear unrelated to fixing Dependabot warnings and add noise to the PR.Refer to the verification request in state.test.ts regarding vitest 4.0.15 compatibility.
Also applies to: 59-61, 84-95, 118-124, 170-172, 191-195
packages/react-native/src/lib/environment/tests/state.test.ts (1)
25-27: This refactoring is necessary for vitest 4.0.15 compatibility.Vitest 4 introduced a breaking change: arrow functions cannot be used in
mockImplementationfor mocks that act as constructors.ApiClientis instantiated with thenewkeyword in production code and tests, which requires plainfunctionsyntax in mock implementations. Using arrow functions would throw the error: "<anonymous> is not a constructor". This is not a discretionary refactoring but a mandatory fix for the vitest upgrade.Likely an incorrect or invalid review comment.
There was a problem hiding this 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: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
packages/react-native/package.json(1 hunks)packages/react-native/src/lib/user/tests/update.test.ts(7 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/react-native/src/lib/user/tests/update.test.ts (5)
packages/react-native/src/lib/common/api.ts (1)
ApiClient(58-110)packages/react-native/src/lib/user/tests/__mocks__/update.mock.ts (2)
mockUserId(1-1)mockAttributes(4-7)packages/react-native/src/lib/user/tests/__mocks__/update-queue.mock.ts (1)
mockAttributes(3-6)packages/react-native/src/types/config.ts (1)
TUpdates(109-112)packages/react-native/src/lib/user/update.ts (1)
sendUpdates(68-127)
🔇 Additional comments (3)
packages/react-native/src/lib/user/tests/update.test.ts (2)
36-38: ApiClient mocks now consistently returncreateOrUpdateUserand are aligned across testsUsing
function () { … }for allmockImplementationcalls while always returning an object withcreateOrUpdateUserkeeps the mocked constructor consistent with the realApiClientAPI and avoids the earlier name mismatch; behavior of the tests is preserved.Also applies to: 59-61, 84-95, 118-124, 170-172, 191-195, 208-214
71-74: Assertions correctly validate success payload and wrapped error messageThe success test checks the unwrapped
state.datastructure, and the network‑error test asserts the higher‑level"Error updating user with userId user_123"message rather than the raw transport error, which matches the intended behavior ofsendUpdatesToBackend.Also applies to: 106-108
packages/react-native/package.json (1)
48-56: Dev tooling and React/React Native version bumps look coherent; please re‑verify tests and buildThe updated devDependencies form a consistent toolchain (React 19.1.x, RN 0.81.x, Vite/Vitest 7.x/4.x, terser 5.44.x). No issues stand out in the manifest itself; just make sure the workspace compiles and all tests still pass with these versions.
Overrides certain packages using pnpm to fix dependabot security issues:
Also updates some other package versions like expo, react and react-native