Skip to content
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

update_RN_0.76.3 #1820

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 21 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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ npm-debug.log
# Yarn
#
yarn-error.log
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Lerna
#
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ allure-results
pluginTemplates
templateFiles/**/*
!/**/*/*.json
*.d.ts
*.d.ts
/.nx/workspace-data
874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.4.cjs

checksumBehavior: update
8 changes: 2 additions & 6 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
"bootstrap": {
"npmClientArgs": ["--no-package-lock", "--unsafe-perm=true", "--no-optional"]
}
}
"packages": ["packages/*"],
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
31 changes: 10 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@
"url": "git://github.com/flexn-io/renative.git"
},
"scripts": {
"bootstrap": "npx lerna@6 bootstrap && yarn build && yarn link:rnv && yarn generateSchema && yarn resetOverrides",
"bootstrap-clean": "yarn clean-gitignore && yarn bootstrap",
"bootstrap": "yarn install && yarn setup",
"bootstrap-clean": "yarn clean-gitignore && yarn install && yarn setup",
"setup": "yarn build && yarn link:rnv && yarn generateSchema && yarn resetOverrides",
"build": "lerna run build",
"clean-gitignore": "git clean -f -d -i -X",
"compile": "npx lerna run compile",
Expand All @@ -68,7 +69,7 @@
"generateSchema": "npx rnv hooks run -x generateSchema && yarn prettier-write-json",
"link:rnv": "npm r rnv -g && cd packages/rnv && npm link",
"lint": "npx eslint ./packages",
"postinstall": "npx lerna link --force-local && npx jetify && npx husky install",
"postinstall": " npx jetify && npx husky install",
"pre-publish": "yarn build && yarn link:rnv && yarn lint && yarn test && rnv hooks run -x prePublish && rnv hooks run -x gitCommitAndTag && yarn generateSchema",
"prettier-write-all": "npx prettier '**/*.{js,jsx,ts,tsx,mjs,cjs,json,md}' --write --config .prettierrc.js",
"prettier-write-json": "npx prettier '**/{package.json,renative.json,renative.**.json,rnv.json,rnv.**.json,renative-1.0.schema.json}' --write --config .prettierrc.js",
Expand All @@ -81,6 +82,9 @@
"watch": "npx lerna exec yarn watch --parallel",
"watch-alt": "npx lerna run compile & npx lerna watch -- lerna run compile"
},
"workspaces": [
"packages/*"
],
"devDependencies": {
"@babel/eslint-parser": "7.17.0",
"@flexn/eslint-config": "1.0.0",
Expand Down Expand Up @@ -109,7 +113,7 @@
"jest": "^29.6.3",
"jest-environment-jsdom": "29.7.0",
"json-diff": "1.0.6",
"lerna": "^6.6.2",
"lerna": "^8.1.9",
"lint-staged": "12.3.4",
"madge": "6.1.0",
"prettier": "2.8.8",
Expand All @@ -124,7 +128,7 @@
},
"private": true,
"resolutions": {
"@react-native-community/cli-platform-ios": "12.3.6"
"@react-native-community/cli-platform-ios": "15.0.1"
},
"title": "ReNative",
"husky": {
Expand All @@ -140,20 +144,5 @@
"eslint"
]
},
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"html-webpack-plugin",
"html-webpack-harddisk-plugin",
"webpack",
"mini-css-extract-plugin",
"execa",
"**/@flexn/graybox",
"**/appium-*",
"**/@wdio/*",
"**/@react-native/metro-babel-transformer"
]
}
"packageManager": "[email protected]"
}
6 changes: 3 additions & 3 deletions packages/adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"watch": "tsc --watch --preserveWatchOutput"
},
"dependencies": {
"babel-plugin-module-resolver": "^5.0.0"
"babel-plugin-module-resolver": "^5.0.0",
"rimraf": "2.6.2",
"typescript": "5.2.2"
},
"peerDependencies": {},
"private": false,
"publishConfig": {
"access": "public"
}
Expand Down
9 changes: 5 additions & 4 deletions packages/app-harness/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

gem 'cocoapods', '~> 1.13', '< 1.15'
gem 'activesupport', '~> 7.0', '<= 7.0.8'
gem 'cocoapods-user-defined-build-types'

# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'cocoapods-user-defined-build-types'
5 changes: 3 additions & 2 deletions packages/app-harness/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (~> 7.0, <= 7.0.8)
cocoapods (~> 1.13, < 1.15)
activesupport (>= 6.1.7.5, != 7.1.0)
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
cocoapods-user-defined-build-types
xcodeproj (< 1.26.0)

RUBY VERSION
ruby 3.0.2p107
Expand Down
15 changes: 8 additions & 7 deletions packages/app-harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"dependencies": {
"@lightningjs/cli": "2.13.0",
"@lightningjs/sdk": "5.5.1",
"@react-native-community/cli": "15.0.1",
"@react-native-community/push-notification-ios": "1.11.0",
"@react-native-firebase/app": "20.0.0",
"@rnv/renative": "1.8.0-rc.0",
Expand All @@ -51,17 +52,17 @@
"react": "18.3.1",
"react-art": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.73.4",
"react-native": "0.76.3",
"react-native-carplay": "2.3.0",
"react-native-fs": "2.20.0",
"react-native-gesture-handler": "2.16.2",
"react-native-google-cast": "4.8.0",
"react-native-gesture-handler": "2.21.2",
"react-native-google-cast": "4.8.3",
"react-native-orientation-locker": "1.7.0",
"react-native-permissions": "4.1.5",
"react-native-photo-editor": "github:AppGyver/react-native-photo-editor#v0.1.2",
"react-native-safe-area-context": "4.10.3",
"react-native-permissions": "5.2.1",
"react-native-photo-editor": "github:AppGyver/react-native-photo-editor#0.1.2",
"react-native-safe-area-context": "5.0.0",
"react-native-splash-screen": "3.3.0",
"react-native-tvos": "0.73.6-0",
"react-native-tvos": "0.76.3-0",
"react-native-web": "0.19.12",
"rn-fetch-blob": "0.12.0"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/app-harness/renative.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
}
},
"android": {
"enableJetifier": true,
"templateAndroid": {
"build_gradle": {
"buildscript": {
Expand Down Expand Up @@ -221,7 +222,7 @@
"disabled": true
},
"pluginDependencies": null,
"version": "github:AppGyver/react-native-photo-editor#v0.1.2"
"version": "github:AppGyver/react-native-photo-editor#0.1.2"
},
"react-native-permissions": {
"ios": {
Expand Down
10 changes: 5 additions & 5 deletions packages/app-harness/src/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ const App = () => (
);

const AppContent = () => {
const orientationBtnRef = useRef<TouchableOpacity>(null);
const permissionBtnRef = useRef<TouchableOpacity>(null);
const splashBtnRef = useRef<TouchableOpacity>(null);
const photoEditorBtnRef = useRef<TouchableOpacity>(null);
const nativeModuleBtnRef = useRef<TouchableOpacity>(null);
const orientationBtnRef = useRef<React.ElementRef<typeof TouchableOpacity>>(null);
const permissionBtnRef = useRef<React.ElementRef<typeof TouchableOpacity>>(null);
const splashBtnRef = useRef<React.ElementRef<typeof TouchableOpacity>>(null);
const photoEditorBtnRef = useRef<React.ElementRef<typeof TouchableOpacity>>(null);
const nativeModuleBtnRef = useRef<React.ElementRef<typeof TouchableOpacity>>(null);
const [showVideo, setShowVideo] = useState(false);
const [logsFocused, setLogsFocused] = useState(false);
const { logDebug, logs } = useLoggerContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,30 @@ import styles from '../../styles';
import { testProps } from '../../config';

type ButtonProps = TouchableOpacityProps;
export const NewModuleButton = forwardRef<TouchableOpacity, ButtonProps>(({ onBlur, onFocus, style }, ref) => {
const { TestNativeModule } = NativeModules;
const { logDebug } = useLoggerContext();
const callback = (error: any, result: string) => {
if (error) {
logDebug(error);
} else {
logDebug(result);
}
};
const onPress = () => {
if (TestNativeModule) {
TestNativeModule.createTestEvent('testName', 'testLocation', callback);
} else {
logDebug('NativeModules not supported for this platform');
}
};
return (
<TouchableOpacity ref={ref} onPress={onPress} onFocus={onFocus} onBlur={onBlur} style={style}>
<Text style={styles.buttonTitle} {...testProps('app-harness-home-native-call-button')}>
Click to invoke native module!
</Text>
</TouchableOpacity>
);
});
export const NewModuleButton = forwardRef<React.ElementRef<typeof TouchableOpacity>, ButtonProps>(
({ onBlur, onFocus, style }, ref) => {
const { TestNativeModule } = NativeModules;
const { logDebug } = useLoggerContext();
const callback = (error: any, result: string) => {
if (error) {
logDebug(error);
} else {
logDebug(result);
}
};
const onPress = () => {
if (TestNativeModule) {
TestNativeModule.createTestEvent('testName', 'testLocation', callback);
} else {
logDebug('NativeModules not supported for this platform');
}
};
return (
<TouchableOpacity ref={ref} onPress={onPress} onFocus={onFocus} onBlur={onBlur} style={style}>
<Text style={styles.buttonTitle} {...testProps('app-harness-home-native-call-button')}>
Click to invoke native module!
</Text>
</TouchableOpacity>
);
}
);
28 changes: 15 additions & 13 deletions packages/app-harness/src/components/NewModuleButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ import styles from '../../styles';
import { testProps } from '../../config';

type ButtonProps = TouchableOpacityProps;
export const NewModuleButton = forwardRef<TouchableOpacity, ButtonProps>(({ onBlur, onFocus, style }, ref) => {
const { logDebug } = useLoggerContext();
const onPress = () => {
logDebug('NativeModules not supported in web');
};
return (
<TouchableOpacity ref={ref} onPress={onPress} onFocus={onFocus} onBlur={onBlur} style={style}>
<Text style={styles.buttonTitle} {...testProps('app-harness-home-native-call-button')}>
Click to invoke native module!
</Text>
</TouchableOpacity>
);
});
export const NewModuleButton = forwardRef<React.ElementRef<typeof TouchableOpacity>, ButtonProps>(
({ onBlur, onFocus, style }, ref) => {
const { logDebug } = useLoggerContext();
const onPress = () => {
logDebug('NativeModules not supported in web');
};
return (
<TouchableOpacity ref={ref} onPress={onPress} onFocus={onFocus} onBlur={onBlur} style={style}>
<Text style={styles.buttonTitle} {...testProps('app-harness-home-native-call-button')}>
Click to invoke native module!
</Text>
</TouchableOpacity>
);
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,41 @@ import { ICON_LOGO } from '../../config';
import styles from '../../styles';

type ButtonProps = TouchableOpacityProps;
export const PhotoEditorButton = forwardRef<TouchableOpacity, ButtonProps>(({ onBlur, onFocus, style }, ref) => {
const { logDebug } = useLoggerContext();
const photoPath = RNFS.DocumentDirectoryPath + ICON_LOGO;
useEffect(() => {
const fetchAndMovePhoto = async () => {
const binaryFile = Image.resolveAssetSource(ICON_LOGO);
try {
const resp = await RNFetchBlob.config({ fileCache: true }).fetch('GET', binaryFile.uri);
if (await RNFS.exists(photoPath)) {
await RNFS.unlink(photoPath);
export const PhotoEditorButton = forwardRef<React.ElementRef<typeof TouchableOpacity>, ButtonProps>(
({ onBlur, onFocus, style }, ref) => {
const { logDebug } = useLoggerContext();
const photoPath = RNFS.DocumentDirectoryPath + ICON_LOGO;
useEffect(() => {
const fetchAndMovePhoto = async () => {
const binaryFile = Image.resolveAssetSource(ICON_LOGO);
try {
const resp = await RNFetchBlob.config({ fileCache: true }).fetch('GET', binaryFile.uri);
if (await RNFS.exists(photoPath)) {
await RNFS.unlink(photoPath);
}
await RNFS.moveFile(resp.path(), photoPath);
logDebug('FILE WRITTEN!');
} catch (error) {
logDebug(`${error}`);
}
await RNFS.moveFile(resp.path(), photoPath);
logDebug('FILE WRITTEN!');
} catch (error) {
logDebug(`${error}`);
}
};
fetchAndMovePhoto();
}, []);
const handlePhotoEditor = () => {
RNPhotoEditor.Edit({
path: photoPath,
onDone: () => {
logDebug('on done');
},
onCancel: () => {
logDebug('on cancel');
},
});
};
fetchAndMovePhoto();
}, []);
const handlePhotoEditor = () => {
RNPhotoEditor.Edit({
path: photoPath,
onDone: () => {
logDebug('on done');
},
onCancel: () => {
logDebug('on cancel');
},
});
};
return (
<TouchableOpacity ref={ref} onPress={handlePhotoEditor} onFocus={onFocus} onBlur={onBlur} style={style}>
<Text style={styles.buttonTitle}>Show PhotoEditor</Text>
</TouchableOpacity>
);
});
return (
<TouchableOpacity ref={ref} onPress={handlePhotoEditor} onFocus={onFocus} onBlur={onBlur} style={style}>
<Text style={styles.buttonTitle}>Show PhotoEditor</Text>
</TouchableOpacity>
);
}
);
Loading
Loading