Skip to content

Commit 125f9cc

Browse files
committed
chore: upgrade example to [email protected]
1 parent 2964acf commit 125f9cc

File tree

19 files changed

+1096
-1070
lines changed

19 files changed

+1096
-1070
lines changed
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
2-
root: true,
3-
extends: '@react-native-community',
4-
rules: {
5-
semi: ['error', 'never'],
6-
},
2+
root: true,
3+
extends: '@react-native-community',
4+
rules: {
5+
semi: ['error', 'never'],
6+
},
77
}

ReactNativeFastImageExample/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ build/
2828
.gradle
2929
local.properties
3030
*.iml
31+
*.hprof
3132

3233
# node.js
3334
#
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

ReactNativeFastImageExample/android/app/build.gradle

+5-6
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,6 @@ android {
125125

126126
compileSdkVersion rootProject.ext.compileSdkVersion
127127

128-
compileOptions {
129-
sourceCompatibility JavaVersion.VERSION_1_8
130-
targetCompatibility JavaVersion.VERSION_1_8
131-
}
132-
133128
defaultConfig {
134129
applicationId "com.reactnativefastimageexample"
135130
minSdkVersion rootProject.ext.minSdkVersion
@@ -215,9 +210,13 @@ dependencies {
215210
// Run this once to be able to run the application with BUCK
216211
// puts all compile dependencies into folder libs for BUCK to use
217212
task copyDownloadableDepsToLibs(type: Copy) {
218-
from configurations.compile
213+
from configurations.implementation
219214
into 'libs'
220215
}
221216

222217
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
218+
project.ext.vectoricons = [
219+
iconFontNames: [ 'Ionicons.ttf'] // Name of the font files you want to copy
220+
]
221+
223222
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

ReactNativeFastImageExample/android/build.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "29.0.3"
5+
buildToolsVersion = "30.0.2"
66
minSdkVersion = 21
7-
compileSdkVersion = 29
8-
targetSdkVersion = 29
7+
compileSdkVersion = 30
8+
targetSdkVersion = 30
99
ndkVersion = "20.1.5948944"
1010
}
1111
repositories {
1212
google()
13-
jcenter()
13+
mavenCentral()
1414
}
1515
dependencies {
16-
classpath("com.android.tools.build:gradle:4.1.0")
16+
classpath("com.android.tools.build:gradle:4.2.1")
1717
// NOTE: Do not place your application dependencies here; they belong
1818
// in the individual module build.gradle files
1919
}
2020
}
2121

2222
allprojects {
2323
repositories {
24+
mavenCentral()
2425
mavenLocal()
2526
maven {
2627
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -32,7 +33,6 @@ allprojects {
3233
}
3334

3435
google()
35-
jcenter()
3636
maven { url 'https://www.jitpack.io' }
3737
}
3838
}

ReactNativeFastImageExample/android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ android.useAndroidX=true
2525
android.enableJetifier=true
2626

2727
# Version of flipper SDK to use with React Native
28-
FLIPPER_VERSION=0.75.1
28+
FLIPPER_VERSION=0.93.0
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

ReactNativeFastImageExample/app.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "ReactNativeFastImageExample",
3-
"displayName": "ReactNativeFastImageExample"
4-
}
2+
"name": "ReactNativeFastImageExample",
3+
"displayName": "ReactNativeFastImageExample"
4+
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ['module:metro-react-native-babel-preset'],
2+
presets: ['module:metro-react-native-babel-preset'],
33
}

ReactNativeFastImageExample/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* @format
33
*/
44

5-
import 'react-native-gesture-handler'
65
import { AppRegistry } from 'react-native'
76
import App from './src'
87
import { name as appName } from './app.json'

ReactNativeFastImageExample/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require_relative '../node_modules/react-native/scripts/react_native_pods'
22
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
33

4-
platform :ios, '10.0'
4+
platform :ios, '11.0'
55

66
target 'ReactNativeFastImageExample' do
77
config = use_native_modules!

ReactNativeFastImageExample/ios/ReactNativeFastImageExample.xcodeproj/project.pbxproj

+59-60
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

ReactNativeFastImageExample/metro.config.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
*/
77

