npm-fetch-changelog
Version:
fetch the changelog for an npm package from GitHub
18 lines (17 loc) • 729 B
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
var _child_process = require("child_process");
var child = (0, _child_process.spawn)(process.execPath, [require.resolve('./npm-fetch-changelog.js')].concat((0, _toConsumableArray2["default"])(process.argv.slice(2)), ['--major']), {
stdio: 'inherit'
});
child.on('error', function (error) {
// eslint-disable-next-line no-console
console.error(error.stack);
process.exit(1);
});
child.on('close', function (code, signal) {
if (code != null) process.exit(code);
process.exit(signal ? 1 : 0);
});