From 3f43e288c07b6d682a1b6c8aa0cb9d77649f69e1 Mon Sep 17 00:00:00 2001 From: regevbr Date: Mon, 30 Mar 2020 12:14:24 +0300 Subject: [PATCH 01/16] fix: node service has bad colors #4809 --- .../node/{node.service.js => node-base.js} | 19 +++--- services/node/node-current.service.js | 18 +++++ services/node/node-current.spec.js | 23 +++++++ ...{node.tester.js => node-current.tester.js} | 0 services/node/node-lts.service.js | 18 +++++ .../node/{node.spec.js => node-lts.spec.js} | 2 +- services/node/node-lts.tester.js | 48 ++++++++++++++ services/node/node-version-color.js | 65 +++++++++++++++++-- services/node/node-version-color.spec.js | 54 +++++++++++++++ 9 files changed, 231 insertions(+), 16 deletions(-) rename services/node/{node.service.js => node-base.js} (86%) create mode 100644 services/node/node-current.service.js create mode 100644 services/node/node-current.spec.js rename services/node/{node.tester.js => node-current.tester.js} (100%) create mode 100644 services/node/node-lts.service.js rename services/node/{node.spec.js => node-lts.spec.js} (92%) create mode 100644 services/node/node-lts.tester.js create mode 100644 services/node/node-version-color.spec.js diff --git a/services/node/node.service.js b/services/node/node-base.js similarity index 86% rename from services/node/node.service.js rename to services/node/node-base.js index 31cfef4b1cbbe..7d850926f42c0 100644 --- a/services/node/node.service.js +++ b/services/node/node-base.js @@ -1,23 +1,24 @@ 'use strict' const NPMBase = require('../npm/npm-base') -const { versionColorForRange } = require('./node-version-color') const keywords = ['npm'] -module.exports = class NodeVersion extends NPMBase { +module.exports = class NodeVersionBase extends NPMBase { static get category() { return 'platform-support' } static get route() { - return this.buildRoute('node/v', { withTag: true }) + return this.buildRoute(`node/${this.path}`, { withTag: true }) } static get examples() { + const type = this.type + const prefix = `node-${type}` return [ { - title: 'node', + title: `${prefix}`, pattern: ':packageName', namedParams: { packageName: 'passport' }, staticPreview: this.renderStaticPreview({ @@ -26,7 +27,7 @@ module.exports = class NodeVersion extends NPMBase { keywords, }, { - title: 'node (scoped)', + title: `${prefix} (scoped)`, pattern: '@:scope/:packageName', namedParams: { scope: 'stdlib', packageName: 'stdlib' }, staticPreview: this.renderStaticPreview({ @@ -35,7 +36,7 @@ module.exports = class NodeVersion extends NPMBase { keywords, }, { - title: 'node (tag)', + title: `${prefix} (tag)`, pattern: ':packageName/:tag', namedParams: { packageName: 'passport', tag: 'latest' }, staticPreview: this.renderStaticPreview({ @@ -45,7 +46,7 @@ module.exports = class NodeVersion extends NPMBase { keywords, }, { - title: 'node (scoped with tag)', + title: `${prefix} (scoped with tag)`, pattern: '@:scope/:packageName/:tag', namedParams: { scope: 'stdlib', packageName: 'stdlib', tag: 'latest' }, staticPreview: this.renderStaticPreview({ @@ -55,7 +56,7 @@ module.exports = class NodeVersion extends NPMBase { keywords, }, { - title: 'node (scoped with tag, custom registry)', + title: `${prefix} (scoped with tag, custom registry)`, pattern: '@:scope/:packageName/:tag', namedParams: { scope: 'stdlib', packageName: 'stdlib', tag: 'latest' }, queryParams: { registry_uri: 'https://registry.npmjs.com' }, @@ -98,7 +99,7 @@ module.exports = class NodeVersion extends NPMBase { return { label, message: nodeVersionRange, - color: await versionColorForRange(nodeVersionRange), + color: await this.colorResolver(nodeVersionRange), } } } diff --git a/services/node/node-current.service.js b/services/node/node-current.service.js new file mode 100644 index 0000000000000..d294c4ccf1626 --- /dev/null +++ b/services/node/node-current.service.js @@ -0,0 +1,18 @@ +'use strict' + +const NodeVersionBase = require('./node-base') +const { versionColorForRangeCurrent } = require('./node-version-color') + +module.exports = class NodeCurrentVersion extends NodeVersionBase { + static get path() { + return 'v' + } + + static get type() { + return 'current' + } + + static get colorResolver() { + return versionColorForRangeCurrent + } +} diff --git a/services/node/node-current.spec.js b/services/node/node-current.spec.js new file mode 100644 index 0000000000000..d4f424c75f615 --- /dev/null +++ b/services/node/node-current.spec.js @@ -0,0 +1,23 @@ +'use strict' + +const { test, given } = require('sazerac') +const NodeVersion = require('./node-current.service') + +describe('renderStaticPreview', function() { + it('should have parity with render()', async function() { + const nodeVersionRange = '>= 6.0.0' + + const expectedNoTag = await NodeVersion.renderStaticPreview({ + nodeVersionRange, + }) + const expectedLatestTag = await NodeVersion.renderStaticPreview({ + nodeVersionRange, + tag: 'latest', + }) + + test(NodeVersion.renderStaticPreview, () => { + given({ nodeVersionRange }).expect(expectedNoTag) + given({ nodeVersionRange, tag: 'latest' }).expect(expectedLatestTag) + }) + }) +}) diff --git a/services/node/node.tester.js b/services/node/node-current.tester.js similarity index 100% rename from services/node/node.tester.js rename to services/node/node-current.tester.js diff --git a/services/node/node-lts.service.js b/services/node/node-lts.service.js new file mode 100644 index 0000000000000..928c75899bee7 --- /dev/null +++ b/services/node/node-lts.service.js @@ -0,0 +1,18 @@ +'use strict' + +const NodeVersionBase = require('./node-base') +const { versionColorForRangeLts } = require('./node-version-color') + +module.exports = class NodeLtsVersion extends NodeVersionBase { + static get path() { + return 'v-lts' + } + + static get type() { + return 'lts' + } + + static get colorResolver() { + return versionColorForRangeLts + } +} diff --git a/services/node/node.spec.js b/services/node/node-lts.spec.js similarity index 92% rename from services/node/node.spec.js rename to services/node/node-lts.spec.js index 542b412adb1b8..d8bd5f68f540d 100644 --- a/services/node/node.spec.js +++ b/services/node/node-lts.spec.js @@ -1,7 +1,7 @@ 'use strict' const { test, given } = require('sazerac') -const NodeVersion = require('./node.service') +const NodeVersion = require('./node-lts.service') describe('renderStaticPreview', function() { it('should have parity with render()', async function() { diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js new file mode 100644 index 0000000000000..52a756c46d273 --- /dev/null +++ b/services/node/node-lts.tester.js @@ -0,0 +1,48 @@ +'use strict' + +const { expect } = require('chai') +const { Range } = require('semver') +const t = (module.exports = require('../tester').createServiceTester()) + +function expectSemverRange(message) { + expect(() => new Range(message)).not.to.throw() +} + +t.create('gets the node version of passport') + .get('/passport.json') + .expectBadge({ label: 'node' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('gets the node version of @stdlib/stdlib') + .get('/@stdlib/stdlib.json') + .expectBadge({ label: 'node' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create("gets the tagged release's node version version of ionic") + .get('/ionic/next.json') + .expectBadge({ label: 'node@next' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('gets the node version of passport from a custom registry') + .get('/passport.json?registry_uri=https://registry.npmjs.com') + .expectBadge({ label: 'node' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create("gets the tagged release's node version of @cycle/core") + .get('/@cycle/core/canary.json') + .expectBadge({ label: 'node@canary' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('invalid package name') + .get('/frodo-is-not-a-package.json') + .expectBadge({ label: 'node', message: 'package not found' }) diff --git a/services/node/node-version-color.js b/services/node/node-version-color.js index 3e0c5b128e757..6bdaf4c86ba52 100644 --- a/services/node/node-version-color.js +++ b/services/node/node-version-color.js @@ -1,12 +1,19 @@ 'use strict' const { promisify } = require('util') +const moment = require('moment') const semver = require('semver') const { regularUpdate } = require('../../core/legacy/regular-update') -function getLatestVersion() { +const dateFormat = 'YYYY-MM-DD' + +function getVersion(version) { + let semver = `` + if (version) { + semver = `-${version}.x` + } return promisify(regularUpdate)({ - url: 'https://nodejs.org/dist/latest/SHASUMS256.txt', + url: `https://nodejs.org/dist/latest${semver}/SHASUMS256.txt`, intervalMillis: 24 * 3600 * 1000, json: false, scraper: shasums => { @@ -20,8 +27,52 @@ function getLatestVersion() { }) } -async function versionColorForRange(range) { - const latestVersion = await getLatestVersion() +function ltsVersionsScraper(versions) { + const currentDate = moment().format(dateFormat) + return Object.keys(versions).filter(function(version) { + const data = versions[version] + return data.lts && data.lts < currentDate && data.end > currentDate + }) +} + +async function getCurrentVersion() { + return getVersion() +} + +async function getLtsVersions() { + const versions = await promisify(regularUpdate)({ + url: + 'https://raw.githubusercontent.com/nodejs/Release/master/schedule.json', + intervalMillis: 24 * 3600 * 1000, + json: true, + scraper: ltsVersionsScraper, + }) + return Promise.all(versions.map(getVersion)) +} + +async function versionColorForRangeLts(range) { + const ltsVersions = await getLtsVersions() + try { + const matchesAll = ltsVersions.reduce(function(satisfies, version) { + return satisfies && semver.satisfies(version, range) + }, true) + const greaterThanAll = ltsVersions.reduce(function(satisfies, version) { + return satisfies && semver.gtr(version, range) + }, true) + if (matchesAll) { + return 'brightgreen' + } else if (greaterThanAll) { + return 'yellow' + } else { + return 'orange' + } + } catch (e) { + return 'lightgray' + } +} + +async function versionColorForRangeCurrent(range) { + const latestVersion = await getCurrentVersion() try { if (semver.satisfies(latestVersion, range)) { return 'brightgreen' @@ -36,6 +87,8 @@ async function versionColorForRange(range) { } module.exports = { - getLatestVersion, - versionColorForRange, + getCurrentVersion, + getStableVersions: getLtsVersions, + versionColorForRangeCurrent, + versionColorForRangeLts, } diff --git a/services/node/node-version-color.spec.js b/services/node/node-version-color.spec.js new file mode 100644 index 0000000000000..869521865d11f --- /dev/null +++ b/services/node/node-version-color.spec.js @@ -0,0 +1,54 @@ +'use strict' + +const { expect } = require('chai') +const { + getStableVersions, + getCurrentVersion, + versionColorForRangeLts, + versionColorForRangeCurrent, +} = require('./node-version-color') + +describe('node version color', function() { + describe(`stable`, function() { + it('should only return lts versions', async function() { + this.timeout(4000) + const versions = await getStableVersions() + versions.sort() + const major = parseInt( + versions[versions.length - 1].match(/(\d+)/)[0], + 10 + ) + expect(major % 2).to.eql(0) + }) + it('should print green on lts versions', async function() { + const versions = await getStableVersions() + const range = versions.reduce( + (range, version) => `${range} || ${version}` + ) + const color = await versionColorForRangeLts(range) + expect(color).to.eql('brightgreen') + }) + it('should print yellow on lts bigger than range', async function() { + const versions = await getStableVersions() + versions.sort() + const major = parseInt(versions[0].match(/(\d+)/)[0], 10) - 1 + const range = `^${major}` + const color = await versionColorForRangeLts(range) + expect(color).to.eql('yellow') + }) + }) + describe(`latest`, function() { + it('should print green on latest version', async function() { + const version = await getCurrentVersion() + const color = await versionColorForRangeCurrent(version) + expect(color).to.eql('brightgreen') + }) + it('should print yellow on latest bigger than range', async function() { + const version = await getCurrentVersion() + const major = parseInt(version.match(/(\d+)/)[0], 10) - 1 + const range = `^${major}` + const color = await versionColorForRangeCurrent(range) + expect(color).to.eql('yellow') + }) + }) +}) From da25d38d9c587d44251d35dbc69e872fbfa39707 Mon Sep 17 00:00:00 2001 From: regevbr Date: Tue, 31 Mar 2020 12:07:16 +0300 Subject: [PATCH 02/16] fix: node service has bad colors #4809 --- services/node/node-base.js | 4 ---- services/node/node-current.service.js | 4 ++++ services/node/node-lts.service.js | 4 ++++ services/node/node-lts.tester.js | 8 ++++---- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/services/node/node-base.js b/services/node/node-base.js index 7d850926f42c0..7f3cd61e9b74b 100644 --- a/services/node/node-base.js +++ b/services/node/node-base.js @@ -69,10 +69,6 @@ module.exports = class NodeVersionBase extends NPMBase { ] } - static get defaultBadgeData() { - return { label: 'node' } - } - static renderStaticPreview({ tag, nodeVersionRange }) { // Since this badge has an async `render()` function, but `get examples()` has to // be synchronous, this method exists. It should return the same value as the diff --git a/services/node/node-current.service.js b/services/node/node-current.service.js index d294c4ccf1626..27ace3ba4cf3d 100644 --- a/services/node/node-current.service.js +++ b/services/node/node-current.service.js @@ -8,6 +8,10 @@ module.exports = class NodeCurrentVersion extends NodeVersionBase { return 'v' } + static get defaultBadgeData() { + return { label: 'node' } + } + static get type() { return 'current' } diff --git a/services/node/node-lts.service.js b/services/node/node-lts.service.js index 928c75899bee7..fc033b6238abc 100644 --- a/services/node/node-lts.service.js +++ b/services/node/node-lts.service.js @@ -8,6 +8,10 @@ module.exports = class NodeLtsVersion extends NodeVersionBase { return 'v-lts' } + static get defaultBadgeData() { + return { label: 'node lts' } + } + static get type() { return 'lts' } diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index 52a756c46d273..c762c434f1459 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -10,14 +10,14 @@ function expectSemverRange(message) { t.create('gets the node version of passport') .get('/passport.json') - .expectBadge({ label: 'node' }) + .expectBadge({ label: 'node lts' }) .afterJSON(json => { expectSemverRange(json.message) }) t.create('gets the node version of @stdlib/stdlib') .get('/@stdlib/stdlib.json') - .expectBadge({ label: 'node' }) + .expectBadge({ label: 'node lts' }) .afterJSON(json => { expectSemverRange(json.message) }) @@ -31,7 +31,7 @@ t.create("gets the tagged release's node version version of ionic") t.create('gets the node version of passport from a custom registry') .get('/passport.json?registry_uri=https://registry.npmjs.com') - .expectBadge({ label: 'node' }) + .expectBadge({ label: 'node lts' }) .afterJSON(json => { expectSemverRange(json.message) }) @@ -45,4 +45,4 @@ t.create("gets the tagged release's node version of @cycle/core") t.create('invalid package name') .get('/frodo-is-not-a-package.json') - .expectBadge({ label: 'node', message: 'package not found' }) + .expectBadge({ label: 'node lts', message: 'package not found' }) From c1b49d6d542d2a2d169ee3a4bb802b7671f36e65 Mon Sep 17 00:00:00 2001 From: regevbr Date: Tue, 31 Mar 2020 14:51:03 +0300 Subject: [PATCH 03/16] fix: node service has bad colors #4809 --- services/node/node-current.tester.js | 70 +- services/node/node-lts.tester.js | 76 +- .../node/testUtils/packageJsonTemplate.json | 79 +++ .../packageJsonVersionsTemplate.json | 662 ++++++++++++++++++ services/node/testUtils/testUtils.js | 50 ++ services/npm/npm-base.js | 9 +- 6 files changed, 895 insertions(+), 51 deletions(-) create mode 100644 services/node/testUtils/packageJsonTemplate.json create mode 100644 services/node/testUtils/packageJsonVersionsTemplate.json create mode 100644 services/node/testUtils/testUtils.js diff --git a/services/node/node-current.tester.js b/services/node/node-current.tester.js index 52a756c46d273..33921f374c22f 100644 --- a/services/node/node-current.tester.js +++ b/services/node/node-current.tester.js @@ -3,46 +3,94 @@ const { expect } = require('chai') const { Range } = require('semver') const t = (module.exports = require('../tester').createServiceTester()) +const { mockPackageData, mockCurrentSha, mockNonExistingPackageData } = require('./testUtils/testUtils'); function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() } -t.create('gets the node version of passport') +t.create('engines satisfies current node version') .get('/passport.json') - .expectBadge({ label: 'node' }) + .intercept(mockPackageData(`passport`, `>=0.4.0`)) + .intercept(mockCurrentSha(13)) + .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) .afterJSON(json => { expectSemverRange(json.message) }) -t.create('gets the node version of @stdlib/stdlib') +t.create('engines not satisfies current node version') + .get('/passport.json') + .intercept(mockPackageData(`passport`, `12`)) + .intercept(mockCurrentSha(13)) + .expectBadge({ label: 'node', message: `12`, color: `yellow` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies current node version - scoped') .get('/@stdlib/stdlib.json') - .expectBadge({ label: 'node' }) + .intercept(mockPackageData(`stdlib`, `>=0.4.0`, `@stdlib`)) + .intercept(mockCurrentSha(13)) + .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) .afterJSON(json => { expectSemverRange(json.message) }) -t.create("gets the tagged release's node version version of ionic") +t.create('engines not satisfies current node version - scoped') + .get('/@stdlib/stdlib.json') + .intercept(mockPackageData(`stdlib`, `12`, `@stdlib`)) + .intercept(mockCurrentSha(13)) + .expectBadge({ label: 'node', message: `12`, color: `yellow` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies current node version - tagged') .get('/ionic/next.json') - .expectBadge({ label: 'node@next' }) + .intercept(mockPackageData(`ionic`, `>=0.4.0`, undefined, `next`)) + .intercept(mockCurrentSha(13)) + .expectBadge({ label: 'node@next', message: `>=0.4.0`, color: `brightgreen` }) .afterJSON(json => { expectSemverRange(json.message) }) -t.create('gets the node version of passport from a custom registry') - .get('/passport.json?registry_uri=https://registry.npmjs.com') - .expectBadge({ label: 'node' }) +t.create('engines not satisfies current node version - tagged') + .get('/ionic/next.json') + .intercept(mockPackageData(`ionic`, `12`, undefined, `next`)) + .intercept(mockCurrentSha(13)) + .expectBadge({ label: 'node@next', message: `12`, color: `yellow` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies current node version - scoped and tagged') + .get('/@cycle/core/canary.json') + .intercept(mockPackageData(`core`, `>=0.4.0`, `@cycle`, `canary`)) + .intercept(mockCurrentSha(13)) + .expectBadge({ label: 'node@canary', message: `>=0.4.0`, color: `brightgreen` }) .afterJSON(json => { expectSemverRange(json.message) }) -t.create("gets the tagged release's node version of @cycle/core") +t.create('engines not satisfies current node version - scoped and tagged') .get('/@cycle/core/canary.json') - .expectBadge({ label: 'node@canary' }) + .intercept(mockPackageData(`core`, `12`, `@cycle`, `canary`)) + .intercept(mockCurrentSha(13)) + .expectBadge({ label: 'node@canary', message: `12`, color: `yellow` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies current node version with custom registry') + .get('/passport.json?registry_uri=https://registry.npmjs.com') + .intercept(mockPackageData(`passport`, `>=0.4.0`, undefined, undefined, 'https://registry.npmjs.com')) + .intercept(mockCurrentSha(13)) + .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) .afterJSON(json => { expectSemverRange(json.message) }) t.create('invalid package name') .get('/frodo-is-not-a-package.json') + .intercept(mockNonExistingPackageData(`frodo-is-not-a-package`)) .expectBadge({ label: 'node', message: 'package not found' }) diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index c762c434f1459..ef1bdde5ceb54 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -8,41 +8,41 @@ function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() } -t.create('gets the node version of passport') - .get('/passport.json') - .expectBadge({ label: 'node lts' }) - .afterJSON(json => { - expectSemverRange(json.message) - }) - -t.create('gets the node version of @stdlib/stdlib') - .get('/@stdlib/stdlib.json') - .expectBadge({ label: 'node lts' }) - .afterJSON(json => { - expectSemverRange(json.message) - }) - -t.create("gets the tagged release's node version version of ionic") - .get('/ionic/next.json') - .expectBadge({ label: 'node@next' }) - .afterJSON(json => { - expectSemverRange(json.message) - }) - -t.create('gets the node version of passport from a custom registry') - .get('/passport.json?registry_uri=https://registry.npmjs.com') - .expectBadge({ label: 'node lts' }) - .afterJSON(json => { - expectSemverRange(json.message) - }) - -t.create("gets the tagged release's node version of @cycle/core") - .get('/@cycle/core/canary.json') - .expectBadge({ label: 'node@canary' }) - .afterJSON(json => { - expectSemverRange(json.message) - }) - -t.create('invalid package name') - .get('/frodo-is-not-a-package.json') - .expectBadge({ label: 'node lts', message: 'package not found' }) +// t.create('gets the node version of passport') +// .get('/passport.json') +// .expectBadge({ label: 'node lts' }) +// .afterJSON(json => { +// expectSemverRange(json.message) +// }) +// +// t.create('gets the node version of @stdlib/stdlib') +// .get('/@stdlib/stdlib.json') +// .expectBadge({ label: 'node lts' }) +// .afterJSON(json => { +// expectSemverRange(json.message) +// }) +// +// t.create("gets the tagged release's node version version of ionic") +// .get('/ionic/next.json') +// .expectBadge({ label: 'node@next' }) +// .afterJSON(json => { +// expectSemverRange(json.message) +// }) +// +// t.create('gets the node version of passport from a custom registry') +// .get('/passport.json?registry_uri=https://registry.npmjs.com') +// .expectBadge({ label: 'node lts' }) +// .afterJSON(json => { +// expectSemverRange(json.message) +// }) +// +// t.create("gets the tagged release's node version of @cycle/core") +// .get('/@cycle/core/canary.json') +// .expectBadge({ label: 'node@canary' }) +// .afterJSON(json => { +// expectSemverRange(json.message) +// }) +// +// t.create('invalid package name') +// .get('/frodo-is-not-a-package.json') +// .expectBadge({ label: 'node lts', message: 'package not found' }) diff --git a/services/node/testUtils/packageJsonTemplate.json b/services/node/testUtils/packageJsonTemplate.json new file mode 100644 index 0000000000000..7eadf0a9553ed --- /dev/null +++ b/services/node/testUtils/packageJsonTemplate.json @@ -0,0 +1,79 @@ +{ + "name": "passport", + "version": "0.4.1", + "description": "Simple, unobtrusive authentication for Node.js.", + "keywords": [ + "express", + "connect", + "auth", + "authn", + "authentication" + ], + "author": { + "name": "Jared Hanson", + "email": "jaredhanson@gmail.com", + "url": "http://www.jaredhanson.net/" + }, + "homepage": "http://passportjs.org/", + "repository": { + "type": "git", + "url": "git://github.com/jaredhanson/passport.git" + }, + "bugs": { + "url": "http://github.com/jaredhanson/passport/issues" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "http://opensource.org/licenses/MIT" + } + ], + "main": "./lib", + "dependencies": { + "passport-strategy": "1.x.x", + "pause": "0.0.1" + }, + "devDependencies": { + "make-node": "0.3.x", + "mocha": "2.x.x", + "chai": "2.x.x", + "chai-connect-middleware": "0.3.x", + "chai-passport-strategy": "0.2.x", + "proxyquire": "1.4.x" + }, + "engines": { + "node": ">= 0.4.0" + }, + "scripts": { + "test": "mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js" + }, + "gitHead": "42ff63c60ae55f466d21332306e9112295c0535e", + "_id": "passport@0.4.1", + "_npmVersion": "5.6.0", + "_nodeVersion": "8.11.3", + "_npmUser": { + "name": "jaredhanson", + "email": "jaredhanson@gmail.com" + }, + "maintainers": [ + { + "name": "jaredhanson", + "email": "jaredhanson@gmail.com" + } + ], + "dist": { + "integrity": "sha512-IxXgZZs8d7uFSt3eqNjM9NQ3g3uQCW5avD8mRNoXV99Yig50vjuaez6dQK2qC0kVWPRTujxY0dWgGfT09adjYg==", + "shasum": "941446a21cb92fc688d97a0861c38ce9f738f270", + "tarball": "https://registry.npmjs.org/passport/-/passport-0.4.1.tgz", + "fileCount": 12, + "unpackedSize": 46157, + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7mz0CRA9TVsSAnZWagAAw5oQAJuPyqGI+wylbF3HjeGl\nddgyilB20KPqr8kphN6kPiJlS8XhvipWadKNV6ATdBVyhTzXEX/HiW1YWmcQ\nSmAFVA0/UjFdpFcOvweEjspckNmeHlozeeRljQxbt3kU3Zs3REhSsx4ebNW/\npeyqlHyDV6WFbkggXpXDIY4Yy2swXblsHnLTTYi3yxFvzNEqZvpqF3OE9b8x\n20q1yC5/LFjUVrhgDhTV8GTVQV4N36cJNLmI73ZISScruMQnOUzB4ChNbU5C\naHnrsbYAFpW+8t2ZzK+L7hXjxvMGVN6gKvsJTJ1gWpEwC/w4UGaLElthI0dL\nM7wHDzuci9ihiTcXNw/e4K9URddILDFOZDYYg3eOXKnrajQ63wxvoYeoIG24\n2Cs4SplMqjZ7wM7GhXGVL8PhRPjgMoQvBsWAp7QTMmKWMawg/aaUlb86fVOw\nOHi1murS0xlfgYzk6reduQi0IUDL8N3YpnRVWjgZzRY5kLx6yQVEYZnFh+M7\nGRzk4Qd50w5/1LCVsmFrBskR0N7SuMoVxOj/iKmDmleJtZyQ+VI9jCxY0EgM\nelZaneIoh/YDU+OjuiJJigkGu7BMBp60umtmOtAiZm52Pgcy6heS0xK3gYNN\n8zLAX4Z4EG8D+eYcAA5b/G8U/3fMWVRfzgUv3Q8gU9K+GY8IYtRmnXKeMsxu\n8+84\r\n=lh9x\r\n-----END PGP SIGNATURE-----\r\n" + }, + "directories": {}, + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/passport_0.4.1_1575906548000_0.5977240542921702" + }, + "_hasShrinkwrap": false +} diff --git a/services/node/testUtils/packageJsonVersionsTemplate.json b/services/node/testUtils/packageJsonVersionsTemplate.json new file mode 100644 index 0000000000000..37448a242679f --- /dev/null +++ b/services/node/testUtils/packageJsonVersionsTemplate.json @@ -0,0 +1,662 @@ +{ + "_id":"@stdlib/stdlib", + "_rev":"174-64e9e180efd442c3a9842a60bb20b493", + "name":"@stdlib/stdlib", + "description":"Standard library.", + "dist-tags":{ + "latest":"0.0.91" + }, + "versions":{ + "0.0.90":{ + "name":"@stdlib/stdlib", + "version":"0.0.90", + "description":"Standard library.", + "license":"Apache-2.0 AND BSL-1.0", + "author":{ + "name":"The Stdlib Authors", + "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors":[ + { + "name":"The Stdlib Authors", + "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "funding":{ + "type":"patreon", + "url":"https://www.patreon.com/athan" + }, + "bin":{ + "stdlib":"./bin/cli" + }, + "main":"./lib", + "browser":"./dist/stdlib-flat.min.js", + "unpkg":"./dist/stdlib-flat.min.js", + "directories":{ + "doc":"./docs", + "example":"./examples", + "lib":"./lib", + "test":"./test" + }, + "scripts":{ + "postinstall":"node ./tools/scripts/postinstall", + "preuninstall":"node ./tools/scripts/preuninstall", + "notes":"make notes", + "lint":"make lint", + "repl":"make repl", + "test":"make test", + "test-cov":"make test-cov", + "view-cov":"make view-cov", + "examples":"make examples", + "benchmark":"make benchmark", + "clean":"make clean", + "check-deps":"make check-deps", + "check-licenses":"make check-licenses" + }, + "homepage":"https://github.com/stdlib-js/stdlib", + "repository":{ + "type":"git", + "url":"git://github.com/stdlib-js/stdlib.git" + }, + "bugs":{ + "url":"https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies":{ + "acorn":"^7.0.0", + "acorn-loose":"^7.0.0", + "acorn-walk":"^7.0.0", + "d3-format":"^1.0.0", + "d3-scale":"^1.0.0", + "d3-shape":"^1.0.0", + "d3-time-format":"^2.0.0", + "debug":"^2.6.9", + "glob":"^7.0.5", + "minimist":"^1.2.0", + "nan":"^2.5.1", + "node-gyp":"^3.5.0", + "readable-stream":"^2.1.4", + "resolve":"^1.1.7", + "update-notifier":"^1.0.0", + "vdom-to-html":"^2.3.0", + "virtual-dom":"^2.1.1" + }, + "devDependencies":{ + "ajv":"^5.2.2", + "browser-pack-flat":"^3.0.0", + "browserify":"^16.1.0", + "bundle-collapser":"^1.3.0", + "chai":"^3.5.0", + "common-shakeify":"^0.6.0", + "david":"^11.0.0", + "doctrine":"^3.0.0", + "dtslint":"^0.9.8", + "envify":"^4.0.0", + "eslint":"^6.4.0", + "factor-bundle":"^2.5.0", + "fastify":"^2.10.0", + "fastify-helmet":"^3.0.2", + "fastify-static":"^2.5.0", + "istanbul":"^0.4.1", + "jsdoc":"^3.4.0", + "lunr":"^2.0.0", + "mathjax-node":"^2.0.1", + "mathjax-node-sre":"^3.0.0", + "mkdirp":"^0.5.1", + "mustache":"^3.0.0", + "parse-link-header":"^1.0.1", + "plato":"^1.5.0", + "proxyquire":"^2.0.0", + "proxyquire-universal":"^2.0.0", + "proxyquireify":"^3.1.1", + "read-installed":"^4.0.3", + "rehype":"^9.0.0", + "rehype-highlight":"^3.0.0", + "remark":"^11.0.1", + "remark-cli":"^7.0.0", + "remark-frontmatter":"^1.2.0", + "remark-html":"^10.0.0", + "remark-lint":"^6.0.0", + "remark-lint-blockquote-indentation":"^1.0.0", + "remark-lint-checkbox-character-style":"^1.0.0", + "remark-lint-checkbox-content-indent":"^1.0.0", + "remark-lint-code-block-style":"^1.0.0", + "remark-lint-definition-case":"^1.0.0", + "remark-lint-definition-spacing":"^1.0.0", + "remark-lint-emphasis-marker":"^1.0.0", + "remark-lint-fenced-code-flag":"^1.0.0", + "remark-lint-fenced-code-marker":"^1.0.0", + "remark-lint-file-extension":"^1.0.0", + "remark-lint-final-definition":"^1.0.0", + "remark-lint-final-newline":"^1.0.0", + "remark-lint-first-heading-level":"^1.1.0", + "remark-lint-hard-break-spaces":"^1.0.1", + "remark-lint-heading-increment":"^1.0.0", + "remark-lint-heading-style":"^1.0.0", + "remark-lint-linebreak-style":"^1.0.0", + "remark-lint-link-title-style":"^1.0.0", + "remark-lint-list-item-bullet-indent":"^1.0.0", + "remark-lint-list-item-content-indent":"^1.0.0", + "remark-lint-list-item-indent":"^1.0.0", + "remark-lint-list-item-spacing":"^1.1.0", + "remark-lint-maximum-heading-length":"^1.0.0", + "remark-lint-maximum-line-length":"^1.0.0", + "remark-lint-no-auto-link-without-protocol":"^1.0.0", + "remark-lint-no-blockquote-without-marker":"^2.0.0", + "remark-lint-no-consecutive-blank-lines":"^1.0.0", + "remark-lint-no-duplicate-definitions":"^1.0.0", + "remark-lint-no-duplicate-headings":"^1.0.0", + "remark-lint-no-duplicate-headings-in-section":"^1.0.0", + "remark-lint-no-emphasis-as-heading":"^1.0.0", + "remark-lint-no-empty-url":"^1.0.1", + "remark-lint-no-file-name-articles":"^1.0.0", + "remark-lint-no-file-name-consecutive-dashes":"^1.0.0", + "remark-lint-no-file-name-irregular-characters":"^1.0.0", + "remark-lint-no-file-name-mixed-case":"^1.0.0", + "remark-lint-no-file-name-outer-dashes":"^1.0.1", + "remark-lint-no-heading-content-indent":"^1.0.0", + "remark-lint-no-heading-indent":"^1.0.0", + "remark-lint-no-heading-like-paragraph":"^1.0.0", + "remark-lint-no-heading-punctuation":"^1.0.0", + "remark-lint-no-html":"^1.0.0", + "remark-lint-no-inline-padding":"^1.0.0", + "remark-lint-no-literal-urls":"^1.0.0", + "remark-lint-no-missing-blank-lines":"^1.0.0", + "remark-lint-no-multiple-toplevel-headings":"^1.0.0", + "remark-lint-no-paragraph-content-indent":"^1.0.1", + "remark-lint-no-reference-like-url":"^1.0.0", + "remark-lint-no-shell-dollars":"^1.0.0", + "remark-lint-no-shortcut-reference-image":"^1.0.0", + "remark-lint-no-shortcut-reference-link":"^1.0.1", + "remark-lint-no-table-indentation":"^1.0.0", + "remark-lint-no-tabs":"^1.0.0", + "remark-lint-no-undefined-references":"^1.0.0", + "remark-lint-no-unused-definitions":"^1.0.0", + "remark-lint-ordered-list-marker-style":"^1.0.0", + "remark-lint-ordered-list-marker-value":"^1.0.0", + "remark-lint-rule-style":"^1.0.0", + "remark-lint-strong-marker":"^1.0.0", + "remark-lint-table-cell-padding":"^1.0.0", + "remark-lint-table-pipe-alignment":"^1.0.0", + "remark-lint-table-pipes":"^1.0.0", + "remark-lint-unordered-list-marker-style":"^1.0.0", + "remark-slug":"^5.0.0", + "remark-unlink":"^2.0.0", + "remark-validate-links":"^9.0.1", + "remark-vdom":"^8.0.0", + "semver":"^6.0.0", + "spdx-license-ids":"^3.0.0", + "tap-spec":"5.x.x", + "tap-summary":"^4.0.0", + "tap-xunit":"^2.2.0", + "tape":"git+https://github.com/kgryte/tape.git#fix/globby", + "to-vfile":"^6.0.0", + "typedoc":"^0.15.0", + "uglify-es":"^3.1.1", + "uglifyify":"^5.0.0", + "unified-lint-rule":"^1.0.1", + "unist-util-visit":"^2.0.0", + "yaml":"^1.0.0" + }, + "engines":{ + "node":">=0.10.0", + "npm":">2.7.0" + }, + "os":[ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords":[ + "stdlib", + "stdlib-js", + "stdlib.js", + "js-stdlib", + "stdlibjs", + "standard", + "std", + "library", + "lib", + "libstd" + ], + "gitHead":"51dcafe2bcccbc953fad532ee4705bbeb3627c51", + "_id":"@stdlib/stdlib@0.0.90", + "_nodeVersion":"12.9.1", + "_npmVersion":"6.10.2", + "_npmUser":{ + "name":"kgryte", + "email":"kgryte@gmail.com" + }, + "dist":{ + "integrity":"sha512-nLeLc4XaS8N4VX7MCctsvNMebVF5eW5GZ0ZELxYz/BugJCupxbHCna61paqVbCywWcojecRceyD4650XgbIScQ==", + "shasum":"cc54d3e864c2fd8f72c02e0b740f1e9553bbddca", + "tarball":"https://registry.npmjs.org/@stdlib/stdlib/-/stdlib-0.0.90.tgz", + "fileCount":32943, + "unpackedSize":489502244, + "npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd17YoCRA9TVsSAnZWagAA0vUP/jdfzUi8/vIK9zdbfYZC\nUTr4gEm/cAi1WMY35ukTKiXH4AtQVN7PrxMZT81zyY068vM0mJytsa6X40nd\n8osMlRVHu140eaCB9KTp1+GZ0ux9KweTWBnGp2b+TvfyOtpIk6CFwzbesJnO\nic5+poJE81EV/cs5bFMOvJA4IbYSOoyEXTuQexUZJIUVQclfCi2ua7gbVNsz\nNSvN1k4QQereqWKc6W3aHs887bCSB0gqvYfNJRWIsGSFC0EVU/cQULiv40iG\n6TMMk3908EXlt81vqfJNRYxoO2XyCZ3Tf/buBwOF1b/YmXYtMSVqlKXCTQZi\nArx6eFltOxuphcQ21dWiuqsRAaihDfiH5cs5S1H+n/xYDIrGhGz/gOYUXalh\n00VjoO+wwGDe8a1BQmL8FU4mCkRBZ3Eh0Hw3AMa/A9KMg+3WcIVoj7O6TQTf\nHPbSBNB3/BAN4uNmGXiUqv8oAuqBWzwaswu0PyqbLWSmODSx3D+/1yYUwdhV\ngPhLdS91819RH/Pah6V4wEHxa4fYbcVH4TZlseXVhVTss6VTr1PPBQZle/0Y\nitWcUiXS8j4MV8I2HpNnUxxUzIEbwEaJw/XzEv15AXK04qbPz+g2eOKy+FoT\n0xW31u11ROysZ08EARV1aJEU19Ur2JtyJtFqo3iYO8DPpxm7DFIY5pNj/oFl\nZyqR\r\n=8TuN\r\n-----END PGP SIGNATURE-----\r\n" + }, + "maintainers":[ + { + "name":"kgryte", + "email":"kgryte@gmail.com" + }, + { + "name":"planeshifter", + "email":"pgb@andrew.cmu.edu" + }, + { + "name":"stdlib-bot", + "email":"kgryte@gmail.com" + } + ], + "_npmOperationalInternal":{ + "host":"s3://npm-registry-packages", + "tmp":"tmp/stdlib_0.0.90_1574417955731_0.11381173271401024" + }, + "_hasShrinkwrap":false + }, + "0.0.91":{ + "name":"@stdlib/stdlib", + "version":"0.0.91", + "description":"Standard library.", + "license":"Apache-2.0 AND BSL-1.0", + "author":{ + "name":"The Stdlib Authors", + "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors":[ + { + "name":"The Stdlib Authors", + "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "funding":{ + "type":"patreon", + "url":"https://www.patreon.com/athan" + }, + "bin":{ + "stdlib":"./bin/cli" + }, + "main":"./lib", + "browser":"./dist/stdlib-flat.min.js", + "unpkg":"./dist/stdlib-flat.min.js", + "jsdelivr":"./dist/stdlib-flat.min.js", + "directories":{ + "doc":"./docs", + "example":"./examples", + "lib":"./lib", + "test":"./test" + }, + "scripts":{ + "postinstall":"node ./tools/scripts/postinstall", + "preuninstall":"node ./tools/scripts/preuninstall", + "notes":"make notes", + "lint":"make lint", + "repl":"make repl", + "test":"make test", + "test-cov":"make test-cov", + "view-cov":"make view-cov", + "examples":"make examples", + "benchmark":"make benchmark", + "clean":"make clean", + "check-deps":"make check-deps", + "check-licenses":"make check-licenses" + }, + "homepage":"https://github.com/stdlib-js/stdlib", + "repository":{ + "type":"git", + "url":"git://github.com/stdlib-js/stdlib.git" + }, + "bugs":{ + "url":"https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies":{ + "acorn":"^7.0.0", + "acorn-loose":"^7.0.0", + "acorn-walk":"^7.0.0", + "d3-format":"^1.0.0", + "d3-scale":"^1.0.0", + "d3-shape":"^1.0.0", + "d3-time-format":"^2.0.0", + "debug":"^2.6.9", + "glob":"^7.0.5", + "minimist":"^1.2.0", + "nan":"^2.5.1", + "node-gyp":"^3.5.0", + "readable-stream":"^2.1.4", + "resolve":"^1.1.7", + "update-notifier":"^1.0.0", + "vdom-to-html":"^2.3.0", + "virtual-dom":"^2.1.1" + }, + "devDependencies":{ + "@types/node":"^13.9.0", + "ajv":"^5.2.2", + "browser-pack-flat":"^3.0.0", + "browserify":"^16.1.0", + "bundle-collapser":"^1.3.0", + "chai":"^3.5.0", + "common-shakeify":"^0.6.0", + "david":"^12.0.0", + "doctrine":"^3.0.0", + "dtslint":"^3.3.0", + "envify":"^4.0.0", + "eslint":"^6.4.0", + "factor-bundle":"^2.5.0", + "istanbul":"^0.4.1", + "jsdoc":"^3.4.0", + "lunr":"^2.0.0", + "mathjax-node":"^2.0.1", + "mathjax-node-sre":"^3.0.0", + "mkdirp":"^0.5.1", + "mustache":"^4.0.0", + "parse-link-header":"^1.0.1", + "plato":"^1.5.0", + "proxyquire":"^2.0.0", + "proxyquire-universal":"^2.0.0", + "proxyquireify":"^3.1.1", + "read-installed":"^4.0.3", + "rehype":"^9.0.0", + "rehype-highlight":"^3.0.0", + "remark":"^11.0.1", + "remark-cli":"^7.0.0", + "remark-frontmatter":"^1.2.0", + "remark-html":"^10.0.0", + "remark-lint":"^6.0.0", + "remark-lint-blockquote-indentation":"^1.0.0", + "remark-lint-checkbox-character-style":"^1.0.0", + "remark-lint-checkbox-content-indent":"^1.0.0", + "remark-lint-code-block-style":"^1.0.0", + "remark-lint-definition-case":"^1.0.0", + "remark-lint-definition-spacing":"^1.0.0", + "remark-lint-emphasis-marker":"^1.0.0", + "remark-lint-fenced-code-flag":"^1.0.0", + "remark-lint-fenced-code-marker":"^1.0.0", + "remark-lint-file-extension":"^1.0.0", + "remark-lint-final-definition":"^1.0.0", + "remark-lint-final-newline":"^1.0.0", + "remark-lint-first-heading-level":"^1.1.0", + "remark-lint-hard-break-spaces":"^1.0.1", + "remark-lint-heading-increment":"^1.0.0", + "remark-lint-heading-style":"^1.0.0", + "remark-lint-linebreak-style":"^1.0.0", + "remark-lint-link-title-style":"^1.0.0", + "remark-lint-list-item-bullet-indent":"^1.0.0", + "remark-lint-list-item-content-indent":"^1.0.0", + "remark-lint-list-item-indent":"^1.0.0", + "remark-lint-list-item-spacing":"^1.1.0", + "remark-lint-maximum-heading-length":"^1.0.0", + "remark-lint-maximum-line-length":"^1.0.0", + "remark-lint-no-auto-link-without-protocol":"^1.0.0", + "remark-lint-no-blockquote-without-marker":"^2.0.0", + "remark-lint-no-consecutive-blank-lines":"^1.0.0", + "remark-lint-no-duplicate-definitions":"^1.0.0", + "remark-lint-no-duplicate-headings":"^1.0.0", + "remark-lint-no-duplicate-headings-in-section":"^1.0.0", + "remark-lint-no-emphasis-as-heading":"^1.0.0", + "remark-lint-no-empty-url":"^1.0.1", + "remark-lint-no-file-name-articles":"^1.0.0", + "remark-lint-no-file-name-consecutive-dashes":"^1.0.0", + "remark-lint-no-file-name-irregular-characters":"^1.0.0", + "remark-lint-no-file-name-mixed-case":"^1.0.0", + "remark-lint-no-file-name-outer-dashes":"^1.0.1", + "remark-lint-no-heading-content-indent":"^1.0.0", + "remark-lint-no-heading-indent":"^1.0.0", + "remark-lint-no-heading-like-paragraph":"^1.0.0", + "remark-lint-no-heading-punctuation":"^1.0.0", + "remark-lint-no-html":"^1.0.0", + "remark-lint-no-inline-padding":"^1.0.0", + "remark-lint-no-literal-urls":"^1.0.0", + "remark-lint-no-missing-blank-lines":"^1.0.0", + "remark-lint-no-multiple-toplevel-headings":"^1.0.0", + "remark-lint-no-paragraph-content-indent":"^1.0.1", + "remark-lint-no-reference-like-url":"^1.0.0", + "remark-lint-no-shell-dollars":"^1.0.0", + "remark-lint-no-shortcut-reference-image":"^1.0.0", + "remark-lint-no-shortcut-reference-link":"^1.0.1", + "remark-lint-no-table-indentation":"^1.0.0", + "remark-lint-no-tabs":"^1.0.0", + "remark-lint-no-undefined-references":"^1.0.0", + "remark-lint-no-unused-definitions":"^1.0.0", + "remark-lint-ordered-list-marker-style":"^1.0.0", + "remark-lint-ordered-list-marker-value":"^1.0.0", + "remark-lint-rule-style":"^1.0.0", + "remark-lint-strong-marker":"^1.0.0", + "remark-lint-table-cell-padding":"^1.0.0", + "remark-lint-table-pipe-alignment":"^1.0.0", + "remark-lint-table-pipes":"^1.0.0", + "remark-lint-unordered-list-marker-style":"^1.0.0", + "remark-slug":"^5.0.0", + "remark-unlink":"^2.0.0", + "remark-validate-links":"^9.0.1", + "remark-vdom":"^8.0.0", + "semver":"^6.0.0", + "spdx-license-ids":"^3.0.0", + "tap-spec":"5.x.x", + "tap-summary":"^4.0.0", + "tap-xunit":"^2.2.0", + "tape":"git+https://github.com/kgryte/tape.git#fix/globby", + "to-vfile":"^6.0.0", + "typedoc":"^0.16.11", + "uglify-es":"^3.1.1", + "uglifyify":"^5.0.0", + "unified-lint-rule":"^1.0.1", + "unist-util-visit":"^2.0.0", + "yaml":"^1.0.0" + }, + "engines":{ + "node":">=0.10.0", + "npm":">2.7.0" + }, + "os":[ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords":[ + "stdlib", + "stdlib-js", + "stdlib.js", + "js-stdlib", + "stdlibjs", + "standard", + "std", + "library", + "lib", + "libstd" + ], + "gitHead":"68f492edd886c9253209599191f0c6bde0e3775c", + "_id":"@stdlib/stdlib@0.0.91", + "_nodeVersion":"12.9.1", + "_npmVersion":"6.10.2", + "_npmUser":{ + "name":"kgryte", + "email":"kgryte@gmail.com" + }, + "dist":{ + "integrity":"sha512-7zGaX/QGeBtlQKqwwpxSWUhzYxKU7tZo2BfhPKQPMq+buLdYjc2H+jRprXSW5kX1OXqi0l1aIV84ACvD3isNFQ==", + "shasum":"a0b84d2815661b7cf769a27f72ff3ee895e39ed7", + "tarball":"https://registry.npmjs.org/@stdlib/stdlib/-/stdlib-0.0.91.tgz", + "fileCount":32938, + "unpackedSize":489739477, + "npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeapL7CRA9TVsSAnZWagAAKisP/1yA5QZaWmpDHhfdu8Ot\nd74fnVP8Yqi+7BIyZjEKMpeSGbRm613IMu7sfDe5nprH8dAImGxu82lJM5rq\n2XL7JNvgiooRp/IFXbSTlh0cVtcG+MB78+E44C9mez7YJ7jp3B5wxU09wuJt\ncpIR3aSlt19LoIIt1syVddKJRHj448fDIC5nKKJFBQPBHWTvep7aqBeKl/MR\nXEsU9rq3Zk8pwiNd9n+3qsI9VsEp96L1Rrz9D7G+Ztynez9ewXwvBqDZ5kPC\nyM/6hZfd5mABNSqb6nHuYJqOy44IdEFapVB7Hg8E2u/OAr5htaDE6wdjQ7Lw\nNttzmWHZKbdYLGw+v17NlGi42CSvwlwpFf8UF4csanzVvWoBXf22uRGyJ+gy\n30P+3FpUKqhP/4lx3VSkIUy1QO0zhKdDXtB0vln4Z5LeqD+DrWooTDlLpDVw\nAUv7BLoHICSvUa5ZaepXfpRYyhVQPHxX4iXBOC9v+8nmYiKWmxQ6HDdfRKsX\nxlUMFrucr/qR1z+9RZ4f7V0r4Jdy7GOKpwMTFVcUY5Shnd6ak1kHLj97gc7w\nTHcoX/4zrsqiJDxe2yPpiHLSVrI8R1Y254O9IFzgshhvP4MpTNMKPjDJv08M\nGdlZbMfMylhP4JG5rkQIMwDVof2A5QZZRPLyEHgspmyztejOe44Rhhp0QZoy\ns9Pr\r\n=YRic\r\n-----END PGP SIGNATURE-----\r\n" + }, + "maintainers":[ + { + "name":"kgryte", + "email":"kgryte@gmail.com" + }, + { + "name":"planeshifter", + "email":"pgb@andrew.cmu.edu" + }, + { + "name":"stdlib-bot", + "email":"kgryte@gmail.com" + } + ], + "_npmOperationalInternal":{ + "host":"s3://npm-registry-packages", + "tmp":"tmp/stdlib_0.0.91_1584042743033_0.883311859859994" + }, + "_hasShrinkwrap":false + } + }, + "readme":"\n\n\n\n\n\n
\n
\n
\n
\n \n \"stdlib\n \n
\n
\n
\n
\n
\n
\n\n\n\n* * *\n\n\n\n
\n\nstdlib ([/ˈstændərd lɪb/][ipa-english] \"standard lib\") is a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing applications. The library provides a collection of robust, high performance libraries for mathematics, statistics, data processing, streams, and more and includes many of the utilities you would expect from a standard library.\n\nThis is the GitHub repository of stdlib source code and documentation. For help developing stdlib, see the [development guide][stdlib-development].\n\n## Features\n\n- 150+ [special math functions][@stdlib/math/base/special].\n\n
\n \"Demo\n
\n\n- 35+ [probability distributions][@stdlib/stats/base/dists], with support for evaluating probability density functions (PDFs), cumulative distribution functions (CDFs), quantiles, moments, and more.\n\n
\n \"Demo\n
\n\n- 40+ [seedable pseudorandom number generators][@stdlib/random/base] (PRNGs).\n\n
\n \"Demo\n
\n\n- 200+ general [utilities][@stdlib/utils] for data transformation, functional programming, and asynchronous control flow.\n\n
\n \"Demo\n
\n\n- 200+ [assertion utilities][@stdlib/assert] for data validation and feature detection.\n\n
\n \"Demo\n
\n\n- 50+ [sample datasets][@stdlib/datasets] for testing and development.\n\n
\n \"Demo\n
\n\n- A [plot API][@stdlib/plot/ctor] for data visualization and exploratory data analysis.\n\n
\n \"Demo\n
\n\n- Native add-ons for interfacing with BLAS libraries, with pure JavaScript fallbacks.\n\n
\n \"Demo\n
\n\n- A [benchmark framework][@stdlib/bench/harness] supporting TAP.\n\n
\n \"Demo\n
\n\n- REPL environment with integrated help and examples.\n\n
\n \"Demo\n
\n\n- Can be bundled using [Browserify][browserify], [Webpack][webpack], and other bundlers for use in web browsers.\n\n
\n \"Demo\n
\n\n## Resources\n\n- [**Homepage**][stdlib-homepage]\n- [**Documentation**][stdlib-documentation]\n- [**Source code**][stdlib-source]\n- [**Code coverage**][stdlib-code-coverage]\n- [**FAQ**][stdlib-faq]\n\n### External Resources\n\n- [**Twitter**][stdlib-twitter]\n- [**Gitter**][stdlib-gitter]\n\n## Prerequisites\n\nRunning stdlib **requires** the following prerequisites:\n\n- [Node.js][node-js]: JavaScript runtime (version `>= 0.10`)\n- [npm][npm]: package manager (version `> 2.7.0`; if Node `< 1.0.0`, version `> 2.7.0` and `< 4.0.0`; if Node `< 6.0.0`, version `> 2.7.0` and `< 6.0.0`)\n\nMost functionality in stdlib is implemented exclusively in JavaScript; however, some implementations try to capture performance benefits by using [native bindings][node-js-add-ons] and/or [WebAssembly][webassembly]. While **not** required to run stdlib, as **every** stdlib implementation has a JavaScript fallback, the following dependencies are **required** for building native add-ons, including linking to BLAS and LAPACK libraries:\n\n- [GNU make][make]: development utility and task runner\n- [GNU bash][bash]: an sh-compatible shell\n- [gcc & g++][gcc] or [Clang][clang]: C/C++ compilation and linking (g++ version `>= 4.8`; clang version `>= 3.5`, Xcode version `>=8.3.1` on OS X)\n- [gfortran][gfortran]: Fortran compilation and linking (version `>= 4.8`)\n\nWhile **not** required to run stdlib, the following dependencies are **required** for automatically downloading external libraries:\n\n- [curl][curl], [wget][wget], or [fetch][fetch] (FreeBSD): utilities for downloading remote resources\n\nThe following external libraries can be automatically downloaded and compiled from source using `make`:\n\n- [OpenBLAS][openblas]: optimized BLAS library\n- [Electron][electron]: framework for cross-platform desktop applications\n\n## Installation\n\nTo install as a library or application dependency,\n\n\n\n```bash\n$ npm install @stdlib/stdlib\n```\n\nTo install globally for use as a command-line utility,\n\n\n\n```bash\n$ npm install -g @stdlib/stdlib\n```\n\nwhich will expose the `stdlib` command. For example, to see available sub-commands\n\n\n\n```bash\n$ stdlib help\n```\n\nand to run the [REPL][@stdlib/repl]\n\n\n\n```bash\n$ stdlib repl\n```\n\nFor distributable bundles for use in browser environments or as shared (\"vendored\") libraries in server environments, see the [`dist`][stdlib-bundles] directory and associated [guide][stdlib-bundles].\n\nOtherwise, to install as a system library, follow the [download][stdlib-development], [configuration][stdlib-development], and [installation][stdlib-development] instructions as described in the [development guide][stdlib-development].\n\n* * *\n\n## Contributing\n\nSee the [contributing guidelines][stdlib-contributing].\n\n## License\n\nSee [LICENSE][stdlib-license].\n\n## Copyright\n\nCopyright © 2016-2020. The Stdlib [Authors][stdlib-authors].\n\n
\n\n\n\n\n\n* * *\n\n
\n\n## Status\n\n[![stability-experimental][stability-image]][stability-url]\n\n#### Version\n\n\n\n[![git tag][tag-image]][tag-url] [![NPM version][npm-image]][npm-url] [![Node.js version][node-image]][node-url]\n\n\n\n#### Build\n\n\n\n\n\n| OS | Build (master) | Coverage (master) | Build (develop) | Coverage (develop) |\n| ---------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |\n| Linux/OS X | [![Linux/OS X build status (master)][build-image-master]][build-url-master] | [![coverage (master)][coverage-image-master]][coverage-url-master] | [![Linux/OS X build status (develop)][build-image-develop]][build-url-develop] | [![coverage (develop)][coverage-image-develop]][coverage-url-develop] |\n| Windows | [![Windows build status (master)][windows-build-image-master]][windows-build-url-master] | [![coverage (master)][coverage-image-master]][coverage-url-master] | [![Windows build status (develop)][windows-build-image-develop]][windows-build-url-develop] | [![coverage (develop)][coverage-image-develop]][coverage-url-develop] |\n\n\n\n#### Dependencies\n\n\n\n[![Dependencies][dependencies-image]][dependencies-url] [![DevDependencies][dev-dependencies-image]][dev-dependencies-url]\n\n\n\n#### Community\n\n[![Chat][chat-image]][chat-url]\n\n
\n\n\n\n\n\n
\n\n
\n\n\n\n\n\n* * *\n\n
\n\n## Acknowledgments\n\n### Build Infrastructure\n\nTest and build infrastructure is generously provided by the following services:\n\n
\n \"Continuous\n
\n
\n\n
\n\n\n\n\n\n
\n\n[stability-image]: https://img.shields.io/badge/stability-experimental-orange.svg\n\n[stability-url]: https://github.com/stdlib-js/stdlib\n\n[npm-image]: https://img.shields.io/npm/v/@stdlib/stdlib.svg\n\n[npm-url]: https://npmjs.org/package/@stdlib/stdlib\n\n[tag-image]: https://img.shields.io/github/tag/stdlib-js/stdlib.svg\n\n[tag-url]: https://github.com/stdlib-js/stdlib/tags\n\n[node-image]: https://img.shields.io/node/v/@stdlib/stdlib.svg\n\n[node-url]: https://github.com/@stdlib-js/stdlib\n\n[build-image-master]: https://img.shields.io/travis/stdlib-js/stdlib/master.svg\n\n[build-url-master]: https://travis-ci.org/stdlib-js/stdlib\n\n[build-image-develop]: https://img.shields.io/travis/stdlib-js/stdlib/develop.svg\n\n[build-url-develop]: https://travis-ci.org/stdlib-js/stdlib\n\n\n\n[windows-build-image-master]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=master&svg=true\n\n[windows-build-url-master]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=master&svg=true\n\n[windows-build-image-develop]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=develop&svg=true\n\n[windows-build-url-develop]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=develop&svg=true\n\n[coverage-image-master]: https://img.shields.io/codecov/c/github/stdlib-js/stdlib/master.svg\n\n[coverage-url-master]: https://codecov.io/github/stdlib-js/stdlib/branch/master\n\n[coverage-image-develop]: https://img.shields.io/codecov/c/github/stdlib-js/stdlib/develop.svg\n\n[coverage-url-develop]: https://codecov.io/github/stdlib-js/stdlib/branch/develop\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/stdlib\n\n[dependencies-url]: https://david-dm.org/stdlib-js/stdlib/develop\n\n[dev-dependencies-image]: https://img.shields.io/david/dev/stdlib-js/stdlib\n\n[dev-dependencies-url]: https://david-dm.org/stdlib-js/stdlib/develop?type=dev\n\n[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg\n\n[chat-url]: https://gitter.im/stdlib-js/stdlib/\n\n[make]: https://www.gnu.org/software/make\n\n[bash]: https://www.gnu.org/software/bash/\n\n[curl]: http://curl.haxx.se/\n\n[wget]: http://www.gnu.org/software/wget\n\n[fetch]: http://www.freebsd.org/cgi/man.cgi?fetch%281%29\n\n[node-js]: https://nodejs.org/en/\n\n[npm]: https://www.npmjs.com/\n\n[gcc]: http://gcc.gnu.org/\n\n[clang]: http://clang.llvm.org/\n\n[gfortran]: https://gcc.gnu.org/fortran/\n\n[openblas]: https://github.com/xianyi/OpenBLAS\n\n[electron]: https://electron.atom.io/\n\n[webassembly]: http://webassembly.org/\n\n[node-js-add-ons]: https://nodejs.org/api/addons.html\n\n[browserify]: https://github.com/substack/node-browserify\n\n[webpack]: https://webpack.js.org/\n\n[ipa-english]: https://en.wikipedia.org/wiki/Help:IPA/English\n\n[stdlib-contributing]: https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md\n\n[stdlib-development]: https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md\n\n[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors\n\n[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/stdlib/develop/LICENSE\n\n[stdlib-homepage]: https://github.com/stdlib-js/stdlib\n\n[stdlib-documentation]: https://github.com/stdlib-js/stdlib\n\n[stdlib-faq]: https://github.com/stdlib-js/stdlib/blob/develop/FAQ.md\n\n[stdlib-source]: https://github.com/stdlib-js/stdlib\n\n[stdlib-bundles]: https://github.com/stdlib-js/stdlib/tree/develop/dist\n\n[stdlib-code-coverage]: https://codecov.io/github/stdlib-js/stdlib/branch/develop\n\n[stdlib-twitter]: https://twitter.com/stdlibjs\n\n[stdlib-gitter]: https://gitter.im/stdlib-js/stdlib\n\n[@stdlib/math/base/special]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special\n\n[@stdlib/stats/base/dists]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dists\n\n[@stdlib/random/base]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/random/base\n\n[@stdlib/assert]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert\n\n[@stdlib/datasets]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/datasets\n\n[@stdlib/utils]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils\n\n[@stdlib/plot/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/plot/ctor\n\n[@stdlib/bench/harness]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/bench/harness\n\n[@stdlib/repl]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/repl\n\n
\n\n\n", + "maintainers":[ + { + "name":"kgryte", + "email":"kgryte@gmail.com" + }, + { + "name":"planeshifter", + "email":"pgb@andrew.cmu.edu" + }, + { + "name":"stdlib-bot", + "email":"kgryte@gmail.com" + } + ], + "time":{ + "modified":"2020-03-12T19:52:29.640Z", + "created":"2016-10-12T06:51:20.600Z", + "0.0.0":"2016-10-12T06:51:20.600Z", + "0.0.2":"2017-04-25T18:44:13.928Z", + "0.0.3":"2017-04-30T00:21:35.096Z", + "0.0.4":"2017-07-27T17:57:36.643Z", + "0.0.5":"2017-08-01T22:39:50.762Z", + "0.0.6":"2017-08-02T22:02:12.782Z", + "0.0.7":"2017-08-03T14:20:14.959Z", + "0.0.8":"2017-08-04T22:49:42.048Z", + "0.0.9":"2017-08-06T15:50:07.130Z", + "0.0.10":"2017-08-11T12:08:08.611Z", + "0.0.11":"2017-08-14T19:30:14.137Z", + "0.0.12":"2017-08-16T19:55:37.908Z", + "0.0.13":"2017-08-20T05:13:39.725Z", + "0.0.14":"2017-08-21T05:44:01.240Z", + "0.0.15":"2017-08-22T04:18:57.566Z", + "0.0.16":"2017-08-25T21:28:23.927Z", + "0.0.17":"2017-09-01T22:16:31.416Z", + "0.0.18":"2017-09-05T09:03:58.058Z", + "0.0.19":"2017-09-06T16:58:07.405Z", + "0.0.20":"2017-09-15T01:55:02.681Z", + "0.0.21":"2017-09-17T22:44:09.507Z", + "0.0.22":"2017-09-17T22:58:37.628Z", + "0.0.23":"2017-09-21T00:28:10.891Z", + "0.0.24":"2017-09-27T05:25:38.086Z", + "0.0.25":"2017-09-28T18:43:09.186Z", + "0.0.26":"2017-10-01T20:28:06.199Z", + "0.0.27":"2017-10-04T07:47:59.512Z", + "0.0.28":"2017-10-04T21:21:50.857Z", + "0.0.29":"2017-10-30T22:52:00.715Z", + "0.0.30":"2017-11-15T17:49:30.317Z", + "0.0.31":"2018-01-25T08:42:50.794Z", + "0.0.32":"2018-02-01T06:15:37.415Z", + "0.0.33":"2018-02-01T22:43:37.172Z", + "0.0.34":"2018-04-01T21:48:04.949Z", + "0.0.35":"2018-04-13T10:08:56.307Z", + "0.0.36":"2018-04-19T14:46:47.232Z", + "0.0.37":"2018-05-03T03:48:00.449Z", + "0.0.38":"2018-05-04T23:49:17.149Z", + "0.0.39":"2018-05-10T22:52:04.741Z", + "0.0.40":"2018-05-11T23:39:29.144Z", + "0.0.41":"2018-06-08T05:11:07.909Z", + "0.0.42":"2018-06-09T22:10:27.389Z", + "0.0.43":"2018-07-11T21:37:47.885Z", + "0.0.44":"2018-10-14T00:51:09.411Z", + "0.0.45":"2018-10-18T02:07:09.244Z", + "0.0.46":"2018-10-23T00:41:29.491Z", + "0.0.47":"2018-10-27T05:53:06.371Z", + "0.0.48":"2018-10-28T08:13:19.404Z", + "0.0.49":"2018-10-29T09:58:26.250Z", + "0.0.50":"2018-11-07T21:42:50.706Z", + "0.0.51":"2018-11-22T06:23:29.674Z", + "0.0.52":"2018-11-24T02:17:37.004Z", + "0.0.53":"2018-12-04T09:31:42.091Z", + "0.0.54":"2018-12-04T11:39:18.467Z", + "0.0.55":"2018-12-04T18:51:18.466Z", + "0.0.56":"2018-12-29T18:28:02.414Z", + "0.0.57":"2019-01-02T01:07:29.572Z", + "0.0.58":"2019-01-11T08:06:31.455Z", + "0.0.59":"2019-02-09T07:36:24.669Z", + "0.0.60":"2019-02-22T03:45:39.412Z", + "0.0.61":"2019-07-27T22:35:39.288Z", + "0.0.62":"2019-07-30T07:30:43.272Z", + "0.0.63":"2019-08-06T02:52:25.375Z", + "0.0.64":"2019-08-09T18:51:07.351Z", + "0.0.65":"2019-08-17T03:09:17.136Z", + "0.0.66":"2019-08-17T17:35:50.561Z", + "0.0.67":"2019-08-20T02:45:52.160Z", + "0.0.69":"2019-08-26T23:28:42.654Z", + "0.0.70":"2019-08-27T00:27:46.407Z", + "0.0.71":"2019-08-27T00:41:33.759Z", + "0.0.72":"2019-08-27T01:20:16.480Z", + "0.0.73":"2019-08-28T23:39:23.422Z", + "0.0.74":"2019-09-01T09:50:09.364Z", + "0.0.75":"2019-09-01T10:05:32.777Z", + "0.0.76":"2019-09-01T19:17:25.007Z", + "0.0.77":"2019-09-04T07:36:03.189Z", + "0.0.78":"2019-09-04T08:02:17.225Z", + "0.0.79":"2019-09-04T18:49:49.770Z", + "0.0.80":"2019-09-04T19:06:24.767Z", + "0.0.81":"2019-09-04T19:16:09.534Z", + "0.0.82":"2019-09-04T19:26:58.279Z", + "0.0.83":"2019-09-04T19:39:25.979Z", + "0.0.84":"2019-09-05T02:35:54.034Z", + "0.0.85":"2019-09-09T23:27:31.388Z", + "0.0.86":"2019-10-14T21:08:22.169Z", + "0.0.87":"2019-10-15T00:23:45.794Z", + "0.0.88":"2019-11-22T02:17:53.912Z", + "0.0.89":"2019-11-22T09:58:29.982Z", + "0.0.90":"2019-11-22T10:19:20.222Z", + "0.0.91":"2020-03-12T19:52:26.792Z" + }, + "homepage":"https://github.com/stdlib-js/stdlib", + "keywords":[ + "stdlib", + "stdlib-js", + "stdlib.js", + "js-stdlib", + "stdlibjs", + "standard", + "std", + "library", + "lib", + "libstd" + ], + "repository":{ + "type":"git", + "url":"git://github.com/stdlib-js/stdlib.git" + }, + "contributors":[ + { + "name":"The Stdlib Authors", + "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "bugs":{ + "url":"https://github.com/stdlib-js/stdlib/issues" + }, + "license":"Apache-2.0 AND BSL-1.0", + "readmeFilename":"README.md", + "author":{ + "name":"The Stdlib Authors", + "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "users":{ + "planeshifter":true, + "fm-96":true, + "pubudud":true + } +} diff --git a/services/node/testUtils/testUtils.js b/services/node/testUtils/testUtils.js new file mode 100644 index 0000000000000..8e812cc1735b4 --- /dev/null +++ b/services/node/testUtils/testUtils.js @@ -0,0 +1,50 @@ +const fs = require('fs'); +const path = require('path'); + +const getTemplate = (template) => { + return JSON.parse(fs.readFileSync(path.join(__dirname, template), 'utf-8')) +} + +const mockPackageData = (packageName, engines, scope, tag, registry) => (nock) => { + let packageJson; + let urlPath; + if (scope || tag) { + if (scope) { + urlPath = `/${scope}%2F${packageName}` + } else { + urlPath = `/${packageName}`; + } + packageJson = getTemplate('packageJsonVersionsTemplate.json') + packageJson.name = packageJson + packageJson['dist-tags'][tag || 'latest'] = '0.0.91' + packageJson.versions['0.0.91'].name = packageName; + packageJson.versions['0.0.91'].engines.node = engines; + } else { + urlPath = `/${packageName}/latest`; + packageJson = getTemplate('packageJsonTemplate.json') + packageJson.name = packageName; + packageJson.engines.node = engines; + } + return nock(registry || 'https://registry.npmjs.org/') + .get(urlPath) + .reply(200, packageJson) +} + +const mockNonExistingPackageData = (packageName) => (nock) => { + return nock('https://registry.npmjs.org/') + .get(`/${packageName}/latest`) + .reply(404) +} + +const mockCurrentSha = (latestVersion) => (nock) => { + const latestSha = `node-v${latestVersion}.12.0-aix-ppc64.tar.gz` + return nock('https://nodejs.org/dist/') + .get(`/latest/SHASUMS256.txt`) + .reply(200, latestSha) +} + +module.exports = { + mockNonExistingPackageData, + mockPackageData, + mockCurrentSha, +} diff --git a/services/npm/npm-base.js b/services/npm/npm-base.js index bded61a3910e1..e9d8ff75ea0fe 100644 --- a/services/npm/npm-base.js +++ b/services/npm/npm-base.js @@ -98,11 +98,16 @@ module.exports = class NpmBase extends BaseJsonService { async fetchPackageData({ registryUrl, scope, packageName, tag }) { registryUrl = registryUrl || this.constructor.defaultRegistryUrl let url - if (scope === undefined) { + if (scope === undefined && tag === undefined) { // e.g. https://registry.npmjs.org/express/latest // Use this endpoint as an optimization. It covers the vast majority of // these badges, and the response is smaller. url = `${registryUrl}/${packageName}/latest` + } else if (scope === undefined && tag !== undefined) { + // e.g. https://registry.npmjs.org/express/latest + // Use this endpoint as an optimization. It covers the vast majority of + // these badges, and the response is smaller. + url = `${registryUrl}/${packageName}` } else { // e.g. https://registry.npmjs.org/@cedx%2Fgulp-david // because https://registry.npmjs.org/@cedx%2Fgulp-david/latest does not work @@ -120,7 +125,7 @@ module.exports = class NpmBase extends BaseJsonService { }) let packageData - if (scope === undefined) { + if (scope === undefined && tag === undefined) { packageData = json } else { const registryTag = tag || 'latest' From 132e7aff8f3dd4b11231f6a90571f3c77e512673 Mon Sep 17 00:00:00 2001 From: regevbr Date: Tue, 31 Mar 2020 14:55:34 +0300 Subject: [PATCH 04/16] fix: node service has bad colors #4809 --- services/node/node-current.tester.js | 22 +- services/node/node-lts.tester.js | 76 +- .../node/testUtils/packageJsonTemplate.json | 8 +- .../packageJsonVersionsTemplate.json | 1084 ++++++++--------- services/node/testUtils/test-utils.js | 54 + services/node/testUtils/testUtils.js | 50 - 6 files changed, 654 insertions(+), 640 deletions(-) create mode 100644 services/node/testUtils/test-utils.js delete mode 100644 services/node/testUtils/testUtils.js diff --git a/services/node/node-current.tester.js b/services/node/node-current.tester.js index 33921f374c22f..50280d5c7810f 100644 --- a/services/node/node-current.tester.js +++ b/services/node/node-current.tester.js @@ -3,7 +3,11 @@ const { expect } = require('chai') const { Range } = require('semver') const t = (module.exports = require('../tester').createServiceTester()) -const { mockPackageData, mockCurrentSha, mockNonExistingPackageData } = require('./testUtils/testUtils'); +const { + mockPackageData, + mockCurrentSha, + mockNonExistingPackageData, +} = require('./testUtils/test-utils') function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() @@ -67,7 +71,11 @@ t.create('engines satisfies current node version - scoped and tagged') .get('/@cycle/core/canary.json') .intercept(mockPackageData(`core`, `>=0.4.0`, `@cycle`, `canary`)) .intercept(mockCurrentSha(13)) - .expectBadge({ label: 'node@canary', message: `>=0.4.0`, color: `brightgreen` }) + .expectBadge({ + label: 'node@canary', + message: `>=0.4.0`, + color: `brightgreen`, + }) .afterJSON(json => { expectSemverRange(json.message) }) @@ -83,7 +91,15 @@ t.create('engines not satisfies current node version - scoped and tagged') t.create('engines satisfies current node version with custom registry') .get('/passport.json?registry_uri=https://registry.npmjs.com') - .intercept(mockPackageData(`passport`, `>=0.4.0`, undefined, undefined, 'https://registry.npmjs.com')) + .intercept( + mockPackageData( + `passport`, + `>=0.4.0`, + undefined, + undefined, + 'https://registry.npmjs.com' + ) + ) .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) .afterJSON(json => { diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index ef1bdde5ceb54..c762c434f1459 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -8,41 +8,41 @@ function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() } -// t.create('gets the node version of passport') -// .get('/passport.json') -// .expectBadge({ label: 'node lts' }) -// .afterJSON(json => { -// expectSemverRange(json.message) -// }) -// -// t.create('gets the node version of @stdlib/stdlib') -// .get('/@stdlib/stdlib.json') -// .expectBadge({ label: 'node lts' }) -// .afterJSON(json => { -// expectSemverRange(json.message) -// }) -// -// t.create("gets the tagged release's node version version of ionic") -// .get('/ionic/next.json') -// .expectBadge({ label: 'node@next' }) -// .afterJSON(json => { -// expectSemverRange(json.message) -// }) -// -// t.create('gets the node version of passport from a custom registry') -// .get('/passport.json?registry_uri=https://registry.npmjs.com') -// .expectBadge({ label: 'node lts' }) -// .afterJSON(json => { -// expectSemverRange(json.message) -// }) -// -// t.create("gets the tagged release's node version of @cycle/core") -// .get('/@cycle/core/canary.json') -// .expectBadge({ label: 'node@canary' }) -// .afterJSON(json => { -// expectSemverRange(json.message) -// }) -// -// t.create('invalid package name') -// .get('/frodo-is-not-a-package.json') -// .expectBadge({ label: 'node lts', message: 'package not found' }) +t.create('gets the node version of passport') + .get('/passport.json') + .expectBadge({ label: 'node lts' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('gets the node version of @stdlib/stdlib') + .get('/@stdlib/stdlib.json') + .expectBadge({ label: 'node lts' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create("gets the tagged release's node version version of ionic") + .get('/ionic/next.json') + .expectBadge({ label: 'node@next' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('gets the node version of passport from a custom registry') + .get('/passport.json?registry_uri=https://registry.npmjs.com') + .expectBadge({ label: 'node lts' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create("gets the tagged release's node version of @cycle/core") + .get('/@cycle/core/canary.json') + .expectBadge({ label: 'node@canary' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('invalid package name') + .get('/frodo-is-not-a-package.json') + .expectBadge({ label: 'node lts', message: 'package not found' }) diff --git a/services/node/testUtils/packageJsonTemplate.json b/services/node/testUtils/packageJsonTemplate.json index 7eadf0a9553ed..fd74e196a2e2b 100644 --- a/services/node/testUtils/packageJsonTemplate.json +++ b/services/node/testUtils/packageJsonTemplate.json @@ -2,13 +2,7 @@ "name": "passport", "version": "0.4.1", "description": "Simple, unobtrusive authentication for Node.js.", - "keywords": [ - "express", - "connect", - "auth", - "authn", - "authentication" - ], + "keywords": ["express", "connect", "auth", "authn", "authentication"], "author": { "name": "Jared Hanson", "email": "jaredhanson@gmail.com", diff --git a/services/node/testUtils/packageJsonVersionsTemplate.json b/services/node/testUtils/packageJsonVersionsTemplate.json index 37448a242679f..0876ac049ac8b 100644 --- a/services/node/testUtils/packageJsonVersionsTemplate.json +++ b/services/node/testUtils/packageJsonVersionsTemplate.json @@ -1,207 +1,207 @@ { - "_id":"@stdlib/stdlib", - "_rev":"174-64e9e180efd442c3a9842a60bb20b493", - "name":"@stdlib/stdlib", - "description":"Standard library.", - "dist-tags":{ - "latest":"0.0.91" + "_id": "@stdlib/stdlib", + "_rev": "174-64e9e180efd442c3a9842a60bb20b493", + "name": "@stdlib/stdlib", + "description": "Standard library.", + "dist-tags": { + "latest": "0.0.91" }, - "versions":{ - "0.0.90":{ - "name":"@stdlib/stdlib", - "version":"0.0.90", - "description":"Standard library.", - "license":"Apache-2.0 AND BSL-1.0", - "author":{ - "name":"The Stdlib Authors", - "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + "versions": { + "0.0.90": { + "name": "@stdlib/stdlib", + "version": "0.0.90", + "description": "Standard library.", + "license": "Apache-2.0 AND BSL-1.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" }, - "contributors":[ + "contributors": [ { - "name":"The Stdlib Authors", - "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" } ], - "funding":{ - "type":"patreon", - "url":"https://www.patreon.com/athan" + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/athan" }, - "bin":{ - "stdlib":"./bin/cli" + "bin": { + "stdlib": "./bin/cli" }, - "main":"./lib", - "browser":"./dist/stdlib-flat.min.js", - "unpkg":"./dist/stdlib-flat.min.js", - "directories":{ - "doc":"./docs", - "example":"./examples", - "lib":"./lib", - "test":"./test" + "main": "./lib", + "browser": "./dist/stdlib-flat.min.js", + "unpkg": "./dist/stdlib-flat.min.js", + "directories": { + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" }, - "scripts":{ - "postinstall":"node ./tools/scripts/postinstall", - "preuninstall":"node ./tools/scripts/preuninstall", - "notes":"make notes", - "lint":"make lint", - "repl":"make repl", - "test":"make test", - "test-cov":"make test-cov", - "view-cov":"make view-cov", - "examples":"make examples", - "benchmark":"make benchmark", - "clean":"make clean", - "check-deps":"make check-deps", - "check-licenses":"make check-licenses" + "scripts": { + "postinstall": "node ./tools/scripts/postinstall", + "preuninstall": "node ./tools/scripts/preuninstall", + "notes": "make notes", + "lint": "make lint", + "repl": "make repl", + "test": "make test", + "test-cov": "make test-cov", + "view-cov": "make view-cov", + "examples": "make examples", + "benchmark": "make benchmark", + "clean": "make clean", + "check-deps": "make check-deps", + "check-licenses": "make check-licenses" }, - "homepage":"https://github.com/stdlib-js/stdlib", - "repository":{ - "type":"git", - "url":"git://github.com/stdlib-js/stdlib.git" + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" }, - "bugs":{ - "url":"https://github.com/stdlib-js/stdlib/issues" + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies":{ - "acorn":"^7.0.0", - "acorn-loose":"^7.0.0", - "acorn-walk":"^7.0.0", - "d3-format":"^1.0.0", - "d3-scale":"^1.0.0", - "d3-shape":"^1.0.0", - "d3-time-format":"^2.0.0", - "debug":"^2.6.9", - "glob":"^7.0.5", - "minimist":"^1.2.0", - "nan":"^2.5.1", - "node-gyp":"^3.5.0", - "readable-stream":"^2.1.4", - "resolve":"^1.1.7", - "update-notifier":"^1.0.0", - "vdom-to-html":"^2.3.0", - "virtual-dom":"^2.1.1" + "dependencies": { + "acorn": "^7.0.0", + "acorn-loose": "^7.0.0", + "acorn-walk": "^7.0.0", + "d3-format": "^1.0.0", + "d3-scale": "^1.0.0", + "d3-shape": "^1.0.0", + "d3-time-format": "^2.0.0", + "debug": "^2.6.9", + "glob": "^7.0.5", + "minimist": "^1.2.0", + "nan": "^2.5.1", + "node-gyp": "^3.5.0", + "readable-stream": "^2.1.4", + "resolve": "^1.1.7", + "update-notifier": "^1.0.0", + "vdom-to-html": "^2.3.0", + "virtual-dom": "^2.1.1" }, - "devDependencies":{ - "ajv":"^5.2.2", - "browser-pack-flat":"^3.0.0", - "browserify":"^16.1.0", - "bundle-collapser":"^1.3.0", - "chai":"^3.5.0", - "common-shakeify":"^0.6.0", - "david":"^11.0.0", - "doctrine":"^3.0.0", - "dtslint":"^0.9.8", - "envify":"^4.0.0", - "eslint":"^6.4.0", - "factor-bundle":"^2.5.0", - "fastify":"^2.10.0", - "fastify-helmet":"^3.0.2", - "fastify-static":"^2.5.0", - "istanbul":"^0.4.1", - "jsdoc":"^3.4.0", - "lunr":"^2.0.0", - "mathjax-node":"^2.0.1", - "mathjax-node-sre":"^3.0.0", - "mkdirp":"^0.5.1", - "mustache":"^3.0.0", - "parse-link-header":"^1.0.1", - "plato":"^1.5.0", - "proxyquire":"^2.0.0", - "proxyquire-universal":"^2.0.0", - "proxyquireify":"^3.1.1", - "read-installed":"^4.0.3", - "rehype":"^9.0.0", - "rehype-highlight":"^3.0.0", - "remark":"^11.0.1", - "remark-cli":"^7.0.0", - "remark-frontmatter":"^1.2.0", - "remark-html":"^10.0.0", - "remark-lint":"^6.0.0", - "remark-lint-blockquote-indentation":"^1.0.0", - "remark-lint-checkbox-character-style":"^1.0.0", - "remark-lint-checkbox-content-indent":"^1.0.0", - "remark-lint-code-block-style":"^1.0.0", - "remark-lint-definition-case":"^1.0.0", - "remark-lint-definition-spacing":"^1.0.0", - "remark-lint-emphasis-marker":"^1.0.0", - "remark-lint-fenced-code-flag":"^1.0.0", - "remark-lint-fenced-code-marker":"^1.0.0", - "remark-lint-file-extension":"^1.0.0", - "remark-lint-final-definition":"^1.0.0", - "remark-lint-final-newline":"^1.0.0", - "remark-lint-first-heading-level":"^1.1.0", - "remark-lint-hard-break-spaces":"^1.0.1", - "remark-lint-heading-increment":"^1.0.0", - "remark-lint-heading-style":"^1.0.0", - "remark-lint-linebreak-style":"^1.0.0", - "remark-lint-link-title-style":"^1.0.0", - "remark-lint-list-item-bullet-indent":"^1.0.0", - "remark-lint-list-item-content-indent":"^1.0.0", - "remark-lint-list-item-indent":"^1.0.0", - "remark-lint-list-item-spacing":"^1.1.0", - "remark-lint-maximum-heading-length":"^1.0.0", - "remark-lint-maximum-line-length":"^1.0.0", - "remark-lint-no-auto-link-without-protocol":"^1.0.0", - "remark-lint-no-blockquote-without-marker":"^2.0.0", - "remark-lint-no-consecutive-blank-lines":"^1.0.0", - "remark-lint-no-duplicate-definitions":"^1.0.0", - "remark-lint-no-duplicate-headings":"^1.0.0", - "remark-lint-no-duplicate-headings-in-section":"^1.0.0", - "remark-lint-no-emphasis-as-heading":"^1.0.0", - "remark-lint-no-empty-url":"^1.0.1", - "remark-lint-no-file-name-articles":"^1.0.0", - "remark-lint-no-file-name-consecutive-dashes":"^1.0.0", - "remark-lint-no-file-name-irregular-characters":"^1.0.0", - "remark-lint-no-file-name-mixed-case":"^1.0.0", - "remark-lint-no-file-name-outer-dashes":"^1.0.1", - "remark-lint-no-heading-content-indent":"^1.0.0", - "remark-lint-no-heading-indent":"^1.0.0", - "remark-lint-no-heading-like-paragraph":"^1.0.0", - "remark-lint-no-heading-punctuation":"^1.0.0", - "remark-lint-no-html":"^1.0.0", - "remark-lint-no-inline-padding":"^1.0.0", - "remark-lint-no-literal-urls":"^1.0.0", - "remark-lint-no-missing-blank-lines":"^1.0.0", - "remark-lint-no-multiple-toplevel-headings":"^1.0.0", - "remark-lint-no-paragraph-content-indent":"^1.0.1", - "remark-lint-no-reference-like-url":"^1.0.0", - "remark-lint-no-shell-dollars":"^1.0.0", - "remark-lint-no-shortcut-reference-image":"^1.0.0", - "remark-lint-no-shortcut-reference-link":"^1.0.1", - "remark-lint-no-table-indentation":"^1.0.0", - "remark-lint-no-tabs":"^1.0.0", - "remark-lint-no-undefined-references":"^1.0.0", - "remark-lint-no-unused-definitions":"^1.0.0", - "remark-lint-ordered-list-marker-style":"^1.0.0", - "remark-lint-ordered-list-marker-value":"^1.0.0", - "remark-lint-rule-style":"^1.0.0", - "remark-lint-strong-marker":"^1.0.0", - "remark-lint-table-cell-padding":"^1.0.0", - "remark-lint-table-pipe-alignment":"^1.0.0", - "remark-lint-table-pipes":"^1.0.0", - "remark-lint-unordered-list-marker-style":"^1.0.0", - "remark-slug":"^5.0.0", - "remark-unlink":"^2.0.0", - "remark-validate-links":"^9.0.1", - "remark-vdom":"^8.0.0", - "semver":"^6.0.0", - "spdx-license-ids":"^3.0.0", - "tap-spec":"5.x.x", - "tap-summary":"^4.0.0", - "tap-xunit":"^2.2.0", - "tape":"git+https://github.com/kgryte/tape.git#fix/globby", - "to-vfile":"^6.0.0", - "typedoc":"^0.15.0", - "uglify-es":"^3.1.1", - "uglifyify":"^5.0.0", - "unified-lint-rule":"^1.0.1", - "unist-util-visit":"^2.0.0", - "yaml":"^1.0.0" + "devDependencies": { + "ajv": "^5.2.2", + "browser-pack-flat": "^3.0.0", + "browserify": "^16.1.0", + "bundle-collapser": "^1.3.0", + "chai": "^3.5.0", + "common-shakeify": "^0.6.0", + "david": "^11.0.0", + "doctrine": "^3.0.0", + "dtslint": "^0.9.8", + "envify": "^4.0.0", + "eslint": "^6.4.0", + "factor-bundle": "^2.5.0", + "fastify": "^2.10.0", + "fastify-helmet": "^3.0.2", + "fastify-static": "^2.5.0", + "istanbul": "^0.4.1", + "jsdoc": "^3.4.0", + "lunr": "^2.0.0", + "mathjax-node": "^2.0.1", + "mathjax-node-sre": "^3.0.0", + "mkdirp": "^0.5.1", + "mustache": "^3.0.0", + "parse-link-header": "^1.0.1", + "plato": "^1.5.0", + "proxyquire": "^2.0.0", + "proxyquire-universal": "^2.0.0", + "proxyquireify": "^3.1.1", + "read-installed": "^4.0.3", + "rehype": "^9.0.0", + "rehype-highlight": "^3.0.0", + "remark": "^11.0.1", + "remark-cli": "^7.0.0", + "remark-frontmatter": "^1.2.0", + "remark-html": "^10.0.0", + "remark-lint": "^6.0.0", + "remark-lint-blockquote-indentation": "^1.0.0", + "remark-lint-checkbox-character-style": "^1.0.0", + "remark-lint-checkbox-content-indent": "^1.0.0", + "remark-lint-code-block-style": "^1.0.0", + "remark-lint-definition-case": "^1.0.0", + "remark-lint-definition-spacing": "^1.0.0", + "remark-lint-emphasis-marker": "^1.0.0", + "remark-lint-fenced-code-flag": "^1.0.0", + "remark-lint-fenced-code-marker": "^1.0.0", + "remark-lint-file-extension": "^1.0.0", + "remark-lint-final-definition": "^1.0.0", + "remark-lint-final-newline": "^1.0.0", + "remark-lint-first-heading-level": "^1.1.0", + "remark-lint-hard-break-spaces": "^1.0.1", + "remark-lint-heading-increment": "^1.0.0", + "remark-lint-heading-style": "^1.0.0", + "remark-lint-linebreak-style": "^1.0.0", + "remark-lint-link-title-style": "^1.0.0", + "remark-lint-list-item-bullet-indent": "^1.0.0", + "remark-lint-list-item-content-indent": "^1.0.0", + "remark-lint-list-item-indent": "^1.0.0", + "remark-lint-list-item-spacing": "^1.1.0", + "remark-lint-maximum-heading-length": "^1.0.0", + "remark-lint-maximum-line-length": "^1.0.0", + "remark-lint-no-auto-link-without-protocol": "^1.0.0", + "remark-lint-no-blockquote-without-marker": "^2.0.0", + "remark-lint-no-consecutive-blank-lines": "^1.0.0", + "remark-lint-no-duplicate-definitions": "^1.0.0", + "remark-lint-no-duplicate-headings": "^1.0.0", + "remark-lint-no-duplicate-headings-in-section": "^1.0.0", + "remark-lint-no-emphasis-as-heading": "^1.0.0", + "remark-lint-no-empty-url": "^1.0.1", + "remark-lint-no-file-name-articles": "^1.0.0", + "remark-lint-no-file-name-consecutive-dashes": "^1.0.0", + "remark-lint-no-file-name-irregular-characters": "^1.0.0", + "remark-lint-no-file-name-mixed-case": "^1.0.0", + "remark-lint-no-file-name-outer-dashes": "^1.0.1", + "remark-lint-no-heading-content-indent": "^1.0.0", + "remark-lint-no-heading-indent": "^1.0.0", + "remark-lint-no-heading-like-paragraph": "^1.0.0", + "remark-lint-no-heading-punctuation": "^1.0.0", + "remark-lint-no-html": "^1.0.0", + "remark-lint-no-inline-padding": "^1.0.0", + "remark-lint-no-literal-urls": "^1.0.0", + "remark-lint-no-missing-blank-lines": "^1.0.0", + "remark-lint-no-multiple-toplevel-headings": "^1.0.0", + "remark-lint-no-paragraph-content-indent": "^1.0.1", + "remark-lint-no-reference-like-url": "^1.0.0", + "remark-lint-no-shell-dollars": "^1.0.0", + "remark-lint-no-shortcut-reference-image": "^1.0.0", + "remark-lint-no-shortcut-reference-link": "^1.0.1", + "remark-lint-no-table-indentation": "^1.0.0", + "remark-lint-no-tabs": "^1.0.0", + "remark-lint-no-undefined-references": "^1.0.0", + "remark-lint-no-unused-definitions": "^1.0.0", + "remark-lint-ordered-list-marker-style": "^1.0.0", + "remark-lint-ordered-list-marker-value": "^1.0.0", + "remark-lint-rule-style": "^1.0.0", + "remark-lint-strong-marker": "^1.0.0", + "remark-lint-table-cell-padding": "^1.0.0", + "remark-lint-table-pipe-alignment": "^1.0.0", + "remark-lint-table-pipes": "^1.0.0", + "remark-lint-unordered-list-marker-style": "^1.0.0", + "remark-slug": "^5.0.0", + "remark-unlink": "^2.0.0", + "remark-validate-links": "^9.0.1", + "remark-vdom": "^8.0.0", + "semver": "^6.0.0", + "spdx-license-ids": "^3.0.0", + "tap-spec": "5.x.x", + "tap-summary": "^4.0.0", + "tap-xunit": "^2.2.0", + "tape": "git+https://github.com/kgryte/tape.git#fix/globby", + "to-vfile": "^6.0.0", + "typedoc": "^0.15.0", + "uglify-es": "^3.1.1", + "uglifyify": "^5.0.0", + "unified-lint-rule": "^1.0.1", + "unist-util-visit": "^2.0.0", + "yaml": "^1.0.0" }, - "engines":{ - "node":">=0.10.0", - "npm":">2.7.0" + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" }, - "os":[ + "os": [ "aix", "darwin", "freebsd", @@ -212,7 +212,7 @@ "win32", "windows" ], - "keywords":[ + "keywords": [ "stdlib", "stdlib-js", "stdlib.js", @@ -224,236 +224,236 @@ "lib", "libstd" ], - "gitHead":"51dcafe2bcccbc953fad532ee4705bbeb3627c51", - "_id":"@stdlib/stdlib@0.0.90", - "_nodeVersion":"12.9.1", - "_npmVersion":"6.10.2", - "_npmUser":{ - "name":"kgryte", - "email":"kgryte@gmail.com" + "gitHead": "51dcafe2bcccbc953fad532ee4705bbeb3627c51", + "_id": "@stdlib/stdlib@0.0.90", + "_nodeVersion": "12.9.1", + "_npmVersion": "6.10.2", + "_npmUser": { + "name": "kgryte", + "email": "kgryte@gmail.com" }, - "dist":{ - "integrity":"sha512-nLeLc4XaS8N4VX7MCctsvNMebVF5eW5GZ0ZELxYz/BugJCupxbHCna61paqVbCywWcojecRceyD4650XgbIScQ==", - "shasum":"cc54d3e864c2fd8f72c02e0b740f1e9553bbddca", - "tarball":"https://registry.npmjs.org/@stdlib/stdlib/-/stdlib-0.0.90.tgz", - "fileCount":32943, - "unpackedSize":489502244, - "npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd17YoCRA9TVsSAnZWagAA0vUP/jdfzUi8/vIK9zdbfYZC\nUTr4gEm/cAi1WMY35ukTKiXH4AtQVN7PrxMZT81zyY068vM0mJytsa6X40nd\n8osMlRVHu140eaCB9KTp1+GZ0ux9KweTWBnGp2b+TvfyOtpIk6CFwzbesJnO\nic5+poJE81EV/cs5bFMOvJA4IbYSOoyEXTuQexUZJIUVQclfCi2ua7gbVNsz\nNSvN1k4QQereqWKc6W3aHs887bCSB0gqvYfNJRWIsGSFC0EVU/cQULiv40iG\n6TMMk3908EXlt81vqfJNRYxoO2XyCZ3Tf/buBwOF1b/YmXYtMSVqlKXCTQZi\nArx6eFltOxuphcQ21dWiuqsRAaihDfiH5cs5S1H+n/xYDIrGhGz/gOYUXalh\n00VjoO+wwGDe8a1BQmL8FU4mCkRBZ3Eh0Hw3AMa/A9KMg+3WcIVoj7O6TQTf\nHPbSBNB3/BAN4uNmGXiUqv8oAuqBWzwaswu0PyqbLWSmODSx3D+/1yYUwdhV\ngPhLdS91819RH/Pah6V4wEHxa4fYbcVH4TZlseXVhVTss6VTr1PPBQZle/0Y\nitWcUiXS8j4MV8I2HpNnUxxUzIEbwEaJw/XzEv15AXK04qbPz+g2eOKy+FoT\n0xW31u11ROysZ08EARV1aJEU19Ur2JtyJtFqo3iYO8DPpxm7DFIY5pNj/oFl\nZyqR\r\n=8TuN\r\n-----END PGP SIGNATURE-----\r\n" + "dist": { + "integrity": "sha512-nLeLc4XaS8N4VX7MCctsvNMebVF5eW5GZ0ZELxYz/BugJCupxbHCna61paqVbCywWcojecRceyD4650XgbIScQ==", + "shasum": "cc54d3e864c2fd8f72c02e0b740f1e9553bbddca", + "tarball": "https://registry.npmjs.org/@stdlib/stdlib/-/stdlib-0.0.90.tgz", + "fileCount": 32943, + "unpackedSize": 489502244, + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd17YoCRA9TVsSAnZWagAA0vUP/jdfzUi8/vIK9zdbfYZC\nUTr4gEm/cAi1WMY35ukTKiXH4AtQVN7PrxMZT81zyY068vM0mJytsa6X40nd\n8osMlRVHu140eaCB9KTp1+GZ0ux9KweTWBnGp2b+TvfyOtpIk6CFwzbesJnO\nic5+poJE81EV/cs5bFMOvJA4IbYSOoyEXTuQexUZJIUVQclfCi2ua7gbVNsz\nNSvN1k4QQereqWKc6W3aHs887bCSB0gqvYfNJRWIsGSFC0EVU/cQULiv40iG\n6TMMk3908EXlt81vqfJNRYxoO2XyCZ3Tf/buBwOF1b/YmXYtMSVqlKXCTQZi\nArx6eFltOxuphcQ21dWiuqsRAaihDfiH5cs5S1H+n/xYDIrGhGz/gOYUXalh\n00VjoO+wwGDe8a1BQmL8FU4mCkRBZ3Eh0Hw3AMa/A9KMg+3WcIVoj7O6TQTf\nHPbSBNB3/BAN4uNmGXiUqv8oAuqBWzwaswu0PyqbLWSmODSx3D+/1yYUwdhV\ngPhLdS91819RH/Pah6V4wEHxa4fYbcVH4TZlseXVhVTss6VTr1PPBQZle/0Y\nitWcUiXS8j4MV8I2HpNnUxxUzIEbwEaJw/XzEv15AXK04qbPz+g2eOKy+FoT\n0xW31u11ROysZ08EARV1aJEU19Ur2JtyJtFqo3iYO8DPpxm7DFIY5pNj/oFl\nZyqR\r\n=8TuN\r\n-----END PGP SIGNATURE-----\r\n" }, - "maintainers":[ + "maintainers": [ { - "name":"kgryte", - "email":"kgryte@gmail.com" + "name": "kgryte", + "email": "kgryte@gmail.com" }, { - "name":"planeshifter", - "email":"pgb@andrew.cmu.edu" + "name": "planeshifter", + "email": "pgb@andrew.cmu.edu" }, { - "name":"stdlib-bot", - "email":"kgryte@gmail.com" + "name": "stdlib-bot", + "email": "kgryte@gmail.com" } ], - "_npmOperationalInternal":{ - "host":"s3://npm-registry-packages", - "tmp":"tmp/stdlib_0.0.90_1574417955731_0.11381173271401024" + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/stdlib_0.0.90_1574417955731_0.11381173271401024" }, - "_hasShrinkwrap":false + "_hasShrinkwrap": false }, - "0.0.91":{ - "name":"@stdlib/stdlib", - "version":"0.0.91", - "description":"Standard library.", - "license":"Apache-2.0 AND BSL-1.0", - "author":{ - "name":"The Stdlib Authors", - "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + "0.0.91": { + "name": "@stdlib/stdlib", + "version": "0.0.91", + "description": "Standard library.", + "license": "Apache-2.0 AND BSL-1.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" }, - "contributors":[ + "contributors": [ { - "name":"The Stdlib Authors", - "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" } ], - "funding":{ - "type":"patreon", - "url":"https://www.patreon.com/athan" + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/athan" }, - "bin":{ - "stdlib":"./bin/cli" + "bin": { + "stdlib": "./bin/cli" }, - "main":"./lib", - "browser":"./dist/stdlib-flat.min.js", - "unpkg":"./dist/stdlib-flat.min.js", - "jsdelivr":"./dist/stdlib-flat.min.js", - "directories":{ - "doc":"./docs", - "example":"./examples", - "lib":"./lib", - "test":"./test" + "main": "./lib", + "browser": "./dist/stdlib-flat.min.js", + "unpkg": "./dist/stdlib-flat.min.js", + "jsdelivr": "./dist/stdlib-flat.min.js", + "directories": { + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" }, - "scripts":{ - "postinstall":"node ./tools/scripts/postinstall", - "preuninstall":"node ./tools/scripts/preuninstall", - "notes":"make notes", - "lint":"make lint", - "repl":"make repl", - "test":"make test", - "test-cov":"make test-cov", - "view-cov":"make view-cov", - "examples":"make examples", - "benchmark":"make benchmark", - "clean":"make clean", - "check-deps":"make check-deps", - "check-licenses":"make check-licenses" + "scripts": { + "postinstall": "node ./tools/scripts/postinstall", + "preuninstall": "node ./tools/scripts/preuninstall", + "notes": "make notes", + "lint": "make lint", + "repl": "make repl", + "test": "make test", + "test-cov": "make test-cov", + "view-cov": "make view-cov", + "examples": "make examples", + "benchmark": "make benchmark", + "clean": "make clean", + "check-deps": "make check-deps", + "check-licenses": "make check-licenses" }, - "homepage":"https://github.com/stdlib-js/stdlib", - "repository":{ - "type":"git", - "url":"git://github.com/stdlib-js/stdlib.git" + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" }, - "bugs":{ - "url":"https://github.com/stdlib-js/stdlib/issues" + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies":{ - "acorn":"^7.0.0", - "acorn-loose":"^7.0.0", - "acorn-walk":"^7.0.0", - "d3-format":"^1.0.0", - "d3-scale":"^1.0.0", - "d3-shape":"^1.0.0", - "d3-time-format":"^2.0.0", - "debug":"^2.6.9", - "glob":"^7.0.5", - "minimist":"^1.2.0", - "nan":"^2.5.1", - "node-gyp":"^3.5.0", - "readable-stream":"^2.1.4", - "resolve":"^1.1.7", - "update-notifier":"^1.0.0", - "vdom-to-html":"^2.3.0", - "virtual-dom":"^2.1.1" + "dependencies": { + "acorn": "^7.0.0", + "acorn-loose": "^7.0.0", + "acorn-walk": "^7.0.0", + "d3-format": "^1.0.0", + "d3-scale": "^1.0.0", + "d3-shape": "^1.0.0", + "d3-time-format": "^2.0.0", + "debug": "^2.6.9", + "glob": "^7.0.5", + "minimist": "^1.2.0", + "nan": "^2.5.1", + "node-gyp": "^3.5.0", + "readable-stream": "^2.1.4", + "resolve": "^1.1.7", + "update-notifier": "^1.0.0", + "vdom-to-html": "^2.3.0", + "virtual-dom": "^2.1.1" }, - "devDependencies":{ - "@types/node":"^13.9.0", - "ajv":"^5.2.2", - "browser-pack-flat":"^3.0.0", - "browserify":"^16.1.0", - "bundle-collapser":"^1.3.0", - "chai":"^3.5.0", - "common-shakeify":"^0.6.0", - "david":"^12.0.0", - "doctrine":"^3.0.0", - "dtslint":"^3.3.0", - "envify":"^4.0.0", - "eslint":"^6.4.0", - "factor-bundle":"^2.5.0", - "istanbul":"^0.4.1", - "jsdoc":"^3.4.0", - "lunr":"^2.0.0", - "mathjax-node":"^2.0.1", - "mathjax-node-sre":"^3.0.0", - "mkdirp":"^0.5.1", - "mustache":"^4.0.0", - "parse-link-header":"^1.0.1", - "plato":"^1.5.0", - "proxyquire":"^2.0.0", - "proxyquire-universal":"^2.0.0", - "proxyquireify":"^3.1.1", - "read-installed":"^4.0.3", - "rehype":"^9.0.0", - "rehype-highlight":"^3.0.0", - "remark":"^11.0.1", - "remark-cli":"^7.0.0", - "remark-frontmatter":"^1.2.0", - "remark-html":"^10.0.0", - "remark-lint":"^6.0.0", - "remark-lint-blockquote-indentation":"^1.0.0", - "remark-lint-checkbox-character-style":"^1.0.0", - "remark-lint-checkbox-content-indent":"^1.0.0", - "remark-lint-code-block-style":"^1.0.0", - "remark-lint-definition-case":"^1.0.0", - "remark-lint-definition-spacing":"^1.0.0", - "remark-lint-emphasis-marker":"^1.0.0", - "remark-lint-fenced-code-flag":"^1.0.0", - "remark-lint-fenced-code-marker":"^1.0.0", - "remark-lint-file-extension":"^1.0.0", - "remark-lint-final-definition":"^1.0.0", - "remark-lint-final-newline":"^1.0.0", - "remark-lint-first-heading-level":"^1.1.0", - "remark-lint-hard-break-spaces":"^1.0.1", - "remark-lint-heading-increment":"^1.0.0", - "remark-lint-heading-style":"^1.0.0", - "remark-lint-linebreak-style":"^1.0.0", - "remark-lint-link-title-style":"^1.0.0", - "remark-lint-list-item-bullet-indent":"^1.0.0", - "remark-lint-list-item-content-indent":"^1.0.0", - "remark-lint-list-item-indent":"^1.0.0", - "remark-lint-list-item-spacing":"^1.1.0", - "remark-lint-maximum-heading-length":"^1.0.0", - "remark-lint-maximum-line-length":"^1.0.0", - "remark-lint-no-auto-link-without-protocol":"^1.0.0", - "remark-lint-no-blockquote-without-marker":"^2.0.0", - "remark-lint-no-consecutive-blank-lines":"^1.0.0", - "remark-lint-no-duplicate-definitions":"^1.0.0", - "remark-lint-no-duplicate-headings":"^1.0.0", - "remark-lint-no-duplicate-headings-in-section":"^1.0.0", - "remark-lint-no-emphasis-as-heading":"^1.0.0", - "remark-lint-no-empty-url":"^1.0.1", - "remark-lint-no-file-name-articles":"^1.0.0", - "remark-lint-no-file-name-consecutive-dashes":"^1.0.0", - "remark-lint-no-file-name-irregular-characters":"^1.0.0", - "remark-lint-no-file-name-mixed-case":"^1.0.0", - "remark-lint-no-file-name-outer-dashes":"^1.0.1", - "remark-lint-no-heading-content-indent":"^1.0.0", - "remark-lint-no-heading-indent":"^1.0.0", - "remark-lint-no-heading-like-paragraph":"^1.0.0", - "remark-lint-no-heading-punctuation":"^1.0.0", - "remark-lint-no-html":"^1.0.0", - "remark-lint-no-inline-padding":"^1.0.0", - "remark-lint-no-literal-urls":"^1.0.0", - "remark-lint-no-missing-blank-lines":"^1.0.0", - "remark-lint-no-multiple-toplevel-headings":"^1.0.0", - "remark-lint-no-paragraph-content-indent":"^1.0.1", - "remark-lint-no-reference-like-url":"^1.0.0", - "remark-lint-no-shell-dollars":"^1.0.0", - "remark-lint-no-shortcut-reference-image":"^1.0.0", - "remark-lint-no-shortcut-reference-link":"^1.0.1", - "remark-lint-no-table-indentation":"^1.0.0", - "remark-lint-no-tabs":"^1.0.0", - "remark-lint-no-undefined-references":"^1.0.0", - "remark-lint-no-unused-definitions":"^1.0.0", - "remark-lint-ordered-list-marker-style":"^1.0.0", - "remark-lint-ordered-list-marker-value":"^1.0.0", - "remark-lint-rule-style":"^1.0.0", - "remark-lint-strong-marker":"^1.0.0", - "remark-lint-table-cell-padding":"^1.0.0", - "remark-lint-table-pipe-alignment":"^1.0.0", - "remark-lint-table-pipes":"^1.0.0", - "remark-lint-unordered-list-marker-style":"^1.0.0", - "remark-slug":"^5.0.0", - "remark-unlink":"^2.0.0", - "remark-validate-links":"^9.0.1", - "remark-vdom":"^8.0.0", - "semver":"^6.0.0", - "spdx-license-ids":"^3.0.0", - "tap-spec":"5.x.x", - "tap-summary":"^4.0.0", - "tap-xunit":"^2.2.0", - "tape":"git+https://github.com/kgryte/tape.git#fix/globby", - "to-vfile":"^6.0.0", - "typedoc":"^0.16.11", - "uglify-es":"^3.1.1", - "uglifyify":"^5.0.0", - "unified-lint-rule":"^1.0.1", - "unist-util-visit":"^2.0.0", - "yaml":"^1.0.0" + "devDependencies": { + "@types/node": "^13.9.0", + "ajv": "^5.2.2", + "browser-pack-flat": "^3.0.0", + "browserify": "^16.1.0", + "bundle-collapser": "^1.3.0", + "chai": "^3.5.0", + "common-shakeify": "^0.6.0", + "david": "^12.0.0", + "doctrine": "^3.0.0", + "dtslint": "^3.3.0", + "envify": "^4.0.0", + "eslint": "^6.4.0", + "factor-bundle": "^2.5.0", + "istanbul": "^0.4.1", + "jsdoc": "^3.4.0", + "lunr": "^2.0.0", + "mathjax-node": "^2.0.1", + "mathjax-node-sre": "^3.0.0", + "mkdirp": "^0.5.1", + "mustache": "^4.0.0", + "parse-link-header": "^1.0.1", + "plato": "^1.5.0", + "proxyquire": "^2.0.0", + "proxyquire-universal": "^2.0.0", + "proxyquireify": "^3.1.1", + "read-installed": "^4.0.3", + "rehype": "^9.0.0", + "rehype-highlight": "^3.0.0", + "remark": "^11.0.1", + "remark-cli": "^7.0.0", + "remark-frontmatter": "^1.2.0", + "remark-html": "^10.0.0", + "remark-lint": "^6.0.0", + "remark-lint-blockquote-indentation": "^1.0.0", + "remark-lint-checkbox-character-style": "^1.0.0", + "remark-lint-checkbox-content-indent": "^1.0.0", + "remark-lint-code-block-style": "^1.0.0", + "remark-lint-definition-case": "^1.0.0", + "remark-lint-definition-spacing": "^1.0.0", + "remark-lint-emphasis-marker": "^1.0.0", + "remark-lint-fenced-code-flag": "^1.0.0", + "remark-lint-fenced-code-marker": "^1.0.0", + "remark-lint-file-extension": "^1.0.0", + "remark-lint-final-definition": "^1.0.0", + "remark-lint-final-newline": "^1.0.0", + "remark-lint-first-heading-level": "^1.1.0", + "remark-lint-hard-break-spaces": "^1.0.1", + "remark-lint-heading-increment": "^1.0.0", + "remark-lint-heading-style": "^1.0.0", + "remark-lint-linebreak-style": "^1.0.0", + "remark-lint-link-title-style": "^1.0.0", + "remark-lint-list-item-bullet-indent": "^1.0.0", + "remark-lint-list-item-content-indent": "^1.0.0", + "remark-lint-list-item-indent": "^1.0.0", + "remark-lint-list-item-spacing": "^1.1.0", + "remark-lint-maximum-heading-length": "^1.0.0", + "remark-lint-maximum-line-length": "^1.0.0", + "remark-lint-no-auto-link-without-protocol": "^1.0.0", + "remark-lint-no-blockquote-without-marker": "^2.0.0", + "remark-lint-no-consecutive-blank-lines": "^1.0.0", + "remark-lint-no-duplicate-definitions": "^1.0.0", + "remark-lint-no-duplicate-headings": "^1.0.0", + "remark-lint-no-duplicate-headings-in-section": "^1.0.0", + "remark-lint-no-emphasis-as-heading": "^1.0.0", + "remark-lint-no-empty-url": "^1.0.1", + "remark-lint-no-file-name-articles": "^1.0.0", + "remark-lint-no-file-name-consecutive-dashes": "^1.0.0", + "remark-lint-no-file-name-irregular-characters": "^1.0.0", + "remark-lint-no-file-name-mixed-case": "^1.0.0", + "remark-lint-no-file-name-outer-dashes": "^1.0.1", + "remark-lint-no-heading-content-indent": "^1.0.0", + "remark-lint-no-heading-indent": "^1.0.0", + "remark-lint-no-heading-like-paragraph": "^1.0.0", + "remark-lint-no-heading-punctuation": "^1.0.0", + "remark-lint-no-html": "^1.0.0", + "remark-lint-no-inline-padding": "^1.0.0", + "remark-lint-no-literal-urls": "^1.0.0", + "remark-lint-no-missing-blank-lines": "^1.0.0", + "remark-lint-no-multiple-toplevel-headings": "^1.0.0", + "remark-lint-no-paragraph-content-indent": "^1.0.1", + "remark-lint-no-reference-like-url": "^1.0.0", + "remark-lint-no-shell-dollars": "^1.0.0", + "remark-lint-no-shortcut-reference-image": "^1.0.0", + "remark-lint-no-shortcut-reference-link": "^1.0.1", + "remark-lint-no-table-indentation": "^1.0.0", + "remark-lint-no-tabs": "^1.0.0", + "remark-lint-no-undefined-references": "^1.0.0", + "remark-lint-no-unused-definitions": "^1.0.0", + "remark-lint-ordered-list-marker-style": "^1.0.0", + "remark-lint-ordered-list-marker-value": "^1.0.0", + "remark-lint-rule-style": "^1.0.0", + "remark-lint-strong-marker": "^1.0.0", + "remark-lint-table-cell-padding": "^1.0.0", + "remark-lint-table-pipe-alignment": "^1.0.0", + "remark-lint-table-pipes": "^1.0.0", + "remark-lint-unordered-list-marker-style": "^1.0.0", + "remark-slug": "^5.0.0", + "remark-unlink": "^2.0.0", + "remark-validate-links": "^9.0.1", + "remark-vdom": "^8.0.0", + "semver": "^6.0.0", + "spdx-license-ids": "^3.0.0", + "tap-spec": "5.x.x", + "tap-summary": "^4.0.0", + "tap-xunit": "^2.2.0", + "tape": "git+https://github.com/kgryte/tape.git#fix/globby", + "to-vfile": "^6.0.0", + "typedoc": "^0.16.11", + "uglify-es": "^3.1.1", + "uglifyify": "^5.0.0", + "unified-lint-rule": "^1.0.1", + "unist-util-visit": "^2.0.0", + "yaml": "^1.0.0" }, - "engines":{ - "node":">=0.10.0", - "npm":">2.7.0" + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" }, - "os":[ + "os": [ "aix", "darwin", "freebsd", @@ -464,7 +464,7 @@ "win32", "windows" ], - "keywords":[ + "keywords": [ "stdlib", "stdlib-js", "stdlib.js", @@ -476,154 +476,154 @@ "lib", "libstd" ], - "gitHead":"68f492edd886c9253209599191f0c6bde0e3775c", - "_id":"@stdlib/stdlib@0.0.91", - "_nodeVersion":"12.9.1", - "_npmVersion":"6.10.2", - "_npmUser":{ - "name":"kgryte", - "email":"kgryte@gmail.com" + "gitHead": "68f492edd886c9253209599191f0c6bde0e3775c", + "_id": "@stdlib/stdlib@0.0.91", + "_nodeVersion": "12.9.1", + "_npmVersion": "6.10.2", + "_npmUser": { + "name": "kgryte", + "email": "kgryte@gmail.com" }, - "dist":{ - "integrity":"sha512-7zGaX/QGeBtlQKqwwpxSWUhzYxKU7tZo2BfhPKQPMq+buLdYjc2H+jRprXSW5kX1OXqi0l1aIV84ACvD3isNFQ==", - "shasum":"a0b84d2815661b7cf769a27f72ff3ee895e39ed7", - "tarball":"https://registry.npmjs.org/@stdlib/stdlib/-/stdlib-0.0.91.tgz", - "fileCount":32938, - "unpackedSize":489739477, - "npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeapL7CRA9TVsSAnZWagAAKisP/1yA5QZaWmpDHhfdu8Ot\nd74fnVP8Yqi+7BIyZjEKMpeSGbRm613IMu7sfDe5nprH8dAImGxu82lJM5rq\n2XL7JNvgiooRp/IFXbSTlh0cVtcG+MB78+E44C9mez7YJ7jp3B5wxU09wuJt\ncpIR3aSlt19LoIIt1syVddKJRHj448fDIC5nKKJFBQPBHWTvep7aqBeKl/MR\nXEsU9rq3Zk8pwiNd9n+3qsI9VsEp96L1Rrz9D7G+Ztynez9ewXwvBqDZ5kPC\nyM/6hZfd5mABNSqb6nHuYJqOy44IdEFapVB7Hg8E2u/OAr5htaDE6wdjQ7Lw\nNttzmWHZKbdYLGw+v17NlGi42CSvwlwpFf8UF4csanzVvWoBXf22uRGyJ+gy\n30P+3FpUKqhP/4lx3VSkIUy1QO0zhKdDXtB0vln4Z5LeqD+DrWooTDlLpDVw\nAUv7BLoHICSvUa5ZaepXfpRYyhVQPHxX4iXBOC9v+8nmYiKWmxQ6HDdfRKsX\nxlUMFrucr/qR1z+9RZ4f7V0r4Jdy7GOKpwMTFVcUY5Shnd6ak1kHLj97gc7w\nTHcoX/4zrsqiJDxe2yPpiHLSVrI8R1Y254O9IFzgshhvP4MpTNMKPjDJv08M\nGdlZbMfMylhP4JG5rkQIMwDVof2A5QZZRPLyEHgspmyztejOe44Rhhp0QZoy\ns9Pr\r\n=YRic\r\n-----END PGP SIGNATURE-----\r\n" + "dist": { + "integrity": "sha512-7zGaX/QGeBtlQKqwwpxSWUhzYxKU7tZo2BfhPKQPMq+buLdYjc2H+jRprXSW5kX1OXqi0l1aIV84ACvD3isNFQ==", + "shasum": "a0b84d2815661b7cf769a27f72ff3ee895e39ed7", + "tarball": "https://registry.npmjs.org/@stdlib/stdlib/-/stdlib-0.0.91.tgz", + "fileCount": 32938, + "unpackedSize": 489739477, + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeapL7CRA9TVsSAnZWagAAKisP/1yA5QZaWmpDHhfdu8Ot\nd74fnVP8Yqi+7BIyZjEKMpeSGbRm613IMu7sfDe5nprH8dAImGxu82lJM5rq\n2XL7JNvgiooRp/IFXbSTlh0cVtcG+MB78+E44C9mez7YJ7jp3B5wxU09wuJt\ncpIR3aSlt19LoIIt1syVddKJRHj448fDIC5nKKJFBQPBHWTvep7aqBeKl/MR\nXEsU9rq3Zk8pwiNd9n+3qsI9VsEp96L1Rrz9D7G+Ztynez9ewXwvBqDZ5kPC\nyM/6hZfd5mABNSqb6nHuYJqOy44IdEFapVB7Hg8E2u/OAr5htaDE6wdjQ7Lw\nNttzmWHZKbdYLGw+v17NlGi42CSvwlwpFf8UF4csanzVvWoBXf22uRGyJ+gy\n30P+3FpUKqhP/4lx3VSkIUy1QO0zhKdDXtB0vln4Z5LeqD+DrWooTDlLpDVw\nAUv7BLoHICSvUa5ZaepXfpRYyhVQPHxX4iXBOC9v+8nmYiKWmxQ6HDdfRKsX\nxlUMFrucr/qR1z+9RZ4f7V0r4Jdy7GOKpwMTFVcUY5Shnd6ak1kHLj97gc7w\nTHcoX/4zrsqiJDxe2yPpiHLSVrI8R1Y254O9IFzgshhvP4MpTNMKPjDJv08M\nGdlZbMfMylhP4JG5rkQIMwDVof2A5QZZRPLyEHgspmyztejOe44Rhhp0QZoy\ns9Pr\r\n=YRic\r\n-----END PGP SIGNATURE-----\r\n" }, - "maintainers":[ + "maintainers": [ { - "name":"kgryte", - "email":"kgryte@gmail.com" + "name": "kgryte", + "email": "kgryte@gmail.com" }, { - "name":"planeshifter", - "email":"pgb@andrew.cmu.edu" + "name": "planeshifter", + "email": "pgb@andrew.cmu.edu" }, { - "name":"stdlib-bot", - "email":"kgryte@gmail.com" + "name": "stdlib-bot", + "email": "kgryte@gmail.com" } ], - "_npmOperationalInternal":{ - "host":"s3://npm-registry-packages", - "tmp":"tmp/stdlib_0.0.91_1584042743033_0.883311859859994" + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/stdlib_0.0.91_1584042743033_0.883311859859994" }, - "_hasShrinkwrap":false + "_hasShrinkwrap": false } }, - "readme":"\n\n\n\n\n\n
\n
\n
\n
\n \n \"stdlib\n \n
\n
\n
\n
\n
\n
\n\n\n\n* * *\n\n\n\n
\n\nstdlib ([/ˈstændərd lɪb/][ipa-english] \"standard lib\") is a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing applications. The library provides a collection of robust, high performance libraries for mathematics, statistics, data processing, streams, and more and includes many of the utilities you would expect from a standard library.\n\nThis is the GitHub repository of stdlib source code and documentation. For help developing stdlib, see the [development guide][stdlib-development].\n\n## Features\n\n- 150+ [special math functions][@stdlib/math/base/special].\n\n
\n \"Demo\n
\n\n- 35+ [probability distributions][@stdlib/stats/base/dists], with support for evaluating probability density functions (PDFs), cumulative distribution functions (CDFs), quantiles, moments, and more.\n\n
\n \"Demo\n
\n\n- 40+ [seedable pseudorandom number generators][@stdlib/random/base] (PRNGs).\n\n
\n \"Demo\n
\n\n- 200+ general [utilities][@stdlib/utils] for data transformation, functional programming, and asynchronous control flow.\n\n
\n \"Demo\n
\n\n- 200+ [assertion utilities][@stdlib/assert] for data validation and feature detection.\n\n
\n \"Demo\n
\n\n- 50+ [sample datasets][@stdlib/datasets] for testing and development.\n\n
\n \"Demo\n
\n\n- A [plot API][@stdlib/plot/ctor] for data visualization and exploratory data analysis.\n\n
\n \"Demo\n
\n\n- Native add-ons for interfacing with BLAS libraries, with pure JavaScript fallbacks.\n\n
\n \"Demo\n
\n\n- A [benchmark framework][@stdlib/bench/harness] supporting TAP.\n\n
\n \"Demo\n
\n\n- REPL environment with integrated help and examples.\n\n
\n \"Demo\n
\n\n- Can be bundled using [Browserify][browserify], [Webpack][webpack], and other bundlers for use in web browsers.\n\n
\n \"Demo\n
\n\n## Resources\n\n- [**Homepage**][stdlib-homepage]\n- [**Documentation**][stdlib-documentation]\n- [**Source code**][stdlib-source]\n- [**Code coverage**][stdlib-code-coverage]\n- [**FAQ**][stdlib-faq]\n\n### External Resources\n\n- [**Twitter**][stdlib-twitter]\n- [**Gitter**][stdlib-gitter]\n\n## Prerequisites\n\nRunning stdlib **requires** the following prerequisites:\n\n- [Node.js][node-js]: JavaScript runtime (version `>= 0.10`)\n- [npm][npm]: package manager (version `> 2.7.0`; if Node `< 1.0.0`, version `> 2.7.0` and `< 4.0.0`; if Node `< 6.0.0`, version `> 2.7.0` and `< 6.0.0`)\n\nMost functionality in stdlib is implemented exclusively in JavaScript; however, some implementations try to capture performance benefits by using [native bindings][node-js-add-ons] and/or [WebAssembly][webassembly]. While **not** required to run stdlib, as **every** stdlib implementation has a JavaScript fallback, the following dependencies are **required** for building native add-ons, including linking to BLAS and LAPACK libraries:\n\n- [GNU make][make]: development utility and task runner\n- [GNU bash][bash]: an sh-compatible shell\n- [gcc & g++][gcc] or [Clang][clang]: C/C++ compilation and linking (g++ version `>= 4.8`; clang version `>= 3.5`, Xcode version `>=8.3.1` on OS X)\n- [gfortran][gfortran]: Fortran compilation and linking (version `>= 4.8`)\n\nWhile **not** required to run stdlib, the following dependencies are **required** for automatically downloading external libraries:\n\n- [curl][curl], [wget][wget], or [fetch][fetch] (FreeBSD): utilities for downloading remote resources\n\nThe following external libraries can be automatically downloaded and compiled from source using `make`:\n\n- [OpenBLAS][openblas]: optimized BLAS library\n- [Electron][electron]: framework for cross-platform desktop applications\n\n## Installation\n\nTo install as a library or application dependency,\n\n\n\n```bash\n$ npm install @stdlib/stdlib\n```\n\nTo install globally for use as a command-line utility,\n\n\n\n```bash\n$ npm install -g @stdlib/stdlib\n```\n\nwhich will expose the `stdlib` command. For example, to see available sub-commands\n\n\n\n```bash\n$ stdlib help\n```\n\nand to run the [REPL][@stdlib/repl]\n\n\n\n```bash\n$ stdlib repl\n```\n\nFor distributable bundles for use in browser environments or as shared (\"vendored\") libraries in server environments, see the [`dist`][stdlib-bundles] directory and associated [guide][stdlib-bundles].\n\nOtherwise, to install as a system library, follow the [download][stdlib-development], [configuration][stdlib-development], and [installation][stdlib-development] instructions as described in the [development guide][stdlib-development].\n\n* * *\n\n## Contributing\n\nSee the [contributing guidelines][stdlib-contributing].\n\n## License\n\nSee [LICENSE][stdlib-license].\n\n## Copyright\n\nCopyright © 2016-2020. The Stdlib [Authors][stdlib-authors].\n\n
\n\n\n\n\n\n* * *\n\n
\n\n## Status\n\n[![stability-experimental][stability-image]][stability-url]\n\n#### Version\n\n\n\n[![git tag][tag-image]][tag-url] [![NPM version][npm-image]][npm-url] [![Node.js version][node-image]][node-url]\n\n\n\n#### Build\n\n\n\n\n\n| OS | Build (master) | Coverage (master) | Build (develop) | Coverage (develop) |\n| ---------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |\n| Linux/OS X | [![Linux/OS X build status (master)][build-image-master]][build-url-master] | [![coverage (master)][coverage-image-master]][coverage-url-master] | [![Linux/OS X build status (develop)][build-image-develop]][build-url-develop] | [![coverage (develop)][coverage-image-develop]][coverage-url-develop] |\n| Windows | [![Windows build status (master)][windows-build-image-master]][windows-build-url-master] | [![coverage (master)][coverage-image-master]][coverage-url-master] | [![Windows build status (develop)][windows-build-image-develop]][windows-build-url-develop] | [![coverage (develop)][coverage-image-develop]][coverage-url-develop] |\n\n\n\n#### Dependencies\n\n\n\n[![Dependencies][dependencies-image]][dependencies-url] [![DevDependencies][dev-dependencies-image]][dev-dependencies-url]\n\n\n\n#### Community\n\n[![Chat][chat-image]][chat-url]\n\n
\n\n\n\n\n\n
\n\n
\n\n\n\n\n\n* * *\n\n
\n\n## Acknowledgments\n\n### Build Infrastructure\n\nTest and build infrastructure is generously provided by the following services:\n\n
\n \"Continuous\n
\n
\n\n
\n\n\n\n\n\n
\n\n[stability-image]: https://img.shields.io/badge/stability-experimental-orange.svg\n\n[stability-url]: https://github.com/stdlib-js/stdlib\n\n[npm-image]: https://img.shields.io/npm/v/@stdlib/stdlib.svg\n\n[npm-url]: https://npmjs.org/package/@stdlib/stdlib\n\n[tag-image]: https://img.shields.io/github/tag/stdlib-js/stdlib.svg\n\n[tag-url]: https://github.com/stdlib-js/stdlib/tags\n\n[node-image]: https://img.shields.io/node/v/@stdlib/stdlib.svg\n\n[node-url]: https://github.com/@stdlib-js/stdlib\n\n[build-image-master]: https://img.shields.io/travis/stdlib-js/stdlib/master.svg\n\n[build-url-master]: https://travis-ci.org/stdlib-js/stdlib\n\n[build-image-develop]: https://img.shields.io/travis/stdlib-js/stdlib/develop.svg\n\n[build-url-develop]: https://travis-ci.org/stdlib-js/stdlib\n\n\n\n[windows-build-image-master]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=master&svg=true\n\n[windows-build-url-master]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=master&svg=true\n\n[windows-build-image-develop]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=develop&svg=true\n\n[windows-build-url-develop]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=develop&svg=true\n\n[coverage-image-master]: https://img.shields.io/codecov/c/github/stdlib-js/stdlib/master.svg\n\n[coverage-url-master]: https://codecov.io/github/stdlib-js/stdlib/branch/master\n\n[coverage-image-develop]: https://img.shields.io/codecov/c/github/stdlib-js/stdlib/develop.svg\n\n[coverage-url-develop]: https://codecov.io/github/stdlib-js/stdlib/branch/develop\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/stdlib\n\n[dependencies-url]: https://david-dm.org/stdlib-js/stdlib/develop\n\n[dev-dependencies-image]: https://img.shields.io/david/dev/stdlib-js/stdlib\n\n[dev-dependencies-url]: https://david-dm.org/stdlib-js/stdlib/develop?type=dev\n\n[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg\n\n[chat-url]: https://gitter.im/stdlib-js/stdlib/\n\n[make]: https://www.gnu.org/software/make\n\n[bash]: https://www.gnu.org/software/bash/\n\n[curl]: http://curl.haxx.se/\n\n[wget]: http://www.gnu.org/software/wget\n\n[fetch]: http://www.freebsd.org/cgi/man.cgi?fetch%281%29\n\n[node-js]: https://nodejs.org/en/\n\n[npm]: https://www.npmjs.com/\n\n[gcc]: http://gcc.gnu.org/\n\n[clang]: http://clang.llvm.org/\n\n[gfortran]: https://gcc.gnu.org/fortran/\n\n[openblas]: https://github.com/xianyi/OpenBLAS\n\n[electron]: https://electron.atom.io/\n\n[webassembly]: http://webassembly.org/\n\n[node-js-add-ons]: https://nodejs.org/api/addons.html\n\n[browserify]: https://github.com/substack/node-browserify\n\n[webpack]: https://webpack.js.org/\n\n[ipa-english]: https://en.wikipedia.org/wiki/Help:IPA/English\n\n[stdlib-contributing]: https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md\n\n[stdlib-development]: https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md\n\n[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors\n\n[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/stdlib/develop/LICENSE\n\n[stdlib-homepage]: https://github.com/stdlib-js/stdlib\n\n[stdlib-documentation]: https://github.com/stdlib-js/stdlib\n\n[stdlib-faq]: https://github.com/stdlib-js/stdlib/blob/develop/FAQ.md\n\n[stdlib-source]: https://github.com/stdlib-js/stdlib\n\n[stdlib-bundles]: https://github.com/stdlib-js/stdlib/tree/develop/dist\n\n[stdlib-code-coverage]: https://codecov.io/github/stdlib-js/stdlib/branch/develop\n\n[stdlib-twitter]: https://twitter.com/stdlibjs\n\n[stdlib-gitter]: https://gitter.im/stdlib-js/stdlib\n\n[@stdlib/math/base/special]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special\n\n[@stdlib/stats/base/dists]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dists\n\n[@stdlib/random/base]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/random/base\n\n[@stdlib/assert]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert\n\n[@stdlib/datasets]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/datasets\n\n[@stdlib/utils]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils\n\n[@stdlib/plot/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/plot/ctor\n\n[@stdlib/bench/harness]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/bench/harness\n\n[@stdlib/repl]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/repl\n\n
\n\n\n", - "maintainers":[ + "readme": "\n\n\n\n\n\n
\n
\n
\n
\n \n \"stdlib\n \n
\n
\n
\n
\n
\n
\n\n\n\n* * *\n\n\n\n
\n\nstdlib ([/ˈstændərd lɪb/][ipa-english] \"standard lib\") is a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing applications. The library provides a collection of robust, high performance libraries for mathematics, statistics, data processing, streams, and more and includes many of the utilities you would expect from a standard library.\n\nThis is the GitHub repository of stdlib source code and documentation. For help developing stdlib, see the [development guide][stdlib-development].\n\n## Features\n\n- 150+ [special math functions][@stdlib/math/base/special].\n\n
\n \"Demo\n
\n\n- 35+ [probability distributions][@stdlib/stats/base/dists], with support for evaluating probability density functions (PDFs), cumulative distribution functions (CDFs), quantiles, moments, and more.\n\n
\n \"Demo\n
\n\n- 40+ [seedable pseudorandom number generators][@stdlib/random/base] (PRNGs).\n\n
\n \"Demo\n
\n\n- 200+ general [utilities][@stdlib/utils] for data transformation, functional programming, and asynchronous control flow.\n\n
\n \"Demo\n
\n\n- 200+ [assertion utilities][@stdlib/assert] for data validation and feature detection.\n\n
\n \"Demo\n
\n\n- 50+ [sample datasets][@stdlib/datasets] for testing and development.\n\n
\n \"Demo\n
\n\n- A [plot API][@stdlib/plot/ctor] for data visualization and exploratory data analysis.\n\n
\n \"Demo\n
\n\n- Native add-ons for interfacing with BLAS libraries, with pure JavaScript fallbacks.\n\n
\n \"Demo\n
\n\n- A [benchmark framework][@stdlib/bench/harness] supporting TAP.\n\n
\n \"Demo\n
\n\n- REPL environment with integrated help and examples.\n\n
\n \"Demo\n
\n\n- Can be bundled using [Browserify][browserify], [Webpack][webpack], and other bundlers for use in web browsers.\n\n
\n \"Demo\n
\n\n## Resources\n\n- [**Homepage**][stdlib-homepage]\n- [**Documentation**][stdlib-documentation]\n- [**Source code**][stdlib-source]\n- [**Code coverage**][stdlib-code-coverage]\n- [**FAQ**][stdlib-faq]\n\n### External Resources\n\n- [**Twitter**][stdlib-twitter]\n- [**Gitter**][stdlib-gitter]\n\n## Prerequisites\n\nRunning stdlib **requires** the following prerequisites:\n\n- [Node.js][node-js]: JavaScript runtime (version `>= 0.10`)\n- [npm][npm]: package manager (version `> 2.7.0`; if Node `< 1.0.0`, version `> 2.7.0` and `< 4.0.0`; if Node `< 6.0.0`, version `> 2.7.0` and `< 6.0.0`)\n\nMost functionality in stdlib is implemented exclusively in JavaScript; however, some implementations try to capture performance benefits by using [native bindings][node-js-add-ons] and/or [WebAssembly][webassembly]. While **not** required to run stdlib, as **every** stdlib implementation has a JavaScript fallback, the following dependencies are **required** for building native add-ons, including linking to BLAS and LAPACK libraries:\n\n- [GNU make][make]: development utility and task runner\n- [GNU bash][bash]: an sh-compatible shell\n- [gcc & g++][gcc] or [Clang][clang]: C/C++ compilation and linking (g++ version `>= 4.8`; clang version `>= 3.5`, Xcode version `>=8.3.1` on OS X)\n- [gfortran][gfortran]: Fortran compilation and linking (version `>= 4.8`)\n\nWhile **not** required to run stdlib, the following dependencies are **required** for automatically downloading external libraries:\n\n- [curl][curl], [wget][wget], or [fetch][fetch] (FreeBSD): utilities for downloading remote resources\n\nThe following external libraries can be automatically downloaded and compiled from source using `make`:\n\n- [OpenBLAS][openblas]: optimized BLAS library\n- [Electron][electron]: framework for cross-platform desktop applications\n\n## Installation\n\nTo install as a library or application dependency,\n\n\n\n```bash\n$ npm install @stdlib/stdlib\n```\n\nTo install globally for use as a command-line utility,\n\n\n\n```bash\n$ npm install -g @stdlib/stdlib\n```\n\nwhich will expose the `stdlib` command. For example, to see available sub-commands\n\n\n\n```bash\n$ stdlib help\n```\n\nand to run the [REPL][@stdlib/repl]\n\n\n\n```bash\n$ stdlib repl\n```\n\nFor distributable bundles for use in browser environments or as shared (\"vendored\") libraries in server environments, see the [`dist`][stdlib-bundles] directory and associated [guide][stdlib-bundles].\n\nOtherwise, to install as a system library, follow the [download][stdlib-development], [configuration][stdlib-development], and [installation][stdlib-development] instructions as described in the [development guide][stdlib-development].\n\n* * *\n\n## Contributing\n\nSee the [contributing guidelines][stdlib-contributing].\n\n## License\n\nSee [LICENSE][stdlib-license].\n\n## Copyright\n\nCopyright © 2016-2020. The Stdlib [Authors][stdlib-authors].\n\n
\n\n\n\n\n\n* * *\n\n
\n\n## Status\n\n[![stability-experimental][stability-image]][stability-url]\n\n#### Version\n\n\n\n[![git tag][tag-image]][tag-url] [![NPM version][npm-image]][npm-url] [![Node.js version][node-image]][node-url]\n\n\n\n#### Build\n\n\n\n\n\n| OS | Build (master) | Coverage (master) | Build (develop) | Coverage (develop) |\n| ---------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |\n| Linux/OS X | [![Linux/OS X build status (master)][build-image-master]][build-url-master] | [![coverage (master)][coverage-image-master]][coverage-url-master] | [![Linux/OS X build status (develop)][build-image-develop]][build-url-develop] | [![coverage (develop)][coverage-image-develop]][coverage-url-develop] |\n| Windows | [![Windows build status (master)][windows-build-image-master]][windows-build-url-master] | [![coverage (master)][coverage-image-master]][coverage-url-master] | [![Windows build status (develop)][windows-build-image-develop]][windows-build-url-develop] | [![coverage (develop)][coverage-image-develop]][coverage-url-develop] |\n\n\n\n#### Dependencies\n\n\n\n[![Dependencies][dependencies-image]][dependencies-url] [![DevDependencies][dev-dependencies-image]][dev-dependencies-url]\n\n\n\n#### Community\n\n[![Chat][chat-image]][chat-url]\n\n
\n\n\n\n\n\n
\n\n
\n\n\n\n\n\n* * *\n\n
\n\n## Acknowledgments\n\n### Build Infrastructure\n\nTest and build infrastructure is generously provided by the following services:\n\n
\n \"Continuous\n
\n
\n\n
\n\n\n\n\n\n
\n\n[stability-image]: https://img.shields.io/badge/stability-experimental-orange.svg\n\n[stability-url]: https://github.com/stdlib-js/stdlib\n\n[npm-image]: https://img.shields.io/npm/v/@stdlib/stdlib.svg\n\n[npm-url]: https://npmjs.org/package/@stdlib/stdlib\n\n[tag-image]: https://img.shields.io/github/tag/stdlib-js/stdlib.svg\n\n[tag-url]: https://github.com/stdlib-js/stdlib/tags\n\n[node-image]: https://img.shields.io/node/v/@stdlib/stdlib.svg\n\n[node-url]: https://github.com/@stdlib-js/stdlib\n\n[build-image-master]: https://img.shields.io/travis/stdlib-js/stdlib/master.svg\n\n[build-url-master]: https://travis-ci.org/stdlib-js/stdlib\n\n[build-image-develop]: https://img.shields.io/travis/stdlib-js/stdlib/develop.svg\n\n[build-url-develop]: https://travis-ci.org/stdlib-js/stdlib\n\n\n\n[windows-build-image-master]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=master&svg=true\n\n[windows-build-url-master]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=master&svg=true\n\n[windows-build-image-develop]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=develop&svg=true\n\n[windows-build-url-develop]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=develop&svg=true\n\n[coverage-image-master]: https://img.shields.io/codecov/c/github/stdlib-js/stdlib/master.svg\n\n[coverage-url-master]: https://codecov.io/github/stdlib-js/stdlib/branch/master\n\n[coverage-image-develop]: https://img.shields.io/codecov/c/github/stdlib-js/stdlib/develop.svg\n\n[coverage-url-develop]: https://codecov.io/github/stdlib-js/stdlib/branch/develop\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/stdlib\n\n[dependencies-url]: https://david-dm.org/stdlib-js/stdlib/develop\n\n[dev-dependencies-image]: https://img.shields.io/david/dev/stdlib-js/stdlib\n\n[dev-dependencies-url]: https://david-dm.org/stdlib-js/stdlib/develop?type=dev\n\n[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg\n\n[chat-url]: https://gitter.im/stdlib-js/stdlib/\n\n[make]: https://www.gnu.org/software/make\n\n[bash]: https://www.gnu.org/software/bash/\n\n[curl]: http://curl.haxx.se/\n\n[wget]: http://www.gnu.org/software/wget\n\n[fetch]: http://www.freebsd.org/cgi/man.cgi?fetch%281%29\n\n[node-js]: https://nodejs.org/en/\n\n[npm]: https://www.npmjs.com/\n\n[gcc]: http://gcc.gnu.org/\n\n[clang]: http://clang.llvm.org/\n\n[gfortran]: https://gcc.gnu.org/fortran/\n\n[openblas]: https://github.com/xianyi/OpenBLAS\n\n[electron]: https://electron.atom.io/\n\n[webassembly]: http://webassembly.org/\n\n[node-js-add-ons]: https://nodejs.org/api/addons.html\n\n[browserify]: https://github.com/substack/node-browserify\n\n[webpack]: https://webpack.js.org/\n\n[ipa-english]: https://en.wikipedia.org/wiki/Help:IPA/English\n\n[stdlib-contributing]: https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md\n\n[stdlib-development]: https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md\n\n[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors\n\n[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/stdlib/develop/LICENSE\n\n[stdlib-homepage]: https://github.com/stdlib-js/stdlib\n\n[stdlib-documentation]: https://github.com/stdlib-js/stdlib\n\n[stdlib-faq]: https://github.com/stdlib-js/stdlib/blob/develop/FAQ.md\n\n[stdlib-source]: https://github.com/stdlib-js/stdlib\n\n[stdlib-bundles]: https://github.com/stdlib-js/stdlib/tree/develop/dist\n\n[stdlib-code-coverage]: https://codecov.io/github/stdlib-js/stdlib/branch/develop\n\n[stdlib-twitter]: https://twitter.com/stdlibjs\n\n[stdlib-gitter]: https://gitter.im/stdlib-js/stdlib\n\n[@stdlib/math/base/special]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special\n\n[@stdlib/stats/base/dists]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dists\n\n[@stdlib/random/base]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/random/base\n\n[@stdlib/assert]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert\n\n[@stdlib/datasets]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/datasets\n\n[@stdlib/utils]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils\n\n[@stdlib/plot/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/plot/ctor\n\n[@stdlib/bench/harness]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/bench/harness\n\n[@stdlib/repl]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/repl\n\n
\n\n\n", + "maintainers": [ { - "name":"kgryte", - "email":"kgryte@gmail.com" + "name": "kgryte", + "email": "kgryte@gmail.com" }, { - "name":"planeshifter", - "email":"pgb@andrew.cmu.edu" + "name": "planeshifter", + "email": "pgb@andrew.cmu.edu" }, { - "name":"stdlib-bot", - "email":"kgryte@gmail.com" + "name": "stdlib-bot", + "email": "kgryte@gmail.com" } ], - "time":{ - "modified":"2020-03-12T19:52:29.640Z", - "created":"2016-10-12T06:51:20.600Z", - "0.0.0":"2016-10-12T06:51:20.600Z", - "0.0.2":"2017-04-25T18:44:13.928Z", - "0.0.3":"2017-04-30T00:21:35.096Z", - "0.0.4":"2017-07-27T17:57:36.643Z", - "0.0.5":"2017-08-01T22:39:50.762Z", - "0.0.6":"2017-08-02T22:02:12.782Z", - "0.0.7":"2017-08-03T14:20:14.959Z", - "0.0.8":"2017-08-04T22:49:42.048Z", - "0.0.9":"2017-08-06T15:50:07.130Z", - "0.0.10":"2017-08-11T12:08:08.611Z", - "0.0.11":"2017-08-14T19:30:14.137Z", - "0.0.12":"2017-08-16T19:55:37.908Z", - "0.0.13":"2017-08-20T05:13:39.725Z", - "0.0.14":"2017-08-21T05:44:01.240Z", - "0.0.15":"2017-08-22T04:18:57.566Z", - "0.0.16":"2017-08-25T21:28:23.927Z", - "0.0.17":"2017-09-01T22:16:31.416Z", - "0.0.18":"2017-09-05T09:03:58.058Z", - "0.0.19":"2017-09-06T16:58:07.405Z", - "0.0.20":"2017-09-15T01:55:02.681Z", - "0.0.21":"2017-09-17T22:44:09.507Z", - "0.0.22":"2017-09-17T22:58:37.628Z", - "0.0.23":"2017-09-21T00:28:10.891Z", - "0.0.24":"2017-09-27T05:25:38.086Z", - "0.0.25":"2017-09-28T18:43:09.186Z", - "0.0.26":"2017-10-01T20:28:06.199Z", - "0.0.27":"2017-10-04T07:47:59.512Z", - "0.0.28":"2017-10-04T21:21:50.857Z", - "0.0.29":"2017-10-30T22:52:00.715Z", - "0.0.30":"2017-11-15T17:49:30.317Z", - "0.0.31":"2018-01-25T08:42:50.794Z", - "0.0.32":"2018-02-01T06:15:37.415Z", - "0.0.33":"2018-02-01T22:43:37.172Z", - "0.0.34":"2018-04-01T21:48:04.949Z", - "0.0.35":"2018-04-13T10:08:56.307Z", - "0.0.36":"2018-04-19T14:46:47.232Z", - "0.0.37":"2018-05-03T03:48:00.449Z", - "0.0.38":"2018-05-04T23:49:17.149Z", - "0.0.39":"2018-05-10T22:52:04.741Z", - "0.0.40":"2018-05-11T23:39:29.144Z", - "0.0.41":"2018-06-08T05:11:07.909Z", - "0.0.42":"2018-06-09T22:10:27.389Z", - "0.0.43":"2018-07-11T21:37:47.885Z", - "0.0.44":"2018-10-14T00:51:09.411Z", - "0.0.45":"2018-10-18T02:07:09.244Z", - "0.0.46":"2018-10-23T00:41:29.491Z", - "0.0.47":"2018-10-27T05:53:06.371Z", - "0.0.48":"2018-10-28T08:13:19.404Z", - "0.0.49":"2018-10-29T09:58:26.250Z", - "0.0.50":"2018-11-07T21:42:50.706Z", - "0.0.51":"2018-11-22T06:23:29.674Z", - "0.0.52":"2018-11-24T02:17:37.004Z", - "0.0.53":"2018-12-04T09:31:42.091Z", - "0.0.54":"2018-12-04T11:39:18.467Z", - "0.0.55":"2018-12-04T18:51:18.466Z", - "0.0.56":"2018-12-29T18:28:02.414Z", - "0.0.57":"2019-01-02T01:07:29.572Z", - "0.0.58":"2019-01-11T08:06:31.455Z", - "0.0.59":"2019-02-09T07:36:24.669Z", - "0.0.60":"2019-02-22T03:45:39.412Z", - "0.0.61":"2019-07-27T22:35:39.288Z", - "0.0.62":"2019-07-30T07:30:43.272Z", - "0.0.63":"2019-08-06T02:52:25.375Z", - "0.0.64":"2019-08-09T18:51:07.351Z", - "0.0.65":"2019-08-17T03:09:17.136Z", - "0.0.66":"2019-08-17T17:35:50.561Z", - "0.0.67":"2019-08-20T02:45:52.160Z", - "0.0.69":"2019-08-26T23:28:42.654Z", - "0.0.70":"2019-08-27T00:27:46.407Z", - "0.0.71":"2019-08-27T00:41:33.759Z", - "0.0.72":"2019-08-27T01:20:16.480Z", - "0.0.73":"2019-08-28T23:39:23.422Z", - "0.0.74":"2019-09-01T09:50:09.364Z", - "0.0.75":"2019-09-01T10:05:32.777Z", - "0.0.76":"2019-09-01T19:17:25.007Z", - "0.0.77":"2019-09-04T07:36:03.189Z", - "0.0.78":"2019-09-04T08:02:17.225Z", - "0.0.79":"2019-09-04T18:49:49.770Z", - "0.0.80":"2019-09-04T19:06:24.767Z", - "0.0.81":"2019-09-04T19:16:09.534Z", - "0.0.82":"2019-09-04T19:26:58.279Z", - "0.0.83":"2019-09-04T19:39:25.979Z", - "0.0.84":"2019-09-05T02:35:54.034Z", - "0.0.85":"2019-09-09T23:27:31.388Z", - "0.0.86":"2019-10-14T21:08:22.169Z", - "0.0.87":"2019-10-15T00:23:45.794Z", - "0.0.88":"2019-11-22T02:17:53.912Z", - "0.0.89":"2019-11-22T09:58:29.982Z", - "0.0.90":"2019-11-22T10:19:20.222Z", - "0.0.91":"2020-03-12T19:52:26.792Z" + "time": { + "modified": "2020-03-12T19:52:29.640Z", + "created": "2016-10-12T06:51:20.600Z", + "0.0.0": "2016-10-12T06:51:20.600Z", + "0.0.2": "2017-04-25T18:44:13.928Z", + "0.0.3": "2017-04-30T00:21:35.096Z", + "0.0.4": "2017-07-27T17:57:36.643Z", + "0.0.5": "2017-08-01T22:39:50.762Z", + "0.0.6": "2017-08-02T22:02:12.782Z", + "0.0.7": "2017-08-03T14:20:14.959Z", + "0.0.8": "2017-08-04T22:49:42.048Z", + "0.0.9": "2017-08-06T15:50:07.130Z", + "0.0.10": "2017-08-11T12:08:08.611Z", + "0.0.11": "2017-08-14T19:30:14.137Z", + "0.0.12": "2017-08-16T19:55:37.908Z", + "0.0.13": "2017-08-20T05:13:39.725Z", + "0.0.14": "2017-08-21T05:44:01.240Z", + "0.0.15": "2017-08-22T04:18:57.566Z", + "0.0.16": "2017-08-25T21:28:23.927Z", + "0.0.17": "2017-09-01T22:16:31.416Z", + "0.0.18": "2017-09-05T09:03:58.058Z", + "0.0.19": "2017-09-06T16:58:07.405Z", + "0.0.20": "2017-09-15T01:55:02.681Z", + "0.0.21": "2017-09-17T22:44:09.507Z", + "0.0.22": "2017-09-17T22:58:37.628Z", + "0.0.23": "2017-09-21T00:28:10.891Z", + "0.0.24": "2017-09-27T05:25:38.086Z", + "0.0.25": "2017-09-28T18:43:09.186Z", + "0.0.26": "2017-10-01T20:28:06.199Z", + "0.0.27": "2017-10-04T07:47:59.512Z", + "0.0.28": "2017-10-04T21:21:50.857Z", + "0.0.29": "2017-10-30T22:52:00.715Z", + "0.0.30": "2017-11-15T17:49:30.317Z", + "0.0.31": "2018-01-25T08:42:50.794Z", + "0.0.32": "2018-02-01T06:15:37.415Z", + "0.0.33": "2018-02-01T22:43:37.172Z", + "0.0.34": "2018-04-01T21:48:04.949Z", + "0.0.35": "2018-04-13T10:08:56.307Z", + "0.0.36": "2018-04-19T14:46:47.232Z", + "0.0.37": "2018-05-03T03:48:00.449Z", + "0.0.38": "2018-05-04T23:49:17.149Z", + "0.0.39": "2018-05-10T22:52:04.741Z", + "0.0.40": "2018-05-11T23:39:29.144Z", + "0.0.41": "2018-06-08T05:11:07.909Z", + "0.0.42": "2018-06-09T22:10:27.389Z", + "0.0.43": "2018-07-11T21:37:47.885Z", + "0.0.44": "2018-10-14T00:51:09.411Z", + "0.0.45": "2018-10-18T02:07:09.244Z", + "0.0.46": "2018-10-23T00:41:29.491Z", + "0.0.47": "2018-10-27T05:53:06.371Z", + "0.0.48": "2018-10-28T08:13:19.404Z", + "0.0.49": "2018-10-29T09:58:26.250Z", + "0.0.50": "2018-11-07T21:42:50.706Z", + "0.0.51": "2018-11-22T06:23:29.674Z", + "0.0.52": "2018-11-24T02:17:37.004Z", + "0.0.53": "2018-12-04T09:31:42.091Z", + "0.0.54": "2018-12-04T11:39:18.467Z", + "0.0.55": "2018-12-04T18:51:18.466Z", + "0.0.56": "2018-12-29T18:28:02.414Z", + "0.0.57": "2019-01-02T01:07:29.572Z", + "0.0.58": "2019-01-11T08:06:31.455Z", + "0.0.59": "2019-02-09T07:36:24.669Z", + "0.0.60": "2019-02-22T03:45:39.412Z", + "0.0.61": "2019-07-27T22:35:39.288Z", + "0.0.62": "2019-07-30T07:30:43.272Z", + "0.0.63": "2019-08-06T02:52:25.375Z", + "0.0.64": "2019-08-09T18:51:07.351Z", + "0.0.65": "2019-08-17T03:09:17.136Z", + "0.0.66": "2019-08-17T17:35:50.561Z", + "0.0.67": "2019-08-20T02:45:52.160Z", + "0.0.69": "2019-08-26T23:28:42.654Z", + "0.0.70": "2019-08-27T00:27:46.407Z", + "0.0.71": "2019-08-27T00:41:33.759Z", + "0.0.72": "2019-08-27T01:20:16.480Z", + "0.0.73": "2019-08-28T23:39:23.422Z", + "0.0.74": "2019-09-01T09:50:09.364Z", + "0.0.75": "2019-09-01T10:05:32.777Z", + "0.0.76": "2019-09-01T19:17:25.007Z", + "0.0.77": "2019-09-04T07:36:03.189Z", + "0.0.78": "2019-09-04T08:02:17.225Z", + "0.0.79": "2019-09-04T18:49:49.770Z", + "0.0.80": "2019-09-04T19:06:24.767Z", + "0.0.81": "2019-09-04T19:16:09.534Z", + "0.0.82": "2019-09-04T19:26:58.279Z", + "0.0.83": "2019-09-04T19:39:25.979Z", + "0.0.84": "2019-09-05T02:35:54.034Z", + "0.0.85": "2019-09-09T23:27:31.388Z", + "0.0.86": "2019-10-14T21:08:22.169Z", + "0.0.87": "2019-10-15T00:23:45.794Z", + "0.0.88": "2019-11-22T02:17:53.912Z", + "0.0.89": "2019-11-22T09:58:29.982Z", + "0.0.90": "2019-11-22T10:19:20.222Z", + "0.0.91": "2020-03-12T19:52:26.792Z" }, - "homepage":"https://github.com/stdlib-js/stdlib", - "keywords":[ + "homepage": "https://github.com/stdlib-js/stdlib", + "keywords": [ "stdlib", "stdlib-js", "stdlib.js", @@ -635,28 +635,28 @@ "lib", "libstd" ], - "repository":{ - "type":"git", - "url":"git://github.com/stdlib-js/stdlib.git" + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" }, - "contributors":[ + "contributors": [ { - "name":"The Stdlib Authors", - "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" } ], - "bugs":{ - "url":"https://github.com/stdlib-js/stdlib/issues" + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" }, - "license":"Apache-2.0 AND BSL-1.0", - "readmeFilename":"README.md", - "author":{ - "name":"The Stdlib Authors", - "url":"https://github.com/stdlib-js/stdlib/graphs/contributors" + "license": "Apache-2.0 AND BSL-1.0", + "readmeFilename": "README.md", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" }, - "users":{ - "planeshifter":true, - "fm-96":true, - "pubudud":true + "users": { + "planeshifter": true, + "fm-96": true, + "pubudud": true } } diff --git a/services/node/testUtils/test-utils.js b/services/node/testUtils/test-utils.js new file mode 100644 index 0000000000000..40f825f926f57 --- /dev/null +++ b/services/node/testUtils/test-utils.js @@ -0,0 +1,54 @@ +'use strict'; + +const fs = require('fs') +const path = require('path') + +const getTemplate = template => JSON.parse(fs.readFileSync(path.join(__dirname, template), 'utf-8')) + +const mockPackageData = ( + packageName, + engines, + scope, + tag, + registry +) => nock => { + let packageJson + let urlPath + if (scope || tag) { + if (scope) { + urlPath = `/${scope}%2F${packageName}` + } else { + urlPath = `/${packageName}` + } + packageJson = getTemplate('packageJsonVersionsTemplate.json') + packageJson.name = packageJson + packageJson['dist-tags'][tag || 'latest'] = '0.0.91' + packageJson.versions['0.0.91'].name = packageName + packageJson.versions['0.0.91'].engines.node = engines + } else { + urlPath = `/${packageName}/latest` + packageJson = getTemplate('packageJsonTemplate.json') + packageJson.name = packageName + packageJson.engines.node = engines + } + return nock(registry || 'https://registry.npmjs.org/') + .get(urlPath) + .reply(200, packageJson) +} + +const mockNonExistingPackageData = packageName => nock => nock('https://registry.npmjs.org/') + .get(`/${packageName}/latest`) + .reply(404) + +const mockCurrentSha = latestVersion => nock => { + const latestSha = `node-v${latestVersion}.12.0-aix-ppc64.tar.gz` + return nock('https://nodejs.org/dist/') + .get(`/latest/SHASUMS256.txt`) + .reply(200, latestSha) +} + +module.exports = { + mockNonExistingPackageData, + mockPackageData, + mockCurrentSha, +} diff --git a/services/node/testUtils/testUtils.js b/services/node/testUtils/testUtils.js deleted file mode 100644 index 8e812cc1735b4..0000000000000 --- a/services/node/testUtils/testUtils.js +++ /dev/null @@ -1,50 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -const getTemplate = (template) => { - return JSON.parse(fs.readFileSync(path.join(__dirname, template), 'utf-8')) -} - -const mockPackageData = (packageName, engines, scope, tag, registry) => (nock) => { - let packageJson; - let urlPath; - if (scope || tag) { - if (scope) { - urlPath = `/${scope}%2F${packageName}` - } else { - urlPath = `/${packageName}`; - } - packageJson = getTemplate('packageJsonVersionsTemplate.json') - packageJson.name = packageJson - packageJson['dist-tags'][tag || 'latest'] = '0.0.91' - packageJson.versions['0.0.91'].name = packageName; - packageJson.versions['0.0.91'].engines.node = engines; - } else { - urlPath = `/${packageName}/latest`; - packageJson = getTemplate('packageJsonTemplate.json') - packageJson.name = packageName; - packageJson.engines.node = engines; - } - return nock(registry || 'https://registry.npmjs.org/') - .get(urlPath) - .reply(200, packageJson) -} - -const mockNonExistingPackageData = (packageName) => (nock) => { - return nock('https://registry.npmjs.org/') - .get(`/${packageName}/latest`) - .reply(404) -} - -const mockCurrentSha = (latestVersion) => (nock) => { - const latestSha = `node-v${latestVersion}.12.0-aix-ppc64.tar.gz` - return nock('https://nodejs.org/dist/') - .get(`/latest/SHASUMS256.txt`) - .reply(200, latestSha) -} - -module.exports = { - mockNonExistingPackageData, - mockPackageData, - mockCurrentSha, -} From a2cf37fd9a4feb2ac494f022c4731e7eca63bc5d Mon Sep 17 00:00:00 2001 From: regevbr Date: Tue, 31 Mar 2020 15:07:28 +0300 Subject: [PATCH 05/16] fix: node service has bad colors #4809 --- services/node/testUtils/test-utils.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/services/node/testUtils/test-utils.js b/services/node/testUtils/test-utils.js index 40f825f926f57..c6ba5699b168b 100644 --- a/services/node/testUtils/test-utils.js +++ b/services/node/testUtils/test-utils.js @@ -1,9 +1,10 @@ -'use strict'; +'use strict' const fs = require('fs') const path = require('path') -const getTemplate = template => JSON.parse(fs.readFileSync(path.join(__dirname, template), 'utf-8')) +const getTemplate = template => + JSON.parse(fs.readFileSync(path.join(__dirname, template), 'utf-8')) const mockPackageData = ( packageName, @@ -36,9 +37,10 @@ const mockPackageData = ( .reply(200, packageJson) } -const mockNonExistingPackageData = packageName => nock => nock('https://registry.npmjs.org/') - .get(`/${packageName}/latest`) - .reply(404) +const mockNonExistingPackageData = packageName => nock => + nock('https://registry.npmjs.org/') + .get(`/${packageName}/latest`) + .reply(404) const mockCurrentSha = latestVersion => nock => { const latestSha = `node-v${latestVersion}.12.0-aix-ppc64.tar.gz` From 41ddeb05c9d6803e5f4bf2527954168a0921dfe8 Mon Sep 17 00:00:00 2001 From: regevbr Date: Tue, 31 Mar 2020 15:20:09 +0300 Subject: [PATCH 06/16] fix: node service has bad colors #4809 --- services/node/node-base.js | 4 +- services/node/node-lts.tester.js | 4 +- services/node/node-version-color.js | 5 +-- services/node/node-version-color.spec.js | 54 ------------------------ 4 files changed, 5 insertions(+), 62 deletions(-) delete mode 100644 services/node/node-version-color.spec.js diff --git a/services/node/node-base.js b/services/node/node-base.js index 7f3cd61e9b74b..2af26cb1069dc 100644 --- a/services/node/node-base.js +++ b/services/node/node-base.js @@ -74,7 +74,7 @@ module.exports = class NodeVersionBase extends NPMBase { // be synchronous, this method exists. It should return the same value as the // real `render()`. There's a unit test to check that. return { - label: tag ? `node@${tag}` : undefined, + label: tag ? `${this.defaultBadgeData.label}@${tag}` : undefined, message: nodeVersionRange, color: 'brightgreen', } @@ -83,7 +83,7 @@ module.exports = class NodeVersionBase extends NPMBase { static async render({ tag, nodeVersionRange }) { // Atypically, the `render()` function of this badge is `async` because it needs to pull // data from the server. - const label = tag ? `node@${tag}` : undefined + const label = tag ? `${this.defaultBadgeData.label}@${tag}` : undefined if (nodeVersionRange === undefined) { return { diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index c762c434f1459..39da3254d16ea 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -24,7 +24,7 @@ t.create('gets the node version of @stdlib/stdlib') t.create("gets the tagged release's node version version of ionic") .get('/ionic/next.json') - .expectBadge({ label: 'node@next' }) + .expectBadge({ label: 'node lts@next' }) .afterJSON(json => { expectSemverRange(json.message) }) @@ -38,7 +38,7 @@ t.create('gets the node version of passport from a custom registry') t.create("gets the tagged release's node version of @cycle/core") .get('/@cycle/core/canary.json') - .expectBadge({ label: 'node@canary' }) + .expectBadge({ label: 'node lts@canary' }) .afterJSON(json => { expectSemverRange(json.message) }) diff --git a/services/node/node-version-color.js b/services/node/node-version-color.js index 6bdaf4c86ba52..f4b5d96522303 100644 --- a/services/node/node-version-color.js +++ b/services/node/node-version-color.js @@ -21,8 +21,7 @@ function getVersion(version) { const taris = shasums.indexOf('node-v') const tarie = shasums.indexOf('\n', taris) const tarball = shasums.slice(taris, tarie) - const version = tarball.split('-')[1] - return version + return tarball.split('-')[1] }, }) } @@ -87,8 +86,6 @@ async function versionColorForRangeCurrent(range) { } module.exports = { - getCurrentVersion, - getStableVersions: getLtsVersions, versionColorForRangeCurrent, versionColorForRangeLts, } diff --git a/services/node/node-version-color.spec.js b/services/node/node-version-color.spec.js deleted file mode 100644 index 869521865d11f..0000000000000 --- a/services/node/node-version-color.spec.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict' - -const { expect } = require('chai') -const { - getStableVersions, - getCurrentVersion, - versionColorForRangeLts, - versionColorForRangeCurrent, -} = require('./node-version-color') - -describe('node version color', function() { - describe(`stable`, function() { - it('should only return lts versions', async function() { - this.timeout(4000) - const versions = await getStableVersions() - versions.sort() - const major = parseInt( - versions[versions.length - 1].match(/(\d+)/)[0], - 10 - ) - expect(major % 2).to.eql(0) - }) - it('should print green on lts versions', async function() { - const versions = await getStableVersions() - const range = versions.reduce( - (range, version) => `${range} || ${version}` - ) - const color = await versionColorForRangeLts(range) - expect(color).to.eql('brightgreen') - }) - it('should print yellow on lts bigger than range', async function() { - const versions = await getStableVersions() - versions.sort() - const major = parseInt(versions[0].match(/(\d+)/)[0], 10) - 1 - const range = `^${major}` - const color = await versionColorForRangeLts(range) - expect(color).to.eql('yellow') - }) - }) - describe(`latest`, function() { - it('should print green on latest version', async function() { - const version = await getCurrentVersion() - const color = await versionColorForRangeCurrent(version) - expect(color).to.eql('brightgreen') - }) - it('should print yellow on latest bigger than range', async function() { - const version = await getCurrentVersion() - const major = parseInt(version.match(/(\d+)/)[0], 10) - 1 - const range = `^${major}` - const color = await versionColorForRangeCurrent(range) - expect(color).to.eql('yellow') - }) - }) -}) From 4d6d9e596a680c10e25f143ac91a9465f0bf413c Mon Sep 17 00:00:00 2001 From: regevbr Date: Tue, 31 Mar 2020 15:32:24 +0300 Subject: [PATCH 07/16] fix: node service has bad colors #4809 --- services/node/node-lts.tester.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index 39da3254d16ea..abea9dd392a49 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -23,8 +23,8 @@ t.create('gets the node version of @stdlib/stdlib') }) t.create("gets the tagged release's node version version of ionic") - .get('/ionic/next.json') - .expectBadge({ label: 'node lts@next' }) + .get('/ionic/testing.json') + .expectBadge({ label: 'node lts@testing' }) .afterJSON(json => { expectSemverRange(json.message) }) From 83743bec54537a18db0ee4dd7e28a12dd0f129d1 Mon Sep 17 00:00:00 2001 From: regevbr Date: Tue, 31 Mar 2020 15:44:26 +0300 Subject: [PATCH 08/16] fix: node service has bad colors #4809 --- services/node/node-current.spec.js | 4 ++-- services/node/node-lts.spec.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/node/node-current.spec.js b/services/node/node-current.spec.js index d4f424c75f615..a0a9e46e4b605 100644 --- a/services/node/node-current.spec.js +++ b/services/node/node-current.spec.js @@ -3,7 +3,7 @@ const { test, given } = require('sazerac') const NodeVersion = require('./node-current.service') -describe('renderStaticPreview', function() { +describe('node static renderStaticPreview', function() { it('should have parity with render()', async function() { const nodeVersionRange = '>= 6.0.0' @@ -15,7 +15,7 @@ describe('renderStaticPreview', function() { tag: 'latest', }) - test(NodeVersion.renderStaticPreview, () => { + test(NodeVersion.renderStaticPreview.bind(NodeVersion), () => { given({ nodeVersionRange }).expect(expectedNoTag) given({ nodeVersionRange, tag: 'latest' }).expect(expectedLatestTag) }) diff --git a/services/node/node-lts.spec.js b/services/node/node-lts.spec.js index d8bd5f68f540d..08e8d2bc1d4b5 100644 --- a/services/node/node-lts.spec.js +++ b/services/node/node-lts.spec.js @@ -3,7 +3,7 @@ const { test, given } = require('sazerac') const NodeVersion = require('./node-lts.service') -describe('renderStaticPreview', function() { +describe('node lts renderStaticPreview', function() { it('should have parity with render()', async function() { const nodeVersionRange = '>= 6.0.0' @@ -15,7 +15,7 @@ describe('renderStaticPreview', function() { tag: 'latest', }) - test(NodeVersion.renderStaticPreview, () => { + test(NodeVersion.renderStaticPreview.bind(NodeVersion), () => { given({ nodeVersionRange }).expect(expectedNoTag) given({ nodeVersionRange, tag: 'latest' }).expect(expectedLatestTag) }) From 1be9c514f77d89774056a5fb598f7e79419ec2cf Mon Sep 17 00:00:00 2001 From: regevbr Date: Tue, 31 Mar 2020 21:11:32 +0300 Subject: [PATCH 09/16] fix: node service has bad colors #4809 --- services/node/node-lts.tester.js | 142 +++++++++++++++++++++++--- services/node/node-version-color.js | 8 +- services/node/testUtils/test-utils.js | 136 +++++++++++++++++++++++- 3 files changed, 266 insertions(+), 20 deletions(-) diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index abea9dd392a49..dbb607dd39ffd 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -3,46 +3,164 @@ const { expect } = require('chai') const { Range } = require('semver') const t = (module.exports = require('../tester').createServiceTester()) +const { + mockPackageData, + mockNonExistingPackageData, + mockReleaseSchedule, + mockVersionsSha, +} = require('./testUtils/test-utils') function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() } -t.create('gets the node version of passport') +t.create('engines satisfies all lts node versions') .get('/passport.json') - .expectBadge({ label: 'node lts' }) + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`passport`, `10 - 12`)) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts', message: `10 - 12`, color: `brightgreen` }) .afterJSON(json => { expectSemverRange(json.message) }) -t.create('gets the node version of @stdlib/stdlib') +t.create('engines not satisfies all lts node versions') + .get('/passport.json') + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`passport`, `8`)) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts', message: `8`, color: `orange` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies some lts node versions') + .get('/passport.json') + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`passport`, `10`)) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts', message: `10`, color: `yellow` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies all lts node versions - scoped') .get('/@stdlib/stdlib.json') - .expectBadge({ label: 'node lts' }) + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`stdlib`, `10 - 12`, `@stdlib`)) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts', message: `10 - 12`, color: `brightgreen` }) .afterJSON(json => { expectSemverRange(json.message) }) -t.create("gets the tagged release's node version version of ionic") - .get('/ionic/testing.json') - .expectBadge({ label: 'node lts@testing' }) +t.create('engines not satisfies all lts node versions - scoped') + .get('/@stdlib/stdlib.json') + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`stdlib`, `8`, `@stdlib`)) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts', message: `8`, color: `orange` }) .afterJSON(json => { expectSemverRange(json.message) }) -t.create('gets the node version of passport from a custom registry') - .get('/passport.json?registry_uri=https://registry.npmjs.com') - .expectBadge({ label: 'node lts' }) +t.create('engines satisfies some lts node versions - scoped') + .get('/@stdlib/stdlib.json') + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`stdlib`, `10`, `@stdlib`)) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts', message: `10`, color: `yellow` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies all lts node versions - tagged') + .get('/ionic/next.json') + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`ionic`, `10 - 12`, undefined, `next`)) + .intercept(mockVersionsSha()) + .expectBadge({ + label: 'node lts@next', + message: `10 - 12`, + color: `brightgreen`, + }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines not satisfies all lts node versions - tagged') + .get('/ionic/next.json') + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`ionic`, `8`, undefined, `next`)) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts@next', message: `8`, color: `orange` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies some lts node versions - tagged') + .get('/ionic/next.json') + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`ionic`, `10`, undefined, `next`)) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts@next', message: `10`, color: `yellow` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies all lts node versions - scoped and tagged') + .get('/@cycle/core/canary.json') + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`core`, `10 - 12`, `@cycle`, `canary`)) + .intercept(mockVersionsSha()) + .expectBadge({ + label: 'node lts@canary', + message: `10 - 12`, + color: `brightgreen`, + }) .afterJSON(json => { expectSemverRange(json.message) }) -t.create("gets the tagged release's node version of @cycle/core") +t.create('engines not satisfies all lts node versions - scoped and tagged') .get('/@cycle/core/canary.json') - .expectBadge({ label: 'node lts@canary' }) + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`core`, `8`, `@cycle`, `canary`)) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts@canary', message: `8`, color: `orange` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies some lts node versions - scoped and tagged') + .get('/@cycle/core/canary.json') + .intercept(mockReleaseSchedule()) + .intercept(mockPackageData(`core`, `10`, `@cycle`, `canary`)) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts@canary', message: `10`, color: `yellow` }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + +t.create('engines satisfies all lts node versions with custom registry') + .get('/passport.json?registry_uri=https://registry.npmjs.com') + .intercept(mockReleaseSchedule()) + .intercept( + mockPackageData( + `passport`, + `10 - 12`, + undefined, + undefined, + 'https://registry.npmjs.com' + ) + ) + .intercept(mockVersionsSha()) + .expectBadge({ label: 'node lts', message: `10 - 12`, color: `brightgreen` }) .afterJSON(json => { expectSemverRange(json.message) }) t.create('invalid package name') .get('/frodo-is-not-a-package.json') + .intercept(mockNonExistingPackageData(`frodo-is-not-a-package`)) .expectBadge({ label: 'node lts', message: 'package not found' }) diff --git a/services/node/node-version-color.js b/services/node/node-version-color.js index f4b5d96522303..9208bcbce0593 100644 --- a/services/node/node-version-color.js +++ b/services/node/node-version-color.js @@ -55,12 +55,12 @@ async function versionColorForRangeLts(range) { const matchesAll = ltsVersions.reduce(function(satisfies, version) { return satisfies && semver.satisfies(version, range) }, true) - const greaterThanAll = ltsVersions.reduce(function(satisfies, version) { - return satisfies && semver.gtr(version, range) - }, true) + const matchesSome = ltsVersions.reduce(function(satisfies, version) { + return satisfies || semver.satisfies(version, range) + }, false) if (matchesAll) { return 'brightgreen' - } else if (greaterThanAll) { + } else if (matchesSome) { return 'yellow' } else { return 'orange' diff --git a/services/node/testUtils/test-utils.js b/services/node/testUtils/test-utils.js index c6ba5699b168b..dd64aff397864 100644 --- a/services/node/testUtils/test-utils.js +++ b/services/node/testUtils/test-utils.js @@ -2,9 +2,22 @@ const fs = require('fs') const path = require('path') +const moment = require('moment') -const getTemplate = template => - JSON.parse(fs.readFileSync(path.join(__dirname, template), 'utf-8')) +const dateFormat = 'YYYY-MM-DD' + +const templates = { + packageJsonVersionsTemplate: fs.readFileSync( + path.join(__dirname, `packageJsonVersionsTemplate.json`), + 'utf-8' + ), + packageJsonTemplate: fs.readFileSync( + path.join(__dirname, `packageJsonTemplate.json`), + 'utf-8' + ), +} + +const getTemplate = template => JSON.parse(templates[template]) const mockPackageData = ( packageName, @@ -21,14 +34,14 @@ const mockPackageData = ( } else { urlPath = `/${packageName}` } - packageJson = getTemplate('packageJsonVersionsTemplate.json') + packageJson = getTemplate('packageJsonVersionsTemplate') packageJson.name = packageJson packageJson['dist-tags'][tag || 'latest'] = '0.0.91' packageJson.versions['0.0.91'].name = packageName packageJson.versions['0.0.91'].engines.node = engines } else { urlPath = `/${packageName}/latest` - packageJson = getTemplate('packageJsonTemplate.json') + packageJson = getTemplate('packageJsonTemplate') packageJson.name = packageName packageJson.engines.node = engines } @@ -49,8 +62,123 @@ const mockCurrentSha = latestVersion => nock => { .reply(200, latestSha) } +const mockVersionsSha = () => nock => { + let scope = nock('https://nodejs.org/dist/') + for (const version of [10, 12]) { + const latestSha = `node-v${version}.12.0-aix-ppc64.tar.gz` + scope = scope + .get(`/latest-v${version}.x/SHASUMS256.txt`) + .reply(200, latestSha) + } + return scope +} + +const mockReleaseSchedule = () => nock => { + const currentDate = moment() + const schedule = { + 'v0.10': { + start: '2013-03-11', + end: '2016-10-31', + }, + 'v0.12': { + start: '2015-02-06', + end: '2016-12-31', + }, + v4: { + start: '2015-09-08', + lts: '2015-10-12', + maintenance: '2017-04-01', + end: '2018-04-30', + codename: 'Argon', + }, + v5: { + start: '2015-10-29', + maintenance: '2016-04-30', + end: '2016-06-30', + }, + v6: { + start: '2016-04-26', + lts: '2016-10-18', + maintenance: '2018-04-30', + end: '2019-04-30', + codename: 'Boron', + }, + v7: { + start: '2016-10-25', + maintenance: '2017-04-30', + end: '2017-06-30', + }, + v8: { + start: '2017-05-30', + lts: '2017-10-31', + maintenance: '2019-01-01', + end: '2019-12-31', + codename: 'Carbon', + }, + v9: { + start: '2017-10-01', + maintenance: '2018-04-01', + end: '2018-06-30', + }, + v10: { + start: '2018-04-24', + lts: currentDate + .clone() + .subtract(6, 'month') + .format(dateFormat), + maintenance: '2020-04-30', + end: currentDate + .clone() + .add(1, 'month') + .format(dateFormat), + codename: 'Dubnium', + }, + v11: { + start: '2018-10-23', + maintenance: '2019-04-22', + end: '2019-06-01', + }, + v12: { + start: '2019-04-23', + lts: currentDate + .clone() + .subtract(1, 'month') + .format(dateFormat), + maintenance: '2020-10-20', + end: currentDate + .clone() + .add(6, 'month') + .format(dateFormat), + codename: 'Erbium', + }, + v13: { + start: '2019-10-22', + maintenance: '2020-04-01', + end: '2020-06-01', + }, + v14: { + start: '2020-04-21', + lts: currentDate + .clone() + .add(4, 'month') + .format(dateFormat), + maintenance: '2021-10-19', + end: currentDate + .clone() + .add(12, 'month') + .format(dateFormat), + codename: '', + }, + } + return nock('https://raw.githubusercontent.com/') + .get(`/nodejs/Release/master/schedule.json`) + .reply(200, schedule) +} + module.exports = { mockNonExistingPackageData, mockPackageData, mockCurrentSha, + mockVersionsSha, + mockReleaseSchedule, } From f35f9530da2649ff2ff68631f06087d6acbe3297 Mon Sep 17 00:00:00 2001 From: regevbr Date: Tue, 31 Mar 2020 21:19:56 +0300 Subject: [PATCH 10/16] fix: node service has bad colors #4809 --- services/npm/npm-base.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/npm/npm-base.js b/services/npm/npm-base.js index e9d8ff75ea0fe..3ca60ccc52408 100644 --- a/services/npm/npm-base.js +++ b/services/npm/npm-base.js @@ -104,9 +104,8 @@ module.exports = class NpmBase extends BaseJsonService { // these badges, and the response is smaller. url = `${registryUrl}/${packageName}/latest` } else if (scope === undefined && tag !== undefined) { - // e.g. https://registry.npmjs.org/express/latest - // Use this endpoint as an optimization. It covers the vast majority of - // these badges, and the response is smaller. + // e.g. https://registry.npmjs.org/express + // because https://registry.npmjs.org/express/canary does not work url = `${registryUrl}/${packageName}` } else { // e.g. https://registry.npmjs.org/@cedx%2Fgulp-david From 15585ff53499a53f56000c851cc16a51fd79cf55 Mon Sep 17 00:00:00 2001 From: regevbr Date: Thu, 2 Apr 2020 11:16:46 +0300 Subject: [PATCH 11/16] fix: node service has bad colors #4809 --- .../node/testUtils/packageJsonTemplate.json | 64 +- .../packageJsonVersionsTemplate.json | 651 +----------------- services/node/testUtils/test-utils.js | 3 - 3 files changed, 10 insertions(+), 708 deletions(-) diff --git a/services/node/testUtils/packageJsonTemplate.json b/services/node/testUtils/packageJsonTemplate.json index fd74e196a2e2b..e69cdb52be1ea 100644 --- a/services/node/testUtils/packageJsonTemplate.json +++ b/services/node/testUtils/packageJsonTemplate.json @@ -1,73 +1,11 @@ { - "name": "passport", - "version": "0.4.1", - "description": "Simple, unobtrusive authentication for Node.js.", - "keywords": ["express", "connect", "auth", "authn", "authentication"], - "author": { - "name": "Jared Hanson", - "email": "jaredhanson@gmail.com", - "url": "http://www.jaredhanson.net/" - }, - "homepage": "http://passportjs.org/", - "repository": { - "type": "git", - "url": "git://github.com/jaredhanson/passport.git" - }, - "bugs": { - "url": "http://github.com/jaredhanson/passport/issues" - }, - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "http://opensource.org/licenses/MIT" - } - ], - "main": "./lib", - "dependencies": { - "passport-strategy": "1.x.x", - "pause": "0.0.1" - }, - "devDependencies": { - "make-node": "0.3.x", - "mocha": "2.x.x", - "chai": "2.x.x", - "chai-connect-middleware": "0.3.x", - "chai-passport-strategy": "0.2.x", - "proxyquire": "1.4.x" - }, "engines": { "node": ">= 0.4.0" }, - "scripts": { - "test": "mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js" - }, - "gitHead": "42ff63c60ae55f466d21332306e9112295c0535e", - "_id": "passport@0.4.1", - "_npmVersion": "5.6.0", - "_nodeVersion": "8.11.3", - "_npmUser": { - "name": "jaredhanson", - "email": "jaredhanson@gmail.com" - }, "maintainers": [ { "name": "jaredhanson", "email": "jaredhanson@gmail.com" } - ], - "dist": { - "integrity": "sha512-IxXgZZs8d7uFSt3eqNjM9NQ3g3uQCW5avD8mRNoXV99Yig50vjuaez6dQK2qC0kVWPRTujxY0dWgGfT09adjYg==", - "shasum": "941446a21cb92fc688d97a0861c38ce9f738f270", - "tarball": "https://registry.npmjs.org/passport/-/passport-0.4.1.tgz", - "fileCount": 12, - "unpackedSize": 46157, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7mz0CRA9TVsSAnZWagAAw5oQAJuPyqGI+wylbF3HjeGl\nddgyilB20KPqr8kphN6kPiJlS8XhvipWadKNV6ATdBVyhTzXEX/HiW1YWmcQ\nSmAFVA0/UjFdpFcOvweEjspckNmeHlozeeRljQxbt3kU3Zs3REhSsx4ebNW/\npeyqlHyDV6WFbkggXpXDIY4Yy2swXblsHnLTTYi3yxFvzNEqZvpqF3OE9b8x\n20q1yC5/LFjUVrhgDhTV8GTVQV4N36cJNLmI73ZISScruMQnOUzB4ChNbU5C\naHnrsbYAFpW+8t2ZzK+L7hXjxvMGVN6gKvsJTJ1gWpEwC/w4UGaLElthI0dL\nM7wHDzuci9ihiTcXNw/e4K9URddILDFOZDYYg3eOXKnrajQ63wxvoYeoIG24\n2Cs4SplMqjZ7wM7GhXGVL8PhRPjgMoQvBsWAp7QTMmKWMawg/aaUlb86fVOw\nOHi1murS0xlfgYzk6reduQi0IUDL8N3YpnRVWjgZzRY5kLx6yQVEYZnFh+M7\nGRzk4Qd50w5/1LCVsmFrBskR0N7SuMoVxOj/iKmDmleJtZyQ+VI9jCxY0EgM\nelZaneIoh/YDU+OjuiJJigkGu7BMBp60umtmOtAiZm52Pgcy6heS0xK3gYNN\n8zLAX4Z4EG8D+eYcAA5b/G8U/3fMWVRfzgUv3Q8gU9K+GY8IYtRmnXKeMsxu\n8+84\r\n=lh9x\r\n-----END PGP SIGNATURE-----\r\n" - }, - "directories": {}, - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/passport_0.4.1_1575906548000_0.5977240542921702" - }, - "_hasShrinkwrap": false + ] } diff --git a/services/node/testUtils/packageJsonVersionsTemplate.json b/services/node/testUtils/packageJsonVersionsTemplate.json index 0876ac049ac8b..02601d82e2323 100644 --- a/services/node/testUtils/packageJsonVersionsTemplate.json +++ b/services/node/testUtils/packageJsonVersionsTemplate.json @@ -1,662 +1,29 @@ { - "_id": "@stdlib/stdlib", - "_rev": "174-64e9e180efd442c3a9842a60bb20b493", - "name": "@stdlib/stdlib", - "description": "Standard library.", "dist-tags": { "latest": "0.0.91" }, "versions": { "0.0.90": { - "name": "@stdlib/stdlib", - "version": "0.0.90", - "description": "Standard library.", - "license": "Apache-2.0 AND BSL-1.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "funding": { - "type": "patreon", - "url": "https://www.patreon.com/athan" - }, - "bin": { - "stdlib": "./bin/cli" - }, - "main": "./lib", - "browser": "./dist/stdlib-flat.min.js", - "unpkg": "./dist/stdlib-flat.min.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "scripts": { - "postinstall": "node ./tools/scripts/postinstall", - "preuninstall": "node ./tools/scripts/preuninstall", - "notes": "make notes", - "lint": "make lint", - "repl": "make repl", - "test": "make test", - "test-cov": "make test-cov", - "view-cov": "make view-cov", - "examples": "make examples", - "benchmark": "make benchmark", - "clean": "make clean", - "check-deps": "make check-deps", - "check-licenses": "make check-licenses" - }, - "homepage": "https://github.com/stdlib-js/stdlib", - "repository": { - "type": "git", - "url": "git://github.com/stdlib-js/stdlib.git" - }, - "bugs": { - "url": "https://github.com/stdlib-js/stdlib/issues" - }, - "dependencies": { - "acorn": "^7.0.0", - "acorn-loose": "^7.0.0", - "acorn-walk": "^7.0.0", - "d3-format": "^1.0.0", - "d3-scale": "^1.0.0", - "d3-shape": "^1.0.0", - "d3-time-format": "^2.0.0", - "debug": "^2.6.9", - "glob": "^7.0.5", - "minimist": "^1.2.0", - "nan": "^2.5.1", - "node-gyp": "^3.5.0", - "readable-stream": "^2.1.4", - "resolve": "^1.1.7", - "update-notifier": "^1.0.0", - "vdom-to-html": "^2.3.0", - "virtual-dom": "^2.1.1" - }, - "devDependencies": { - "ajv": "^5.2.2", - "browser-pack-flat": "^3.0.0", - "browserify": "^16.1.0", - "bundle-collapser": "^1.3.0", - "chai": "^3.5.0", - "common-shakeify": "^0.6.0", - "david": "^11.0.0", - "doctrine": "^3.0.0", - "dtslint": "^0.9.8", - "envify": "^4.0.0", - "eslint": "^6.4.0", - "factor-bundle": "^2.5.0", - "fastify": "^2.10.0", - "fastify-helmet": "^3.0.2", - "fastify-static": "^2.5.0", - "istanbul": "^0.4.1", - "jsdoc": "^3.4.0", - "lunr": "^2.0.0", - "mathjax-node": "^2.0.1", - "mathjax-node-sre": "^3.0.0", - "mkdirp": "^0.5.1", - "mustache": "^3.0.0", - "parse-link-header": "^1.0.1", - "plato": "^1.5.0", - "proxyquire": "^2.0.0", - "proxyquire-universal": "^2.0.0", - "proxyquireify": "^3.1.1", - "read-installed": "^4.0.3", - "rehype": "^9.0.0", - "rehype-highlight": "^3.0.0", - "remark": "^11.0.1", - "remark-cli": "^7.0.0", - "remark-frontmatter": "^1.2.0", - "remark-html": "^10.0.0", - "remark-lint": "^6.0.0", - "remark-lint-blockquote-indentation": "^1.0.0", - "remark-lint-checkbox-character-style": "^1.0.0", - "remark-lint-checkbox-content-indent": "^1.0.0", - "remark-lint-code-block-style": "^1.0.0", - "remark-lint-definition-case": "^1.0.0", - "remark-lint-definition-spacing": "^1.0.0", - "remark-lint-emphasis-marker": "^1.0.0", - "remark-lint-fenced-code-flag": "^1.0.0", - "remark-lint-fenced-code-marker": "^1.0.0", - "remark-lint-file-extension": "^1.0.0", - "remark-lint-final-definition": "^1.0.0", - "remark-lint-final-newline": "^1.0.0", - "remark-lint-first-heading-level": "^1.1.0", - "remark-lint-hard-break-spaces": "^1.0.1", - "remark-lint-heading-increment": "^1.0.0", - "remark-lint-heading-style": "^1.0.0", - "remark-lint-linebreak-style": "^1.0.0", - "remark-lint-link-title-style": "^1.0.0", - "remark-lint-list-item-bullet-indent": "^1.0.0", - "remark-lint-list-item-content-indent": "^1.0.0", - "remark-lint-list-item-indent": "^1.0.0", - "remark-lint-list-item-spacing": "^1.1.0", - "remark-lint-maximum-heading-length": "^1.0.0", - "remark-lint-maximum-line-length": "^1.0.0", - "remark-lint-no-auto-link-without-protocol": "^1.0.0", - "remark-lint-no-blockquote-without-marker": "^2.0.0", - "remark-lint-no-consecutive-blank-lines": "^1.0.0", - "remark-lint-no-duplicate-definitions": "^1.0.0", - "remark-lint-no-duplicate-headings": "^1.0.0", - "remark-lint-no-duplicate-headings-in-section": "^1.0.0", - "remark-lint-no-emphasis-as-heading": "^1.0.0", - "remark-lint-no-empty-url": "^1.0.1", - "remark-lint-no-file-name-articles": "^1.0.0", - "remark-lint-no-file-name-consecutive-dashes": "^1.0.0", - "remark-lint-no-file-name-irregular-characters": "^1.0.0", - "remark-lint-no-file-name-mixed-case": "^1.0.0", - "remark-lint-no-file-name-outer-dashes": "^1.0.1", - "remark-lint-no-heading-content-indent": "^1.0.0", - "remark-lint-no-heading-indent": "^1.0.0", - "remark-lint-no-heading-like-paragraph": "^1.0.0", - "remark-lint-no-heading-punctuation": "^1.0.0", - "remark-lint-no-html": "^1.0.0", - "remark-lint-no-inline-padding": "^1.0.0", - "remark-lint-no-literal-urls": "^1.0.0", - "remark-lint-no-missing-blank-lines": "^1.0.0", - "remark-lint-no-multiple-toplevel-headings": "^1.0.0", - "remark-lint-no-paragraph-content-indent": "^1.0.1", - "remark-lint-no-reference-like-url": "^1.0.0", - "remark-lint-no-shell-dollars": "^1.0.0", - "remark-lint-no-shortcut-reference-image": "^1.0.0", - "remark-lint-no-shortcut-reference-link": "^1.0.1", - "remark-lint-no-table-indentation": "^1.0.0", - "remark-lint-no-tabs": "^1.0.0", - "remark-lint-no-undefined-references": "^1.0.0", - "remark-lint-no-unused-definitions": "^1.0.0", - "remark-lint-ordered-list-marker-style": "^1.0.0", - "remark-lint-ordered-list-marker-value": "^1.0.0", - "remark-lint-rule-style": "^1.0.0", - "remark-lint-strong-marker": "^1.0.0", - "remark-lint-table-cell-padding": "^1.0.0", - "remark-lint-table-pipe-alignment": "^1.0.0", - "remark-lint-table-pipes": "^1.0.0", - "remark-lint-unordered-list-marker-style": "^1.0.0", - "remark-slug": "^5.0.0", - "remark-unlink": "^2.0.0", - "remark-validate-links": "^9.0.1", - "remark-vdom": "^8.0.0", - "semver": "^6.0.0", - "spdx-license-ids": "^3.0.0", - "tap-spec": "5.x.x", - "tap-summary": "^4.0.0", - "tap-xunit": "^2.2.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "to-vfile": "^6.0.0", - "typedoc": "^0.15.0", - "uglify-es": "^3.1.1", - "uglifyify": "^5.0.0", - "unified-lint-rule": "^1.0.1", - "unist-util-visit": "^2.0.0", - "yaml": "^1.0.0" - }, "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], - "keywords": [ - "stdlib", - "stdlib-js", - "stdlib.js", - "js-stdlib", - "stdlibjs", - "standard", - "std", - "library", - "lib", - "libstd" - ], - "gitHead": "51dcafe2bcccbc953fad532ee4705bbeb3627c51", - "_id": "@stdlib/stdlib@0.0.90", - "_nodeVersion": "12.9.1", - "_npmVersion": "6.10.2", - "_npmUser": { - "name": "kgryte", - "email": "kgryte@gmail.com" - }, - "dist": { - "integrity": "sha512-nLeLc4XaS8N4VX7MCctsvNMebVF5eW5GZ0ZELxYz/BugJCupxbHCna61paqVbCywWcojecRceyD4650XgbIScQ==", - "shasum": "cc54d3e864c2fd8f72c02e0b740f1e9553bbddca", - "tarball": "https://registry.npmjs.org/@stdlib/stdlib/-/stdlib-0.0.90.tgz", - "fileCount": 32943, - "unpackedSize": 489502244, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd17YoCRA9TVsSAnZWagAA0vUP/jdfzUi8/vIK9zdbfYZC\nUTr4gEm/cAi1WMY35ukTKiXH4AtQVN7PrxMZT81zyY068vM0mJytsa6X40nd\n8osMlRVHu140eaCB9KTp1+GZ0ux9KweTWBnGp2b+TvfyOtpIk6CFwzbesJnO\nic5+poJE81EV/cs5bFMOvJA4IbYSOoyEXTuQexUZJIUVQclfCi2ua7gbVNsz\nNSvN1k4QQereqWKc6W3aHs887bCSB0gqvYfNJRWIsGSFC0EVU/cQULiv40iG\n6TMMk3908EXlt81vqfJNRYxoO2XyCZ3Tf/buBwOF1b/YmXYtMSVqlKXCTQZi\nArx6eFltOxuphcQ21dWiuqsRAaihDfiH5cs5S1H+n/xYDIrGhGz/gOYUXalh\n00VjoO+wwGDe8a1BQmL8FU4mCkRBZ3Eh0Hw3AMa/A9KMg+3WcIVoj7O6TQTf\nHPbSBNB3/BAN4uNmGXiUqv8oAuqBWzwaswu0PyqbLWSmODSx3D+/1yYUwdhV\ngPhLdS91819RH/Pah6V4wEHxa4fYbcVH4TZlseXVhVTss6VTr1PPBQZle/0Y\nitWcUiXS8j4MV8I2HpNnUxxUzIEbwEaJw/XzEv15AXK04qbPz+g2eOKy+FoT\n0xW31u11ROysZ08EARV1aJEU19Ur2JtyJtFqo3iYO8DPpxm7DFIY5pNj/oFl\nZyqR\r\n=8TuN\r\n-----END PGP SIGNATURE-----\r\n" + "node": ">= 0.4.0" }, "maintainers": [ { - "name": "kgryte", - "email": "kgryte@gmail.com" - }, - { - "name": "planeshifter", - "email": "pgb@andrew.cmu.edu" - }, - { - "name": "stdlib-bot", - "email": "kgryte@gmail.com" + "name": "jaredhanson", + "email": "jaredhanson@gmail.com" } - ], - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/stdlib_0.0.90_1574417955731_0.11381173271401024" - }, - "_hasShrinkwrap": false + ] }, - "0.0.91": { - "name": "@stdlib/stdlib", - "version": "0.0.91", - "description": "Standard library.", - "license": "Apache-2.0 AND BSL-1.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "funding": { - "type": "patreon", - "url": "https://www.patreon.com/athan" - }, - "bin": { - "stdlib": "./bin/cli" - }, - "main": "./lib", - "browser": "./dist/stdlib-flat.min.js", - "unpkg": "./dist/stdlib-flat.min.js", - "jsdelivr": "./dist/stdlib-flat.min.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "scripts": { - "postinstall": "node ./tools/scripts/postinstall", - "preuninstall": "node ./tools/scripts/preuninstall", - "notes": "make notes", - "lint": "make lint", - "repl": "make repl", - "test": "make test", - "test-cov": "make test-cov", - "view-cov": "make view-cov", - "examples": "make examples", - "benchmark": "make benchmark", - "clean": "make clean", - "check-deps": "make check-deps", - "check-licenses": "make check-licenses" - }, - "homepage": "https://github.com/stdlib-js/stdlib", - "repository": { - "type": "git", - "url": "git://github.com/stdlib-js/stdlib.git" - }, - "bugs": { - "url": "https://github.com/stdlib-js/stdlib/issues" - }, - "dependencies": { - "acorn": "^7.0.0", - "acorn-loose": "^7.0.0", - "acorn-walk": "^7.0.0", - "d3-format": "^1.0.0", - "d3-scale": "^1.0.0", - "d3-shape": "^1.0.0", - "d3-time-format": "^2.0.0", - "debug": "^2.6.9", - "glob": "^7.0.5", - "minimist": "^1.2.0", - "nan": "^2.5.1", - "node-gyp": "^3.5.0", - "readable-stream": "^2.1.4", - "resolve": "^1.1.7", - "update-notifier": "^1.0.0", - "vdom-to-html": "^2.3.0", - "virtual-dom": "^2.1.1" - }, - "devDependencies": { - "@types/node": "^13.9.0", - "ajv": "^5.2.2", - "browser-pack-flat": "^3.0.0", - "browserify": "^16.1.0", - "bundle-collapser": "^1.3.0", - "chai": "^3.5.0", - "common-shakeify": "^0.6.0", - "david": "^12.0.0", - "doctrine": "^3.0.0", - "dtslint": "^3.3.0", - "envify": "^4.0.0", - "eslint": "^6.4.0", - "factor-bundle": "^2.5.0", - "istanbul": "^0.4.1", - "jsdoc": "^3.4.0", - "lunr": "^2.0.0", - "mathjax-node": "^2.0.1", - "mathjax-node-sre": "^3.0.0", - "mkdirp": "^0.5.1", - "mustache": "^4.0.0", - "parse-link-header": "^1.0.1", - "plato": "^1.5.0", - "proxyquire": "^2.0.0", - "proxyquire-universal": "^2.0.0", - "proxyquireify": "^3.1.1", - "read-installed": "^4.0.3", - "rehype": "^9.0.0", - "rehype-highlight": "^3.0.0", - "remark": "^11.0.1", - "remark-cli": "^7.0.0", - "remark-frontmatter": "^1.2.0", - "remark-html": "^10.0.0", - "remark-lint": "^6.0.0", - "remark-lint-blockquote-indentation": "^1.0.0", - "remark-lint-checkbox-character-style": "^1.0.0", - "remark-lint-checkbox-content-indent": "^1.0.0", - "remark-lint-code-block-style": "^1.0.0", - "remark-lint-definition-case": "^1.0.0", - "remark-lint-definition-spacing": "^1.0.0", - "remark-lint-emphasis-marker": "^1.0.0", - "remark-lint-fenced-code-flag": "^1.0.0", - "remark-lint-fenced-code-marker": "^1.0.0", - "remark-lint-file-extension": "^1.0.0", - "remark-lint-final-definition": "^1.0.0", - "remark-lint-final-newline": "^1.0.0", - "remark-lint-first-heading-level": "^1.1.0", - "remark-lint-hard-break-spaces": "^1.0.1", - "remark-lint-heading-increment": "^1.0.0", - "remark-lint-heading-style": "^1.0.0", - "remark-lint-linebreak-style": "^1.0.0", - "remark-lint-link-title-style": "^1.0.0", - "remark-lint-list-item-bullet-indent": "^1.0.0", - "remark-lint-list-item-content-indent": "^1.0.0", - "remark-lint-list-item-indent": "^1.0.0", - "remark-lint-list-item-spacing": "^1.1.0", - "remark-lint-maximum-heading-length": "^1.0.0", - "remark-lint-maximum-line-length": "^1.0.0", - "remark-lint-no-auto-link-without-protocol": "^1.0.0", - "remark-lint-no-blockquote-without-marker": "^2.0.0", - "remark-lint-no-consecutive-blank-lines": "^1.0.0", - "remark-lint-no-duplicate-definitions": "^1.0.0", - "remark-lint-no-duplicate-headings": "^1.0.0", - "remark-lint-no-duplicate-headings-in-section": "^1.0.0", - "remark-lint-no-emphasis-as-heading": "^1.0.0", - "remark-lint-no-empty-url": "^1.0.1", - "remark-lint-no-file-name-articles": "^1.0.0", - "remark-lint-no-file-name-consecutive-dashes": "^1.0.0", - "remark-lint-no-file-name-irregular-characters": "^1.0.0", - "remark-lint-no-file-name-mixed-case": "^1.0.0", - "remark-lint-no-file-name-outer-dashes": "^1.0.1", - "remark-lint-no-heading-content-indent": "^1.0.0", - "remark-lint-no-heading-indent": "^1.0.0", - "remark-lint-no-heading-like-paragraph": "^1.0.0", - "remark-lint-no-heading-punctuation": "^1.0.0", - "remark-lint-no-html": "^1.0.0", - "remark-lint-no-inline-padding": "^1.0.0", - "remark-lint-no-literal-urls": "^1.0.0", - "remark-lint-no-missing-blank-lines": "^1.0.0", - "remark-lint-no-multiple-toplevel-headings": "^1.0.0", - "remark-lint-no-paragraph-content-indent": "^1.0.1", - "remark-lint-no-reference-like-url": "^1.0.0", - "remark-lint-no-shell-dollars": "^1.0.0", - "remark-lint-no-shortcut-reference-image": "^1.0.0", - "remark-lint-no-shortcut-reference-link": "^1.0.1", - "remark-lint-no-table-indentation": "^1.0.0", - "remark-lint-no-tabs": "^1.0.0", - "remark-lint-no-undefined-references": "^1.0.0", - "remark-lint-no-unused-definitions": "^1.0.0", - "remark-lint-ordered-list-marker-style": "^1.0.0", - "remark-lint-ordered-list-marker-value": "^1.0.0", - "remark-lint-rule-style": "^1.0.0", - "remark-lint-strong-marker": "^1.0.0", - "remark-lint-table-cell-padding": "^1.0.0", - "remark-lint-table-pipe-alignment": "^1.0.0", - "remark-lint-table-pipes": "^1.0.0", - "remark-lint-unordered-list-marker-style": "^1.0.0", - "remark-slug": "^5.0.0", - "remark-unlink": "^2.0.0", - "remark-validate-links": "^9.0.1", - "remark-vdom": "^8.0.0", - "semver": "^6.0.0", - "spdx-license-ids": "^3.0.0", - "tap-spec": "5.x.x", - "tap-summary": "^4.0.0", - "tap-xunit": "^2.2.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "to-vfile": "^6.0.0", - "typedoc": "^0.16.11", - "uglify-es": "^3.1.1", - "uglifyify": "^5.0.0", - "unified-lint-rule": "^1.0.1", - "unist-util-visit": "^2.0.0", - "yaml": "^1.0.0" - }, + "0.0.91":{ "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], - "keywords": [ - "stdlib", - "stdlib-js", - "stdlib.js", - "js-stdlib", - "stdlibjs", - "standard", - "std", - "library", - "lib", - "libstd" - ], - "gitHead": "68f492edd886c9253209599191f0c6bde0e3775c", - "_id": "@stdlib/stdlib@0.0.91", - "_nodeVersion": "12.9.1", - "_npmVersion": "6.10.2", - "_npmUser": { - "name": "kgryte", - "email": "kgryte@gmail.com" - }, - "dist": { - "integrity": "sha512-7zGaX/QGeBtlQKqwwpxSWUhzYxKU7tZo2BfhPKQPMq+buLdYjc2H+jRprXSW5kX1OXqi0l1aIV84ACvD3isNFQ==", - "shasum": "a0b84d2815661b7cf769a27f72ff3ee895e39ed7", - "tarball": "https://registry.npmjs.org/@stdlib/stdlib/-/stdlib-0.0.91.tgz", - "fileCount": 32938, - "unpackedSize": 489739477, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeapL7CRA9TVsSAnZWagAAKisP/1yA5QZaWmpDHhfdu8Ot\nd74fnVP8Yqi+7BIyZjEKMpeSGbRm613IMu7sfDe5nprH8dAImGxu82lJM5rq\n2XL7JNvgiooRp/IFXbSTlh0cVtcG+MB78+E44C9mez7YJ7jp3B5wxU09wuJt\ncpIR3aSlt19LoIIt1syVddKJRHj448fDIC5nKKJFBQPBHWTvep7aqBeKl/MR\nXEsU9rq3Zk8pwiNd9n+3qsI9VsEp96L1Rrz9D7G+Ztynez9ewXwvBqDZ5kPC\nyM/6hZfd5mABNSqb6nHuYJqOy44IdEFapVB7Hg8E2u/OAr5htaDE6wdjQ7Lw\nNttzmWHZKbdYLGw+v17NlGi42CSvwlwpFf8UF4csanzVvWoBXf22uRGyJ+gy\n30P+3FpUKqhP/4lx3VSkIUy1QO0zhKdDXtB0vln4Z5LeqD+DrWooTDlLpDVw\nAUv7BLoHICSvUa5ZaepXfpRYyhVQPHxX4iXBOC9v+8nmYiKWmxQ6HDdfRKsX\nxlUMFrucr/qR1z+9RZ4f7V0r4Jdy7GOKpwMTFVcUY5Shnd6ak1kHLj97gc7w\nTHcoX/4zrsqiJDxe2yPpiHLSVrI8R1Y254O9IFzgshhvP4MpTNMKPjDJv08M\nGdlZbMfMylhP4JG5rkQIMwDVof2A5QZZRPLyEHgspmyztejOe44Rhhp0QZoy\ns9Pr\r\n=YRic\r\n-----END PGP SIGNATURE-----\r\n" + "node": ">= 0.4.0" }, "maintainers": [ { - "name": "kgryte", - "email": "kgryte@gmail.com" - }, - { - "name": "planeshifter", - "email": "pgb@andrew.cmu.edu" - }, - { - "name": "stdlib-bot", - "email": "kgryte@gmail.com" + "name": "jaredhanson", + "email": "jaredhanson@gmail.com" } - ], - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/stdlib_0.0.91_1584042743033_0.883311859859994" - }, - "_hasShrinkwrap": false - } - }, - "readme": "\n\n\n\n\n\n
\n
\n
\n
\n \n \"stdlib\n \n
\n
\n
\n
\n
\n
\n\n\n\n* * *\n\n\n\n
\n\nstdlib ([/ˈstændərd lɪb/][ipa-english] \"standard lib\") is a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing applications. The library provides a collection of robust, high performance libraries for mathematics, statistics, data processing, streams, and more and includes many of the utilities you would expect from a standard library.\n\nThis is the GitHub repository of stdlib source code and documentation. For help developing stdlib, see the [development guide][stdlib-development].\n\n## Features\n\n- 150+ [special math functions][@stdlib/math/base/special].\n\n
\n \"Demo\n
\n\n- 35+ [probability distributions][@stdlib/stats/base/dists], with support for evaluating probability density functions (PDFs), cumulative distribution functions (CDFs), quantiles, moments, and more.\n\n
\n \"Demo\n
\n\n- 40+ [seedable pseudorandom number generators][@stdlib/random/base] (PRNGs).\n\n
\n \"Demo\n
\n\n- 200+ general [utilities][@stdlib/utils] for data transformation, functional programming, and asynchronous control flow.\n\n
\n \"Demo\n
\n\n- 200+ [assertion utilities][@stdlib/assert] for data validation and feature detection.\n\n
\n \"Demo\n
\n\n- 50+ [sample datasets][@stdlib/datasets] for testing and development.\n\n
\n \"Demo\n
\n\n- A [plot API][@stdlib/plot/ctor] for data visualization and exploratory data analysis.\n\n
\n \"Demo\n
\n\n- Native add-ons for interfacing with BLAS libraries, with pure JavaScript fallbacks.\n\n
\n \"Demo\n
\n\n- A [benchmark framework][@stdlib/bench/harness] supporting TAP.\n\n
\n \"Demo\n
\n\n- REPL environment with integrated help and examples.\n\n
\n \"Demo\n
\n\n- Can be bundled using [Browserify][browserify], [Webpack][webpack], and other bundlers for use in web browsers.\n\n
\n \"Demo\n
\n\n## Resources\n\n- [**Homepage**][stdlib-homepage]\n- [**Documentation**][stdlib-documentation]\n- [**Source code**][stdlib-source]\n- [**Code coverage**][stdlib-code-coverage]\n- [**FAQ**][stdlib-faq]\n\n### External Resources\n\n- [**Twitter**][stdlib-twitter]\n- [**Gitter**][stdlib-gitter]\n\n## Prerequisites\n\nRunning stdlib **requires** the following prerequisites:\n\n- [Node.js][node-js]: JavaScript runtime (version `>= 0.10`)\n- [npm][npm]: package manager (version `> 2.7.0`; if Node `< 1.0.0`, version `> 2.7.0` and `< 4.0.0`; if Node `< 6.0.0`, version `> 2.7.0` and `< 6.0.0`)\n\nMost functionality in stdlib is implemented exclusively in JavaScript; however, some implementations try to capture performance benefits by using [native bindings][node-js-add-ons] and/or [WebAssembly][webassembly]. While **not** required to run stdlib, as **every** stdlib implementation has a JavaScript fallback, the following dependencies are **required** for building native add-ons, including linking to BLAS and LAPACK libraries:\n\n- [GNU make][make]: development utility and task runner\n- [GNU bash][bash]: an sh-compatible shell\n- [gcc & g++][gcc] or [Clang][clang]: C/C++ compilation and linking (g++ version `>= 4.8`; clang version `>= 3.5`, Xcode version `>=8.3.1` on OS X)\n- [gfortran][gfortran]: Fortran compilation and linking (version `>= 4.8`)\n\nWhile **not** required to run stdlib, the following dependencies are **required** for automatically downloading external libraries:\n\n- [curl][curl], [wget][wget], or [fetch][fetch] (FreeBSD): utilities for downloading remote resources\n\nThe following external libraries can be automatically downloaded and compiled from source using `make`:\n\n- [OpenBLAS][openblas]: optimized BLAS library\n- [Electron][electron]: framework for cross-platform desktop applications\n\n## Installation\n\nTo install as a library or application dependency,\n\n\n\n```bash\n$ npm install @stdlib/stdlib\n```\n\nTo install globally for use as a command-line utility,\n\n\n\n```bash\n$ npm install -g @stdlib/stdlib\n```\n\nwhich will expose the `stdlib` command. For example, to see available sub-commands\n\n\n\n```bash\n$ stdlib help\n```\n\nand to run the [REPL][@stdlib/repl]\n\n\n\n```bash\n$ stdlib repl\n```\n\nFor distributable bundles for use in browser environments or as shared (\"vendored\") libraries in server environments, see the [`dist`][stdlib-bundles] directory and associated [guide][stdlib-bundles].\n\nOtherwise, to install as a system library, follow the [download][stdlib-development], [configuration][stdlib-development], and [installation][stdlib-development] instructions as described in the [development guide][stdlib-development].\n\n* * *\n\n## Contributing\n\nSee the [contributing guidelines][stdlib-contributing].\n\n## License\n\nSee [LICENSE][stdlib-license].\n\n## Copyright\n\nCopyright © 2016-2020. The Stdlib [Authors][stdlib-authors].\n\n
\n\n\n\n\n\n* * *\n\n
\n\n## Status\n\n[![stability-experimental][stability-image]][stability-url]\n\n#### Version\n\n\n\n[![git tag][tag-image]][tag-url] [![NPM version][npm-image]][npm-url] [![Node.js version][node-image]][node-url]\n\n\n\n#### Build\n\n\n\n\n\n| OS | Build (master) | Coverage (master) | Build (develop) | Coverage (develop) |\n| ---------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |\n| Linux/OS X | [![Linux/OS X build status (master)][build-image-master]][build-url-master] | [![coverage (master)][coverage-image-master]][coverage-url-master] | [![Linux/OS X build status (develop)][build-image-develop]][build-url-develop] | [![coverage (develop)][coverage-image-develop]][coverage-url-develop] |\n| Windows | [![Windows build status (master)][windows-build-image-master]][windows-build-url-master] | [![coverage (master)][coverage-image-master]][coverage-url-master] | [![Windows build status (develop)][windows-build-image-develop]][windows-build-url-develop] | [![coverage (develop)][coverage-image-develop]][coverage-url-develop] |\n\n\n\n#### Dependencies\n\n\n\n[![Dependencies][dependencies-image]][dependencies-url] [![DevDependencies][dev-dependencies-image]][dev-dependencies-url]\n\n\n\n#### Community\n\n[![Chat][chat-image]][chat-url]\n\n
\n\n\n\n\n\n
\n\n
\n\n\n\n\n\n* * *\n\n
\n\n## Acknowledgments\n\n### Build Infrastructure\n\nTest and build infrastructure is generously provided by the following services:\n\n
\n \"Continuous\n
\n
\n\n
\n\n\n\n\n\n
\n\n[stability-image]: https://img.shields.io/badge/stability-experimental-orange.svg\n\n[stability-url]: https://github.com/stdlib-js/stdlib\n\n[npm-image]: https://img.shields.io/npm/v/@stdlib/stdlib.svg\n\n[npm-url]: https://npmjs.org/package/@stdlib/stdlib\n\n[tag-image]: https://img.shields.io/github/tag/stdlib-js/stdlib.svg\n\n[tag-url]: https://github.com/stdlib-js/stdlib/tags\n\n[node-image]: https://img.shields.io/node/v/@stdlib/stdlib.svg\n\n[node-url]: https://github.com/@stdlib-js/stdlib\n\n[build-image-master]: https://img.shields.io/travis/stdlib-js/stdlib/master.svg\n\n[build-url-master]: https://travis-ci.org/stdlib-js/stdlib\n\n[build-image-develop]: https://img.shields.io/travis/stdlib-js/stdlib/develop.svg\n\n[build-url-develop]: https://travis-ci.org/stdlib-js/stdlib\n\n\n\n[windows-build-image-master]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=master&svg=true\n\n[windows-build-url-master]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=master&svg=true\n\n[windows-build-image-develop]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=develop&svg=true\n\n[windows-build-url-develop]: https://ci.appveyor.com/api/projects/status/github/stdlib-js/stdlib?branch=develop&svg=true\n\n[coverage-image-master]: https://img.shields.io/codecov/c/github/stdlib-js/stdlib/master.svg\n\n[coverage-url-master]: https://codecov.io/github/stdlib-js/stdlib/branch/master\n\n[coverage-image-develop]: https://img.shields.io/codecov/c/github/stdlib-js/stdlib/develop.svg\n\n[coverage-url-develop]: https://codecov.io/github/stdlib-js/stdlib/branch/develop\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/stdlib\n\n[dependencies-url]: https://david-dm.org/stdlib-js/stdlib/develop\n\n[dev-dependencies-image]: https://img.shields.io/david/dev/stdlib-js/stdlib\n\n[dev-dependencies-url]: https://david-dm.org/stdlib-js/stdlib/develop?type=dev\n\n[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg\n\n[chat-url]: https://gitter.im/stdlib-js/stdlib/\n\n[make]: https://www.gnu.org/software/make\n\n[bash]: https://www.gnu.org/software/bash/\n\n[curl]: http://curl.haxx.se/\n\n[wget]: http://www.gnu.org/software/wget\n\n[fetch]: http://www.freebsd.org/cgi/man.cgi?fetch%281%29\n\n[node-js]: https://nodejs.org/en/\n\n[npm]: https://www.npmjs.com/\n\n[gcc]: http://gcc.gnu.org/\n\n[clang]: http://clang.llvm.org/\n\n[gfortran]: https://gcc.gnu.org/fortran/\n\n[openblas]: https://github.com/xianyi/OpenBLAS\n\n[electron]: https://electron.atom.io/\n\n[webassembly]: http://webassembly.org/\n\n[node-js-add-ons]: https://nodejs.org/api/addons.html\n\n[browserify]: https://github.com/substack/node-browserify\n\n[webpack]: https://webpack.js.org/\n\n[ipa-english]: https://en.wikipedia.org/wiki/Help:IPA/English\n\n[stdlib-contributing]: https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md\n\n[stdlib-development]: https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md\n\n[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors\n\n[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/stdlib/develop/LICENSE\n\n[stdlib-homepage]: https://github.com/stdlib-js/stdlib\n\n[stdlib-documentation]: https://github.com/stdlib-js/stdlib\n\n[stdlib-faq]: https://github.com/stdlib-js/stdlib/blob/develop/FAQ.md\n\n[stdlib-source]: https://github.com/stdlib-js/stdlib\n\n[stdlib-bundles]: https://github.com/stdlib-js/stdlib/tree/develop/dist\n\n[stdlib-code-coverage]: https://codecov.io/github/stdlib-js/stdlib/branch/develop\n\n[stdlib-twitter]: https://twitter.com/stdlibjs\n\n[stdlib-gitter]: https://gitter.im/stdlib-js/stdlib\n\n[@stdlib/math/base/special]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special\n\n[@stdlib/stats/base/dists]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dists\n\n[@stdlib/random/base]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/random/base\n\n[@stdlib/assert]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert\n\n[@stdlib/datasets]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/datasets\n\n[@stdlib/utils]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils\n\n[@stdlib/plot/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/plot/ctor\n\n[@stdlib/bench/harness]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/bench/harness\n\n[@stdlib/repl]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/repl\n\n
\n\n\n", - "maintainers": [ - { - "name": "kgryte", - "email": "kgryte@gmail.com" - }, - { - "name": "planeshifter", - "email": "pgb@andrew.cmu.edu" - }, - { - "name": "stdlib-bot", - "email": "kgryte@gmail.com" + ] } - ], - "time": { - "modified": "2020-03-12T19:52:29.640Z", - "created": "2016-10-12T06:51:20.600Z", - "0.0.0": "2016-10-12T06:51:20.600Z", - "0.0.2": "2017-04-25T18:44:13.928Z", - "0.0.3": "2017-04-30T00:21:35.096Z", - "0.0.4": "2017-07-27T17:57:36.643Z", - "0.0.5": "2017-08-01T22:39:50.762Z", - "0.0.6": "2017-08-02T22:02:12.782Z", - "0.0.7": "2017-08-03T14:20:14.959Z", - "0.0.8": "2017-08-04T22:49:42.048Z", - "0.0.9": "2017-08-06T15:50:07.130Z", - "0.0.10": "2017-08-11T12:08:08.611Z", - "0.0.11": "2017-08-14T19:30:14.137Z", - "0.0.12": "2017-08-16T19:55:37.908Z", - "0.0.13": "2017-08-20T05:13:39.725Z", - "0.0.14": "2017-08-21T05:44:01.240Z", - "0.0.15": "2017-08-22T04:18:57.566Z", - "0.0.16": "2017-08-25T21:28:23.927Z", - "0.0.17": "2017-09-01T22:16:31.416Z", - "0.0.18": "2017-09-05T09:03:58.058Z", - "0.0.19": "2017-09-06T16:58:07.405Z", - "0.0.20": "2017-09-15T01:55:02.681Z", - "0.0.21": "2017-09-17T22:44:09.507Z", - "0.0.22": "2017-09-17T22:58:37.628Z", - "0.0.23": "2017-09-21T00:28:10.891Z", - "0.0.24": "2017-09-27T05:25:38.086Z", - "0.0.25": "2017-09-28T18:43:09.186Z", - "0.0.26": "2017-10-01T20:28:06.199Z", - "0.0.27": "2017-10-04T07:47:59.512Z", - "0.0.28": "2017-10-04T21:21:50.857Z", - "0.0.29": "2017-10-30T22:52:00.715Z", - "0.0.30": "2017-11-15T17:49:30.317Z", - "0.0.31": "2018-01-25T08:42:50.794Z", - "0.0.32": "2018-02-01T06:15:37.415Z", - "0.0.33": "2018-02-01T22:43:37.172Z", - "0.0.34": "2018-04-01T21:48:04.949Z", - "0.0.35": "2018-04-13T10:08:56.307Z", - "0.0.36": "2018-04-19T14:46:47.232Z", - "0.0.37": "2018-05-03T03:48:00.449Z", - "0.0.38": "2018-05-04T23:49:17.149Z", - "0.0.39": "2018-05-10T22:52:04.741Z", - "0.0.40": "2018-05-11T23:39:29.144Z", - "0.0.41": "2018-06-08T05:11:07.909Z", - "0.0.42": "2018-06-09T22:10:27.389Z", - "0.0.43": "2018-07-11T21:37:47.885Z", - "0.0.44": "2018-10-14T00:51:09.411Z", - "0.0.45": "2018-10-18T02:07:09.244Z", - "0.0.46": "2018-10-23T00:41:29.491Z", - "0.0.47": "2018-10-27T05:53:06.371Z", - "0.0.48": "2018-10-28T08:13:19.404Z", - "0.0.49": "2018-10-29T09:58:26.250Z", - "0.0.50": "2018-11-07T21:42:50.706Z", - "0.0.51": "2018-11-22T06:23:29.674Z", - "0.0.52": "2018-11-24T02:17:37.004Z", - "0.0.53": "2018-12-04T09:31:42.091Z", - "0.0.54": "2018-12-04T11:39:18.467Z", - "0.0.55": "2018-12-04T18:51:18.466Z", - "0.0.56": "2018-12-29T18:28:02.414Z", - "0.0.57": "2019-01-02T01:07:29.572Z", - "0.0.58": "2019-01-11T08:06:31.455Z", - "0.0.59": "2019-02-09T07:36:24.669Z", - "0.0.60": "2019-02-22T03:45:39.412Z", - "0.0.61": "2019-07-27T22:35:39.288Z", - "0.0.62": "2019-07-30T07:30:43.272Z", - "0.0.63": "2019-08-06T02:52:25.375Z", - "0.0.64": "2019-08-09T18:51:07.351Z", - "0.0.65": "2019-08-17T03:09:17.136Z", - "0.0.66": "2019-08-17T17:35:50.561Z", - "0.0.67": "2019-08-20T02:45:52.160Z", - "0.0.69": "2019-08-26T23:28:42.654Z", - "0.0.70": "2019-08-27T00:27:46.407Z", - "0.0.71": "2019-08-27T00:41:33.759Z", - "0.0.72": "2019-08-27T01:20:16.480Z", - "0.0.73": "2019-08-28T23:39:23.422Z", - "0.0.74": "2019-09-01T09:50:09.364Z", - "0.0.75": "2019-09-01T10:05:32.777Z", - "0.0.76": "2019-09-01T19:17:25.007Z", - "0.0.77": "2019-09-04T07:36:03.189Z", - "0.0.78": "2019-09-04T08:02:17.225Z", - "0.0.79": "2019-09-04T18:49:49.770Z", - "0.0.80": "2019-09-04T19:06:24.767Z", - "0.0.81": "2019-09-04T19:16:09.534Z", - "0.0.82": "2019-09-04T19:26:58.279Z", - "0.0.83": "2019-09-04T19:39:25.979Z", - "0.0.84": "2019-09-05T02:35:54.034Z", - "0.0.85": "2019-09-09T23:27:31.388Z", - "0.0.86": "2019-10-14T21:08:22.169Z", - "0.0.87": "2019-10-15T00:23:45.794Z", - "0.0.88": "2019-11-22T02:17:53.912Z", - "0.0.89": "2019-11-22T09:58:29.982Z", - "0.0.90": "2019-11-22T10:19:20.222Z", - "0.0.91": "2020-03-12T19:52:26.792Z" - }, - "homepage": "https://github.com/stdlib-js/stdlib", - "keywords": [ - "stdlib", - "stdlib-js", - "stdlib.js", - "js-stdlib", - "stdlibjs", - "standard", - "std", - "library", - "lib", - "libstd" - ], - "repository": { - "type": "git", - "url": "git://github.com/stdlib-js/stdlib.git" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "bugs": { - "url": "https://github.com/stdlib-js/stdlib/issues" - }, - "license": "Apache-2.0 AND BSL-1.0", - "readmeFilename": "README.md", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "users": { - "planeshifter": true, - "fm-96": true, - "pubudud": true } } diff --git a/services/node/testUtils/test-utils.js b/services/node/testUtils/test-utils.js index dd64aff397864..afddebc3d9154 100644 --- a/services/node/testUtils/test-utils.js +++ b/services/node/testUtils/test-utils.js @@ -35,14 +35,11 @@ const mockPackageData = ( urlPath = `/${packageName}` } packageJson = getTemplate('packageJsonVersionsTemplate') - packageJson.name = packageJson packageJson['dist-tags'][tag || 'latest'] = '0.0.91' - packageJson.versions['0.0.91'].name = packageName packageJson.versions['0.0.91'].engines.node = engines } else { urlPath = `/${packageName}/latest` packageJson = getTemplate('packageJsonTemplate') - packageJson.name = packageName packageJson.engines.node = engines } return nock(registry || 'https://registry.npmjs.org/') From 270486e53465272ee780ad5817fd3f35bd452a17 Mon Sep 17 00:00:00 2001 From: regevbr Date: Thu, 2 Apr 2020 11:48:40 +0300 Subject: [PATCH 12/16] fix: node service has bad colors #4809 --- services/node/node-current.tester.js | 107 ++++++++----- services/node/node-lts.tester.js | 147 +++++++++++------- .../packageJsonVersionsTemplate.json | 2 +- services/node/testUtils/test-utils.js | 6 +- 4 files changed, 158 insertions(+), 104 deletions(-) diff --git a/services/node/node-current.tester.js b/services/node/node-current.tester.js index 50280d5c7810f..792962182e3c7 100644 --- a/services/node/node-current.tester.js +++ b/services/node/node-current.tester.js @@ -15,96 +15,119 @@ function expectSemverRange(message) { t.create('engines satisfies current node version') .get('/passport.json') - .intercept(mockPackageData(`passport`, `>=0.4.0`)) + .intercept( + mockPackageData({ + packageName: 'passport', + engines: '>=0.4.0', + }) + ) .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines not satisfies current node version') .get('/passport.json') - .intercept(mockPackageData(`passport`, `12`)) + .intercept( + mockPackageData({ + packageName: 'passport', + engines: '12', + }) + ) .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `12`, color: `yellow` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies current node version - scoped') .get('/@stdlib/stdlib.json') - .intercept(mockPackageData(`stdlib`, `>=0.4.0`, `@stdlib`)) + .intercept( + mockPackageData({ + packageName: 'stdlib', + engines: '>=0.4.0', + scope: '@stdlib', + tag: '', + registry: '', + }) + ) .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines not satisfies current node version - scoped') .get('/@stdlib/stdlib.json') - .intercept(mockPackageData(`stdlib`, `12`, `@stdlib`)) + .intercept( + mockPackageData({ + packageName: 'stdlib', + engines: '12', + scope: '@stdlib', + tag: '', + registry: '', + }) + ) .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `12`, color: `yellow` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies current node version - tagged') .get('/ionic/next.json') - .intercept(mockPackageData(`ionic`, `>=0.4.0`, undefined, `next`)) + .intercept( + mockPackageData({ + packageName: 'ionic', + engines: '>=0.4.0', + tag: 'next', + }) + ) .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node@next', message: `>=0.4.0`, color: `brightgreen` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines not satisfies current node version - tagged') .get('/ionic/next.json') - .intercept(mockPackageData(`ionic`, `12`, undefined, `next`)) + .intercept( + mockPackageData({ + packageName: 'ionic', + engines: '12', + tag: 'next', + }) + ) .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node@next', message: `12`, color: `yellow` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies current node version - scoped and tagged') .get('/@cycle/core/canary.json') - .intercept(mockPackageData(`core`, `>=0.4.0`, `@cycle`, `canary`)) + .intercept( + mockPackageData({ + packageName: 'core', + engines: '>=0.4.0', + scope: '@cycle', + tag: 'canary', + }) + ) .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node@canary', message: `>=0.4.0`, color: `brightgreen`, }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines not satisfies current node version - scoped and tagged') .get('/@cycle/core/canary.json') - .intercept(mockPackageData(`core`, `12`, `@cycle`, `canary`)) + .intercept( + mockPackageData({ + packageName: 'core', + engines: '12', + scope: '@cycle', + tag: 'canary', + }) + ) .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node@canary', message: `12`, color: `yellow` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies current node version with custom registry') .get('/passport.json?registry_uri=https://registry.npmjs.com') .intercept( - mockPackageData( - `passport`, - `>=0.4.0`, - undefined, - undefined, - 'https://registry.npmjs.com' - ) + mockPackageData({ + packageName: 'passport', + engines: '>=0.4.0', + registry: 'https://registry.npmjs.com', + }) ) .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('invalid package name') .get('/frodo-is-not-a-package.json') diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index dbb607dd39ffd..ca3d2e89c764f 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -17,148 +17,179 @@ function expectSemverRange(message) { t.create('engines satisfies all lts node versions') .get('/passport.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`passport`, `10 - 12`)) + .intercept( + mockPackageData({ + packageName: 'passport', + engines: '10 - 12', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts', message: `10 - 12`, color: `brightgreen` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines not satisfies all lts node versions') .get('/passport.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`passport`, `8`)) + .intercept( + mockPackageData({ + packageName: 'passport', + engines: '8', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts', message: `8`, color: `orange` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies some lts node versions') .get('/passport.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`passport`, `10`)) + .intercept( + mockPackageData({ + packageName: 'passport', + engines: '10', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts', message: `10`, color: `yellow` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies all lts node versions - scoped') .get('/@stdlib/stdlib.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`stdlib`, `10 - 12`, `@stdlib`)) + .intercept( + mockPackageData({ + packageName: 'stdlib', + engines: '10 - 12', + scope: '@stdlib', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts', message: `10 - 12`, color: `brightgreen` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines not satisfies all lts node versions - scoped') .get('/@stdlib/stdlib.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`stdlib`, `8`, `@stdlib`)) + .intercept( + mockPackageData({ + packageName: 'stdlib', + engines: '8', + scope: '@stdlib', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts', message: `8`, color: `orange` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies some lts node versions - scoped') .get('/@stdlib/stdlib.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`stdlib`, `10`, `@stdlib`)) + .intercept( + mockPackageData({ + packageName: 'stdlib', + engines: '10', + scope: '@stdlib', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts', message: `10`, color: `yellow` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies all lts node versions - tagged') .get('/ionic/next.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`ionic`, `10 - 12`, undefined, `next`)) + .intercept( + mockPackageData({ + packageName: 'ionic', + engines: '10 - 12', + tag: 'next', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts@next', message: `10 - 12`, color: `brightgreen`, }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines not satisfies all lts node versions - tagged') .get('/ionic/next.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`ionic`, `8`, undefined, `next`)) + .intercept( + mockPackageData({ + packageName: 'ionic', + engines: '8', + tag: 'next', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts@next', message: `8`, color: `orange` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies some lts node versions - tagged') .get('/ionic/next.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`ionic`, `10`, undefined, `next`)) + .intercept( + mockPackageData({ + packageName: 'ionic', + engines: '10', + tag: 'next', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts@next', message: `10`, color: `yellow` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies all lts node versions - scoped and tagged') .get('/@cycle/core/canary.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`core`, `10 - 12`, `@cycle`, `canary`)) + .intercept( + mockPackageData({ + packageName: 'core', + engines: '10 - 12', + scope: '@cycle', + tag: 'canary', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts@canary', message: `10 - 12`, color: `brightgreen`, }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines not satisfies all lts node versions - scoped and tagged') .get('/@cycle/core/canary.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`core`, `8`, `@cycle`, `canary`)) + .intercept( + mockPackageData({ + packageName: 'core', + engines: '8', + scope: '@cycle', + tag: 'canary', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts@canary', message: `8`, color: `orange` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies some lts node versions - scoped and tagged') .get('/@cycle/core/canary.json') .intercept(mockReleaseSchedule()) - .intercept(mockPackageData(`core`, `10`, `@cycle`, `canary`)) + .intercept( + mockPackageData({ + packageName: 'core', + engines: '10', + scope: '@cycle', + tag: 'canary', + }) + ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts@canary', message: `10`, color: `yellow` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('engines satisfies all lts node versions with custom registry') .get('/passport.json?registry_uri=https://registry.npmjs.com') .intercept(mockReleaseSchedule()) .intercept( - mockPackageData( - `passport`, - `10 - 12`, - undefined, - undefined, - 'https://registry.npmjs.com' - ) + mockPackageData({ + packageName: 'passport', + engines: '10 - 12', + registry: 'https://registry.npmjs.com', + }) ) .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts', message: `10 - 12`, color: `brightgreen` }) - .afterJSON(json => { - expectSemverRange(json.message) - }) t.create('invalid package name') .get('/frodo-is-not-a-package.json') diff --git a/services/node/testUtils/packageJsonVersionsTemplate.json b/services/node/testUtils/packageJsonVersionsTemplate.json index 02601d82e2323..818c864975af4 100644 --- a/services/node/testUtils/packageJsonVersionsTemplate.json +++ b/services/node/testUtils/packageJsonVersionsTemplate.json @@ -14,7 +14,7 @@ } ] }, - "0.0.91":{ + "0.0.91": { "engines": { "node": ">= 0.4.0" }, diff --git a/services/node/testUtils/test-utils.js b/services/node/testUtils/test-utils.js index afddebc3d9154..d83c561e56edf 100644 --- a/services/node/testUtils/test-utils.js +++ b/services/node/testUtils/test-utils.js @@ -19,13 +19,13 @@ const templates = { const getTemplate = template => JSON.parse(templates[template]) -const mockPackageData = ( +const mockPackageData = ({ packageName, engines, scope, tag, - registry -) => nock => { + registry, +}) => nock => { let packageJson let urlPath if (scope || tag) { From 0367c6a8fd01ac1d9f3a449656ded1fe4ab3f8e8 Mon Sep 17 00:00:00 2001 From: regevbr Date: Thu, 2 Apr 2020 12:03:44 +0300 Subject: [PATCH 13/16] fix: node service has bad colors #4809 --- services/node/node-current.tester.js | 55 ++++++++++++++++++++++++--- services/node/node-lts.tester.js | 57 +++++++++++++++++++++++----- 2 files changed, 97 insertions(+), 15 deletions(-) diff --git a/services/node/node-current.tester.js b/services/node/node-current.tester.js index 792962182e3c7..cca879d78e4fa 100644 --- a/services/node/node-current.tester.js +++ b/services/node/node-current.tester.js @@ -13,6 +13,13 @@ function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() } +t.create('gets the node version of passport - live') + .get('/passport.json') + .expectBadge({ label: 'node' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + t.create('engines satisfies current node version') .get('/passport.json') .intercept( @@ -35,6 +42,13 @@ t.create('engines not satisfies current node version') .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `12`, color: `yellow` }) +t.create('gets the node version of @stdlib/stdlib - live') + .get('/@stdlib/stdlib.json') + .expectBadge({ label: 'node' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + t.create('engines satisfies current node version - scoped') .get('/@stdlib/stdlib.json') .intercept( @@ -63,29 +77,47 @@ t.create('engines not satisfies current node version - scoped') .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `12`, color: `yellow` }) +t.create("gets the tagged release's node version version of ionic - live") + .get('/ionic/testing.json') + .expectBadge({ label: 'node@testing' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + t.create('engines satisfies current node version - tagged') - .get('/ionic/next.json') + .get('/ionic/testing.json') .intercept( mockPackageData({ packageName: 'ionic', engines: '>=0.4.0', - tag: 'next', + tag: 'testing', }) ) .intercept(mockCurrentSha(13)) - .expectBadge({ label: 'node@next', message: `>=0.4.0`, color: `brightgreen` }) + .expectBadge({ + label: 'node@testing', + message: `>=0.4.0`, + color: `brightgreen`, + }) t.create('engines not satisfies current node version - tagged') - .get('/ionic/next.json') + .get('/ionic/testing.json') .intercept( mockPackageData({ packageName: 'ionic', engines: '12', - tag: 'next', + tag: 'testing', }) ) .intercept(mockCurrentSha(13)) - .expectBadge({ label: 'node@next', message: `12`, color: `yellow` }) + .expectBadge({ label: 'node@testing', message: `12`, color: `yellow` }) + +t.create("gets the tagged release's node version of @cycle/core - live") + .get('/@cycle/core/canary.json') + .expectBadge({ label: 'node@canary' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) t.create('engines satisfies current node version - scoped and tagged') .get('/@cycle/core/canary.json') @@ -117,6 +149,13 @@ t.create('engines not satisfies current node version - scoped and tagged') .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node@canary', message: `12`, color: `yellow` }) +t.create('gets the node version of passport from a custom registry - live') + .get('/passport.json?registry_uri=https://registry.npmjs.com') + .expectBadge({ label: 'node' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + t.create('engines satisfies current node version with custom registry') .get('/passport.json?registry_uri=https://registry.npmjs.com') .intercept( @@ -129,6 +168,10 @@ t.create('engines satisfies current node version with custom registry') .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) +t.create('invalid package name - live') + .get('/frodo-is-not-a-package.json') + .expectBadge({ label: 'node', message: 'package not found' }) + t.create('invalid package name') .get('/frodo-is-not-a-package.json') .intercept(mockNonExistingPackageData(`frodo-is-not-a-package`)) diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index ca3d2e89c764f..2b572c3f210eb 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -14,6 +14,13 @@ function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() } +t.create('gets the node version of passport - live') + .get('/passport.json') + .expectBadge({ label: 'node lts' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + t.create('engines satisfies all lts node versions') .get('/passport.json') .intercept(mockReleaseSchedule()) @@ -50,6 +57,13 @@ t.create('engines satisfies some lts node versions') .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts', message: `10`, color: `yellow` }) +t.create('gets the node version of @stdlib/stdlib - live') + .get('/@stdlib/stdlib.json') + .expectBadge({ label: 'node lts' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + t.create('engines satisfies all lts node versions - scoped') .get('/@stdlib/stdlib.json') .intercept(mockReleaseSchedule()) @@ -89,48 +103,62 @@ t.create('engines satisfies some lts node versions - scoped') .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts', message: `10`, color: `yellow` }) +t.create("gets the tagged release's node version version of ionic - live") + .get('/ionic/testing.json') + .expectBadge({ label: 'node lts@testing' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + t.create('engines satisfies all lts node versions - tagged') - .get('/ionic/next.json') + .get('/ionic/testing.json') .intercept(mockReleaseSchedule()) .intercept( mockPackageData({ packageName: 'ionic', engines: '10 - 12', - tag: 'next', + tag: 'testing', }) ) .intercept(mockVersionsSha()) .expectBadge({ - label: 'node lts@next', + label: 'node lts@testing', message: `10 - 12`, color: `brightgreen`, }) t.create('engines not satisfies all lts node versions - tagged') - .get('/ionic/next.json') + .get('/ionic/testing.json') .intercept(mockReleaseSchedule()) .intercept( mockPackageData({ packageName: 'ionic', engines: '8', - tag: 'next', + tag: 'testing', }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts@next', message: `8`, color: `orange` }) + .expectBadge({ label: 'node lts@testing', message: `8`, color: `orange` }) t.create('engines satisfies some lts node versions - tagged') - .get('/ionic/next.json') + .get('/ionic/testing.json') .intercept(mockReleaseSchedule()) .intercept( mockPackageData({ packageName: 'ionic', engines: '10', - tag: 'next', + tag: 'testing', }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts@next', message: `10`, color: `yellow` }) + .expectBadge({ label: 'node lts@testing', message: `10`, color: `yellow` }) + +t.create("gets the tagged release's node version of @cycle/core - live") + .get('/@cycle/core/canary.json') + .expectBadge({ label: 'node lts@canary' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) t.create('engines satisfies all lts node versions - scoped and tagged') .get('/@cycle/core/canary.json') @@ -178,6 +206,13 @@ t.create('engines satisfies some lts node versions - scoped and tagged') .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts@canary', message: `10`, color: `yellow` }) +t.create('gets the node version of passport from a custom registry - live') + .get('/passport.json?registry_uri=https://registry.npmjs.com') + .expectBadge({ label: 'node lts' }) + .afterJSON(json => { + expectSemverRange(json.message) + }) + t.create('engines satisfies all lts node versions with custom registry') .get('/passport.json?registry_uri=https://registry.npmjs.com') .intercept(mockReleaseSchedule()) @@ -191,6 +226,10 @@ t.create('engines satisfies all lts node versions with custom registry') .intercept(mockVersionsSha()) .expectBadge({ label: 'node lts', message: `10 - 12`, color: `brightgreen` }) +t.create('invalid package name - live') + .get('/frodo-is-not-a-package.json') + .expectBadge({ label: 'node lts', message: 'package not found' }) + t.create('invalid package name') .get('/frodo-is-not-a-package.json') .intercept(mockNonExistingPackageData(`frodo-is-not-a-package`)) From 956ee767ff04368f9d659fea47f61211632fff6a Mon Sep 17 00:00:00 2001 From: regevbr Date: Thu, 2 Apr 2020 13:02:23 +0300 Subject: [PATCH 14/16] fix: node service has bad colors #4809 --- services/node/node-lts.service.js | 2 +- services/node/node-lts.spec.js | 2 +- services/node/node-lts.tester.js | 40 +++++++++++++++---------------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/services/node/node-lts.service.js b/services/node/node-lts.service.js index fc033b6238abc..73477191eb36d 100644 --- a/services/node/node-lts.service.js +++ b/services/node/node-lts.service.js @@ -9,7 +9,7 @@ module.exports = class NodeLtsVersion extends NodeVersionBase { } static get defaultBadgeData() { - return { label: 'node lts' } + return { label: 'node-lts' } } static get type() { diff --git a/services/node/node-lts.spec.js b/services/node/node-lts.spec.js index 08e8d2bc1d4b5..7dfc5ad0bc8cd 100644 --- a/services/node/node-lts.spec.js +++ b/services/node/node-lts.spec.js @@ -3,7 +3,7 @@ const { test, given } = require('sazerac') const NodeVersion = require('./node-lts.service') -describe('node lts renderStaticPreview', function() { +describe('node-lts renderStaticPreview', function() { it('should have parity with render()', async function() { const nodeVersionRange = '>= 6.0.0' diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index 2b572c3f210eb..be958cfd2e555 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -16,7 +16,7 @@ function expectSemverRange(message) { t.create('gets the node version of passport - live') .get('/passport.json') - .expectBadge({ label: 'node lts' }) + .expectBadge({ label: 'node-lts' }) .afterJSON(json => { expectSemverRange(json.message) }) @@ -31,7 +31,7 @@ t.create('engines satisfies all lts node versions') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts', message: `10 - 12`, color: `brightgreen` }) + .expectBadge({ label: 'node-lts', message: `10 - 12`, color: `brightgreen` }) t.create('engines not satisfies all lts node versions') .get('/passport.json') @@ -43,7 +43,7 @@ t.create('engines not satisfies all lts node versions') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts', message: `8`, color: `orange` }) + .expectBadge({ label: 'node-lts', message: `8`, color: `orange` }) t.create('engines satisfies some lts node versions') .get('/passport.json') @@ -55,11 +55,11 @@ t.create('engines satisfies some lts node versions') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts', message: `10`, color: `yellow` }) + .expectBadge({ label: 'node-lts', message: `10`, color: `yellow` }) t.create('gets the node version of @stdlib/stdlib - live') .get('/@stdlib/stdlib.json') - .expectBadge({ label: 'node lts' }) + .expectBadge({ label: 'node-lts' }) .afterJSON(json => { expectSemverRange(json.message) }) @@ -75,7 +75,7 @@ t.create('engines satisfies all lts node versions - scoped') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts', message: `10 - 12`, color: `brightgreen` }) + .expectBadge({ label: 'node-lts', message: `10 - 12`, color: `brightgreen` }) t.create('engines not satisfies all lts node versions - scoped') .get('/@stdlib/stdlib.json') @@ -88,7 +88,7 @@ t.create('engines not satisfies all lts node versions - scoped') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts', message: `8`, color: `orange` }) + .expectBadge({ label: 'node-lts', message: `8`, color: `orange` }) t.create('engines satisfies some lts node versions - scoped') .get('/@stdlib/stdlib.json') @@ -101,11 +101,11 @@ t.create('engines satisfies some lts node versions - scoped') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts', message: `10`, color: `yellow` }) + .expectBadge({ label: 'node-lts', message: `10`, color: `yellow` }) t.create("gets the tagged release's node version version of ionic - live") .get('/ionic/testing.json') - .expectBadge({ label: 'node lts@testing' }) + .expectBadge({ label: 'node-lts@testing' }) .afterJSON(json => { expectSemverRange(json.message) }) @@ -122,7 +122,7 @@ t.create('engines satisfies all lts node versions - tagged') ) .intercept(mockVersionsSha()) .expectBadge({ - label: 'node lts@testing', + label: 'node-lts@testing', message: `10 - 12`, color: `brightgreen`, }) @@ -138,7 +138,7 @@ t.create('engines not satisfies all lts node versions - tagged') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts@testing', message: `8`, color: `orange` }) + .expectBadge({ label: 'node-lts@testing', message: `8`, color: `orange` }) t.create('engines satisfies some lts node versions - tagged') .get('/ionic/testing.json') @@ -151,11 +151,11 @@ t.create('engines satisfies some lts node versions - tagged') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts@testing', message: `10`, color: `yellow` }) + .expectBadge({ label: 'node-lts@testing', message: `10`, color: `yellow` }) t.create("gets the tagged release's node version of @cycle/core - live") .get('/@cycle/core/canary.json') - .expectBadge({ label: 'node lts@canary' }) + .expectBadge({ label: 'node-lts@canary' }) .afterJSON(json => { expectSemverRange(json.message) }) @@ -173,7 +173,7 @@ t.create('engines satisfies all lts node versions - scoped and tagged') ) .intercept(mockVersionsSha()) .expectBadge({ - label: 'node lts@canary', + label: 'node-lts@canary', message: `10 - 12`, color: `brightgreen`, }) @@ -190,7 +190,7 @@ t.create('engines not satisfies all lts node versions - scoped and tagged') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts@canary', message: `8`, color: `orange` }) + .expectBadge({ label: 'node-lts@canary', message: `8`, color: `orange` }) t.create('engines satisfies some lts node versions - scoped and tagged') .get('/@cycle/core/canary.json') @@ -204,11 +204,11 @@ t.create('engines satisfies some lts node versions - scoped and tagged') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts@canary', message: `10`, color: `yellow` }) + .expectBadge({ label: 'node-lts@canary', message: `10`, color: `yellow` }) t.create('gets the node version of passport from a custom registry - live') .get('/passport.json?registry_uri=https://registry.npmjs.com') - .expectBadge({ label: 'node lts' }) + .expectBadge({ label: 'node-lts' }) .afterJSON(json => { expectSemverRange(json.message) }) @@ -224,13 +224,13 @@ t.create('engines satisfies all lts node versions with custom registry') }) ) .intercept(mockVersionsSha()) - .expectBadge({ label: 'node lts', message: `10 - 12`, color: `brightgreen` }) + .expectBadge({ label: 'node-lts', message: `10 - 12`, color: `brightgreen` }) t.create('invalid package name - live') .get('/frodo-is-not-a-package.json') - .expectBadge({ label: 'node lts', message: 'package not found' }) + .expectBadge({ label: 'node-lts', message: 'package not found' }) t.create('invalid package name') .get('/frodo-is-not-a-package.json') .intercept(mockNonExistingPackageData(`frodo-is-not-a-package`)) - .expectBadge({ label: 'node lts', message: 'package not found' }) + .expectBadge({ label: 'node-lts', message: 'package not found' }) From 44b5f4ad1ab701fd95a3b1bd9daba0035e70832f Mon Sep 17 00:00:00 2001 From: regevbr Date: Fri, 3 Apr 2020 12:49:27 +0300 Subject: [PATCH 15/16] fix: node service has bad colors #4809 --- services/node/node-current.tester.js | 33 +++++---------------------- services/node/node-lts.tester.js | 29 ++++------------------- services/node/testUtils/test-utils.js | 16 ++----------- 3 files changed, 13 insertions(+), 65 deletions(-) diff --git a/services/node/node-current.tester.js b/services/node/node-current.tester.js index cca879d78e4fa..54abe4012c2d3 100644 --- a/services/node/node-current.tester.js +++ b/services/node/node-current.tester.js @@ -3,17 +3,13 @@ const { expect } = require('chai') const { Range } = require('semver') const t = (module.exports = require('../tester').createServiceTester()) -const { - mockPackageData, - mockCurrentSha, - mockNonExistingPackageData, -} = require('./testUtils/test-utils') +const { mockPackageData, mockCurrentSha } = require('./testUtils/test-utils') function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() } -t.create('gets the node version of passport - live') +t.create('gets the node version of passport') .get('/passport.json') .expectBadge({ label: 'node' }) .afterJSON(json => { @@ -42,7 +38,7 @@ t.create('engines not satisfies current node version') .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `12`, color: `yellow` }) -t.create('gets the node version of @stdlib/stdlib - live') +t.create('gets the node version of @stdlib/stdlib') .get('/@stdlib/stdlib.json') .expectBadge({ label: 'node' }) .afterJSON(json => { @@ -77,7 +73,7 @@ t.create('engines not satisfies current node version - scoped') .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `12`, color: `yellow` }) -t.create("gets the tagged release's node version version of ionic - live") +t.create("gets the tagged release's node version version of ionic") .get('/ionic/testing.json') .expectBadge({ label: 'node@testing' }) .afterJSON(json => { @@ -112,7 +108,7 @@ t.create('engines not satisfies current node version - tagged') .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node@testing', message: `12`, color: `yellow` }) -t.create("gets the tagged release's node version of @cycle/core - live") +t.create("gets the tagged release's node version of @cycle/core") .get('/@cycle/core/canary.json') .expectBadge({ label: 'node@canary' }) .afterJSON(json => { @@ -149,30 +145,13 @@ t.create('engines not satisfies current node version - scoped and tagged') .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node@canary', message: `12`, color: `yellow` }) -t.create('gets the node version of passport from a custom registry - live') +t.create('gets the node version of passport from a custom registry') .get('/passport.json?registry_uri=https://registry.npmjs.com') .expectBadge({ label: 'node' }) .afterJSON(json => { expectSemverRange(json.message) }) -t.create('engines satisfies current node version with custom registry') - .get('/passport.json?registry_uri=https://registry.npmjs.com') - .intercept( - mockPackageData({ - packageName: 'passport', - engines: '>=0.4.0', - registry: 'https://registry.npmjs.com', - }) - ) - .intercept(mockCurrentSha(13)) - .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) - -t.create('invalid package name - live') - .get('/frodo-is-not-a-package.json') - .expectBadge({ label: 'node', message: 'package not found' }) - t.create('invalid package name') .get('/frodo-is-not-a-package.json') - .intercept(mockNonExistingPackageData(`frodo-is-not-a-package`)) .expectBadge({ label: 'node', message: 'package not found' }) diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index be958cfd2e555..b5f904e1eff1e 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -5,7 +5,6 @@ const { Range } = require('semver') const t = (module.exports = require('../tester').createServiceTester()) const { mockPackageData, - mockNonExistingPackageData, mockReleaseSchedule, mockVersionsSha, } = require('./testUtils/test-utils') @@ -14,7 +13,7 @@ function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() } -t.create('gets the node version of passport - live') +t.create('gets the node version of passport') .get('/passport.json') .expectBadge({ label: 'node-lts' }) .afterJSON(json => { @@ -57,7 +56,7 @@ t.create('engines satisfies some lts node versions') .intercept(mockVersionsSha()) .expectBadge({ label: 'node-lts', message: `10`, color: `yellow` }) -t.create('gets the node version of @stdlib/stdlib - live') +t.create('gets the node version of @stdlib/stdlib') .get('/@stdlib/stdlib.json') .expectBadge({ label: 'node-lts' }) .afterJSON(json => { @@ -103,7 +102,7 @@ t.create('engines satisfies some lts node versions - scoped') .intercept(mockVersionsSha()) .expectBadge({ label: 'node-lts', message: `10`, color: `yellow` }) -t.create("gets the tagged release's node version version of ionic - live") +t.create("gets the tagged release's node version version of ionic") .get('/ionic/testing.json') .expectBadge({ label: 'node-lts@testing' }) .afterJSON(json => { @@ -153,7 +152,7 @@ t.create('engines satisfies some lts node versions - tagged') .intercept(mockVersionsSha()) .expectBadge({ label: 'node-lts@testing', message: `10`, color: `yellow` }) -t.create("gets the tagged release's node version of @cycle/core - live") +t.create("gets the tagged release's node version of @cycle/core") .get('/@cycle/core/canary.json') .expectBadge({ label: 'node-lts@canary' }) .afterJSON(json => { @@ -206,31 +205,13 @@ t.create('engines satisfies some lts node versions - scoped and tagged') .intercept(mockVersionsSha()) .expectBadge({ label: 'node-lts@canary', message: `10`, color: `yellow` }) -t.create('gets the node version of passport from a custom registry - live') +t.create('gets the node version of passport from a custom registry') .get('/passport.json?registry_uri=https://registry.npmjs.com') .expectBadge({ label: 'node-lts' }) .afterJSON(json => { expectSemverRange(json.message) }) -t.create('engines satisfies all lts node versions with custom registry') - .get('/passport.json?registry_uri=https://registry.npmjs.com') - .intercept(mockReleaseSchedule()) - .intercept( - mockPackageData({ - packageName: 'passport', - engines: '10 - 12', - registry: 'https://registry.npmjs.com', - }) - ) - .intercept(mockVersionsSha()) - .expectBadge({ label: 'node-lts', message: `10 - 12`, color: `brightgreen` }) - -t.create('invalid package name - live') - .get('/frodo-is-not-a-package.json') - .expectBadge({ label: 'node-lts', message: 'package not found' }) - t.create('invalid package name') .get('/frodo-is-not-a-package.json') - .intercept(mockNonExistingPackageData(`frodo-is-not-a-package`)) .expectBadge({ label: 'node-lts', message: 'package not found' }) diff --git a/services/node/testUtils/test-utils.js b/services/node/testUtils/test-utils.js index d83c561e56edf..bc0512539d519 100644 --- a/services/node/testUtils/test-utils.js +++ b/services/node/testUtils/test-utils.js @@ -19,13 +19,7 @@ const templates = { const getTemplate = template => JSON.parse(templates[template]) -const mockPackageData = ({ - packageName, - engines, - scope, - tag, - registry, -}) => nock => { +const mockPackageData = ({ packageName, engines, scope, tag }) => nock => { let packageJson let urlPath if (scope || tag) { @@ -42,16 +36,11 @@ const mockPackageData = ({ packageJson = getTemplate('packageJsonTemplate') packageJson.engines.node = engines } - return nock(registry || 'https://registry.npmjs.org/') + return nock('https://registry.npmjs.org/') .get(urlPath) .reply(200, packageJson) } -const mockNonExistingPackageData = packageName => nock => - nock('https://registry.npmjs.org/') - .get(`/${packageName}/latest`) - .reply(404) - const mockCurrentSha = latestVersion => nock => { const latestSha = `node-v${latestVersion}.12.0-aix-ppc64.tar.gz` return nock('https://nodejs.org/dist/') @@ -173,7 +162,6 @@ const mockReleaseSchedule = () => nock => { } module.exports = { - mockNonExistingPackageData, mockPackageData, mockCurrentSha, mockVersionsSha, From 80afde5bfdbba07062f4747d9c53a084d2f9398d Mon Sep 17 00:00:00 2001 From: Caleb Cartwright Date: Sat, 4 Apr 2020 21:05:40 -0500 Subject: [PATCH 16/16] chore: minor service test rename --- services/node/node-current.tester.js | 8 ++++---- services/node/node-lts.tester.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/services/node/node-current.tester.js b/services/node/node-current.tester.js index 54abe4012c2d3..b9ae1d9e55cb1 100644 --- a/services/node/node-current.tester.js +++ b/services/node/node-current.tester.js @@ -27,7 +27,7 @@ t.create('engines satisfies current node version') .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) -t.create('engines not satisfies current node version') +t.create('engines does not satisfy current node version') .get('/passport.json') .intercept( mockPackageData({ @@ -59,7 +59,7 @@ t.create('engines satisfies current node version - scoped') .intercept(mockCurrentSha(13)) .expectBadge({ label: 'node', message: `>=0.4.0`, color: `brightgreen` }) -t.create('engines not satisfies current node version - scoped') +t.create('engines does not satisfy current node version - scoped') .get('/@stdlib/stdlib.json') .intercept( mockPackageData({ @@ -96,7 +96,7 @@ t.create('engines satisfies current node version - tagged') color: `brightgreen`, }) -t.create('engines not satisfies current node version - tagged') +t.create('engines does not satisfy current node version - tagged') .get('/ionic/testing.json') .intercept( mockPackageData({ @@ -132,7 +132,7 @@ t.create('engines satisfies current node version - scoped and tagged') color: `brightgreen`, }) -t.create('engines not satisfies current node version - scoped and tagged') +t.create('engines does not satisfy current node version - scoped and tagged') .get('/@cycle/core/canary.json') .intercept( mockPackageData({ diff --git a/services/node/node-lts.tester.js b/services/node/node-lts.tester.js index b5f904e1eff1e..f2d47331fee54 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -32,7 +32,7 @@ t.create('engines satisfies all lts node versions') .intercept(mockVersionsSha()) .expectBadge({ label: 'node-lts', message: `10 - 12`, color: `brightgreen` }) -t.create('engines not satisfies all lts node versions') +t.create('engines does not satisfy all lts node versions') .get('/passport.json') .intercept(mockReleaseSchedule()) .intercept( @@ -76,7 +76,7 @@ t.create('engines satisfies all lts node versions - scoped') .intercept(mockVersionsSha()) .expectBadge({ label: 'node-lts', message: `10 - 12`, color: `brightgreen` }) -t.create('engines not satisfies all lts node versions - scoped') +t.create('engines does not satisfy all lts node versions - scoped') .get('/@stdlib/stdlib.json') .intercept(mockReleaseSchedule()) .intercept( @@ -126,7 +126,7 @@ t.create('engines satisfies all lts node versions - tagged') color: `brightgreen`, }) -t.create('engines not satisfies all lts node versions - tagged') +t.create('engines does not satisfy all lts node versions - tagged') .get('/ionic/testing.json') .intercept(mockReleaseSchedule()) .intercept( @@ -177,7 +177,7 @@ t.create('engines satisfies all lts node versions - scoped and tagged') color: `brightgreen`, }) -t.create('engines not satisfies all lts node versions - scoped and tagged') +t.create('engines does not satisfy all lts node versions - scoped and tagged') .get('/@cycle/core/canary.json') .intercept(mockReleaseSchedule()) .intercept(