Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova CLI Release Preparation (Cordova 9) #414

Merged
merged 12 commits into from
Mar 20, 2019
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@
],
"dependencies": {
"configstore": "^4.0.0",
"cordova-common": "^2.2.0",
"cordova-lib": "8.0.0",
"editor": "1.0.0",
"cordova-common": "^3.1.0",
"cordova-lib": "^9.0.0",
"editor": "^1.0.0",
"insight": "^0.10.1",
"loud-rejection": "^1.6.0",
"loud-rejection": "^2.0.0",
"nopt": "^4.0.1",
"update-notifier": "^2.5.0"
},
"devDependencies": {
"eslint": "^5.4.0",
"eslint-config-semistandard": "^12.0.1",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.0.0",
"eslint": "^5.15.2",
"eslint-config-semistandard": "^13.0.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"istanbul": "^0.4.5",
"jasmine": "^3.1.0",
"jasmine": "^3.3.1",
"rewire": "^4.0.1"
},
"author": "Anis Kadri",
Expand Down
16 changes: 16 additions & 0 deletions spec/cli.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@
const fs = require('fs');
const path = require('path');
const rewire = require('rewire');
/*
After Cordova-Common 3.1.0, logger[level] property becomes not writable.
Therefore we re-define addLevel function here to use SpyOn logger[level]
*/
const CordovaLogger = require('cordova-common').CordovaLogger;
CordovaLogger.prototype.addLevel = function (level, severity, color) {
this.levels[level] = severity;
if (color) {
this.colors[level] = color;
}
// Define own method with corresponding name
if (!this[level]) {
this[level] = this.log.bind(this, level);
}
return this;
};
const { events, cordova } = require('cordova-lib');
const logger = require('cordova-common').CordovaLogger.get();
const telemetry = require('../src/telemetry');
Expand Down