From 1e9bea8bf011fcc5287d0a5df34ab0f9463245d7 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Mon, 11 Oct 2021 18:44:59 +0200 Subject: [PATCH] Update to latest prettier/eslint setup (#3478) --- .eslintrc.json | 5 +- cz-config.js | 12 +- lib/cli/cli.js | 4 +- lib/cli/util.js | 10 +- lib/core/queueHandler.js | 4 +- lib/core/resultsStorage/index.js | 2 +- lib/core/resultsStorage/pathToFolder.js | 12 +- lib/plugins/assets/aggregator.js | 10 +- lib/plugins/assets/assetsBySize.js | 4 +- lib/plugins/assets/assetsBySpeed.js | 4 +- lib/plugins/axe/axePostScript.js | 2 +- lib/plugins/browsertime/analyzer.js | 4 +- lib/plugins/browsertime/filmstrip.js | 2 +- lib/plugins/browsertime/index.js | 15 +- lib/plugins/budget/deprecatedVerify.js | 2 +- lib/plugins/budget/json.js | 2 +- lib/plugins/budget/junit.js | 2 +- lib/plugins/budget/tap.js | 4 +- lib/plugins/crux/index.js | 17 +- lib/plugins/crux/repackage.js | 26 +- lib/plugins/crux/send.js | 8 +- lib/plugins/gcs/index.js | 4 +- lib/plugins/graphite/data-generator.js | 6 +- lib/plugins/graphite/graphite-sender.js | 14 +- lib/plugins/graphite/statsd-sender.js | 9 +- lib/plugins/html/htmlBuilder.js | 5 +- lib/plugins/html/metricHelper.js | 8 +- lib/plugins/html/setup/detailed.js | 2 +- lib/plugins/html/setup/summaryBoxes.js | 2 +- .../html/templates/url/includes/tabScripts.js | 2 +- lib/plugins/influxdb/send-annotation.js | 4 +- lib/plugins/matrix/index.js | 22 +- lib/plugins/matrix/send.js | 4 +- lib/plugins/pagexray/pagexrayAggregator.js | 12 +- lib/plugins/s3/index.js | 4 +- lib/plugins/slack/attachements.js | 2 +- lib/plugins/slack/summary.js | 2 +- lib/support/annotationsHelper.js | 4 +- lib/support/flattenMessage.js | 8 +- lib/support/helpers/cap.js | 2 +- lib/support/helpers/decimals.js | 2 +- lib/support/helpers/get.js | 2 +- lib/support/helpers/httpErrors.js | 2 +- lib/support/helpers/label.js | 2 +- lib/support/helpers/noop.js | 2 +- lib/support/helpers/percent.js | 2 +- lib/support/helpers/plural.js | 2 +- lib/support/helpers/scoreLabel.js | 2 +- lib/support/helpers/short.js | 2 +- lib/support/helpers/shortAsset.js | 2 +- npm-shrinkwrap.json | 796 +++++++++--------- package.json | 8 +- release/feed.js | 8 +- test/cliUtilTests.js | 22 +- test/coachTests.js | 6 +- test/domainTests.js | 10 +- test/graphiteTests.js | 50 +- test/influxdbTests.js | 6 +- test/pathToFolderTests.js | 10 +- test/prepostscripts/multi.js | 2 +- test/prepostscripts/postSample.js | 2 +- test/prepostscripts/preSample.js | 2 +- test/resultUrlTests.js | 32 +- test/storageManagerTests.js | 20 +- tools/check-licenses.js | 2 +- tools/tcp-server.js | 4 +- tools/udp-server.js | 4 +- 67 files changed, 598 insertions(+), 673 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e9cc0cf4e..ca4010904 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,7 +13,10 @@ "prettier/prettier": [ "error", { - "singleQuote": true + "singleQuote": true, + "trailingComma": "none", + "arrowParens": "avoid", + "embeddedLanguageFormatting": "off" } ], "require-atomic-updates": 0, diff --git a/cz-config.js b/cz-config.js index 45db67318..b8a01c7bc 100644 --- a/cz-config.js +++ b/cz-config.js @@ -5,13 +5,11 @@ module.exports = { { value: 'docs', name: 'docs: Documentation only changes' }, { value: 'style', - name: - 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)' + name: 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)' }, { value: 'refactor', - name: - 'refactor: A code change that neither fixes a bug nor adds a feature' + name: 'refactor: A code change that neither fixes a bug nor adds a feature' }, { value: 'perf', @@ -20,8 +18,7 @@ module.exports = { { value: 'test', name: 'test: Adding missing tests' }, { value: 'chore', - name: - 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation' + name: 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation' }, { value: 'revert', name: 'revert: Revert to a commit' }, { value: 'WIP', name: 'WIP: Work in progress' } @@ -57,8 +54,7 @@ module.exports = { // used if allowCustomScopes is true // customScope: 'Denote the SCOPE of this change:', subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n', - body: - 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n', + body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n', breaking: 'List any BREAKING CHANGES (optional):\n', footer: 'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n', diff --git a/lib/cli/cli.js b/lib/cli/cli.js index 6cfdd2517..a26acbb9c 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -1461,7 +1461,7 @@ module.exports.parseCommandLine = function parseCommandLine() { .alias('help', 'h') .config(config) .alias('version', 'V') - .coerce('budget', function(arg) { + .coerce('budget', function (arg) { if (arg) { if (typeof arg === 'object' && !Array.isArray(arg)) { if (arg.configPath) { @@ -1507,7 +1507,7 @@ module.exports.parseCommandLine = function parseCommandLine() { return plugins; } }) - .coerce('webpagetest', function(arg) { + .coerce('webpagetest', function (arg) { if (arg) { // for backwards compatible reasons we check if the passed parameters is a path to a script, if so just us it (PR #1445) if (arg.script && fs.existsSync(arg.script)) { diff --git a/lib/cli/util.js b/lib/cli/util.js index 51874fbbf..d95e35ed4 100644 --- a/lib/cli/util.js +++ b/lib/cli/util.js @@ -40,10 +40,7 @@ module.exports = { } else { const filePath = path.resolve(url); try { - const lines = fs - .readFileSync(filePath) - .toString() - .split('\n'); + const lines = fs.readFileSync(filePath).toString().split('\n'); for (let line of lines) { if (line.trim().length > 0) { let lineArray = line.split(' ', 2); @@ -91,10 +88,7 @@ module.exports = { pos += 1; } else { const filePath = url; - const lines = fs - .readFileSync(filePath) - .toString() - .split('\n'); + const lines = fs.readFileSync(filePath).toString().split('\n'); for (let line of lines) { if (line.trim().length > 0) { let url, diff --git a/lib/core/queueHandler.js b/lib/core/queueHandler.js index ddb3cb72d..94999d5d5 100644 --- a/lib/core/queueHandler.js +++ b/lib/core/queueHandler.js @@ -40,9 +40,7 @@ function validateMessageFormat(message) { if (previousDepth && previousDepth !== typeDepth) { throw new Error( `All messages of type ${baseType} must have the same structure. ` + - `${ - message.type - } has ${typeDepth} part(s), but earlier messages had ${previousDepth} part(s).` + `${message.type} has ${typeDepth} part(s), but earlier messages had ${previousDepth} part(s).` ); } diff --git a/lib/core/resultsStorage/index.js b/lib/core/resultsStorage/index.js index 78e006828..69fcce251 100644 --- a/lib/core/resultsStorage/index.js +++ b/lib/core/resultsStorage/index.js @@ -15,7 +15,7 @@ function getDomainOrFileName(input) { return domainOrFile; } -module.exports = function(input, timestamp, options) { +module.exports = function (input, timestamp, options) { const outputFolder = options.outputFolder; const resultBaseURL = options.resultBaseURL; const resultsSubFolders = []; diff --git a/lib/core/resultsStorage/pathToFolder.js b/lib/core/resultsStorage/pathToFolder.js index a7411bc2b..088283ef7 100644 --- a/lib/core/resultsStorage/pathToFolder.js +++ b/lib/core/resultsStorage/pathToFolder.js @@ -30,19 +30,13 @@ module.exports = function pathFromRootToPageDir(url, options, alias) { if (useHash && !isEmpty(parsedUrl.hash)) { const md5 = crypto.createHash('md5'), - hash = md5 - .update(parsedUrl.hash) - .digest('hex') - .substring(0, 8); + hash = md5.update(parsedUrl.hash).digest('hex').substring(0, 8); urlSegments.push('hash-' + hash); } if (!isEmpty(parsedUrl.search)) { const md5 = crypto.createHash('md5'), - hash = md5 - .update(parsedUrl.search) - .digest('hex') - .substring(0, 8); + hash = md5.update(parsedUrl.search).digest('hex').substring(0, 8); urlSegments.push('query-' + hash); } @@ -64,7 +58,7 @@ module.exports = function pathFromRootToPageDir(url, options, alias) { // pathSegments.push('data'); - pathSegments.forEach(function(segment, index) { + pathSegments.forEach(function (segment, index) { if (segment) { pathSegments[index] = segment.replace(/[^-a-z0-9_.\u0621-\u064A]/gi, '-'); } diff --git a/lib/plugins/assets/aggregator.js b/lib/plugins/assets/aggregator.js index 1d770028e..491518799 100644 --- a/lib/plugins/assets/aggregator.js +++ b/lib/plugins/assets/aggregator.js @@ -117,17 +117,15 @@ module.exports = { summary.size[group] = {}; summary.timing[group] = {}; for (let assetTypes of Object.keys(this.largestAssetsByGroup[group])) { - summary.size[group][assetTypes] = this.largestAssetsByGroup[group][ - assetTypes - ].getItems(); + summary.size[group][assetTypes] = + this.largestAssetsByGroup[group][assetTypes].getItems(); } summary.timing[group] = this.slowestAssetsByGroup[group].getItems(); } for (let assetTypes of Object.keys(this.largestAssets)) { - summary.size.total[assetTypes] = this.largestAssets[ - assetTypes - ].getItems(); + summary.size.total[assetTypes] = + this.largestAssets[assetTypes].getItems(); } summary.timing.total = this.slowestAssets diff --git a/lib/plugins/assets/assetsBySize.js b/lib/plugins/assets/assetsBySize.js index 85edf6ee2..76eba241f 100644 --- a/lib/plugins/assets/assetsBySize.js +++ b/lib/plugins/assets/assetsBySize.js @@ -23,7 +23,7 @@ class AssetsBySize { } if (this.items.length > this.maxSize) { - this.items.sort(function(asset, asset2) { + this.items.sort(function (asset, asset2) { return asset2.contentSize - asset.contentSize; }); @@ -36,7 +36,7 @@ class AssetsBySize { } getItems() { - this.items.sort(function(asset, asset2) { + this.items.sort(function (asset, asset2) { return asset2.contentSize - asset.contentSize; }); return this.items; diff --git a/lib/plugins/assets/assetsBySpeed.js b/lib/plugins/assets/assetsBySpeed.js index 1edd706d9..2db86b55e 100644 --- a/lib/plugins/assets/assetsBySpeed.js +++ b/lib/plugins/assets/assetsBySpeed.js @@ -32,7 +32,7 @@ class AssetsBySpeed { } if (this.items.length > this.maxSize) { - this.items.sort(function(asset, asset2) { + this.items.sort(function (asset, asset2) { return asset2.totalTime - asset.totalTime; }); @@ -45,7 +45,7 @@ class AssetsBySpeed { } getItems() { - this.items.sort(function(asset, asset2) { + this.items.sort(function (asset, asset2) { return asset2.totalTime - asset.totalTime; }); diff --git a/lib/plugins/axe/axePostScript.js b/lib/plugins/axe/axePostScript.js index 6d65ed914..b0d8f07f8 100644 --- a/lib/plugins/axe/axePostScript.js +++ b/lib/plugins/axe/axePostScript.js @@ -1,6 +1,6 @@ const axe = require('axe-core').source; -module.exports = async function(context) { +module.exports = async function (context) { // Insert the axe source await context.selenium.driver.executeScript(axe); diff --git a/lib/plugins/browsertime/analyzer.js b/lib/plugins/browsertime/analyzer.js index 2f9573be1..a18b2682e 100644 --- a/lib/plugins/browsertime/analyzer.js +++ b/lib/plugins/browsertime/analyzer.js @@ -68,7 +68,7 @@ function addExtraScripts(scriptsByCategory, pluginScripts) { // For all different script in the array for (let scripts of pluginScripts) { // and then for all scripts in that category - forEach(scripts.scripts, function(script, name) { + forEach(scripts.scripts, function (script, name) { set(scriptsByCategory, scripts.category + '.' + name, script); }); } @@ -80,7 +80,7 @@ function setupAsynScripts(asyncScripts) { // For all different script in the array for (let scripts of asyncScripts) { // and then for all scripts in that category - forEach(scripts.scripts, function(script, name) { + forEach(scripts.scripts, function (script, name) { set(allAsyncScripts, scripts.category + '.' + name, script); }); } diff --git a/lib/plugins/browsertime/filmstrip.js b/lib/plugins/browsertime/filmstrip.js index 5fe24ee4e..51ee0719e 100644 --- a/lib/plugins/browsertime/filmstrip.js +++ b/lib/plugins/browsertime/filmstrip.js @@ -202,7 +202,7 @@ module.exports = { // We step 100 ms each step ... but if you wanna show all and the last change is late // use 200 ms const step = - maxTiming > 10000 && (options.filmstrip && options.filmstrip.showAll) + maxTiming > 10000 && options.filmstrip && options.filmstrip.showAll ? 200 : 100; let fileName = ''; diff --git a/lib/plugins/browsertime/index.js b/lib/plugins/browsertime/index.js index e809a5e79..bf8199720 100644 --- a/lib/plugins/browsertime/index.js +++ b/lib/plugins/browsertime/index.js @@ -234,8 +234,9 @@ module.exports = { url, this.allAlias[url] ); - _meta.screenshot = `${base}data/screenshots/${runIndex + - 1}/afterPageCompleteCheck.${this.screenshotType}`; + _meta.screenshot = `${base}data/screenshots/${ + runIndex + 1 + }/afterPageCompleteCheck.${this.screenshotType}`; _meta.result = `${base}${runIndex + 1}.html`; if (options.video) { _meta.video = `${base}data/video/${runIndex + 1}.mp4`; @@ -483,14 +484,12 @@ module.exports = { ); if (options.chrome && options.chrome.collectConsoleLog) { - result[ - resultIndex - ].statistics.console = consoleLogAggregator.summarizeStats(); + result[resultIndex].statistics.console = + consoleLogAggregator.summarizeStats(); } - result[resultIndex].statistics.errors = statsHelpers.summarizeStats( - errorStats - ); + result[resultIndex].statistics.errors = + statsHelpers.summarizeStats(errorStats); // Post the result on the queue so other plugins can use it queue.postMessage( diff --git a/lib/plugins/budget/deprecatedVerify.js b/lib/plugins/budget/deprecatedVerify.js index e66ccdaf2..4f41de6f6 100644 --- a/lib/plugins/budget/deprecatedVerify.js +++ b/lib/plugins/budget/deprecatedVerify.js @@ -26,7 +26,7 @@ function getHelperFunction(metric) { ) { return size; } else if (metric.indexOf('timings') > -1) { - return function(time) { + return function (time) { return time + ' ms'; }; } else return noop; diff --git a/lib/plugins/budget/json.js b/lib/plugins/budget/json.js index 2f05cfba7..f5c606d18 100644 --- a/lib/plugins/budget/json.js +++ b/lib/plugins/budget/json.js @@ -4,7 +4,7 @@ const fs = require('fs'), log = require('intel').getLogger('sitespeedio.plugin.budget'), path = require('path'); -exports.writeJson = function(results, dir) { +exports.writeJson = function (results, dir) { const file = path.join(dir, 'budgetResult.json'); log.info('Write budget to %s', path.resolve(file)); fs.writeFileSync(file, JSON.stringify(results, null, 2)); diff --git a/lib/plugins/budget/junit.js b/lib/plugins/budget/junit.js index 488695e13..54f1705ab 100644 --- a/lib/plugins/budget/junit.js +++ b/lib/plugins/budget/junit.js @@ -6,7 +6,7 @@ const builder = require('junit-report-builder'), path = require('path'), merge = require('lodash.merge'); -exports.writeJunit = function(results, dir, options) { +exports.writeJunit = function (results, dir, options) { // lets have one suite per URL const urls = Object.keys(merge({}, results.failing, results.working)); diff --git a/lib/plugins/budget/tap.js b/lib/plugins/budget/tap.js index 396ec7359..ea66a71ba 100644 --- a/lib/plugins/budget/tap.js +++ b/lib/plugins/budget/tap.js @@ -6,7 +6,7 @@ const tap = require('tape'), path = require('path'), EOL = require('os').EOL; -exports.writeTap = function(results, dir) { +exports.writeTap = function (results, dir) { const file = path.join(dir, 'budget.tap'); log.info('Write budget to %s', path.resolve(file)); const tapOutput = fs.createWriteStream(file); @@ -17,7 +17,7 @@ exports.writeTap = function(results, dir) { for (const url of urls) { for (const result of results.failing[url]) { - tap(result.type + '.' + result.metric + ' ' + url, function(t) { + tap(result.type + '.' + result.metric + ' ' + url, function (t) { let extra = ''; if (resultType === 'failing') { extra = diff --git a/lib/plugins/crux/index.js b/lib/plugins/crux/index.js index a1f802e49..1712b6f51 100644 --- a/lib/plugins/crux/index.js +++ b/lib/plugins/crux/index.js @@ -96,18 +96,13 @@ module.exports = { if (originResult.originLoadingExperience[formFactor].error) { log.info( - `${ - originResult.originLoadingExperience[formFactor].error.message - } for domain ${url} using ${formFactor}` + `${originResult.originLoadingExperience[formFactor].error.message} for domain ${url} using ${formFactor}` ); queue.postMessage( make( 'error', - `${ - originResult.originLoadingExperience[formFactor].error - .message - } for domain ${url} using ${formFactor}`, + `${originResult.originLoadingExperience[formFactor].error.message} for domain ${url} using ${formFactor}`, { url } @@ -142,17 +137,13 @@ module.exports = { if (urlResult.loadingExperience[formFactor].error) { log.info( - `${ - urlResult.loadingExperience[formFactor].error.message - } for ${url} using ${formFactor}` + `${urlResult.loadingExperience[formFactor].error.message} for ${url} using ${formFactor}` ); queue.postMessage( make( 'error', - `${ - urlResult.loadingExperience[formFactor].error.message - } for ${url} using ${formFactor}`, + `${urlResult.loadingExperience[formFactor].error.message} for ${url} using ${formFactor}`, { url } diff --git a/lib/plugins/crux/repackage.js b/lib/plugins/crux/repackage.js index d21336df2..92b8e4b4f 100644 --- a/lib/plugins/crux/repackage.js +++ b/lib/plugins/crux/repackage.js @@ -1,16 +1,16 @@ 'use strict'; -module.exports = function(cruxResult) { +module.exports = function (cruxResult) { const result = {}; if (cruxResult.record.metrics.first_contentful_paint) { result.FIRST_CONTENTFUL_PAINT_MS = { p75: cruxResult.record.metrics.first_contentful_paint.percentiles.p75, - fast: - cruxResult.record.metrics.first_contentful_paint.histogram[0].density, + fast: cruxResult.record.metrics.first_contentful_paint.histogram[0] + .density, moderate: cruxResult.record.metrics.first_contentful_paint.histogram[1].density, - slow: - cruxResult.record.metrics.first_contentful_paint.histogram[2].density + slow: cruxResult.record.metrics.first_contentful_paint.histogram[2] + .density }; } if (cruxResult.record.metrics.first_input_delay) { @@ -26,24 +26,24 @@ module.exports = function(cruxResult) { if (cruxResult.record.metrics.cumulative_layout_shift) { result.CUMULATIVE_LAYOUT_SHIFT_SCORE = { p75: cruxResult.record.metrics.cumulative_layout_shift.percentiles.p75, - fast: - cruxResult.record.metrics.cumulative_layout_shift.histogram[0].density, + fast: cruxResult.record.metrics.cumulative_layout_shift.histogram[0] + .density, moderate: cruxResult.record.metrics.cumulative_layout_shift.histogram[1].density, - slow: - cruxResult.record.metrics.cumulative_layout_shift.histogram[2].density + slow: cruxResult.record.metrics.cumulative_layout_shift.histogram[2] + .density }; } if (cruxResult.record.metrics.largest_contentful_paint) { result.LARGEST_CONTENTFUL_PAINT_MS = { p75: cruxResult.record.metrics.largest_contentful_paint.percentiles.p75, - fast: - cruxResult.record.metrics.largest_contentful_paint.histogram[0].density, + fast: cruxResult.record.metrics.largest_contentful_paint.histogram[0] + .density, moderate: cruxResult.record.metrics.largest_contentful_paint.histogram[1].density, - slow: - cruxResult.record.metrics.largest_contentful_paint.histogram[2].density + slow: cruxResult.record.metrics.largest_contentful_paint.histogram[2] + .density }; } result.data = cruxResult; diff --git a/lib/plugins/crux/send.js b/lib/plugins/crux/send.js index f66e43063..574cec675 100644 --- a/lib/plugins/crux/send.js +++ b/lib/plugins/crux/send.js @@ -11,7 +11,7 @@ module.exports = { } data = JSON.stringify(data); // Return new promise - return new Promise(function(resolve, reject) { + return new Promise(function (resolve, reject) { // Do async job const req = https.request( { @@ -24,12 +24,10 @@ module.exports = { }, method: 'POST' }, - function(res) { + function (res) { if (res.statusCode >= 499) { log.error( - `Got error from CrUx. Error Code: ${res.statusCode} Message: ${ - res.statusMessage - }` + `Got error from CrUx. Error Code: ${res.statusCode} Message: ${res.statusMessage}` ); return reject(new Error(`Status Code: ${res.statusCode}`)); } diff --git a/lib/plugins/gcs/index.js b/lib/plugins/gcs/index.js index 717d5530a..d39636fa8 100644 --- a/lib/plugins/gcs/index.js +++ b/lib/plugins/gcs/index.js @@ -98,9 +98,7 @@ module.exports = { const baseDir = this.storageManager.getBaseDir(); log.info( - `Uploading ${baseDir} to Google Cloud Storage bucket ${ - gcsOptions.bucketname - }, this can take a while ...` + `Uploading ${baseDir} to Google Cloud Storage bucket ${gcsOptions.bucketname}, this can take a while ...` ); try { diff --git a/lib/plugins/graphite/data-generator.js b/lib/plugins/graphite/data-generator.js index 2f6c8e153..1e840dd4a 100644 --- a/lib/plugins/graphite/data-generator.js +++ b/lib/plugins/graphite/data-generator.js @@ -94,7 +94,7 @@ class GraphiteDataGenerator { if (this.options.graphite && this.options.graphite.perIteration) { if (message.type === 'browsertime.run') { if (key.includes('timings') && key.includes('marks')) { - key = key.replace(/marks\.(\d+)/, function(match, idx) { + key = key.replace(/marks\.(\d+)/, function (match, idx) { return ( 'marks.' + message.data.timings.userTimings.marks[idx].name ); @@ -102,7 +102,7 @@ class GraphiteDataGenerator { } if (key.includes('timings') && key.includes('measures')) { - key = key.replace(/measures\.(\d+)/, function(match, idx) { + key = key.replace(/measures\.(\d+)/, function (match, idx) { return ( 'measures.' + message.data.timings.userTimings.measures[idx].name @@ -114,7 +114,7 @@ class GraphiteDataGenerator { if (key.includes('assets')) { key = key.replace( /assets\.(\d+)/, - function(match, idx) { + function (match, idx) { let url = new URL(message.data.assets[idx].url); url.search = ''; return 'assets.' + graphiteUtil.toSafeKey(url.toString()); diff --git a/lib/plugins/graphite/graphite-sender.js b/lib/plugins/graphite/graphite-sender.js index fae525ae1..a3faa27c0 100644 --- a/lib/plugins/graphite/graphite-sender.js +++ b/lib/plugins/graphite/graphite-sender.js @@ -12,15 +12,11 @@ class GraphiteSender extends Sender { this.log(data); return new Promise((resolve, reject) => { - const socket = net.connect( - this.port, - this.host, - () => { - socket.write(data); - socket.end(); - resolve(); - } - ); + const socket = net.connect(this.port, this.host, () => { + socket.write(data); + socket.end(); + resolve(); + }); socket.on('error', reject); }); } diff --git a/lib/plugins/graphite/statsd-sender.js b/lib/plugins/graphite/statsd-sender.js index ac4bf0e14..4583aa789 100644 --- a/lib/plugins/graphite/statsd-sender.js +++ b/lib/plugins/graphite/statsd-sender.js @@ -14,13 +14,8 @@ class StatsDSender extends Sender { return new Promise((resolve, reject) => { const client = dgram.createSocket('udp4'); - client.send( - data, - 0, - data.length, - this.port, - this.host, - error => (client.close() && error ? reject(error) : resolve()) + client.send(data, 0, data.length, this.port, this.host, error => + client.close() && error ? reject(error) : resolve() ); }); } diff --git a/lib/plugins/html/htmlBuilder.js b/lib/plugins/html/htmlBuilder.js index cc39c2694..758c0cbfe 100644 --- a/lib/plugins/html/htmlBuilder.js +++ b/lib/plugins/html/htmlBuilder.js @@ -373,8 +373,9 @@ class HTMLBuilder { resultUrls: this.context.resultUrls, assetsPath: assetsBaseURL || rootPath, menu: 'pages', - pageTitle: `Run ${parseInt(runIndex) + - 1} for ${url} at ${runTimestamp}`, + pageTitle: `Run ${ + parseInt(runIndex) + 1 + } for ${url} at ${runTimestamp}`, pageDescription: `${metricHelper.getMetricsFromRun( pageInfo )} collected by sitespeed.io ${packageInfo.version}`, diff --git a/lib/plugins/html/metricHelper.js b/lib/plugins/html/metricHelper.js index 25e762a73..2b19f2ab8 100644 --- a/lib/plugins/html/metricHelper.js +++ b/lib/plugins/html/metricHelper.js @@ -71,9 +71,7 @@ module.exports = { 'data.browsertime.pageSummary.statistics.timings' ); if (visualMetrics) { - return `Median First Visual Change: ${ - visualMetrics.FirstVisualChange.median - }, + return `Median First Visual Change: ${visualMetrics.FirstVisualChange.median}, Median Speed Index: ${visualMetrics.SpeedIndex.median}, Median Visual Complete 85%: ${visualMetrics.VisualComplete85.median}, Median Last Visual Change: ${visualMetrics.LastVisualChange.median}`; @@ -81,8 +79,8 @@ module.exports = { return timings.loadEventEnd ? `Median LoadEventEnd: ${timings.loadEventEnd.median}` : '' + timings.fullyLoaded - ? `Median Fully loaded: ${timings.fullyLoaded.median}` - : ''; + ? `Median Fully loaded: ${timings.fullyLoaded.median}` + : ''; } else { return ''; } diff --git a/lib/plugins/html/setup/detailed.js b/lib/plugins/html/setup/detailed.js index 002faaefa..6b59cef78 100644 --- a/lib/plugins/html/setup/detailed.js +++ b/lib/plugins/html/setup/detailed.js @@ -16,7 +16,7 @@ function row(stat, name, metricName, formatter) { }; } -module.exports = function(data) { +module.exports = function (data) { if (!data) { return []; } diff --git a/lib/plugins/html/setup/summaryBoxes.js b/lib/plugins/html/setup/summaryBoxes.js index b96ab20fd..f63248de5 100644 --- a/lib/plugins/html/setup/summaryBoxes.js +++ b/lib/plugins/html/setup/summaryBoxes.js @@ -106,7 +106,7 @@ function _box(stat, name, label, formatter, url) { }; } -module.exports = function(data, html) { +module.exports = function (data, html) { if (!data) { return []; } diff --git a/lib/plugins/html/templates/url/includes/tabScripts.js b/lib/plugins/html/templates/url/includes/tabScripts.js index 4c63abdc4..9d67d7829 100644 --- a/lib/plugins/html/templates/url/includes/tabScripts.js +++ b/lib/plugins/html/templates/url/includes/tabScripts.js @@ -1,4 +1,4 @@ -window.addEventListener('DOMContentLoaded', function() { +window.addEventListener('DOMContentLoaded', function () { let tabsRoot = document.querySelector('#tabs'); let navigationLinks = document.querySelectorAll('#pageNavigation a'); diff --git a/lib/plugins/influxdb/send-annotation.js b/lib/plugins/influxdb/send-annotation.js index c896e1759..46fe3da1d 100644 --- a/lib/plugins/influxdb/send-annotation.js +++ b/lib/plugins/influxdb/send-annotation.js @@ -97,9 +97,7 @@ module.exports = { const req = lib.request(postOptions, res => { if (res.statusCode !== 204) { const e = new Error( - `Got ${res.statusCode} from InfluxDB when sending annotation ${ - res.statusMessage - }` + `Got ${res.statusCode} from InfluxDB when sending annotation ${res.statusMessage}` ); log.warn(e.message); reject(e); diff --git a/lib/plugins/matrix/index.js b/lib/plugins/matrix/index.js index 18ab50f08..be333f91a 100644 --- a/lib/plugins/matrix/index.js +++ b/lib/plugins/matrix/index.js @@ -97,11 +97,10 @@ module.exports = { // We have failing URLs in the budget if (Object.keys(message.data.failing).length > 0) { const failingURLs = Object.keys(message.data.failing); - text += `

⚠️ Budget failing (${ - failingURLs.length - } URLs)

`; - text += `

${get(this.options, 'name', '') + - ' '}${getBrowserData(this.browserData)}

`; + text += `

⚠️ Budget failing (${failingURLs.length} URLs)

`; + text += `

${ + get(this.options, 'name', '') + ' ' + }${getBrowserData(this.browserData)}

`; for (let url of failingURLs) { text += `
❌ ${url}`; if (this.resultUrls.hasBaseUrl()) { @@ -119,18 +118,14 @@ module.exports = { } text += '`; } } if (Object.keys(message.data.error).length > 0) { const errorURLs = Object.keys(message.data.error); - text += `

⚠️ Budget errors testing ${ - errorURLs.length - } URLs

`; + text += `

⚠️ Budget errors testing ${errorURLs.length} URLs

`; for (let url of errorURLs) { text += `
❌ ${url}
`; text += `
${message.data.error[url]}
`; @@ -143,8 +138,9 @@ module.exports = { text += `

🎉 All (${ Object.keys(message.data.working).length }) URLs passed the budget.

`; - text += `

${get(this.options, 'name', '') + - ' '}${getBrowserData(this.browserData)}

`; + text += `

${ + get(this.options, 'name', '') + ' ' + }${getBrowserData(this.browserData)}

`; } if (!this.waitForUpload) { const room = get(options, 'rooms.budget', options.room); diff --git a/lib/plugins/matrix/send.js b/lib/plugins/matrix/send.js index bfe9aed0e..4d47f2eb8 100644 --- a/lib/plugins/matrix/send.js +++ b/lib/plugins/matrix/send.js @@ -42,9 +42,7 @@ function send( }, backoff); } else { log.error( - `Got error from Matrix. Error Code: ${res.statusCode} Message: ${ - res.statusMessage - }` + `Got error from Matrix. Error Code: ${res.statusCode} Message: ${res.statusMessage}` ); reject(new Error(`Status Code: ${res.statusCode}`)); } diff --git a/lib/plugins/pagexray/pagexrayAggregator.js b/lib/plugins/pagexray/pagexrayAggregator.js index f6188b7ce..2598d154d 100644 --- a/lib/plugins/pagexray/pagexrayAggregator.js +++ b/lib/plugins/pagexray/pagexrayAggregator.js @@ -16,9 +16,9 @@ module.exports = { let stats = this.stats; let groups = this.groups; - pageSummary.forEach(function(summary) { + pageSummary.forEach(function (summary) { // stats for the whole page - METRIC_NAMES.forEach(function(metric) { + METRIC_NAMES.forEach(function (metric) { // There's a bug in Firefox/https://github.com/devtools-html/har-export-trigger // that sometimes generate content size that is null, see // https://github.com/sitespeedio/sitespeed.io/issues/2090 @@ -32,8 +32,8 @@ module.exports = { } }); - Object.keys(summary.contentTypes).forEach(function(contentType) { - METRIC_NAMES.forEach(function(metric) { + Object.keys(summary.contentTypes).forEach(function (contentType) { + METRIC_NAMES.forEach(function (metric) { // There's a bug in Firefox/https://github.com/devtools-html/har-export-trigger // that sometimes generate content size that is null, see // https://github.com/sitespeedio/sitespeed.io/issues/2090 @@ -48,7 +48,7 @@ module.exports = { }); }); - Object.keys(summary.responseCodes).forEach(function(responseCode) { + Object.keys(summary.responseCodes).forEach(function (responseCode) { statsHelpers.pushGroupStats( stats, groups[group], @@ -59,7 +59,7 @@ module.exports = { // extras for firstParty vs third if (summary.firstParty.requests) { - METRIC_NAMES.forEach(function(metric) { + METRIC_NAMES.forEach(function (metric) { if (summary.firstParty[metric] !== undefined) { statsHelpers.pushGroupStats( stats, diff --git a/lib/plugins/s3/index.js b/lib/plugins/s3/index.js index dc0c2fda0..4be8a9d1b 100644 --- a/lib/plugins/s3/index.js +++ b/lib/plugins/s3/index.js @@ -109,9 +109,7 @@ module.exports = { const baseDir = this.storageManager.getBaseDir(); log.info( - `Uploading ${baseDir} to S3 bucket ${ - s3Options.bucketname - }, this can take a while ...` + `Uploading ${baseDir} to S3 bucket ${s3Options.bucketname}, this can take a while ...` ); try { diff --git a/lib/plugins/slack/attachements.js b/lib/plugins/slack/attachements.js index 87f0bd940..b87d8827d 100644 --- a/lib/plugins/slack/attachements.js +++ b/lib/plugins/slack/attachements.js @@ -11,7 +11,7 @@ function getMetric(metric, f) { } } -module.exports = function( +module.exports = function ( dataCollector, resultUrls, slackOptions, diff --git a/lib/plugins/slack/summary.js b/lib/plugins/slack/summary.js index 12f881d95..fc0153944 100644 --- a/lib/plugins/slack/summary.js +++ b/lib/plugins/slack/summary.js @@ -4,7 +4,7 @@ const get = require('lodash.get'); const h = require('../../support/helpers'); const tsdbUtil = require('../../support/tsdbUtil'); -module.exports = function(dataCollector, errors, resultUrls, name, options) { +module.exports = function (dataCollector, errors, resultUrls, name, options) { const base = dataCollector.getSummary() || {}; const metrics = { firstPaint: { diff --git a/lib/support/annotationsHelper.js b/lib/support/annotationsHelper.js index 7d4901848..8fab4d558 100644 --- a/lib/support/annotationsHelper.js +++ b/lib/support/annotationsHelper.js @@ -44,9 +44,7 @@ module.exports = { (screenShotsEnabledInBrowsertime || webPageTestResultURL) && screenshotsEnabledForDatasource ? `

Result - Download HAR

` - : `Result ${ - options.browsertime.iterations - } run${s}`; + : `Result ${options.browsertime.iterations} run${s}`; if (webPageTestResultURL) { message = message + ` WebPageTest`; diff --git a/lib/support/flattenMessage.js b/lib/support/flattenMessage.js index c2d21c5a1..f7254e1ab 100644 --- a/lib/support/flattenMessage.js +++ b/lib/support/flattenMessage.js @@ -72,9 +72,7 @@ module.exports = { target[keyPrefix] = value; } else { log.warn( - `Non-finite number '${value}' found at path '${keyPrefix}' for '${type}' message (url = ${ - data.url - })` + `Non-finite number '${value}' found at path '${keyPrefix}' for '${type}' message (url = ${data.url})` ); } } @@ -125,9 +123,7 @@ module.exports = { case 'undefined': { log.debug( - `Undefined value found at path '${keyPrefix}' for '${type}' message (url = ${ - data.url - })` + `Undefined value found at path '${keyPrefix}' for '${type}' message (url = ${data.url})` ); } break; diff --git a/lib/support/helpers/cap.js b/lib/support/helpers/cap.js index c616349b3..e0fb8efb8 100644 --- a/lib/support/helpers/cap.js +++ b/lib/support/helpers/cap.js @@ -1,5 +1,5 @@ 'use strict'; -module.exports = function(word) { +module.exports = function (word) { return word.substr(0, 1).toUpperCase() + word.substr(1); }; diff --git a/lib/support/helpers/decimals.js b/lib/support/helpers/decimals.js index 68bb93d54..dbd1e7981 100644 --- a/lib/support/helpers/decimals.js +++ b/lib/support/helpers/decimals.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = function(decimals) { +module.exports = function (decimals) { let number = Number(decimals).toFixed(3); if (number === '0.000') { return 0; diff --git a/lib/support/helpers/get.js b/lib/support/helpers/get.js index f7d929561..60faed34a 100644 --- a/lib/support/helpers/get.js +++ b/lib/support/helpers/get.js @@ -1,7 +1,7 @@ 'use strict'; const get = require('lodash.get'); -module.exports = function(object, property, defaultValue) { +module.exports = function (object, property, defaultValue) { if (arguments.length < 3) { defaultValue = 0; } diff --git a/lib/support/helpers/httpErrors.js b/lib/support/helpers/httpErrors.js index 6ea80d58d..37d2568a9 100644 --- a/lib/support/helpers/httpErrors.js +++ b/lib/support/helpers/httpErrors.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = function(httpCodes) { +module.exports = function (httpCodes) { let data = ''; for (let code of Object.keys(httpCodes)) { if (Number(code) > 399) { diff --git a/lib/support/helpers/label.js b/lib/support/helpers/label.js index 0b54c1ecb..f0c1e8eea 100644 --- a/lib/support/helpers/label.js +++ b/lib/support/helpers/label.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = function(value, ok, warning) { +module.exports = function (value, ok, warning) { value = value || 0; if (value > ok) { return 'ok'; diff --git a/lib/support/helpers/noop.js b/lib/support/helpers/noop.js index a98aa1bfd..2588e989c 100644 --- a/lib/support/helpers/noop.js +++ b/lib/support/helpers/noop.js @@ -1,5 +1,5 @@ 'use strict'; -module.exports = function(value) { +module.exports = function (value) { return value; }; diff --git a/lib/support/helpers/percent.js b/lib/support/helpers/percent.js index bd3f695b2..2fae23d6c 100644 --- a/lib/support/helpers/percent.js +++ b/lib/support/helpers/percent.js @@ -1,5 +1,5 @@ 'use strict'; -module.exports = function(value) { +module.exports = function (value) { return `${value}%`; }; diff --git a/lib/support/helpers/plural.js b/lib/support/helpers/plural.js index 6d74ff964..6e127bf2c 100644 --- a/lib/support/helpers/plural.js +++ b/lib/support/helpers/plural.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = function(number, text) { +module.exports = function (number, text) { if (number === 0 || number > 1) { text += 's'; } diff --git a/lib/support/helpers/scoreLabel.js b/lib/support/helpers/scoreLabel.js index 8350695c7..db9f9f8a3 100644 --- a/lib/support/helpers/scoreLabel.js +++ b/lib/support/helpers/scoreLabel.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = function(value) { +module.exports = function (value) { value = value || 0; if (value > 90) { return 'ok'; diff --git a/lib/support/helpers/short.js b/lib/support/helpers/short.js index 3929dfeb3..0df49c255 100644 --- a/lib/support/helpers/short.js +++ b/lib/support/helpers/short.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = function(text, number) { +module.exports = function (text, number) { if (text.length > number) { return text.slice(0, number) + '...'; } diff --git a/lib/support/helpers/shortAsset.js b/lib/support/helpers/shortAsset.js index 3e1c56974..271bf698c 100644 --- a/lib/support/helpers/shortAsset.js +++ b/lib/support/helpers/shortAsset.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = function(url, longVersion) { +module.exports = function (url, longVersion) { if (longVersion) { if (url.length > 100) { let shortUrl = url.replace(/\?.*/, ''); diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 1f1c33606..c0ca1c8a5 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -4,62 +4,11 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, "@babel/helper-validator-identifier": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" }, - "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "@babel/parser": { "version": "7.14.3", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.3.tgz", @@ -158,6 +107,80 @@ "async": "~0.2.9" } }, + "@eslint/eslintrc": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.2.tgz", + "integrity": "sha512-x1ZXdEFsvTcnbTZgqcWUL9w2ybgZCw/qbKTPQnab+XnYA2bMQpJCh+/bBzCRfDJaJdlrrQlOk49jNtru9gL/6Q==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.0.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + } + } + }, "@google-cloud/common": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-3.6.0.tgz", @@ -231,6 +254,40 @@ } } }, + "@humanwhocodes/config-array": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", + "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, "@jimp/bmp": { "version": "0.16.1", "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.16.1.tgz", @@ -736,9 +793,9 @@ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" }, "acorn-jsx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", - "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true }, "afterward": { @@ -790,6 +847,12 @@ } } }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -855,12 +918,6 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, "async": { "version": "0.2.10", "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", @@ -1532,16 +1589,14 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "crypto-random-string": { @@ -1649,9 +1704,9 @@ } }, "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "deferred": { @@ -1799,12 +1854,6 @@ "integrity": "sha1-YMf4e9YrzGqJT6jM1q+3gjok90I=", "dev": true }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -1813,6 +1862,15 @@ "once": "^1.4.0" } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", @@ -1962,120 +2020,149 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.2.2.tgz", - "integrity": "sha512-mf0elOkxHbdyGX1IJEUsNBzCDdyoUgljF3rRlgfyYh0pwGnreLc0jjD6ZuleOibjmnUWZLY2eXwSooeOgGJ2jw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.0.0.tgz", + "integrity": "sha512-03spzPzMAO4pElm44m60Nj08nYonPGQXmw6Ceai/S4QK82IgwWO1EXx1s9namKzVlbVu3Jf81hb+N+8+v21/HQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^1.0.2", + "@humanwhocodes/config-array": "^0.6.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.2", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.1", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^6.0.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^11.7.0", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.4.1", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.2", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", + "regexpp": "^3.2.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "glob-parent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", - "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" + }, + "dependencies": { + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + } } }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "json-schema-traverse": { "version": "0.4.1", @@ -2090,135 +2177,135 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "lru-cache": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" } }, "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, "eslint-config-prettier": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.1.0.tgz", - "integrity": "sha512-k9fny9sPjIBQ2ftFTesJV21Rg4R/7a7t7LCtZVrYQiHEp8Nnuk3EGaDmsKSAnsPj0BYcgB2zxzHa2NTkIxcOLg==", - "dev": true, - "requires": { - "get-stdin": "^6.0.0" - }, - "dependencies": { - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", - "dev": true - } - } + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "dev": true }, "eslint-plugin-prettier": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz", - "integrity": "sha512-XWX2yVuwVNLOUhQijAkXz+rMPPoCr7WFiAl8ig6I7Xn+pPVhDhzg4DxHpmbeb0iqjO9UronEA3Tb09ChnFVHHA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", + "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" } }, "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", + "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" } }, "eslint-utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", - "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.0.0" + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz", + "integrity": "sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==", "dev": true }, "espree": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.1.tgz", - "integrity": "sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", + "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", "dev": true, "requires": { - "acorn": "^7.0.0", - "acorn-jsx": "^5.0.2", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^8.5.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.0.0" }, "dependencies": { "acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", + "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", "dev": true } } }, "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "^5.1.0" } }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" } }, "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true }, "esutils": { @@ -2443,12 +2530,12 @@ } }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "file-type": { @@ -2544,20 +2631,19 @@ } }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "dependencies": { "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -2566,9 +2652,9 @@ } }, "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", "dev": true }, "for-each": { @@ -2775,10 +2861,13 @@ } }, "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } }, "google-auth-library": { "version": "7.0.3", @@ -2994,9 +3083,9 @@ "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" }, "import-fresh": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", - "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -3348,20 +3437,21 @@ "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", "integrity": "sha1-Fzb939lyTyijaCrcYjCufk6Weds=" }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + } } }, "js2xmlparser": { @@ -3596,13 +3686,13 @@ } }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, "license-checker": { @@ -3832,6 +3922,15 @@ "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "lru-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", @@ -4144,12 +4243,6 @@ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "node-addon-api": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.1.tgz", @@ -4298,25 +4391,17 @@ } }, "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - }, - "dependencies": { - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - } + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "os-homedir": { @@ -4409,9 +4494,9 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "path-parse": { @@ -4459,15 +4544,15 @@ "optional": true }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prettier": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.2.tgz", - "integrity": "sha512-D9oFKkJ7g76fRxkRh9MWBh4j2vbNGO4rtEUJbj46zId5wnm0dwHruoyg4Od9Zqh3WNl0jwxnWSlEGAnl+/thWA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", + "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", "dev": true }, "prettier-linter-helpers": { @@ -4947,9 +5032,9 @@ } }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "remove-markdown": { @@ -5197,18 +5282,18 @@ "integrity": "sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=" }, "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "signal-exit": { @@ -5573,96 +5658,6 @@ "resolved": "https://registry.npmjs.org/symbol/-/symbol-0.3.1.tgz", "integrity": "sha1-tvmpANSWpX8CQI8iGYwQndoGMEE=" }, - "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - } - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, "taffydb": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", @@ -5924,12 +5919,12 @@ "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-detect": { @@ -5938,6 +5933,12 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -5971,9 +5972,9 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -6041,9 +6042,9 @@ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "v8-compile-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, "validate-npm-package-license": { @@ -6078,9 +6079,9 @@ "integrity": "sha512-pdod7Zg1GwVJBSjMSmV8kiFfPhzUcRbjQeQo4Alcfu7p7epGYggP9xdBSY8o1PlJOvmW/FMQH5AEd7Scxb0wUA==" }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -6236,15 +6237,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", diff --git a/package.json b/package.json index 7d3e5c266..f8d8399a0 100644 --- a/package.json +++ b/package.json @@ -57,15 +57,15 @@ "changelog-parser": "2.8.0", "clean-css-cli": "4.3.0", "cz-customizable": "^6.2.0", - "eslint": "6.2.2", - "eslint-config-prettier": "6.1.0", - "eslint-plugin-prettier": "3.1.0", + "eslint": "8.0.0", + "eslint-config-prettier": "8.3.0", + "eslint-plugin-prettier": "4.0.0", "feed": "4.2.2", "jsdoc": "^3.6.7", "license-checker": "^16.0.0", "mocha": "^5.0.4", "sass": "1.34.0", - "prettier": "^1.11.1", + "prettier": "2.4.1", "pug-lint": "^2.6.0", "pug-lint-config-clock": "^2.0.0" }, diff --git a/release/feed.js b/release/feed.js index c24a0cc82..be2a69ce7 100644 --- a/release/feed.js +++ b/release/feed.js @@ -106,12 +106,8 @@ async function generateFeed() { sortedVersionFiles.forEach(file => { feed.addItem({ title: `${file.name} ${file.version}`, - id: `https://github.com/sitespeedio/${file.name}/blob/main/CHANGELOG.md#${ - file.version - }`, - link: `https://github.com/sitespeedio/${ - file.name - }/blob/main/CHANGELOG.md#`, + id: `https://github.com/sitespeedio/${file.name}/blob/main/CHANGELOG.md#${file.version}`, + link: `https://github.com/sitespeedio/${file.name}/blob/main/CHANGELOG.md#`, description: descriptions[file.name], // content: content[file.name], author: [ diff --git a/test/cliUtilTests.js b/test/cliUtilTests.js index 7b9ef7f48..c87a34059 100644 --- a/test/cliUtilTests.js +++ b/test/cliUtilTests.js @@ -3,9 +3,9 @@ const cliUtil = require('../lib/cli/util'), expect = require('chai').expect; -describe('cliUtil', function() { - describe('getURLs', function() { - it('should extract urls', function() { +describe('cliUtil', function () { + describe('getURLs', function () { + it('should extract urls', function () { let urls = cliUtil.getURLs(['test/fixtures/sitespeed-urls.txt']); expect(urls[0] === 'https://www.sitespeed.io'); expect(urls[3] === 'https://www.sitespeed.io/documentation/faq'); @@ -16,8 +16,8 @@ describe('cliUtil', function() { }); }); - describe('getAliases', function() { - it('should extract aliases', function() { + describe('getAliases', function () { + it('should extract aliases', function () { let aliases = cliUtil.getAliases(['test/fixtures/sitespeed-urls.txt']); expect(aliases['https://www.sitespeed.io']).to.be.undefined; expect( @@ -159,9 +159,7 @@ describe('cliUtil', function() { }; cliUtil.registerPluginOptions(fakeYargs, plugin); - expect(fakeYargs.calls) - .to.be.an('array') - .with.lengthOf(2); + expect(fakeYargs.calls).to.be.an('array').with.lengthOf(2); const expectedProp1 = ['test.prop1', { default: 80 }]; expect(fakeYargs.calls.find(call => call[0] === 'test.prop1')).to.eql( @@ -197,9 +195,7 @@ describe('cliUtil', function() { }; cliUtil.registerPluginOptions(fakeYargs, plugin); - expect(fakeYargs.calls) - .to.be.an('array') - .with.lengthOf(2); + expect(fakeYargs.calls).to.be.an('array').with.lengthOf(2); const expectedProp1 = ['test.prop1', { default: 80 }]; expect(fakeYargs.calls.find(call => call[0] === 'test.prop1')).to.eql( @@ -233,9 +229,7 @@ describe('cliUtil', function() { }; cliUtil.registerPluginOptions(fakeYargs, plugin); - expect(fakeYargs.calls) - .to.be.an('array') - .with.lengthOf(2); + expect(fakeYargs.calls).to.be.an('array').with.lengthOf(2); const expectedProp1 = ['test.prop1', { default: 80 }]; expect(fakeYargs.calls.find(call => call[0] === 'test.prop1')).to.eql( diff --git a/test/coachTests.js b/test/coachTests.js index 6ad9e7c92..0a552f354 100644 --- a/test/coachTests.js +++ b/test/coachTests.js @@ -8,9 +8,9 @@ const aggregator = require('../lib/plugins/coach/aggregator'), const coachRunPath = path.resolve(__dirname, 'fixtures', 'coach.run-0.json'); const coachRun = JSON.parse(fs.readFileSync(coachRunPath, 'utf8')); -describe('coach', function() { - describe('aggregator', function() { - it('should summarize data', function() { +describe('coach', function () { + describe('aggregator', function () { + it('should summarize data', function () { aggregator.addToAggregate(coachRun, 'www.sitespeed.io'); expect(aggregator.summarize()).to.not.be.empty; diff --git a/test/domainTests.js b/test/domainTests.js index 3cf8d6d9d..abe8d2f21 100644 --- a/test/domainTests.js +++ b/test/domainTests.js @@ -8,11 +8,11 @@ let aggregator = require('../lib/plugins/domains/aggregator'), Promise.promisifyAll(fs); -describe('domains', function() { - describe('aggregator', function() { +describe('domains', function () { + describe('aggregator', function () { let har; - beforeEach(function() { + beforeEach(function () { return fs .readFileAsync( path.resolve(__dirname, 'fixtures', 'www-theverge-com.har'), @@ -24,8 +24,8 @@ describe('domains', function() { }); }); - describe('#addToAggregate', function() { - it('should add har to aggregate', function() { + describe('#addToAggregate', function () { + it('should add har to aggregate', function () { aggregator.addToAggregate(har, 'http://www.vox.com'); const summary = aggregator.summarize(); const voxDomain = summary.groups.total['cdn1.vox-cdn.com']; diff --git a/test/graphiteTests.js b/test/graphiteTests.js index 69909fd5d..795e4a9e4 100644 --- a/test/graphiteTests.js +++ b/test/graphiteTests.js @@ -4,9 +4,9 @@ const DataGenerator = require('../lib/plugins/graphite/data-generator'), expect = require('chai').expect, dayjs = require('dayjs'); -describe('graphite', function() { - describe('dataGenerator', function() { - it('should generate data for gpsi.pageSummary', function() { +describe('graphite', function () { + describe('dataGenerator', function () { + it('should generate data for gpsi.pageSummary', function () { const message = { type: 'gpsi.pageSummary', timestamp: '2016-01-08T12:59:06+01:00', @@ -41,7 +41,7 @@ describe('graphite', function() { expect(data).to.match(/foo_bar/); }); - it('should generate data for domains.summary', function() { + it('should generate data for domains.summary', function () { const message = { type: 'domains.summary', timestamp: '2016-01-08T12:59:06+01:00', @@ -78,7 +78,7 @@ describe('graphite', function() { ); }); - it('should generate data in statsD format', function() { + it('should generate data in statsD format', function () { const message = { type: 'domains.summary', timestamp: '2016-01-08T12:59:06+01:00', @@ -111,7 +111,7 @@ describe('graphite', function() { }); const data = generator.dataFromMessage(message, dayjs()); - data.forEach(function(line) { + data.forEach(function (line) { expect(line).to.match( /ns.summary.sub_domain_com.chrome.cable.domains.www.sitespeed.io.dns.(median|mean|min|p10|p90|p99|max):[\d]{1,}\|ms$/ ); @@ -119,7 +119,7 @@ describe('graphite', function() { }); }); - describe('index', function() { + describe('index', function () { const messageMaker = require('../lib/support/messageMaker'); const filterRegistry = require('../lib/support/filterRegistry'); const intel = require('intel'); @@ -128,7 +128,7 @@ describe('graphite', function() { let plugin; let options; - beforeEach(function() { + beforeEach(function () { plugin = require('../lib/plugins/graphite'); options = { graphite: { @@ -137,13 +137,13 @@ describe('graphite', function() { }; }); - it('Should use graphite interface by default', function() { + it('Should use graphite interface by default', function () { plugin.open(context, options); expect(plugin.sender.facility).to.match(/graphite/i); }); - it('Should use statsd interface', function() { + it('Should use statsd interface', function () { Object.assign(options.graphite, { statsd: true }); @@ -152,46 +152,46 @@ describe('graphite', function() { expect(plugin.sender.facility).to.match(/statsd/i); }); - it('Should use graphite interface by default', function() { + it('Should use graphite interface by default', function () { plugin.open(context, options); expect(plugin.sender.facility).to.match(/graphite/i); }); }); - describe('helpers/is-statsd', function() { + describe('helpers/is-statsd', function () { const isStatsD = require('../lib/plugins/graphite/helpers/is-statsd'); - it('Should be set to statsd', function() { + it('Should be set to statsd', function () { expect(isStatsD({ statsd: true })).to.be.true; }); - it('Should not be set to statsd', function() { + it('Should not be set to statsd', function () { ['true', 1, null, false, undefined].forEach( value => expect(isStatsD({ statsd: value })).to.be.false ); }); }); - describe('helpers/format-entry', function() { + describe('helpers/format-entry', function () { const formatEntry = require('../lib/plugins/graphite/helpers/format-entry'); - it('Should retrieve the format of statsd', function() { + it('Should retrieve the format of statsd', function () { expect(formatEntry('statsd')).to.equal('%s:%s|ms'); }); - it('Should retrieve the default format of graphite', function() { + it('Should retrieve the default format of graphite', function () { ['StatsD', 'stats', 'graphite', null, false, undefined].forEach(value => expect(formatEntry(value)).to.equal('%s %s %s') ); }); }); - describe('GraphiteSender', function() { + describe('GraphiteSender', function () { const GraphiteSender = require('../lib/plugins/graphite/graphite-sender'); const net = require('net'); const { connect } = net; - afterEach(function() { + afterEach(function () { net.connect = connect; }); @@ -202,14 +202,14 @@ describe('graphite', function() { }; } - it('Should send data to graphite via net', function(done) { + it('Should send data to graphite via net', function (done) { mock(() => done()); const sender = new GraphiteSender('127.0.0.1', '2003'); sender.send('some.data'); }); - it('Should send data to graphite in bulks', function(done) { + it('Should send data to graphite in bulks', function (done) { let sent = 0; mock(() => { ++sent === 2 && done(); @@ -220,12 +220,12 @@ describe('graphite', function() { }); }); - describe('StatsDSender', function() { + describe('StatsDSender', function () { const StatsDSender = require('../lib/plugins/graphite/statsd-sender'); const dgram = require('dgram'); const { createSocket } = dgram; - afterEach(function() { + afterEach(function () { dgram.createSocket = createSocket; }); @@ -233,7 +233,7 @@ describe('graphite', function() { dgram.createSocket = () => ({ send: fn }); } - it('Should send data to statsd via dgram', function() { + it('Should send data to statsd via dgram', function () { let sent = false; mock(() => { sent = true; @@ -245,7 +245,7 @@ describe('graphite', function() { expect(sent).to.be.true; }); - it('Should send data to statsd in bulks', function() { + it('Should send data to statsd in bulks', function () { let sent = 0; mock(() => { sent++; diff --git a/test/influxdbTests.js b/test/influxdbTests.js index 44b70a6a9..075e2f12e 100644 --- a/test/influxdbTests.js +++ b/test/influxdbTests.js @@ -4,9 +4,9 @@ const DataGenerator = require('../lib/plugins/influxdb/data-generator'), dayjs = require('dayjs'), expect = require('chai').expect; -describe('influxdb', function() { - describe('dataGenerator', function() { - it('should generate data for coach.summary', function() { +describe('influxdb', function () { + describe('dataGenerator', function () { + it('should generate data for coach.summary', function () { const message = { uuid: '33774328-e781-4152-babe-a367cee27153', type: 'coach.summary', diff --git a/test/pathToFolderTests.js b/test/pathToFolderTests.js index 8df2b12c6..85d241efe 100644 --- a/test/pathToFolderTests.js +++ b/test/pathToFolderTests.js @@ -3,23 +3,23 @@ const pathFromRootToPageDir = require('../lib/core/resultsStorage/pathToFolder'); const expect = require('chai').expect; -describe('pathFromRootToPageDir', function() { - it('should create path from site root', function() { +describe('pathFromRootToPageDir', function () { + it('should create path from site root', function () { const path = pathFromRootToPageDir('http://www.foo.bar', {}); expect(path).to.equal('pages/www_foo_bar/'); }); - it('should create path from url', function() { + it('should create path from url', function () { const path = pathFromRootToPageDir('http://www.foo.bar/x/y/z.html', {}); expect(path).to.equal('pages/www_foo_bar/x/y/z.html/'); }); - it('should create path from url with sanitized characters', function() { + it('should create path from url with sanitized characters', function () { const path = pathFromRootToPageDir('http://www.foo.bar/x/y/z:200.html', {}); expect(path).to.equal('pages/www_foo_bar/x/y/z-200.html/'); }); - it('should create path from url with query string', function() { + it('should create path from url with query string', function () { const path = pathFromRootToPageDir('http://www.foo.bar/x/y/z?foo=bar', {}); expect(path).to.equal('pages/www_foo_bar/x/y/z/query-115ffe20/'); }); diff --git a/test/prepostscripts/multi.js b/test/prepostscripts/multi.js index a2a17c0bc..e413246d3 100644 --- a/test/prepostscripts/multi.js +++ b/test/prepostscripts/multi.js @@ -1,4 +1,4 @@ -module.exports = async function(context, commands) { +module.exports = async function (context, commands) { await commands.measure.start('https://www.sitespeed.io'); await commands.measure.start('https://www.sitespeed.io/examples/'); return commands.measure.start('https://www.sitespeed.io/documentation/'); diff --git a/test/prepostscripts/postSample.js b/test/prepostscripts/postSample.js index 7f80a4a1d..6ed1417cc 100644 --- a/test/prepostscripts/postSample.js +++ b/test/prepostscripts/postSample.js @@ -1,3 +1,3 @@ -module.exports = async function(context) { +module.exports = async function (context) { context.log.info('In posttask!!!'); }; diff --git a/test/prepostscripts/preSample.js b/test/prepostscripts/preSample.js index 25e5bed3a..464443266 100644 --- a/test/prepostscripts/preSample.js +++ b/test/prepostscripts/preSample.js @@ -1,4 +1,4 @@ -module.exports = async function(context, commands) { +module.exports = async function (context, commands) { context.log.info('In pretask!!!'); await commands.navigate('https://www.sitespeed.io/'); context.taskData.loadedSitespeed = true; diff --git a/test/resultUrlTests.js b/test/resultUrlTests.js index 79ea1dcfa..f763dbf7e 100644 --- a/test/resultUrlTests.js +++ b/test/resultUrlTests.js @@ -12,9 +12,9 @@ function createResultUrls(url, outputFolder, resultBaseURL) { .resultUrls; } -describe('resultUrls', function() { - describe('#hasBaseUrl', function() { - it('should be false if base url is missing', function() { +describe('resultUrls', function () { + describe('#hasBaseUrl', function () { + it('should be false if base url is missing', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', undefined, @@ -23,7 +23,7 @@ describe('resultUrls', function() { expect(resultUrls.hasBaseUrl()).to.be.false; }); - it('should be true if base url is present', function() { + it('should be true if base url is present', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', undefined, @@ -33,8 +33,8 @@ describe('resultUrls', function() { }); }); - describe('#reportSummaryUrl', function() { - it('should create url with default output folder', function() { + describe('#reportSummaryUrl', function () { + it('should create url with default output folder', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', undefined, @@ -44,7 +44,7 @@ describe('resultUrls', function() { `http://results.com/www.foo.bar/${timestampString}` ); }); - it('should create url with absolute output folder', function() { + it('should create url with absolute output folder', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', '/root/leaf', @@ -52,7 +52,7 @@ describe('resultUrls', function() { ); expect(resultUrls.reportSummaryUrl()).to.equal('http://results.com/leaf'); }); - it('should create url with relative output folder', function() { + it('should create url with relative output folder', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', '../leaf', @@ -61,8 +61,8 @@ describe('resultUrls', function() { expect(resultUrls.reportSummaryUrl()).to.equal('http://results.com/leaf'); }); }); - describe('#absoluteSummaryPageUrl', function() { - it('should create url with default output folder', function() { + describe('#absoluteSummaryPageUrl', function () { + it('should create url with default output folder', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', undefined, @@ -74,7 +74,7 @@ describe('resultUrls', function() { `http://results.com/www.foo.bar/${timestampString}/pages/www_foo_bar/xyz/` ); }); - it('should create url with absolute output folder', function() { + it('should create url with absolute output folder', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', '/root/leaf', @@ -84,7 +84,7 @@ describe('resultUrls', function() { resultUrls.absoluteSummaryPageUrl('http://www.foo.bar/xyz') ).to.equal('http://results.com/leaf/pages/www_foo_bar/xyz/'); }); - it('should create url with relative output folder', function() { + it('should create url with relative output folder', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', '../leaf', @@ -95,8 +95,8 @@ describe('resultUrls', function() { ).to.equal('http://results.com/leaf/pages/www_foo_bar/xyz/'); }); }); - describe('#relativeSummaryPageUrl', function() { - it('should create url with default output folder', function() { + describe('#relativeSummaryPageUrl', function () { + it('should create url with default output folder', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', undefined, @@ -106,7 +106,7 @@ describe('resultUrls', function() { resultUrls.relativeSummaryPageUrl('http://www.foo.bar/xyz') ).to.equal('pages/www_foo_bar/xyz/'); }); - it('should create url with absolute output folder', function() { + it('should create url with absolute output folder', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', '/root/leaf', @@ -116,7 +116,7 @@ describe('resultUrls', function() { resultUrls.relativeSummaryPageUrl('http://www.foo.bar/xyz') ).to.equal('pages/www_foo_bar/xyz/'); }); - it('should create url with relative output folder', function() { + it('should create url with relative output folder', function () { const resultUrls = createResultUrls( 'http://www.foo.bar', '../leaf', diff --git a/test/storageManagerTests.js b/test/storageManagerTests.js index 3e2bc107f..76c684535 100644 --- a/test/storageManagerTests.js +++ b/test/storageManagerTests.js @@ -12,9 +12,9 @@ function createManager(url, outputFolder) { return resultsStorage(url, timestamp, { outputFolder }).storageManager; } -describe('storageManager', function() { - describe('#rootPathFromUrl', function() { - it('should create path from url', function() { +describe('storageManager', function () { + describe('#rootPathFromUrl', function () { + it('should create path from url', function () { const storageManager = createManager('http://www.foo.bar'); const path = storageManager.rootPathFromUrl( 'http://www.foo.bar/x/y/z.html' @@ -22,7 +22,7 @@ describe('storageManager', function() { expect(path).to.equal('../../../../../'); }); - it('should create path from url with query string', function() { + it('should create path from url with query string', function () { const storageManager = createManager('http://www.foo.bar'); const path = storageManager.rootPathFromUrl( 'http://www.foo.bar/x/y/z?foo=bar' @@ -31,14 +31,14 @@ describe('storageManager', function() { }); }); - describe('#getBaseDir', function() { - it('should create base dir with default output folder', function() { + describe('#getBaseDir', function () { + it('should create base dir with default output folder', function () { const storageManager = createManager('http://www.foo.bar'); expect(storageManager.getBaseDir()).to.equal( path.resolve('sitespeed-result', 'www.foo.bar', timestampString) ); }); - it('should create base dir with custom output folder', function() { + it('should create base dir with custom output folder', function () { const storageManager = createManager( 'http://www.foo.bar', '/tmp/sitespeed.io/foo' @@ -47,14 +47,14 @@ describe('storageManager', function() { }); }); - describe('#getStoragePrefix', function() { - it('should create prefix with default output folder', function() { + describe('#getStoragePrefix', function () { + it('should create prefix with default output folder', function () { const storageManager = createManager('http://www.foo.bar'); expect(storageManager.getStoragePrefix()).to.equal( path.join('www.foo.bar', timestampString) ); }); - it('should create prefix with custom output folder', function() { + it('should create prefix with custom output folder', function () { const storageManager = createManager( 'http://www.foo.bar', '/tmp/sitespeed.io/foo' diff --git a/tools/check-licenses.js b/tools/check-licenses.js index ec2e2864e..e538d137f 100755 --- a/tools/check-licenses.js +++ b/tools/check-licenses.js @@ -9,7 +9,7 @@ checker.init( { start: '.' }, - function(err, json) { + function (err, json) { if (err) { console.error(err.message); process.exit(1); diff --git a/tools/tcp-server.js b/tools/tcp-server.js index 736f07feb..a4a916721 100755 --- a/tools/tcp-server.js +++ b/tools/tcp-server.js @@ -4,8 +4,8 @@ const net = require('net'); const server = net - .createServer(function(sock) { - sock.on('data', function(data) { + .createServer(function (sock) { + sock.on('data', function (data) { console.log(data.toString()); }); }) diff --git a/tools/udp-server.js b/tools/udp-server.js index 6640da1d1..b71a05ba7 100755 --- a/tools/udp-server.js +++ b/tools/udp-server.js @@ -4,11 +4,11 @@ const dgram = require('dgram'); const server = dgram.createSocket('udp4'); -server.on('message', function(msg) { +server.on('message', function (msg) { console.log(msg.toString()); }); -server.on('listening', function() { +server.on('listening', function () { const address = server.address(); console.log('udp server listening ' + address.address + ':' + address.port); });