cordova-coho
Advanced tools
Comparing version 1.0.2-nightly.2019.5.21.b5ab1ac6 to 1.0.2-nightly.2019.5.22.c92b8a5a
@@ -39,2 +39,4 @@ <!-- | ||
**Does not apply since Cordova 9 (cordova-common@3.1.0):** | ||
The most important rule is that packages such as `cordova-lib` and `cordova-cli` should not use multiple versions of `cordova-common` through the chain of dependencies. This rule is due to the use of multiple singletons in `cordova-common`. This means that if `cordova-common` is updated it should be released before other packages such as `cordova-fetch`, `cordova-create`, `cordova-lib`, `cordova-cli`, etc. | ||
@@ -41,0 +43,0 @@ |
{ | ||
"name": "cordova-coho", | ||
"version": "1.0.2-nightly.2019.5.21.b5ab1ac6", | ||
"version": "1.0.2-nightly.2019.5.22.c92b8a5a", | ||
"description": "Apache Cordova release tool", | ||
@@ -5,0 +5,0 @@ "main": "./coho", |
@@ -20,25 +20,15 @@ /* | ||
var executil = require('./executil'); | ||
// Verify that npm install was run before importing anything else | ||
require('./check-npm-install-util'); | ||
try { | ||
var co = require('co'); | ||
var optimist = require('optimist'); | ||
// Ensure npm install has been run. | ||
Object.keys(require('../package').dependencies).forEach(require); | ||
} catch (e) { | ||
console.log('Please run "npm install" from this directory:\n\t' + __dirname); // eslint-disable-line no-path-concat | ||
process.exit(2); | ||
} | ||
var apputil = require('./apputil'); | ||
const co = require('co'); | ||
const optimist = require('optimist'); | ||
function * lazyRequire (name, opt_prop) { | ||
if (opt_prop) { | ||
yield require(name)[opt_prop]; | ||
} else { | ||
yield require(name); | ||
} | ||
} | ||
const executil = require('./executil'); | ||
const apputil = require('./apputil'); | ||
const lazyRequire = require('./lazy-require-util'); | ||
module.exports = function () { | ||
var repoCommands = [ | ||
const repoCommands = [ | ||
{ | ||
@@ -73,3 +63,4 @@ name: 'repo-clone', | ||
}]; | ||
var releaseCommands = [{ | ||
const releaseCommands = [{ | ||
name: 'prepare-platform-release-branch', | ||
@@ -135,3 +126,4 @@ desc: 'Branches, updates JS, updates VERSION. Safe to run multiple times.', | ||
}]; | ||
var otherCommands = [{ | ||
const otherCommands = [{ | ||
name: 'list-pulls', | ||
@@ -177,5 +169,5 @@ desc: 'Shows a list of GitHub pull requests for all specified repositories.', | ||
} | ||
} | ||
]; | ||
var commandMap = {}; | ||
}]; | ||
const commandMap = {}; | ||
function addToCommandMap (cmd) { | ||
@@ -190,3 +182,3 @@ commandMap[cmd.name] = cmd; | ||
var usage = 'Usage: $0 command [options]\n\n'; | ||
let usage = 'Usage: $0 command [options]\n\n'; | ||
function addCommandUsage (cmd) { | ||
@@ -211,4 +203,5 @@ usage += ' ' + cmd.name + ': ' + cmd.desc + '\n'; | ||
var command = commandMap[optimist.argv._[0]]; | ||
var opts = optimist | ||
const command = commandMap[optimist.argv._[0]]; | ||
let opts = optimist | ||
.usage(usage) | ||
@@ -241,4 +234,5 @@ .options('verbose', { | ||
} | ||
var argv = opts.check(function (argv) { | ||
var commandName = argv._[0]; | ||
const argv = opts.check(function (argv) { | ||
const commandName = argv._[0]; | ||
if (!commandName) { | ||
@@ -254,2 +248,3 @@ throw 'No command specified.'; | ||
}).argv; | ||
if (!command.noChdir) { | ||
@@ -265,4 +260,5 @@ // Change directory to be a sibling of coho. | ||
} | ||
var entry = command.entryPoint; | ||
const entry = command.entryPoint; | ||
co(entry).then(); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
456890
81
6492