diff --git a/lib/Config.js b/lib/Config.js index d92b269..601c5fb 100644 --- a/lib/Config.js +++ b/lib/Config.js @@ -25,16 +25,27 @@ // parameter, but not in the version packaged with React Native 0.56. So for now, we // have to overwrite that file locally to not do that. This will maintain compatibility // with React Native. - fs.writeFileSync(local_path + 'react-native/node_modules/metro/src/node-haste/Package.js', + try { + fs.writeFileSync(local_path + 'react-native/node_modules/metro/src/node-haste/Package.js', + fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/Package.js')) + ); + } catch (e) {} + fs.writeFileSync(local_path + 'metro/src/node-haste/Package.js', fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/Package.js')) ); // Similarly, there is no good way to save the system `require()` before metro overwrites // it. Plus metro does not handle cyclic dependencies well at all. We fix these by // using our own implementation of metroRequire. - fs.writeFileSync(local_path + 'react-native/node_modules/metro/src/defaults.js', - fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/defaults.js')) - ); + try { + fs.writeFileSync(local_path + 'react-native/node_modules/metro/src/defaults.js', + fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/defaults.js')) + ); + } catch (e) { + fs.writeFileSync(local_path + 'metro/src/defaults.js', + fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/defaults.js')) + ); + } const configure = (config) => { // Do not add all the react-native junk by default. This needs to be done diff --git a/lib/pod.js b/lib/pod.js index db9e9b5..f8c58d5 100644 --- a/lib/pod.js +++ b/lib/pod.js @@ -93,6 +93,7 @@ const Specs = 'https://github.com/LiquidPlayer/Specs.git' console.warn("WARN: '%s' does not exist, skipping", ipath) } } else { + if (ios.version === undefined) ios.version = package.version pods.push(ios) } } diff --git a/package-lock.json b/package-lock.json index 63cde19..e87aca0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "liquidcore-cli", - "version": "0.4.2", + "version": "0.4.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c48e781..3f88f42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "liquidcore-cli", - "version": "0.4.2", + "version": "0.4.3", "description": "Command line utilities for LiquidCore", "main": "index.js", "scripts": {