Skip to content

Commit

Permalink
chore: bump use-latest-callback
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Mar 12, 2024
1 parent 747508d commit 03adf8c
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 16 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.7"
"use-latest-callback": "^0.1.9"
},
"devDependencies": {
"@testing-library/react-native": "^11.5.0",
Expand Down
19 changes: 13 additions & 6 deletions packages/native/src/__tests__/ServerContainer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@ window.removeEventListener = () => {};
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
);
// Causing the wrong useIsomorphicLayoutEffect to be imported
// It causes "Warning: useLayoutEffect does nothing on the server"
// So we explicitly silence it here
// This warning is being removed in React: https://github.com/facebook/react/pull/26395
const error = console.error;

jest.spyOn(console, 'error').mockImplementation((...args) => {
if (/Warning: useLayoutEffect does nothing on the server/m.test(args[0])) {
return;
}

error(...args);
});

it('renders correct state with location', () => {
const createStackNavigator = createNavigatorFactory((props: any) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-drawer-layout/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-drawer-layout",
"description": "Drawer component for React Native",
"version": "3.2.1",
"version": "3.2.2",
"keywords": [
"react-native-component",
"react-component",
Expand Down Expand Up @@ -37,7 +37,7 @@
"clean": "del lib"
},
"dependencies": {
"use-latest-callback": "^0.1.5"
"use-latest-callback": "^0.1.9"
},
"devDependencies": {
"del-cli": "^5.0.0",
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.7"
"use-latest-callback": "^0.1.9"
},
"devDependencies": {
"del-cli": "^5.0.0",
Expand Down
30 changes: 24 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.7
use-latest-callback: ^0.1.9
peerDependencies:
react: "*"
languageName: unknown
Expand Down Expand Up @@ -21873,6 +21873,24 @@ __metadata:
languageName: node
linkType: hard

"react-native-drawer-layout@workspace:packages/react-native-drawer-layout":
version: 0.0.0-use.local
resolution: "react-native-drawer-layout@workspace:packages/react-native-drawer-layout"
dependencies:
del-cli: ^5.0.0
react: 18.2.0
react-native: 0.71.8
react-native-builder-bob: ^0.20.4
typescript: ^4.9.4
use-latest-callback: ^0.1.9
peerDependencies:
react: "*"
react-native: "*"
react-native-gesture-handler: ">= 1.0.0"
react-native-reanimated: ">= 1.0.0"
languageName: unknown
linkType: soft

"react-native-flipper@npm:~0.125.0":
version: 0.125.0
resolution: "react-native-flipper@npm:0.125.0"
Expand Down Expand Up @@ -21992,7 +22010,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.7
use-latest-callback: ^0.1.9
peerDependencies:
react: "*"
react-native: "*"
Expand Down Expand Up @@ -25574,12 +25592,12 @@ __metadata:
languageName: node
linkType: hard

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

Expand Down

0 comments on commit 03adf8c

Please sign in to comment.