Skip to content

Commit

Permalink
Merge pull request #414 from erisu/cordova9-prep
Browse files Browse the repository at this point in the history
Cordova CLI Release Preparation (Cordova 9)
  • Loading branch information
erisu committed Mar 20, 2019
2 parents 35b1521 + f626923 commit f1a8fe8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
22 changes: 11 additions & 11 deletions package.json
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
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

0 comments on commit f1a8fe8

Please sign in to comment.