Upgrade dependencies (#6662)

This commit is contained in:
Ben McCann 2019-10-31 15:03:00 -07:00 committed by Evert Timberg
parent c068f2178a
commit eef153de40
14 changed files with 742 additions and 817 deletions

1507
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -35,37 +35,37 @@
"babel-preset-es2015-rollup": "^3.0.0",
"clean-css": "^4.2.1",
"coveralls": "^3.0.0",
"eslint": "^5.9.0",
"eslint": "^6.0.0",
"eslint-config-chartjs": "^0.2.0",
"eslint-plugin-html": "^5.0.0",
"eslint-plugin-html": "^6.0.0",
"gitbook-cli": "^2.3.2",
"gulp": "^4.0.0",
"gulp-eslint": "^5.0.0",
"gulp-eslint": "^6.0.0",
"gulp-file": "^0.4.0",
"gulp-htmllint": "^0.0.16",
"gulp-replace": "^1.0.0",
"gulp-size": "^3.0.0",
"gulp-streamify": "^1.0.2",
"gulp-terser": "^1.1.6",
"gulp-zip": "^4.2.0",
"gulp-zip": "^5.0.0",
"jasmine": "^3.3.0",
"jasmine-core": "^3.3.0",
"karma": "^4.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
"karma-firefox-launcher": "^1.0.1",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-rollup-preprocessor": "^7.0.0",
"merge-stream": "^1.0.1",
"pixelmatch": "^4.0.2",
"pixelmatch": "^5.0.0",
"rollup": "^1.0.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-istanbul": "^2.0.1",
"rollup-plugin-node-resolve": "^5.0.0",
"rollup-plugin-terser": "^5.0.0",
"yargs": "^12.0.5"
"yargs": "^14.0.0"
},
"dependencies": {
"chartjs-color": "^2.1.0",

View File

@ -1,5 +1,3 @@
/* global Chart */
'use strict';
(function() {

View File

@ -1,4 +1,3 @@
/* global window: false */
'use strict';
var defaults = require('./core.defaults');

View File

@ -14,7 +14,7 @@ function interpolate(start, view, model, ease) {
// if a value is added to the model after pivot() has been called, the view
// doesn't contain it, so let's initialize the view to the target value.
if (!view.hasOwnProperty(key)) {
if (!Object.prototype.hasOwnProperty.call(view, key)) {
view[key] = target;
}
@ -24,7 +24,7 @@ function interpolate(start, view, model, ease) {
continue;
}
if (!start.hasOwnProperty(key)) {
if (!Object.prototype.hasOwnProperty.call(start, key)) {
start[key] = actual;
}

View File

@ -1,5 +1,3 @@
/* global window: false */
/* global document: false */
'use strict';
var color = require('chartjs-color');
@ -578,7 +576,6 @@ module.exports = function() {
return value;
} :
function(value) {
/* global CanvasGradient */
if (value instanceof CanvasGradient) {
value = defaults.global.defaultColor;
}
@ -587,7 +584,6 @@ module.exports = function() {
};
helpers.getHoverColor = function(colorValue) {
/* global CanvasPattern */
return (colorValue instanceof CanvasPattern || colorValue instanceof CanvasGradient) ?
colorValue :
helpers.color(colorValue).saturate(0.5).darken(0.1).rgbString();

View File

@ -279,7 +279,7 @@ module.exports = {
for (; i < ilen; ++i) {
prop = props[i];
if (options.hasOwnProperty(prop)) {
if (Object.prototype.hasOwnProperty.call(options, prop)) {
item[prop] = options[prop];
}
}

View File

@ -18,15 +18,15 @@ module.exports = {
this.defaults[type] = helpers.clone(scaleDefaults);
},
getScaleConstructor: function(type) {
return this.constructors.hasOwnProperty(type) ? this.constructors[type] : undefined;
return Object.prototype.hasOwnProperty.call(this.constructors, type) ? this.constructors[type] : undefined;
},
getScaleDefaults: function(type) {
// Return the scale defaults merged with the global settings so that we always use the latest ones
return this.defaults.hasOwnProperty(type) ? helpers.merge({}, [defaults.scale, this.defaults[type]]) : {};
return Object.prototype.hasOwnProperty.call(this.defaults, type) ? helpers.merge({}, [defaults.scale, this.defaults[type]]) : {};
},
updateScaleDefaults: function(type, additions) {
var me = this;
if (me.defaults.hasOwnProperty(type)) {
if (Object.prototype.hasOwnProperty.call(me.defaults, type)) {
me.defaults[type] = helpers.extend(me.defaults[type], additions);
}
},

View File

@ -216,7 +216,7 @@ var helpers = {
if (helpers.isObject(tval) && helpers.isObject(sval)) {
helpers.mergeIf(tval, sval);
} else if (!target.hasOwnProperty(key)) {
} else if (!Object.prototype.hasOwnProperty.call(target, key)) {
target[key] = helpers.clone(sval);
}
},
@ -288,7 +288,7 @@ var helpers = {
*/
inherits: function(extensions) {
var me = this;
var ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() {
var ChartElement = (extensions && Object.prototype.hasOwnProperty.call(extensions, 'constructor')) ? extensions.constructor : function() {
return me.apply(this, arguments);
};

View File

@ -37,7 +37,7 @@ require('./adapters');
// Loading built-in plugins
var plugins = require('./plugins');
for (var k in plugins) {
if (plugins.hasOwnProperty(k)) {
if (Object.prototype.hasOwnProperty.call(plugins, k)) {
Chart.plugins.register(plugins[k]);
}
}

View File

@ -8,7 +8,6 @@ describe('Chart', function() {
expect(Chart instanceof Object).toBeTruthy();
expect(chart.constructor).toBe(Chart);
expect(chart instanceof Chart).toBeTruthy();
expect(Chart.prototype.isPrototypeOf(chart)).toBeTruthy();
});
describe('config initialization', function() {

View File

@ -631,7 +631,7 @@ describe('Core helper tests', function() {
describe('Color helper', function() {
function isColorInstance(obj) {
return typeof obj === 'object' && obj.hasOwnProperty('values') && obj.values.hasOwnProperty('rgb');
return typeof obj === 'object' && Object.prototype.hasOwnProperty.call(obj, 'values') && Object.prototype.hasOwnProperty.call(obj.values, 'rgb');
}
it('should return a color when called with a color', function() {

View File

@ -1034,8 +1034,8 @@ describe('Core.Tooltip', function() {
var fn = Chart.Tooltip.positioners.test;
expect(fn.calls.count()).toBe(1);
expect(fn.calls.first().args[0] instanceof Array).toBe(true);
expect(fn.calls.first().args[1].hasOwnProperty('x')).toBe(true);
expect(fn.calls.first().args[1].hasOwnProperty('y')).toBe(true);
expect(Object.prototype.hasOwnProperty.call(fn.calls.first().args[1], 'x')).toBe(true);
expect(Object.prototype.hasOwnProperty.call(fn.calls.first().args[1], 'y')).toBe(true);
expect(fn.calls.first().object instanceof Chart.Tooltip).toBe(true);
});
});

View File

@ -40,13 +40,13 @@ function acquireChart(config, options) {
options.wrapper = options.wrapper || {class: 'chartjs-wrapper'};
for (key in options.canvas) {
if (options.canvas.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(options.canvas, key)) {
canvas.setAttribute(key, options.canvas[key]);
}
}
for (key in options.wrapper) {
if (options.wrapper.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(options.wrapper, key)) {
wrapper.setAttribute(key, options.wrapper[key]);
}
}