fix(headless): resolve useSlider/useScrollHeader transform errors and migrate DatePicker to bun:test#45
Conversation
…ncompatibilities - Cast the returned animated style object to `any` in `packages/headless/src/hooks/useSlider.ts` and `useScrollHeader.ts` to bypass TS mismatch with React Native's standard style objects. - Migrate `packages/ui/src/components/DatePicker/__tests__/DatePicker.test.tsx` from Jest globals to `bun:test` APIs (e.g., `mock.module` and `mock()`). Co-authored-by: truongnat <87919564+truongnat@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…rm errors and migrate DatePicker to bun:test Co-authored-by: truongnat <87919564+truongnat@users.noreply.github.com>
…rm errors and migrate DatePicker to bun:test Co-authored-by: truongnat <87919564+truongnat@users.noreply.github.com>
This PR fixes blocking compilation issues in the
headlessanduipackages:transformtypings inuseAnimatedStyleoutputs in bothuseSlider.tsanduseScrollHeader.tsby explicitly casting the output objectsas any.DatePicker.test.tsxthat previously broke because they incorrectly relied on global Jest mocks (jest.mock,jest.fn()), updating them to utilizebun:testprimitives (mock.module,mock()) as required by the monorepo test runner.Note: Core monorepo passes all tests and linting. Example app failures are out of scope for these internal hook/test framework fixes.
PR created automatically by Jules for task 193049414033543021 started by @truongnat
🔧 This PR resolves TypeScript compilation errors in React Native animation hooks and migrates DatePicker tests from Jest to bun:test framework. The changes include type casting fixes for transform properties in useSlider and useScrollHeader hooks, plus updating test mocking syntax to be compatible with the monorepo's bun test runner.
🔍 Detailed Analysis
Key Changes
as anytype casting to transform objects inuseSlider.tsanduseScrollHeader.tsto resolve TypeScript incompatibilities with React Native's animated style typesDatePicker.test.tsxto use bun:test APIs (mock.module,mock()) instead of Jest globals (jest.mock,jest.fn())Technical Implementation
flowchart TD A[TypeScript Compilation] --> B{Transform Type Check} B -->|Fails| C[Add 'as any' Cast] C --> D[Compilation Success] E[Jest Test Framework] --> F[Migration to bun:test] F --> G[Update mock.module syntax] F --> H[Update mock() functions] G --> I[Test Compatibility] H --> IImpact
Created with Palmier
Summary by cubic
Fix transform typing in
headless, correct a mock path inui, and migrateDatePickertests tobun:test. Stabilize CI by pinning Node 22 and addingreact-native-worklets-core.Bug Fixes
useAnimatedStylereturns toanyinuseSlideranduseScrollHeaderto fixtransformtype errors.jest.setup.tsmock path forBottomSheetso the mock applies inui.actions/setup-node@v5with Node22to fix docs build failures.Migration
DatePickertests tobun:testby replacingjest.mock/jest.fn()withmock.module/mock(), and updating the@react-native-community/datetimepickermock.react-native-worklets-coreand updatebun.lockto satisfy peers and stabilize CI.Written for commit 9a8bb8b. Summary will update on new commits.