88
module.exports = {
9-
transformer: {
10-
getTransformOptions: async () => ({
11-
transform: {
12-
experimentalImportSupport: false,
13-
inlineRequires: true,
14-
},
15-
}),
16-
},
17-
};
9+
transformer: {
10+
getTransformOptions: async () => ({
11+
transform: {
12+
experimentalImportSupport: false,
13+
inlineRequires: true,
14+
},
15+
}),
16+
},
17+
}
+56-56
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
{
2-
"name": "reactnativefastimageexample",
3-
"version": "0.0.1",
4-
"private": true,
5-
"scripts": {
6-
"android": "react-native run-android",
7-
"ios": "react-native run-ios",
8-
"start": "react-native start",
9-
"test": "jest",
10-
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
11-
},
12-
"jest": {
13-
"moduleFileExtensions": [
14-
"ts",
15-
"tsx",
16-
"js",
17-
"jsx",
18-
"json",
19-
"node"
20-
],
21-
"preset": "react-native"
22-
},
23-
"resolutions": {
24-
"@types/react": "^17"
25-
},
26-
"dependencies": {
27-
"@react-native-community/masked-view": "^0.1.7",
28-
"@react-navigation/bottom-tabs": "^5.1.0",
29-
"@react-navigation/native": "^5.0.8",
30-
"@react-navigation/stack": "^5.1.0",
31-
"react": "17.0.1",
32-
"react-native": "0.64.1",
33-
"react-native-fast-image": "^8.1.3",
34-
"react-native-gesture-handler": "^1.6.0",
35-
"react-native-image-picker": "^4.0.6",
36-
"react-native-image-progress": "^1.1.1",
37-
"react-native-reanimated": "^1.7.0",
38-
"react-native-safe-area-context": "^0.7.3",
39-
"react-native-screens": "^2.2.0",
40-
"react-native-status-bar-height": "^2.1.0",
41-
"react-native-vector-icons": "^8.1.0",
42-
"react-timeout": "^1.1.2"
43-
},
44-
"devDependencies": {
45-
"@babel/core": "^7.12.9",
46-
"@babel/runtime": "^7.12.5",
47-
"@react-native-community/eslint-config": "^2.0.0",
48-
"@types/jest": "^26.0.23",
49-
"@types/react-native": "^0.64.5",
50-
"@types/react-test-renderer": "^16.9.2",
51-
"babel-jest": "^26.6.3",
52-
"eslint": "^7.14.0",
53-
"jest": "^26.6.3",
54-
"metro-react-native-babel-preset": "^0.64.0",
55-
"react-test-renderer": "17.0.1",
56-
"typescript": "^3.8.3"
57-
}
2+
"name": "reactnativefastimageexample",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"android": "react-native run-android",
7+
"ios": "react-native run-ios",
8+
"start": "react-native start",
9+
"test": "jest",
10+
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
11+
},
12+
"jest": {
13+
"moduleFileExtensions": [
14+
"ts",
15+
"tsx",
16+
"js",
17+
"jsx",
18+
"json",
19+
"node"
20+
],
21+
"preset": "react-native"
22+
},
23+
"resolutions": {
24+
"@types/react": "^17"
25+
},
26+
"dependencies": {
27+
"@react-native-community/masked-view": "^0.1.7",
28+
"@react-navigation/bottom-tabs": "^6.0.5",
29+
"@react-navigation/native": "^6.0.2",
30+
"@react-navigation/stack": "^6.0.7",
31+
"react": "17.0.2",
32+
"react-native": "0.65.1",
33+
"react-native-fast-image": "^8.1.3",
34+
"react-native-gesture-handler": "^1.6.0",
35+
"react-native-image-picker": "^4.0.6",
36+
"react-native-image-progress": "^1.1.1",
37+
"react-native-reanimated": "^2.2.2",
38+
"react-native-safe-area-context": "^3.3.2",
39+
"react-native-screens": "^3.7.2",
40+
"react-native-status-bar-height": "^2.1.0",
41+
"react-native-vector-icons": "^8.1.0"
42+
},
43+
"devDependencies": {
44+
"@babel/core": "^7.12.9",
45+
"@babel/runtime": "^7.12.5",
46+
"@react-native-community/eslint-config": "^2.0.0",
47+
"@types/jest": "^26.0.23",
48+
"@types/react-native": "^0.65.0",
49+
"@types/react-test-renderer": "^17.0.1",
50+
"babel-jest": "^26.6.3",
51+
"eslint": "^7.14.0",
52+
"jest": "^26.6.3",
53+
"metro-react-native-babel-preset": "^0.66.0",
54+
"react-native-codegen": "^0.0.7",
55+
"react-test-renderer": "17.0.2",
56+
"typescript": "^3.8.3"
57+
}
5858
}

ReactNativeFastImageExample/src/LocalImagesExample.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import FastImage, { FastImageProps, Source } from 'react-native-fast-image'
1111
import Section from './Section'
1212
import FeatureText from './FeatureText'
1313
import FieldsBase64 from './images/fields'
14-
import {launchImageLibrary} from 'react-native-image-picker'
14+
import { launchImageLibrary } from 'react-native-image-picker'
1515
import BulletText from './BulletText'
1616

1717
// @ts-ignore
@@ -51,7 +51,7 @@ class PhotoExample extends Component<{}, PhotoExampleState> {
5151
state: PhotoExampleState = {}
5252

5353
pick = () => {
54-
launchImageLibrary({mediaType: 'photo'}, (response) => {
54+
launchImageLibrary({ mediaType: 'photo' }, (response) => {
5555
if (response.didCancel) {
5656
console.log('ImagePicker - User cancelled.')
5757
} else if (response.errorCode) {

ReactNativeFastImageExample/src/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LogBox.ignoreLogs([
1717
export default function App() {
1818
return (
1919
<NavigationContainer>
20-
<Tab.Navigator>
20+
<Tab.Navigator screenOptions={{ headerShown: false }}>
2121
<Tab.Screen
2222
name="FastImage Example"
2323
component={FastImageExamples}

0 commit comments

Comments
 (0)