Skip to content

Commit a131c85

Browse files
committed
chore: bump react-native to 0.64
1 parent b2fd630 commit a131c85

File tree

8 files changed

+1683
-2771
lines changed

8 files changed

+1683
-2771
lines changed

.flowconfig

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
; Ignore polyfills
1212
node_modules/react-native/Libraries/polyfills/.*
1313

14-
; These should not be required directly
15-
; require from fbjs/lib instead: require('fbjs/lib/warning')
16-
node_modules/warning/.*
17-
1814
; Flow doesn't support platforms
1915
.*/Libraries/Utilities/LoadingView.js
2016

@@ -52,10 +48,6 @@ suppress_type=$FlowFixMe
5248
suppress_type=$FlowFixMeProps
5349
suppress_type=$FlowFixMeState
5450

55-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
56-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
57-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
58-
5951
[lints]
6052
sketchy-null-number=warn
6153
sketchy-null-mixed=warn
@@ -66,7 +58,6 @@ deprecated-type=warn
6658
unsafe-getters-setters=warn
6759
unnecessary-invariant=warn
6860
signature-verification-failure=warn
69-
deprecated-utility=error
7061

7162
[strict]
7263
deprecated-type
@@ -78,4 +69,4 @@ untyped-import
7869
untyped-type-import
7970

8071
[version]
81-
^0.122.0
72+
^0.137.0

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"expo": {
33
"entryPoint": "./example/index"
44
}
5-
}
5+
}

metro.config.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,24 @@
33
* integration tests during local development or on CI services.
44
*/
55

6-
const blacklist = require('metro-config/src/defaults/blacklist');
6+
const exclusionList = require("metro-config/src/defaults/exclusionList");
7+
const path = require("path");
78

89
module.exports = {
910
projectRoot: `${__dirname}/example`,
1011
watchFolders: [__dirname],
1112
resolver: {
12-
blacklistRE: blacklist([/node_modules\/react-native-macos\/.*/])
13+
blockList: exclusionList([
14+
// This stops "react-native run-windows" from causing the metro server to crash if its already running
15+
new RegExp(
16+
`${path
17+
.resolve(__dirname, 'example', 'windows')
18+
.replace(/[/\\]/g, '/')}.*`,
19+
),
20+
21+
// Workaround for `EBUSY: resource busy or locked, open '~\msbuild.ProjectImports.zip'`
22+
// when building with `yarn windows --release`
23+
/.*\.ProjectImports\.zip/,
24+
])
1325
},
1426
};

metro.config.macos.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

metro.config.windows.js

Lines changed: 0 additions & 56 deletions
This file was deleted.

