Switch desktop app to react-native-desktop 0.57.8 (#7264)

This commit is contained in:
Volodymyr Kozieiev 2019-01-17 12:10:40 +02:00 committed by GitHub
parent b51b565cdb
commit 75af3883b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 965 additions and 1190 deletions

3
desktop_files/.babelrc Normal file
View File

@ -0,0 +1,3 @@
{
"presets": ["module:metro-react-native-babel-preset"]
}

View File

@ -50,15 +50,16 @@
"identicon.js": "github:status-im/identicon.js",
"js-sha3": "^0.8.0",
"level-filesystem": "1.2.0",
"metro": "^0.38.1",
"metro": "^0.48.1",
"metro-react-native-babel-preset": "0.45.6",
"nfc-react-native": "github:status-im/nfc-react-native",
"process": "0.11.10",
"prop-types": "15.6.0",
"punycode": "1.4.1",
"querystring-es3": "0.2.1",
"react": "16.4.1",
"react": "16.6.1",
"react-dom": "16.4.2",
"react-native": "git+https://github.com/status-im/react-native-desktop.git#v0.56.1_3",
"react-native": "git+https://github.com/status-im/react-native-desktop.git#v0.57.8_1",
"react-native-background-timer": "2.0.0",
"react-native-camera": "0.10.0",
"react-native-config": "git+https://github.com/status-im/react-native-config.git",

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
patch-package
--- a/node_modules/metro/src/JSTransformer.js
+++ b/node_modules/metro/src/JSTransformer.js
@@ -135,6 +135,7 @@ module.exports = class Transformer {
if (execArgv.length > 0 && execArgv[0].charAt(0) !== '-') {
execArgv.shift();
}
+ execArgv.push("--max-old-space-size=8192");
const env = _extends({},
process.env, {
--- a/node_modules/metro/src/defaults.js
+++ b/node_modules/metro/src/defaults.js
@@ -45,7 +45,7 @@ exports.sourceExts = ['js', 'json'];
exports.moduleSystem = require.resolve('./lib/polyfills/require.js');
-exports.platforms = ['ios', 'android', 'windows', 'web'];
+exports.platforms = ['ios', 'android', 'windows', 'web', 'desktop'];
exports.providesModuleNodeModules = ['react-native', 'react-native-windows'];

View File

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

View File

@ -0,0 +1,12 @@
patch-package
--- a/node_modules/metro-config/src/defaults/defaults.js
+++ b/node_modules/metro-config/src/defaults/defaults.js
@@ -47,7 +47,7 @@ exports.sourceExts = ["js", "json", "ts", "tsx"];
exports.moduleSystem = require.resolve("metro/src/lib/polyfills/require.js");
-exports.platforms = ["ios", "android", "windows", "web"];
+exports.platforms = ["ios", "android", "windows", "web", "desktop"];
exports.providesModuleNodeModules = ["react-native", "react-native-windows"];

View File

@ -30,12 +30,16 @@ fi
scripts/run-environment-check.sh $1
echo "Creating link: package.json -> ${PLATFORM_FOLDER}/package.json.orig "
ln -sf ${PLATFORM_FOLDER}/package.json.orig package.json
ln -sf ${PLATFORM_FOLDER}/package.json.orig package.json
echo "Creating link: yarn.lock -> ${PLATFORM_FOLDER}/yarn.lock"
ln -sf ${PLATFORM_FOLDER}/yarn.lock yarn.lock
ln -sf ${PLATFORM_FOLDER}/yarn.lock yarn.lock
echo "Creating link: VERSION -> ${PLATFORM_FOLDER}/VERSION"
ln -sf ${PLATFORM_FOLDER}/VERSION VERSION
ln -sf ${PLATFORM_FOLDER}/VERSION VERSION
echo "Creating link: .babelrc -> ${PLATFORM_FOLDER}/.babelrc"
ln -sf ${PLATFORM_FOLDER}/.babelrc .babelrc
echo -e "${GREEN}Finished!${NC}"