Skip to content

Commit

Permalink
Version 0.4.3
Browse files Browse the repository at this point in the history
- Fixed issue with overwriting the correct metro code
- Allow ios release to use package.json version
  • Loading branch information
ericwlange committed Feb 1, 2019
1 parent fe3c036 commit 06aa262
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
19 changes: 15 additions & 4 deletions lib/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/pod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 06aa262

Please sign in to comment.