Skip to content

Commit 75af388

Browse files
authored
Switch desktop app to react-native-desktop 0.57.8 (#7264)
1 parent b51b565 commit 75af388

File tree

8 files changed

+963
-1188
lines changed

8 files changed

+963
-1188
lines changed

desktop_files/.babelrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["module:metro-react-native-babel-preset"]
3+
}

desktop_files/package.json.orig

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,16 @@
5050
"identicon.js": "github:status-im/identicon.js",
5151
"js-sha3": "^0.8.0",
5252
"level-filesystem": "1.2.0",
53-
"metro": "^0.38.1",
53+
"metro": "^0.48.1",
54+
"metro-react-native-babel-preset": "0.45.6",
5455
"nfc-react-native": "github:status-im/nfc-react-native",
5556
"process": "0.11.10",
5657
"prop-types": "15.6.0",
5758
"punycode": "1.4.1",
5859
"querystring-es3": "0.2.1",
59-
"react": "16.4.1",
60+
"react": "16.6.1",
6061
"react-dom": "16.4.2",
61-
"react-native": "git+https://github.com/status-im/react-native-desktop.git#v0.56.1_3",
62+
"react-native": "git+https://github.com/status-im/react-native-desktop.git#v0.57.8_1",
6263
"react-native-background-timer": "2.0.0",
6364
"react-native-camera": "0.10.0",
6465
"react-native-config": "git+https://github.com/status-im/react-native-config.git",

desktop_files/yarn.lock

+926-1,160
Large diffs are not rendered by default.
File renamed without changes.

patches/metro+0.38.4.patch

-22
This file was deleted.

patches/metro+0.48.5.patch

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
patch-package
2+
--- a/node_modules/metro/src/DeltaBundler/WorkerFarm.js
3+
+++ b/node_modules/metro/src/DeltaBundler/WorkerFarm.js
4+
@@ -130,6 +130,7 @@ class WorkerFarm {
5+
if (execArgv.length > 0 && execArgv[0].charAt(0) !== "-") {
6+
execArgv.shift();
7+
}
8+
+ execArgv.push("--max-old-space-size=8192");
9+
10+
const env = _extends({}, process.env, {
11+
// Force color to print syntax highlighted code frames.

patches/metro-config+0.48.5.patch

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
patch-package
2+
--- a/node_modules/metro-config/src/defaults/defaults.js
3+
+++ b/node_modules/metro-config/src/defaults/defaults.js
4+
@@ -47,7 +47,7 @@ exports.sourceExts = ["js", "json", "ts", "tsx"];
5+
6+
exports.moduleSystem = require.resolve("metro/src/lib/polyfills/require.js");
7+
8+
-exports.platforms = ["ios", "android", "windows", "web"];
9+
+exports.platforms = ["ios", "android", "windows", "web", "desktop"];
10+
11+
exports.providesModuleNodeModules = ["react-native", "react-native-windows"];
12+

scripts/prepare-for-platform.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ fi
3030
scripts/run-environment-check.sh $1
3131

3232
echo "Creating link: package.json -> ${PLATFORM_FOLDER}/package.json.orig "
33-
ln -sf ${PLATFORM_FOLDER}/package.json.orig package.json
33+
ln -sf ${PLATFORM_FOLDER}/package.json.orig package.json
3434

3535
echo "Creating link: yarn.lock -> ${PLATFORM_FOLDER}/yarn.lock"
36-
ln -sf ${PLATFORM_FOLDER}/yarn.lock yarn.lock
36+
ln -sf ${PLATFORM_FOLDER}/yarn.lock yarn.lock
3737

3838
echo "Creating link: VERSION -> ${PLATFORM_FOLDER}/VERSION"
39-
ln -sf ${PLATFORM_FOLDER}/VERSION VERSION
39+
ln -sf ${PLATFORM_FOLDER}/VERSION VERSION
40+
41+
echo "Creating link: .babelrc -> ${PLATFORM_FOLDER}/.babelrc"
42+
ln -sf ${PLATFORM_FOLDER}/.babelrc .babelrc
43+
4044

4145
echo -e "${GREEN}Finished!${NC}"

0 commit comments

Comments
 (0)