package.json

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@
4242
"format:c": "clang-format -i $(git ls-files '*.cpp' '*.h' '*.m' '*.mm')",
4343
"format:js": "prettier --write $(git ls-files '*.js' '*.json' '*.yml')",
4444
"prepare": "bob build",
45-
"start": "node node_modules/react-native/local-cli/cli.js start",
45+
"start": "react-native start",
4646
"start:android": "react-native run-android --root example/",
47-
"start:ios": "react-native run-ios --project-path example/ios --scheme AsyncStorageExample",
47+
"start:ios": "react-native run-ios --project-path example/ios",
48+
"start:macos": "react-native run-macos --project-path example/macos --scheme AsyncStorageExample",
4849
"start:web": "expo start:web",
49-
"start:macos": "react-native start --use-react-native-macos",
5050
"start:windows": "react-native start --use-react-native-windows",
5151
"build:e2e:android": "scripts/android_e2e.sh 'build'",
5252
"build:e2e:ios": "scripts/ios_e2e.sh 'build'",
5353
"build:e2e:macos": "scripts/macos_e2e.sh 'build'",
5454
"bundle:android": "scripts/android_e2e.sh 'bundle'",
5555
"bundle:ios": "scripts/ios_e2e.sh 'bundle'",
56-
"bundle:macos": "react-native bundle --entry-file index.ts --platform macos --bundle-output example/index.macos.jsbundle --use-react-native-macos",
56+
"bundle:macos": "react-native bundle --entry-file index.ts --platform macos --bundle-output example/index.macos.jsbundle",
5757
"test": "concurrently -n flow,lint,ts yarn:test:flow yarn:test:lint yarn:test:ts",
5858
"test:flow": "flow check",
5959
"test:lint": "eslint src/**/*.js example/**/*.js jest/*.js",
@@ -66,15 +66,15 @@
6666
"merge-options": "^3.0.4"
6767
},
6868
"peerDependencies": {
69-
"react-native": "^0.0.0-0 || ^0.60.6 || ^0.61.5 || ^0.62.2 || ^0.63.2 || ^0.64.0 || ^0.65.0 || ^0.66.0 || 1000.0.0"
69+
"react-native": "^0.0.0-0 || ^0.60.6 || ^0.61.5 || ^0.62.2 || ^0.63.2 || ^0.64.0 || ^0.65.0 || ^0.66.0 || ^0.67.0 || 1000.0.0"
7070
},
7171
"devDependencies": {
72-
"@babel/core": "^7.8.4",
73-
"@babel/runtime": "^7.8.4",
74-
"@expo/webpack-config": "^0.12.0",
75-
"@react-native-community/cli": "^4.10.0",
76-
"@react-native-community/cli-platform-android": "^4.10.0",
77-
"@react-native-community/cli-platform-ios": "^4.10.0",
72+
"@babel/core": "^7.12.0",
73+
"@babel/preset-env": "^7.1.6",
74+
"@expo/webpack-config": "^0.16.0",
75+
"@react-native-community/cli": "^5.0.0",
76+
"@react-native-community/cli-platform-android": "^5.0.0",
77+
"@react-native-community/cli-platform-ios": "^5.0.0",
7878
"@react-native-community/eslint-config": "^3.0.0",
7979
"@semantic-release/changelog": "^5.0.1",
8080
"@semantic-release/git": "9.0.0",
@@ -83,22 +83,19 @@
8383
"concurrently": "^6.4.0",
8484
"detox": "17.10.6",
8585
"eslint": "^7.0.0",
86-
"expo": "^38.0.10",
87-
"flow-bin": "^0.122.0",
86+
"expo": "^43.0.0",
87+
"flow-bin": "^0.137.0",
8888
"jest": "^26.5.3",
8989
"jest-circus": "^26.6.1",
90-
"metro": "^0.59.0",
91-
"metro-config": "^0.59.0",
92-
"metro-react-native-babel-preset": "^0.59.0",
93-
"react": "16.13.1",
94-
"react-dom": "16.13.1",
95-
"react-native": "0.63.4",
90+
"react": "17.0.1",
91+
"react-dom": "17.0.1",
92+
"react-native": "^0.64.0",
9693
"react-native-builder-bob": "^0.18.0",
97-
"react-native-macos": "^0.63.4",
98-
"react-native-test-app": "^0.9.5",
99-
"react-native-web": "~0.12.0",
100-
"react-native-windows": "^0.63.41",
101-
"react-test-renderer": "16.13.1",
94+
"react-native-macos": "^0.64.0",
95+
"react-native-test-app": "^0.9.16",
96+
"react-native-web": "^0.17.0",
97+
"react-native-windows": "^0.64.0",
98+
"react-test-renderer": "17.0.1",
10299
"semantic-release": "^17.4.6",
103100
"typescript": "^4.5.0"
104101
},

react-native.config.js

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717

1818
const path = require('path');
1919

20-
const macSwitch = '--use-react-native-macos';
21-
const windowsSwitch = '--use-react-native-windows';
22-
2320
const dependencies = {
2421
'@react-native-async-storage/async-storage': {
2522
root: __dirname,
@@ -38,24 +35,22 @@ const dependencies = {
3835
windows: null,
3936
},
4037
},
38+
// We don't use Expo in our test apps
39+
'expo': {
40+
platforms: {
41+
android: null,
42+
ios: null,
43+
macos: null,
44+
windows: null,
45+
},
46+
},
4147
};
4248

43-
if (process.argv.includes(macSwitch)) {
44-
process.argv = process.argv.filter((arg) => arg !== macSwitch);
45-
process.argv.push('--config=metro.config.macos.js');
46-
module.exports = {
47-
dependencies,
48-
reactNativePath: path.join('node_modules', 'react-native-macos'),
49-
};
50-
} else if (
51-
process.argv.includes(windowsSwitch) ||
49+
if (
50+
process.argv.includes('--use-react-native-windows') ||
5251
process.argv.includes('autolink-windows') ||
5352
process.argv.includes('run-windows')
5453
) {
55-
if (process.argv.includes(windowsSwitch)) {
56-
process.argv = process.argv.filter((arg) => arg !== windowsSwitch);
57-
process.argv.push('--config=./metro.config.windows.js');
58-
}
5954
const sourceDir = path.join('example', 'windows');
6055
module.exports = {
6156
dependencies,

0 commit comments

Comments
 (0)