Skip to content

Commit 06aa262

Browse files
author
Eric Lange
committed
Version 0.4.3
- Fixed issue with overwriting the correct metro code - Allow ios release to use package.json version
1 parent fe3c036 commit 06aa262

4 files changed

Lines changed: 18 additions & 6 deletions

File tree

lib/Config.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,27 @@
2525
// parameter, but not in the version packaged with React Native 0.56. So for now, we
2626
// have to overwrite that file locally to not do that. This will maintain compatibility
2727
// with React Native.
28-
fs.writeFileSync(local_path + 'react-native/node_modules/metro/src/node-haste/Package.js',
28+
try {
29+
fs.writeFileSync(local_path + 'react-native/node_modules/metro/src/node-haste/Package.js',
30+
fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/Package.js'))
31+
);
32+
} catch (e) {}
33+
fs.writeFileSync(local_path + 'metro/src/node-haste/Package.js',
2934
fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/Package.js'))
3035
);
3136

3237
// Similarly, there is no good way to save the system `require()` before metro overwrites
3338
// it. Plus metro does not handle cyclic dependencies well at all. We fix these by
3439
// using our own implementation of metroRequire.
35-
fs.writeFileSync(local_path + 'react-native/node_modules/metro/src/defaults.js',
36-
fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/defaults.js'))
37-
);
40+
try {
41+
fs.writeFileSync(local_path + 'react-native/node_modules/metro/src/defaults.js',
42+
fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/defaults.js'))
43+
);
44+
} catch (e) {
45+
fs.writeFileSync(local_path + 'metro/src/defaults.js',
46+
fs.readFileSync(path.resolve(__dirname, 'metro-polyfill/defaults.js'))
47+
);
48+
}
3849

3950
const configure = (config) => {
4051
// Do not add all the react-native junk by default. This needs to be done

lib/pod.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ const Specs = 'https://github.com/LiquidPlayer/Specs.git'
9393
console.warn("WARN: '%s' does not exist, skipping", ipath)
9494
}
9595
} else {
96+
if (ios.version === undefined) ios.version = package.version
9697
pods.push(ios)
9798
}
9899
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "liquidcore-cli",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "Command line utilities for LiquidCore",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)