diff --git a/.travis.yml b/.travis.yml index 026d1facd..f255e1229 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,17 +30,19 @@ script: - bin/sitespeed.js --useHash -n 1 https://www.sitespeed.io/#heybaberia - bin/sitespeed.js --useAlias start --mobile -n 1 --utc https://www.sitespeed.io/ - bin/sitespeed.js -b firefox --metrics.list --mobile -n 1 https://www.sitespeed.io/ -- bin/sitespeed.js -b chrome -n 2 https://www.sitespeed.io/ --preScript test/prepostscripts/preSample.js - --postScript test/prepostscripts/postSample.js +- bin/sitespeed.js --multi -b chrome -n 1 test/prepostscripts/preSample.js https://www.sitespeed.io/documentation/ test/prepostscripts/postSample.js - 'if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then bin/sitespeed.js -b chrome -n 2 --summaryDetail --browsertime.chrome.timeline https://www.sitespeed.io/ --webpagetest.key $WPTKEY; fi' - node test/runWithoutCli.js +- bin/sitespeed.js --multi -n 1 https://www.sitespeed.io/ https://www.sitespeed.io/documentation/ +- bin/sitespeed.js --multi -n 3 test/prepostscripts/multi.js + env: global: - CXX=g++-4.8 - secure: ZCqHD+/PhHNVFWoqir66Xd9YeJRcTHDJYvNL9j4+GTKDEI1h94twhAjQ7Z9DhlCnXwL1lsfEcIjvNCWd3ir/FNy2oZsUzu6kMpFF/niugurFbS551moJ2ObNEfOdj93/sTo4UWH2MZouC9eYeuj1vNYbAev6wBIptL95X/ArldQ= - secure: ZmEirO6J+rY+6T6eQWRNxqiqRNOYJktqQWaeUDR6WvzoR80oPdgKoNRS012dk4aCGr2+Dxf/KP6Iu2qbDE3YP3QD7PhoexicTVB6MTl81hZfX/eN0lt4lZknTYtjnAAWQB/aWAM6OVLjh8rAzq9PTBzl5EtAeMMJWmnhz6r+cLc= notifications: - slack: + slack: on_success: change on_failure: always secure: 3Ca5MzTVkgeZDKk7xuiXnGnl0u4UgBXQtn72xIBwb1nked0JSdwZ4MVgNTVRTlIvwbTdTaYcTo7Pm4+rSrfFx2T1juawq3TkUStJ4AmZHH2gGrAr46snEauWCovHmgo3mMAOwz3fJknz8VfIu7WmtiCH/GO9h20aNmjE1UT3pTE= diff --git a/lib/cli/cli.js b/lib/cli/cli.js index aeb957156..22649e52a 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -8,6 +8,7 @@ let yargs = require('yargs'), cliUtil = require('./util'), fs = require('fs'), set = require('lodash.set'), + urlValidator = require('valid-url'), toArray = require('../support/util').toArray, grafanaConfig = require('../plugins/grafana/index').config, graphiteConfig = require('../plugins/graphite/index').config, @@ -42,6 +43,25 @@ function validateInput(argv) { return 'You have a miss match between number of alias and URLs.'; } + // validate URLs/files + const urlOrFiles = argv._; + for (let urlOrFile of urlOrFiles) { + if (urlOrFile.startsWith('http')) { + if (!urlValidator.isWebUri(urlOrFile)) { + return ( + urlOrFile + 'is not a valid url (e.g. http://www.browsertime.net)' + ); + } + } else { + // is existing file? + try { + fs.statSync(urlOrFile); + } catch (e) { + return urlOrFile + 'does not exist, is the path to the file correct?'; + } + } + } + return true; } @@ -49,7 +69,7 @@ module.exports.parseCommandLine = function parseCommandLine() { let parsed = yargs .env('SITESPEED_IO') .usage('$0 [options] /') - .require(1, 'urlOrFile') + .require(1, 'One or multiple URLs or scripts') .version(() => `${packageInfo.version}`) .option('debug', { default: false, @@ -170,18 +190,6 @@ module.exports.parseCommandLine = function parseCommandLine() { 'A URL that will be accessed first by the browser before the URL that you wanna analyze. Use it to fill the cache.', group: 'Browser' }) - .option('browsertime.preScript', { - alias: 'preScript', - describe: - 'Selenium script(s) to run before you test your URL (use it for login, warm the cache, etc). Note that --preScript can be passed multiple times.', - group: 'Browser' - }) - .option('browsertime.postScript', { - alias: 'postScript', - describe: - 'Selenium script(s) to run after you test your URL (use it for logout etc). Note that --postScript can be passed multiple times.', - group: 'Browser' - }) .option('browsertime.delay', { alias: 'delay', describe: @@ -876,6 +884,12 @@ module.exports.parseCommandLine = function parseCommandLine() { default: false, type: 'boolean' }) + .option('multi', { + describe: + 'Test multiple URLs within the same browser session (same cache etc). Use this if you want to test multiple pages (use journey) or want to test multiple pages with scripts. You can mix URLs and scripts (the order will matter): login.js https://www.sitespeed.io/ logout.js ', + default: false, + type: 'boolean' + }) .help('h') .alias('help', 'h') .config('config') @@ -983,7 +997,7 @@ module.exports.parseCommandLine = function parseCommandLine() { } return { - urls: cliUtil.getURLs(argv._), + urls: argv.multi ? argv._ : cliUtil.getURLs(argv._), urlsMetaData: cliUtil.getAliases(argv._, argv.urlAlias), options: argv, explicitOptions: explicitOptions diff --git a/lib/core/script-source.js b/lib/core/script-source.js new file mode 100644 index 000000000..f7fda600d --- /dev/null +++ b/lib/core/script-source.js @@ -0,0 +1,15 @@ +'use strict'; +const messageMaker = require('../support/messageMaker'); + +const make = messageMaker('scrtipt-reader').make; + +module.exports = { + open(context, options) { + this.options = options; + }, + findUrls(queue) { + queue.postMessage( + make('browsertime.navigationScripts', {}, { url: this.options.urls }) + ); + } +}; diff --git a/lib/core/url-source.js b/lib/core/url-source.js index e74465ad3..7387fae61 100644 --- a/lib/core/url-source.js +++ b/lib/core/url-source.js @@ -1,8 +1,7 @@ 'use strict'; -const urlParser = require('url'), - messageMaker = require('../support/messageMaker'); - +const urlParser = require('url'); +const messageMaker = require('../support/messageMaker'); const make = messageMaker('url-reader').make; module.exports = { diff --git a/lib/plugins/browsertime/analyzer.js b/lib/plugins/browsertime/analyzer.js index 8151358bd..5c9e19711 100644 --- a/lib/plugins/browsertime/analyzer.js +++ b/lib/plugins/browsertime/analyzer.js @@ -4,7 +4,6 @@ const merge = require('lodash.merge'); const forEach = require('lodash.foreach'); const path = require('path'); const browsertime = require('browsertime'); -const log = require('intel').getLogger('sitespeedio.plugin.browsertime'); const set = require('lodash.set'); const get = require('lodash.get'); const coach = require('webcoach'); @@ -64,7 +63,13 @@ function setupAsynScripts(asyncScripts) { } module.exports = { - async analyzeUrl(url, options, pluginScripts, pluginAsyncScripts) { + async analyzeUrl( + url, + scriptOrMultiple, + pluginScripts, + pluginAsyncScripts, + options + ) { const btOptions = merge({}, defaultBrowsertimeOptions, options); // set mobile options @@ -98,12 +103,6 @@ module.exports = { } scriptsByCategory = await addExtraScripts(scriptsByCategory, pluginScripts); const engine = new browsertime.Engine(btOptions); - log.info( - 'Starting %s for analysing %s %s time(s)', - btOptions.browser, - url, - btOptions.iterations - ); const asyncScript = pluginAsyncScripts.length > 0 @@ -112,8 +111,11 @@ module.exports = { try { await engine.start(); - const result = await engine.run(url, scriptsByCategory, asyncScript); - return result; + if (scriptOrMultiple) { + return engine.runMultiple(url, scriptsByCategory, asyncScript); + } else { + return engine.run(url, scriptsByCategory, asyncScript); + } } finally { await engine.stop(); } diff --git a/lib/plugins/browsertime/index.js b/lib/plugins/browsertime/index.js index 9b8494ec2..fc66154e9 100644 --- a/lib/plugins/browsertime/index.js +++ b/lib/plugins/browsertime/index.js @@ -10,7 +10,7 @@ const dayjs = require('dayjs-ext'); const isEmpty = require('lodash.isempty'); const get = require('lodash.get'); const defaultConfig = require('./default/config'); -const visitedUrls = new Set(); +const urlParser = require('url'); const TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss'; const DEFAULT_METRICS_PAGE_SUMMARY = require('./default/metricsPageSummary'); const DEFAULT_METRICS_SUMMARY = require('./default/metricsSummary'); @@ -36,6 +36,7 @@ module.exports = { 'browsertime.screenshotParams.type', defaultConfig.screenshotParams.type ); + this.scriptOrMultiple = options.multi; // hack for disabling viewport on Android that's not supported if ( @@ -111,193 +112,197 @@ module.exports = { break; } // We got a URL that we want to test + case 'browsertime.navigationScripts': case 'url': { - const url = message.url; - const group = message.group; - visitedUrls.add(url); + let url = message.url; + let group = message.group; // manually set the resultBaseDir // it's used in BT when we record a video - options.resultDir = await this.storageManager.createDirForUrl( - message.url, - 'data' - ); + options.resultDir = await this.storageManager.getBaseDir(); const consoleLogAggregator = new ConsoleLogAggregator(options); const result = await analyzer.analyzeUrl( url, - options, + this.scriptOrMultiple, this.pluginScripts, - this.pluginAsyncScripts + this.pluginAsyncScripts, + options ); log.verbose('Result from Browsertime for %s with %:2j', url, result); - let runIndex = 0; - for (let run of result.browserScripts) { - if (result.har) { - // Add meta data to be used when we compare multiple HARs - // the meta field is added in Browsertime - const _meta = result.har.log.pages[runIndex]._meta; - - // add the defintion for first party/third party - if (this.firstParty) { - _meta.firstParty = this.firstParty; - } - if (this.resultUrls.hasBaseUrl()) { - const base = this.resultUrls.absoluteSummaryPagePath(url); - _meta.screenshot = `${base}data/screenshots/${runIndex + 1}.${ - this.screenshotType - }`; - _meta.result = `${base}${runIndex + 1}.html`; - if (options.video) { - _meta.video = `${base}data/video/${runIndex + 1}.mp4`; - } - } - run.har = api.pickAPage(result.har, runIndex); - } - - // Kind of ugly way to add visualMetrics to a run - // it's outside of browserScripts today - // we could instead pass browsertime.visualMetrics maybe - if (result.visualMetrics) { - run.visualMetrics = result.visualMetrics[runIndex]; - } - - if (result.cpu) { - run.cpu = result.cpu[runIndex]; - } - - run.timestamp = dayjs(result.timestamps[runIndex]).format( - TIME_FORMAT - ); - - queue.postMessage( - make('browsertime.run', run, { - url, - group, - runIndex, - iteration: runIndex + 1 - }) - ); - - if (options.chrome && options.chrome.collectConsoleLog) { - try { - const consoleData = await consoleLogAggregator.addStats( - runIndex + 1 - ); - - queue.postMessage( - make('browsertime.console', consoleData, { - url, - group, - runIndex, - iteration: runIndex + 1 - }) - ); - } catch (e) { - // This could happen if the run failed somehow - log.error('Could not fetch the console log'); - } - } - - // In Browsertime 2.x the tracelog was part of the result but since 3.x - // it is stored to disk. If you want it passed around in the queue, just add - // --postChromeTrace - if ( - options.chrome && - options.chrome.timeline && - this.postChromeTrace - ) { - const traceData = await getGzippedFileAsJson( - options.resultDir, - `trace-${runIndex + 1}.json.gz` - ); - queue.postMessage( - make('browsertime.chrometrace', traceData, { - url, - group, - name: `trace-${runIndex + 1}.json`, // backward compatible to 2.x - runIndex - }) - ); - } - - // If the coach is turned on, collect the coach result - if (options.coach) { - const coachAdvice = run.coach.coachAdvice; - // check if the coach has error(s) - if (!isEmpty(coachAdvice.errors)) { - log.error( - '%s generated the following errors in the coach %:2j', - url, - coachAdvice.errors - ); - queue.postMessage( - make( - 'error', - 'The coach got the following errors: ' + - JSON.stringify(coachAdvice.errors), - { - url, - runIndex, - iteration: runIndex + 1 - } - ) - ); - } - - let advice = coachAdvice; - // If we run without HAR + for (let resultIndex = 0; resultIndex < result.length; resultIndex++) { + url = result[resultIndex].info.url; + group = urlParser.parse(url).hostname; + let runIndex = 0; + for (let run of result[resultIndex].browserScripts) { + let harIndex = runIndex * result.length; + harIndex += resultIndex; if (result.har) { - // make sure to get the right run in the HAR - const myHar = api.pickAPage(result.har, runIndex); - const harResult = await api.runHarAdvice(myHar); - advice = api.merge(coachAdvice, harResult); + // Add meta data to be used when we compare multiple HARs + // the meta field is added in Browsertime + const _meta = result.har.log.pages[harIndex]._meta; + + // add the defintion for first party/third party + if (this.firstParty) { + _meta.firstParty = this.firstParty; + } + if (this.resultUrls.hasBaseUrl()) { + const base = this.resultUrls.absoluteSummaryPagePath(url); + _meta.screenshot = `${base}data/screenshots/${runIndex + 1}.${ + this.screenshotType + }`; + _meta.result = `${base}${runIndex + 1}.html`; + if (options.video) { + _meta.video = `${base}data/video/${runIndex + 1}.mp4`; + } + } + run.har = api.pickAPage(result.har, harIndex); } + + // Kind of ugly way to add visualMetrics to a run + // it's outside of browserScripts today + // we could instead pass browsertime.visualMetrics maybe + if (result[resultIndex].visualMetrics) { + run.visualMetrics = result[resultIndex].visualMetrics[runIndex]; + } + + if (result[resultIndex].cpu) { + run.cpu = result[resultIndex].cpu[runIndex]; + } + + run.timestamp = dayjs( + result[resultIndex].timestamps[runIndex] + ).format(TIME_FORMAT); + queue.postMessage( - make('coach.run', advice, { + make('browsertime.run', run, { url, group, runIndex, iteration: runIndex + 1 }) ); + + if (options.chrome && options.chrome.collectConsoleLog) { + try { + const consoleData = await consoleLogAggregator.addStats( + runIndex + 1 + ); + + queue.postMessage( + make('browsertime.console', consoleData, { + url, + group, + runIndex, + iteration: runIndex + 1 + }) + ); + } catch (e) { + // This could happen if the run failed somehow + log.error('Could not fetch the console log'); + } + } + + // In Browsertime 2.x the tracelog was part of the result but since 3.x + // it is stored to disk. If you want it passed around in the queue, just add + // --postChromeTrace + if ( + options.chrome && + options.chrome.timeline && + this.postChromeTrace + ) { + const traceData = await getGzippedFileAsJson( + options.resultDir, + `trace-${runIndex + 1}.json.gz` + ); + queue.postMessage( + make('browsertime.chrometrace', traceData, { + url, + group, + name: `trace-${runIndex + 1}.json`, // backward compatible to 2.x + runIndex + }) + ); + } + + // If the coach is turned on, collect the coach result + if (options.coach) { + const coachAdvice = run.coach.coachAdvice; + // check if the coach has error(s) + if (!isEmpty(coachAdvice.errors)) { + log.error( + '%s generated the following errors in the coach %:2j', + url, + coachAdvice.errors + ); + queue.postMessage( + make( + 'error', + 'The coach got the following errors: ' + + JSON.stringify(coachAdvice.errors), + { + url, + runIndex, + iteration: runIndex + 1 + } + ) + ); + } + + let advice = coachAdvice; + // If we run without HAR + if (result.har) { + // make sure to get the right run in the HAR + const myHar = api.pickAPage(result.har, harIndex); + const harResult = await api.runHarAdvice(myHar); + advice = api.merge(coachAdvice, harResult); + } + queue.postMessage( + make('coach.run', advice, { + url, + group, + runIndex, + iteration: runIndex + 1 + }) + ); + } + + aggregator.addToAggregate(run, group); + runIndex++; } - aggregator.addToAggregate(run, group); - runIndex++; - } + // Let take the first runs timestamp and use that as the summary timestamp + result.timestamp = dayjs(result[resultIndex].timestamps[0]).format( + TIME_FORMAT + ); - // Let take the first runs timestamp and use that as the summary timestamp - result.timestamp = dayjs(result.timestamps[0]).format(TIME_FORMAT); + if (options.chrome && options.chrome.collectConsoleLog) { + result.statistics.console = consoleLogAggregator.summarizeStats(); + } - if (options.chrome && options.chrome.collectConsoleLog) { - result.statistics.console = consoleLogAggregator.summarizeStats(); - } - - // Post the result on the queue so other plugins can use it - queue.postMessage( - make('browsertime.pageSummary', result, { - url, - group - }) - ); - - // Post the HAR on the queue so other plugins can use it - if (result.har) { + // Post the result on the queue so other plugins can use it queue.postMessage( - make('browsertime.har', result.har, { + make('browsertime.pageSummary', result[resultIndex], { url, group }) ); - } + // Post the HAR on the queue so other plugins can use it + if (result.har) { + queue.postMessage( + make('browsertime.har', result.har, { + url, + group + }) + ); + } - // Check for errors. Browsertime errors is an array of all iterations - // [[],[],[]] where one iteration can have multiple errors - for (let errorsForOneIteration of result.errors) { - for (let error of errorsForOneIteration) { - queue.postMessage(make('error', error, merge({ url }))); + // Check for errors. Browsertime errors is an array of all iterations + // [[],[],[]] where one iteration can have multiple errors + for (let errorsForOneIteration of result[resultIndex].errors) { + for (let error of errorsForOneIteration) { + queue.postMessage(make('error', error, merge({ url }))); + } } } - break; } // It's time to summarize the metrics for all pages and runs diff --git a/lib/plugins/html/htmlBuilder.js b/lib/plugins/html/htmlBuilder.js index 7b94104fb..fdfea7ef6 100644 --- a/lib/plugins/html/htmlBuilder.js +++ b/lib/plugins/html/htmlBuilder.js @@ -170,11 +170,17 @@ class HTMLBuilder { ); const urlPageRenders = []; + let pageNumber = 0; + const testedPages = Object.keys(validPages).length; for (let url of Object.keys(validPages)) { const pageInfo = validPages[url]; const runPages = dataCollector.getURLRuns(url); const medianRun = metricHelper.pickMedianRun(runPages, pageInfo); + // If we have multiple URLs in the same HAR the median run must be converted + // to the right run in the HAR + const harIndex = pageNumber + (medianRun.runIndex - 1) * testedPages; let summaryPageHAR = get(pageInfo, 'data.browsertime.har'); + pageNumber++; // if we don't use Browsertime, we don't get the browser version const browser = summaryPageHAR ? { @@ -215,13 +221,13 @@ class HTMLBuilder { const pageSummaries = this.pageSummaries.filter( summary => !!get(pageInfo.data, [summary.id, 'pageSummary']) ); - let data = { daurl: url, daurlAlias, pageInfo, options, runPages, + harIndex, summaryPageHAR, medianRun, browser, @@ -272,6 +278,7 @@ class HTMLBuilder { daurlAlias, iteration, runIndex, + harIndex: runIndex, // for individual runs, the run index is correct for the HAR pageInfo, options, runPages, diff --git a/lib/plugins/html/metricHelper.js b/lib/plugins/html/metricHelper.js index d02f03924..be51cb4b3 100644 --- a/lib/plugins/html/metricHelper.js +++ b/lib/plugins/html/metricHelper.js @@ -15,7 +15,7 @@ module.exports = { 'data.browsertime.pageSummary.statistics.timings.rumSpeedIndex.median' ); if (speedIndexMedian) { - for (var run of runs) { + for (let run of runs) { if ( speedIndexMedian === run.data.browsertime.run.visualMetrics.SpeedIndex ) { @@ -26,7 +26,7 @@ module.exports = { } } } else if (rumSpeedIndexMedian) { - for (var rumRuns of runs) { + for (let rumRuns of runs) { // make sure we run Browsertime for that run = 3 runs WPT and 2 runs BT if ( rumRuns.data.browsertime && diff --git a/lib/plugins/html/templates/url/waterfall/fetchHAR.pug b/lib/plugins/html/templates/url/waterfall/fetchHAR.pug index ae2c0f551..9f6707a5a 100644 --- a/lib/plugins/html/templates/url/waterfall/fetchHAR.pug +++ b/lib/plugins/html/templates/url/waterfall/fetchHAR.pug @@ -13,7 +13,7 @@ script(type='text/javascript'). leftColumnWidth: 30, legendHolder: legendHolderEl, pageSelector: pageSelectorEl, - selectedPage: #{runIndex || medianRun.runIndex} + selectedPage: #{harIndex} }; if options.gzipHAR script(src= rootPath + 'js/gunzip.min.js') diff --git a/lib/plugins/html/templates/url/waterfall/includeHARinHTML.pug b/lib/plugins/html/templates/url/waterfall/includeHARinHTML.pug index 9884d2c86..0a73906eb 100644 --- a/lib/plugins/html/templates/url/waterfall/includeHARinHTML.pug +++ b/lib/plugins/html/templates/url/waterfall/includeHARinHTML.pug @@ -15,7 +15,7 @@ script(type='text/javascript'). showMimeTypeIcon: true, leftColumnWidth: 30, legendHolder: legendHolderEl, - selectedPage: #{runIndex || medianRun.runIndex}, + selectedPage: #{harIndex}, pageSelector: pageSelectorEl }; diff --git a/lib/plugins/html/templates/url/waterfall/index.pug b/lib/plugins/html/templates/url/waterfall/index.pug index 27cf74a2f..3950cac32 100644 --- a/lib/plugins/html/templates/url/waterfall/index.pug +++ b/lib/plugins/html/templates/url/waterfall/index.pug @@ -12,7 +12,7 @@ if medianRun if (options.html.showAllWaterfallSummary === true) p Choose HAR: select#page-selector - + #legend-holder if options.html.fetchHARFiles diff --git a/lib/plugins/pagexray/index.js b/lib/plugins/pagexray/index.js index e4b15f43e..084ce69d6 100644 --- a/lib/plugins/pagexray/index.js +++ b/lib/plugins/pagexray/index.js @@ -64,7 +64,6 @@ module.exports = { this.usingBrowsertime || (!this.usingBrowsertime && this.usingWebpagetest) ) { - const url = message.url; const group = message.group; let config = { includeAssets: true, @@ -75,20 +74,30 @@ module.exports = { const pageSummary = pagexray.convert(message.data, config); pagexrayAggregator.addToAggregate(pageSummary, group); - queue.postMessage( - make('pagexray.pageSummary', pageSummary[0], { url, group }) - ); - - pageSummary.forEach((run, runIndex) => { + // The HAR file can have multiple URLs + const sentURL = {}; + for (let summary of pageSummary) { + if (!sentURL[summary.url]) { + sentURL[summary.url] = 1; + queue.postMessage( + make('pagexray.pageSummary', summary, { + url: summary.url, + group // TODO get the group from the URL? + }) + ); + } else { + sentURL[summary.url] += 1; + } + // Send each individual run too queue.postMessage( - make('pagexray.run', run, { - url, + make('pagexray.run', summary, { + url: summary.url, group, - runIndex, - iteration: runIndex + 1 + runIndex: sentURL[summary.url] - 1, + iteration: sentURL[summary.url] }) ); - }); + } } break; } diff --git a/lib/sitespeed.js b/lib/sitespeed.js index 8ff7ac5dc..b4e3752fb 100644 --- a/lib/sitespeed.js +++ b/lib/sitespeed.js @@ -14,10 +14,11 @@ const filterRegistry = require('./support/filterRegistry'); const statsHelpers = require('./support/statsHelpers'); const packageInfo = require('../package'); -const QueueHandler = require('./core/queueHandler'), - resultsStorage = require('./core/resultsStorage'), - loader = require('./core/pluginLoader'), - urlSource = require('./core/url-source'); +const QueueHandler = require('./core/queueHandler'); +const resultsStorage = require('./core/resultsStorage'); +const loader = require('./core/pluginLoader'); +const urlSource = require('./core/url-source'); +const scriptSource = require('./core/script-source'); const budgetResult = { working: {}, @@ -101,7 +102,7 @@ module.exports = { } const runningPlugins = await loader.loadPlugins(pluginNames); - let urlSources = [urlSource]; + const urlSources = [options.multi ? scriptSource : urlSource]; const allPlugins = urlSources.concat(runningPlugins); const queueHandler = new QueueHandler(runningPlugins, options); diff --git a/package-lock.json b/package-lock.json index b017a8f4d..46732118c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,153 @@ { "name": "sitespeed.io", - "version": "7.7.2", + "version": "8.0.0-alpha.0", "lockfileVersion": 1, "requires": true, "dependencies": { + "@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", + "requires": { + "debug": "^3.1.0", + "lodash.once": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, "@sindresorhus/is": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", "dev": true }, + "@sitespeed.io/chromedriver": { + "version": "2.44.1", + "resolved": "https://registry.npmjs.org/@sitespeed.io/chromedriver/-/chromedriver-2.44.1.tgz", + "integrity": "sha512-AKRTK5uFBJcHHs34xtBsPYLaZmoamkxHI6NpDw4RS7e0SDe/JIiOe0GG1ZAGoOzUy4Mt7XEprScEvZfNMwYw6Q==", + "requires": { + "node-downloader-helper": "1.0.9", + "node-stream-zip": "1.7.0" + }, + "dependencies": { + "node-downloader-helper": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/node-downloader-helper/-/node-downloader-helper-1.0.9.tgz", + "integrity": "sha512-X2cuBotLy2D3LdQAvhOAZ6IfcMGT6ssn+hCEm6yPJzhjr+S/YjyTLTxhnAe1pr5/jxGABD+b3SN8WpuBL5J2Dw==" + }, + "node-stream-zip": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.7.0.tgz", + "integrity": "sha512-kYVtF3lK++53Bg6hZNplYVMrR7Lt0IYdLWehgoHUJLJcSwg/xd2Rm2Z7kJ5W8ZA7pdeg/DiUQDatbYwL3C7qSw==" + } + } + }, + "@sitespeed.io/geckodriver": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@sitespeed.io/geckodriver/-/geckodriver-0.23.1.tgz", + "integrity": "sha512-sIqiYT1UUExBXuUD8Vdbk6xiEwhxbHqtMBBXfnSMYNlNZu8XXRo1OX0i+KSdIp7TlTpJwbaiZGfqxbgx646fhA==", + "requires": { + "node-downloader-helper": "1.0.9", + "node-stream-zip": "1.7.0", + "tar": "4.4.8" + }, + "dependencies": { + "chownr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==" + }, + "fs-minipass": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "requires": { + "minipass": "^2.2.1" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "minipass": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "node-downloader-helper": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/node-downloader-helper/-/node-downloader-helper-1.0.9.tgz", + "integrity": "sha512-X2cuBotLy2D3LdQAvhOAZ6IfcMGT6ssn+hCEm6yPJzhjr+S/YjyTLTxhnAe1pr5/jxGABD+b3SN8WpuBL5J2Dw==" + }, + "node-stream-zip": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.7.0.tgz", + "integrity": "sha512-kYVtF3lK++53Bg6hZNplYVMrR7Lt0IYdLWehgoHUJLJcSwg/xd2Rm2Z7kJ5W8ZA7pdeg/DiUQDatbYwL3C7qSw==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "tar": { + "version": "4.4.8", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" + } + } + }, "@sitespeed.io/throttle": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@sitespeed.io/throttle/-/throttle-0.4.3.tgz", - "integrity": "sha512-Kb3F2wOzWLrOGBE47zcIwp4vvT9PxpPqOpl5zVaQHCVS3r55sCraYLyo20aP2cNPlnjmi66WvAUB92a1Y5Plfw==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@sitespeed.io/throttle/-/throttle-0.5.0.tgz", + "integrity": "sha512-T1oMp/JOLly3w6NPzmDRlytmBLAceSj9gbF7Q/yR81n7rB61m9XeK54wBiN8aklV5ldE6b6gZzJ8kn7sjmEemQ==", "requires": { "execa": "0.10.0", "minimist": "1.2.0" @@ -490,6 +624,11 @@ "integrity": "sha1-g4qZLan51zfg9LLbC+YrsJ3Qxeg=", "dev": true }, + "bindings": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.1.tgz", + "integrity": "sha512-i47mqjF9UbjxJhxGf+pZ6kSxrnI3wBLlnGI2ArWJ4r0VrvDS7ZYXkprq/pLaBWYq4GM0r4zdHY+NNRqEMU7uew==" + }, "bl": { "version": "1.2.2", "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz", @@ -539,18 +678,20 @@ "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=" }, "browsertime": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/browsertime/-/browsertime-3.12.0.tgz", - "integrity": "sha512-kWEFgh2gqzeeCCWhiJ78aNgFprt7sy4Dl7TQ30gQvgSvCFSQ4nOwb0TmoHRbQJ5K0o4eYjxNS4ixkZNo0SC6Vw==", + "version": "4.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/browsertime/-/browsertime-4.0.0-alpha.4.tgz", + "integrity": "sha512-Woi9Zo1t3cVNLb9Wxq/mhZOO47gTY62RSjfQx4nla6WpgnXZMQuy+HvhK+NUGinjNB7Ea7IFex63WadFVK2h3A==", "requires": { - "@sitespeed.io/throttle": "0.4.3", + "@cypress/xvfb": "1.2.4", + "@sitespeed.io/chromedriver": "2.44.1", + "@sitespeed.io/geckodriver": "0.23.1", + "@sitespeed.io/throttle": "0.5.0", "adbkit": "2.11.0", - "alto-saxophone": "2.43.1", - "chrome-har": "0.5.0", - "chrome-trace": "0.1.1", - "dayjs": "1.7.7", - "execa": "0.10.0", - "fast-stats": "0.0.3", + "chrome-har": "0.7.1", + "chrome-trace": "0.2.0", + "dayjs": "1.7.8", + "execa": "1.0.0", + "fast-stats": "0.0.4", "hasbin": "1.2.3", "intel": "1.2.0", "lodash.foreach": "4.5.0", @@ -563,11 +704,9 @@ "lodash.set": "4.3.2", "mkdirp": "0.5.1", "selenium-webdriver": "3.6.0", - "sharp": "0.20.2", - "soprano-saxophone": "0.23.0", + "sharp": "0.21.1", "valid-url": "1.0.9", - "xvfb": "0.2.3", - "yargs": "11.0.0" + "yargs": "12.0.5" }, "dependencies": { "ansi-regex": { @@ -575,24 +714,110 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, - "fast-stats": { - "version": "0.0.3", - "resolved": "http://registry.npmjs.org/fast-stats/-/fast-stats-0.0.3.tgz", - "integrity": "sha1-ZQr5Y8P/hcSWo2EPINQM1MFkWU0=" + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==" + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } }, "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "requires": { - "locate-path": "^2.0.0" + "locate-path": "^3.0.0" } }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" + }, "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=" }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "requires": { + "invert-kv": "^2.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "mem": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", + "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==", + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^1.1.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -611,22 +836,31 @@ } }, "yargs": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", - "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "requires": { "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", + "os-locale": "^3.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", "string-width": "^2.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -821,6 +1055,11 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=" } } }, @@ -903,16 +1142,21 @@ "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==" }, "chrome-har": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/chrome-har/-/chrome-har-0.5.0.tgz", - "integrity": "sha512-tNwBcsjwCzeo2CJxbfkVGzjdvZsRHddUcxoJsLdAkU/QH8RewPlOCKk9vMZHs9nB8mx5QKU8EXSC6qcxYynWgg==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/chrome-har/-/chrome-har-0.7.1.tgz", + "integrity": "sha512-dN2qyd3/kOKzA6lY45iYBtqABuHyPKI1l5f05D9yDwkZT8c2CXz5umfjxcs5eAjSl7/m0jI7mxfmHS+xxT3Dcw==", "requires": { + "dayjs": "1.7.7", "debug": "3.1.0", - "moment": "2.21.0", "tough-cookie": "2.3.4", "uuid": "3.2.1" }, "dependencies": { + "dayjs": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.7.7.tgz", + "integrity": "sha512-Qlkiu0NNDpYwhk0syK4ImvAl/5YnsEMkvC2O123INviGeOA3Q8s5VyVkZzmN5SC7Wv9bb1+rfwO+uSqtHB4UWw==" + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -929,9 +1173,9 @@ } }, "chrome-trace": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/chrome-trace/-/chrome-trace-0.1.1.tgz", - "integrity": "sha512-7jOVAjBBLFaki+KsZpj030dTWil4XXxr40uMK1bCE9LfTyvyy3UORKw1osEe1Mo1/W1i2nbi20WCDNlbzEP2Nw==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/chrome-trace/-/chrome-trace-0.2.0.tgz", + "integrity": "sha512-5tSMPdQeEHXuf2n/Qgnc+9UkAAaQWs2DqxQ3rKcRrUH3RcMM+cDX41G+hIN7MRGDqH9I0LmD1qnAYKxf86Xnlg==", "requires": { "debug": "^3.1.0" }, @@ -1433,9 +1677,9 @@ "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=" }, "dayjs": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.7.7.tgz", - "integrity": "sha512-Qlkiu0NNDpYwhk0syK4ImvAl/5YnsEMkvC2O123INviGeOA3Q8s5VyVkZzmN5SC7Wv9bb1+rfwO+uSqtHB4UWw==" + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.7.8.tgz", + "integrity": "sha512-Gp4Y5KWeSri0QOWGzHQz7VrKDkfEpS92dCLK7P8hYowRFbaym1vj3d6CoHio3apSS4KSi/qb5Edemv26IN5Hfg==" }, "dayjs-ext": { "version": "2.2.0", @@ -2571,9 +2815,9 @@ } }, "expand-template": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.1.tgz", - "integrity": "sha512-cebqLtV8KOZfw0UI8TEFWxtczxxC1jvyUvx6H4fyp1K1FN7A4Q+uggVUlOsI1K8AGU0rwOGqP8nCapdrw8CYQg==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" }, "extend": { "version": "3.0.1", @@ -3136,9 +3380,9 @@ } }, "glogg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", - "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", "requires": { "sparkles": "^1.0.0" } @@ -4663,6 +4907,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, "requires": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -4671,7 +4916,8 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true } } }, @@ -4834,6 +5080,11 @@ "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", "dev": true }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, "lodash.pick": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", @@ -5026,6 +5277,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, "requires": { "mimic-fn": "^1.0.0" } @@ -5163,9 +5415,9 @@ } }, "minizlib": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.1.tgz", - "integrity": "sha512-TrfjCjk4jLhcJyGMYymBH6oTXcWjYbUAXTHDbtnWHjZC25h0cdajHuPE1zxb4DVmu8crfh+HwH/WMuyLG0nHBg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "requires": { "minipass": "^2.2.1" } @@ -5334,6 +5586,11 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" }, + "napi-build-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.1.tgz", + "integrity": "sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA==" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -5667,6 +5924,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, "requires": { "execa": "^0.7.0", "lcid": "^1.0.0", @@ -5677,6 +5935,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, "requires": { "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", @@ -5687,6 +5946,7 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, "requires": { "cross-spawn": "^5.0.1", "get-stream": "^3.0.0", @@ -5754,6 +6014,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, "requires": { "p-limit": "^1.1.0" }, @@ -5762,6 +6023,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, "requires": { "p-try": "^1.0.0" } @@ -5783,17 +6045,17 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" }, "pagexray": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/pagexray/-/pagexray-2.5.0.tgz", - "integrity": "sha512-DG2W4DHzauzSfxy3hN4injcZlqTFMEv3Obtmd2eG6iz3Co1QV+1b5H2LnR9dS5UFp5+OrzIeqN0eFImSQgd+WA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/pagexray/-/pagexray-2.5.1.tgz", + "integrity": "sha512-4wTG/0Iuoe/TCcacTAtvLDByh6kdEQpRW+ISIYT/Kw3iMkl5igiD2qfZW9Pr4b+o+6RpYilMilAdy9aJ2KgHCg==", "requires": { "minimist": "1.2.0" } }, "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.7.tgz", + "integrity": "sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ==" }, "parse-glob": { "version": "3.0.4", @@ -5959,33 +6221,36 @@ "dev": true }, "prebuild-install": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.3.tgz", - "integrity": "sha512-/rI36cN2g7vDQnKWN8Uzupi++KjyqS9iS+/fpwG4Ea8d0Pip0PQ5bshUNzVwt+/D2MRfhVAplYMMvWLqWrCF/g==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.2.2.tgz", + "integrity": "sha512-4e8VJnP3zJdZv/uP0eNWmr2r9urp4NECw7Mt1OSAi3rcLrbBRxGiAkfUFtre2MhQ5wfREAjRV+K1gubvs/GPsA==", "requires": { "detect-libc": "^1.0.3", - "expand-template": "^1.0.2", + "expand-template": "^2.0.3", "github-from-package": "0.0.0", "minimist": "^1.2.0", "mkdirp": "^0.5.1", + "napi-build-utils": "^1.0.1", "node-abi": "^2.2.0", "noop-logger": "^0.1.1", "npmlog": "^4.0.1", "os-homedir": "^1.0.1", "pump": "^2.0.1", - "rc": "^1.1.6", + "rc": "^1.2.7", "simple-get": "^2.7.0", "tar-fs": "^1.13.0", "tunnel-agent": "^0.6.0", "which-pm-runs": "^1.0.0" }, "dependencies": { - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", "requires": { - "safe-buffer": "^5.0.1" + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" } } } @@ -6859,29 +7124,32 @@ "integrity": "sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=" }, "sharp": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.20.2.tgz", - "integrity": "sha512-cFL2qUT9eyR29bI+gj5kQjWlj+VIuTGdcY/CErQqmwJ4FKTXhmdE6d/zwjmrAokzr5n547KQed8HFQsmyUv9uw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.21.1.tgz", + "integrity": "sha512-XPRi/nosSHk2GG6Zl+uquJ8vZ+00TpNjzrSKah4DGBHYXRxw7nixBBBewJtw3jetUJi0Oaw/n6AO3/myDVVqFg==", "requires": { - "color": "^3.0.0", + "bindings": "^1.3.1", + "color": "^3.1.0", "detect-libc": "^1.0.3", - "fs-copy-file-sync": "^1.0.1", - "nan": "^2.10.0", + "fs-copy-file-sync": "^1.1.1", + "nan": "^2.11.1", "npmlog": "^4.1.2", - "prebuild-install": "^2.5.3", - "semver": "^5.5.0", - "simple-get": "^2.8.1", - "tar": "^4.4.1", + "prebuild-install": "^5.2.2", + "semver": "^5.6.0", + "simple-get": "^3.0.3", + "tar": "^4.4.8", "tunnel-agent": "^0.6.0" }, "dependencies": { - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } + "nan": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==" + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" } } }, @@ -6915,9 +7183,9 @@ "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" }, "simple-get": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", - "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.0.3.tgz", + "integrity": "sha512-Wvre/Jq5vgoz31Z9stYWPLn0PqRqmBDpFSdypAnHu5AvRVCYPRYGnvryNLiXu8GOBNDH82J2FRHUGMjjHUpXFw==", "requires": { "decompress-response": "^3.3.0", "once": "^1.3.1", @@ -7758,9 +8026,12 @@ } }, "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } }, "tweetnacl": { "version": "0.14.5", @@ -8108,6 +8379,15 @@ "yargs": "12.0.2" }, "dependencies": { + "@sitespeed.io/throttle": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@sitespeed.io/throttle/-/throttle-0.4.3.tgz", + "integrity": "sha512-Kb3F2wOzWLrOGBE47zcIwp4vvT9PxpPqOpl5zVaQHCVS3r55sCraYLyo20aP2cNPlnjmi66WvAUB92a1Y5Plfw==", + "requires": { + "execa": "0.10.0", + "minimist": "1.2.0" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", @@ -8121,6 +8401,152 @@ "color-convert": "^1.9.0" } }, + "browsertime": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/browsertime/-/browsertime-3.12.0.tgz", + "integrity": "sha512-kWEFgh2gqzeeCCWhiJ78aNgFprt7sy4Dl7TQ30gQvgSvCFSQ4nOwb0TmoHRbQJ5K0o4eYjxNS4ixkZNo0SC6Vw==", + "requires": { + "@sitespeed.io/throttle": "0.4.3", + "adbkit": "2.11.0", + "alto-saxophone": "2.43.1", + "chrome-har": "0.5.0", + "chrome-trace": "0.1.1", + "dayjs": "1.7.7", + "execa": "0.10.0", + "fast-stats": "0.0.3", + "hasbin": "1.2.3", + "intel": "1.2.0", + "lodash.foreach": "4.5.0", + "lodash.get": "4.4.2", + "lodash.groupby": "4.6.0", + "lodash.isempty": "4.4.0", + "lodash.merge": "4.6.1", + "lodash.pick": "4.4.0", + "lodash.remove": "4.7.0", + "lodash.set": "4.3.2", + "mkdirp": "0.5.1", + "selenium-webdriver": "3.6.0", + "sharp": "0.20.2", + "soprano-saxophone": "0.23.0", + "valid-url": "1.0.9", + "xvfb": "0.2.3", + "yargs": "11.0.0" + }, + "dependencies": { + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + }, + "dependencies": { + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + } + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "yargs": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", @@ -8136,6 +8562,48 @@ "supports-color": "^5.3.0" } }, + "chrome-har": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/chrome-har/-/chrome-har-0.5.0.tgz", + "integrity": "sha512-tNwBcsjwCzeo2CJxbfkVGzjdvZsRHddUcxoJsLdAkU/QH8RewPlOCKk9vMZHs9nB8mx5QKU8EXSC6qcxYynWgg==", + "requires": { + "debug": "3.1.0", + "moment": "2.21.0", + "tough-cookie": "2.3.4", + "uuid": "3.2.1" + } + }, + "chrome-trace": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/chrome-trace/-/chrome-trace-0.1.1.tgz", + "integrity": "sha512-7jOVAjBBLFaki+KsZpj030dTWil4XXxr40uMK1bCE9LfTyvyy3UORKw1osEe1Mo1/W1i2nbi20WCDNlbzEP2Nw==", + "requires": { + "debug": "^3.1.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "dayjs": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.7.7.tgz", + "integrity": "sha512-Qlkiu0NNDpYwhk0syK4ImvAl/5YnsEMkvC2O123INviGeOA3Q8s5VyVkZzmN5SC7Wv9bb1+rfwO+uSqtHB4UWw==" + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, "decamelize": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", @@ -8144,6 +8612,16 @@ "xregexp": "4.0.0" } }, + "expand-template": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.1.tgz", + "integrity": "sha512-cebqLtV8KOZfw0UI8TEFWxtczxxC1jvyUvx6H4fyp1K1FN7A4Q+uggVUlOsI1K8AGU0rwOGqP8nCapdrw8CYQg==" + }, + "fast-stats": { + "version": "0.0.3", + "resolved": "http://registry.npmjs.org/fast-stats/-/fast-stats-0.0.3.tgz", + "integrity": "sha1-ZQr5Y8P/hcSWo2EPINQM1MFkWU0=" + }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -8207,11 +8685,68 @@ "p-limit": "^2.0.0" } }, + "pagexray": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/pagexray/-/pagexray-2.5.0.tgz", + "integrity": "sha512-DG2W4DHzauzSfxy3hN4injcZlqTFMEv3Obtmd2eG6iz3Co1QV+1b5H2LnR9dS5UFp5+OrzIeqN0eFImSQgd+WA==", + "requires": { + "minimist": "1.2.0" + } + }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, + "prebuild-install": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.3.tgz", + "integrity": "sha512-/rI36cN2g7vDQnKWN8Uzupi++KjyqS9iS+/fpwG4Ea8d0Pip0PQ5bshUNzVwt+/D2MRfhVAplYMMvWLqWrCF/g==", + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^1.0.2", + "github-from-package": "0.0.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "node-abi": "^2.2.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "os-homedir": "^1.0.1", + "pump": "^2.0.1", + "rc": "^1.1.6", + "simple-get": "^2.7.0", + "tar-fs": "^1.13.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + } + }, + "sharp": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.20.2.tgz", + "integrity": "sha512-cFL2qUT9eyR29bI+gj5kQjWlj+VIuTGdcY/CErQqmwJ4FKTXhmdE6d/zwjmrAokzr5n547KQed8HFQsmyUv9uw==", + "requires": { + "color": "^3.0.0", + "detect-libc": "^1.0.3", + "fs-copy-file-sync": "^1.0.1", + "nan": "^2.10.0", + "npmlog": "^4.1.2", + "prebuild-install": "^2.5.3", + "semver": "^5.5.0", + "simple-get": "^2.8.1", + "tar": "^4.4.1", + "tunnel-agent": "^0.6.0" + } + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -8237,6 +8772,11 @@ "has-flag": "^3.0.0" } }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + }, "yargs": { "version": "12.0.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", @@ -8485,9 +9025,9 @@ "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" }, "yargs": { "version": "6.6.0", @@ -8551,6 +9091,7 @@ "version": "9.0.2", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, "requires": { "camelcase": "^4.1.0" }, @@ -8558,7 +9099,8 @@ "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true } } }, diff --git a/package.json b/package.json index eb4db4b45..d2b65c3cb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,10 @@ { "name": "sitespeed.io", "bin": "./bin/sitespeed.js", - "version": "7.7.2", + "version": "8.0.0-alpha.0", + "publishConfig": { + "tag": "canary" + }, "description": "Analyze the web performance of your site", "keywords": [ "performance", @@ -69,7 +72,7 @@ "main": "./lib/sitespeed.js", "dependencies": { "aws-sdk": "2.361.0", - "browsertime": "3.12.0", + "browsertime": "4.0.0-alpha.4", "cli-color": "1.4.0", "concurrent-queue": "7.0.2", "dayjs-ext": "2.2.0", @@ -95,7 +98,7 @@ "mkdirp": "0.5.1", "node-slack": "0.0.7", "p-limit": "2.0.0", - "pagexray": "2.5.0", + "pagexray": "2.5.1", "pug": "2.0.3", "recursive-readdir": "2.2.2", "simplecrawler": "1.1.6", diff --git a/release.sh b/release.sh index 56bbf446d..c96baf273 100755 --- a/release.sh +++ b/release.sh @@ -17,15 +17,15 @@ PACKAGE_VERSION=$(node -e 'console.log(require("./package").version)') docker build --no-cache -t sitespeedio/sitespeed.io:$PACKAGE_VERSION -t sitespeedio/sitespeed.io:latest . docker push sitespeedio/sitespeed.io:$PACKAGE_VERSION -docker push sitespeedio/sitespeed.io:latest +#docker push sitespeedio/sitespeed.io:latest docker build -t sitespeedio/sitespeed.io:$PACKAGE_VERSION-plus1 --file docker/Dockerfile-plus1 . docker push sitespeedio/sitespeed.io:$PACKAGE_VERSION-plus1 # Update to latet version in the docs -bin/sitespeed.js --version | tr -d '\n' > docs/_includes/version/sitespeed.io.txt +#bin/sitespeed.js --version | tr -d '\n' > docs/_includes/version/sitespeed.io.txt # Generate the help for the docs -bin/sitespeed.js --help > docs/documentation/sitespeed.io/configuration/config.md +#bin/sitespeed.js --help > docs/documentation/sitespeed.io/configuration/config.md diff --git a/test/prepostscripts/multi.js b/test/prepostscripts/multi.js new file mode 100644 index 000000000..3b3d0c6a0 --- /dev/null +++ b/test/prepostscripts/multi.js @@ -0,0 +1,5 @@ +module.exports = async function(context) { + await context.h.measure('https://www.sitespeed.io'); + await context.h.measure('https://www.sitespeed.io/examples/'); + return context.h.measure('https://www.sitespeed.io/documentation/'); +}; diff --git a/test/prepostscripts/postSample.js b/test/prepostscripts/postSample.js index 959417ac4..7f80a4a1d 100644 --- a/test/prepostscripts/postSample.js +++ b/test/prepostscripts/postSample.js @@ -1,5 +1,3 @@ -module.exports = { - run(context) { - context.log.info('In posttask!!!'); - } +module.exports = async function(context) { + context.log.info('In posttask!!!'); }; diff --git a/test/prepostscripts/preSample.js b/test/prepostscripts/preSample.js index 173590f03..08c9f0ab6 100644 --- a/test/prepostscripts/preSample.js +++ b/test/prepostscripts/preSample.js @@ -1,19 +1,5 @@ -module.exports = { - run(context) { - context.log.info('In pretask!!!'); - if (!context.taskData.loadedSitespeed) { - return context - .runWithDriver(driver => { - return driver - .get('https://www.sitespeed.io') - .then(() => driver.getTitle()) - .then(title => { - context.log.info('Loaded page with title: ' + title); - }); - }) - .then(() => { - context.taskData.loadedSitespeed = true; - }); - } - } +module.exports = async function(context) { + context.log.info('In pretask!!!'); + await context.h.navigate('https://www.sitespeed.io/'); + context.taskData.loadedSitespeed = true; };