Browse Source

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

tags/0.9.33-mobile
Volodymyr Kozieiev 7 months ago
parent
commit
75af3883b8
No account linked to committer's email address

+ 3
- 0
desktop_files/.babelrc View File

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

+ 4
- 3
desktop_files/package.json.orig 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",

+ 926
- 1160
desktop_files/yarn.lock
File diff suppressed because it is too large
View File


.babelrc → mobile_files/.babelrc View File


+ 0
- 22
patches/metro+0.38.4.patch 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'];

+ 11
- 0
patches/metro+0.48.5.patch 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.

+ 12
- 0
patches/metro-config+0.48.5.patch 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"];

+ 7
- 3
scripts/prepare-for-platform.sh 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}"

Loading…
Cancel
Save