Skip to content

Commit

Permalink
fix: bump use-latest-callback to fix callback assignements
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Oct 19, 2023
1 parent 46954ce commit bc30315
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"nanoid": "^3.1.23",
"query-string": "^7.1.3",
"react-is": "^16.13.0",
"use-latest-callback": "^0.1.5"
"use-latest-callback": "^0.1.7"
},
"devDependencies": {
"@testing-library/react-native": "^11.5.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/native/src/__tests__/ServerContainer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ window.removeEventListener = () => {};
// eslint-disable-next-line import/extensions
jest.mock('../useLinking', () => require('../useLinking.tsx').default);

// Since Jest is configured for React Native, the *.native.js file is imported
// But as we're testing server rendering, we want to use the web version
// So we mock it to point to the web version
jest.mock(
'use-latest-callback/lib/useIsomorphicLayoutEffect',
() => require('react').useEffect
);

it('renders correct state with location', () => {
const createStackNavigator = createNavigatorFactory((props: any) => {
const { state, descriptors, NavigationContent } = useNavigationBuilder(
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-tab-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"clean": "del lib"
},
"dependencies": {
"use-latest-callback": "^0.1.5"
"use-latest-callback": "^0.1.7"
},
"devDependencies": {
"del-cli": "^5.0.0",
Expand Down
14 changes: 8 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5572,7 +5572,7 @@ __metadata:
react-native-builder-bob: ^0.20.4
react-test-renderer: 18.1.0
typescript: ^4.9.4
use-latest-callback: ^0.1.5
use-latest-callback: ^0.1.7
peerDependencies:
react: "*"
languageName: unknown
Expand Down Expand Up @@ -21992,7 +21992,7 @@ __metadata:
react-native-builder-bob: ^0.20.4
react-native-pager-view: 6.1.2
typescript: ^4.9.4
use-latest-callback: ^0.1.5
use-latest-callback: ^0.1.7
peerDependencies:
react: "*"
react-native: "*"
Expand Down Expand Up @@ -25574,10 +25574,12 @@ __metadata:
languageName: node
linkType: hard

"use-latest-callback@npm:^0.1.5":
version: 0.1.5
resolution: "use-latest-callback@npm:0.1.5"
checksum: a7af3275985b7918c3e0e7a57bb5fc8ad678b21673fc618fe778d111992bdabb4f9592cd3e0286e032a7c956ee3c9d1aba39801c13f32d68bc4c4a008e38783b
"use-latest-callback@npm:^0.1.7":
version: 0.1.7
resolution: "use-latest-callback@npm:0.1.7"
peerDependencies:
react: ">=16.8"
checksum: 0da07610ed8aa5274a2d1e258a034ca591d7508b5d9f04c3f56cc750d5f6c68f2bb430c346f0a344a46a4a942de21d942e8c175b170c1ea640558bb25071f7fb
languageName: node
linkType: hard

Expand Down

0 comments on commit bc30315

Please sign in to comment.