Skip to content

replace direct uilib-native imports with optionalDeps, react-native new architecture issues #3492

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"react-native-redash": "^12.0.3",
"semver": "^5.5.0",
"tinycolor2": "^1.4.2",
"uilib-native": "^4.5.0",
"url-parse": "^1.2.0",
"wix-react-native-text-size": "1.0.9"
},
Expand Down Expand Up @@ -126,7 +125,8 @@
"react-test-renderer": "18.2.0",
"reassure": "^0.4.1",
"shell-utils": "^1.0.10",
"typescript": "5.0.4"
"typescript": "5.0.4",
"uilib-native": "^4.5.0"
},
"peerDependencies": {
"react": ">=17.0.1",
Expand Down
22 changes: 0 additions & 22 deletions react-native.config.js

This file was deleted.

3 changes: 2 additions & 1 deletion src/components/featureHighlight/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import {
TouchableWithoutFeedbackProps,
LayoutChangeEvent
} from 'react-native';
import {HighlighterOverlayView} from 'uilib-native';
import {UilibNativePackage} from 'optionalDeps';
import {Colors, Typography} from '../../style';
import {Constants, asBaseComponent} from '../../commons/new';
import View from '../view';
import Text from '../text';
import Button, {ButtonProps, ButtonSize} from '../button';
import PageControl, {PageControlProps} from '../pageControl';

const HighlighterOverlayView = UilibNativePackage?.HighlighterOverlayView;
const defaultOverlayColor = Colors.rgba(Colors.black, 0.82);
const defaultTextColor = Colors.white;
const defaultStrokeColor = Colors.rgba(Colors.white, 0.12);
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* ===== General Stuff ===== */
import {UilibNativePackage} from 'optionalDeps';
export {UilibNativePackage};
export {default as Assets} from './assets';
export type {emojis as EmojisAssetsType} from './assets/emojis';
export * from './style';
export * from './services';
export * from 'uilib-native';
export {
asBaseComponent,
Config,
Expand Down
6 changes: 6 additions & 0 deletions src/optionalDependencies/UilibNativePackage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
let UilibNativePackage: any;
try {
UilibNativePackage = require('uilib-native');
} catch (error) {}

export default UilibNativePackage;
1 change: 1 addition & 0 deletions src/optionalDependencies/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export {default as HapticFeedbackPackage} from './HapticFeedbackPackage';
export {default as SvgPackage, SvgCssUri} from './SvgPackage';
export {createShimmerPlaceholder} from './ShimmerPackage';
export {default as LinearGradientPackage} from './LinearGradientPackage';
export {default as UilibNativePackage} from './UilibNativePackage';