Skip to content

Commit a5f2c24

Browse files
committed
chore: bump react-native to 0.64
1 parent 385ddc4 commit a5f2c24

File tree

6 files changed

+1669
-2749
lines changed

6 files changed

+1669
-2749
lines changed

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: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,17 @@
4141
"format:c": "clang-format -i $(git ls-files '*.cpp' '*.h' '*.m' '*.mm')",
4242
"format:js": "prettier --write $(git ls-files '*.js' '*.json' '*.yml')",
4343
"prepare": "bob build",
44-
"start": "node node_modules/react-native/local-cli/cli.js start",
44+
"start": "react-native start",
4545
"start:android": "react-native run-android --root example/",
4646
"start:ios": "react-native run-ios --project-path example/ios --scheme AsyncStorageExample",
4747
"start:web": "expo start:web",
48-
"start:macos": "react-native start --use-react-native-macos",
4948
"start:windows": "react-native start --use-react-native-windows",
5049
"build:e2e:android": "scripts/android_e2e.sh 'build'",
5150
"build:e2e:ios": "scripts/ios_e2e.sh 'build'",
5251
"build:e2e:macos": "scripts/macos_e2e.sh 'build'",
5352
"bundle:android": "scripts/android_e2e.sh 'bundle'",
5453
"bundle:ios": "scripts/ios_e2e.sh 'bundle'",
55-
"bundle:macos": "react-native bundle --entry-file index.js --platform macos --bundle-output example/index.macos.jsbundle --use-react-native-macos",
54+
"bundle:macos": "react-native bundle --entry-file index.js --platform macos --bundle-output example/index.macos.jsbundle",
5655
"test": "yarn test:lint && yarn test:flow",
5756
"test:flow": "flow check",
5857
"test:lint": "eslint src/**/*.js example/**/*.js jest/*.js",
@@ -64,36 +63,33 @@
6463
"merge-options": "^3.0.4"
6564
},
6665
"peerDependencies": {
67-
"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"
66+
"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"
6867
},
6968
"devDependencies": {
70-
"@babel/core": "^7.8.4",
71-
"@babel/runtime": "^7.8.4",
72-
"@expo/webpack-config": "^0.12.0",
73-
"@react-native-community/cli": "^4.10.0",
74-
"@react-native-community/cli-platform-android": "^4.10.0",
75-
"@react-native-community/cli-platform-ios": "^4.10.0",
69+
"@babel/core": "^7.12.0",
70+
"@babel/preset-env": "^7.1.6",
71+
"@expo/webpack-config": "^0.16.0",
72+
"@react-native-community/cli": "^5.0.0",
73+
"@react-native-community/cli-platform-android": "^5.0.0",
74+
"@react-native-community/cli-platform-ios": "^5.0.0",
7675
"@react-native-community/eslint-config": "^3.0.0",
7776
"@semantic-release/changelog": "^5.0.1",
7877
"@semantic-release/git": "9.0.0",
7978
"detox": "17.10.6",
8079
"eslint": "^7.0.0",
81-
"expo": "^38.0.10",
82-
"flow-bin": "^0.122.0",
80+
"expo": "^43.0.0",
81+
"flow-bin": "^0.137.0",
8382
"jest": "^26.5.3",
8483
"jest-circus": "^26.6.1",
85-
"metro": "^0.59.0",
86-
"metro-config": "^0.59.0",
87-
"metro-react-native-babel-preset": "^0.59.0",
88-
"react": "16.13.1",
89-
"react-dom": "16.13.1",
90-
"react-native": "0.63.4",
84+
"react": "17.0.1",
85+
"react-dom": "17.0.1",
86+
"react-native": "^0.64.0",
9187
"react-native-builder-bob": "^0.18.0",
92-
"react-native-macos": "^0.63.4",
93-
"react-native-test-app": "^0.9.5",
94-
"react-native-web": "~0.12.0",
95-
"react-native-windows": "^0.63.41",
96-
"react-test-renderer": "16.13.1",
88+
"react-native-macos": "^0.64.0",
89+
"react-native-test-app": "^0.9.16",
90+
"react-native-web": "^0.17.0",
91+
"react-native-windows": "^0.64.0",
92+
"react-test-renderer": "17.0.1",
9793
"semantic-release": "^17.4.6"
9894
},
9995
"jest": {

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)