-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix remx optional dependency (#7241)
Currently, remx is an optional peer dependency that is required for our mock consumers only. But it is actually being imported from our main `index.ts` which break users who don't import it even though they are not using mocks. The solution is to change the way users import our mocks and make it explicit. Mocks now should be imported from `react-native-navigation/Mock`. Co-authored-by: Carl-Gerhard Lindesvärd <c.lindesvard@klarna.com>
- Loading branch information
Showing
6 changed files
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './lib/dist/Mock'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
export const ApplicationMock = require('./Application').Application; | ||
|
||
export * from './constants'; | ||
|
||
export function mockNativeComponents() { | ||
const { NativeCommandsSender } = require('./mocks/NativeCommandsSender'); | ||
const { NativeEventsReceiver } = require('./mocks/NativeEventsReceiver'); | ||
const { AppRegistryService } = require('./mocks/AppRegistryService'); | ||
const { Navigation } = require('react-native-navigation'); | ||
|
||
Navigation.mockNativeComponents( | ||
new NativeCommandsSender(), | ||
new NativeEventsReceiver(), | ||
new AppRegistryService() | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters