Skip to content

chore: Upgrade react-native to latest version #81

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

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8b722e7
chore: upgrade detox
unikvozm Dec 1, 2020
c9ceecc
chore: rn 0.58.4 -> 0.59.10
unikvozm Dec 1, 2020
98c2bcd
chore: rn 0.59.10 -> 0.60.6 (half way w/o ios)
unikvozm Dec 1, 2020
a82fd7a
fix: android build for 60.6
Dec 4, 2020
0557339
feat: upgrade example
Dec 4, 2020
d9ec36e
fix: detox after update
Dec 5, 2020
4244346
fix: react-native-community/react-native version in ci
unikvozm Dec 7, 2020
fdfb160
fix: detox android
unikvozm Dec 7, 2020
168f087
fix: add node version to circleci
unikvozm Dec 7, 2020
73d7f0b
fix: executor in circleci
unikvozm Dec 7, 2020
99be179
fix: eslint errors
unikvozm Dec 7, 2020
584756d
fix: eslint error
unikvozm Dec 7, 2020
b29aa9a
fix: flow version
unikvozm Dec 7, 2020
b4f14e7
fix: flow errors
unikvozm Dec 8, 2020
79aea00
fix: ci config
unikvozm Dec 8, 2020
6b21b1f
fix: circleci config
unikvozm Dec 8, 2020
766ba18
fix: circleci config
unikvozm Dec 8, 2020
803bac9
fix: circleci config
unikvozm Dec 8, 2020
cf16fdc
fix: circleci config
unikvozm Dec 9, 2020
0bfe954
fix: typo in circleci
unikvozm Dec 9, 2020
2059a19
fix: add node version in executor
unikvozm Dec 9, 2020
2268df6
fix: add node version to executor
unikvozm Dec 9, 2020
5dec103
fix: add downloadDependencies task to gradle
unikvozm Dec 9, 2020
6f57720
fix: remove unnecessary steps
unikvozm Dec 9, 2020
ef3c7a9
fix: upgrade orbs version
unikvozm Dec 9, 2020
e9e2e64
fix: update rn vertion in orbs
unikvozm Dec 9, 2020
ace159b
fix: rn/ios_build_and_test configs
unikvozm Dec 9, 2020
bd77b4b
fix: add detox config to root package.json
unikvozm Dec 9, 2020
602dac8
fix: move detox config to root package
unikvozm Dec 9, 2020
2b0a7f9
fix test:detox:ios:bundle:release
unikvozm Dec 9, 2020
f86f387
fix: detox path
unikvozm Dec 9, 2020
5a130e1
fix: change simulator
unikvozm Dec 9, 2020
207dba2
fix: update podfile
Dec 23, 2020
e6e12e1
change-circle
Dec 23, 2020
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
63 changes: 52 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,58 @@
version: 2.1

orbs:
rn: react-native-community/react-native@1.1.0
rn: react-native-community/react-native@4.4.2

jobs:
checkout_code:
executor: rn/linux_js
executor:
name: rn/linux_js
node_version: '10'
steps:
- checkout
- persist_to_workspace:
root: .
paths: .
paths:
- .
install-dependencies:
executor:
name: rn/linux_js
node_version: '10'
steps:
- attach_workspace:
at: .
- restore_cache:
keys:
- dependencies-{{ .Environment.CACHE_VERSION }}-{{ checksum "package.json" }}
- dependencies-
- restore_cache:
keys:
- dependencies-example-{{ .Environment.CACHE_VERSION }}-{{ checksum "example/package.json" }}
- dependencies-example-
- run:
name: Install dependencies
command: |
yarn install --cwd example --frozen-lockfile
yarn install --frozen-lockfile
- save_cache:
key: dependencies-{{ .Environment.CACHE_VERSION }}-{{ checksum "package.json" }}
paths:
- node_modules
- save_cache:
key: dependencies-example-{{ .Environment.CACHE_VERSION }}-{{ checksum "example/package.json" }}
paths:
- example/node_modules
- persist_to_workspace:
root: .
paths:
- .
analyse:
executor: rn/linux_js
executor:
name: rn/linux_js
node_version: '10'
steps:
- attach_workspace:
at: .
- rn/yarn_install
- run:
name: Lint JS Code (ESLint)
command: yarn run test:eslint
Expand All @@ -38,9 +74,12 @@ workflows:
test:
jobs:
- checkout_code
- analyse:
- install-dependencies:
requires:
- checkout_code
- analyse:
requires:
- install-dependencies
- rn/android_build:
name: build_android_debug
project_path: "example/android"
Expand All @@ -59,12 +98,14 @@ workflows:
requires:
- build_android_release
- rn/ios_build_and_test:
project_path: "example/ios/ImageEditorExample.xcodeproj"
project_type: workspace
project_path: "example/ios/ReactNativeImageEditorExample.xcworkspace"
derived_data_path: "example/ios/build"
device: "iPhone X"
build_configuration: "Release"
scheme: "ImageEditorExample"
detox_configuration: "ios.sim.release"
pod_install_directory: "example/ios"
device: "iPhone 11"
build_configuration: "Debug"
scheme: "ReactNativeImageEditorExample"
detox_configuration: "ios.sim.debug"
detox_loglevel: "trace"
requires:
- analyse
62 changes: 47 additions & 15 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,40 @@
; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js
node_modules/react-native/Libraries/react-native/React.js

; Ignore polyfills
.*/Libraries/polyfills/.*
node_modules/react-native/Libraries/polyfills/.*

; Ignore metro
.*/node_modules/metro/.*
; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
node_modules/warning/.*

; Flow doesn't support platforms
.*/Libraries/Utilities/HMRLoadingView.js
.*/Libraries/StyleSheet/PlatformColorValueTypesIOS.js
.*/Libraries/Utilities/LoadingView.js

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*
.*/node_modules/react-native/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/

[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js

module.system=haste
module.system.haste.use_name_reducers=true
# get basename
Expand All @@ -44,28 +57,47 @@ module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=.*/__tests__/.*
module.system.haste.paths.blacklist=.*/__mocks__/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*

munge_underscores=true

module.name_mapper='\(@react-native-community/image-editor\)' -> '<PROJECT_ROOT>/lib/ImageEditor.js'
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
inexact-spread=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error

[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.86.0
^0.98.0
4 changes: 3 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.4.1'
}
}

Expand All @@ -31,6 +31,8 @@ android {
}

repositories {
google()
jcenter()
mavenCentral()
}

Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions example/.buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

[android]
target = Google Inc.:Google APIs:23

[maven_repositories]
central = https://repo1.maven.org/maven2
1 change: 1 addition & 0 deletions example/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
8 changes: 5 additions & 3 deletions example/.gitignore
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
Expand All @@ -39,8 +38,8 @@ yarn-error.log
# BUCK
buck-out/
\.buckd/
debug.keystore
!release.keystore
*.keystore
!debug.keystore

# fastlane
#
Expand All @@ -55,3 +54,6 @@ debug.keystore

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
1 change: 1 addition & 0 deletions example/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
14 changes: 0 additions & 14 deletions example/__tests__/App.js

This file was deleted.

4 changes: 2 additions & 2 deletions example/android/app/BUCK → example/android/app/_BUCK
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ android_library(

android_build_config(
name = "build_config",
package = "com.imageeditorexample",
package = "com.reactnativeimageeditorexample",
)

android_resource(
name = "res",
package = "com.imageeditorexample",
package = "com.reactnativeimageeditorexample",
res = "src/main/res",
)

Expand Down
Loading