From f99b272e2c9e8476851faff24c858044927f9428 Mon Sep 17 00:00:00 2001
From: PyvesB
@@ -54,7 +52,7 @@ const AmoLegacyRedirect = redirector({
dateAdded: new Date('2019-02-23'),
})
-module.exports = {
+export default {
AmoWeeklyDownloads,
AmoLegacyRedirect,
-}
+};
diff --git a/services/amo/amo-downloads.tester.js b/services/amo/amo-downloads.tester.js
index 9ad91c29056be..377c34b6000de 100644
--- a/services/amo/amo-downloads.tester.js
+++ b/services/amo/amo-downloads.tester.js
@@ -1,12 +1,8 @@
-'use strict'
-
-const { ServiceTester } = require('../tester')
-const { isMetricOverTimePeriod } = require('../test-validators')
-const t = (module.exports = new ServiceTester({
- id: 'AmoDownloads',
- title: 'AmoDownloads',
- pathPrefix: '/amo',
-}))
+import {ServiceTester} from '../tester.js';
+import {isMetricOverTimePeriod} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Weekly Downloads')
.get('/dw/duckduckgo-for-firefox.json')
diff --git a/services/amo/amo-rating.service.js b/services/amo/amo-rating.service.js
index 9943176473f7e..03612d2f5e9d9 100644
--- a/services/amo/amo-rating.service.js
+++ b/services/amo/amo-rating.service.js
@@ -1,10 +1,8 @@
-'use strict'
+import {starRating} from '../text-formatters.js';
+import {floorCount as floorCountColor} from '../color-formatters.js';
+import {BaseAmoService, keywords} from './amo-base.js';
-const { starRating } = require('../text-formatters')
-const { floorCount: floorCountColor } = require('../color-formatters')
-const { BaseAmoService, keywords } = require('./amo-base')
-
-module.exports = class AmoRating extends BaseAmoService {
+export default class AmoRating extends BaseAmoService {
static category = 'rating'
static route = { base: 'amo', pattern: ':format(stars|rating)/:addonId' }
@@ -38,4 +36,4 @@ module.exports = class AmoRating extends BaseAmoService {
const data = await this.fetch({ addonId })
return this.constructor.render({ format, rating: data.ratings.average })
}
-}
+};
diff --git a/services/amo/amo-rating.tester.js b/services/amo/amo-rating.tester.js
index f17a90656f67e..04e39629be28e 100644
--- a/services/amo/amo-rating.tester.js
+++ b/services/amo/amo-rating.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { isStarRating } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+import {isStarRating} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Rating')
.get('/rating/IndieGala-Helper.json')
diff --git a/services/amo/amo-users.service.js b/services/amo/amo-users.service.js
index 91a774279b16b..a1364812c8c90 100644
--- a/services/amo/amo-users.service.js
+++ b/services/amo/amo-users.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import {metric} from '../text-formatters.js';
+import {BaseAmoService, keywords} from './amo-base.js';
-const { metric } = require('../text-formatters')
-const { BaseAmoService, keywords } = require('./amo-base')
-
-module.exports = class AmoUsers extends BaseAmoService {
+export default class AmoUsers extends BaseAmoService {
static category = 'downloads'
static route = { base: 'amo/users', pattern: ':addonId' }
@@ -29,4 +27,4 @@ module.exports = class AmoUsers extends BaseAmoService {
const data = await this.fetch({ addonId })
return this.constructor.render({ users: data.average_daily_users })
}
-}
+};
diff --git a/services/amo/amo-users.tester.js b/services/amo/amo-users.tester.js
index a0f168ad0fa37..9807e5b107aa2 100644
--- a/services/amo/amo-users.tester.js
+++ b/services/amo/amo-users.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Users')
.get('/IndieGala-Helper.json')
diff --git a/services/amo/amo-version.service.js b/services/amo/amo-version.service.js
index 33bf27b85c5c8..7c8f6fdfca6dc 100644
--- a/services/amo/amo-version.service.js
+++ b/services/amo/amo-version.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import {renderVersionBadge} from '../version.js';
+import {BaseAmoService, keywords} from './amo-base.js';
-const { renderVersionBadge } = require('../version')
-const { BaseAmoService, keywords } = require('./amo-base')
-
-module.exports = class AmoVersion extends BaseAmoService {
+export default class AmoVersion extends BaseAmoService {
static category = 'version'
static route = { base: 'amo/v', pattern: ':addonId' }
@@ -20,4 +18,4 @@ module.exports = class AmoVersion extends BaseAmoService {
const data = await this.fetch({ addonId })
return renderVersionBadge({ version: data.current_version.version })
}
-}
+};
diff --git a/services/amo/amo-version.tester.js b/services/amo/amo-version.tester.js
index 9f63c1b0b0e64..4ed9375411036 100644
--- a/services/amo/amo-version.tester.js
+++ b/services/amo/amo-version.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isVPlusDottedVersionAtLeastOne } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Version').get('/IndieGala-Helper.json').expectBadge({
label: 'mozilla add-on',
diff --git a/services/ansible/ansible-quality.service.js b/services/ansible/ansible-quality.service.js
index 43da34f60d477..2082dbabbe757 100644
--- a/services/ansible/ansible-quality.service.js
+++ b/services/ansible/ansible-quality.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { floorCount } = require('../color-formatters')
-const { BaseJsonService, InvalidResponse } = require('..')
+import Joi from 'joi';
+import {floorCount} from '../color-formatters.js';
+import {BaseJsonService, InvalidResponse} from '..';
const ansibleContentSchema = Joi.object({
quality_score: Joi.number().allow(null).required(),
@@ -18,7 +16,7 @@ class AnsibleGalaxyContent extends BaseJsonService {
}
}
-module.exports = class AnsibleGalaxyContentQualityScore extends (
+export default class AnsibleGalaxyContentQualityScore extends (
AnsibleGalaxyContent
) {
static category = 'analysis'
@@ -54,4 +52,4 @@ module.exports = class AnsibleGalaxyContentQualityScore extends (
return this.constructor.render({ qualityScore })
}
-}
+};
diff --git a/services/ansible/ansible-quality.tester.js b/services/ansible/ansible-quality.tester.js
index f9dd14a4d611b..e29aef04eea07 100644
--- a/services/ansible/ansible-quality.tester.js
+++ b/services/ansible/ansible-quality.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { nonNegativeInteger } = require('../validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {nonNegativeInteger} from '../validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('quality score (valid)')
.get('/432.json')
diff --git a/services/ansible/ansible-role.service.js b/services/ansible/ansible-role.service.js
index c447859782cb6..3ce9285107162 100644
--- a/services/ansible/ansible-role.service.js
+++ b/services/ansible/ansible-role.service.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { downloadCount } = require('../color-formatters')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { BaseJsonService } = require('..')
+import Joi from 'joi';
+import {downloadCount} from '../color-formatters.js';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {BaseJsonService} from '..';
const ansibleRoleSchema = Joi.object({
download_count: nonNegativeInteger,
@@ -80,7 +78,7 @@ class AnsibleGalaxyRoleName extends AnsibleGalaxyRole {
}
}
-module.exports = {
+export default {
AnsibleGalaxyRoleDownloads,
AnsibleGalaxyRoleName,
-}
+};
diff --git a/services/ansible/ansible-role.tester.js b/services/ansible/ansible-role.tester.js
index ac1a3980d4585..b99133e6f150d 100644
--- a/services/ansible/ansible-role.tester.js
+++ b/services/ansible/ansible-role.tester.js
@@ -1,13 +1,9 @@
-'use strict'
+import {ServiceTester} from '../tester.js';
+import {isMetric} from '../test-validators.js';
-const { ServiceTester } = require('../tester')
-const { isMetric } = require('../test-validators')
-
-const t = (module.exports = new ServiceTester({
- id: 'AnsibleRole',
- title: 'AnsibleRole',
- pathPrefix: '/ansible/role',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('role name (valid)')
.get('/14542.json')
diff --git a/services/apm/apm.service.js b/services/apm/apm.service.js
index 9b52cfe7ed2d7..728ab308ea47c 100644
--- a/services/apm/apm.service.js
+++ b/services/apm/apm.service.js
@@ -1,11 +1,9 @@
-'use strict'
-
-const Joi = require('joi')
-const { renderLicenseBadge } = require('../licenses')
-const { renderVersionBadge } = require('../version')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { BaseJsonService, InvalidResponse } = require('..')
+import Joi from 'joi';
+import {renderLicenseBadge} from '../licenses.js';
+import {renderVersionBadge} from '../version.js';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {BaseJsonService, InvalidResponse} from '..';
const keywords = ['atom']
@@ -116,8 +114,8 @@ class APMLicense extends BaseAPMService {
}
}
-module.exports = {
+export default {
APMDownloads,
APMVersion,
APMLicense,
-}
+};
diff --git a/services/apm/apm.tester.js b/services/apm/apm.tester.js
index c7553a491e750..222d2960f26fc 100644
--- a/services/apm/apm.tester.js
+++ b/services/apm/apm.tester.js
@@ -1,13 +1,10 @@
-'use strict'
+import {ServiceTester} from '../tester.js';
+import {invalidJSON} from '../response-fixtures.js';
+import {isMetric, isVPlusTripleDottedVersion} from '../test-validators.js';
-const { ServiceTester } = require('../tester')
-const { invalidJSON } = require('../response-fixtures')
-const { isMetric, isVPlusTripleDottedVersion } = require('../test-validators')
-
-const t = (module.exports = new ServiceTester({
- id: 'apm',
- title: 'Atom Package Manager',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('Downloads')
.get('/dm/vim-mode.json')
diff --git a/services/appveyor/appveyor-base.js b/services/appveyor/appveyor-base.js
index 015612c43c3c0..596d839dd4048 100644
--- a/services/appveyor/appveyor-base.js
+++ b/services/appveyor/appveyor-base.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { nonNegativeInteger } = require('../validators')
-const { isBuildStatus } = require('../build-status')
-const { BaseJsonService } = require('..')
+import Joi from 'joi';
+import {nonNegativeInteger} from '../validators.js';
+import {isBuildStatus} from '../build-status.js';
+import {BaseJsonService} from '..';
const schema = Joi.object({
build: Joi.object({
@@ -20,7 +18,7 @@ const schema = Joi.object({
}),
}).required()
-module.exports = class AppVeyorBase extends BaseJsonService {
+export default class AppVeyorBase extends BaseJsonService {
static category = 'build'
async fetch({ user, repo, branch }) {
@@ -41,4 +39,4 @@ module.exports = class AppVeyorBase extends BaseJsonService {
pattern: ':user/:repo/:branch*',
}
}
-}
+};
diff --git a/services/appveyor/appveyor-build-redirect.service.js b/services/appveyor/appveyor-build-redirect.service.js
index df723459997c0..3ccb1bd071222 100644
--- a/services/appveyor/appveyor-build-redirect.service.js
+++ b/services/appveyor/appveyor-build-redirect.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {redirector} from '..';
-const { redirector } = require('..')
-
-module.exports = [
+export default [
redirector({
category: 'build',
route: {
@@ -13,4 +11,4 @@ module.exports = [
`/appveyor/build/${user}/${repo}${branch ? `/${branch}` : ''}`,
dateAdded: new Date('2019-12-10'),
}),
-]
+];
diff --git a/services/appveyor/appveyor-build-redirect.tester.js b/services/appveyor/appveyor-build-redirect.tester.js
index 625a1f1a169e8..1040f6c9d907a 100644
--- a/services/appveyor/appveyor-build-redirect.tester.js
+++ b/services/appveyor/appveyor-build-redirect.tester.js
@@ -1,12 +1,8 @@
-'use strict'
+import {ServiceTester} from '../tester.js';
-const { ServiceTester } = require('../tester')
-
-const t = (module.exports = new ServiceTester({
- id: 'AppveyorBuildRedirect',
- title: 'AppveyorBuildRedirect',
- pathPrefix: '/appveyor/ci',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('Appveyor CI')
.get('/gruntjs/grunt', {
diff --git a/services/appveyor/appveyor-build.service.js b/services/appveyor/appveyor-build.service.js
index 352a9e7ec836e..3a1c9603f3fdd 100644
--- a/services/appveyor/appveyor-build.service.js
+++ b/services/appveyor/appveyor-build.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import {renderBuildStatusBadge} from '../build-status.js';
+import AppVeyorBase from './appveyor-base.js';
-const { renderBuildStatusBadge } = require('../build-status')
-const AppVeyorBase = require('./appveyor-base')
-
-module.exports = class AppVeyorBuild extends AppVeyorBase {
+export default class AppVeyorBuild extends AppVeyorBase {
static route = this.buildRoute('appveyor/build')
static examples = [
@@ -33,4 +31,4 @@ module.exports = class AppVeyorBuild extends AppVeyorBase {
}
return this.constructor.render({ status: data.build.status })
}
-}
+};
diff --git a/services/appveyor/appveyor-build.tester.js b/services/appveyor/appveyor-build.tester.js
index 9858a91f17385..93c360f21f200 100644
--- a/services/appveyor/appveyor-build.tester.js
+++ b/services/appveyor/appveyor-build.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isBuildStatus } = require('../build-status')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isBuildStatus} from '../build-status.js';
+const t = (function() {
+ export default __a;
+}())
t.create('CI status')
.timeout(10000)
diff --git a/services/appveyor/appveyor-job-build.service.js b/services/appveyor/appveyor-job-build.service.js
index dc389cbde67f4..5f2f31ace5efa 100644
--- a/services/appveyor/appveyor-job-build.service.js
+++ b/services/appveyor/appveyor-job-build.service.js
@@ -1,10 +1,8 @@
-'use strict'
+import {renderBuildStatusBadge} from '../build-status.js';
+import {NotFound} from '..';
+import AppVeyorBase from './appveyor-base.js';
-const { renderBuildStatusBadge } = require('../build-status')
-const { NotFound } = require('..')
-const AppVeyorBase = require('./appveyor-base')
-
-module.exports = class AppVeyorJobBuild extends AppVeyorBase {
+export default class AppVeyorJobBuild extends AppVeyorBase {
static route = {
base: 'appveyor/job/build',
pattern: ':user/:repo/:job/:branch*',
@@ -61,4 +59,4 @@ module.exports = class AppVeyorJobBuild extends AppVeyorBase {
const { status } = this.transform({ data, jobName: job })
return renderBuildStatusBadge({ status })
}
-}
+};
diff --git a/services/appveyor/appveyor-job-build.spec.js b/services/appveyor/appveyor-job-build.spec.js
index 5d539a72cd340..d3ae15afff8ba 100644
--- a/services/appveyor/appveyor-job-build.spec.js
+++ b/services/appveyor/appveyor-job-build.spec.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const { expect } = require('chai')
-const { test, given } = require('sazerac')
-const { NotFound } = require('..')
-const AppveyorJobBuild = require('./appveyor-job-build.service')
+import {expect} from 'chai';
+import {test, given} from 'sazerac';
+import {NotFound} from '..';
+import AppveyorJobBuild from './appveyor-job-build.service.js';
describe('AppveyorJobBuild', function () {
test(AppveyorJobBuild.prototype.transform, () => {
diff --git a/services/appveyor/appveyor-job-build.tester.js b/services/appveyor/appveyor-job-build.tester.js
index 81cccb39f252a..0cd4a2d3878e3 100644
--- a/services/appveyor/appveyor-job-build.tester.js
+++ b/services/appveyor/appveyor-job-build.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isBuildStatus } = require('../build-status')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isBuildStatus} from '../build-status.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Job CI status')
.timeout(10000)
diff --git a/services/appveyor/appveyor-tests.service.js b/services/appveyor/appveyor-tests.service.js
index c3efa4e636d2e..c0fdbf288bca7 100644
--- a/services/appveyor/appveyor-tests.service.js
+++ b/services/appveyor/appveyor-tests.service.js
@@ -1,10 +1,5 @@
-'use strict'
-
-const {
- testResultQueryParamSchema,
- renderTestResultBadge,
-} = require('../test-results')
-const AppVeyorBase = require('./appveyor-base')
+import {testResultQueryParamSchema, renderTestResultBadge} from '../test-results.js';
+import AppVeyorBase from './appveyor-base.js';
const documentation = `
@@ -36,7 +31,7 @@ const commonPreviewProps = {
isCompact: false,
}
-module.exports = class AppVeyorTests extends AppVeyorBase {
+export default class AppVeyorTests extends AppVeyorBase {
static route = {
...this.buildRoute('appveyor/tests'),
queryParamSchema: testResultQueryParamSchema,
@@ -163,4 +158,4 @@ module.exports = class AppVeyorTests extends AppVeyorBase {
isCompact,
})
}
-}
+};
diff --git a/services/appveyor/appveyor-tests.tester.js b/services/appveyor/appveyor-tests.tester.js
index df81a2de2e521..7b9ce73b6da35 100644
--- a/services/appveyor/appveyor-tests.tester.js
+++ b/services/appveyor/appveyor-tests.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const queryString = require('querystring')
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
+import queryString from 'querystring';
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
const isAppveyorTestTotals = Joi.string().regex(
/^[0-9]+ passed(, [0-9]+ failed)?(, [0-9]+ skipped)?$/
diff --git a/services/archlinux/archlinux.service.js b/services/archlinux/archlinux.service.js
index f06a5003a8fde..fee862c60186a 100644
--- a/services/archlinux/archlinux.service.js
+++ b/services/archlinux/archlinux.service.js
@@ -1,14 +1,12 @@
-'use strict'
-
-const Joi = require('joi')
-const { renderVersionBadge } = require('../version')
-const { BaseJsonService } = require('..')
+import Joi from 'joi';
+import {renderVersionBadge} from '../version.js';
+import {BaseJsonService} from '..';
const schema = Joi.object({
pkgver: Joi.string().required(),
}).required()
-module.exports = class ArchLinux extends BaseJsonService {
+export default class ArchLinux extends BaseJsonService {
static category = 'version'
static route = {
base: 'archlinux/v',
@@ -40,4 +38,4 @@ module.exports = class ArchLinux extends BaseJsonService {
})
return renderVersionBadge({ version: data.pkgver })
}
-}
+};
diff --git a/services/archlinux/archlinux.tester.js b/services/archlinux/archlinux.tester.js
index 379e8133c6f8d..4e735cbf4a721 100644
--- a/services/archlinux/archlinux.tester.js
+++ b/services/archlinux/archlinux.tester.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const {
- isVPlusDottedVersionNClausesWithOptionalSuffixAndEpoch,
-} = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isVPlusDottedVersionNClausesWithOptionalSuffixAndEpoch} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Arch Linux package (valid)')
.get('/core/x86_64/pacman.json')
diff --git a/services/aur/aur.service.js b/services/aur/aur.service.js
index dbab2748a04cb..a6e5eaef0f508 100644
--- a/services/aur/aur.service.js
+++ b/services/aur/aur.service.js
@@ -1,13 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { floorCount: floorCountColor } = require('../color-formatters')
-const { addv, metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { BaseJsonService, NotFound } = require('..')
-const { formatDate } = require('../text-formatters')
-const { age: ageColor } = require('../color-formatters')
-const { InvalidResponse } = require('..')
+import Joi from 'joi';
+import {floorCount as floorCountColor, age as ageColor} from '../color-formatters.js';
+import {addv, metric, formatDate} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {BaseJsonService, NotFound, InvalidResponse} from '..';
const aurSchema = Joi.object({
resultcount: nonNegativeInteger,
@@ -198,10 +193,10 @@ class AurLastModified extends BaseAurService {
}
}
-module.exports = {
+export default {
AurLicense,
AurVersion,
AurVotes,
AurMaintainer,
AurLastModified,
-}
+};
diff --git a/services/aur/aur.spec.js b/services/aur/aur.spec.js
index 93fd0a8a70bf8..1a79b69ec02fb 100644
--- a/services/aur/aur.spec.js
+++ b/services/aur/aur.spec.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const { test, given } = require('sazerac')
-const { AurVersion } = require('./aur.service')
+import {test, given} from 'sazerac';
+import {AurVersion} from './aur.service.js';
describe('AurVersion', function () {
test(AurVersion.render, () => {
diff --git a/services/aur/aur.tester.js b/services/aur/aur.tester.js
index 51b176a4cca06..a350fef687377 100644
--- a/services/aur/aur.tester.js
+++ b/services/aur/aur.tester.js
@@ -1,16 +1,9 @@
-'use strict'
-
-const { ServiceTester } = require('../tester')
-const {
- isVPlusDottedVersionNClausesWithOptionalSuffix,
- isMetric,
-} = require('../test-validators')
-const { isFormattedDate } = require('../test-validators')
-
-const t = (module.exports = new ServiceTester({
- id: 'aur',
- title: 'Arch Linux AUR',
-}))
+import {ServiceTester} from '../tester.js';
+import {isVPlusDottedVersionNClausesWithOptionalSuffix, isMetric, isFormattedDate} from '../test-validators.js';
+
+const t = (function() {
+ export default __a;
+}())
// version tests
diff --git a/services/azure-devops/azure-devops-base.js b/services/azure-devops/azure-devops-base.js
index 37d0702bd9bd9..a370dce79aba2 100644
--- a/services/azure-devops/azure-devops-base.js
+++ b/services/azure-devops/azure-devops-base.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseJsonService, NotFound } = require('..')
+import Joi from 'joi';
+import {BaseJsonService, NotFound} from '..';
const latestBuildSchema = Joi.object({
count: Joi.number().required(),
@@ -14,7 +12,7 @@ const latestBuildSchema = Joi.object({
.required(),
}).required()
-module.exports = class AzureDevOpsBase extends BaseJsonService {
+export default class AzureDevOpsBase extends BaseJsonService {
static auth = {
passKey: 'azure_devops_token',
authorizedOrigins: ['https://dev.azure.com'],
@@ -67,4 +65,4 @@ module.exports = class AzureDevOpsBase extends BaseJsonService {
return json.value[0].id
}
-}
+};
diff --git a/services/azure-devops/azure-devops-build.service.js b/services/azure-devops/azure-devops-build.service.js
index 5159c86408231..31bfe723c22d5 100644
--- a/services/azure-devops/azure-devops-build.service.js
+++ b/services/azure-devops/azure-devops-build.service.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { renderBuildStatusBadge } = require('../build-status')
-const { BaseSvgScrapingService, NotFound } = require('..')
-const { keywords, fetch } = require('./azure-devops-helpers')
+import Joi from 'joi';
+import {renderBuildStatusBadge} from '../build-status.js';
+import {BaseSvgScrapingService, NotFound} from '..';
+import {keywords, fetch} from './azure-devops-helpers.js';
const queryParamSchema = Joi.object({
stage: Joi.string(),
@@ -33,7 +31,7 @@ const documentation = `
alt="PROJECT_ID is in the id property of the API response." />
`
-module.exports = class AzureDevOpsBuild extends BaseSvgScrapingService {
+export default class AzureDevOpsBuild extends BaseSvgScrapingService {
static category = 'build'
static route = {
@@ -123,4 +121,4 @@ module.exports = class AzureDevOpsBuild extends BaseSvgScrapingService {
}
return renderBuildStatusBadge({ status })
}
-}
+};
diff --git a/services/azure-devops/azure-devops-build.tester.js b/services/azure-devops/azure-devops-build.tester.js
index 871d2a89b4d5d..6ed60e2cac2b8 100644
--- a/services/azure-devops/azure-devops-build.tester.js
+++ b/services/azure-devops/azure-devops-build.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isBuildStatus } = require('../build-status')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isBuildStatus} from '../build-status.js';
+const t = (function() {
+ export default __a;
+}())
// https://dev.azure.com/totodem/Shields.io is a public Azure DevOps project
// solely created for Shields.io testing.
diff --git a/services/azure-devops/azure-devops-coverage.service.js b/services/azure-devops/azure-devops-coverage.service.js
index f2c28adeae9e6..92f89e8733861 100644
--- a/services/azure-devops/azure-devops-coverage.service.js
+++ b/services/azure-devops/azure-devops-coverage.service.js
@@ -1,11 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const {
- coveragePercentage: coveragePercentageColor,
-} = require('../color-formatters')
-const AzureDevOpsBase = require('./azure-devops-base')
-const { keywords } = require('./azure-devops-helpers')
+import Joi from 'joi';
+import {coveragePercentage as coveragePercentageColor} from '../color-formatters.js';
+import AzureDevOpsBase from './azure-devops-base.js';
+import {keywords} from './azure-devops-helpers.js';
const documentation = `
@@ -46,7 +42,7 @@ const buildCodeCoverageSchema = Joi.object({
.required(),
}).required()
-module.exports = class AzureDevOpsCoverage extends AzureDevOpsBase {
+export default class AzureDevOpsCoverage extends AzureDevOpsBase {
static category = 'coverage'
static route = {
@@ -130,4 +126,4 @@ module.exports = class AzureDevOpsCoverage extends AzureDevOpsBase {
const coverage = covered ? (covered / total) * 100 : 0
return this.constructor.render({ coverage })
}
-}
+};
diff --git a/services/azure-devops/azure-devops-coverage.tester.js b/services/azure-devops/azure-devops-coverage.tester.js
index 3de650324fc17..ddd7e5ac8ad18 100644
--- a/services/azure-devops/azure-devops-coverage.tester.js
+++ b/services/azure-devops/azure-devops-coverage.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isIntegerPercentage } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isIntegerPercentage} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
const org = 'swellaby'
const project = 'opensource'
diff --git a/services/azure-devops/azure-devops-helpers.js b/services/azure-devops/azure-devops-helpers.js
index 9b841bb0772ee..d14098b09b434 100644
--- a/services/azure-devops/azure-devops-helpers.js
+++ b/services/azure-devops/azure-devops-helpers.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const Joi = require('joi')
-const { isBuildStatus } = require('../build-status')
+import Joi from 'joi';
+import {isBuildStatus} from '../build-status.js';
const keywords = ['vso', 'vsts', 'azure-devops']
@@ -28,4 +26,4 @@ async function fetch(serviceInstance, { url, qs = {}, errorMessages }) {
return { status }
}
-module.exports = { keywords, fetch }
+export default { keywords, fetch };
diff --git a/services/azure-devops/azure-devops-release.service.js b/services/azure-devops/azure-devops-release.service.js
index eccbfc90c5d15..13197ecfccc1b 100644
--- a/services/azure-devops/azure-devops-release.service.js
+++ b/services/azure-devops/azure-devops-release.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const { renderBuildStatusBadge } = require('../build-status')
-const { BaseSvgScrapingService } = require('..')
-const { keywords, fetch } = require('./azure-devops-helpers')
+import {renderBuildStatusBadge} from '../build-status.js';
+import {BaseSvgScrapingService} from '..';
+import {keywords, fetch} from './azure-devops-helpers.js';
const documentation = `
@@ -22,7 +20,7 @@ const documentation = `
@@ -9,7 +7,7 @@ const documentation = `
` -module.exports = class Date extends BaseService { +export default class Date extends BaseService { static category = 'other' static route = { base: 'date', pattern: ':timestamp([0-9]+)' } @@ -38,4 +36,4 @@ module.exports = class Date extends BaseService { relativeDateString: formatRelativeDate(timestamp), }) } -} +}; diff --git a/services/date/date.tester.js b/services/date/date.tester.js index 3e0135bd01d53..5fb085f80cb9c 100644 --- a/services/date/date.tester.js +++ b/services/date/date.tester.js @@ -1,12 +1,9 @@ -'use strict' +import {ServiceTester} from '../tester.js'; +import {isRelativeFormattedDate} from '../test-validators.js'; -const { ServiceTester } = require('../tester') -const { isRelativeFormattedDate } = require('../test-validators') - -const t = (module.exports = new ServiceTester({ - id: 'date', - title: 'Relative Date Tests', -})) +const t = (function() { + export default __a; +}()) t.create('Relative date') .get('/1540814400.json') diff --git a/services/david/david.service.js b/services/david/david.service.js index 18f499aa8d471..22fa083f7fc14 100644 --- a/services/david/david.service.js +++ b/services/david/david.service.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {BaseJsonService} from '..'; const schema = Joi.object({ status: Joi.allow( @@ -40,7 +38,7 @@ const statusMap = { }, } -module.exports = class David extends BaseJsonService { +export default class David extends BaseJsonService { static category = 'dependencies' static route = { base: 'david', @@ -97,4 +95,4 @@ module.exports = class David extends BaseJsonService { const json = await this.fetch({ kind, user, repo, path }) return this.constructor.render({ status: json.status, kind }) } -} +}; diff --git a/services/david/david.tester.js b/services/david/david.tester.js index 275e702ab17e2..56f05ff8619d9 100644 --- a/services/david/david.tester.js +++ b/services/david/david.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) const isDependencyStatus = Joi.string().valid( 'insecure', diff --git a/services/debian/debian.service.js b/services/debian/debian.service.js index c113ca13e0d11..aef7030cf05c9 100644 --- a/services/debian/debian.service.js +++ b/services/debian/debian.service.js @@ -1,8 +1,6 @@ -'use strict' - -const Joi = require('joi') -const { latest, renderVersionBadge } = require('../version') -const { BaseJsonService, NotFound, InvalidResponse } = require('..') +import Joi from 'joi'; +import {latest, renderVersionBadge} from '../version.js'; +import {BaseJsonService, NotFound, InvalidResponse} from '..'; const schema = Joi.array() .items( @@ -18,7 +16,7 @@ const schema = Joi.array() const defaultDistribution = 'stable' -module.exports = class Debian extends BaseJsonService { +export default class Debian extends BaseJsonService { static category = 'version' static route = { base: 'debian/v', @@ -64,4 +62,4 @@ module.exports = class Debian extends BaseJsonService { const versions = Object.keys(packageData[distKeys[0]]) return renderVersionBadge({ version: latest(versions) }) } -} +}; diff --git a/services/debian/debian.tester.js b/services/debian/debian.tester.js index 046c31d1e184b..bd5573f2dea6b 100644 --- a/services/debian/debian.tester.js +++ b/services/debian/debian.tester.js @@ -1,9 +1,7 @@ -'use strict' - -const { - isVPlusDottedVersionNClausesWithOptionalSuffixAndEpoch, -} = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isVPlusDottedVersionNClausesWithOptionalSuffixAndEpoch} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('Debian package (default distribution, valid)') .get('/apt.json') diff --git a/services/debug/debug.service.js b/services/debug/debug.service.js index b24d61c671068..48d285a32bf06 100644 --- a/services/debug/debug.service.js +++ b/services/debug/debug.service.js @@ -1,11 +1,9 @@ -'use strict' - -const { BaseService } = require('..') +import {BaseService} from '..'; const serverStartTime = new Date(new Date().toGMTString()) let bitFlip = false -module.exports = class Debug extends BaseService { +export default class Debug extends BaseService { static category = 'debug' static route = { base: 'debug', pattern: ':variant(time|starttime|flip)' } @@ -41,4 +39,4 @@ module.exports = class Debug extends BaseService { } } } -} +}; diff --git a/services/debug/debug.tester.js b/services/debug/debug.tester.js index 2885b9479d185..3e6725a20d045 100644 --- a/services/debug/debug.tester.js +++ b/services/debug/debug.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) t.create('start time') .get('/starttime.json') diff --git a/services/dependabot/dependabot.service.js b/services/dependabot/dependabot.service.js index f3e121f28d578..02fc6263b9eff 100644 --- a/services/dependabot/dependabot.service.js +++ b/services/dependabot/dependabot.service.js @@ -1,14 +1,12 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {BaseJsonService} from '..'; const schema = Joi.object({ status: Joi.string().required(), colour: Joi.string().required(), }) -module.exports = class DependabotSemverCompatibility extends BaseJsonService { +export default class DependabotSemverCompatibility extends BaseJsonService { static category = 'analysis' static route = { base: 'dependabot/semver', @@ -52,4 +50,4 @@ module.exports = class DependabotSemverCompatibility extends BaseJsonService { message: json.status, } } -} +}; diff --git a/services/dependabot/dependabot.tester.js b/services/dependabot/dependabot.tester.js index aa920d84d5276..4f9a68c4bddee 100644 --- a/services/dependabot/dependabot.tester.js +++ b/services/dependabot/dependabot.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isIntegerPercentage } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isIntegerPercentage} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('semver stability (valid)').get('/bundler/puma.json').expectBadge({ label: 'semver stability', diff --git a/services/depfu/depfu.service.js b/services/depfu/depfu.service.js index 8be46d36a41ea..378c900e0d89c 100644 --- a/services/depfu/depfu.service.js +++ b/services/depfu/depfu.service.js @@ -1,14 +1,12 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {BaseJsonService} from '..'; const depfuSchema = Joi.object({ text: Joi.string().required(), colorscheme: Joi.string().required(), }).required() -module.exports = class Depfu extends BaseJsonService { +export default class Depfu extends BaseJsonService { static category = 'dependencies' static route = { base: 'depfu', pattern: ':user/:repo' } static examples = [ @@ -40,4 +38,4 @@ module.exports = class Depfu extends BaseJsonService { const { text, colorscheme } = await this.fetch({ user, repo }) return this.constructor.render({ text, colorscheme }) } -} +}; diff --git a/services/depfu/depfu.tester.js b/services/depfu/depfu.tester.js index 957704f3c47cb..3b0044d4e1089 100644 --- a/services/depfu/depfu.tester.js +++ b/services/depfu/depfu.tester.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { ServiceTester } = require('../tester') +import Joi from 'joi'; +import {ServiceTester} from '../tester.js'; const isDependencyStatus = Joi.string().valid( 'insecure', @@ -10,7 +8,9 @@ const isDependencyStatus = Joi.string().valid( 'stale' ) -const t = (module.exports = new ServiceTester({ id: 'depfu', title: 'Depfu' })) +const t = (function() { + export default __a; +}()) t.create('depfu dependencies (valid)') .get('/depfu/example-ruby.json') diff --git a/services/deprecation-helpers.js b/services/deprecation-helpers.js index d01055bd004d8..943a5b9e18d08 100644 --- a/services/deprecation-helpers.js +++ b/services/deprecation-helpers.js @@ -1,6 +1,4 @@ -'use strict' - -const { Deprecated } = require('.') +import {Deprecated} from '.'; function enforceDeprecation(effectiveDate) { if (Date.now() >= effectiveDate.getTime()) { @@ -8,6 +6,6 @@ function enforceDeprecation(effectiveDate) { } } -module.exports = { +export default { enforceDeprecation, -} +}; diff --git a/services/deprecation-helpers.spec.js b/services/deprecation-helpers.spec.js index 63632cc7e0243..3cef2082d3bcf 100644 --- a/services/deprecation-helpers.spec.js +++ b/services/deprecation-helpers.spec.js @@ -1,8 +1,6 @@ -'use strict' - -const { expect } = require('chai') -const { Deprecated } = require('../core/base-service/errors') -const { enforceDeprecation } = require('./deprecation-helpers') +import {expect} from 'chai'; +import {Deprecated} from '../core/base-service/errors.js'; +import {enforceDeprecation} from './deprecation-helpers.js'; describe('enforceDeprecation', function () { it('throws Deprecated for a date in the past', function () { diff --git a/services/discord/discord.service.js b/services/discord/discord.service.js index 7e510d0cad047..46f54001a9805 100644 --- a/services/discord/discord.service.js +++ b/services/discord/discord.service.js @@ -1,8 +1,6 @@ -'use strict' - -const Joi = require('joi') -const { nonNegativeInteger } = require('../validators') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {nonNegativeInteger} from '../validators.js'; +import {BaseJsonService} from '..'; const schema = Joi.object({ presence_count: nonNegativeInteger, @@ -24,7 +22,7 @@ const documentation = ` ` -module.exports = class Discord extends BaseJsonService { +export default class Discord extends BaseJsonService { static category = 'chat' static route = { @@ -79,4 +77,4 @@ module.exports = class Discord extends BaseJsonService { const data = await this.fetch({ serverId }) return this.constructor.render({ members: data.presence_count }) } -} +}; diff --git a/services/discord/discord.spec.js b/services/discord/discord.spec.js index 926ac9859da35..7abe355cc7eaa 100644 --- a/services/discord/discord.spec.js +++ b/services/discord/discord.spec.js @@ -1,9 +1,7 @@ -'use strict' - -const { expect } = require('chai') -const nock = require('nock') -const { cleanUpNockAfterEach, defaultContext } = require('../test-helpers') -const Discord = require('./discord.service') +import {expect} from 'chai'; +import nock from 'nock'; +import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js'; +import Discord from './discord.service.js'; describe('Discord', function () { cleanUpNockAfterEach() diff --git a/services/discord/discord.tester.js b/services/discord/discord.tester.js index 694775133a684..38283b7895077 100644 --- a/services/discord/discord.tester.js +++ b/services/discord/discord.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) t.create('gets status for Reactiflux') .get('/102860784329052160.json') diff --git a/services/discourse/discourse-redirect.service.js b/services/discourse/discourse-redirect.service.js index 72d265fe109e7..8ecf1434a9bcd 100644 --- a/services/discourse/discourse-redirect.service.js +++ b/services/discourse/discourse-redirect.service.js @@ -1,8 +1,6 @@ -'use strict' +import {redirector} from '..'; -const { redirector } = require('..') - -module.exports = [ +export default [ redirector({ category: 'chat', route: { @@ -15,4 +13,4 @@ module.exports = [ }), dateAdded: new Date('2019-09-15'), }), -] +]; diff --git a/services/discourse/discourse-redirect.tester.js b/services/discourse/discourse-redirect.tester.js index 772eb3465873a..1158c18682ba0 100644 --- a/services/discourse/discourse-redirect.tester.js +++ b/services/discourse/discourse-redirect.tester.js @@ -1,12 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'DiscourseRedirect', - title: 'DiscourseRedirect', - pathPrefix: '/discourse', -})) +const t = (function() { + export default __a; +}()) t.create('discourse status') .get('/https/meta.discourse.org/status.svg') diff --git a/services/discourse/discourse.service.js b/services/discourse/discourse.service.js index 7037fca298b97..d9244356bd223 100644 --- a/services/discourse/discourse.service.js +++ b/services/discourse/discourse.service.js @@ -1,10 +1,8 @@ -'use strict' - -const camelcase = require('camelcase') -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { nonNegativeInteger, optionalUrl } = require('../validators') -const { BaseJsonService } = require('..') +import camelcase from 'camelcase'; +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {nonNegativeInteger, optionalUrl} from '../validators.js'; +import {BaseJsonService} from '..'; const schema = Joi.object({ topic_count: nonNegativeInteger, @@ -105,4 +103,4 @@ const metricIntegrations = [ { metricName: 'likes', property: 'like_count' }, ].map(DiscourseMetricIntegrationFactory) -module.exports = [...metricIntegrations, DiscourseStatus] +export default [...metricIntegrations, DiscourseStatus]; diff --git a/services/discourse/discourse.tester.js b/services/discourse/discourse.tester.js index a074fe85e8dab..fda5c3655e993 100644 --- a/services/discourse/discourse.tester.js +++ b/services/discourse/discourse.tester.js @@ -1,12 +1,9 @@ -'use strict' +import Joi from 'joi'; +import {ServiceTester} from '../tester.js'; -const Joi = require('joi') -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'discourse', - title: 'Discourse', -})) +const t = (function() { + export default __a; +}()) const data = { topic_count: 22513, diff --git a/services/dockbit/dockbit.service.js b/services/dockbit/dockbit.service.js index f8b2e9028487b..7dc0515cffc27 100644 --- a/services/dockbit/dockbit.service.js +++ b/services/dockbit/dockbit.service.js @@ -1,8 +1,6 @@ -'use strict' +import {deprecatedService} from '..'; -const { deprecatedService } = require('..') - -module.exports = deprecatedService({ +export default deprecatedService({ category: 'build', route: { base: 'dockbit', @@ -10,4 +8,4 @@ module.exports = deprecatedService({ }, label: 'dockbit', dateAdded: new Date('2017-12-31'), -}) +}); diff --git a/services/dockbit/dockbit.tester.js b/services/dockbit/dockbit.tester.js index 4d9ef389a8321..30fe285c90b0c 100644 --- a/services/dockbit/dockbit.tester.js +++ b/services/dockbit/dockbit.tester.js @@ -1,11 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'dockbit', - title: 'Dockbit', -})) +const t = (function() { + export default __a; +}()) t.create('no longer available (previously image size)') .get('/image-size/_/ubuntu/latest.json') diff --git a/services/docker/docker-automated.service.js b/services/docker/docker-automated.service.js index c48a57d63a730..60689900d79b4 100644 --- a/services/docker/docker-automated.service.js +++ b/services/docker/docker-automated.service.js @@ -1,18 +1,12 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService } = require('..') -const { - dockerBlue, - buildDockerUrl, - getDockerHubUser, -} = require('./docker-helpers') +import Joi from 'joi'; +import {BaseJsonService} from '..'; +import {dockerBlue, buildDockerUrl, getDockerHubUser} from './docker-helpers.js'; const automatedBuildSchema = Joi.object({ is_automated: Joi.boolean().required(), }).required() -module.exports = class DockerAutomatedBuild extends BaseJsonService { +export default class DockerAutomatedBuild extends BaseJsonService { static category = 'build' static route = buildDockerUrl('automated') static examples = [ @@ -50,4 +44,4 @@ module.exports = class DockerAutomatedBuild extends BaseJsonService { const data = await this.fetch({ user, repo }) return this.constructor.render({ isAutomated: data.is_automated }) } -} +}; diff --git a/services/docker/docker-automated.tester.js b/services/docker/docker-automated.tester.js index 4cc144d7ceb9a..c8765ce0e4d82 100644 --- a/services/docker/docker-automated.tester.js +++ b/services/docker/docker-automated.tester.js @@ -1,8 +1,8 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) -const { dockerBlue } = require('./docker-helpers') +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) +import {dockerBlue} from './docker-helpers.js'; const isAutomatedBuildStatus = Joi.string().valid('automated', 'manual') diff --git a/services/docker/docker-build.service.js b/services/docker/docker-build.service.js index c98d5ada68863..3eba72c8be260 100644 --- a/services/docker/docker-build.service.js +++ b/services/docker/docker-build.service.js @@ -1,8 +1,6 @@ -'use strict' +import {deprecatedService} from '..'; -const { deprecatedService } = require('..') - -module.exports = deprecatedService({ +export default deprecatedService({ category: 'build', route: { base: 'docker/build', diff --git a/services/docker/docker-build.tester.js b/services/docker/docker-build.tester.js index efc4fb259791f..8d4caa2f7c75d 100644 --- a/services/docker/docker-build.tester.js +++ b/services/docker/docker-build.tester.js @@ -1,6 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') +const t = (function() { + export default __a; +}()) const t = (module.exports = new ServiceTester({ id: 'dockerbuild', diff --git a/services/docker/docker-cloud-automated.service.js b/services/docker/docker-cloud-automated.service.js index 8fc27256d2d89..56d5a4ed37280 100644 --- a/services/docker/docker-cloud-automated.service.js +++ b/services/docker/docker-cloud-automated.service.js @@ -1,10 +1,8 @@ -'use strict' +import {BaseJsonService} from '..'; +import {dockerBlue, buildDockerUrl} from './docker-helpers.js'; +import {fetchBuild} from './docker-cloud-common-fetch.js'; -const { BaseJsonService } = require('..') -const { dockerBlue, buildDockerUrl } = require('./docker-helpers') -const { fetchBuild } = require('./docker-cloud-common-fetch') - -module.exports = class DockerCloudAutomatedBuild extends BaseJsonService { +export default class DockerCloudAutomatedBuild extends BaseJsonService { static category = 'build' static route = buildDockerUrl('cloud/automated') static examples = [ @@ -34,4 +32,4 @@ module.exports = class DockerCloudAutomatedBuild extends BaseJsonService { buildSettings: data.objects[0].build_settings, }) } -} +}; diff --git a/services/docker/docker-cloud-automated.tester.js b/services/docker/docker-cloud-automated.tester.js index 22d508dcc3be2..08c477edc3b71 100644 --- a/services/docker/docker-cloud-automated.tester.js +++ b/services/docker/docker-cloud-automated.tester.js @@ -1,8 +1,8 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) -const { dockerBlue } = require('./docker-helpers') +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) +import {dockerBlue} from './docker-helpers.js'; const isAutomatedBuildStatus = Joi.string().valid('automated', 'manual') diff --git a/services/docker/docker-cloud-build.service.js b/services/docker/docker-cloud-build.service.js index d40b058250729..1456ecfe90596 100644 --- a/services/docker/docker-cloud-build.service.js +++ b/services/docker/docker-cloud-build.service.js @@ -1,10 +1,8 @@ -'use strict' +import {BaseJsonService} from '..'; +import {dockerBlue, buildDockerUrl} from './docker-helpers.js'; +import {fetchBuild} from './docker-cloud-common-fetch.js'; -const { BaseJsonService } = require('..') -const { dockerBlue, buildDockerUrl } = require('./docker-helpers') -const { fetchBuild } = require('./docker-cloud-common-fetch') - -module.exports = class DockerCloudBuild extends BaseJsonService { +export default class DockerCloudBuild extends BaseJsonService { static category = 'build' static route = buildDockerUrl('cloud/build') static examples = [ @@ -35,4 +33,4 @@ module.exports = class DockerCloudBuild extends BaseJsonService { const data = await fetchBuild(this, { user, repo }) return this.constructor.render({ state: data.objects[0].state }) } -} +}; diff --git a/services/docker/docker-cloud-build.tester.js b/services/docker/docker-cloud-build.tester.js index 59a8f8ef7223d..82783d57f6278 100644 --- a/services/docker/docker-cloud-build.tester.js +++ b/services/docker/docker-cloud-build.tester.js @@ -1,8 +1,8 @@ -'use strict' - -const { isBuildStatus } = require('../build-status') -const t = (module.exports = require('../tester').createServiceTester()) -const { dockerBlue } = require('./docker-helpers') +import {isBuildStatus} from '../build-status.js'; +const t = (function() { + export default __a; +}()) +import {dockerBlue} from './docker-helpers.js'; t.create('docker cloud build status (valid, user)') .get('/jrottenberg/ffmpeg.json') diff --git a/services/docker/docker-cloud-common-fetch.js b/services/docker/docker-cloud-common-fetch.js index 8ac3db1fa4f69..ff4a382eb76cb 100644 --- a/services/docker/docker-cloud-common-fetch.js +++ b/services/docker/docker-cloud-common-fetch.js @@ -1,6 +1,4 @@ -'use strict' - -const Joi = require('joi') +import Joi from 'joi'; const cloudBuildSchema = Joi.object({ objects: Joi.array() @@ -22,6 +20,6 @@ async function fetchBuild(serviceInstance, { user, repo }) { }) } -module.exports = { +export default { fetchBuild, -} +}; diff --git a/services/docker/docker-fixtures.js b/services/docker/docker-fixtures.js index de97cf00b8c3a..98e151e09d68d 100644 --- a/services/docker/docker-fixtures.js +++ b/services/docker/docker-fixtures.js @@ -1,5 +1,3 @@ -'use strict' - const sizeDataNoTagSemVerSort = [ { name: 'master', full_size: 13449470 }, { name: 'feature-smtps-support', full_size: 13449638 }, @@ -3035,11 +3033,11 @@ const versionDataWithVaryingArchitectures = [ { name: '2.6', images: [] }, ] -module.exports = { +export default { sizeDataNoTagSemVerSort, versionDataNoTagDateSort, versionPagedDataNoTagDateSort, versionDataNoTagSemVerSort, versionDataWithTag, versionDataWithVaryingArchitectures, -} +}; diff --git a/services/docker/docker-helpers.js b/services/docker/docker-helpers.js index 87908b00f436a..41562dfb88065 100644 --- a/services/docker/docker-helpers.js +++ b/services/docker/docker-helpers.js @@ -1,7 +1,5 @@ -'use strict' - const dockerBlue = '066da5' // see https://github.com/badges/shields/pull/1690 -const { NotFound } = require('..') +import {NotFound} from '..'; function buildDockerUrl(badgeName, includeTagRoute) { if (includeTagRoute) { @@ -55,10 +53,10 @@ function getDigestSemVerMatches({ data, digest }) { return version } -module.exports = { +export default { dockerBlue, buildDockerUrl, getDockerHubUser, getMultiPageData, getDigestSemVerMatches, -} +}; diff --git a/services/docker/docker-pulls.service.js b/services/docker/docker-pulls.service.js index 5749215cac8ca..fd10a1c2a0e66 100644 --- a/services/docker/docker-pulls.service.js +++ b/services/docker/docker-pulls.service.js @@ -1,20 +1,14 @@ -'use strict' - -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { nonNegativeInteger } = require('../validators') -const { BaseJsonService } = require('..') -const { - dockerBlue, - buildDockerUrl, - getDockerHubUser, -} = require('./docker-helpers') +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; +import {BaseJsonService} from '..'; +import {dockerBlue, buildDockerUrl, getDockerHubUser} from './docker-helpers.js'; const pullsSchema = Joi.object({ pull_count: nonNegativeInteger, }).required() -module.exports = class DockerPulls extends BaseJsonService { +export default class DockerPulls extends BaseJsonService { static category = 'downloads' static route = buildDockerUrl('pulls') static examples = [ @@ -51,4 +45,4 @@ module.exports = class DockerPulls extends BaseJsonService { const data = await this.fetch({ user, repo }) return this.constructor.render({ count: data.pull_count }) } -} +}; diff --git a/services/docker/docker-pulls.tester.js b/services/docker/docker-pulls.tester.js index cdf55b257441a..93d95b7baf543 100644 --- a/services/docker/docker-pulls.tester.js +++ b/services/docker/docker-pulls.tester.js @@ -1,8 +1,8 @@ -'use strict' - -const { isMetric } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) -const { dockerBlue } = require('./docker-helpers') +import {isMetric} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) +import {dockerBlue} from './docker-helpers.js'; t.create('docker pulls (valid, library)') .get('/_/ubuntu.json') diff --git a/services/docker/docker-size.service.js b/services/docker/docker-size.service.js index 14ed46232fc10..cdc3edb32908b 100644 --- a/services/docker/docker-size.service.js +++ b/services/docker/docker-size.service.js @@ -1,15 +1,9 @@ -'use strict' - -const Joi = require('joi') -const prettyBytes = require('pretty-bytes') -const { nonNegativeInteger } = require('../validators') -const { latest } = require('../version') -const { BaseJsonService, NotFound } = require('..') -const { - buildDockerUrl, - getDockerHubUser, - getMultiPageData, -} = require('./docker-helpers') +import Joi from 'joi'; +import prettyBytes from 'pretty-bytes'; +import {nonNegativeInteger} from '../validators.js'; +import {latest} from '../version.js'; +import {BaseJsonService, NotFound} from '..'; +import {buildDockerUrl, getDockerHubUser, getMultiPageData} from './docker-helpers.js'; const buildSchema = Joi.object({ name: Joi.string().required(), @@ -30,7 +24,7 @@ const queryParamSchema = Joi.object({ sort: Joi.string().valid('date', 'semver').default('date'), }).required() -module.exports = class DockerSize extends BaseJsonService { +export default class DockerSize extends BaseJsonService { static category = 'size' static route = { ...buildDockerUrl('image-size', true), queryParamSchema } static examples = [ @@ -116,4 +110,4 @@ module.exports = class DockerSize extends BaseJsonService { const { size } = await this.transform({ tag, sort, data }) return this.constructor.render({ size }) } -} +}; diff --git a/services/docker/docker-size.spec.js b/services/docker/docker-size.spec.js index 56857c5fa7e61..44b881965eee0 100644 --- a/services/docker/docker-size.spec.js +++ b/services/docker/docker-size.spec.js @@ -1,8 +1,6 @@ -'use strict' - -const { test, given } = require('sazerac') -const DockerSize = require('./docker-size.service') -const { sizeDataNoTagSemVerSort } = require('./docker-fixtures') +import {test, given} from 'sazerac'; +import DockerSize from './docker-size.service.js'; +import {sizeDataNoTagSemVerSort} from './docker-fixtures.js'; describe('DockerSize', function () { test(DockerSize.prototype.transform, () => { diff --git a/services/docker/docker-size.tester.js b/services/docker/docker-size.tester.js index 6707e88967ab8..e948478941920 100644 --- a/services/docker/docker-size.tester.js +++ b/services/docker/docker-size.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isFileSize } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isFileSize} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('docker image size (valid, library)') .get('/_/alpine.json') diff --git a/services/docker/docker-stars.service.js b/services/docker/docker-stars.service.js index aec79700c9b9d..f8ef7955389d1 100644 --- a/services/docker/docker-stars.service.js +++ b/services/docker/docker-stars.service.js @@ -1,15 +1,9 @@ -'use strict' +import {metric} from '../text-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; +import {BaseService} from '..'; +import {dockerBlue, buildDockerUrl, getDockerHubUser} from './docker-helpers.js'; -const { metric } = require('../text-formatters') -const { nonNegativeInteger } = require('../validators') -const { BaseService } = require('..') -const { - dockerBlue, - buildDockerUrl, - getDockerHubUser, -} = require('./docker-helpers') - -module.exports = class DockerStars extends BaseService { +export default class DockerStars extends BaseService { static category = 'rating' static route = buildDockerUrl('stars') static examples = [ @@ -47,4 +41,4 @@ module.exports = class DockerStars extends BaseService { const stars = await this.fetch({ user, repo }) return this.constructor.render({ stars }) } -} +}; diff --git a/services/docker/docker-stars.tester.js b/services/docker/docker-stars.tester.js index 9a732e8564316..2a892d6efed79 100644 --- a/services/docker/docker-stars.tester.js +++ b/services/docker/docker-stars.tester.js @@ -1,8 +1,8 @@ -'use strict' - -const { isMetric } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) -const { dockerBlue } = require('./docker-helpers') +import {isMetric} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) +import {dockerBlue} from './docker-helpers.js'; t.create('docker stars (valid, library)') .get('/_/ubuntu.json') diff --git a/services/docker/docker-version.service.js b/services/docker/docker-version.service.js index 88eabde175b42..64f60b231a4c3 100644 --- a/services/docker/docker-version.service.js +++ b/services/docker/docker-version.service.js @@ -1,15 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { nonNegativeInteger } = require('../validators') -const { latest, renderVersionBadge } = require('../version') -const { BaseJsonService, NotFound, InvalidResponse } = require('..') -const { - buildDockerUrl, - getDockerHubUser, - getMultiPageData, - getDigestSemVerMatches, -} = require('./docker-helpers') +import Joi from 'joi'; +import {nonNegativeInteger} from '../validators.js'; +import {latest, renderVersionBadge} from '../version.js'; +import {BaseJsonService, NotFound, InvalidResponse} from '..'; +import {buildDockerUrl, getDockerHubUser, getMultiPageData, getDigestSemVerMatches} from './docker-helpers.js'; const buildSchema = Joi.object({ count: nonNegativeInteger.required(), @@ -47,7 +40,7 @@ const queryParamSchema = Joi.object({ .default('amd64'), }).required() -module.exports = class DockerVersion extends BaseJsonService { +export default class DockerVersion extends BaseJsonService { static category = 'version' static route = { ...buildDockerUrl('v', true), queryParamSchema } static examples = [ @@ -160,4 +153,4 @@ module.exports = class DockerVersion extends BaseJsonService { }) return this.constructor.render({ version }) } -} +}; diff --git a/services/docker/docker-version.spec.js b/services/docker/docker-version.spec.js index 15fdab400f5fc..499e3c690a82a 100644 --- a/services/docker/docker-version.spec.js +++ b/services/docker/docker-version.spec.js @@ -1,16 +1,8 @@ -'use strict' - -const { expect } = require('chai') -const { test, given } = require('sazerac') -const { InvalidResponse } = require('..') -const DockerVersion = require('./docker-version.service') -const { - versionDataNoTagDateSort, - versionPagedDataNoTagDateSort, - versionDataNoTagSemVerSort, - versionDataWithTag, - versionDataWithVaryingArchitectures, -} = require('./docker-fixtures') +import {expect} from 'chai'; +import {test, given} from 'sazerac'; +import {InvalidResponse} from '..'; +import DockerVersion from './docker-version.service.js'; +import {versionDataNoTagDateSort, versionPagedDataNoTagDateSort, versionDataNoTagSemVerSort, versionDataWithTag, versionDataWithVaryingArchitectures} from './docker-fixtures.js'; describe('DockerVersion', function () { test(DockerVersion.prototype.transform, () => { diff --git a/services/docker/docker-version.tester.js b/services/docker/docker-version.tester.js index 46ebefdac650a..cc233e90daf3d 100644 --- a/services/docker/docker-version.tester.js +++ b/services/docker/docker-version.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isSemVer } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isSemVer} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('docker version (valid, library)').get('/_/alpine.json').expectBadge({ label: 'version', diff --git a/services/docsrs/docsrs.service.js b/services/docsrs/docsrs.service.js index 309eb6ba41468..5267fac1835a6 100644 --- a/services/docsrs/docsrs.service.js +++ b/services/docsrs/docsrs.service.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {BaseJsonService} from '..'; const schema = Joi.array() .items( @@ -12,7 +10,7 @@ const schema = Joi.array() .min(1) .required() -module.exports = class DocsRs extends BaseJsonService { +export default class DocsRs extends BaseJsonService { static category = 'build' static route = { base: 'docsrs', pattern: ':crate/:version?' } static examples = [ @@ -59,4 +57,4 @@ module.exports = class DocsRs extends BaseJsonService { ).pop() return this.constructor.render({ version, buildStatus }) } -} +}; diff --git a/services/docsrs/docsrs.tester.js b/services/docsrs/docsrs.tester.js index 0e7c566bfcbc7..9c8cce053174c 100644 --- a/services/docsrs/docsrs.tester.js +++ b/services/docsrs/docsrs.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) t.create('Passing docs') .get('/tokio/0.3.0.json') diff --git a/services/dotnetstatus/dotnetstatus.service.js b/services/dotnetstatus/dotnetstatus.service.js index 11a7918cc9801..11f1df47d27ec 100644 --- a/services/dotnetstatus/dotnetstatus.service.js +++ b/services/dotnetstatus/dotnetstatus.service.js @@ -1,8 +1,6 @@ -'use strict' +import {deprecatedService} from '..'; -const { deprecatedService } = require('..') - -module.exports = deprecatedService({ +export default deprecatedService({ category: 'dependencies', route: { base: 'dotnetstatus', @@ -10,4 +8,4 @@ module.exports = deprecatedService({ }, label: 'dotnet status', dateAdded: new Date('2018-04-01'), -}) +}); diff --git a/services/dotnetstatus/dotnetstatus.tester.js b/services/dotnetstatus/dotnetstatus.tester.js index e2b0ea1b33520..7a71278b79fa3 100644 --- a/services/dotnetstatus/dotnetstatus.tester.js +++ b/services/dotnetstatus/dotnetstatus.tester.js @@ -1,11 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'dotnetstatus', - title: 'dotnet-status', -})) +const t = (function() { + export default __a; +}()) t.create('no longer available (previously get package status)') .get('/gh/jaredcnance/dotnet-status/API.json') diff --git a/services/drone/drone-build.service.js b/services/drone/drone-build.service.js index 13aaa0721d5d6..5691ddab9ca96 100644 --- a/services/drone/drone-build.service.js +++ b/services/drone/drone-build.service.js @@ -1,9 +1,7 @@ -'use strict' - -const Joi = require('joi') -const { isBuildStatus, renderBuildStatusBadge } = require('../build-status') -const { optionalUrl } = require('../validators') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js'; +import {optionalUrl} from '../validators.js'; +import {BaseJsonService} from '..'; const schema = Joi.object({ status: Joi.alternatives() @@ -15,7 +13,7 @@ const queryParamSchema = Joi.object({ server: optionalUrl, }).required() -module.exports = class DroneBuild extends BaseJsonService { +export default class DroneBuild extends BaseJsonService { static category = 'build' static route = { base: 'drone/build', @@ -84,4 +82,4 @@ module.exports = class DroneBuild extends BaseJsonService { ) return renderBuildStatusBadge({ status: json.status }) } -} +}; diff --git a/services/drone/drone-build.spec.js b/services/drone/drone-build.spec.js index dc0b914fa521f..d5d59c8890579 100644 --- a/services/drone/drone-build.spec.js +++ b/services/drone/drone-build.spec.js @@ -1,9 +1,7 @@ -'use strict' - -const { expect } = require('chai') -const nock = require('nock') -const { cleanUpNockAfterEach, defaultContext } = require('../test-helpers') -const DroneBuild = require('./drone-build.service') +import {expect} from 'chai'; +import nock from 'nock'; +import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js'; +import DroneBuild from './drone-build.service.js'; describe('DroneBuild', function () { cleanUpNockAfterEach() diff --git a/services/drone/drone-build.tester.js b/services/drone/drone-build.tester.js index 59882a0089139..e77ecfbd08e99 100644 --- a/services/drone/drone-build.tester.js +++ b/services/drone/drone-build.tester.js @@ -1,8 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { isBuildStatus } = require('../build-status') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +import {isBuildStatus} from '../build-status.js'; +const t = (function() { + export default __a; +}()) const isDroneBuildStatus = Joi.alternatives().try( isBuildStatus, diff --git a/services/dub/dub-download.service.js b/services/dub/dub-download.service.js index 3c050bc5d901b..96e4c945880b8 100644 --- a/services/dub/dub-download.service.js +++ b/services/dub/dub-download.service.js @@ -1,10 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { downloadCount: downloadCountColor } = require('../color-formatters') -const { nonNegativeInteger } = require('../validators') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {downloadCount as downloadCountColor} from '../color-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; +import {BaseJsonService} from '..'; const schema = Joi.object({ downloads: Joi.object({ @@ -34,7 +32,7 @@ const intervalMap = { }, } -module.exports = class DubDownloads extends BaseJsonService { +export default class DubDownloads extends BaseJsonService { static category = 'downloads' static route = { base: 'dub', @@ -103,4 +101,4 @@ module.exports = class DubDownloads extends BaseJsonService { const downloadCount = transform(json) return this.constructor.render({ interval, downloadCount, version }) } -} +}; diff --git a/services/dub/dub-download.tester.js b/services/dub/dub-download.tester.js index 423c091513206..d5af16449a867 100644 --- a/services/dub/dub-download.tester.js +++ b/services/dub/dub-download.tester.js @@ -1,8 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { isMetric, isMetricOverTimePeriod } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +import {isMetric, isMetricOverTimePeriod} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) const isDownloadsColor = Joi.equal( 'red', diff --git a/services/dub/dub-license.service.js b/services/dub/dub-license.service.js index 62f99a0cf2823..bf814e06f296b 100644 --- a/services/dub/dub-license.service.js +++ b/services/dub/dub-license.service.js @@ -1,14 +1,12 @@ -'use strict' - -const Joi = require('joi') -const { renderLicenseBadge } = require('../licenses') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {renderLicenseBadge} from '../licenses.js'; +import {BaseJsonService} from '..'; const schema = Joi.object({ info: Joi.object({ license: Joi.string().required() }).required(), }) -module.exports = class DubLicense extends BaseJsonService { +export default class DubLicense extends BaseJsonService { static category = 'license' static route = { base: 'dub/l', pattern: ':packageName' } static examples = [ @@ -32,4 +30,4 @@ module.exports = class DubLicense extends BaseJsonService { const data = await this.fetch({ packageName }) return renderLicenseBadge({ licenses: [data.info.license] }) } -} +}; diff --git a/services/dub/dub-license.tester.js b/services/dub/dub-license.tester.js index f40797ac530f0..cc2c9db2da3d0 100644 --- a/services/dub/dub-license.tester.js +++ b/services/dub/dub-license.tester.js @@ -1,6 +1,6 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) +const t = (function() { + export default __a; +}()) t.create('license (valid)') .get('/vibe-d.json') diff --git a/services/dub/dub-version.service.js b/services/dub/dub-version.service.js index 8aeced3af4739..ab4788e3f99ac 100644 --- a/services/dub/dub-version.service.js +++ b/services/dub/dub-version.service.js @@ -1,12 +1,10 @@ -'use strict' - -const Joi = require('joi') -const { renderVersionBadge } = require('../version') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {renderVersionBadge} from '../version.js'; +import {BaseJsonService} from '..'; const schema = Joi.string().required() -module.exports = class DubVersion extends BaseJsonService { +export default class DubVersion extends BaseJsonService { static category = 'version' static route = { base: 'dub/v', pattern: ':packageName' } static examples = [ @@ -30,4 +28,4 @@ module.exports = class DubVersion extends BaseJsonService { const version = await this.fetch({ packageName }) return renderVersionBadge({ version }) } -} +}; diff --git a/services/dub/dub-version.tester.js b/services/dub/dub-version.tester.js index 972c7256e377c..6cb040cf5d183 100644 --- a/services/dub/dub-version.tester.js +++ b/services/dub/dub-version.tester.js @@ -1,10 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { - isVPlusDottedVersionNClausesWithOptionalSuffix, -} = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +import {isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('version (valid)') .get('/vibe-d.json') diff --git a/services/dynamic-common.js b/services/dynamic-common.js index 292c84964e115..8363f3b04d4bf 100644 --- a/services/dynamic-common.js +++ b/services/dynamic-common.js @@ -1,9 +1,7 @@ -'use strict' - -const Joi = require('joi') -const toArray = require('../core/base-service/to-array') -const validate = require('../core/base-service/validate') -const { InvalidResponse } = require('.') +import Joi from 'joi'; +import toArray from '../core/base-service/to-array.js'; +import validate from '../core/base-service/validate.js'; +import {InvalidResponse} from '.'; const errorMessages = { 404: 'resource not found', @@ -48,9 +46,9 @@ function renderDynamicBadge({ } } -module.exports = { +export default { errorMessages, individualValueSchema, transformAndValidate, renderDynamicBadge, -} +}; diff --git a/services/dynamic/dynamic-helpers.js b/services/dynamic/dynamic-helpers.js index 6921857674490..6866dbbb86144 100644 --- a/services/dynamic/dynamic-helpers.js +++ b/services/dynamic/dynamic-helpers.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { optionalUrl } = require('../validators') +import Joi from 'joi'; +import {optionalUrl} from '../validators.js'; const queryParamSchema = Joi.object({ url: optionalUrl.required(), @@ -20,6 +18,6 @@ function createRoute(which) { } } -module.exports = { +export default { createRoute, -} +}; diff --git a/services/dynamic/dynamic-json.service.js b/services/dynamic/dynamic-json.service.js index 337fe66d2ded0..c4238751a2b17 100644 --- a/services/dynamic/dynamic-json.service.js +++ b/services/dynamic/dynamic-json.service.js @@ -1,11 +1,9 @@ -'use strict' +import {MetricNames} from '../../core/base-service/metric-helper.js'; +import {BaseJsonService} from '..'; +import {createRoute} from './dynamic-helpers.js'; +import jsonPath from './json-path.js'; -const { MetricNames } = require('../../core/base-service/metric-helper') -const { BaseJsonService } = require('..') -const { createRoute } = require('./dynamic-helpers') -const jsonPath = require('./json-path') - -module.exports = class DynamicJson extends jsonPath(BaseJsonService) { +export default class DynamicJson extends jsonPath(BaseJsonService) { static enabledMetrics = [MetricNames.SERVICE_RESPONSE_SIZE] static route = createRoute('json') @@ -16,4 +14,4 @@ module.exports = class DynamicJson extends jsonPath(BaseJsonService) { errorMessages, }) } -} +}; diff --git a/services/dynamic/dynamic-json.tester.js b/services/dynamic/dynamic-json.tester.js index d36dda48a30e4..9d6984a770b5c 100644 --- a/services/dynamic/dynamic-json.tester.js +++ b/services/dynamic/dynamic-json.tester.js @@ -1,8 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { expect } = require('chai') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +import {expect} from 'chai'; +const t = (function() { + export default __a; +}()) t.create('No URL specified') .get('.json?query=$.name&label=Package Name') diff --git a/services/dynamic/dynamic-response-fixtures.js b/services/dynamic/dynamic-response-fixtures.js index 25af9ff15ad56..15df94a0f30e8 100644 --- a/services/dynamic/dynamic-response-fixtures.js +++ b/services/dynamic/dynamic-response-fixtures.js @@ -1,6 +1,4 @@ -'use strict' - -module.exports = { +export default { exampleXml: `@@ -45,7 +40,7 @@ const queryParamSchema = Joi.object({ extension: Joi.string(), }) -module.exports = class GithubDirectoryFileCount extends ( +export default class GithubDirectoryFileCount extends ( ConditionalGithubAuthV3Service ) { static category = 'size' @@ -158,4 +153,4 @@ module.exports = class GithubDirectoryFileCount extends ( const { count } = this.constructor.transform(content, { type, extension }) return this.constructor.render({ count }) } -} +}; diff --git a/services/github/github-directory-file-count.spec.js b/services/github/github-directory-file-count.spec.js index 721691ad5bd61..eefdd14c9fe18 100644 --- a/services/github/github-directory-file-count.spec.js +++ b/services/github/github-directory-file-count.spec.js @@ -1,9 +1,7 @@ -'use strict' - -const { expect } = require('chai') -const { test, given } = require('sazerac') -const { InvalidParameter } = require('..') -const GithubDirectoryFileCount = require('./github-directory-file-count.service') +import {expect} from 'chai'; +import {test, given} from 'sazerac'; +import {InvalidParameter} from '..'; +import GithubDirectoryFileCount from './github-directory-file-count.service.js'; describe('GithubDirectoryFileCount', function () { const contents = [ diff --git a/services/github/github-directory-file-count.tester.js b/services/github/github-directory-file-count.tester.js index 2ea38495e371b..b9e6524b63317 100644 --- a/services/github/github-directory-file-count.tester.js +++ b/services/github/github-directory-file-count.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isMetric } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isMetric} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('directory file count').get('/badges/shields.json').expectBadge({ label: 'files', diff --git a/services/github/github-discussions-total.service.js b/services/github/github-discussions-total.service.js index 88bc5c3356438..c603e1e892ade 100644 --- a/services/github/github-discussions-total.service.js +++ b/services/github/github-discussions-total.service.js @@ -1,10 +1,8 @@ -'use strict' - -const { default: gql } = require('graphql-tag') -const Joi = require('joi') -const { nonNegativeInteger } = require('../validators') -const { GithubAuthV4Service } = require('./github-auth-service') -const { transformErrors } = require('./github-helpers') +import {default as gql} from 'graphql-tag'; +import Joi from 'joi'; +import {nonNegativeInteger} from '../validators.js'; +import {GithubAuthV4Service} from './github-auth-service.js'; +import {transformErrors} from './github-helpers.js'; const schema = Joi.object({ data: Joi.object({ @@ -16,7 +14,7 @@ const schema = Joi.object({ }).required(), }).required() -module.exports = class GithubTotalDiscussions extends GithubAuthV4Service { +export default class GithubTotalDiscussions extends GithubAuthV4Service { static category = 'other' static route = { base: 'github/discussions', @@ -71,4 +69,4 @@ module.exports = class GithubTotalDiscussions extends GithubAuthV4Service { } = json return this.constructor.render({ discussions: `${totalCount} total` }) } -} +}; diff --git a/services/github/github-discussions-total.tester.js b/services/github/github-discussions-total.tester.js index 737419d485378..a594ada567866 100644 --- a/services/github/github-discussions-total.tester.js +++ b/services/github/github-discussions-total.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { withRegex } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {withRegex} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('GitHub Total Discussions (repo not found)') .get('/not-a-user/not-a-repo.json') diff --git a/services/github/github-downloads.service.js b/services/github/github-downloads.service.js index cb22a498c428a..6ce9be6c751c2 100644 --- a/services/github/github-downloads.service.js +++ b/services/github/github-downloads.service.js @@ -1,13 +1,11 @@ -'use strict' - -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { nonNegativeInteger } = require('../validators') -const { downloadCount: downloadCountColor } = require('../color-formatters') -const { NotFound } = require('..') -const { GithubAuthV3Service } = require('./github-auth-service') -const { fetchLatestRelease } = require('./github-common-release') -const { documentation, errorMessagesFor } = require('./github-helpers') +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; +import {downloadCount as downloadCountColor} from '../color-formatters.js'; +import {NotFound} from '..'; +import {GithubAuthV3Service} from './github-auth-service.js'; +import {fetchLatestRelease} from './github-common-release.js'; +import {documentation, errorMessagesFor} from './github-helpers.js'; const queryParamSchema = Joi.object({ sort: Joi.string().valid('date', 'semver').default('date'), @@ -27,7 +25,7 @@ const releaseArraySchema = Joi.alternatives().try( Joi.array().length(0) ) -module.exports = class GithubDownloads extends GithubAuthV3Service { +export default class GithubDownloads extends GithubAuthV3Service { static category = 'downloads' static route = { base: 'github', @@ -265,4 +263,4 @@ module.exports = class GithubDownloads extends GithubAuthV3Service { return this.constructor.render({ tag, assetName, downloadCount }) } -} +}; diff --git a/services/github/github-downloads.tester.js b/services/github/github-downloads.tester.js index 099092af95285..25fb87c3bdbf7 100644 --- a/services/github/github-downloads.tester.js +++ b/services/github/github-downloads.tester.js @@ -1,8 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { isMetric } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +import {isMetric} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) const mockLatestRelease = release => nock => nock('https://api.github.com') diff --git a/services/github/github-followers.service.js b/services/github/github-followers.service.js index f39bf32cbb8f5..effcdb1e3beca 100644 --- a/services/github/github-followers.service.js +++ b/services/github/github-followers.service.js @@ -1,16 +1,14 @@ -'use strict' - -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { nonNegativeInteger } = require('../validators') -const { GithubAuthV3Service } = require('./github-auth-service') -const { documentation, errorMessagesFor } = require('./github-helpers') +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; +import {GithubAuthV3Service} from './github-auth-service.js'; +import {documentation, errorMessagesFor} from './github-helpers.js'; const schema = Joi.object({ followers: nonNegativeInteger, }).required() -module.exports = class GithubFollowers extends GithubAuthV3Service { +export default class GithubFollowers extends GithubAuthV3Service { static category = 'social' static route = { base: 'github/followers', pattern: ':user' } static examples = [ @@ -43,4 +41,4 @@ module.exports = class GithubFollowers extends GithubAuthV3Service { }) return this.constructor.render({ followers }) } -} +}; diff --git a/services/github/github-followers.tester.js b/services/github/github-followers.tester.js index c0db38a83915a..f7de0277596e2 100644 --- a/services/github/github-followers.tester.js +++ b/services/github/github-followers.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isMetric } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isMetric} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('Followers').get('/webcaetano.json').expectBadge({ label: 'followers', diff --git a/services/github/github-forks.service.js b/services/github/github-forks.service.js index 67bac545b8003..5a78e2633c644 100644 --- a/services/github/github-forks.service.js +++ b/services/github/github-forks.service.js @@ -1,11 +1,9 @@ -'use strict' - -const gql = require('graphql-tag') -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { nonNegativeInteger } = require('../validators') -const { GithubAuthV4Service } = require('./github-auth-service') -const { documentation, transformErrors } = require('./github-helpers') +import gql from 'graphql-tag'; +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; +import {GithubAuthV4Service} from './github-auth-service.js'; +import {documentation, transformErrors} from './github-helpers.js'; const schema = Joi.object({ data: Joi.object({ @@ -15,7 +13,7 @@ const schema = Joi.object({ }).required(), }).required() -module.exports = class GithubForks extends GithubAuthV4Service { +export default class GithubForks extends GithubAuthV4Service { static category = 'social' static route = { base: 'github/forks', pattern: ':user/:repo' } static examples = [ @@ -74,4 +72,4 @@ module.exports = class GithubForks extends GithubAuthV4Service { forkCount: json.data.repository.forkCount, }) } -} +}; diff --git a/services/github/github-forks.tester.js b/services/github/github-forks.tester.js index 9656b806dda09..56bac7426a2be 100644 --- a/services/github/github-forks.tester.js +++ b/services/github/github-forks.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isMetric } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isMetric} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('Forks') .get('/badges/shields.json') diff --git a/services/github/github-go-mod.service.js b/services/github/github-go-mod.service.js index cb45aa2a4ce4d..2dc1e131dd80d 100644 --- a/services/github/github-go-mod.service.js +++ b/services/github/github-go-mod.service.js @@ -1,11 +1,9 @@ -'use strict' - -const Joi = require('joi') -const { renderVersionBadge } = require('../version') -const { InvalidResponse } = require('..') -const { ConditionalGithubAuthV3Service } = require('./github-auth-service') -const { fetchRepoContent } = require('./github-common-fetch') -const { documentation } = require('./github-helpers') +import Joi from 'joi'; +import {renderVersionBadge} from '../version.js'; +import {InvalidResponse} from '..'; +import {ConditionalGithubAuthV3Service} from './github-auth-service.js'; +import {fetchRepoContent} from './github-common-fetch.js'; +import {documentation} from './github-helpers.js'; const queryParamSchema = Joi.object({ filename: Joi.string(), @@ -15,7 +13,7 @@ const goVersionRegExp = /^go (.+)$/m const keywords = ['golang'] -module.exports = class GithubGoModGoVersion extends ( +export default class GithubGoModGoVersion extends ( ConditionalGithubAuthV3Service ) { static category = 'version' @@ -95,4 +93,4 @@ module.exports = class GithubGoModGoVersion extends ( const { go } = this.constructor.transform(content) return this.constructor.render({ version: go, branch }) } -} +}; diff --git a/services/github/github-go-mod.tester.js b/services/github/github-go-mod.tester.js index e83e4a1d8990d..94adfff994a16 100644 --- a/services/github/github-go-mod.tester.js +++ b/services/github/github-go-mod.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isVPlusDottedVersionAtLeastOne } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('Go version').get('/gohugoio/hugo.json').expectBadge({ label: 'Go', diff --git a/services/github/github-hacktoberfest.service.js b/services/github/github-hacktoberfest.service.js index 85339bd39a8df..d4ff657997351 100644 --- a/services/github/github-hacktoberfest.service.js +++ b/services/github/github-hacktoberfest.service.js @@ -1,15 +1,10 @@ -'use strict' - -const gql = require('graphql-tag') -const Joi = require('joi') -const moment = require('moment') -const { metric, maybePluralize } = require('../text-formatters') -const { nonNegativeInteger } = require('../validators') -const { GithubAuthV4Service } = require('./github-auth-service') -const { - documentation: githubDocumentation, - transformErrors, -} = require('./github-helpers') +import gql from 'graphql-tag'; +import Joi from 'joi'; +import moment from 'moment'; +import {metric, maybePluralize} from '../text-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; +import {GithubAuthV4Service} from './github-auth-service.js'; +import {documentation as githubDocumentation, transformErrors} from './github-helpers.js'; const documentation = `
@@ -58,7 +53,7 @@ const queryParamSchema = Joi.object({ suggestion_label: Joi.string(), }).required() -module.exports = class GithubHacktoberfestCombinedStatus extends ( +export default class GithubHacktoberfestCombinedStatus extends ( GithubAuthV4Service ) { static category = 'issue-tracking' @@ -237,4 +232,4 @@ module.exports = class GithubHacktoberfestCombinedStatus extends ( year, }) } -} +}; diff --git a/services/github/github-hacktoberfest.spec.js b/services/github/github-hacktoberfest.spec.js index 01916b5a8a2f6..7d86cc0ff9705 100644 --- a/services/github/github-hacktoberfest.spec.js +++ b/services/github/github-hacktoberfest.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const GitHubHacktoberfest = require('./github-hacktoberfest.service') +import {test, given} from 'sazerac'; +import GitHubHacktoberfest from './github-hacktoberfest.service.js'; describe('GitHubHacktoberfest', function () { test(GitHubHacktoberfest.render, () => { diff --git a/services/github/github-hacktoberfest.tester.js b/services/github/github-hacktoberfest.tester.js index b11b1526d0880..9b3bcea694f42 100644 --- a/services/github/github-hacktoberfest.tester.js +++ b/services/github/github-hacktoberfest.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) const isHacktoberfestNoIssuesStatus = Joi.string().regex( /^[0-9]+ PRs?(, [0-9]+ days? left)?$/ diff --git a/services/github/github-helpers.js b/services/github/github-helpers.js index eb11e24fff321..8fd4b23ebea09 100644 --- a/services/github/github-helpers.js +++ b/services/github/github-helpers.js @@ -1,7 +1,5 @@ -'use strict' - -const { colorScale } = require('../color-formatters') -const { InvalidResponse, NotFound } = require('..') +import {colorScale} from '../color-formatters.js'; +import {InvalidResponse, NotFound} from '..'; const documentation = `
@@ -33,10 +31,10 @@ function transformErrors(errors, entity = 'repo') {
const commentsColor = colorScale([1, 3, 10, 25], undefined, true)
-module.exports = {
+export default {
documentation,
stateColor,
commentsColor,
errorMessagesFor,
transformErrors,
-}
+};
diff --git a/services/github/github-issue-detail-redirect.service.js b/services/github/github-issue-detail-redirect.service.js
index 40be57b51b99c..76d2a695c2fdc 100644
--- a/services/github/github-issue-detail-redirect.service.js
+++ b/services/github/github-issue-detail-redirect.service.js
@@ -1,13 +1,11 @@
-'use strict'
-
-const { redirector } = require('..')
+import {redirector} from '..';
const variantMap = {
s: 'state',
u: 'author',
}
-module.exports = [
+export default [
redirector({
category: 'issue-tracking',
route: {
@@ -19,4 +17,4 @@ module.exports = [
`/github/${issueKind}/detail/${variantMap[variant]}/${user}/${repo}/${number}`,
dateAdded: new Date('2019-04-04'),
}),
-]
+];
diff --git a/services/github/github-issue-detail-redirect.tester.js b/services/github/github-issue-detail-redirect.tester.js
index da07a159e6f0c..c7fb8124d3163 100644
--- a/services/github/github-issue-detail-redirect.tester.js
+++ b/services/github/github-issue-detail-redirect.tester.js
@@ -1,12 +1,8 @@
-'use strict'
+import {ServiceTester} from '../tester.js';
-const { ServiceTester } = require('../tester')
-
-const t = (module.exports = new ServiceTester({
- id: 'GithubIssueDetailRedirect',
- title: 'GithubIssueDetailRedirect',
- pathPrefix: '/github',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('github issue detail (s shorthand)')
.get('/issues/detail/s/badges/shields/979.svg')
diff --git a/services/github/github-issue-detail.service.js b/services/github/github-issue-detail.service.js
index 8fca29bee6866..20a5e4ed6e706 100644
--- a/services/github/github-issue-detail.service.js
+++ b/services/github/github-issue-detail.service.js
@@ -1,17 +1,10 @@
-'use strict'
-
-const Joi = require('joi')
-const { nonNegativeInteger } = require('../validators')
-const { formatDate, metric } = require('../text-formatters')
-const { age } = require('../color-formatters')
-const { InvalidResponse } = require('..')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const {
- documentation,
- errorMessagesFor,
- stateColor,
- commentsColor,
-} = require('./github-helpers')
+import Joi from 'joi';
+import {nonNegativeInteger} from '../validators.js';
+import {formatDate, metric} from '../text-formatters.js';
+import {age} from '../color-formatters.js';
+import {InvalidResponse} from '..';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor, stateColor, commentsColor} from './github-helpers.js';
const commonSchemaFields = {
number: nonNegativeInteger,
@@ -152,7 +145,7 @@ const propertyMap = {
'last-update': ageUpdateMap,
}
-module.exports = class GithubIssueDetail extends GithubAuthV3Service {
+export default class GithubIssueDetail extends GithubAuthV3Service {
static category = 'issue-tracking'
static route = {
base: 'github',
@@ -217,4 +210,4 @@ module.exports = class GithubIssueDetail extends GithubAuthV3Service {
const { value, isPR } = this.transform({ json, property, issueKind })
return this.constructor.render({ property, value, isPR, number })
}
-}
+};
diff --git a/services/github/github-issue-detail.spec.js b/services/github/github-issue-detail.spec.js
index 3d5ef086f30dd..bf1e9f31b4670 100644
--- a/services/github/github-issue-detail.spec.js
+++ b/services/github/github-issue-detail.spec.js
@@ -1,12 +1,10 @@
-'use strict'
-
-const { expect } = require('chai')
-const { test, given } = require('sazerac')
-const { age } = require('../color-formatters')
-const { formatDate, metric } = require('../text-formatters')
-const { InvalidResponse } = require('..')
-const GithubIssueDetail = require('./github-issue-detail.service')
-const { stateColor, commentsColor } = require('./github-helpers')
+import {expect} from 'chai';
+import {test, given} from 'sazerac';
+import {age} from '../color-formatters.js';
+import {formatDate, metric} from '../text-formatters.js';
+import {InvalidResponse} from '..';
+import GithubIssueDetail from './github-issue-detail.service.js';
+import {stateColor, commentsColor} from './github-helpers.js';
describe('GithubIssueDetail', function () {
test(GithubIssueDetail.render, () => {
diff --git a/services/github/github-issue-detail.tester.js b/services/github/github-issue-detail.tester.js
index 0a9de66414ee3..2dc23234d12cf 100644
--- a/services/github/github-issue-detail.tester.js
+++ b/services/github/github-issue-detail.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { isFormattedDate } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+import {isFormattedDate} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('github issue state')
.get('/issues/detail/state/badges/shields/979.json')
diff --git a/services/github/github-issues-search.service.js b/services/github/github-issues-search.service.js
index 979345af9ef6e..4501e0c904156 100644
--- a/services/github/github-issues-search.service.js
+++ b/services/github/github-issues-search.service.js
@@ -1,11 +1,9 @@
-'use strict'
-
-const gql = require('graphql-tag')
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { GithubAuthV4Service } = require('./github-auth-service')
-const { documentation, transformErrors } = require('./github-helpers')
+import gql from 'graphql-tag';
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {GithubAuthV4Service} from './github-auth-service.js';
+import {documentation, transformErrors} from './github-helpers.js';
const issueCountSchema = Joi.object({
data: Joi.object({
@@ -106,7 +104,7 @@ class GithubRepoIssuesSearch extends BaseGithubIssuesSearch {
}
}
-module.exports = {
+export default {
GithubIssuesSearch,
GithubRepoIssuesSearch,
-}
+};
diff --git a/services/github/github-issues-search.tester.js b/services/github/github-issues-search.tester.js
index 04c88c2f24a89..a1531713fc815 100644
--- a/services/github/github-issues-search.tester.js
+++ b/services/github/github-issues-search.tester.js
@@ -1,12 +1,8 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const { ServiceTester } = require('../tester')
-const t = (module.exports = new ServiceTester({
- id: 'GithubIssuesSearch',
- title: 'Github Issues Search',
- pathPrefix: '/github',
-}))
+import {isMetric} from '../test-validators.js';
+import {ServiceTester} from '../tester.js';
+const t = (function() {
+ export default __a;
+}())
t.create('GitHub issue search (valid query string)')
.get(
diff --git a/services/github/github-issues.service.js b/services/github/github-issues.service.js
index 9f7b37ed2be44..af603094a20aa 100644
--- a/services/github/github-issues.service.js
+++ b/services/github/github-issues.service.js
@@ -1,11 +1,9 @@
-'use strict'
-
-const gql = require('graphql-tag')
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { GithubAuthV4Service } = require('./github-auth-service')
-const { documentation, transformErrors } = require('./github-helpers')
+import gql from 'graphql-tag';
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {GithubAuthV4Service} from './github-auth-service.js';
+import {documentation, transformErrors} from './github-helpers.js';
const issueCountSchema = Joi.object({
data: Joi.object({
@@ -37,7 +35,7 @@ const isClosedVariant = {
'issues-pr-closed': true,
}
-module.exports = class GithubIssues extends GithubAuthV4Service {
+export default class GithubIssues extends GithubAuthV4Service {
static category = 'issue-tracking'
static route = {
base: 'github',
@@ -401,4 +399,4 @@ module.exports = class GithubIssues extends GithubAuthV4Service {
label,
})
}
-}
+};
diff --git a/services/github/github-issues.tester.js b/services/github/github-issues.tester.js
index bb25a88dab518..db9d1886a1134 100644
--- a/services/github/github-issues.tester.js
+++ b/services/github/github-issues.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { isMetric, isMetricOpenIssues } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+import {isMetric, isMetricOpenIssues} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('GitHub closed pull requests')
.get('/issues-pr-closed/badges/shields.json')
diff --git a/services/github/github-labels.service.js b/services/github/github-labels.service.js
index 1bed157eaa96d..3217ca881d3fe 100644
--- a/services/github/github-labels.service.js
+++ b/services/github/github-labels.service.js
@@ -1,14 +1,12 @@
-'use strict'
-
-const Joi = require('joi')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const schema = Joi.object({
color: Joi.string().hex().required(),
}).required()
-module.exports = class GithubLabels extends GithubAuthV3Service {
+export default class GithubLabels extends GithubAuthV3Service {
static category = 'issue-tracking'
static route = { base: 'github/labels', pattern: ':user/:repo/:name' }
static examples = [
@@ -45,4 +43,4 @@ module.exports = class GithubLabels extends GithubAuthV3Service {
const { color } = await this.fetch({ user, repo, name })
return this.constructor.render({ name, color })
}
-}
+};
diff --git a/services/github/github-labels.tester.js b/services/github/github-labels.tester.js
index 1cf89586cf731..e47fca24a2db3 100644
--- a/services/github/github-labels.tester.js
+++ b/services/github/github-labels.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
t.create('labels').get('/badges/shields/bug.json').expectBadge({
message: 'bug',
diff --git a/services/github/github-language-count.service.js b/services/github/github-language-count.service.js
index 311a097271e09..012dce66d8c41 100644
--- a/services/github/github-language-count.service.js
+++ b/services/github/github-language-count.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import {BaseGithubLanguage} from './github-languages-base.js';
+import {documentation} from './github-helpers.js';
-const { BaseGithubLanguage } = require('./github-languages-base')
-const { documentation } = require('./github-helpers')
-
-module.exports = class GithubLanguageCount extends BaseGithubLanguage {
+export default class GithubLanguageCount extends BaseGithubLanguage {
static category = 'analysis'
static route = { base: 'github/languages/count', pattern: ':user/:repo' }
static examples = [
@@ -31,4 +29,4 @@ module.exports = class GithubLanguageCount extends BaseGithubLanguage {
const data = await this.fetch({ user, repo })
return this.constructor.render({ count: Object.keys(data).length })
}
-}
+};
diff --git a/services/github/github-language-count.tester.js b/services/github/github-language-count.tester.js
index f7277d884baaa..cef49335100ab 100644
--- a/services/github/github-language-count.tester.js
+++ b/services/github/github-language-count.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
t.create('language count').get('/badges/shields.json').expectBadge({
label: 'languages',
diff --git a/services/github/github-languages-base.js b/services/github/github-languages-base.js
index aa6dc250a606d..a7ece5512a862 100644
--- a/services/github/github-languages-base.js
+++ b/services/github/github-languages-base.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { nonNegativeInteger } = require('../validators')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import {nonNegativeInteger} from '../validators.js';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {errorMessagesFor} from './github-helpers.js';
/*
We're expecting a response like { "Python": 39624, "Shell": 104 }
@@ -25,4 +23,4 @@ class BaseGithubLanguage extends GithubAuthV3Service {
}
}
-module.exports = { BaseGithubLanguage }
+export default { BaseGithubLanguage };
diff --git a/services/github/github-last-commit.service.js b/services/github/github-last-commit.service.js
index 76f92fe72a159..e12c9245e02a6 100644
--- a/services/github/github-last-commit.service.js
+++ b/services/github/github-last-commit.service.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { formatDate } = require('../text-formatters')
-const { age: ageColor } = require('../color-formatters')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import {formatDate} from '../text-formatters.js';
+import {age as ageColor} from '../color-formatters.js';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const commonExampleAttrs = {
keywords: ['latest'],
documentation,
@@ -22,7 +20,7 @@ const schema = Joi.array()
)
.required()
-module.exports = class GithubLastCommit extends GithubAuthV3Service {
+export default class GithubLastCommit extends GithubAuthV3Service {
static category = 'activity'
static route = { base: 'github/last-commit', pattern: ':user/:repo/:branch*' }
static examples = [
@@ -71,4 +69,4 @@ module.exports = class GithubLastCommit extends GithubAuthV3Service {
const body = await this.fetch({ user, repo, branch })
return this.constructor.render({ commitDate: body[0].commit.author.date })
}
-}
+};
diff --git a/services/github/github-last-commit.tester.js b/services/github/github-last-commit.tester.js
index 5ee66e832de3e..516bac2fc1037 100644
--- a/services/github/github-last-commit.tester.js
+++ b/services/github/github-last-commit.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isFormattedDate } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isFormattedDate} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('last commit (recent)')
.get('/eslint/eslint.json')
diff --git a/services/github/github-lerna-json.service.js b/services/github/github-lerna-json.service.js
index 9fabd62df00c8..b114bbd396cff 100644
--- a/services/github/github-lerna-json.service.js
+++ b/services/github/github-lerna-json.service.js
@@ -1,17 +1,15 @@
-'use strict'
-
-const Joi = require('joi')
-const { renderVersionBadge } = require('../version')
-const { semver } = require('../validators')
-const { ConditionalGithubAuthV3Service } = require('./github-auth-service')
-const { fetchJsonFromRepo } = require('./github-common-fetch')
-const { documentation } = require('./github-helpers')
+import Joi from 'joi';
+import {renderVersionBadge} from '../version.js';
+import {semver} from '../validators.js';
+import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
+import {fetchJsonFromRepo} from './github-common-fetch.js';
+import {documentation} from './github-helpers.js';
const versionSchema = Joi.object({
version: Joi.alternatives().try(semver, Joi.equal('independent').required()),
}).required()
-module.exports = class GithubLernaJson extends ConditionalGithubAuthV3Service {
+export default class GithubLernaJson extends ConditionalGithubAuthV3Service {
static category = 'version'
static route = {
base: 'github/lerna-json/v',
@@ -58,4 +56,4 @@ module.exports = class GithubLernaJson extends ConditionalGithubAuthV3Service {
})
return this.constructor.render({ version, branch })
}
-}
+};
diff --git a/services/github/github-lerna-json.tester.js b/services/github/github-lerna-json.tester.js
index 907d16942b835..5768adafb0fe4 100644
--- a/services/github/github-lerna-json.tester.js
+++ b/services/github/github-lerna-json.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isSemver } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isSemver} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Lerna version').get('/facebook/jest.json').expectBadge({
label: 'lerna',
diff --git a/services/github/github-license.service.js b/services/github/github-license.service.js
index 0a628700f2fd0..ed038b3b4fc8e 100644
--- a/services/github/github-license.service.js
+++ b/services/github/github-license.service.js
@@ -1,16 +1,14 @@
-'use strict'
-
-const Joi = require('joi')
-const { renderLicenseBadge } = require('../licenses')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import {renderLicenseBadge} from '../licenses.js';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const schema = Joi.object({
// Some repos do not have a license, in which case GitHub returns `{ license: null }`.
license: Joi.object({ spdx_id: Joi.string().required() }).allow(null),
}).required()
-module.exports = class GithubLicense extends GithubAuthV3Service {
+export default class GithubLicense extends GithubAuthV3Service {
static category = 'license'
static route = { base: 'github/license', pattern: ':user/:repo' }
static examples = [
@@ -48,4 +46,4 @@ module.exports = class GithubLicense extends GithubAuthV3Service {
const license = licenseObject ? licenseObject.spdx_id : undefined
return this.constructor.render({ license })
}
-}
+};
diff --git a/services/github/github-license.spec.js b/services/github/github-license.spec.js
index 82359204cc8db..a80bb68b8504c 100644
--- a/services/github/github-license.spec.js
+++ b/services/github/github-license.spec.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const { test, given } = require('sazerac')
-const GithubLicense = require('./github-license.service')
+import {test, given} from 'sazerac';
+import GithubLicense from './github-license.service.js';
test(GithubLicense.render, () => {
given({ license: undefined }).expect({ message: 'not specified' })
diff --git a/services/github/github-license.tester.js b/services/github/github-license.tester.js
index 261b4b4126616..eca05279d32e3 100644
--- a/services/github/github-license.tester.js
+++ b/services/github/github-license.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { licenseToColor } = require('../licenses')
-const t = (module.exports = require('../tester').createServiceTester())
+import {licenseToColor} from '../licenses.js';
+const t = (function() {
+ export default __a;
+}())
const publicDomainLicenseColor = licenseToColor('CC0-1.0')
const unknownLicenseColor = licenseToColor()
diff --git a/services/github/github-manifest.service.js b/services/github/github-manifest.service.js
index 248397a730faa..3a76b954e60f9 100644
--- a/services/github/github-manifest.service.js
+++ b/services/github/github-manifest.service.js
@@ -1,15 +1,9 @@
-'use strict'
-
-const Joi = require('joi')
-const { renderVersionBadge } = require('../version')
-const {
- individualValueSchema,
- transformAndValidate,
- renderDynamicBadge,
-} = require('../dynamic-common')
-const { ConditionalGithubAuthV3Service } = require('./github-auth-service')
-const { fetchJsonFromRepo } = require('./github-common-fetch')
-const { documentation } = require('./github-helpers')
+import Joi from 'joi';
+import {renderVersionBadge} from '../version.js';
+import {individualValueSchema, transformAndValidate, renderDynamicBadge} from '../dynamic-common.js';
+import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
+import {fetchJsonFromRepo} from './github-common-fetch.js';
+import {documentation} from './github-helpers.js';
const schema = Joi.object({
version: individualValueSchema,
@@ -204,7 +198,7 @@ class DynamicGithubManifest extends ConditionalGithubAuthV3Service {
}
}
-module.exports = {
+export default {
GithubManifestVersion,
DynamicGithubManifest,
-}
+};
diff --git a/services/github/github-manifest.tester.js b/services/github/github-manifest.tester.js
index 77c1beb32df47..ecd397c6938a3 100644
--- a/services/github/github-manifest.tester.js
+++ b/services/github/github-manifest.tester.js
@@ -1,14 +1,10 @@
-'use strict'
+import Joi from 'joi';
+import {ServiceTester} from '../tester.js';
+import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
-const Joi = require('joi')
-const { ServiceTester } = require('../tester')
-const { isVPlusDottedVersionAtLeastOne } = require('../test-validators')
-
-const t = (module.exports = new ServiceTester({
- id: 'GithubManifest',
- title: 'GithubManifest',
- pathPrefix: '/github/manifest-json',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('Manifest version')
.get('/v/sindresorhus/show-all-github-issues.json')
diff --git a/services/github/github-milestone-detail.service.js b/services/github/github-milestone-detail.service.js
index c70aa58f705c3..3bebf1882a0fc 100644
--- a/services/github/github-milestone-detail.service.js
+++ b/services/github/github-milestone-detail.service.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const schema = Joi.object({
open_issues: nonNegativeInteger,
@@ -12,7 +10,7 @@ const schema = Joi.object({
title: Joi.string().required(),
}).required()
-module.exports = class GithubMilestoneDetail extends GithubAuthV3Service {
+export default class GithubMilestoneDetail extends GithubAuthV3Service {
static category = 'issue-tracking'
static route = {
base: 'github/milestones',
@@ -95,4 +93,4 @@ module.exports = class GithubMilestoneDetail extends GithubAuthV3Service {
const milestone = await this.fetch({ user, repo, number })
return this.constructor.render({ user, repo, variant, number, milestone })
}
-}
+};
diff --git a/services/github/github-milestone-detail.tester.js b/services/github/github-milestone-detail.tester.js
index e1ed8b5003247..bdd2e88cd29ea 100644
--- a/services/github/github-milestone-detail.tester.js
+++ b/services/github/github-milestone-detail.tester.js
@@ -1,11 +1,7 @@
-'use strict'
-
-const {
- isMetric,
- isMetricOverMetric,
- isIntegerPercentage,
-} = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric, isMetricOverMetric, isIntegerPercentage} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Milestone Open Issues')
.get('/issues-open/MacroPower/milestone-test/1.json')
diff --git a/services/github/github-milestone.service.js b/services/github/github-milestone.service.js
index d345f4ca2a527..744a05be2d7c7 100644
--- a/services/github/github-milestone.service.js
+++ b/services/github/github-milestone.service.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const schema = Joi.array()
.items(
@@ -13,7 +11,7 @@ const schema = Joi.array()
)
.required()
-module.exports = class GithubMilestone extends GithubAuthV3Service {
+export default class GithubMilestone extends GithubAuthV3Service {
static category = 'issue-tracking'
static route = {
base: 'github/milestones',
@@ -80,4 +78,4 @@ module.exports = class GithubMilestone extends GithubAuthV3Service {
const milestones = await this.fetch({ user, repo, variant })
return this.constructor.render({ user, repo, variant, milestones })
}
-}
+};
diff --git a/services/github/github-milestone.tester.js b/services/github/github-milestone.tester.js
index 30565326578ae..2c89773f265e0 100644
--- a/services/github/github-milestone.tester.js
+++ b/services/github/github-milestone.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('All Milestones')
.get('/all/MacroPower/milestone-test.json')
diff --git a/services/github/github-package-json.service.js b/services/github/github-package-json.service.js
index 9b8dc0004bac2..881384d300d45 100644
--- a/services/github/github-package-json.service.js
+++ b/services/github/github-package-json.service.js
@@ -1,19 +1,11 @@
-'use strict'
-
-const Joi = require('joi')
-const { renderVersionBadge } = require('../version')
-const {
- transformAndValidate,
- renderDynamicBadge,
-} = require('../dynamic-common')
-const {
- isPackageJsonWithDependencies,
- getDependencyVersion,
-} = require('../package-json-helpers')
-const { semver } = require('../validators')
-const { ConditionalGithubAuthV3Service } = require('./github-auth-service')
-const { fetchJsonFromRepo } = require('./github-common-fetch')
-const { documentation } = require('./github-helpers')
+import Joi from 'joi';
+import {renderVersionBadge} from '../version.js';
+import {transformAndValidate, renderDynamicBadge} from '../dynamic-common.js';
+import {isPackageJsonWithDependencies, getDependencyVersion} from '../package-json-helpers.js';
+import {semver} from '../validators.js';
+import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
+import {fetchJsonFromRepo} from './github-common-fetch.js';
+import {documentation} from './github-helpers.js';
const keywords = ['npm', 'node']
@@ -247,8 +239,8 @@ class DynamicGithubPackageJson extends ConditionalGithubAuthV3Service {
}
}
-module.exports = [
+export default [
GithubPackageJsonVersion,
GithubPackageJsonDependencyVersion,
DynamicGithubPackageJson,
-]
+];
diff --git a/services/github/github-package-json.tester.js b/services/github/github-package-json.tester.js
index 5a15ccd3be1bf..89976192ff273 100644
--- a/services/github/github-package-json.tester.js
+++ b/services/github/github-package-json.tester.js
@@ -1,15 +1,11 @@
-'use strict'
+import Joi from 'joi';
+import {ServiceTester} from '../tester.js';
+import {isSemver} from '../test-validators.js';
+import {semverRange} from '../validators.js';
-const Joi = require('joi')
-const { ServiceTester } = require('../tester')
-const { isSemver } = require('../test-validators')
-const { semverRange } = require('../validators')
-
-const t = (module.exports = new ServiceTester({
- id: 'GithubPackageJson',
- title: 'GithubPackageJson',
- pathPrefix: '/github/package-json',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('Package version').get('/v/badges/shields.json').expectBadge({
label: 'version',
diff --git a/services/github/github-pipenv.service.js b/services/github/github-pipenv.service.js
index a36b3cc92789d..daee298794125 100644
--- a/services/github/github-pipenv.service.js
+++ b/services/github/github-pipenv.service.js
@@ -1,12 +1,10 @@
-'use strict'
-
-const { renderVersionBadge } = require('../version')
-const { isLockfile, getDependencyVersion } = require('../pipenv-helpers')
-const { addv } = require('../text-formatters')
-const { NotFound } = require('..')
-const { ConditionalGithubAuthV3Service } = require('./github-auth-service')
-const { fetchJsonFromRepo } = require('./github-common-fetch')
-const { documentation: githubDocumentation } = require('./github-helpers')
+import {renderVersionBadge} from '../version.js';
+import {isLockfile, getDependencyVersion} from '../pipenv-helpers.js';
+import {addv} from '../text-formatters.js';
+import {NotFound} from '..';
+import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
+import {fetchJsonFromRepo} from './github-common-fetch.js';
+import {documentation as githubDocumentation} from './github-helpers.js';
const keywords = ['pipfile']
@@ -174,7 +172,7 @@ class GithubPipenvLockedDependencyVersion extends ConditionalGithubAuthV3Service
}
}
-module.exports = [
+export default [
GithubPipenvLockedPythonVersion,
GithubPipenvLockedDependencyVersion,
-]
+];
diff --git a/services/github/github-pipenv.tester.js b/services/github/github-pipenv.tester.js
index 9161c20625805..ab3d897c26b71 100644
--- a/services/github/github-pipenv.tester.js
+++ b/services/github/github-pipenv.tester.js
@@ -1,21 +1,14 @@
-'use strict'
-
-const Joi = require('joi')
-const { ServiceTester } = require('../tester')
-const {
- isVPlusDottedVersionAtLeastOne,
- isVPlusDottedVersionNClausesWithOptionalSuffix,
-} = require('../test-validators')
+import Joi from 'joi';
+import {ServiceTester} from '../tester.js';
+import {isVPlusDottedVersionAtLeastOne, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
// e.g. v19.3b0
const isBlackVersion = Joi.string().regex(/^v\d+(\.\d+)*(.*)?$/)
const isShortSha = Joi.string().regex(/[0-9a-f]{7}/)
-const t = (module.exports = new ServiceTester({
- id: 'GithubPipenv',
- title: 'GithubPipenv',
- pathPrefix: '/github/pipenv',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('Locked Python version')
.get('/locked/python-version/metabolize/rq-dashboard-on-heroku.json')
diff --git a/services/github/github-pull-request-check-state.service.js b/services/github/github-pull-request-check-state.service.js
index 4e0d1c861b685..36c73b6b68f4e 100644
--- a/services/github/github-pull-request-check-state.service.js
+++ b/services/github/github-pull-request-check-state.service.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const countBy = require('lodash.countby')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { fetchIssue } = require('./github-common-fetch')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import countBy from 'lodash.countby';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {fetchIssue} from './github-common-fetch.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const schema = Joi.object({
state: Joi.equal('failure', 'pending', 'success').required(),
@@ -19,7 +17,7 @@ const schema = Joi.object({
const keywords = ['pullrequest', 'detail']
-module.exports = class GithubPullRequestCheckState extends GithubAuthV3Service {
+export default class GithubPullRequestCheckState extends GithubAuthV3Service {
static category = 'build'
static route = {
base: 'github/status',
@@ -100,4 +98,4 @@ module.exports = class GithubPullRequestCheckState extends GithubAuthV3Service {
return this.constructor.render({ variant, state, stateCounts })
}
-}
+};
diff --git a/services/github/github-pull-request-check-state.tester.js b/services/github/github-pull-request-check-state.tester.js
index c1215a18c76d6..4ce5edd66c608 100644
--- a/services/github/github-pull-request-check-state.tester.js
+++ b/services/github/github-pull-request-check-state.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
t.create('github pull request check state')
.get('/s/pulls/badges/shields/1110.json')
diff --git a/services/github/github-r-package.service.js b/services/github/github-r-package.service.js
index 449a23e2bb0c9..f638e7174477b 100644
--- a/services/github/github-r-package.service.js
+++ b/services/github/github-r-package.service.js
@@ -1,11 +1,9 @@
-'use strict'
-
-const Joi = require('joi')
-const { renderVersionBadge } = require('../version')
-const { InvalidResponse } = require('..')
-const { ConditionalGithubAuthV3Service } = require('./github-auth-service')
-const { fetchRepoContent } = require('./github-common-fetch')
-const { documentation } = require('./github-helpers')
+import Joi from 'joi';
+import {renderVersionBadge} from '../version.js';
+import {InvalidResponse} from '..';
+import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
+import {fetchRepoContent} from './github-common-fetch.js';
+import {documentation} from './github-helpers.js';
const queryParamSchema = Joi.object({
filename: Joi.string(),
@@ -13,7 +11,7 @@ const queryParamSchema = Joi.object({
const versionRegExp = /^Version:[\s]*(.+)$/m
-module.exports = class GithubRPackageVersion extends (
+export default class GithubRPackageVersion extends (
ConditionalGithubAuthV3Service
) {
static category = 'version'
@@ -90,4 +88,4 @@ module.exports = class GithubRPackageVersion extends (
const { version } = this.constructor.transform(content, filename)
return this.constructor.render({ version, branch })
}
-}
+};
diff --git a/services/github/github-r-package.spec.js b/services/github/github-r-package.spec.js
index 8bf77d8728712..67d39fd3a79c5 100644
--- a/services/github/github-r-package.spec.js
+++ b/services/github/github-r-package.spec.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const { expect } = require('chai')
-const { test, given } = require('sazerac')
-const { InvalidResponse } = require('..')
-const GithubRPackageVersion = require('./github-r-package.service')
+import {expect} from 'chai';
+import {test, given} from 'sazerac';
+import {InvalidResponse} from '..';
+import GithubRPackageVersion from './github-r-package.service.js';
describe('GithubRPackageVersion', function () {
const content = versionLine =>
diff --git a/services/github/github-r-package.tester.js b/services/github/github-r-package.tester.js
index 01d1511674610..4009c65a96376 100644
--- a/services/github/github-r-package.tester.js
+++ b/services/github/github-r-package.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isVPlusDottedVersionAtLeastOne } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('R package version').get('/mixOmicsTeam/mixOmics.json').expectBadge({
label: 'R',
diff --git a/services/github/github-release-date.service.js b/services/github/github-release-date.service.js
index acca83b2c0e60..2eddcb77dce29 100644
--- a/services/github/github-release-date.service.js
+++ b/services/github/github-release-date.service.js
@@ -1,11 +1,9 @@
-'use strict'
-
-const moment = require('moment')
-const Joi = require('joi')
-const { age } = require('../color-formatters')
-const { formatDate } = require('../text-formatters')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import moment from 'moment';
+import Joi from 'joi';
+import {age} from '../color-formatters.js';
+import {formatDate} from '../text-formatters.js';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const schema = Joi.alternatives(
Joi.object({
@@ -20,7 +18,7 @@ const schema = Joi.alternatives(
.min(1)
)
-module.exports = class GithubReleaseDate extends GithubAuthV3Service {
+export default class GithubReleaseDate extends GithubAuthV3Service {
static category = 'activity'
static route = {
base: 'github',
@@ -79,4 +77,4 @@ module.exports = class GithubReleaseDate extends GithubAuthV3Service {
}
return this.constructor.render({ date: body.created_at })
}
-}
+};
diff --git a/services/github/github-release-date.tester.js b/services/github/github-release-date.tester.js
index 314edaca0ae3c..7c83c8944f2e1 100644
--- a/services/github/github-release-date.tester.js
+++ b/services/github/github-release-date.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isFormattedDate } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isFormattedDate} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Release Date. e.g release date|today')
.get('/release-date/mochajs/mocha.json')
diff --git a/services/github/github-release.service.js b/services/github/github-release.service.js
index 1329ab06ce80b..71ba4dbcdb5aa 100644
--- a/services/github/github-release.service.js
+++ b/services/github/github-release.service.js
@@ -1,14 +1,9 @@
-'use strict'
-
-const { addv } = require('../text-formatters')
-const { version: versionColor } = require('../color-formatters')
-const { redirector } = require('..')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const {
- fetchLatestRelease,
- queryParamSchema,
-} = require('./github-common-release')
-const { documentation } = require('./github-helpers')
+import {addv} from '../text-formatters.js';
+import {version as versionColor} from '../color-formatters.js';
+import {redirector} from '..';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {fetchLatestRelease, queryParamSchema} from './github-common-release.js';
+import {documentation} from './github-helpers.js';
class GithubRelease extends GithubAuthV3Service {
static category = 'version'
@@ -122,7 +117,7 @@ const redirects = {
}),
}
-module.exports = {
+export default {
GithubRelease,
...redirects,
-}
+};
diff --git a/services/github/github-release.tester.js b/services/github/github-release.tester.js
index 6fa28a54853de..943e2629841bd 100644
--- a/services/github/github-release.tester.js
+++ b/services/github/github-release.tester.js
@@ -1,14 +1,10 @@
-'use strict'
+import Joi from 'joi';
+import {isSemver} from '../test-validators.js';
+import {ServiceTester} from '../tester.js';
-const Joi = require('joi')
-const { isSemver } = require('../test-validators')
-const { ServiceTester } = require('../tester')
-
-const t = (module.exports = new ServiceTester({
- id: 'GithubRelease',
- title: 'Github Release',
- pathPrefix: '/github',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('Release')
.get('/v/release/expressjs/express.json')
diff --git a/services/github/github-repo-size.service.js b/services/github/github-repo-size.service.js
index f581076bf307a..d4455699de286 100644
--- a/services/github/github-repo-size.service.js
+++ b/services/github/github-repo-size.service.js
@@ -1,16 +1,14 @@
-'use strict'
-
-const Joi = require('joi')
-const prettyBytes = require('pretty-bytes')
-const { nonNegativeInteger } = require('../validators')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import prettyBytes from 'pretty-bytes';
+import {nonNegativeInteger} from '../validators.js';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const schema = Joi.object({
size: nonNegativeInteger,
}).required()
-module.exports = class GithubRepoSize extends GithubAuthV3Service {
+export default class GithubRepoSize extends GithubAuthV3Service {
static category = 'size'
static route = { base: 'github/repo-size', pattern: ':user/:repo' }
static examples = [
@@ -47,4 +45,4 @@ module.exports = class GithubRepoSize extends GithubAuthV3Service {
const { size } = await this.fetch({ user, repo })
return this.constructor.render({ size })
}
-}
+};
diff --git a/services/github/github-repo-size.tester.js b/services/github/github-repo-size.tester.js
index 5d1e43da21171..da364e189d345 100644
--- a/services/github/github-repo-size.tester.js
+++ b/services/github/github-repo-size.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isFileSize } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isFileSize} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('repository size').get('/badges/shields.json').expectBadge({
label: 'repo size',
diff --git a/services/github/github-search.service.js b/services/github/github-search.service.js
index f8f9d9ddd9d51..c927a4efbcebb 100644
--- a/services/github/github-search.service.js
+++ b/services/github/github-search.service.js
@@ -1,14 +1,12 @@
-'use strict'
-
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { errorMessagesFor, documentation } = require('./github-helpers')
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {errorMessagesFor, documentation} from './github-helpers.js';
const schema = Joi.object({ total_count: nonNegativeInteger }).required()
-module.exports = class GithubSearch extends GithubAuthV3Service {
+export default class GithubSearch extends GithubAuthV3Service {
static category = 'analysis'
static route = {
@@ -55,4 +53,4 @@ module.exports = class GithubSearch extends GithubAuthV3Service {
})
return this.constructor.render({ query, totalCount })
}
-}
+};
diff --git a/services/github/github-search.tester.js b/services/github/github-search.tester.js
index 83dd403194404..73b47ad1286d9 100644
--- a/services/github/github-search.tester.js
+++ b/services/github/github-search.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('hit counter')
.get('/badges/shields/async%20handle.json')
diff --git a/services/github/github-size.service.js b/services/github/github-size.service.js
index 97237a81579f7..9eeb1603690dc 100644
--- a/services/github/github-size.service.js
+++ b/services/github/github-size.service.js
@@ -1,11 +1,9 @@
-'use strict'
-
-const Joi = require('joi')
-const prettyBytes = require('pretty-bytes')
-const { nonNegativeInteger } = require('../validators')
-const { NotFound } = require('..')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import prettyBytes from 'pretty-bytes';
+import {nonNegativeInteger} from '../validators.js';
+import {NotFound} from '..';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const schema = Joi.alternatives(
Joi.object({
@@ -14,7 +12,7 @@ const schema = Joi.alternatives(
Joi.array().required()
)
-module.exports = class GithubSize extends GithubAuthV3Service {
+export default class GithubSize extends GithubAuthV3Service {
static category = 'size'
static route = {
@@ -58,4 +56,4 @@ module.exports = class GithubSize extends GithubAuthV3Service {
}
return this.constructor.render({ size: body.size })
}
-}
+};
diff --git a/services/github/github-size.tester.js b/services/github/github-size.tester.js
index 9645a469eee22..20f5e463deeba 100644
--- a/services/github/github-size.tester.js
+++ b/services/github/github-size.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isFileSize } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isFileSize} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('File size')
.get('/webcaetano/craft/build/phaser-craft.min.js.json')
diff --git a/services/github/github-sponsors.service.js b/services/github/github-sponsors.service.js
index 6a465bdceb0d5..b8512918cdf8c 100644
--- a/services/github/github-sponsors.service.js
+++ b/services/github/github-sponsors.service.js
@@ -1,12 +1,10 @@
-'use strict'
-
-const gql = require('graphql-tag')
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { NotFound } = require('..')
-const { GithubAuthV4Service } = require('./github-auth-service')
-const { documentation, transformErrors } = require('./github-helpers')
+import gql from 'graphql-tag';
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {NotFound} from '..';
+import {GithubAuthV4Service} from './github-auth-service.js';
+import {documentation, transformErrors} from './github-helpers.js';
const schema = Joi.object({
data: Joi.object({
@@ -18,7 +16,7 @@ const schema = Joi.object({
}).required(),
}).required()
-module.exports = class GithubSponsors extends GithubAuthV4Service {
+export default class GithubSponsors extends GithubAuthV4Service {
static category = 'funding'
static route = { base: 'github/sponsors', pattern: ':user' }
static examples = [
@@ -81,4 +79,4 @@ module.exports = class GithubSponsors extends GithubAuthV4Service {
count,
})
}
-}
+};
diff --git a/services/github/github-sponsors.tester.js b/services/github/github-sponsors.tester.js
index ebe0cd50c1759..e5464b52c9065 100644
--- a/services/github/github-sponsors.tester.js
+++ b/services/github/github-sponsors.tester.js
@@ -1,13 +1,9 @@
-'use strict'
+import {isMetric} from '../test-validators.js';
+import {ServiceTester} from '../tester.js';
-const { isMetric } = require('../test-validators')
-const { ServiceTester } = require('../tester')
-
-const t = (module.exports = new ServiceTester({
- id: 'GithubSponsors',
- title: 'Github Sponsors',
- pathPrefix: '/github',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('Sponsors').get('/sponsors/Homebrew.json').expectBadge({
label: 'sponsors',
diff --git a/services/github/github-stars.service.js b/services/github/github-stars.service.js
index 49ce512086724..28c1d99943829 100644
--- a/services/github/github-stars.service.js
+++ b/services/github/github-stars.service.js
@@ -1,16 +1,14 @@
-'use strict'
-
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const schema = Joi.object({
stargazers_count: nonNegativeInteger,
}).required()
-module.exports = class GithubStars extends GithubAuthV3Service {
+export default class GithubStars extends GithubAuthV3Service {
static category = 'social'
static route = {
@@ -62,4 +60,4 @@ module.exports = class GithubStars extends GithubAuthV3Service {
})
return this.constructor.render({ user, repo, stars })
}
-}
+};
diff --git a/services/github/github-stars.tester.js b/services/github/github-stars.tester.js
index fda46a39d1c27..e821445773365 100644
--- a/services/github/github-stars.tester.js
+++ b/services/github/github-stars.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Stars')
.get('/badges/shields.json')
diff --git a/services/github/github-tag.service.js b/services/github/github-tag.service.js
index c0475651a43cc..8731caa094e64 100644
--- a/services/github/github-tag.service.js
+++ b/services/github/github-tag.service.js
@@ -1,14 +1,12 @@
-'use strict'
-
-const gql = require('graphql-tag')
-const Joi = require('joi')
-const { addv } = require('../text-formatters')
-const { version: versionColor } = require('../color-formatters')
-const { latest } = require('../version')
-const { NotFound, redirector } = require('..')
-const { GithubAuthV4Service } = require('./github-auth-service')
-const { queryParamSchema } = require('./github-common-release')
-const { documentation, transformErrors } = require('./github-helpers')
+import gql from 'graphql-tag';
+import Joi from 'joi';
+import {addv} from '../text-formatters.js';
+import {version as versionColor} from '../color-formatters.js';
+import {latest} from '../version.js';
+import {NotFound, redirector} from '..';
+import {GithubAuthV4Service} from './github-auth-service.js';
+import {queryParamSchema} from './github-common-release.js';
+import {documentation, transformErrors} from './github-helpers.js';
const schema = Joi.object({
data: Joi.object({
@@ -163,7 +161,7 @@ const redirects = {
}),
}
-module.exports = {
+export default {
GithubTag,
...redirects,
-}
+};
diff --git a/services/github/github-tag.spec.js b/services/github/github-tag.spec.js
index 88ebf8b83889a..c396eb4a8ec04 100644
--- a/services/github/github-tag.spec.js
+++ b/services/github/github-tag.spec.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const { test, given } = require('sazerac')
-const { GithubTag } = require('./github-tag.service')
+import {test, given} from 'sazerac';
+import {GithubTag} from './github-tag.service.js';
describe('GithubTag', function () {
test(GithubTag.getLatestTag, () => {
diff --git a/services/github/github-tag.tester.js b/services/github/github-tag.tester.js
index 030eb3283e27c..f9cbd2311374f 100644
--- a/services/github/github-tag.tester.js
+++ b/services/github/github-tag.tester.js
@@ -1,14 +1,10 @@
-'use strict'
+import Joi from 'joi';
+import {isSemver} from '../test-validators.js';
+import {ServiceTester} from '../tester.js';
-const Joi = require('joi')
-const { isSemver } = require('../test-validators')
-const { ServiceTester } = require('../tester')
-
-const t = (module.exports = new ServiceTester({
- id: 'GithubTag',
- title: 'Github Tag',
- pathPrefix: '/github',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('Tag')
.get('/v/tag/expressjs/express.json')
diff --git a/services/github/github-top-language.service.js b/services/github/github-top-language.service.js
index 9c96e95b64b71..56e9008ff08c0 100644
--- a/services/github/github-top-language.service.js
+++ b/services/github/github-top-language.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import {BaseGithubLanguage} from './github-languages-base.js';
+import {documentation} from './github-helpers.js';
-const { BaseGithubLanguage } = require('./github-languages-base')
-const { documentation } = require('./github-helpers')
-
-module.exports = class GithubTopLanguage extends BaseGithubLanguage {
+export default class GithubTopLanguage extends BaseGithubLanguage {
static category = 'analysis'
static route = {
@@ -51,4 +49,4 @@ module.exports = class GithubTopLanguage extends BaseGithubLanguage {
totalSize: this.getTotalSize(data),
})
}
-}
+};
diff --git a/services/github/github-top-language.tester.js b/services/github/github-top-language.tester.js
index 348d0dbf2c5d5..00fecd2bc0df8 100644
--- a/services/github/github-top-language.tester.js
+++ b/services/github/github-top-language.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
t.create('top language')
.get('/badges/shields.json')
diff --git a/services/github/github-total-star.service.js b/services/github/github-total-star.service.js
index 705f5123545e5..d025727bb3c7b 100644
--- a/services/github/github-total-star.service.js
+++ b/services/github/github-total-star.service.js
@@ -1,14 +1,9 @@
-'use strict'
-
-const Joi = require('joi')
-const gql = require('graphql-tag')
-const { nonNegativeInteger } = require('../validators')
-const { metric } = require('../text-formatters')
-const { GithubAuthV4Service } = require('./github-auth-service')
-const {
- documentation: commonDocumentation,
- transformErrors,
-} = require('./github-helpers')
+import Joi from 'joi';
+import gql from 'graphql-tag';
+import {nonNegativeInteger} from '../validators.js';
+import {metric} from '../text-formatters.js';
+import {GithubAuthV4Service} from './github-auth-service.js';
+import {documentation as commonDocumentation, transformErrors} from './github-helpers.js';
const MAX_REPO_LIMIT = 200
@@ -133,7 +128,7 @@ const queryParamSchema = Joi.object({
affiliations: Joi.string().default('OWNER').custom(validateAffiliations),
}).required()
-module.exports = class GithubTotalStarService extends GithubAuthV4Service {
+export default class GithubTotalStarService extends GithubAuthV4Service {
static defaultLabel = 'stars'
static category = 'social'
@@ -243,4 +238,4 @@ module.exports = class GithubTotalStarService extends GithubAuthV4Service {
const totalStars = await this.getTotalStars({ user }, queryParams)
return this.constructor.render({ totalStars, user })
}
-}
+};
diff --git a/services/github/github-total-star.tester.js b/services/github/github-total-star.tester.js
index 3f4e106746453..90134584eb0f4 100644
--- a/services/github/github-total-star.tester.js
+++ b/services/github/github-total-star.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Stars (User)')
.get('/hemantsonu20.json')
diff --git a/services/github/github-watchers.service.js b/services/github/github-watchers.service.js
index 84b1797c23f45..091e5236efa12 100644
--- a/services/github/github-watchers.service.js
+++ b/services/github/github-watchers.service.js
@@ -1,16 +1,14 @@
-'use strict'
-
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { GithubAuthV3Service } = require('./github-auth-service')
-const { documentation, errorMessagesFor } = require('./github-helpers')
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {GithubAuthV3Service} from './github-auth-service.js';
+import {documentation, errorMessagesFor} from './github-helpers.js';
const schema = Joi.object({
subscribers_count: nonNegativeInteger,
}).required()
-module.exports = class GithubWatchers extends GithubAuthV3Service {
+export default class GithubWatchers extends GithubAuthV3Service {
static category = 'social'
static route = {
@@ -61,4 +59,4 @@ module.exports = class GithubWatchers extends GithubAuthV3Service {
})
return this.constructor.render({ user, repo, watchers })
}
-}
+};
diff --git a/services/github/github-watchers.tester.js b/services/github/github-watchers.tester.js
index 6d58e6ed85b14..2dd702cad9fe9 100644
--- a/services/github/github-watchers.tester.js
+++ b/services/github/github-watchers.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
t.create('Watchers')
.get('/badges/shields.json')
diff --git a/services/github/github-workflow-status.service.js b/services/github/github-workflow-status.service.js
index bdcbd4056870f..85aa3b27f9d9b 100644
--- a/services/github/github-workflow-status.service.js
+++ b/services/github/github-workflow-status.service.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { isBuildStatus, renderBuildStatusBadge } = require('../build-status')
-const { BaseSvgScrapingService } = require('..')
-const { documentation } = require('./github-helpers')
+import Joi from 'joi';
+import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
+import {BaseSvgScrapingService} from '..';
+import {documentation} from './github-helpers.js';
const schema = Joi.object({
message: Joi.alternatives()
@@ -17,7 +15,7 @@ const queryParamSchema = Joi.object({
const keywords = ['action', 'actions']
-module.exports = class GithubWorkflowStatus extends BaseSvgScrapingService {
+export default class GithubWorkflowStatus extends BaseSvgScrapingService {
static category = 'build'
static route = {
@@ -99,4 +97,4 @@ module.exports = class GithubWorkflowStatus extends BaseSvgScrapingService {
const { status } = await this.fetch({ user, repo, workflow, branch, event })
return renderBuildStatusBadge({ status })
}
-}
+};
diff --git a/services/github/github-workflow-status.tester.js b/services/github/github-workflow-status.tester.js
index 380823e4b59f9..6eadf4ba26b9f 100644
--- a/services/github/github-workflow-status.tester.js
+++ b/services/github/github-workflow-status.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { isBuildStatus } = require('../build-status')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+import {isBuildStatus} from '../build-status.js';
+const t = (function() {
+ export default __a;
+}())
const isWorkflowStatus = Joi.alternatives()
.try(isBuildStatus, Joi.equal('no status'))
diff --git a/services/gitlab/gitlab-coverage.service.js b/services/gitlab/gitlab-coverage.service.js
index 8f69c62c84873..f35d42583b569 100644
--- a/services/gitlab/gitlab-coverage.service.js
+++ b/services/gitlab/gitlab-coverage.service.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { coveragePercentage } = require('../color-formatters')
-const { optionalUrl } = require('../validators')
-const { BaseSvgScrapingService, NotFound } = require('..')
+import Joi from 'joi';
+import {coveragePercentage} from '../color-formatters.js';
+import {optionalUrl} from '../validators.js';
+import {BaseSvgScrapingService, NotFound} from '..';
const schema = Joi.object({
message: Joi.string()
@@ -38,7 +36,7 @@ Also make sure you have set up code covrage parsing as described {
diff --git a/services/liberapay/liberapay-goal.tester.js b/services/liberapay/liberapay-goal.tester.js
index a340d4d5e5b48..47b8f333a8693 100644
--- a/services/liberapay/liberapay-goal.tester.js
+++ b/services/liberapay/liberapay-goal.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isIntegerPercentage } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isIntegerPercentage} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Goal Progress (valid)').get('/Liberapay.json').expectBadge({
label: 'goal progress',
diff --git a/services/liberapay/liberapay-patrons.service.js b/services/liberapay/liberapay-patrons.service.js
index 0bcb1ac74a4fc..e0f46649774b2 100644
--- a/services/liberapay/liberapay-patrons.service.js
+++ b/services/liberapay/liberapay-patrons.service.js
@@ -1,10 +1,8 @@
-'use strict'
+import {metric} from '../text-formatters.js';
+import {colorScale} from '../color-formatters.js';
+import {LiberapayBase} from './liberapay-base.js';
-const { metric } = require('../text-formatters')
-const { colorScale } = require('../color-formatters')
-const { LiberapayBase } = require('./liberapay-base')
-
-module.exports = class LiberapayPatrons extends LiberapayBase {
+export default class LiberapayPatrons extends LiberapayBase {
static route = this.buildRoute('patrons')
static examples = [
@@ -27,4 +25,4 @@ module.exports = class LiberapayPatrons extends LiberapayBase {
const data = await this.fetch({ entity })
return this.constructor.render({ patrons: data.npatrons })
}
-}
+};
diff --git a/services/liberapay/liberapay-patrons.tester.js b/services/liberapay/liberapay-patrons.tester.js
index 5eee881d67bb2..646019a7eab6e 100644
--- a/services/liberapay/liberapay-patrons.tester.js
+++ b/services/liberapay/liberapay-patrons.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Patrons (valid)').get('/Liberapay.json').expectBadge({
label: 'patrons',
diff --git a/services/liberapay/liberapay-receives.service.js b/services/liberapay/liberapay-receives.service.js
index b3cf59d91a414..c6953de1ecdee 100644
--- a/services/liberapay/liberapay-receives.service.js
+++ b/services/liberapay/liberapay-receives.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import {InvalidResponse} from '..';
+import {renderCurrencyBadge, LiberapayBase} from './liberapay-base.js';
-const { InvalidResponse } = require('..')
-const { renderCurrencyBadge, LiberapayBase } = require('./liberapay-base')
-
-module.exports = class LiberapayReceives extends LiberapayBase {
+export default class LiberapayReceives extends LiberapayBase {
static route = this.buildRoute('receives')
static examples = [
@@ -30,4 +28,4 @@ module.exports = class LiberapayReceives extends LiberapayBase {
throw new InvalidResponse({ prettyMessage: 'no public receiving stats' })
}
}
-}
+};
diff --git a/services/liberapay/liberapay-receives.tester.js b/services/liberapay/liberapay-receives.tester.js
index d2b7a71e4f51d..b2cfb1eb227a6 100644
--- a/services/liberapay/liberapay-receives.tester.js
+++ b/services/liberapay/liberapay-receives.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { isCurrencyOverTime } = require('./liberapay-base')
+const t = (function() {
+ export default __a;
+}())
+import {isCurrencyOverTime} from './liberapay-base.js';
t.create('Receiving (valid)').get('/Changaco.json').expectBadge({
label: 'receives',
diff --git a/services/librariesio/librariesio-common.js b/services/librariesio/librariesio-common.js
index 7421be27f0536..7e1f09cce113f 100644
--- a/services/librariesio/librariesio-common.js
+++ b/services/librariesio/librariesio-common.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const Joi = require('joi')
-const { nonNegativeInteger, anyInteger } = require('../validators')
+import Joi from 'joi';
+import {nonNegativeInteger, anyInteger} from '../validators.js';
// API doc: https://libraries.io/api#project
const projectSchema = Joi.object({
@@ -21,6 +19,6 @@ async function fetchProject(serviceInstance, { platform, scope, packageName }) {
})
}
-module.exports = {
+export default {
fetchProject,
-}
+};
diff --git a/services/librariesio/librariesio-dependencies-helpers.js b/services/librariesio/librariesio-dependencies-helpers.js
index f9bf0b1908ca5..41fcfc890c38f 100644
--- a/services/librariesio/librariesio-dependencies-helpers.js
+++ b/services/librariesio/librariesio-dependencies-helpers.js
@@ -1,5 +1,3 @@
-'use strict'
-
function transform({ dependencies }) {
return {
deprecatedCount: dependencies.filter(dep => dep.deprecated).length,
@@ -28,4 +26,4 @@ function renderDependenciesBadge({ deprecatedCount, outdatedCount }) {
}
}
-module.exports = { transform, renderDependenciesBadge }
+export default { transform, renderDependenciesBadge };
diff --git a/services/librariesio/librariesio-dependencies-helpers.spec.js b/services/librariesio/librariesio-dependencies-helpers.spec.js
index e073352b1cbbc..2badbbf90d5b4 100644
--- a/services/librariesio/librariesio-dependencies-helpers.spec.js
+++ b/services/librariesio/librariesio-dependencies-helpers.spec.js
@@ -1,9 +1,5 @@
-'use strict'
-
-const { test, given, forCases } = require('sazerac')
-const {
- renderDependenciesBadge,
-} = require('./librariesio-dependencies-helpers')
+import {test, given, forCases} from 'sazerac';
+import {renderDependenciesBadge} from './librariesio-dependencies-helpers.js';
describe('Libraries.io dependency helpers', function () {
test(renderDependenciesBadge, () => {
diff --git a/services/librariesio/librariesio-dependencies.service.js b/services/librariesio/librariesio-dependencies.service.js
index 2b30e4453c05b..c91e02020b06e 100644
--- a/services/librariesio/librariesio-dependencies.service.js
+++ b/services/librariesio/librariesio-dependencies.service.js
@@ -1,11 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseJsonService } = require('..')
-const {
- transform,
- renderDependenciesBadge,
-} = require('./librariesio-dependencies-helpers')
+import Joi from 'joi';
+import {BaseJsonService} from '..';
+import {transform, renderDependenciesBadge} from './librariesio-dependencies-helpers.js';
const schema = Joi.object({
dependencies: Joi.array()
@@ -134,4 +129,4 @@ class LibrariesIoRepoDependencies extends BaseJsonService {
}
}
-module.exports = [LibrariesIoProjectDependencies, LibrariesIoRepoDependencies]
+export default [LibrariesIoProjectDependencies, LibrariesIoRepoDependencies];
diff --git a/services/librariesio/librariesio-dependencies.tester.js b/services/librariesio/librariesio-dependencies.tester.js
index 45bcabddbe6d7..c4d5eb02baa8d 100644
--- a/services/librariesio/librariesio-dependencies.tester.js
+++ b/services/librariesio/librariesio-dependencies.tester.js
@@ -1,12 +1,8 @@
-'use strict'
-
-const { ServiceTester } = require('../tester')
-const { isDependencyState } = require('../test-validators')
-const t = (module.exports = new ServiceTester({
- id: 'LibrariesIoDependencies',
- title: 'LibrariesIoDependencies',
- pathPrefix: '/librariesio',
-}))
+import {ServiceTester} from '../tester.js';
+import {isDependencyState} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('dependencies for package (project name contains dot)')
.timeout(10000)
diff --git a/services/librariesio/librariesio-dependent-repos.service.js b/services/librariesio/librariesio-dependent-repos.service.js
index 8d19449d58540..e5e727e989453 100644
--- a/services/librariesio/librariesio-dependent-repos.service.js
+++ b/services/librariesio/librariesio-dependent-repos.service.js
@@ -1,11 +1,9 @@
-'use strict'
-
-const { metric } = require('../text-formatters')
-const { BaseJsonService } = require('..')
-const { fetchProject } = require('./librariesio-common')
+import {metric} from '../text-formatters.js';
+import {BaseJsonService} from '..';
+import {fetchProject} from './librariesio-common.js';
// https://libraries.io/api#project-dependent-repositories
-module.exports = class LibrariesIoDependentRepos extends BaseJsonService {
+export default class LibrariesIoDependentRepos extends BaseJsonService {
static category = 'other'
static route = {
@@ -57,4 +55,4 @@ module.exports = class LibrariesIoDependentRepos extends BaseJsonService {
)
return this.constructor.render({ dependentReposCount })
}
-}
+};
diff --git a/services/librariesio/librariesio-dependent-repos.tester.js b/services/librariesio/librariesio-dependent-repos.tester.js
index f15fe079cda71..61e08195533e0 100644
--- a/services/librariesio/librariesio-dependent-repos.tester.js
+++ b/services/librariesio/librariesio-dependent-repos.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('dependent repo count')
.timeout(10000)
diff --git a/services/librariesio/librariesio-dependents.service.js b/services/librariesio/librariesio-dependents.service.js
index 9f849206e0ae0..772903a459c45 100644
--- a/services/librariesio/librariesio-dependents.service.js
+++ b/services/librariesio/librariesio-dependents.service.js
@@ -1,11 +1,9 @@
-'use strict'
-
-const { metric } = require('../text-formatters')
-const { BaseJsonService } = require('..')
-const { fetchProject } = require('./librariesio-common')
+import {metric} from '../text-formatters.js';
+import {BaseJsonService} from '..';
+import {fetchProject} from './librariesio-common.js';
// https://libraries.io/api#project-dependents
-module.exports = class LibrariesIoDependents extends BaseJsonService {
+export default class LibrariesIoDependents extends BaseJsonService {
static category = 'other'
static route = {
@@ -54,4 +52,4 @@ module.exports = class LibrariesIoDependents extends BaseJsonService {
})
return this.constructor.render({ dependentCount })
}
-}
+};
diff --git a/services/librariesio/librariesio-dependents.tester.js b/services/librariesio/librariesio-dependents.tester.js
index a0b6a24d7ba28..34729a06c23b3 100644
--- a/services/librariesio/librariesio-dependents.tester.js
+++ b/services/librariesio/librariesio-dependents.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('dependent count').timeout(10000).get('/npm/got.json').expectBadge({
label: 'dependents',
diff --git a/services/librariesio/librariesio-sourcerank.service.js b/services/librariesio/librariesio-sourcerank.service.js
index 98881416b919f..48b0c1b326e0c 100644
--- a/services/librariesio/librariesio-sourcerank.service.js
+++ b/services/librariesio/librariesio-sourcerank.service.js
@@ -1,12 +1,10 @@
-'use strict'
-
-const { colorScale } = require('../color-formatters')
-const { BaseJsonService } = require('..')
-const { fetchProject } = require('./librariesio-common')
+import {colorScale} from '../color-formatters.js';
+import {BaseJsonService} from '..';
+import {fetchProject} from './librariesio-common.js';
const sourceRankColor = colorScale([10, 15, 20, 25, 30])
-module.exports = class LibrariesIoSourcerank extends BaseJsonService {
+export default class LibrariesIoSourcerank extends BaseJsonService {
static category = 'rating'
static route = {
@@ -55,4 +53,4 @@ module.exports = class LibrariesIoSourcerank extends BaseJsonService {
})
return this.constructor.render({ rank })
}
-}
+};
diff --git a/services/librariesio/librariesio-sourcerank.tester.js b/services/librariesio/librariesio-sourcerank.tester.js
index c76d302dc520c..efe0d72a1c11e 100644
--- a/services/librariesio/librariesio-sourcerank.tester.js
+++ b/services/librariesio/librariesio-sourcerank.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { anyInteger } = require('../validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {anyInteger} from '../validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('sourcerank').timeout(10000).get('/npm/got.json').expectBadge({
label: 'sourcerank',
diff --git a/services/libscore/libscore.service.js b/services/libscore/libscore.service.js
index 6dd0a755a9aae..4febb62f60217 100644
--- a/services/libscore/libscore.service.js
+++ b/services/libscore/libscore.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {deprecatedService} from '..';
-const { deprecatedService } = require('..')
-
-module.exports = deprecatedService({
+export default deprecatedService({
category: 'rating',
route: {
base: 'libscore/s',
@@ -10,4 +8,4 @@ module.exports = deprecatedService({
},
label: 'libscore',
dateAdded: new Date('2018-09-22'),
-})
+});
diff --git a/services/libscore/libscore.tester.js b/services/libscore/libscore.tester.js
index 223e8b3d58962..fac80525912e9 100644
--- a/services/libscore/libscore.tester.js
+++ b/services/libscore/libscore.tester.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const { ServiceTester } = require('../tester')
+import {ServiceTester} from '../tester.js';
const t = new ServiceTester({ id: 'libscore', title: 'libscore' })
-module.exports = t
+export default t;
t.create('no longer available (previously usage statistics)')
.get('/s/jQuery.json')
diff --git a/services/licenses.js b/services/licenses.js
index b6efcb8ae0d15..6782d6ff81cc3 100644
--- a/services/licenses.js
+++ b/services/licenses.js
@@ -1,6 +1,4 @@
-'use strict'
-
-const toArray = require('../core/base-service/to-array')
+import toArray from '../core/base-service/to-array.js';
const licenseTypes = {
// permissive licenses - not public domain and not copyleft
@@ -130,4 +128,4 @@ function renderLicenseBadge({ license, licenses }) {
}
}
-module.exports = { licenseToColor, renderLicenseBadge }
+export default { licenseToColor, renderLicenseBadge };
diff --git a/services/licenses.spec.js b/services/licenses.spec.js
index 58e95285b6496..c7044e83937b0 100644
--- a/services/licenses.spec.js
+++ b/services/licenses.spec.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const { test, given, forCases } = require('sazerac')
-const { licenseToColor, renderLicenseBadge } = require('./licenses')
+import {test, given, forCases} from 'sazerac';
+import {licenseToColor, renderLicenseBadge} from './licenses.js';
describe('license helpers', function () {
test(licenseToColor, () => {
diff --git a/services/localizely/localizely.service.js b/services/localizely/localizely.service.js
index d29d50d658125..46e5b82677fed 100644
--- a/services/localizely/localizely.service.js
+++ b/services/localizely/localizely.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseJsonService, InvalidResponse } = require('..')
-const { coveragePercentage } = require('../color-formatters')
+import Joi from 'joi';
+import {BaseJsonService, InvalidResponse} from '..';
+import {coveragePercentage} from '../color-formatters.js';
const keywords = [
'l10n',
@@ -51,7 +49,7 @@ const queryParamSchema = Joi.object({
languageCode: Joi.string().regex(/^[a-z]{2}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$/),
}).required()
-module.exports = class Localizely extends BaseJsonService {
+export default class Localizely extends BaseJsonService {
static category = 'other'
static route = {
@@ -143,4 +141,4 @@ module.exports = class Localizely extends BaseJsonService {
return this.constructor.render({ langName, reviewedProgress })
}
-}
+};
diff --git a/services/localizely/localizely.tester.js b/services/localizely/localizely.tester.js
index 814573a499776..385a000178424 100644
--- a/services/localizely/localizely.tester.js
+++ b/services/localizely/localizely.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { isIntegerPercentage } = require('../test-validators')
+const t = (function() {
+ export default __a;
+}())
+import {isIntegerPercentage} from '../test-validators.js';
t.create('Overall progress')
.get(
diff --git a/services/luarocks/luarocks-version-helpers.js b/services/luarocks/luarocks-version-helpers.js
index ee1526adc8fd8..d1ff5a5b703ac 100644
--- a/services/luarocks/luarocks-version-helpers.js
+++ b/services/luarocks/luarocks-version-helpers.js
@@ -24,9 +24,7 @@
* https://github.com/luarocks/luarocks/blob/405ee29ba8444d97646f62e72effeaff2bfe3f79/src/luarocks/search.lua#L182
* https://github.com/luarocks/luarocks/blob/405ee29ba8444d97646f62e72effeaff2bfe3f79/src/luarocks/core/vers.lua#L83
*/
-'use strict'
-
-const { omitv } = require('../text-formatters')
+import {omitv} from '../text-formatters.js';
// Compare two arrays containing split and transformed to
// positive/negative numbers parts of version strings,
@@ -86,8 +84,8 @@ function latestVersion(versions) {
.pop()
}
-module.exports = {
+export default {
parseVersion,
compareVersionLists,
latestVersion,
-}
+};
diff --git a/services/luarocks/luarocks-version-helpers.spec.js b/services/luarocks/luarocks-version-helpers.spec.js
index 22064de414d52..06f721ac1832f 100644
--- a/services/luarocks/luarocks-version-helpers.spec.js
+++ b/services/luarocks/luarocks-version-helpers.spec.js
@@ -1,11 +1,5 @@
-'use strict'
-
-const { test, given, forCases } = require('sazerac')
-const {
- parseVersion,
- compareVersionLists,
- latestVersion,
-} = require('./luarocks-version-helpers')
+import {test, given, forCases} from 'sazerac';
+import {parseVersion, compareVersionLists, latestVersion} from './luarocks-version-helpers.js';
describe('LuaRocks-specific helpers', function () {
test(compareVersionLists, () => {
diff --git a/services/luarocks/luarocks.service.js b/services/luarocks/luarocks.service.js
index 4ce526f27f2e4..2e8261935bc22 100644
--- a/services/luarocks/luarocks.service.js
+++ b/services/luarocks/luarocks.service.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { addv } = require('../text-formatters')
-const { BaseJsonService, NotFound } = require('..')
-const { latestVersion } = require('./luarocks-version-helpers')
+import Joi from 'joi';
+import {addv} from '../text-formatters.js';
+import {BaseJsonService, NotFound} from '..';
+import {latestVersion} from './luarocks-version-helpers.js';
const schema = Joi.object({
repository: Joi.object()
@@ -14,7 +12,7 @@ const schema = Joi.object({
.required(),
}).required()
-module.exports = class Luarocks extends BaseJsonService {
+export default class Luarocks extends BaseJsonService {
static category = 'version'
static route = {
@@ -88,4 +86,4 @@ module.exports = class Luarocks extends BaseJsonService {
}
return this.constructor.render({ version })
}
-}
+};
diff --git a/services/luarocks/luarocks.spec.js b/services/luarocks/luarocks.spec.js
index ad6479ef7d501..a2e11fcf70715 100644
--- a/services/luarocks/luarocks.spec.js
+++ b/services/luarocks/luarocks.spec.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const { test, given } = require('sazerac')
-const Luarocks = require('./luarocks.service')
+import {test, given} from 'sazerac';
+import Luarocks from './luarocks.service.js';
test(Luarocks.render, () => {
given({ version: 'dev-1' }).expect({ message: 'dev-1', color: 'yellow' })
diff --git a/services/luarocks/luarocks.tester.js b/services/luarocks/luarocks.tester.js
index 0e60caf896377..479bfe9b90463 100644
--- a/services/luarocks/luarocks.tester.js
+++ b/services/luarocks/luarocks.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
const isLuaVersion = Joi.string()
.regex(/^v\d+\.\d+\.\d+-\d+$/)
diff --git a/services/magnumci/magnumci.service.js b/services/magnumci/magnumci.service.js
index 5a01a0304b38a..51b31717f046b 100644
--- a/services/magnumci/magnumci.service.js
+++ b/services/magnumci/magnumci.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {deprecatedService} from '..';
-const { deprecatedService } = require('..')
-
-module.exports = deprecatedService({
+export default deprecatedService({
category: 'build',
route: {
base: 'magnumci/ci',
@@ -10,4 +8,4 @@ module.exports = deprecatedService({
},
label: 'magnum ci',
dateAdded: new Date('2018-07-08'),
-})
+});
diff --git a/services/magnumci/magnumci.tester.js b/services/magnumci/magnumci.tester.js
index d88d56f757622..0da8de3546228 100644
--- a/services/magnumci/magnumci.tester.js
+++ b/services/magnumci/magnumci.tester.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const { ServiceTester } = require('../tester')
+import {ServiceTester} from '../tester.js';
const t = new ServiceTester({ id: 'magnumci', title: 'Magnum CI' })
-module.exports = t
+export default t;
t.create('no longer available')
.get('/ci/96ffb83fa700f069024921b0702e76ff.json')
diff --git a/services/maintenance/maintenance.service.js b/services/maintenance/maintenance.service.js
index e05da9f6bb7b4..c12cb4e025c87 100644
--- a/services/maintenance/maintenance.service.js
+++ b/services/maintenance/maintenance.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {BaseService} from '..';
-const { BaseService } = require('..')
-
-module.exports = class Maintenance extends BaseService {
+export default class Maintenance extends BaseService {
static category = 'other'
static route = {
@@ -74,4 +72,4 @@ module.exports = class Maintenance extends BaseService {
message: maintained,
})
}
-}
+};
diff --git a/services/maintenance/maintenance.spec.js b/services/maintenance/maintenance.spec.js
index 460df7fa941ec..72f2b76a3619f 100644
--- a/services/maintenance/maintenance.spec.js
+++ b/services/maintenance/maintenance.spec.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const { test, given } = require('sazerac')
-const Maintenance = require('./maintenance.service')
+import {test, given} from 'sazerac';
+import Maintenance from './maintenance.service.js';
describe('Maintenance', function () {
test(Maintenance.prototype.transform, () => {
diff --git a/services/maintenance/maintenance.tester.js b/services/maintenance/maintenance.tester.js
index 04e53ee0bea41..7a3fc81510b88 100644
--- a/services/maintenance/maintenance.tester.js
+++ b/services/maintenance/maintenance.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
const currentYear = new Date().getUTCFullYear()
diff --git a/services/mastodon/mastodon-follow.service.js b/services/mastodon/mastodon-follow.service.js
index 9e0881b5adfd7..707f82498bf2e 100644
--- a/services/mastodon/mastodon-follow.service.js
+++ b/services/mastodon/mastodon-follow.service.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { optionalUrl, nonNegativeInteger } = require('../validators')
-const { BaseJsonService, NotFound } = require('..')
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {optionalUrl, nonNegativeInteger} from '../validators.js';
+import {BaseJsonService, NotFound} from '..';
const schema = Joi.object({
username: Joi.string().required(),
@@ -20,7 +18,7 @@ const documentation = `
Failing that, you can also visit your profile page, where your user ID will be in the header in a tag like this: <link href='https://your.mastodon.server/api/salmon/{your-user-id}' rel='salmon'>
@@ -27,7 +25,7 @@ const documentation = `
` -module.exports = class MicrobadgerSize extends BaseMicrobadgerService { +export default class MicrobadgerSize extends BaseMicrobadgerService { static route = { base: 'microbadger/image-size', pattern: ':user/:repo/:tag*', @@ -71,4 +69,4 @@ module.exports = class MicrobadgerSize extends BaseMicrobadgerService { } return this.constructor.render({ size: image.DownloadSize }) } -} +}; diff --git a/services/microbadger/microbadger-size.tester.js b/services/microbadger/microbadger-size.tester.js index 4e6613e6e7f0f..80f5615286e12 100644 --- a/services/microbadger/microbadger-size.tester.js +++ b/services/microbadger/microbadger-size.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isFileSize } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isFileSize} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('image size without a specified tag') .get('/fedora/apache.json') diff --git a/services/mozilla-observatory/mozilla-observatory.service.js b/services/mozilla-observatory/mozilla-observatory.service.js index 30e9ce43cb8c5..2b388bf541906 100644 --- a/services/mozilla-observatory/mozilla-observatory.service.js +++ b/services/mozilla-observatory/mozilla-observatory.service.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {BaseJsonService} from '..'; const schema = Joi.object({ state: Joi.string() @@ -45,7 +43,7 @@ const documentation = ` ` -module.exports = class MozillaObservatory extends BaseJsonService { +export default class MozillaObservatory extends BaseJsonService { // TODO: Once created, change to a more appropriate category, // see https://github.com/badges/shields/pull/2926#issuecomment-460777017 static category = 'monitoring' @@ -114,4 +112,4 @@ module.exports = class MozillaObservatory extends BaseJsonService { const { state, grade, score } = await this.fetch({ host, publish }) return this.constructor.render({ format, state, grade, score }) } -} +}; diff --git a/services/mozilla-observatory/mozilla-observatory.tester.js b/services/mozilla-observatory/mozilla-observatory.tester.js index a169bac2fc7db..43709a9755cc5 100644 --- a/services/mozilla-observatory/mozilla-observatory.tester.js +++ b/services/mozilla-observatory/mozilla-observatory.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) const isMessage = Joi.alternatives() .try( diff --git a/services/myget/myget.service.js b/services/myget/myget.service.js index 38f17e5c0883a..13d4feb225d39 100644 --- a/services/myget/myget.service.js +++ b/services/myget/myget.service.js @@ -1,6 +1,4 @@ -'use strict' - -const { createServiceFamily } = require('../nuget/nuget-v3-service-family') +import {createServiceFamily} from '../nuget/nuget-v3-service-family.js'; const { NugetVersionService: Version, NugetDownloadService: Downloads } = createServiceFamily({ @@ -57,7 +55,7 @@ class MyGetDownloadService extends Downloads { ] } -module.exports = { +export default { MyGetVersionService, MyGetDownloadService, -} +}; diff --git a/services/myget/myget.tester.js b/services/myget/myget.tester.js index bb9ca7fa2a8eb..d5c113ef2930d 100644 --- a/services/myget/myget.tester.js +++ b/services/myget/myget.tester.js @@ -1,23 +1,11 @@ -'use strict' - -const { ServiceTester } = require('../tester') -const { - isMetric, - isVPlusDottedVersionNClausesWithOptionalSuffix, -} = require('../test-validators') -const { - queryIndex, - nuGetV3VersionJsonWithDash, - nuGetV3VersionJsonFirstCharZero, - nuGetV3VersionJsonFirstCharNotZero, -} = require('../nuget-fixtures') -const { invalidJSON } = require('../response-fixtures') - -const t = (module.exports = new ServiceTester({ - id: 'myget', - title: 'MyGet', - pathPrefix: '', -})) +import {ServiceTester} from '../tester.js'; +import {isMetric, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js'; +import {queryIndex, nuGetV3VersionJsonWithDash, nuGetV3VersionJsonFirstCharZero, nuGetV3VersionJsonFirstCharNotZero} from '../nuget-fixtures.js'; +import {invalidJSON} from '../response-fixtures.js'; + +const t = (function() { + export default __a; +}()) // downloads diff --git a/services/netlify/netlify.service.js b/services/netlify/netlify.service.js index 37485fde708d2..4371d292f7912 100644 --- a/services/netlify/netlify.service.js +++ b/services/netlify/netlify.service.js @@ -1,7 +1,5 @@ -'use strict' - -const { renderBuildStatusBadge } = require('../build-status') -const { BaseSvgScrapingService } = require('..') +import {renderBuildStatusBadge} from '../build-status.js'; +import {BaseSvgScrapingService} from '..'; const pendingStatus = 'building' const notBuiltStatus = 'not built' @@ -16,7 +14,7 @@ const statusMap = { infrastructure_failure: 'failed', } -module.exports = class Netlify extends BaseSvgScrapingService { +export default class Netlify extends BaseSvgScrapingService { static category = 'build' static route = { @@ -64,4 +62,4 @@ module.exports = class Netlify extends BaseSvgScrapingService { const { message: status } = await this.fetch({ projectId, branch }) return this.constructor.render({ status }) } -} +}; diff --git a/services/netlify/netlify.spec.js b/services/netlify/netlify.spec.js index faee3111220d9..9fa88bb3625de 100644 --- a/services/netlify/netlify.spec.js +++ b/services/netlify/netlify.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const Netlify = require('./netlify.service') +import {test, given} from 'sazerac'; +import Netlify from './netlify.service.js'; const building = { message: 'building', label: undefined, color: 'yellow' } const notBuilt = { message: 'not built', label: undefined, color: undefined } diff --git a/services/netlify/netlify.tester.js b/services/netlify/netlify.tester.js index abea04611958a..9ed0241bc8d73 100644 --- a/services/netlify/netlify.tester.js +++ b/services/netlify/netlify.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isBuildStatus } = require('../build-status') -const t = (module.exports = require('../tester').createServiceTester()) +import {isBuildStatus} from '../build-status.js'; +const t = (function() { + export default __a; +}()) t.create('netlify (valid, no branch)') .get('/e6d5a4e0-dee1-4261-833e-2f47f509c68f.json') diff --git a/services/nexus/nexus-redirect.service.js b/services/nexus/nexus-redirect.service.js index fb194284aefa5..605e098910b33 100644 --- a/services/nexus/nexus-redirect.service.js +++ b/services/nexus/nexus-redirect.service.js @@ -1,8 +1,6 @@ -'use strict' +import {redirector} from '..'; -const { redirector } = require('..') - -module.exports = [ +export default [ redirector({ category: 'version', route: { @@ -18,4 +16,4 @@ module.exports = [ }), dateAdded: new Date('2019-07-26'), }), -] +]; diff --git a/services/nexus/nexus-redirect.tester.js b/services/nexus/nexus-redirect.tester.js index 7e6b3f56a86d2..2c2d496d97206 100644 --- a/services/nexus/nexus-redirect.tester.js +++ b/services/nexus/nexus-redirect.tester.js @@ -1,12 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'NexusRedirect', - title: 'NexusRedirect', - pathPrefix: '/nexus', -})) +const t = (function() { + export default __a; +}()) t.create('Nexus release') .get('/r/https/oss.sonatype.org/com.google.guava/guava.svg') diff --git a/services/nexus/nexus-version.js b/services/nexus/nexus-version.js index 89b1f4a66f2c1..5d57dc7d2f0ce 100644 --- a/services/nexus/nexus-version.js +++ b/services/nexus/nexus-version.js @@ -1,10 +1,8 @@ -'use strict' - function isSnapshotVersion(version) { const pattern = /(\d+\.)*[0-9a-f]-SNAPSHOT/ return version && version.match(pattern) } -module.exports = { +export default { isSnapshotVersion, -} +}; diff --git a/services/nexus/nexus.service.js b/services/nexus/nexus.service.js index 7906b6933c500..8350fd9f07dec 100644 --- a/services/nexus/nexus.service.js +++ b/services/nexus/nexus.service.js @@ -1,14 +1,9 @@ -'use strict' - -const Joi = require('joi') -const { version: versionColor } = require('../color-formatters') -const { addv } = require('../text-formatters') -const { optionalUrl } = require('../validators') -const { - optionalDottedVersionNClausesWithOptionalSuffix, -} = require('../validators') -const { BaseJsonService, InvalidResponse, NotFound } = require('..') -const { isSnapshotVersion } = require('./nexus-version') +import Joi from 'joi'; +import {version as versionColor} from '../color-formatters.js'; +import {addv} from '../text-formatters.js'; +import {optionalUrl, optionalDottedVersionNClausesWithOptionalSuffix} from '../validators.js'; +import {BaseJsonService, InvalidResponse, NotFound} from '..'; +import {isSnapshotVersion} from './nexus-version.js'; const nexus2SearchApiSchema = Joi.object({ data: Joi.array() @@ -53,7 +48,7 @@ const queryParamSchema = Joi.object({ nexusVersion: Joi.equal('2', '3'), }).required() -module.exports = class Nexus extends BaseJsonService { +export default class Nexus extends BaseJsonService { static category = 'version' static route = { @@ -337,4 +332,4 @@ module.exports = class Nexus extends BaseJsonService { const { version } = this.transform({ repo, json, actualNexusVersion }) return this.constructor.render({ version }) } -} +}; diff --git a/services/nexus/nexus.spec.js b/services/nexus/nexus.spec.js index d06c051f2672c..c7af2dc639149 100644 --- a/services/nexus/nexus.spec.js +++ b/services/nexus/nexus.spec.js @@ -1,10 +1,8 @@ -'use strict' - -const { expect } = require('chai') -const nock = require('nock') -const { cleanUpNockAfterEach, defaultContext } = require('../test-helpers') -const { InvalidResponse, NotFound } = require('..') -const Nexus = require('./nexus.service') +import {expect} from 'chai'; +import nock from 'nock'; +import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js'; +import {InvalidResponse, NotFound} from '..'; +import Nexus from './nexus.service.js'; describe('Nexus', function () { context('transform2()', function () { diff --git a/services/nexus/nexus.tester.js b/services/nexus/nexus.tester.js index f2c37a351be82..16a72da362289 100644 --- a/services/nexus/nexus.tester.js +++ b/services/nexus/nexus.tester.js @@ -1,9 +1,7 @@ -'use strict' - -const { - isVPlusDottedVersionNClausesWithOptionalSuffix: isVersion, -} = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isVPlusDottedVersionNClausesWithOptionalSuffix as isVersion} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('Nexus 2 - search release version valid artifact') .timeout(15000) diff --git a/services/node/node-base.js b/services/node/node-base.js index 007ad6e4b93af..90932c84fff4d 100644 --- a/services/node/node-base.js +++ b/services/node/node-base.js @@ -1,10 +1,8 @@ -'use strict' - -const NPMBase = require('../npm/npm-base') +import NPMBase from '../npm/npm-base.js'; const keywords = ['npm'] -module.exports = class NodeVersionBase extends NPMBase { +export default class NodeVersionBase extends NPMBase { static category = 'platform-support' static get examples() { @@ -119,4 +117,4 @@ module.exports = class NodeVersionBase extends NPMBase { return this.constructor.render({ tag, nodeVersionRange }) } -} +}; diff --git a/services/node/node-current.service.js b/services/node/node-current.service.js index cea93959e662e..32ab3a42c0f71 100644 --- a/services/node/node-current.service.js +++ b/services/node/node-current.service.js @@ -1,9 +1,7 @@ -'use strict' +import NodeVersionBase from './node-base.js'; +import {versionColorForRangeCurrent} from './node-version-color.js'; -const NodeVersionBase = require('./node-base') -const { versionColorForRangeCurrent } = require('./node-version-color') - -module.exports = class NodeCurrentVersion extends NodeVersionBase { +export default class NodeCurrentVersion extends NodeVersionBase { static route = this.buildRoute('node/v', { withTag: true }) static defaultBadgeData = { @@ -15,4 +13,4 @@ module.exports = class NodeCurrentVersion extends NodeVersionBase { static colorResolver = versionColorForRangeCurrent static documentation = `This badge indicates whether the package supports the latest release of node` -} +}; diff --git a/services/node/node-current.spec.js b/services/node/node-current.spec.js index 072bf7350dbad..1981232f5566b 100644 --- a/services/node/node-current.spec.js +++ b/services/node/node-current.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const NodeVersion = require('./node-current.service') +import {test, given} from 'sazerac'; +import NodeVersion from './node-current.service.js'; describe('node static renderStaticPreview', function () { it('should have parity with render()', async function () { diff --git a/services/node/node-current.tester.js b/services/node/node-current.tester.js index b9ae1d9e55cb1..48f25928f87e6 100644 --- a/services/node/node-current.tester.js +++ b/services/node/node-current.tester.js @@ -1,9 +1,9 @@ -'use strict' - -const { expect } = require('chai') -const { Range } = require('semver') -const t = (module.exports = require('../tester').createServiceTester()) -const { mockPackageData, mockCurrentSha } = require('./testUtils/test-utils') +import {expect} from 'chai'; +import {Range} from 'semver'; +const t = (function() { + export default __a; +}()) +import {mockPackageData, mockCurrentSha} from './testUtils/test-utils.js'; function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() diff --git a/services/node/node-lts.service.js b/services/node/node-lts.service.js index 790e7ea9d2fd2..929550d83e7cd 100644 --- a/services/node/node-lts.service.js +++ b/services/node/node-lts.service.js @@ -1,9 +1,7 @@ -'use strict' +import NodeVersionBase from './node-base.js'; +import {versionColorForRangeLts} from './node-version-color.js'; -const NodeVersionBase = require('./node-base') -const { versionColorForRangeLts } = require('./node-version-color') - -module.exports = class NodeLtsVersion extends NodeVersionBase { +export default class NodeLtsVersion extends NodeVersionBase { static route = this.buildRoute('node/v-lts', { withTag: true }) static defaultBadgeData = { @@ -15,4 +13,4 @@ module.exports = class NodeLtsVersion extends NodeVersionBase { static colorResolver = versionColorForRangeLts static documentation = `This badge indicates whether the package supports all LTS node versions` -} +}; diff --git a/services/node/node-lts.spec.js b/services/node/node-lts.spec.js index f1ca6f100297e..782b9300e9608 100644 --- a/services/node/node-lts.spec.js +++ b/services/node/node-lts.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const NodeVersion = require('./node-lts.service') +import {test, given} from 'sazerac'; +import NodeVersion from './node-lts.service.js'; describe('node-lts 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 index f2d47331fee54..a9cd347f64d6e 100644 --- a/services/node/node-lts.tester.js +++ b/services/node/node-lts.tester.js @@ -1,13 +1,9 @@ -'use strict' - -const { expect } = require('chai') -const { Range } = require('semver') -const t = (module.exports = require('../tester').createServiceTester()) -const { - mockPackageData, - mockReleaseSchedule, - mockVersionsSha, -} = require('./testUtils/test-utils') +import {expect} from 'chai'; +import {Range} from 'semver'; +const t = (function() { + export default __a; +}()) +import {mockPackageData, mockReleaseSchedule, mockVersionsSha} from './testUtils/test-utils.js'; function expectSemverRange(message) { expect(() => new Range(message)).not.to.throw() diff --git a/services/node/node-version-color.js b/services/node/node-version-color.js index f13d45e54f4a4..4a9c26b743ca5 100644 --- a/services/node/node-version-color.js +++ b/services/node/node-version-color.js @@ -1,9 +1,7 @@ -'use strict' - -const { promisify } = require('util') -const moment = require('moment') -const semver = require('semver') -const { regularUpdate } = require('../../core/legacy/regular-update') +import {promisify} from 'util'; +import moment from 'moment'; +import semver from 'semver'; +import {regularUpdate} from '../../core/legacy/regular-update.js'; const dateFormat = 'YYYY-MM-DD' @@ -84,7 +82,7 @@ async function versionColorForRangeCurrent(range) { } } -module.exports = { +export default { versionColorForRangeCurrent, versionColorForRangeLts, -} +}; diff --git a/services/node/testUtils/test-utils.js b/services/node/testUtils/test-utils.js index 96b265ee7dac3..92da5db4f552c 100644 --- a/services/node/testUtils/test-utils.js +++ b/services/node/testUtils/test-utils.js @@ -1,8 +1,6 @@ -'use strict' - -const fs = require('fs') -const path = require('path') -const moment = require('moment') +import fs from 'fs'; +import path from 'path'; +import moment from 'moment'; const dateFormat = 'YYYY-MM-DD' @@ -145,9 +143,9 @@ const mockReleaseSchedule = () => nock => { .reply(200, schedule) } -module.exports = { +export default { mockPackageData, mockCurrentSha, mockVersionsSha, mockReleaseSchedule, -} +}; diff --git a/services/nodeping/nodeping-status.service.js b/services/nodeping/nodeping-status.service.js index 6b85f3a3afef8..8b921d51e363c 100644 --- a/services/nodeping/nodeping-status.service.js +++ b/services/nodeping/nodeping-status.service.js @@ -1,12 +1,6 @@ -'use strict' - -const Joi = require('joi') -const { - queryParamSchema, - exampleQueryParams, - renderWebsiteStatus, -} = require('../website-status') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {queryParamSchema, exampleQueryParams, renderWebsiteStatus} from '../website-status.js'; +import {BaseJsonService} from '..'; const schema = Joi.array() .items(Joi.object().keys({ su: Joi.boolean() })) @@ -17,7 +11,7 @@ const schema = Joi.array() */ const exampleCheckUuid = 'jkiwn052-ntpp-4lbb-8d45-ihew6d9ucoei' -module.exports = class NodePingStatus extends BaseJsonService { +export default class NodePingStatus extends BaseJsonService { static category = 'monitoring' static route = { @@ -69,4 +63,4 @@ module.exports = class NodePingStatus extends BaseJsonService { downColor, }) } -} +}; diff --git a/services/nodeping/nodeping-status.tester.js b/services/nodeping/nodeping-status.tester.js index c497f97c8aede..0622b6f3f1f45 100644 --- a/services/nodeping/nodeping-status.tester.js +++ b/services/nodeping/nodeping-status.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) t.create('NodePing status') .get('/jkiwn052-ntpp-4lbb-8d45-ihew6d9ucoei.json') diff --git a/services/nodeping/nodeping-uptime.service.js b/services/nodeping/nodeping-uptime.service.js index 1c2c428cc9ce2..93a8df7354ce9 100644 --- a/services/nodeping/nodeping-uptime.service.js +++ b/services/nodeping/nodeping-uptime.service.js @@ -1,8 +1,6 @@ -'use strict' - -const Joi = require('joi') -const { colorScale } = require('../color-formatters') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {colorScale} from '../color-formatters.js'; +import {BaseJsonService} from '..'; const colorFormatter = colorScale([99, 99.5, 100]) @@ -23,7 +21,7 @@ const sampleCheckUuid = 'jkiwn052-ntpp-4lbb-8d45-ihew6d9ucoei' // TODO: support for custom '100%' label // TODO: support for custom # of decimal places -module.exports = class NodePingUptime extends BaseJsonService { +export default class NodePingUptime extends BaseJsonService { static category = 'monitoring' static route = { base: 'nodeping/uptime', pattern: ':checkUuid' } @@ -76,4 +74,4 @@ module.exports = class NodePingUptime extends BaseJsonService { const { uptime } = await this.fetch({ checkUuid }) return this.constructor.render({ uptime }) } -} +}; diff --git a/services/nodeping/nodeping-uptime.tester.js b/services/nodeping/nodeping-uptime.tester.js index 21a02ad42e428..d2aa902f63f06 100644 --- a/services/nodeping/nodeping-uptime.tester.js +++ b/services/nodeping/nodeping-uptime.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { isPercentage } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {isPercentage} from '../test-validators.js'; t.create('NodePing uptime') .get('/jkiwn052-ntpp-4lbb-8d45-ihew6d9ucoei.json') diff --git a/services/npm/npm-base.js b/services/npm/npm-base.js index dc334d45f7266..e00f002060024 100644 --- a/services/npm/npm-base.js +++ b/services/npm/npm-base.js @@ -1,9 +1,7 @@ -'use strict' - -const Joi = require('joi') -const { optionalUrl } = require('../validators') -const { isDependencyMap } = require('../package-json-helpers') -const { BaseJsonService, InvalidResponse, NotFound } = require('..') +import Joi from 'joi'; +import {optionalUrl} from '../validators.js'; +import {isDependencyMap} from '../package-json-helpers.js'; +import {BaseJsonService, InvalidResponse, NotFound} from '..'; const deprecatedLicenseObjectSchema = Joi.object({ type: Joi.string().required(), @@ -32,13 +30,13 @@ const packageDataSchema = Joi.object({ files: Joi.array().items(Joi.string()).default([]), }).required() -const queryParamSchema = Joi.object({ +export const queryParamSchema = Joi.object({ registry_uri: optionalUrl, -}).required() +}).required(); // Abstract class for NPM badges which display data about the latest version // of a package. -module.exports = class NpmBase extends BaseJsonService { +export default class NpmBase extends BaseJsonService { static auth = { passKey: 'npm_token', serviceKey: 'npm', @@ -142,6 +140,4 @@ module.exports = class NpmBase extends BaseJsonService { return this.constructor._validate(packageData, packageDataSchema) } -} - -module.exports.queryParamSchema = queryParamSchema +}; diff --git a/services/npm/npm-base.spec.js b/services/npm/npm-base.spec.js index 710dee6217b2e..f69040f7d19a5 100644 --- a/services/npm/npm-base.spec.js +++ b/services/npm/npm-base.spec.js @@ -1,10 +1,8 @@ -'use strict' - -const { expect } = require('chai') -const nock = require('nock') -const { cleanUpNockAfterEach, defaultContext } = require('../test-helpers') +import {expect} from 'chai'; +import nock from 'nock'; +import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js'; // use NPM Version as an example implementation of NpmBase for this test -const NpmVersion = require('./npm-version.service') +import NpmVersion from './npm-version.service.js'; describe('npm', function () { describe('auth', function () { diff --git a/services/npm/npm-collaborators.service.js b/services/npm/npm-collaborators.service.js index 0071abc3c8a6d..9c430a5fad972 100644 --- a/services/npm/npm-collaborators.service.js +++ b/services/npm/npm-collaborators.service.js @@ -1,11 +1,9 @@ -'use strict' - -const { renderContributorBadge } = require('../contributor-count') -const NpmBase = require('./npm-base') +import {renderContributorBadge} from '../contributor-count.js'; +import NpmBase from './npm-base.js'; const keywords = ['node'] -module.exports = class NpmCollaborators extends NpmBase { +export default class NpmCollaborators extends NpmBase { static category = 'activity' static route = this.buildRoute('npm/collaborators', { withTag: false }) @@ -49,4 +47,4 @@ module.exports = class NpmCollaborators extends NpmBase { const collaborators = maintainers.length return this.constructor.render({ collaborators }) } -} +}; diff --git a/services/npm/npm-collaborators.tester.js b/services/npm/npm-collaborators.tester.js index 45f6c9bab680a..837f640e6bd84 100644 --- a/services/npm/npm-collaborators.tester.js +++ b/services/npm/npm-collaborators.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { nonNegativeInteger } = require('../validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {nonNegativeInteger} from '../validators.js'; +const t = (function() { + export default __a; +}()) t.create('gets the contributor count') .get('/prettier.json') diff --git a/services/npm/npm-dependency-version.service.js b/services/npm/npm-dependency-version.service.js index 83b1e352c6f0b..77b38a63c335b 100644 --- a/services/npm/npm-dependency-version.service.js +++ b/services/npm/npm-dependency-version.service.js @@ -1,12 +1,10 @@ -'use strict' - -const { getDependencyVersion } = require('../package-json-helpers') -const NpmBase = require('./npm-base') +import {getDependencyVersion} from '../package-json-helpers.js'; +import NpmBase from './npm-base.js'; const { queryParamSchema } = NpmBase const keywords = ['node'] -module.exports = class NpmDependencyVersion extends NpmBase { +export default class NpmDependencyVersion extends NpmBase { static category = 'platform-support' static route = { @@ -142,4 +140,4 @@ module.exports = class NpmDependencyVersion extends NpmBase { range, }) } -} +}; diff --git a/services/npm/npm-dependency-version.tester.js b/services/npm/npm-dependency-version.tester.js index f72f598b1ed3a..db976097646f5 100644 --- a/services/npm/npm-dependency-version.tester.js +++ b/services/npm/npm-dependency-version.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { semverRange } = require('../validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {semverRange} from '../validators.js'; +const t = (function() { + export default __a; +}()) t.create('gets the peer dependency version') .get('/react-boxplot/peer/react.json') diff --git a/services/npm/npm-downloads.service.js b/services/npm/npm-downloads.service.js index d263c1f1e4cc7..5119c382c4cf4 100644 --- a/services/npm/npm-downloads.service.js +++ b/services/npm/npm-downloads.service.js @@ -1,9 +1,7 @@ -'use strict' - -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { nonNegativeInteger } = require('../validators') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; +import {BaseJsonService} from '..'; // https://github.com/npm/registry/blob/master/docs/download-counts.md#output const pointResponseSchema = Joi.object({ @@ -45,7 +43,7 @@ const intervalMap = { // This hits an entirely different API from the rest of the NPM services, so // it does not use NpmBase. -module.exports = class NpmDownloads extends BaseJsonService { +export default class NpmDownloads extends BaseJsonService { static category = 'downloads' static route = { @@ -88,4 +86,4 @@ module.exports = class NpmDownloads extends BaseJsonService { return this.constructor.render({ interval, downloadCount }) } -} +}; diff --git a/services/npm/npm-downloads.spec.js b/services/npm/npm-downloads.spec.js index 4c94a7d2c16fc..33e67646fd5e8 100644 --- a/services/npm/npm-downloads.spec.js +++ b/services/npm/npm-downloads.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const NpmDownloads = require('./npm-downloads.service') +import {test, given} from 'sazerac'; +import NpmDownloads from './npm-downloads.service.js'; describe('NpmDownloads', function () { test(NpmDownloads._intervalMap.dt.transform, () => { diff --git a/services/npm/npm-downloads.tester.js b/services/npm/npm-downloads.tester.js index e3a9c46d7eee8..ae24f3ed7b3b3 100644 --- a/services/npm/npm-downloads.tester.js +++ b/services/npm/npm-downloads.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isMetricOverTimePeriod, isMetric } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isMetricOverTimePeriod, isMetric} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('weekly downloads of left-pad').get('/dw/left-pad.json').expectBadge({ label: 'downloads', diff --git a/services/npm/npm-license.service.js b/services/npm/npm-license.service.js index 45394ea3e4581..a4030cf55dd2f 100644 --- a/services/npm/npm-license.service.js +++ b/services/npm/npm-license.service.js @@ -1,10 +1,8 @@ -'use strict' +import {renderLicenseBadge} from '../licenses.js'; +import toArray from '../../core/base-service/to-array.js'; +import NpmBase from './npm-base.js'; -const { renderLicenseBadge } = require('../licenses') -const toArray = require('../../core/base-service/to-array') -const NpmBase = require('./npm-base') - -module.exports = class NpmLicense extends NpmBase { +export default class NpmLicense extends NpmBase { static category = 'license' static route = this.buildRoute('npm/l', { withTag: false }) @@ -46,4 +44,4 @@ module.exports = class NpmLicense extends NpmBase { ) return this.constructor.render({ licenses }) } -} +}; diff --git a/services/npm/npm-license.tester.js b/services/npm/npm-license.tester.js index d30c5783b34b3..93bfdefcc2756 100644 --- a/services/npm/npm-license.tester.js +++ b/services/npm/npm-license.tester.js @@ -1,6 +1,6 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) +const t = (function() { + export default __a; +}()) t.create('gets the license of express') .get('/express.json') diff --git a/services/npm/npm-type-definitions.service.js b/services/npm/npm-type-definitions.service.js index ff314e75aba5c..1d62485b147ab 100644 --- a/services/npm/npm-type-definitions.service.js +++ b/services/npm/npm-type-definitions.service.js @@ -1,11 +1,9 @@ -'use strict' - -const NpmBase = require('./npm-base') +import NpmBase from './npm-base.js'; // For this badge to correctly detect type definitions, either the relevant // dependencies must be declared, or the `types` key must be set in // package.json. -module.exports = class NpmTypeDefinitions extends NpmBase { +export default class NpmTypeDefinitions extends NpmBase { static category = 'platform-support' static route = this.buildRoute('npm/types', { withTag: false }) @@ -72,4 +70,4 @@ module.exports = class NpmTypeDefinitions extends NpmBase { const props = this.constructor.transform(json) return this.constructor.render(props) } -} +}; diff --git a/services/npm/npm-type-definitions.spec.js b/services/npm/npm-type-definitions.spec.js index 98cefb2e53310..c5e0f1459dc70 100644 --- a/services/npm/npm-type-definitions.spec.js +++ b/services/npm/npm-type-definitions.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given, forCases } = require('sazerac') -const NpmTypeDefinitions = require('./npm-type-definitions.service') +import {test, given, forCases} from 'sazerac'; +import NpmTypeDefinitions from './npm-type-definitions.service.js'; describe('NPM type definitions badge', function () { test(NpmTypeDefinitions.transform, () => { diff --git a/services/npm/npm-type-definitions.tester.js b/services/npm/npm-type-definitions.tester.js index accd7292cb388..dd31cf8f894bf 100644 --- a/services/npm/npm-type-definitions.tester.js +++ b/services/npm/npm-type-definitions.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) const isTypeDefinition = Joi.string().regex( /^((Flow|TypeScript)|(Flow \| TypeScript))$/ diff --git a/services/npm/npm-version.service.js b/services/npm/npm-version.service.js index ab517815f3df8..cb69debf9464b 100644 --- a/services/npm/npm-version.service.js +++ b/services/npm/npm-version.service.js @@ -1,9 +1,7 @@ -'use strict' - -const Joi = require('joi') -const { renderVersionBadge } = require('../version') -const { NotFound } = require('..') -const NpmBase = require('./npm-base') +import Joi from 'joi'; +import {renderVersionBadge} from '../version.js'; +import {NotFound} from '..'; +import NpmBase from './npm-base.js'; const keywords = ['node'] @@ -13,7 +11,7 @@ const schema = Joi.object() .pattern(/./, Joi.string()) .required() -module.exports = class NpmVersion extends NpmBase { +export default class NpmVersion extends NpmBase { static category = 'version' static route = this.buildRoute('npm/v', { withTag: true }) @@ -94,4 +92,4 @@ module.exports = class NpmVersion extends NpmBase { version: packageData[tag || 'latest'], }) } -} +}; diff --git a/services/npm/npm-version.tester.js b/services/npm/npm-version.tester.js index c0b97b3e63563..3e1dbcbb35c9c 100644 --- a/services/npm/npm-version.tester.js +++ b/services/npm/npm-version.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isSemver } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isSemver} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('gets the package version of left-pad') .get('/left-pad.json') diff --git a/services/nsp/nsp.service.js b/services/nsp/nsp.service.js index ef85af672807f..7f8b5e9649b06 100644 --- a/services/nsp/nsp.service.js +++ b/services/nsp/nsp.service.js @@ -1,8 +1,6 @@ -'use strict' +import {deprecatedService} from '..'; -const { deprecatedService } = require('..') - -module.exports = deprecatedService({ +export default deprecatedService({ route: { base: 'nsp/npm', pattern: ':various*', @@ -10,4 +8,4 @@ module.exports = deprecatedService({ label: 'nsp', category: 'other', dateAdded: new Date('2018-12-13'), -}) +}); diff --git a/services/nsp/nsp.tester.js b/services/nsp/nsp.tester.js index 11a33eae1b87c..1815d74ca2d21 100644 --- a/services/nsp/nsp.tester.js +++ b/services/nsp/nsp.tester.js @@ -1,12 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'nsp', - title: 'nsp', - pathPrefix: '/nsp/npm', -})) +const t = (function() { + export default __a; +}()) t.create('no longer available (previously package)') .get('/gh-badges.json') diff --git a/services/nuget-fixtures.js b/services/nuget-fixtures.js index c4e0fe30394f9..ea58e66e942b7 100644 --- a/services/nuget-fixtures.js +++ b/services/nuget-fixtures.js @@ -1,5 +1,3 @@ -'use strict' - const queryIndex = JSON.stringify({ resources: [ { @@ -50,10 +48,10 @@ const nuGetV3VersionJsonBuildMetadataWithDash = JSON.stringify({ ], }) -module.exports = { +export default { queryIndex, nuGetV3VersionJsonWithDash, nuGetV3VersionJsonFirstCharZero, nuGetV3VersionJsonFirstCharNotZero, nuGetV3VersionJsonBuildMetadataWithDash, -} +}; diff --git a/services/nuget/nuget-helpers.js b/services/nuget/nuget-helpers.js index 63603c2d5c7e0..278a0f1a51ee0 100644 --- a/services/nuget/nuget-helpers.js +++ b/services/nuget/nuget-helpers.js @@ -1,10 +1,8 @@ -'use strict' - -const { promisify } = require('util') -const semver = require('semver') -const { metric, addv } = require('../text-formatters') -const { downloadCount: downloadCountColor } = require('../color-formatters') -const { regularUpdate } = require('../../core/legacy/regular-update') +import {promisify} from 'util'; +import semver from 'semver'; +import {metric, addv} from '../text-formatters.js'; +import {downloadCount as downloadCountColor} from '../color-formatters.js'; +import {regularUpdate} from '../../core/legacy/regular-update.js'; function renderVersionBadge({ version, feed }) { let color @@ -103,11 +101,11 @@ function selectVersion(versions, includePrereleases) { } } -module.exports = { +export default { renderVersionBadge, renderDownloadBadge, odataToObject, searchServiceUrl, stripBuildMetadata, selectVersion, -} +}; diff --git a/services/nuget/nuget-helpers.spec.js b/services/nuget/nuget-helpers.spec.js index a4e40a94e8ca1..bd96935a6a18d 100644 --- a/services/nuget/nuget-helpers.spec.js +++ b/services/nuget/nuget-helpers.spec.js @@ -1,12 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const { - renderVersionBadge, - odataToObject, - stripBuildMetadata, - selectVersion, -} = require('./nuget-helpers') +import {test, given} from 'sazerac'; +import {renderVersionBadge, odataToObject, stripBuildMetadata, selectVersion} from './nuget-helpers.js'; describe('NuGet helpers', function () { test(renderVersionBadge, () => { diff --git a/services/nuget/nuget-v2-service-family.js b/services/nuget/nuget-v2-service-family.js index 582771ddf21a4..4c4fd74731f5b 100644 --- a/services/nuget/nuget-v2-service-family.js +++ b/services/nuget/nuget-v2-service-family.js @@ -1,13 +1,7 @@ -'use strict' - -const Joi = require('joi') -const { nonNegativeInteger } = require('../validators') -const { BaseJsonService, BaseXmlService, NotFound, redirector } = require('..') -const { - renderVersionBadge, - renderDownloadBadge, - odataToObject, -} = require('./nuget-helpers') +import Joi from 'joi'; +import {nonNegativeInteger} from '../validators.js'; +import {BaseJsonService, BaseXmlService, NotFound, redirector} from '..'; +import {renderVersionBadge, renderDownloadBadge, odataToObject} from './nuget-helpers.js'; function createFilter({ packageName, includePrereleases }) { const releaseTypeFilter = includePrereleases @@ -224,8 +218,8 @@ function createServiceFamily({ return { NugetVersionService, NugetVersionRedirector, NugetDownloadService } } -module.exports = { +export default { createFilter, fetch, createServiceFamily, -} +}; diff --git a/services/nuget/nuget-v3-service-family.js b/services/nuget/nuget-v3-service-family.js index 783cc05a7816d..cd18224fac7d7 100644 --- a/services/nuget/nuget-v3-service-family.js +++ b/services/nuget/nuget-v3-service-family.js @@ -1,15 +1,7 @@ -'use strict' - -const Joi = require('joi') -const RouteBuilder = require('../route-builder') -const { BaseJsonService, NotFound } = require('..') -const { - renderVersionBadge, - renderDownloadBadge, - searchServiceUrl, - stripBuildMetadata, - selectVersion, -} = require('./nuget-helpers') +import Joi from 'joi'; +import RouteBuilder from '../route-builder.js'; +import {BaseJsonService, NotFound} from '..'; +import {renderVersionBadge, renderDownloadBadge, searchServiceUrl, stripBuildMetadata, selectVersion} from './nuget-helpers.js'; /* * Build the Shields service URL object for the given service configuration. Return @@ -213,6 +205,6 @@ function createServiceFamily({ } } -module.exports = { +export default { createServiceFamily, -} +}; diff --git a/services/nuget/nuget-v3-service-family.spec.js b/services/nuget/nuget-v3-service-family.spec.js index 18b92dccd7899..41e616a5ca3a7 100644 --- a/services/nuget/nuget-v3-service-family.spec.js +++ b/services/nuget/nuget-v3-service-family.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const { createServiceFamily } = require('./nuget-v3-service-family') +import {test, given} from 'sazerac'; +import {createServiceFamily} from './nuget-v3-service-family.js'; const { NugetVersionService, NugetDownloadService } = createServiceFamily({ defaultLabel: 'nuget', diff --git a/services/nuget/nuget.service.js b/services/nuget/nuget.service.js index 86c33498f0abc..0b9600b8bd6be 100644 --- a/services/nuget/nuget.service.js +++ b/services/nuget/nuget.service.js @@ -1,6 +1,4 @@ -'use strict' - -const { createServiceFamily } = require('./nuget-v3-service-family') +import {createServiceFamily} from './nuget-v3-service-family.js'; const { NugetVersionService: Version, NugetDownloadService: Downloads } = createServiceFamily({ @@ -39,4 +37,4 @@ class NugetDownloadService extends Downloads { ] } -module.exports = { NugetVersionService, NugetDownloadService } +export default { NugetVersionService, NugetDownloadService }; diff --git a/services/nuget/nuget.tester.js b/services/nuget/nuget.tester.js index 6bdbf3d663ec1..7e7363aab8791 100644 --- a/services/nuget/nuget.tester.js +++ b/services/nuget/nuget.tester.js @@ -1,21 +1,11 @@ -'use strict' - -const { ServiceTester } = require('../tester') -const { - isMetric, - isVPlusDottedVersionNClauses, - isVPlusDottedVersionNClausesWithOptionalSuffix, -} = require('../test-validators') -const { - queryIndex, - nuGetV3VersionJsonWithDash, - nuGetV3VersionJsonFirstCharZero, - nuGetV3VersionJsonFirstCharNotZero, - nuGetV3VersionJsonBuildMetadataWithDash, -} = require('../nuget-fixtures') -const { invalidJSON } = require('../response-fixtures') - -const t = (module.exports = new ServiceTester({ id: 'nuget', title: 'NuGet' })) +import {ServiceTester} from '../tester.js'; +import {isMetric, isVPlusDottedVersionNClauses, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js'; +import {queryIndex, nuGetV3VersionJsonWithDash, nuGetV3VersionJsonFirstCharZero, nuGetV3VersionJsonFirstCharNotZero, nuGetV3VersionJsonBuildMetadataWithDash} from '../nuget-fixtures.js'; +import {invalidJSON} from '../response-fixtures.js'; + +const t = (function() { + export default __a; +}()) // downloads diff --git a/services/nycrc/nycrc.service.js b/services/nycrc/nycrc.service.js index 016d45f93d2b2..3723da72846ff 100644 --- a/services/nycrc/nycrc.service.js +++ b/services/nycrc/nycrc.service.js @@ -1,12 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { coveragePercentage } = require('../color-formatters') -const { - ConditionalGithubAuthV3Service, -} = require('../github/github-auth-service') -const { fetchJsonFromRepo } = require('../github/github-common-fetch') -const { InvalidParameter, InvalidResponse, NotFound } = require('..') +import Joi from 'joi'; +import {coveragePercentage} from '../color-formatters.js'; +import {ConditionalGithubAuthV3Service} from '../github/github-auth-service.js'; +import {fetchJsonFromRepo} from '../github/github-common-fetch.js'; +import {InvalidParameter, InvalidResponse, NotFound} from '..'; const nycrcSchema = Joi.object({ branches: Joi.number().min(0).max(100), @@ -35,7 +31,7 @@ const documentation = `const validThresholds = ['branches', 'lines', 'functions'] -module.exports = class Nycrc extends ConditionalGithubAuthV3Service { +export default class Nycrc extends ConditionalGithubAuthV3Service { static category = 'coverage' static route = { @@ -131,4 +127,4 @@ module.exports = class Nycrc extends ConditionalGithubAuthV3Service { } return this.constructor.render({ coverage }) } -} +}; diff --git a/services/nycrc/nycrc.tester.js b/services/nycrc/nycrc.tester.js index 21fed6954f46a..9e6d3c3de5021 100644 --- a/services/nycrc/nycrc.tester.js +++ b/services/nycrc/nycrc.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isIntegerPercentage } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isIntegerPercentage} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('valid .nycrc') .get('/yargs/yargs.json?config=.nycrc') diff --git a/services/offset-earth/offset-earth-carbon-redirect.service.js b/services/offset-earth/offset-earth-carbon-redirect.service.js index 0ee89549f7428..45bc4a8ffed8e 100644 --- a/services/offset-earth/offset-earth-carbon-redirect.service.js +++ b/services/offset-earth/offset-earth-carbon-redirect.service.js @@ -1,8 +1,6 @@ -'use strict' +import {redirector} from '..'; -const { redirector } = require('..') - -module.exports = [ +export default [ // https://github.com/badges/shields/issues/5433 redirector({ name: 'OffsetEarthCarbonRedirect', @@ -14,4 +12,4 @@ module.exports = [ transformPath: ({ username }) => `/ecologi/carbon/${username}`, dateAdded: new Date('2020-08-16'), }), -] +]; diff --git a/services/offset-earth/offset-earth-carbon-redirect.tester.js b/services/offset-earth/offset-earth-carbon-redirect.tester.js index 426efe2eadf59..2ee06ecd0725f 100644 --- a/services/offset-earth/offset-earth-carbon-redirect.tester.js +++ b/services/offset-earth/offset-earth-carbon-redirect.tester.js @@ -1,12 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'OffsetEarthCarbonRedirect', - title: 'Offset Earth (Carbon Offset) Redirector', - pathPrefix: '/offset-earth', -})) +const t = (function() { + export default __a; +}()) t.create('Offset Earth carbon alias') .get('/carbon/ecologi.svg') diff --git a/services/offset-earth/offset-earth-trees-redirect.service.js b/services/offset-earth/offset-earth-trees-redirect.service.js index 7f2567e6eac52..60c3671d57e8c 100644 --- a/services/offset-earth/offset-earth-trees-redirect.service.js +++ b/services/offset-earth/offset-earth-trees-redirect.service.js @@ -1,8 +1,6 @@ -'use strict' +import {redirector} from '..'; -const { redirector } = require('..') - -module.exports = [ +export default [ // https://github.com/badges/shields/issues/5433 redirector({ name: 'OffsetEarthTreesRedirect', @@ -14,4 +12,4 @@ module.exports = [ transformPath: ({ username }) => `/ecologi/trees/${username}`, dateAdded: new Date('2020-08-16'), }), -] +]; diff --git a/services/offset-earth/offset-earth-trees-redirect.tester.js b/services/offset-earth/offset-earth-trees-redirect.tester.js index be8427992bff6..d85c49b9dc584 100644 --- a/services/offset-earth/offset-earth-trees-redirect.tester.js +++ b/services/offset-earth/offset-earth-trees-redirect.tester.js @@ -1,12 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'OffsetEarthTreesRedirect', - title: 'Offset Earth (Trees) Redirector', - pathPrefix: '/offset-earth', -})) +const t = (function() { + export default __a; +}()) t.create('Offset Earth trees alias') .get('/trees/ecologi.svg') diff --git a/services/open-vsx/open-vsx-base.js b/services/open-vsx/open-vsx-base.js index 1e0a9049a7f94..408dd23b8c65a 100644 --- a/services/open-vsx/open-vsx-base.js +++ b/services/open-vsx/open-vsx-base.js @@ -1,8 +1,6 @@ -'use strict' - -const Joi = require('joi') -const { optionalNonNegativeInteger } = require('../validators') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {optionalNonNegativeInteger} from '../validators.js'; +import {BaseJsonService} from '..'; const extensionQuerySchema = Joi.object({ error: Joi.string(), @@ -17,7 +15,7 @@ const extensionQuerySchema = Joi.object({ }), }).required() -module.exports = class OpenVSXBase extends BaseJsonService { +export default class OpenVSXBase extends BaseJsonService { static keywords = [ 'ovsx', 'open-vsx', @@ -42,4 +40,4 @@ module.exports = class OpenVSXBase extends BaseJsonService { }, }) } -} +}; diff --git a/services/open-vsx/open-vsx-downloads.service.js b/services/open-vsx/open-vsx-downloads.service.js index be6470ba1c3e9..90b65b00a6b0f 100644 --- a/services/open-vsx/open-vsx-downloads.service.js +++ b/services/open-vsx/open-vsx-downloads.service.js @@ -1,10 +1,8 @@ -'use strict' +import {metric} from '../text-formatters.js'; +import {downloadCount} from '../color-formatters.js'; +import OpenVSXBase from './open-vsx-base.js'; -const { metric } = require('../text-formatters') -const { downloadCount } = require('../color-formatters') -const OpenVSXBase = require('./open-vsx-base') - -module.exports = class OpenVSXDownloads extends OpenVSXBase { +export default class OpenVSXDownloads extends OpenVSXBase { static category = 'downloads' static route = { @@ -57,4 +55,4 @@ module.exports = class OpenVSXDownloads extends OpenVSXBase { downloads: downloadCount, }) } -} +}; diff --git a/services/open-vsx/open-vsx-downloads.tester.js b/services/open-vsx/open-vsx-downloads.tester.js index 7e6797386a11b..0fbdfd7a0bbab 100644 --- a/services/open-vsx/open-vsx-downloads.tester.js +++ b/services/open-vsx/open-vsx-downloads.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { withRegex, isMetric } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {withRegex, isMetric} from '../test-validators.js'; const isVersionLabel = withRegex(/^downloads@(\d+\.\d+\.\d+)(\.\d+)?$/) diff --git a/services/open-vsx/open-vsx-rating.service.js b/services/open-vsx/open-vsx-rating.service.js index f90eefb54e266..e6e5eab06d159 100644 --- a/services/open-vsx/open-vsx-rating.service.js +++ b/services/open-vsx/open-vsx-rating.service.js @@ -1,10 +1,8 @@ -'use strict' +import {starRating} from '../text-formatters.js'; +import {floorCount} from '../color-formatters.js'; +import OpenVSXBase from './open-vsx-base.js'; -const { starRating } = require('../text-formatters') -const { floorCount } = require('../color-formatters') -const OpenVSXBase = require('./open-vsx-base') - -module.exports = class OpenVSXRating extends OpenVSXBase { +export default class OpenVSXRating extends OpenVSXBase { static category = 'rating' static route = { @@ -77,4 +75,4 @@ module.exports = class OpenVSXRating extends OpenVSXBase { ratingCount: reviewCount, }) } -} +}; diff --git a/services/open-vsx/open-vsx-rating.spec.js b/services/open-vsx/open-vsx-rating.spec.js index 9d0bf7f0ca09a..2ca8131ff7455 100644 --- a/services/open-vsx/open-vsx-rating.spec.js +++ b/services/open-vsx/open-vsx-rating.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const OpenVSXRating = require('./open-vsx-rating.service') +import {test, given} from 'sazerac'; +import OpenVSXRating from './open-vsx-rating.service.js'; describe('OpenVSXRating', function () { test(OpenVSXRating.render, () => { diff --git a/services/open-vsx/open-vsx-rating.tester.js b/services/open-vsx/open-vsx-rating.tester.js index 71b269ebb702f..7ea636cac61f0 100644 --- a/services/open-vsx/open-vsx-rating.tester.js +++ b/services/open-vsx/open-vsx-rating.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { withRegex, isStarRating } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {withRegex, isStarRating} from '../test-validators.js'; const isVscodeRating = withRegex(/[0-5]\.[0-9]{1}\/5?\s*\([0-9]*\)$/) diff --git a/services/open-vsx/open-vsx-release-date.service.js b/services/open-vsx/open-vsx-release-date.service.js index 4a4343f649eea..b75a6ee27579c 100644 --- a/services/open-vsx/open-vsx-release-date.service.js +++ b/services/open-vsx/open-vsx-release-date.service.js @@ -1,10 +1,8 @@ -'use strict' +import {age} from '../color-formatters.js'; +import {formatDate} from '../text-formatters.js'; +import OpenVSXBase from './open-vsx-base.js'; -const { age } = require('../color-formatters') -const { formatDate } = require('../text-formatters') -const OpenVSXBase = require('./open-vsx-base') - -module.exports = class OpenVSXReleaseDate extends OpenVSXBase { +export default class OpenVSXReleaseDate extends OpenVSXBase { static category = 'activity' static route = { @@ -41,4 +39,4 @@ module.exports = class OpenVSXReleaseDate extends OpenVSXBase { releaseDate: timestamp, }) } -} +}; diff --git a/services/open-vsx/open-vsx-release-date.tester.js b/services/open-vsx/open-vsx-release-date.tester.js index 5c5e2d111c78d..053738bed3acb 100644 --- a/services/open-vsx/open-vsx-release-date.tester.js +++ b/services/open-vsx/open-vsx-release-date.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { isFormattedDate } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {isFormattedDate} from '../test-validators.js'; t.create('release date invalid extension') .get('/release-date/badges/shields.json') diff --git a/services/open-vsx/open-vsx-version.service.js b/services/open-vsx/open-vsx-version.service.js index eda1ad0f4b7da..8c32f8b63ab9a 100644 --- a/services/open-vsx/open-vsx-version.service.js +++ b/services/open-vsx/open-vsx-version.service.js @@ -1,9 +1,7 @@ -'use strict' +import {renderVersionBadge} from '../version.js'; +import OpenVSXBase from './open-vsx-base.js'; -const { renderVersionBadge } = require('../version') -const OpenVSXBase = require('./open-vsx-base') - -module.exports = class OpenVSXVersion extends OpenVSXBase { +export default class OpenVSXVersion extends OpenVSXBase { static category = 'version' static route = { @@ -28,4 +26,4 @@ module.exports = class OpenVSXVersion extends OpenVSXBase { const { version } = await this.fetch({ namespace, extension }) return this.constructor.render({ version }) } -} +}; diff --git a/services/open-vsx/open-vsx-version.tester.js b/services/open-vsx/open-vsx-version.tester.js index 3a0a5e3e73fdb..55d2bf7f81b45 100644 --- a/services/open-vsx/open-vsx-version.tester.js +++ b/services/open-vsx/open-vsx-version.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { withRegex } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {withRegex} from '../test-validators.js'; const isVersion = withRegex(/^v(\d+\.\d+\.\d+)(\.\d+)?$/) diff --git a/services/opencollective/opencollective-all.service.js b/services/opencollective/opencollective-all.service.js index 526eb29d9456e..2221a4349ae6c 100644 --- a/services/opencollective/opencollective-all.service.js +++ b/services/opencollective/opencollective-all.service.js @@ -1,8 +1,6 @@ -'use strict' +import OpencollectiveBase from './opencollective-base.js'; -const OpencollectiveBase = require('./opencollective-base') - -module.exports = class OpencollectiveAll extends OpencollectiveBase { +export default class OpencollectiveAll extends OpencollectiveBase { static route = this.buildRoute('all') static examples = [ @@ -22,4 +20,4 @@ module.exports = class OpencollectiveAll extends OpencollectiveBase { const { backersCount } = await this.fetchCollectiveInfo(collective) return this.constructor.render(backersCount) } -} +}; diff --git a/services/opencollective/opencollective-all.tester.js b/services/opencollective/opencollective-all.tester.js index 8ba66a063abce..c7edba53e5245 100644 --- a/services/opencollective/opencollective-all.tester.js +++ b/services/opencollective/opencollective-all.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { nonNegativeInteger } = require('../validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {nonNegativeInteger} from '../validators.js'; +const t = (function() { + export default __a; +}()) t.create('renders correctly') .get('/shields.json') diff --git a/services/opencollective/opencollective-backers.service.js b/services/opencollective/opencollective-backers.service.js index ebbc72a717dbe..991c7d477982e 100644 --- a/services/opencollective/opencollective-backers.service.js +++ b/services/opencollective/opencollective-backers.service.js @@ -1,8 +1,6 @@ -'use strict' +import OpencollectiveBase from './opencollective-base.js'; -const OpencollectiveBase = require('./opencollective-base') - -module.exports = class OpencollectiveBackers extends OpencollectiveBase { +export default class OpencollectiveBackers extends OpencollectiveBase { static route = this.buildRoute('backers') static examples = [ @@ -25,4 +23,4 @@ module.exports = class OpencollectiveBackers extends OpencollectiveBase { ) return this.constructor.render(backersCount) } -} +}; diff --git a/services/opencollective/opencollective-backers.tester.js b/services/opencollective/opencollective-backers.tester.js index e9d2c0601b910..5746a11eb3f82 100644 --- a/services/opencollective/opencollective-backers.tester.js +++ b/services/opencollective/opencollective-backers.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { nonNegativeInteger } = require('../validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {nonNegativeInteger} from '../validators.js'; +const t = (function() { + export default __a; +}()) t.create('renders correctly') .get('/shields.json') diff --git a/services/opencollective/opencollective-base.js b/services/opencollective/opencollective-base.js index 74ae8ec35e586..ed4ed5c0e6fb6 100644 --- a/services/opencollective/opencollective-base.js +++ b/services/opencollective/opencollective-base.js @@ -1,8 +1,6 @@ -'use strict' - -const Joi = require('joi') -const { nonNegativeInteger } = require('../validators') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {nonNegativeInteger} from '../validators.js'; +import {BaseJsonService} from '..'; // https://developer.opencollective.com/#/api/collectives?id=get-info const collectiveDetailsSchema = Joi.object().keys({ @@ -21,7 +19,7 @@ function buildMembersArraySchema({ userType, tierRequired }) { return Joi.array().items(Joi.object().keys(keys)) } -module.exports = class OpencollectiveBase extends BaseJsonService { +export default class OpencollectiveBase extends BaseJsonService { static category = 'funding' static buildRoute(base, withTierId) { @@ -81,4 +79,4 @@ module.exports = class OpencollectiveBase extends BaseJsonService { result.tier = members.map(member => member.tier)[0] return result } -} +}; diff --git a/services/opencollective/opencollective-by-tier.service.js b/services/opencollective/opencollective-by-tier.service.js index c2712920d29a2..b2a140b1cd278 100644 --- a/services/opencollective/opencollective-by-tier.service.js +++ b/services/opencollective/opencollective-by-tier.service.js @@ -1,11 +1,9 @@ -'use strict' - -const OpencollectiveBase = require('./opencollective-base') +import OpencollectiveBase from './opencollective-base.js'; const documentation = `
According to open collectives documentation, you can find the tierId by looking at the URL after clicking on a Tier Card on the collective page. (e.g. tierId for https://opencollective.com/shields/order/2988 is 2988)
` -module.exports = class OpencollectiveByTier extends OpencollectiveBase { +export default class OpencollectiveByTier extends OpencollectiveBase { static route = this.buildRoute('tier', true) static examples = [ @@ -31,4 +29,4 @@ module.exports = class OpencollectiveByTier extends OpencollectiveBase { } else result.tier = 'new tier' return this.constructor.render(result.backersCount, result.tier) } -} +}; diff --git a/services/opencollective/opencollective-by-tier.tester.js b/services/opencollective/opencollective-by-tier.tester.js index d2b53a8d4e03e..0722053d16dd0 100644 --- a/services/opencollective/opencollective-by-tier.tester.js +++ b/services/opencollective/opencollective-by-tier.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { nonNegativeInteger } = require('../validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {nonNegativeInteger} from '../validators.js'; +const t = (function() { + export default __a; +}()) t.create('renders correctly') .get('/shields/2988.json') diff --git a/services/opencollective/opencollective-sponsors.service.js b/services/opencollective/opencollective-sponsors.service.js index 6dface34aa369..905400b2e2132 100644 --- a/services/opencollective/opencollective-sponsors.service.js +++ b/services/opencollective/opencollective-sponsors.service.js @@ -1,8 +1,6 @@ -'use strict' +import OpencollectiveBase from './opencollective-base.js'; -const OpencollectiveBase = require('./opencollective-base') - -module.exports = class OpencollectiveSponsors extends OpencollectiveBase { +export default class OpencollectiveSponsors extends OpencollectiveBase { static route = this.buildRoute('sponsors') static examples = [ @@ -25,4 +23,4 @@ module.exports = class OpencollectiveSponsors extends OpencollectiveBase { ) return this.constructor.render(backersCount) } -} +}; diff --git a/services/opencollective/opencollective-sponsors.tester.js b/services/opencollective/opencollective-sponsors.tester.js index 8784501370aad..078f878bf543f 100644 --- a/services/opencollective/opencollective-sponsors.tester.js +++ b/services/opencollective/opencollective-sponsors.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { nonNegativeInteger } = require('../validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {nonNegativeInteger} from '../validators.js'; +const t = (function() { + export default __a; +}()) t.create('renders correctly') .get('/shields.json') diff --git a/services/opm/opm-version.service.js b/services/opm/opm-version.service.js index 5d84009ce9697..1d4eefbf43563 100644 --- a/services/opm/opm-version.service.js +++ b/services/opm/opm-version.service.js @@ -1,9 +1,7 @@ -'use strict' +import {renderVersionBadge} from '../version.js'; +import {BaseService, NotFound, InvalidResponse} from '..'; -const { renderVersionBadge } = require('../version') -const { BaseService, NotFound, InvalidResponse } = require('..') - -module.exports = class OpmVersion extends BaseService { +export default class OpmVersion extends BaseService { static category = 'version' static route = { @@ -58,4 +56,4 @@ module.exports = class OpmVersion extends BaseService { return renderVersionBadge({ version }) } -} +}; diff --git a/services/opm/opm-version.tester.js b/services/opm/opm-version.tester.js index b6ae397047d20..d07b79a818983 100644 --- a/services/opm/opm-version.tester.js +++ b/services/opm/opm-version.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) const isValidVersion = Joi.string() .regex(/^v[\d+.]+$/) diff --git a/services/ore/ore-base.js b/services/ore/ore-base.js index 0158c4d864cdd..d2e2ada5c8e87 100644 --- a/services/ore/ore-base.js +++ b/services/ore/ore-base.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService, InvalidResponse } = require('..') +import Joi from 'joi'; +import {BaseJsonService, InvalidResponse} from '..'; const sessionSchema = Joi.object({ session: Joi.string().required(), @@ -85,4 +83,4 @@ class BaseOreService extends BaseJsonService { BaseOreService.sessionToken = null -module.exports = { keywords, documentation, BaseOreService } +export default { keywords, documentation, BaseOreService }; diff --git a/services/ore/ore-category.service.js b/services/ore/ore-category.service.js index 690dc5397b70f..107364cbb4933 100644 --- a/services/ore/ore-category.service.js +++ b/services/ore/ore-category.service.js @@ -1,8 +1,6 @@ -'use strict' +import {BaseOreService, documentation, keywords} from './ore-base.js'; -const { BaseOreService, documentation, keywords } = require('./ore-base') - -module.exports = class OreCategory extends BaseOreService { +export default class OreCategory extends BaseOreService { static category = 'other' static route = { @@ -43,4 +41,4 @@ module.exports = class OreCategory extends BaseOreService { const { category } = this.transform({ data }) return this.constructor.render({ category }) } -} +}; diff --git a/services/ore/ore-category.spec.js b/services/ore/ore-category.spec.js index b0572b192ab07..e54e6ec2f5135 100644 --- a/services/ore/ore-category.spec.js +++ b/services/ore/ore-category.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, forCases, given } = require('sazerac') -const OreCategory = require('./ore-category.service') +import {test, forCases, given} from 'sazerac'; +import OreCategory from './ore-category.service.js'; describe('OreCategory', function () { test(OreCategory.prototype.transform, () => { diff --git a/services/ore/ore-category.tester.js b/services/ore/ore-category.tester.js index 7ff6e39b8a643..eea23164d6806 100644 --- a/services/ore/ore-category.tester.js +++ b/services/ore/ore-category.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) // Taken from https://ore.spongepowered.org/api#/Projects/showProject const CATEGORY_ENUM = [ diff --git a/services/ore/ore-downloads.service.js b/services/ore/ore-downloads.service.js index 6817344c33232..324bcd0f88551 100644 --- a/services/ore/ore-downloads.service.js +++ b/services/ore/ore-downloads.service.js @@ -1,10 +1,8 @@ -'use strict' +import {metric} from '../text-formatters.js'; +import {downloadCount} from '../color-formatters.js'; +import {BaseOreService, documentation, keywords} from './ore-base.js'; -const { metric } = require('../text-formatters') -const { downloadCount } = require('../color-formatters') -const { BaseOreService, documentation, keywords } = require('./ore-base') - -module.exports = class OreDownloads extends BaseOreService { +export default class OreDownloads extends BaseOreService { static category = 'downloads' static route = { @@ -41,4 +39,4 @@ module.exports = class OreDownloads extends BaseOreService { } = await this.fetch({ pluginId }) return this.constructor.render({ downloads }) } -} +}; diff --git a/services/ore/ore-downloads.tester.js b/services/ore/ore-downloads.tester.js index bbe43909138e8..d87a96216b26e 100644 --- a/services/ore/ore-downloads.tester.js +++ b/services/ore/ore-downloads.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isMetric } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isMetric} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('Nucleus (pluginId nucleus)').get('/nucleus.json').expectBadge({ label: 'downloads', diff --git a/services/ore/ore-license.service.js b/services/ore/ore-license.service.js index 397558ca71831..f8ee6a0482d2f 100644 --- a/services/ore/ore-license.service.js +++ b/services/ore/ore-license.service.js @@ -1,9 +1,7 @@ -'use strict' +import {renderLicenseBadge} from '../licenses.js'; +import {BaseOreService, documentation, keywords} from './ore-base.js'; -const { renderLicenseBadge } = require('../licenses') -const { BaseOreService, documentation, keywords } = require('./ore-base') - -module.exports = class OreLicense extends BaseOreService { +export default class OreLicense extends BaseOreService { static category = 'license' static route = { @@ -47,4 +45,4 @@ module.exports = class OreLicense extends BaseOreService { const { license } = this.transform({ data }) return this.constructor.render({ license }) } -} +}; diff --git a/services/ore/ore-license.spec.js b/services/ore/ore-license.spec.js index 166e1c34c2e97..7bfd00d6a7a31 100644 --- a/services/ore/ore-license.spec.js +++ b/services/ore/ore-license.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const OreLicense = require('./ore-license.service') +import {test, given} from 'sazerac'; +import OreLicense from './ore-license.service.js'; describe('OreLicense', function () { test(OreLicense.prototype.transform, () => { diff --git a/services/ore/ore-license.tester.js b/services/ore/ore-license.tester.js index 26617eef67543..b0dad5ff7248b 100644 --- a/services/ore/ore-license.tester.js +++ b/services/ore/ore-license.tester.js @@ -1,6 +1,6 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) +const t = (function() { + export default __a; +}()) t.create('Nucleus (pluginId nucleus)').get('/nucleus.json').expectBadge({ label: 'license', diff --git a/services/ore/ore-sponge-versions.service.js b/services/ore/ore-sponge-versions.service.js index 12b0d2f194b1f..bcbd897ac739d 100644 --- a/services/ore/ore-sponge-versions.service.js +++ b/services/ore/ore-sponge-versions.service.js @@ -1,8 +1,6 @@ -'use strict' +import {BaseOreService, documentation, keywords} from './ore-base.js'; -const { BaseOreService, documentation, keywords } = require('./ore-base') - -module.exports = class OreSpongeVersions extends BaseOreService { +export default class OreSpongeVersions extends BaseOreService { static category = 'platform-support' static route = { @@ -50,4 +48,4 @@ module.exports = class OreSpongeVersions extends BaseOreService { const { versions } = this.transform({ data }) return this.constructor.render({ versions }) } -} +}; diff --git a/services/ore/ore-sponge-versions.spec.js b/services/ore/ore-sponge-versions.spec.js index 21710194283e9..6f78b900e1d0d 100644 --- a/services/ore/ore-sponge-versions.spec.js +++ b/services/ore/ore-sponge-versions.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, forCases, given } = require('sazerac') -const OreSpongeVersions = require('./ore-sponge-versions.service') +import {test, forCases, given} from 'sazerac'; +import OreSpongeVersions from './ore-sponge-versions.service.js'; const PROMOTED_VERSIONS = [ { diff --git a/services/ore/ore-sponge-versions.tester.js b/services/ore/ore-sponge-versions.tester.js index 7af8fb62a5dd8..ac4a500b24b82 100644 --- a/services/ore/ore-sponge-versions.tester.js +++ b/services/ore/ore-sponge-versions.tester.js @@ -1,5 +1,3 @@ -'use strict' - const Joi = require('joi').extend(joi => ({ base: joi.array(), coerce: (value, helpers) => ({ @@ -8,7 +6,9 @@ const Joi = require('joi').extend(joi => ({ type: 'versionArray', })) const isDottedVersionAtLeastOne = Joi.string().regex(/\d+(\.\d+)?(\.\d+)?$/) -const t = (module.exports = require('../tester').createServiceTester()) +const t = (function() { + export default __a; +}()) t.create('Nucleus (pluginId nucleus)') .get('/nucleus.json') diff --git a/services/ore/ore-stars.service.js b/services/ore/ore-stars.service.js index d24b8df07e7c7..2d36af4fa03d1 100644 --- a/services/ore/ore-stars.service.js +++ b/services/ore/ore-stars.service.js @@ -1,9 +1,7 @@ -'use strict' +import {metric} from '../text-formatters.js'; +import {BaseOreService, documentation, keywords} from './ore-base.js'; -const { metric } = require('../text-formatters') -const { BaseOreService, documentation, keywords } = require('./ore-base') - -module.exports = class OreStars extends BaseOreService { +export default class OreStars extends BaseOreService { static category = 'rating' static route = { @@ -39,4 +37,4 @@ module.exports = class OreStars extends BaseOreService { const { stars } = stats return this.constructor.render({ stars }) } -} +}; diff --git a/services/ore/ore-stars.tester.js b/services/ore/ore-stars.tester.js index eb01ba380bd6b..ee4059beef5db 100644 --- a/services/ore/ore-stars.tester.js +++ b/services/ore/ore-stars.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isMetric } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isMetric} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('Nucleus (pluginId nucleus)').get('/nucleus.json').expectBadge({ label: 'stars', diff --git a/services/ore/ore-version.service.js b/services/ore/ore-version.service.js index 5f85de05e1a20..cd16351110a17 100644 --- a/services/ore/ore-version.service.js +++ b/services/ore/ore-version.service.js @@ -1,9 +1,7 @@ -'use strict' +import {renderVersionBadge} from '../version.js'; +import {BaseOreService, documentation, keywords} from './ore-base.js'; -const { renderVersionBadge } = require('../version') -const { BaseOreService, documentation, keywords } = require('./ore-base') - -module.exports = class OreVersion extends BaseOreService { +export default class OreVersion extends BaseOreService { static category = 'version' static route = { @@ -49,4 +47,4 @@ module.exports = class OreVersion extends BaseOreService { const { version } = this.transform({ data }) return this.constructor.render({ version }) } -} +}; diff --git a/services/ore/ore-version.spec.js b/services/ore/ore-version.spec.js index 4b2cb6656eacf..6740cc6e4a761 100644 --- a/services/ore/ore-version.spec.js +++ b/services/ore/ore-version.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const OreVersion = require('./ore-version.service') +import {test, given} from 'sazerac'; +import OreVersion from './ore-version.service.js'; describe('OreVersion', function () { test(OreVersion.prototype.transform, () => { diff --git a/services/ore/ore-version.tester.js b/services/ore/ore-version.tester.js index a1aa7f8cfe06d..6525d4e70ed72 100644 --- a/services/ore/ore-version.tester.js +++ b/services/ore/ore-version.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isVPlusDottedVersionAtLeastOne } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('Nucleus (pluginId nucleus)').get('/nucleus.json').expectBadge({ label: 'version', diff --git a/services/osslifecycle/osslifecycle.service.js b/services/osslifecycle/osslifecycle.service.js index 78f110753bf9b..5ba5d950cf3a4 100644 --- a/services/osslifecycle/osslifecycle.service.js +++ b/services/osslifecycle/osslifecycle.service.js @@ -1,6 +1,4 @@ -'use strict' - -const { BaseService, InvalidResponse } = require('..') +import {BaseService, InvalidResponse} from '..'; const documentation = `@@ -13,7 +11,7 @@ const documentation = `
` -module.exports = class OssTracker extends BaseService { +export default class OssTracker extends BaseService { static category = 'other' static route = { @@ -96,4 +94,4 @@ module.exports = class OssTracker extends BaseService { }) } } -} +}; diff --git a/services/osslifecycle/osslifecycle.tester.js b/services/osslifecycle/osslifecycle.tester.js index a5d40b61d3fa2..fe38ce87c5652 100644 --- a/services/osslifecycle/osslifecycle.tester.js +++ b/services/osslifecycle/osslifecycle.tester.js @@ -1,11 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'osslifecycle', - title: 'OSS Lifecycle', -})) +const t = (function() { + export default __a; +}()) t.create('osslifecycle active status').get('/netflix/sureal.json').expectBadge({ label: 'oss lifecycle', diff --git a/services/package-json-helpers.js b/services/package-json-helpers.js index c41d3ca3fa1fa..648ad79e96fe3 100644 --- a/services/package-json-helpers.js +++ b/services/package-json-helpers.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { InvalidParameter } = require('.') +import Joi from 'joi'; +import {InvalidParameter} from '.'; const isDependencyMap = Joi.object() .pattern( @@ -45,8 +43,8 @@ function getDependencyVersion({ return { range } } -module.exports = { +export default { isDependencyMap, isPackageJsonWithDependencies, getDependencyVersion, -} +}; diff --git a/services/package-json-helpers.spec.js b/services/package-json-helpers.spec.js index 7d6437b0e0185..2e46c419ad19a 100644 --- a/services/package-json-helpers.spec.js +++ b/services/package-json-helpers.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const { getDependencyVersion } = require('./package-json-helpers') +import {test, given} from 'sazerac'; +import {getDependencyVersion} from './package-json-helpers.js'; describe('Contributor count helpers', function () { test(getDependencyVersion, () => { diff --git a/services/packagecontrol/packagecontrol.service.js b/services/packagecontrol/packagecontrol.service.js index 595986e13af7e..d907d1a295441 100644 --- a/services/packagecontrol/packagecontrol.service.js +++ b/services/packagecontrol/packagecontrol.service.js @@ -1,10 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { downloadCount } = require('../color-formatters') -const { nonNegativeInteger } = require('../validators') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {downloadCount} from '../color-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; +import {BaseJsonService} from '..'; const keywords = ['sublime', 'sublimetext', 'packagecontrol'] @@ -116,4 +114,4 @@ function DownloadsForInterval(interval) { } } -module.exports = ['day', 'week', 'month', 'total'].map(DownloadsForInterval) +export default ['day', 'week', 'month', 'total'].map(DownloadsForInterval); diff --git a/services/packagecontrol/packagecontrol.tester.js b/services/packagecontrol/packagecontrol.tester.js index 305811406aea1..e71462a7cef55 100644 --- a/services/packagecontrol/packagecontrol.tester.js +++ b/services/packagecontrol/packagecontrol.tester.js @@ -1,12 +1,9 @@ -'use strict' +import {ServiceTester} from '../tester.js'; +import {isMetric, isMetricOverTimePeriod} from '../test-validators.js'; -const { ServiceTester } = require('../tester') -const { isMetric, isMetricOverTimePeriod } = require('../test-validators') - -const t = (module.exports = new ServiceTester({ - id: 'packagecontrol', - title: 'Package Control', -})) +const t = (function() { + export default __a; +}()) t.create('monthly downloads').get('/dm/GitGutter.json').expectBadge({ label: 'downloads', diff --git a/services/packagist/packagist-base.js b/services/packagist/packagist-base.js index 39e645be688d6..95f0a5463bd08 100644 --- a/services/packagist/packagist-base.js +++ b/services/packagist/packagist-base.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {BaseJsonService} from '..'; const packageSchema = Joi.object() .pattern( @@ -101,10 +99,10 @@ const cacheDocumentationFragment = ` ` -module.exports = { +export default { allVersionsSchema, keywords, BasePackagistService, customServerDocumentationFragment, cacheDocumentationFragment, -} +}; diff --git a/services/packagist/packagist-downloads.service.js b/services/packagist/packagist-downloads.service.js index adf36593fb3a7..ba1a1b49144f3 100644 --- a/services/packagist/packagist-downloads.service.js +++ b/services/packagist/packagist-downloads.service.js @@ -1,15 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { downloadCount } = require('../color-formatters') -const { optionalUrl } = require('../validators') -const { - keywords, - BasePackagistService, - customServerDocumentationFragment, - cacheDocumentationFragment, -} = require('./packagist-base') +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {downloadCount} from '../color-formatters.js'; +import {optionalUrl} from '../validators.js'; +import {keywords, BasePackagistService, customServerDocumentationFragment, cacheDocumentationFragment} from './packagist-base.js'; const periodMap = { dm: { @@ -40,7 +33,7 @@ const queryParamSchema = Joi.object({ server: optionalUrl, }).required() -module.exports = class PackagistDownloads extends BasePackagistService { +export default class PackagistDownloads extends BasePackagistService { static category = 'downloads' static route = { @@ -103,4 +96,4 @@ module.exports = class PackagistDownloads extends BasePackagistService { interval, }) } -} +}; diff --git a/services/packagist/packagist-downloads.tester.js b/services/packagist/packagist-downloads.tester.js index cd23f75723241..c51bab3d3e688 100644 --- a/services/packagist/packagist-downloads.tester.js +++ b/services/packagist/packagist-downloads.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isMetric, isMetricOverTimePeriod } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isMetric, isMetricOverTimePeriod} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('daily downloads (valid, no package version specified)') .get('/dd/doctrine/orm.json') diff --git a/services/packagist/packagist-license.service.js b/services/packagist/packagist-license.service.js index c7c99533dbe19..e5f60518f6428 100644 --- a/services/packagist/packagist-license.service.js +++ b/services/packagist/packagist-license.service.js @@ -1,14 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { renderLicenseBadge } = require('../licenses') -const { optionalUrl } = require('../validators') -const { NotFound } = require('..') -const { - keywords, - BasePackagistService, - customServerDocumentationFragment, -} = require('./packagist-base') +import Joi from 'joi'; +import {renderLicenseBadge} from '../licenses.js'; +import {optionalUrl} from '../validators.js'; +import {NotFound} from '..'; +import {keywords, BasePackagistService, customServerDocumentationFragment} from './packagist-base.js'; const packageSchema = Joi.object() .pattern( @@ -28,7 +22,7 @@ const queryParamSchema = Joi.object({ server: optionalUrl, }).required() -module.exports = class PackagistLicense extends BasePackagistService { +export default class PackagistLicense extends BasePackagistService { static category = 'license' static route = { @@ -72,4 +66,4 @@ module.exports = class PackagistLicense extends BasePackagistService { const { license } = this.transform({ json, user, repo }) return renderLicenseBadge({ license }) } -} +}; diff --git a/services/packagist/packagist-license.spec.js b/services/packagist/packagist-license.spec.js index a9241e10ae78c..765f34c4d767c 100644 --- a/services/packagist/packagist-license.spec.js +++ b/services/packagist/packagist-license.spec.js @@ -1,8 +1,6 @@ -'use strict' - -const { expect } = require('chai') -const { NotFound } = require('..') -const PackagistLicense = require('./packagist-license.service') +import {expect} from 'chai'; +import {NotFound} from '..'; +import PackagistLicense from './packagist-license.service.js'; describe('PackagistLicense', function () { it('should throw NotFound when default branch is missing', function () { diff --git a/services/packagist/packagist-license.tester.js b/services/packagist/packagist-license.tester.js index 983da773e4f9b..17111d610ede2 100644 --- a/services/packagist/packagist-license.tester.js +++ b/services/packagist/packagist-license.tester.js @@ -1,6 +1,6 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) +const t = (function() { + export default __a; +}()) t.create('license (valid)') .get('/symfony/symfony.json') diff --git a/services/packagist/packagist-php-version.service.js b/services/packagist/packagist-php-version.service.js index 2514c2ba460dd..c0d0b7c442847 100644 --- a/services/packagist/packagist-php-version.service.js +++ b/services/packagist/packagist-php-version.service.js @@ -1,19 +1,13 @@ -'use strict' - -const Joi = require('joi') -const { optionalUrl } = require('../validators') -const { NotFound } = require('..') -const { - allVersionsSchema, - BasePackagistService, - customServerDocumentationFragment, -} = require('./packagist-base') +import Joi from 'joi'; +import {optionalUrl} from '../validators.js'; +import {NotFound} from '..'; +import {allVersionsSchema, BasePackagistService, customServerDocumentationFragment} from './packagist-base.js'; const queryParamSchema = Joi.object({ server: optionalUrl, }).required() -module.exports = class PackagistPhpVersion extends BasePackagistService { +export default class PackagistPhpVersion extends BasePackagistService { static category = 'platform-support' static route = { @@ -100,4 +94,4 @@ module.exports = class PackagistPhpVersion extends BasePackagistService { }) return this.constructor.render({ php: phpVersion }) } -} +}; diff --git a/services/packagist/packagist-php-version.spec.js b/services/packagist/packagist-php-version.spec.js index 7af1b66996b34..b02f860284ffb 100644 --- a/services/packagist/packagist-php-version.spec.js +++ b/services/packagist/packagist-php-version.spec.js @@ -1,8 +1,6 @@ -'use strict' - -const { expect } = require('chai') -const { NotFound } = require('..') -const PackagistPhpVersion = require('./packagist-php-version.service') +import {expect} from 'chai'; +import {NotFound} from '..'; +import PackagistPhpVersion from './packagist-php-version.service.js'; describe('PackagistPhpVersion', function () { const json = { diff --git a/services/packagist/packagist-php-version.tester.js b/services/packagist/packagist-php-version.tester.js index 0aa385908892e..ef0fcc676095a 100644 --- a/services/packagist/packagist-php-version.tester.js +++ b/services/packagist/packagist-php-version.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isComposerVersion } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isComposerVersion} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('gets the package version of symfony') .get('/symfony/symfony.json') diff --git a/services/packagist/packagist-stars.service.js b/services/packagist/packagist-stars.service.js index 847ee6da2abf6..fff65931ec37d 100644 --- a/services/packagist/packagist-stars.service.js +++ b/services/packagist/packagist-stars.service.js @@ -1,15 +1,7 @@ -'use strict' - -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { nonNegativeInteger } = require('../validators') -const { optionalUrl } = require('../validators') -const { - keywords, - BasePackagistService, - customServerDocumentationFragment, - cacheDocumentationFragment, -} = require('./packagist-base') +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {nonNegativeInteger, optionalUrl} from '../validators.js'; +import {keywords, BasePackagistService, customServerDocumentationFragment, cacheDocumentationFragment} from './packagist-base.js'; const schema = Joi.object({ package: Joi.object({ @@ -21,7 +13,7 @@ const queryParamSchema = Joi.object({ server: optionalUrl, }).required() -module.exports = class PackagistStars extends BasePackagistService { +export default class PackagistStars extends BasePackagistService { static category = 'rating' static route = { @@ -79,4 +71,4 @@ module.exports = class PackagistStars extends BasePackagistService { stars: favers, }) } -} +}; diff --git a/services/packagist/packagist-stars.tester.js b/services/packagist/packagist-stars.tester.js index e8b40b69af4f4..8537c9804ba43 100644 --- a/services/packagist/packagist-stars.tester.js +++ b/services/packagist/packagist-stars.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isMetric } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isMetric} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('Stars (valid package)').get('/guzzlehttp/guzzle.json').expectBadge({ label: 'stars', diff --git a/services/packagist/packagist-version.service.js b/services/packagist/packagist-version.service.js index 900ed33505b48..b56e0aee74f38 100644 --- a/services/packagist/packagist-version.service.js +++ b/services/packagist/packagist-version.service.js @@ -1,16 +1,9 @@ -'use strict' - -const Joi = require('joi') -const { renderVersionBadge } = require('../version') -const { compare, isStable, latest } = require('../php-version') -const { optionalUrl } = require('../validators') -const { NotFound, redirector } = require('..') -const { - allVersionsSchema, - keywords, - BasePackagistService, - customServerDocumentationFragment, -} = require('./packagist-base') +import Joi from 'joi'; +import {renderVersionBadge} from '../version.js'; +import {compare, isStable, latest} from '../php-version.js'; +import {optionalUrl} from '../validators.js'; +import {NotFound, redirector} from '..'; +import {allVersionsSchema, keywords, BasePackagistService, customServerDocumentationFragment} from './packagist-base.js'; const packageSchema = Joi.object() .pattern( @@ -148,4 +141,4 @@ const PackagistVersionRedirector = redirector({ dateAdded: new Date('2019-12-15'), }) -module.exports = { PackagistVersion, PackagistVersionRedirector } +export default { PackagistVersion, PackagistVersionRedirector }; diff --git a/services/packagist/packagist-version.tester.js b/services/packagist/packagist-version.tester.js index b01e1b7935679..7bbccf085e90e 100644 --- a/services/packagist/packagist-version.tester.js +++ b/services/packagist/packagist-version.tester.js @@ -1,15 +1,9 @@ -'use strict' - -const Joi = require('joi') -const { - isVPlusDottedVersionNClausesWithOptionalSuffix, -} = require('../test-validators') -const { ServiceTester } = require('../tester') -const t = (module.exports = new ServiceTester({ - id: 'packagist', - title: 'Packagist Version', - pathPrefix: '/packagist', -})) +import Joi from 'joi'; +import {isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js'; +import {ServiceTester} from '../tester.js'; +const t = (function() { + export default __a; +}()) /* validator for a packagist version number diff --git a/services/php-eye/php-eye-hhvm.service.js b/services/php-eye/php-eye-hhvm.service.js index f157de1eeb853..5c224139d8b55 100644 --- a/services/php-eye/php-eye-hhvm.service.js +++ b/services/php-eye/php-eye-hhvm.service.js @@ -1,8 +1,6 @@ -'use strict' +import {deprecatedService} from '..'; -const { deprecatedService } = require('..') - -module.exports = [ +export default [ deprecatedService({ category: 'platform-support', label: 'hhvm', @@ -12,4 +10,4 @@ module.exports = [ }, dateAdded: new Date('2018-04-20'), }), -] +]; diff --git a/services/php-eye/php-eye-hhvm.tester.js b/services/php-eye/php-eye-hhvm.tester.js index ad4e58852df34..3ce4aa841fdb1 100644 --- a/services/php-eye/php-eye-hhvm.tester.js +++ b/services/php-eye/php-eye-hhvm.tester.js @@ -1,12 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'hhvm', - title: 'hhvm', - pathPrefix: '/hhvm', -})) +const t = (function() { + export default __a; +}()) t.create('no longer available (previously default branch)') .get('/symfony/symfony.json') diff --git a/services/php-eye/php-eye-php-version.service.js b/services/php-eye/php-eye-php-version.service.js index e7f13fb857ba1..53bb0a2f1ae61 100644 --- a/services/php-eye/php-eye-php-version.service.js +++ b/services/php-eye/php-eye-php-version.service.js @@ -1,8 +1,6 @@ -'use strict' +import {deprecatedService} from '..'; -const { deprecatedService } = require('..') - -module.exports = [ +export default [ deprecatedService({ category: 'platform-support', label: 'php tested', @@ -12,4 +10,4 @@ module.exports = [ }, dateAdded: new Date('2018-04-20'), }), -] +]; diff --git a/services/php-eye/php-eye-php-version.tester.js b/services/php-eye/php-eye-php-version.tester.js index ddf754cf481a2..8bc354293fcfc 100644 --- a/services/php-eye/php-eye-php-version.tester.js +++ b/services/php-eye/php-eye-php-version.tester.js @@ -1,12 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'php-eye', - title: 'php-eye', - pathPrefix: '/php-eye', -})) +const t = (function() { + export default __a; +}()) t.create('no longer available (previously default branch)') .get('/symfony/symfony.json') diff --git a/services/php-version.js b/services/php-version.js index 17ede45a6f46d..5b939b4ebbe3f 100644 --- a/services/php-version.js +++ b/services/php-version.js @@ -3,13 +3,11 @@ * using the algorithm followed by Composer (see * https://getcomposer.org/doc/04-schema.md#version). */ -'use strict' - -const { promisify } = require('util') -const request = require('request') -const { regularUpdate } = require('../core/legacy/regular-update') -const { listCompare } = require('./version') -const { omitv } = require('./text-formatters') +import {promisify} from 'util'; +import request from 'request'; +import {regularUpdate} from '../core/legacy/regular-update.js'; +import {listCompare} from './version.js'; +import {omitv} from './text-formatters.js'; // Return a negative value if v1 < v2, // zero if v1 = v2, a positive value otherwise. @@ -237,14 +235,14 @@ async function getPhpReleases(githubApiProvider) { ), request: (url, options, cb) => githubApiProvider.request(request, url, {}, cb), - }) + }); } -module.exports = { +export default { compare, latest, isStable, minorVersion, versionReduction, getPhpReleases, -} +}; diff --git a/services/php-version.spec.js b/services/php-version.spec.js index 607f302ef7eb2..81eaa4763a96f 100644 --- a/services/php-version.spec.js +++ b/services/php-version.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const { compare, minorVersion, versionReduction } = require('./php-version') +import {test, given} from 'sazerac'; +import {compare, minorVersion, versionReduction} from './php-version.js'; const phpReleases = [ '5.0', diff --git a/services/pingpong/pingpong-status.service.js b/services/pingpong/pingpong-status.service.js index bdebc42a024de..9a2cd2d498b72 100644 --- a/services/pingpong/pingpong-status.service.js +++ b/services/pingpong/pingpong-status.service.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService, InvalidParameter, InvalidResponse } = require('..') +import Joi from 'joi'; +import {BaseJsonService, InvalidParameter, InvalidResponse} from '..'; const schema = Joi.object({ status: Joi.string().required(), @@ -14,7 +12,7 @@ const pingpongDocumentation = ` ` -module.exports = class PingPongStatus extends BaseJsonService { +export default class PingPongStatus extends BaseJsonService { static category = 'monitoring' static route = { base: 'pingpong/status', pattern: ':apiKey' } @@ -67,4 +65,4 @@ module.exports = class PingPongStatus extends BaseJsonService { const { status } = await this.fetch({ apiKey }) return this.constructor.render({ status }) } -} +}; diff --git a/services/pingpong/pingpong-status.tester.js b/services/pingpong/pingpong-status.tester.js index 9f151cc90967e..b32055cb944c8 100644 --- a/services/pingpong/pingpong-status.tester.js +++ b/services/pingpong/pingpong-status.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) const isCorrectStatus = Joi.string().valid( 'up', diff --git a/services/pingpong/pingpong-uptime.service.js b/services/pingpong/pingpong-uptime.service.js index 29878478269e9..2e16e22d56d0b 100644 --- a/services/pingpong/pingpong-uptime.service.js +++ b/services/pingpong/pingpong-uptime.service.js @@ -1,8 +1,6 @@ -'use strict' - -const Joi = require('joi') -const { coveragePercentage } = require('../color-formatters') -const { BaseJsonService, InvalidParameter } = require('..') +import Joi from 'joi'; +import {coveragePercentage} from '../color-formatters.js'; +import {BaseJsonService, InvalidParameter} from '..'; const schema = Joi.object({ uptime: Joi.number().min(0).max(100).required(), @@ -15,7 +13,7 @@ const pingpongDocumentation = ` ` -module.exports = class PingPongUptime extends BaseJsonService { +export default class PingPongUptime extends BaseJsonService { static category = 'monitoring' static route = { base: 'pingpong/uptime', pattern: ':apiKey' } @@ -58,4 +56,4 @@ module.exports = class PingPongUptime extends BaseJsonService { const { uptime } = await this.fetch({ apiKey }) return this.constructor.render({ uptime }) } -} +}; diff --git a/services/pingpong/pingpong-uptime.tester.js b/services/pingpong/pingpong-uptime.tester.js index ea72c86ba3b55..67c7fd07bb8b9 100644 --- a/services/pingpong/pingpong-uptime.tester.js +++ b/services/pingpong/pingpong-uptime.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isPercentage } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {isPercentage} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) t.create('PingPong: Uptime (valid)') .get('/sp_eb705b7c189f42e3b574dc790291c33f.json') diff --git a/services/pipenv-helpers.js b/services/pipenv-helpers.js index 4f31f2eaedef7..4154a32cbebfe 100644 --- a/services/pipenv-helpers.js +++ b/services/pipenv-helpers.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { InvalidParameter } = require('.') +import Joi from 'joi'; +import {InvalidParameter} from '.'; const isDependency = Joi.alternatives( Joi.object({ @@ -52,7 +50,7 @@ function getDependencyVersion({ } } -module.exports = { +export default { isLockfile, getDependencyVersion, -} +}; diff --git a/services/pkgreview/package-rating.service.js b/services/pkgreview/package-rating.service.js index fc7045cbc6a1d..af522234c1111 100644 --- a/services/pkgreview/package-rating.service.js +++ b/services/pkgreview/package-rating.service.js @@ -1,10 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { starRating, metric } = require('../text-formatters') -const { colorScale } = require('../color-formatters') -const { nonNegativeInteger } = require('../validators') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {starRating, metric} from '../text-formatters.js'; +import {colorScale} from '../color-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; +import {BaseJsonService} from '..'; const pkgReviewColor = colorScale([2, 3, 4]) @@ -15,7 +13,7 @@ const schema = Joi.object({ // Repository for this service is: https://github.com/iqubex-technologies/pkgreview.dev // Internally the service leverages the npms.io API (https://api.npms.io/v2) -module.exports = class PkgreviewRating extends BaseJsonService { +export default class PkgreviewRating extends BaseJsonService { static category = 'rating' static route = { @@ -82,4 +80,4 @@ module.exports = class PkgreviewRating extends BaseJsonService { rating: rating * 5, }) } -} +}; diff --git a/services/pkgreview/package-rating.tester.js b/services/pkgreview/package-rating.tester.js index a9859265224aa..298fe05c2d2ab 100644 --- a/services/pkgreview/package-rating.tester.js +++ b/services/pkgreview/package-rating.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { withRegex, isStarRating } = require('../test-validators') -const t = (module.exports = require('../tester').createServiceTester()) +import {withRegex, isStarRating} from '../test-validators.js'; +const t = (function() { + export default __a; +}()) const isRatingWithReviews = withRegex( /^(([0-4](.?([0-9]))?)|5)\/5?\s*\([0-9]*\)$/ diff --git a/services/poeditor/poeditor.service.js b/services/poeditor/poeditor.service.js index 3dd84aea53465..0d2acec00f3f9 100644 --- a/services/poeditor/poeditor.service.js +++ b/services/poeditor/poeditor.service.js @@ -1,9 +1,7 @@ -'use strict' - -const Joi = require('joi') -const { nonNegativeInteger } = require('../validators') -const { coveragePercentage } = require('../color-formatters') -const { BaseJsonService, InvalidResponse } = require('..') +import Joi from 'joi'; +import {nonNegativeInteger} from '../validators.js'; +import {coveragePercentage} from '../color-formatters.js'; +import {BaseJsonService, InvalidResponse} from '..'; const documentation = `
@@ -36,7 +34,7 @@ const queryParamSchema = Joi.object({
token: Joi.string().required(),
}).required()
-module.exports = class POEditor extends BaseJsonService {
+export default class POEditor extends BaseJsonService {
static category = 'other'
static route = {
@@ -101,4 +99,4 @@ module.exports = class POEditor extends BaseJsonService {
language: languages.find(lang => lang.code === languageCode),
})
}
-}
+};
diff --git a/services/poeditor/poeditor.tester.js b/services/poeditor/poeditor.tester.js
index 78db3b1657369..aacf4f6b45bfa 100644
--- a/services/poeditor/poeditor.tester.js
+++ b/services/poeditor/poeditor.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isIntegerPercentage } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isIntegerPercentage} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('gets POEditor progress online')
.get('/progress/323337/de.json?token=7a666b44c0985d16a7b59748f488275c')
diff --git a/services/powershellgallery/powershellgallery.service.js b/services/powershellgallery/powershellgallery.service.js
index 60f329ea95521..14c64e52ddb32 100644
--- a/services/powershellgallery/powershellgallery.service.js
+++ b/services/powershellgallery/powershellgallery.service.js
@@ -1,10 +1,5 @@
-'use strict'
-
-const {
- fetch,
- createServiceFamily,
-} = require('../nuget/nuget-v2-service-family')
-const { BaseXmlService } = require('..')
+import {fetch, createServiceFamily} from '../nuget/nuget-v2-service-family.js';
+import {BaseXmlService} from '..';
const WINDOWS_TAG_NAME = 'windows'
const MACOS_TAG_NAME = 'macos'
@@ -97,9 +92,9 @@ class PowershellGalleryPlatformSupport extends BaseXmlService {
}
}
-module.exports = {
+export default {
PowershellGalleryVersion,
PowershellGalleryVersionRedirector,
PowershellGalleryDownloads,
PowershellGalleryPlatformSupport,
-}
+};
diff --git a/services/powershellgallery/powershellgallery.tester.js b/services/powershellgallery/powershellgallery.tester.js
index d9999b919a23a..5070709f9cfe0 100644
--- a/services/powershellgallery/powershellgallery.tester.js
+++ b/services/powershellgallery/powershellgallery.tester.js
@@ -1,12 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { ServiceTester } = require('../tester')
-const {
- isMetric,
- isVPlusDottedVersionNClauses,
- isVPlusDottedVersionNClausesWithOptionalSuffix,
-} = require('../test-validators')
+import Joi from 'joi';
+import {ServiceTester} from '../tester.js';
+import {isMetric, isVPlusDottedVersionNClauses, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
const isPlatform = Joi.string().regex(
/^(windows|linux|macos)( \| (windows|linux|macos))*$/
)
@@ -15,7 +9,7 @@ const t = new ServiceTester({
id: 'powershellgallery',
title: 'PowerShell Gallery',
})
-module.exports = t
+export default t;
t.create('total downloads (valid)').get('/dt/ACMESharp.json').expectBadge({
label: 'downloads',
diff --git a/services/pub/pub.service.js b/services/pub/pub.service.js
index ccc12017b78c5..f07857dac53d9 100644
--- a/services/pub/pub.service.js
+++ b/services/pub/pub.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { latest, renderVersionBadge } = require('../version')
-const { BaseJsonService, redirector } = require('..')
+import Joi from 'joi';
+import {latest, renderVersionBadge} from '../version.js';
+import {BaseJsonService, redirector} from '..';
const schema = Joi.object({
versions: Joi.array().items(Joi.string()).required(),
@@ -68,4 +66,4 @@ const PubVersionRedirector = redirector({
dateAdded: new Date('2019-12-15'),
})
-module.exports = { PubVersion, PubVersionRedirector }
+export default { PubVersion, PubVersionRedirector };
diff --git a/services/pub/pub.tester.js b/services/pub/pub.tester.js
index 613447fff620d..a72b975eae68c 100644
--- a/services/pub/pub.tester.js
+++ b/services/pub/pub.tester.js
@@ -1,12 +1,8 @@
-'use strict'
-
-const { isVPlusTripleDottedVersion } = require('../test-validators')
-const { ServiceTester } = require('../tester')
-const t = (module.exports = new ServiceTester({
- id: 'PubVersion',
- title: 'Pub Version',
- pathPrefix: '/pub',
-}))
+import {isVPlusTripleDottedVersion} from '../test-validators.js';
+import {ServiceTester} from '../tester.js';
+const t = (function() {
+ export default __a;
+}())
t.create('package version').get('/v/box2d.json').expectBadge({
label: 'pub',
diff --git a/services/puppetforge/puppetforge-base.js b/services/puppetforge/puppetforge-base.js
index 4e209ca91821f..f0e6b273cc680 100644
--- a/services/puppetforge/puppetforge-base.js
+++ b/services/puppetforge/puppetforge-base.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { nonNegativeInteger, semver } = require('../validators')
-const { BaseJsonService } = require('..')
+import Joi from 'joi';
+import {nonNegativeInteger, semver} from '../validators.js';
+import {BaseJsonService} from '..';
const usersSchema = Joi.object({
module_count: nonNegativeInteger,
@@ -44,7 +42,7 @@ class BasePuppetForgeModulesService extends BaseJsonService {
}
}
-module.exports = {
+export default {
BasePuppetForgeModulesService,
BasePuppetForgeUsersService,
-}
+};
diff --git a/services/puppetforge/puppetforge-module-downloads.service.js b/services/puppetforge/puppetforge-module-downloads.service.js
index 84eddb3225d2b..3133e19278502 100644
--- a/services/puppetforge/puppetforge-module-downloads.service.js
+++ b/services/puppetforge/puppetforge-module-downloads.service.js
@@ -1,10 +1,8 @@
-'use strict'
+import {downloadCount} from '../color-formatters.js';
+import {metric} from '../text-formatters.js';
+import {BasePuppetForgeModulesService} from './puppetforge-base.js';
-const { downloadCount } = require('../color-formatters')
-const { metric } = require('../text-formatters')
-const { BasePuppetForgeModulesService } = require('./puppetforge-base')
-
-module.exports = class PuppetforgeModuleDownloads extends (
+export default class PuppetforgeModuleDownloads extends (
BasePuppetForgeModulesService
) {
static category = 'downloads'
@@ -38,4 +36,4 @@ module.exports = class PuppetforgeModuleDownloads extends (
const data = await this.fetch({ user, moduleName })
return this.constructor.render({ downloads: data.downloads })
}
-}
+};
diff --git a/services/puppetforge/puppetforge-module-downloads.tester.js b/services/puppetforge/puppetforge-module-downloads.tester.js
index f7383969f3d12..ed034ff56f044 100644
--- a/services/puppetforge/puppetforge-module-downloads.tester.js
+++ b/services/puppetforge/puppetforge-module-downloads.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('module downloads').get('/camptocamp/openssl.json').expectBadge({
label: 'downloads',
diff --git a/services/puppetforge/puppetforge-module-endorsement.service.js b/services/puppetforge/puppetforge-module-endorsement.service.js
index 4390bff469dd0..11d544fea8448 100644
--- a/services/puppetforge/puppetforge-module-endorsement.service.js
+++ b/services/puppetforge/puppetforge-module-endorsement.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import {NotFound} from '..';
+import {BasePuppetForgeModulesService} from './puppetforge-base.js';
-const { NotFound } = require('..')
-const { BasePuppetForgeModulesService } = require('./puppetforge-base')
-
-module.exports = class PuppetforgeModuleEndorsement extends (
+export default class PuppetforgeModuleEndorsement extends (
BasePuppetForgeModulesService
) {
static category = 'rating'
@@ -45,4 +43,4 @@ module.exports = class PuppetforgeModuleEndorsement extends (
}
return this.constructor.render({ endorsement })
}
-}
+};
diff --git a/services/puppetforge/puppetforge-module-endorsement.tester.js b/services/puppetforge/puppetforge-module-endorsement.tester.js
index 83c5e077585a4..0c4f0eef18119 100644
--- a/services/puppetforge/puppetforge-module-endorsement.tester.js
+++ b/services/puppetforge/puppetforge-module-endorsement.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { withRegex } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {withRegex} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('module endorsement')
.get('/camptocamp/openssl.json')
diff --git a/services/puppetforge/puppetforge-module-feedback.service.js b/services/puppetforge/puppetforge-module-feedback.service.js
index ad2e845cacb9e..207f790703ebc 100644
--- a/services/puppetforge/puppetforge-module-feedback.service.js
+++ b/services/puppetforge/puppetforge-module-feedback.service.js
@@ -1,12 +1,8 @@
-'use strict'
+import {coveragePercentage as coveragePercentageColor} from '../color-formatters.js';
+import {NotFound} from '..';
+import {BasePuppetForgeModulesService} from './puppetforge-base.js';
-const {
- coveragePercentage: coveragePercentageColor,
-} = require('../color-formatters')
-const { NotFound } = require('..')
-const { BasePuppetForgeModulesService } = require('./puppetforge-base')
-
-module.exports = class PuppetforgeModuleFeedback extends (
+export default class PuppetforgeModuleFeedback extends (
BasePuppetForgeModulesService
) {
static category = 'rating'
@@ -43,4 +39,4 @@ module.exports = class PuppetforgeModuleFeedback extends (
}
return this.constructor.render({ score: data.feedback_score })
}
-}
+};
diff --git a/services/puppetforge/puppetforge-module-feedback.tester.js b/services/puppetforge/puppetforge-module-feedback.tester.js
index 1178ab33de086..bd2b0079f1c84 100644
--- a/services/puppetforge/puppetforge-module-feedback.tester.js
+++ b/services/puppetforge/puppetforge-module-feedback.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isPercentage } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isPercentage} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('module feedback').get('/camptocamp/openssl.json').expectBadge({
label: 'score',
diff --git a/services/puppetforge/puppetforge-module-pdk-version.service.js b/services/puppetforge/puppetforge-module-pdk-version.service.js
index ced2ff067923f..43129da1072e9 100644
--- a/services/puppetforge/puppetforge-module-pdk-version.service.js
+++ b/services/puppetforge/puppetforge-module-pdk-version.service.js
@@ -1,10 +1,8 @@
-'use strict'
+import {renderVersionBadge} from '../version.js';
+import {NotFound} from '..';
+import {BasePuppetForgeModulesService} from './puppetforge-base.js';
-const { renderVersionBadge } = require('../version')
-const { NotFound } = require('..')
-const { BasePuppetForgeModulesService } = require('./puppetforge-base')
-
-module.exports = class PuppetforgeModulePdkVersion extends (
+export default class PuppetforgeModulePdkVersion extends (
BasePuppetForgeModulesService
) {
static category = 'platform-support'
@@ -37,4 +35,4 @@ module.exports = class PuppetforgeModulePdkVersion extends (
throw new NotFound({ prettyMessage: 'none' })
}
}
-}
+};
diff --git a/services/puppetforge/puppetforge-module-pdk-version.tester.js b/services/puppetforge/puppetforge-module-pdk-version.tester.js
index d38efaeb00fa9..fbecff1dfdb53 100644
--- a/services/puppetforge/puppetforge-module-pdk-version.tester.js
+++ b/services/puppetforge/puppetforge-module-pdk-version.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isSemver } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isSemver} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('PDK version').get('/tragiccode/azure_key_vault.json').expectBadge({
label: 'pdk version',
diff --git a/services/puppetforge/puppetforge-module-version.service.js b/services/puppetforge/puppetforge-module-version.service.js
index 148a800d8c66a..bda35c2cc89b9 100644
--- a/services/puppetforge/puppetforge-module-version.service.js
+++ b/services/puppetforge/puppetforge-module-version.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import {renderVersionBadge} from '../version.js';
+import {BasePuppetForgeModulesService} from './puppetforge-base.js';
-const { renderVersionBadge } = require('../version')
-const { BasePuppetForgeModulesService } = require('./puppetforge-base')
-
-module.exports = class PuppetforgeModuleVersion extends (
+export default class PuppetforgeModuleVersion extends (
BasePuppetForgeModulesService
) {
static category = 'version'
@@ -30,4 +28,4 @@ module.exports = class PuppetforgeModuleVersion extends (
const data = await this.fetch({ user, moduleName })
return renderVersionBadge({ version: data.current_release.version })
}
-}
+};
diff --git a/services/puppetforge/puppetforge-module-version.tester.js b/services/puppetforge/puppetforge-module-version.tester.js
index a06132f1c5513..a304263ae1c4f 100644
--- a/services/puppetforge/puppetforge-module-version.tester.js
+++ b/services/puppetforge/puppetforge-module-version.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isSemver } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isSemver} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('module version').get('/camptocamp/openssl.json').expectBadge({
label: 'puppetforge',
diff --git a/services/puppetforge/puppetforge-user-module-count.service.js b/services/puppetforge/puppetforge-user-module-count.service.js
index e45a739a8a225..d0da8557d3892 100644
--- a/services/puppetforge/puppetforge-user-module-count.service.js
+++ b/services/puppetforge/puppetforge-user-module-count.service.js
@@ -1,10 +1,8 @@
-'use strict'
+import {metric} from '../text-formatters.js';
+import {floorCount as floorCountColor} from '../color-formatters.js';
+import {BasePuppetForgeUsersService} from './puppetforge-base.js';
-const { metric } = require('../text-formatters')
-const { floorCount: floorCountColor } = require('../color-formatters')
-const { BasePuppetForgeUsersService } = require('./puppetforge-base')
-
-module.exports = class PuppetForgeModuleCountService extends (
+export default class PuppetForgeModuleCountService extends (
BasePuppetForgeUsersService
) {
static category = 'other'
@@ -37,4 +35,4 @@ module.exports = class PuppetForgeModuleCountService extends (
const data = await this.fetch({ user })
return this.constructor.render({ modules: data.module_count })
}
-}
+};
diff --git a/services/puppetforge/puppetforge-user-module-count.tester.js b/services/puppetforge/puppetforge-user-module-count.tester.js
index 1a970d83abb66..73e5aae70e7e6 100644
--- a/services/puppetforge/puppetforge-user-module-count.tester.js
+++ b/services/puppetforge/puppetforge-user-module-count.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('modules by user').get('/camptocamp.json').expectBadge({
label: 'modules',
diff --git a/services/puppetforge/puppetforge-user-release-count.service.js b/services/puppetforge/puppetforge-user-release-count.service.js
index ee2afe4932792..918f01b5f812c 100644
--- a/services/puppetforge/puppetforge-user-release-count.service.js
+++ b/services/puppetforge/puppetforge-user-release-count.service.js
@@ -1,10 +1,8 @@
-'use strict'
+import {metric} from '../text-formatters.js';
+import {floorCount as floorCountColor} from '../color-formatters.js';
+import {BasePuppetForgeUsersService} from './puppetforge-base.js';
-const { metric } = require('../text-formatters')
-const { floorCount: floorCountColor } = require('../color-formatters')
-const { BasePuppetForgeUsersService } = require('./puppetforge-base')
-
-module.exports = class PuppetForgeReleaseCountService extends (
+export default class PuppetForgeReleaseCountService extends (
BasePuppetForgeUsersService
) {
static category = 'other'
@@ -37,4 +35,4 @@ module.exports = class PuppetForgeReleaseCountService extends (
const data = await this.fetch({ user })
return this.constructor.render({ releases: data.release_count })
}
-}
+};
diff --git a/services/puppetforge/puppetforge-user-release-count.tester.js b/services/puppetforge/puppetforge-user-release-count.tester.js
index 75ec3023d2b89..ae09b05c6f151 100644
--- a/services/puppetforge/puppetforge-user-release-count.tester.js
+++ b/services/puppetforge/puppetforge-user-release-count.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('releases by user').get('/camptocamp.json').expectBadge({
label: 'releases',
diff --git a/services/pypi/pypi-base.js b/services/pypi/pypi-base.js
index 8ca4d87f77075..540b93244e017 100644
--- a/services/pypi/pypi-base.js
+++ b/services/pypi/pypi-base.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseJsonService } = require('..')
+import Joi from 'joi';
+import {BaseJsonService} from '..';
const schema = Joi.object({
info: Joi.object({
@@ -24,7 +22,7 @@ const schema = Joi.object({
.required(),
}).required()
-module.exports = class PypiBase extends BaseJsonService {
+export default class PypiBase extends BaseJsonService {
static buildRoute(base) {
return {
base,
@@ -39,4 +37,4 @@ module.exports = class PypiBase extends BaseJsonService {
errorMessages: { 404: 'package or version not found' },
})
}
-}
+};
diff --git a/services/pypi/pypi-django-versions.service.js b/services/pypi/pypi-django-versions.service.js
index ca6325ad94ae5..5a742b8ee6cb8 100644
--- a/services/pypi/pypi-django-versions.service.js
+++ b/services/pypi/pypi-django-versions.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import PypiBase from './pypi-base.js';
+import {sortDjangoVersions, parseClassifiers} from './pypi-helpers.js';
-const PypiBase = require('./pypi-base')
-const { sortDjangoVersions, parseClassifiers } = require('./pypi-helpers')
-
-module.exports = class PypiDjangoVersions extends PypiBase {
+export default class PypiDjangoVersions extends PypiBase {
static category = 'platform-support'
static route = this.buildRoute('pypi/djversions')
@@ -44,4 +42,4 @@ module.exports = class PypiDjangoVersions extends PypiBase {
return this.constructor.render({ versions })
}
-}
+};
diff --git a/services/pypi/pypi-django-versions.tester.js b/services/pypi/pypi-django-versions.tester.js
index 8dba69853c573..240f3268fc43a 100644
--- a/services/pypi/pypi-django-versions.tester.js
+++ b/services/pypi/pypi-django-versions.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
const isPipeSeparatedDjangoVersions = Joi.string().regex(
/^([1-9]\.[0-9]+(?: \| )?)+$/
diff --git a/services/pypi/pypi-downloads.service.js b/services/pypi/pypi-downloads.service.js
index 900dcf614dd5f..70152d2d1d1be 100644
--- a/services/pypi/pypi-downloads.service.js
+++ b/services/pypi/pypi-downloads.service.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { downloadCount } = require('../color-formatters')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { BaseJsonService } = require('..')
+import Joi from 'joi';
+import {downloadCount} from '../color-formatters.js';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {BaseJsonService} from '..';
const keywords = ['python']
@@ -33,7 +31,7 @@ const periodMap = {
// this badge uses PyPI Stats instead of the PyPI API
// so it doesn't extend PypiBase
-module.exports = class PypiDownloads extends BaseJsonService {
+export default class PypiDownloads extends BaseJsonService {
static category = 'downloads'
static route = {
@@ -77,4 +75,4 @@ module.exports = class PypiDownloads extends BaseJsonService {
downloads: json.data[periodMap[period].api_field],
})
}
-}
+};
diff --git a/services/pypi/pypi-downloads.tester.js b/services/pypi/pypi-downloads.tester.js
index c8e17b5ea8dca..58083e4376518 100644
--- a/services/pypi/pypi-downloads.tester.js
+++ b/services/pypi/pypi-downloads.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { isMetricOverTimePeriod } = require('../test-validators')
+const t = (function() {
+ export default __a;
+}())
+import {isMetricOverTimePeriod} from '../test-validators.js';
t.create('daily downloads (valid)')
.get('/dd/djangorestframework.json')
diff --git a/services/pypi/pypi-format.service.js b/services/pypi/pypi-format.service.js
index b96fc3f4b49e0..127538fecf931 100644
--- a/services/pypi/pypi-format.service.js
+++ b/services/pypi/pypi-format.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import PypiBase from './pypi-base.js';
+import {getPackageFormats} from './pypi-helpers.js';
-const PypiBase = require('./pypi-base')
-const { getPackageFormats } = require('./pypi-helpers')
-
-module.exports = class PypiFormat extends PypiBase {
+export default class PypiFormat extends PypiBase {
static category = 'other'
static route = this.buildRoute('pypi/format')
@@ -44,4 +42,4 @@ module.exports = class PypiFormat extends PypiBase {
const { hasWheel, hasEgg } = getPackageFormats(packageData)
return this.constructor.render({ hasWheel, hasEgg })
}
-}
+};
diff --git a/services/pypi/pypi-format.tester.js b/services/pypi/pypi-format.tester.js
index ffc93f9ea58ea..8cd838cd750d6 100644
--- a/services/pypi/pypi-format.tester.js
+++ b/services/pypi/pypi-format.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
t.create('format (wheel, package version in request)')
.get('/requests/2.18.4.json')
diff --git a/services/pypi/pypi-helpers.js b/services/pypi/pypi-helpers.js
index 5cdf78ced0809..fedc9fa08fd25 100644
--- a/services/pypi/pypi-helpers.js
+++ b/services/pypi/pypi-helpers.js
@@ -1,5 +1,3 @@
-'use strict'
-
/*
Django versions will be specified in the form major.minor
trying to sort with `semver.compare` will throw e.g:
@@ -105,10 +103,10 @@ function getPackageFormats(packageData) {
}
}
-module.exports = {
+export default {
parseClassifiers,
parseDjangoVersionString,
sortDjangoVersions,
getLicenses,
getPackageFormats,
-}
+};
diff --git a/services/pypi/pypi-implementation.service.js b/services/pypi/pypi-implementation.service.js
index 4b423855579d7..27d8b5e1dad4a 100644
--- a/services/pypi/pypi-implementation.service.js
+++ b/services/pypi/pypi-implementation.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import PypiBase from './pypi-base.js';
+import {parseClassifiers} from './pypi-helpers.js';
-const PypiBase = require('./pypi-base')
-const { parseClassifiers } = require('./pypi-helpers')
-
-module.exports = class PypiImplementation extends PypiBase {
+export default class PypiImplementation extends PypiBase {
static category = 'platform-support'
static route = this.buildRoute('pypi/implementation')
@@ -41,4 +39,4 @@ module.exports = class PypiImplementation extends PypiBase {
return this.constructor.render({ implementations })
}
-}
+};
diff --git a/services/pypi/pypi-implementation.tester.js b/services/pypi/pypi-implementation.tester.js
index 726d4d2912c58..36e38ea7acd1a 100644
--- a/services/pypi/pypi-implementation.tester.js
+++ b/services/pypi/pypi-implementation.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
t.create('implementation (valid, package version in request)')
.get('/beehive/1.0.json')
diff --git a/services/pypi/pypi-license.service.js b/services/pypi/pypi-license.service.js
index 0844d2a3b86ba..234e200d30947 100644
--- a/services/pypi/pypi-license.service.js
+++ b/services/pypi/pypi-license.service.js
@@ -1,10 +1,8 @@
-'use strict'
+import {renderLicenseBadge} from '../licenses.js';
+import PypiBase from './pypi-base.js';
+import {getLicenses} from './pypi-helpers.js';
-const { renderLicenseBadge } = require('../licenses')
-const PypiBase = require('./pypi-base')
-const { getLicenses } = require('./pypi-helpers')
-
-module.exports = class PypiLicense extends PypiBase {
+export default class PypiLicense extends PypiBase {
static category = 'license'
static route = this.buildRoute('pypi/l')
@@ -28,4 +26,4 @@ module.exports = class PypiLicense extends PypiBase {
const licenses = getLicenses(packageData)
return this.constructor.render({ licenses })
}
-}
+};
diff --git a/services/pypi/pypi-license.tester.js b/services/pypi/pypi-license.tester.js
index 31c66deeac69f..71ad8f80236bc 100644
--- a/services/pypi/pypi-license.tester.js
+++ b/services/pypi/pypi-license.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
t.create('license (valid, package version in request)')
.get('/requests/2.18.4.json')
diff --git a/services/pypi/pypi-python-versions.service.js b/services/pypi/pypi-python-versions.service.js
index 4dcb66a301796..b845f34d4ec02 100644
--- a/services/pypi/pypi-python-versions.service.js
+++ b/services/pypi/pypi-python-versions.service.js
@@ -1,10 +1,8 @@
-'use strict'
+import semver from 'semver';
+import PypiBase from './pypi-base.js';
+import {parseClassifiers} from './pypi-helpers.js';
-const semver = require('semver')
-const PypiBase = require('./pypi-base')
-const { parseClassifiers } = require('./pypi-helpers')
-
-module.exports = class PypiPythonVersions extends PypiBase {
+export default class PypiPythonVersions extends PypiBase {
static category = 'platform-support'
static route = this.buildRoute('pypi/pyversions')
@@ -65,4 +63,4 @@ module.exports = class PypiPythonVersions extends PypiBase {
return this.constructor.render({ versions })
}
-}
+};
diff --git a/services/pypi/pypi-python-versions.spec.js b/services/pypi/pypi-python-versions.spec.js
index 5ce5c07aa1336..3a351e922b051 100644
--- a/services/pypi/pypi-python-versions.spec.js
+++ b/services/pypi/pypi-python-versions.spec.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const { test, given } = require('sazerac')
-const { render } = require('./pypi-python-versions.service')
+import {test, given} from 'sazerac';
+import {render} from './pypi-python-versions.service.js';
describe('PyPI Python Version', function () {
test(render, function () {
diff --git a/services/pypi/pypi-python-versions.tester.js b/services/pypi/pypi-python-versions.tester.js
index efb9308317d58..bf3936c8722d9 100644
--- a/services/pypi/pypi-python-versions.tester.js
+++ b/services/pypi/pypi-python-versions.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
const isPipeSeparatedPythonVersions = Joi.string().regex(
/^([1-9]\.[0-9]+(?: \| )?)+$/
diff --git a/services/pypi/pypi-status.service.js b/services/pypi/pypi-status.service.js
index 4df298a03d523..e4f68afbda472 100644
--- a/services/pypi/pypi-status.service.js
+++ b/services/pypi/pypi-status.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import PypiBase from './pypi-base.js';
+import {parseClassifiers} from './pypi-helpers.js';
-const PypiBase = require('./pypi-base')
-const { parseClassifiers } = require('./pypi-helpers')
-
-module.exports = class PypiStatus extends PypiBase {
+export default class PypiStatus extends PypiBase {
static category = 'other'
static route = this.buildRoute('pypi/status')
@@ -62,4 +60,4 @@ module.exports = class PypiStatus extends PypiBase {
return this.constructor.render({ status })
}
-}
+};
diff --git a/services/pypi/pypi-status.tester.js b/services/pypi/pypi-status.tester.js
index 751da746de7b0..cee546544e736 100644
--- a/services/pypi/pypi-status.tester.js
+++ b/services/pypi/pypi-status.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
t.create('status (valid, stable, package version in request)')
.get('/django/1.11.json')
diff --git a/services/pypi/pypi-version.service.js b/services/pypi/pypi-version.service.js
index 68ae1c5d532be..86a34d66f8fce 100644
--- a/services/pypi/pypi-version.service.js
+++ b/services/pypi/pypi-version.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import {renderVersionBadge} from '../version.js';
+import PypiBase from './pypi-base.js';
-const { renderVersionBadge } = require('../version')
-const PypiBase = require('./pypi-base')
-
-module.exports = class PypiVersion extends PypiBase {
+export default class PypiVersion extends PypiBase {
static category = 'version'
static route = this.buildRoute('pypi/v')
@@ -30,4 +28,4 @@ module.exports = class PypiVersion extends PypiBase {
} = await this.fetch({ egg })
return this.constructor.render({ version })
}
-}
+};
diff --git a/services/pypi/pypi-version.tester.js b/services/pypi/pypi-version.tester.js
index 65f881456e841..ca262093f0056 100644
--- a/services/pypi/pypi-version.tester.js
+++ b/services/pypi/pypi-version.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
-const { isSemver } = require('../test-validators')
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
+import {isSemver} from '../test-validators.js';
const isPsycopg2Version = Joi.string().regex(/^v([0-9][.]?)+$/)
diff --git a/services/pypi/pypi-wheel.service.js b/services/pypi/pypi-wheel.service.js
index 47f23b41b2b96..9525b17b97323 100644
--- a/services/pypi/pypi-wheel.service.js
+++ b/services/pypi/pypi-wheel.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import PypiBase from './pypi-base.js';
+import {getPackageFormats} from './pypi-helpers.js';
-const PypiBase = require('./pypi-base')
-const { getPackageFormats } = require('./pypi-helpers')
-
-module.exports = class PypiWheel extends PypiBase {
+export default class PypiWheel extends PypiBase {
static category = 'platform-support'
static route = this.buildRoute('pypi/wheel')
@@ -39,4 +37,4 @@ module.exports = class PypiWheel extends PypiBase {
const { hasWheel } = getPackageFormats(packageData)
return this.constructor.render({ hasWheel })
}
-}
+};
diff --git a/services/pypi/pypi-wheel.tester.js b/services/pypi/pypi-wheel.tester.js
index d888b6a05df2d..99945b0bac2c0 100644
--- a/services/pypi/pypi-wheel.tester.js
+++ b/services/pypi/pypi-wheel.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
t.create('wheel (has wheel, package version in request)')
.get('/requests/2.18.4.json')
diff --git a/services/readthedocs/readthedocs.service.js b/services/readthedocs/readthedocs.service.js
index 3b3b15a8a4deb..f3da497a5fae0 100644
--- a/services/readthedocs/readthedocs.service.js
+++ b/services/readthedocs/readthedocs.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { isBuildStatus, renderBuildStatusBadge } = require('../build-status')
-const { BaseSvgScrapingService, NotFound } = require('..')
+import Joi from 'joi';
+import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
+import {BaseSvgScrapingService, NotFound} from '..';
const keywords = ['documentation']
@@ -12,7 +10,7 @@ const schema = Joi.object({
.required(),
}).required()
-module.exports = class ReadTheDocs extends BaseSvgScrapingService {
+export default class ReadTheDocs extends BaseSvgScrapingService {
static category = 'build'
static route = {
@@ -60,4 +58,4 @@ module.exports = class ReadTheDocs extends BaseSvgScrapingService {
}
return this.constructor.render({ status })
}
-}
+};
diff --git a/services/readthedocs/readthedocs.tester.js b/services/readthedocs/readthedocs.tester.js
index 2ed6c8bdb45c4..da7ab34be127a 100644
--- a/services/readthedocs/readthedocs.tester.js
+++ b/services/readthedocs/readthedocs.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { isBuildStatus } = require('../build-status')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+import {isBuildStatus} from '../build-status.js';
+const t = (function() {
+ export default __a;
+}())
t.create('build status')
.get('/pip.json')
diff --git a/services/reddit/subreddit-subscribers.service.js b/services/reddit/subreddit-subscribers.service.js
index 992d8668090a6..8bf8b843c4030 100644
--- a/services/reddit/subreddit-subscribers.service.js
+++ b/services/reddit/subreddit-subscribers.service.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { optionalNonNegativeInteger } = require('../validators')
-const { metric } = require('../text-formatters')
-const { BaseJsonService, NotFound } = require('..')
+import Joi from 'joi';
+import {optionalNonNegativeInteger} from '../validators.js';
+import {metric} from '../text-formatters.js';
+import {BaseJsonService, NotFound} from '..';
const schema = Joi.object({
data: Joi.object({
@@ -11,7 +9,7 @@ const schema = Joi.object({
}).required(),
}).required()
-module.exports = class RedditSubredditSubscribers extends BaseJsonService {
+export default class RedditSubredditSubscribers extends BaseJsonService {
static category = 'social'
static route = {
@@ -73,4 +71,4 @@ module.exports = class RedditSubredditSubscribers extends BaseJsonService {
subscribers,
})
}
-}
+};
diff --git a/services/reddit/subreddit-subscribers.tester.js b/services/reddit/subreddit-subscribers.tester.js
index b9d4265d5566f..145c69ba335d1 100644
--- a/services/reddit/subreddit-subscribers.tester.js
+++ b/services/reddit/subreddit-subscribers.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('subreddit-subscribers (valid subreddit)')
.get('/drums.json')
diff --git a/services/reddit/user-karma.service.js b/services/reddit/user-karma.service.js
index 35483bb409771..3bcbd954317b6 100644
--- a/services/reddit/user-karma.service.js
+++ b/services/reddit/user-karma.service.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { nonNegativeInteger } = require('../validators')
-const { metric } = require('../text-formatters')
-const { BaseJsonService } = require('..')
+import Joi from 'joi';
+import {nonNegativeInteger} from '../validators.js';
+import {metric} from '../text-formatters.js';
+import {BaseJsonService} from '..';
const schema = Joi.object({
data: Joi.object({
@@ -12,7 +10,7 @@ const schema = Joi.object({
}).required(),
}).required()
-module.exports = class RedditUserKarma extends BaseJsonService {
+export default class RedditUserKarma extends BaseJsonService {
static category = 'social'
static route = {
@@ -85,4 +83,4 @@ module.exports = class RedditUserKarma extends BaseJsonService {
user,
})
}
-}
+};
diff --git a/services/reddit/user-karma.tester.js b/services/reddit/user-karma.tester.js
index e02496e5f2844..269b9e3f48157 100644
--- a/services/reddit/user-karma.tester.js
+++ b/services/reddit/user-karma.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('user-karma (valid - link)')
.get('/link/user_simulator.json')
diff --git a/services/redmine/redmine.service.js b/services/redmine/redmine.service.js
index 4de51ca74ad23..f2cdc88d48ed2 100644
--- a/services/redmine/redmine.service.js
+++ b/services/redmine/redmine.service.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { starRating } = require('../text-formatters')
-const { floorCount: floorCountColor } = require('../color-formatters')
-const { BaseXmlService } = require('..')
+import Joi from 'joi';
+import {starRating} from '../text-formatters.js';
+import {floorCount as floorCountColor} from '../color-formatters.js';
+import {BaseXmlService} from '..';
const schema = Joi.object({
'redmine-plugin': Joi.object({
@@ -78,4 +76,4 @@ class RedminePluginStars extends BaseRedminePluginRating {
}
}
-module.exports = { RedminePluginRating, RedminePluginStars }
+export default { RedminePluginRating, RedminePluginStars };
diff --git a/services/redmine/redmine.tester.js b/services/redmine/redmine.tester.js
index 720d8a77e819d..6676759e87b90 100644
--- a/services/redmine/redmine.tester.js
+++ b/services/redmine/redmine.tester.js
@@ -1,13 +1,10 @@
-'use strict'
+import Joi from 'joi';
+import {ServiceTester} from '../tester.js';
+import {isStarRating} from '../test-validators.js';
-const Joi = require('joi')
-const { ServiceTester } = require('../tester')
-const { isStarRating } = require('../test-validators')
-
-const t = (module.exports = new ServiceTester({
- id: 'redmine',
- title: 'Redmine',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('plugin rating')
.get('/plugin/rating/redmine_xlsx_format_issue_exporter.json')
diff --git a/services/repology/repology-repositories.service.js b/services/repology/repology-repositories.service.js
index 7d179bc3f4623..d2c9603e44ee2 100644
--- a/services/repology/repology-repositories.service.js
+++ b/services/repology/repology-repositories.service.js
@@ -1,15 +1,13 @@
-'use strict'
-
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { nonNegativeInteger } = require('../validators')
-const { BaseSvgScrapingService } = require('..')
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {nonNegativeInteger} from '../validators.js';
+import {BaseSvgScrapingService} from '..';
const schema = Joi.object({
message: nonNegativeInteger,
}).required()
-module.exports = class RepologyRepositories extends BaseSvgScrapingService {
+export default class RepologyRepositories extends BaseSvgScrapingService {
static category = 'platform-support'
static route = {
@@ -44,4 +42,4 @@ module.exports = class RepologyRepositories extends BaseSvgScrapingService {
return this.constructor.render({ repositoryCount })
}
-}
+};
diff --git a/services/repology/repology-repositories.tester.js b/services/repology/repology-repositories.tester.js
index b300adc44e05e..1fee4455c6065 100644
--- a/services/repology/repology-repositories.tester.js
+++ b/services/repology/repology-repositories.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { nonNegativeInteger } = require('../validators')
+const t = (function() {
+ export default __a;
+}())
+import {nonNegativeInteger} from '../validators.js';
t.create('Existing project').get('/starship.json').expectBadge({
label: 'repositories',
diff --git a/services/requires/requires.service.js b/services/requires/requires.service.js
index b8528900ec41d..7f8c7840c12db 100644
--- a/services/requires/requires.service.js
+++ b/services/requires/requires.service.js
@@ -1,13 +1,11 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseJsonService } = require('..')
+import Joi from 'joi';
+import {BaseJsonService} from '..';
const statusSchema = Joi.object({
status: Joi.string().required(),
}).required()
-module.exports = class RequiresIo extends BaseJsonService {
+export default class RequiresIo extends BaseJsonService {
static category = 'dependencies'
static route = {
@@ -64,4 +62,4 @@ module.exports = class RequiresIo extends BaseJsonService {
const { status } = await this.fetch({ service, user, repo, branch })
return this.constructor.render({ status })
}
-}
+};
diff --git a/services/requires/requires.tester.js b/services/requires/requires.tester.js
index 92545be604469..4e2d4b5ba5655 100644
--- a/services/requires/requires.tester.js
+++ b/services/requires/requires.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
const isRequireStatus = Joi.string().regex(
/^(up to date|outdated|insecure|unknown)$/
diff --git a/services/resharper/resharper.service.js b/services/resharper/resharper.service.js
index 60585f7464721..9dca4de372459 100644
--- a/services/resharper/resharper.service.js
+++ b/services/resharper/resharper.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {createServiceFamily} from '../nuget/nuget-v2-service-family.js';
-const { createServiceFamily } = require('../nuget/nuget-v2-service-family')
-
-module.exports = createServiceFamily({
+export default createServiceFamily({
name: 'ResharperPlugin',
defaultLabel: 'resharper',
serviceBaseUrl: 'resharper',
@@ -13,4 +11,4 @@ module.exports = createServiceFamily({
exampleVersion: '2017.2.0',
examplePrereleaseVersion: '2017.3.0-pre0001',
exampleDownloadCount: 9e4,
-})
+});
diff --git a/services/resharper/resharper.tester.js b/services/resharper/resharper.tester.js
index bc31157ade833..72629611cdfec 100644
--- a/services/resharper/resharper.tester.js
+++ b/services/resharper/resharper.tester.js
@@ -1,16 +1,9 @@
-'use strict'
-
-const { ServiceTester } = require('../tester')
-const {
- isMetric,
- isVPlusDottedVersionNClauses,
- isVPlusDottedVersionNClausesWithOptionalSuffix,
-} = require('../test-validators')
-
-const t = (module.exports = new ServiceTester({
- id: 'resharper',
- title: 'ReSharper',
-}))
+import {ServiceTester} from '../tester.js';
+import {isMetric, isVPlusDottedVersionNClauses, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
+
+const t = (function() {
+ export default __a;
+}())
// downloads
diff --git a/services/response-fixtures.js b/services/response-fixtures.js
index 18d7439e53af1..6f70cb6253449 100644
--- a/services/response-fixtures.js
+++ b/services/response-fixtures.js
@@ -1,12 +1,10 @@
-'use strict'
-
const invalidJSONString = '{{{{{invalid json}}'
-module.exports = {
+export default {
invalidJSON: () => [
200,
invalidJSONString,
{ 'Content-Type': 'application/json' },
],
invalidJSONString,
-}
+};
diff --git a/services/reuse/reuse-compliance-helper.js b/services/reuse/reuse-compliance-helper.js
index bb25653fdf8b2..4a116d38a9f3f 100644
--- a/services/reuse/reuse-compliance-helper.js
+++ b/services/reuse/reuse-compliance-helper.js
@@ -1,6 +1,4 @@
-'use strict'
-
-const Joi = require('joi')
+import Joi from 'joi';
const COLOR_MAP = {
checking: 'brightgreen',
@@ -13,7 +11,7 @@ const isReuseCompliance = Joi.string()
.valid('compliant', 'non-compliant', 'checking', 'unregistered')
.required()
-module.exports = {
+export default {
isReuseCompliance,
COLOR_MAP,
-}
+};
diff --git a/services/reuse/reuse-compliance.service.js b/services/reuse/reuse-compliance.service.js
index c33fb3b2f5bc4..9e09691ff9f5d 100644
--- a/services/reuse/reuse-compliance.service.js
+++ b/services/reuse/reuse-compliance.service.js
@@ -1,13 +1,12 @@
-'use strict'
-const Joi = require('joi')
-const { BaseJsonService } = require('..')
-const { isReuseCompliance, COLOR_MAP } = require('./reuse-compliance-helper')
+import Joi from 'joi';
+import {BaseJsonService} from '..';
+import {isReuseCompliance, COLOR_MAP} from './reuse-compliance-helper.js';
const responseSchema = Joi.object({
status: isReuseCompliance,
}).required()
-module.exports = class Reuse extends BaseJsonService {
+export default class Reuse extends BaseJsonService {
static category = 'license'
static route = {
@@ -52,4 +51,4 @@ module.exports = class Reuse extends BaseJsonService {
const { status } = await this.fetch({ remote })
return this.constructor.render({ status })
}
-}
+};
diff --git a/services/reuse/reuse-compliance.tester.js b/services/reuse/reuse-compliance.tester.js
index a160e66107571..53b494e50e3f0 100644
--- a/services/reuse/reuse-compliance.tester.js
+++ b/services/reuse/reuse-compliance.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { isReuseCompliance, COLOR_MAP } = require('./reuse-compliance-helper')
+const t = (function() {
+ export default __a;
+}())
+import {isReuseCompliance, COLOR_MAP} from './reuse-compliance-helper.js';
t.create('valid repo -- live')
.get('/github.com/fsfe/reuse-tool.json')
diff --git a/services/route-builder.js b/services/route-builder.js
index 99679f316176a..aea4839305c51 100644
--- a/services/route-builder.js
+++ b/services/route-builder.js
@@ -1,6 +1,4 @@
-'use strict'
-
-const toArray = require('../core/base-service/to-array')
+import toArray from '../core/base-service/to-array.js';
/*
* Factory class for building a BaseService `route` object. This class is useful
@@ -10,7 +8,7 @@ const toArray = require('../core/base-service/to-array')
* Patterns based on path-to-regex may obviate the need for this, though they
* haven't done so yet.
*/
-module.exports = class RouteBuilder {
+export default class RouteBuilder {
constructor({ base = '' } = {}) {
this.base = base
@@ -33,4 +31,4 @@ module.exports = class RouteBuilder {
const { base, format, capture } = this
return { base, format, capture }
}
-}
+};
diff --git a/services/scoop/scoop-version.service.js b/services/scoop/scoop-version.service.js
index a45310785146e..8d89b8f241c13 100644
--- a/services/scoop/scoop-version.service.js
+++ b/services/scoop/scoop-version.service.js
@@ -1,12 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { NotFound } = require('..')
-const {
- ConditionalGithubAuthV3Service,
-} = require('../github/github-auth-service')
-const { fetchJsonFromRepo } = require('../github/github-common-fetch')
-const { renderVersionBadge } = require('../version')
+import Joi from 'joi';
+import {NotFound} from '..';
+import {ConditionalGithubAuthV3Service} from '../github/github-auth-service.js';
+import {fetchJsonFromRepo} from '../github/github-common-fetch.js';
+import {renderVersionBadge} from '../version.js';
const gitHubRepoRegExp =
/https:\/\/github.com\/(?
`
-module.exports = class SecurityHeaders extends BaseService {
+export default class SecurityHeaders extends BaseService {
static category = 'monitoring'
static route = {
@@ -93,4 +91,4 @@ module.exports = class SecurityHeaders extends BaseService {
return this.constructor.render({ grade })
}
-}
+};
diff --git a/services/security-headers/security-headers.tester.js b/services/security-headers/security-headers.tester.js
index f3c4e3b1266c3..787c84706576a 100644
--- a/services/security-headers/security-headers.tester.js
+++ b/services/security-headers/security-headers.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
t.create('grade of https://shields.io')
.get('/security-headers.json?url=https://shields.io')
diff --git a/services/shippable/shippable.service.js b/services/shippable/shippable.service.js
index 6d81d15e2e964..25520ea9b43f5 100644
--- a/services/shippable/shippable.service.js
+++ b/services/shippable/shippable.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { renderBuildStatusBadge } = require('../build-status')
-const { BaseJsonService, NotFound, redirector } = require('..')
+import Joi from 'joi';
+import {renderBuildStatusBadge} from '../build-status.js';
+import {BaseJsonService, NotFound, redirector} from '..';
// source: https://github.com/badges/shields/pull/1362#discussion_r161693830
const statusCodes = {
@@ -79,4 +77,4 @@ const ShippableRedirect = redirector({
dateAdded: new Date('2020-07-18'),
})
-module.exports = { Shippable, ShippableRedirect }
+export default { Shippable, ShippableRedirect };
diff --git a/services/shippable/shippable.tester.js b/services/shippable/shippable.tester.js
index 0290b2bd24b3a..17c8e728bec80 100644
--- a/services/shippable/shippable.tester.js
+++ b/services/shippable/shippable.tester.js
@@ -1,12 +1,8 @@
-'use strict'
-
-const { isBuildStatus } = require('../build-status')
-const { ServiceTester } = require('../tester')
-const t = (module.exports = new ServiceTester({
- id: 'Shippable',
- title: 'Shippable',
- pathPrefix: '/shippable',
-}))
+import {isBuildStatus} from '../build-status.js';
+import {ServiceTester} from '../tester.js';
+const t = (function() {
+ export default __a;
+}())
t.create('build status (valid)')
.get('/5444c5ecb904a4b21567b0ff/master.json')
diff --git a/services/snap-ci/snap-ci.service.js b/services/snap-ci/snap-ci.service.js
index 4b3cf224dc325..4fb1f1cb38fa7 100644
--- a/services/snap-ci/snap-ci.service.js
+++ b/services/snap-ci/snap-ci.service.js
@@ -1,6 +1,4 @@
-'use strict'
-
-const { deprecatedService } = require('..')
+import {deprecatedService} from '..';
const commonAttrs = {
category: 'build',
@@ -8,7 +6,7 @@ const commonAttrs = {
dateAdded: new Date('2018-01-23'),
}
-module.exports = [
+export default [
deprecatedService({
route: {
base: 'snap',
@@ -23,4 +21,4 @@ module.exports = [
},
...commonAttrs,
}),
-]
+];
diff --git a/services/snap-ci/snap-ci.tester.js b/services/snap-ci/snap-ci.tester.js
index fb9659ee3e17b..e114c565af024 100644
--- a/services/snap-ci/snap-ci.tester.js
+++ b/services/snap-ci/snap-ci.tester.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const { ServiceTester } = require('../tester')
+import {ServiceTester} from '../tester.js';
const t = new ServiceTester({ id: 'snap-ci', title: 'Snap CI' })
-module.exports = t
+export default t;
t.create('no longer available (previously build state)')
.get('/snap-ci/ThoughtWorksStudios/eb_deployer/master.json')
diff --git a/services/snyk/snyk-test-helpers.js b/services/snyk/snyk-test-helpers.js
index 3fea094774e10..cc81366e7e759 100644
--- a/services/snyk/snyk-test-helpers.js
+++ b/services/snyk/snyk-test-helpers.js
@@ -1,11 +1,9 @@
-'use strict'
-
const zeroVulnerabilitiesSvg =
''
const twoVulnerabilitiesSvg =
''
-module.exports = {
+export default {
zeroVulnerabilitiesSvg,
twoVulnerabilitiesSvg,
-}
+};
diff --git a/services/snyk/snyk-vulnerability-base.js b/services/snyk/snyk-vulnerability-base.js
index 4263c32b97034..f8a29afc3523d 100644
--- a/services/snyk/snyk-vulnerability-base.js
+++ b/services/snyk/snyk-vulnerability-base.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseSvgScrapingService } = require('..')
+import Joi from 'joi';
+import {BaseSvgScrapingService} from '..';
const schema = Joi.object({
message: Joi.alternatives()
@@ -9,7 +7,7 @@ const schema = Joi.object({
.required(),
}).required()
-module.exports = class SnykVulnerabilityBase extends BaseSvgScrapingService {
+export default class SnykVulnerabilityBase extends BaseSvgScrapingService {
static category = 'analysis'
static defaultBadgeData = {
@@ -39,4 +37,4 @@ module.exports = class SnykVulnerabilityBase extends BaseSvgScrapingService {
return { vulnerabilities }
}
-}
+};
diff --git a/services/snyk/snyk-vulnerability-github.service.js b/services/snyk/snyk-vulnerability-github.service.js
index 445004f5ff1fb..cb1171c6e1fd1 100644
--- a/services/snyk/snyk-vulnerability-github.service.js
+++ b/services/snyk/snyk-vulnerability-github.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import SynkVulnerabilityBase from './snyk-vulnerability-base.js';
-const SynkVulnerabilityBase = require('./snyk-vulnerability-base')
-
-module.exports = class SnykVulnerabilityGitHub extends SynkVulnerabilityBase {
+export default class SnykVulnerabilityGitHub extends SynkVulnerabilityBase {
static route = {
base: 'snyk/vulnerabilities/github',
pattern: ':user/:repo/:manifestFilePath*',
@@ -48,4 +46,4 @@ module.exports = class SnykVulnerabilityGitHub extends SynkVulnerabilityBase {
})
return this.constructor.render({ vulnerabilities })
}
-}
+};
diff --git a/services/snyk/snyk-vulnerability-github.tester.js b/services/snyk/snyk-vulnerability-github.tester.js
index 32326e9d313e5..96cee3c27358a 100644
--- a/services/snyk/snyk-vulnerability-github.tester.js
+++ b/services/snyk/snyk-vulnerability-github.tester.js
@@ -1,11 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
-const {
- twoVulnerabilitiesSvg,
- zeroVulnerabilitiesSvg,
-} = require('./snyk-test-helpers')
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
+import {twoVulnerabilitiesSvg, zeroVulnerabilitiesSvg} from './snyk-test-helpers.js';
t.create('valid repo').get('/snyk/snyk.json').timeout(20000).expectBadge({
label: 'vulnerabilities',
diff --git a/services/snyk/snyk-vulnerability-npm.service.js b/services/snyk/snyk-vulnerability-npm.service.js
index 2cbda0c68306f..45aefa3b96134 100644
--- a/services/snyk/snyk-vulnerability-npm.service.js
+++ b/services/snyk/snyk-vulnerability-npm.service.js
@@ -1,9 +1,7 @@
-'use strict'
+import {NotFound} from '..';
+import SynkVulnerabilityBase from './snyk-vulnerability-base.js';
-const { NotFound } = require('..')
-const SynkVulnerabilityBase = require('./snyk-vulnerability-base')
-
-module.exports = class SnykVulnerabilityNpm extends SynkVulnerabilityBase {
+export default class SnykVulnerabilityNpm extends SynkVulnerabilityBase {
static route = {
base: 'snyk/vulnerabilities/npm',
pattern: ':packageName(.+?)',
@@ -59,4 +57,4 @@ module.exports = class SnykVulnerabilityNpm extends SynkVulnerabilityBase {
})
}
}
-}
+};
diff --git a/services/snyk/snyk-vulnerability-npm.tester.js b/services/snyk/snyk-vulnerability-npm.tester.js
index 859eaacfe82e1..a9e1ec94b2ad7 100644
--- a/services/snyk/snyk-vulnerability-npm.tester.js
+++ b/services/snyk/snyk-vulnerability-npm.tester.js
@@ -1,11 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
-const {
- twoVulnerabilitiesSvg,
- zeroVulnerabilitiesSvg,
-} = require('./snyk-test-helpers')
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
+import {twoVulnerabilitiesSvg, zeroVulnerabilitiesSvg} from './snyk-test-helpers.js';
t.create('valid package latest version')
.get('/commander.json')
diff --git a/services/sonar/sonar-base.js b/services/sonar/sonar-base.js
index 588be428ce2c8..a0a476d33dd6c 100644
--- a/services/sonar/sonar-base.js
+++ b/services/sonar/sonar-base.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseJsonService, NotFound } = require('..')
-const { isLegacyVersion } = require('./sonar-helpers')
+import Joi from 'joi';
+import {BaseJsonService, NotFound} from '..';
+import {isLegacyVersion} from './sonar-helpers.js';
// It is possible to see HTTP 404 response codes and HTTP 200 responses
// with empty arrays of metric values, with both the legacy (pre v5.3) and modern APIs.
@@ -51,7 +49,7 @@ const legacySchema = Joi.array()
)
.required()
-module.exports = class SonarBase extends BaseJsonService {
+export default class SonarBase extends BaseJsonService {
static auth = { userKey: 'sonarqube_token', serviceKey: 'sonar' }
async fetch({ sonarVersion, server, component, metricName }) {
@@ -116,4 +114,4 @@ module.exports = class SonarBase extends BaseJsonService {
return metrics
}
-}
+};
diff --git a/services/sonar/sonar-coverage.service.js b/services/sonar/sonar-coverage.service.js
index df4edeb9bc18f..afaa09db3d410 100644
--- a/services/sonar/sonar-coverage.service.js
+++ b/services/sonar/sonar-coverage.service.js
@@ -1,10 +1,8 @@
-'use strict'
+import {coveragePercentage} from '../color-formatters.js';
+import SonarBase from './sonar-base.js';
+import {documentation, keywords, queryParamSchema} from './sonar-helpers.js';
-const { coveragePercentage } = require('../color-formatters')
-const SonarBase = require('./sonar-base')
-const { documentation, keywords, queryParamSchema } = require('./sonar-helpers')
-
-module.exports = class SonarCoverage extends SonarBase {
+export default class SonarCoverage extends SonarBase {
static category = 'coverage'
static route = {
@@ -51,4 +49,4 @@ module.exports = class SonarCoverage extends SonarBase {
})
return this.constructor.render({ coverage })
}
-}
+};
diff --git a/services/sonar/sonar-coverage.tester.js b/services/sonar/sonar-coverage.tester.js
index feb31425c22fe..811505bf04b52 100644
--- a/services/sonar/sonar-coverage.tester.js
+++ b/services/sonar/sonar-coverage.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { isIntegerPercentage } = require('../test-validators')
+const t = (function() {
+ export default __a;
+}())
+import {isIntegerPercentage} from '../test-validators.js';
// The service tests targeting the legacy SonarQube API are mocked
// because of the lack of publicly accessible, self-hosted, legacy SonarQube instances
diff --git a/services/sonar/sonar-documented-api-density.service.js b/services/sonar/sonar-documented-api-density.service.js
index 684152f5d654f..3909b649f2a02 100644
--- a/services/sonar/sonar-documented-api-density.service.js
+++ b/services/sonar/sonar-documented-api-density.service.js
@@ -1,17 +1,9 @@
-'use strict'
-
-const SonarBase = require('./sonar-base')
-const {
- queryParamSchema,
- getLabel,
- positiveMetricColorScale,
- keywords,
- documentation,
-} = require('./sonar-helpers')
+import SonarBase from './sonar-base.js';
+import {queryParamSchema, getLabel, positiveMetricColorScale, keywords, documentation} from './sonar-helpers.js';
const metric = 'public_documented_api_density'
-module.exports = class SonarDocumentedApiDensity extends SonarBase {
+export default class SonarDocumentedApiDensity extends SonarBase {
static category = 'analysis'
static route = {
@@ -55,4 +47,4 @@ module.exports = class SonarDocumentedApiDensity extends SonarBase {
const metrics = this.transform({ json, sonarVersion })
return this.constructor.render({ density: metrics[metric] })
}
-}
+};
diff --git a/services/sonar/sonar-documented-api-density.spec.js b/services/sonar/sonar-documented-api-density.spec.js
index f2dc4821d2101..5ac2d5de021a8 100644
--- a/services/sonar/sonar-documented-api-density.spec.js
+++ b/services/sonar/sonar-documented-api-density.spec.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const { test, given } = require('sazerac')
-const SonarDocumentedApiDensity = require('./sonar-documented-api-density.service')
+import {test, given} from 'sazerac';
+import SonarDocumentedApiDensity from './sonar-documented-api-density.service.js';
describe('SonarDocumentedApiDensity', function () {
test(SonarDocumentedApiDensity.render, () => {
diff --git a/services/sonar/sonar-documented-api-density.tester.js b/services/sonar/sonar-documented-api-density.tester.js
index b879d6f5b10b0..7c6c2d90b38ad 100644
--- a/services/sonar/sonar-documented-api-density.tester.js
+++ b/services/sonar/sonar-documented-api-density.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
// The service tests targeting the legacy SonarQube API are mocked
// because of the lack of publicly accessible, self-hosted, legacy SonarQube instances
diff --git a/services/sonar/sonar-fortify-rating.service.js b/services/sonar/sonar-fortify-rating.service.js
index 74cf396fb24ec..90ce35f53e2c4 100644
--- a/services/sonar/sonar-fortify-rating.service.js
+++ b/services/sonar/sonar-fortify-rating.service.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const SonarBase = require('./sonar-base')
-const { queryParamSchema, keywords, documentation } = require('./sonar-helpers')
+import SonarBase from './sonar-base.js';
+import {queryParamSchema, keywords, documentation} from './sonar-helpers.js';
const colorMap = {
0: 'red',
@@ -12,7 +10,7 @@ const colorMap = {
5: 'brightgreen',
}
-module.exports = class SonarFortifyRating extends SonarBase {
+export default class SonarFortifyRating extends SonarBase {
static category = 'analysis'
static route = {
@@ -65,4 +63,4 @@ module.exports = class SonarFortifyRating extends SonarBase {
rating: metrics['fortify-security-rating'],
})
}
-}
+};
diff --git a/services/sonar/sonar-fortify-rating.spec.js b/services/sonar/sonar-fortify-rating.spec.js
index 2121c484f55a0..95aeb688da751 100644
--- a/services/sonar/sonar-fortify-rating.spec.js
+++ b/services/sonar/sonar-fortify-rating.spec.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const { expect } = require('chai')
-const nock = require('nock')
-const { cleanUpNockAfterEach, defaultContext } = require('../test-helpers')
-const SonarFortifyRating = require('./sonar-fortify-rating.service')
+import {expect} from 'chai';
+import nock from 'nock';
+import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
+import SonarFortifyRating from './sonar-fortify-rating.service.js';
const token = 'abc123def456'
const config = {
diff --git a/services/sonar/sonar-fortify-rating.tester.js b/services/sonar/sonar-fortify-rating.tester.js
index 760ba28d09f59..a9a5fceb6fbb3 100644
--- a/services/sonar/sonar-fortify-rating.tester.js
+++ b/services/sonar/sonar-fortify-rating.tester.js
@@ -1,6 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
// The service tests targeting the legacy SonarQube API are mocked
// because of the lack of publicly accessible, self-hosted, legacy SonarQube instances
diff --git a/services/sonar/sonar-generic.service.js b/services/sonar/sonar-generic.service.js
index 6b8498675497d..4b8f32f4b4af5 100644
--- a/services/sonar/sonar-generic.service.js
+++ b/services/sonar/sonar-generic.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const { metric } = require('../text-formatters')
-const SonarBase = require('./sonar-base')
-const { queryParamSchema, getLabel } = require('./sonar-helpers')
+import {metric} from '../text-formatters.js';
+import SonarBase from './sonar-base.js';
+import {queryParamSchema, getLabel} from './sonar-helpers.js';
// This service is intended to be a temporary solution to avoid breaking
// any existing users/badges that were utilizing the "other" Sonar metrics
@@ -106,7 +104,7 @@ const metricNames = [
]
const metricNameRouteParam = metricNames.join('|')
-module.exports = class SonarGeneric extends SonarBase {
+export default class SonarGeneric extends SonarBase {
static category = 'analysis'
static route = {
@@ -139,4 +137,4 @@ module.exports = class SonarGeneric extends SonarBase {
metricValue: metrics[metricName],
})
}
-}
+};
diff --git a/services/sonar/sonar-generic.tester.js b/services/sonar/sonar-generic.tester.js
index 3d5bfffd52834..377d1dff07395 100644
--- a/services/sonar/sonar-generic.tester.js
+++ b/services/sonar/sonar-generic.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isMetric } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isMetric} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('Security Rating')
.timeout(10000)
diff --git a/services/sonar/sonar-helpers.js b/services/sonar/sonar-helpers.js
index e5764304ead5c..cf96edb0b309a 100644
--- a/services/sonar/sonar-helpers.js
+++ b/services/sonar/sonar-helpers.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { colorScale } = require('../color-formatters')
-const { optionalUrl } = require('../validators')
+import Joi from 'joi';
+import {colorScale} from '../color-formatters.js';
+import {optionalUrl} from '../validators.js';
const ratingPercentageScaleSteps = [10, 20, 50, 100]
const ratingScaleColors = [
@@ -28,7 +26,7 @@ function isLegacyVersion({ sonarVersion }) {
}
function getLabel({ metric }) {
- return metric ? metric.replace(/_/g, ' ') : undefined
+ return metric ? metric.replace(/_/g, ' ') : undefined;
}
const sonarVersionSchema = Joi.alternatives(
Joi.string()
@@ -60,7 +58,7 @@ const documentation = `
@@ -402,7 +400,7 @@ class SteamFileViews extends SteamFileService {
}
}
-module.exports = {
+export default {
SteamCollectionSize,
SteamFileSize,
SteamFileReleaseDate,
@@ -411,4 +409,4 @@ module.exports = {
SteamFileFavorites,
SteamFileDownloads,
SteamFileViews,
-}
+};
diff --git a/services/steam/steam-workshop.tester.js b/services/steam/steam-workshop.tester.js
index c2963e3828d39..e7a4730d43c9c 100644
--- a/services/steam/steam-workshop.tester.js
+++ b/services/steam/steam-workshop.tester.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const { ServiceTester } = require('../tester')
-const { isMetric, isFileSize, isFormattedDate } = require('../test-validators')
+import {ServiceTester} from '../tester.js';
+import {isMetric, isFileSize, isFormattedDate} from '../test-validators.js';
const t = new ServiceTester({ id: 'steam', title: 'Steam Workshop Tests' })
-module.exports = t
+export default t;
t.create('Collection Files')
.get('/collection-files/180077636.json')
diff --git a/services/suggest.integration.js b/services/suggest.integration.js
index c000ebbb9c090..13f020efa0122 100644
--- a/services/suggest.integration.js
+++ b/services/suggest.integration.js
@@ -1,12 +1,10 @@
-'use strict'
-
-const { expect } = require('chai')
-const Camp = require('@shields_io/camp')
-const portfinder = require('portfinder')
+import {expect} from 'chai';
+import Camp from '@shields_io/camp';
+import portfinder from 'portfinder';
const config = require('config').util.toObject()
-const got = require('../core/got-test-client')
-const { setRoutes } = require('./suggest')
-const GithubApiProvider = require('./github/github-api-provider')
+import got from '../core/got-test-client.js';
+import {setRoutes} from './suggest.js';
+import GithubApiProvider from './github/github-api-provider.js';
describe('Badge suggestions for', function () {
const githubApiBaseUrl = process.env.GITHUB_URL || 'https://api.github.com'
diff --git a/services/suggest.js b/services/suggest.js
index 432c000001974..d563e73811923 100644
--- a/services/suggest.js
+++ b/services/suggest.js
@@ -4,10 +4,8 @@
//
// This endpoint is called from frontend/components/suggestion-and-search.js.
-'use strict'
-
-const { URL } = require('url')
-const request = require('request')
+import {URL} from 'url';
+import request from 'request';
function twitterPage(url) {
if (url.protocol === null) {
@@ -200,8 +198,8 @@ function setRoutes(allowedOrigin, githubApiProvider, server) {
})
}
-module.exports = {
+export default {
findSuggestions,
githubLicense,
setRoutes,
-}
+};
diff --git a/services/suggest.spec.js b/services/suggest.spec.js
index 0288dc801a46e..03ceb01e3cbd4 100644
--- a/services/suggest.spec.js
+++ b/services/suggest.spec.js
@@ -1,12 +1,10 @@
-'use strict'
-
-const Camp = require('@shields_io/camp')
-const { expect } = require('chai')
-const nock = require('nock')
-const portfinder = require('portfinder')
-const got = require('../core/got-test-client')
-const { setRoutes, githubLicense } = require('./suggest')
-const GithubApiProvider = require('./github/github-api-provider')
+import Camp from '@shields_io/camp';
+import {expect} from 'chai';
+import nock from 'nock';
+import portfinder from 'portfinder';
+import got from '../core/got-test-client.js';
+import {setRoutes, githubLicense} from './suggest.js';
+import GithubApiProvider from './github/github-api-provider.js';
describe('Badge suggestions', function () {
const githubApiBaseUrl = 'https://api.github.test'
diff --git a/services/swagger/swagger-redirect.service.js b/services/swagger/swagger-redirect.service.js
index 954bd131b0365..b10109ff5a162 100644
--- a/services/swagger/swagger-redirect.service.js
+++ b/services/swagger/swagger-redirect.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {redirector} from '..';
-const { redirector } = require('..')
-
-module.exports = [
+export default [
redirector({
category: 'other',
name: 'SwaggerRedirect',
@@ -17,4 +15,4 @@ module.exports = [
},
dateAdded: new Date('2019-11-03'),
}),
-]
+];
diff --git a/services/swagger/swagger-redirect.tester.js b/services/swagger/swagger-redirect.tester.js
index 3fec29b7d6a9d..19f5a386f5868 100644
--- a/services/swagger/swagger-redirect.tester.js
+++ b/services/swagger/swagger-redirect.tester.js
@@ -1,12 +1,8 @@
-'use strict'
+import {ServiceTester} from '../tester.js';
-const { ServiceTester } = require('../tester')
-
-const t = (module.exports = new ServiceTester({
- id: 'SwaggerUrlRedirect',
- title: 'SwaggerUrlRedirect',
- pathPrefix: '/swagger/valid/2.0',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('swagger json')
.get('/https/example.com/example.svg')
diff --git a/services/swagger/swagger.service.js b/services/swagger/swagger.service.js
index 422768dd9977c..90edd6417047d 100644
--- a/services/swagger/swagger.service.js
+++ b/services/swagger/swagger.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { optionalUrl } = require('../validators')
-const { BaseJsonService, NotFound } = require('..')
+import Joi from 'joi';
+import {optionalUrl} from '../validators.js';
+import {BaseJsonService, NotFound} from '..';
const schema = Joi.object()
.keys({
@@ -19,7 +17,7 @@ const queryParamSchema = Joi.object({
specUrl: optionalUrl.required(),
}).required()
-module.exports = class SwaggerValidatorService extends BaseJsonService {
+export default class SwaggerValidatorService extends BaseJsonService {
static category = 'other'
static route = {
@@ -85,4 +83,4 @@ module.exports = class SwaggerValidatorService extends BaseJsonService {
const { status } = this.transform({ json, specUrl })
return this.constructor.render({ status })
}
-}
+};
diff --git a/services/swagger/swagger.tester.js b/services/swagger/swagger.tester.js
index 3f8749e46ff4e..38015e1b0fed8 100644
--- a/services/swagger/swagger.tester.js
+++ b/services/swagger/swagger.tester.js
@@ -1,5 +1,3 @@
-'use strict'
-
const getURL = '/3.0.json?specUrl=https://example.com/example.json'
const getURLBase = '/3.0.json?specUrl='
const apiURL = 'http://validator.swagger.io'
@@ -8,7 +6,9 @@ const apiGetQueryParams = {
url: 'https://example.com/example.json',
}
-const t = (module.exports = require('../tester').createServiceTester())
+const t = (function() {
+ export default __a;
+}())
t.create('Invalid')
.get(getURL)
diff --git a/services/symfony/sensiolabs-redirect.service.js b/services/symfony/sensiolabs-redirect.service.js
index 35cdae90c4f13..497a036f5d9a3 100644
--- a/services/symfony/sensiolabs-redirect.service.js
+++ b/services/symfony/sensiolabs-redirect.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {redirector} from '..';
-const { redirector } = require('..')
-
-module.exports = [
+export default [
// The SymfonyInsight service was previously branded as SensioLabs, and
// accordingly the badge path used to be /sensiolabs/i/projectUuid'.
redirector({
@@ -14,4 +12,4 @@ module.exports = [
transformPath: ({ projectUuid }) => `/symfony/i/grade/${projectUuid}`,
dateAdded: new Date('2019-02-08'),
}),
-]
+];
diff --git a/services/symfony/sensiolabs-redirect.tester.js b/services/symfony/sensiolabs-redirect.tester.js
index b5c409a1af024..47354f313dbc7 100644
--- a/services/symfony/sensiolabs-redirect.tester.js
+++ b/services/symfony/sensiolabs-redirect.tester.js
@@ -1,11 +1,8 @@
-'use strict'
+import {ServiceTester} from '../tester.js';
-const { ServiceTester } = require('../tester')
-
-const t = (module.exports = new ServiceTester({
- id: 'sensiolabs',
- title: 'SensioLabs',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('sensiolabs insight')
.get('/i/825be328-29f8-44f7-a750-f82818ae9111.svg')
diff --git a/services/symfony/symfony-insight-base.js b/services/symfony/symfony-insight-base.js
index 4397492a2cc5f..86648dadec170 100644
--- a/services/symfony/symfony-insight-base.js
+++ b/services/symfony/symfony-insight-base.js
@@ -1,7 +1,5 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseXmlService, NotFound } = require('..')
+import Joi from 'joi';
+import {BaseXmlService, NotFound} from '..';
const violationSchema = Joi.object({
severity: Joi.equal('info', 'minor', 'major', 'critical').required(),
@@ -126,8 +124,8 @@ class SymfonyInsightBase extends BaseXmlService {
}
}
-module.exports = {
+export default {
SymfonyInsightBase,
keywords,
gradeColors,
-}
+};
diff --git a/services/symfony/symfony-insight-base.spec.js b/services/symfony/symfony-insight-base.spec.js
index 19cc1cc41c561..ab03abe62df48 100644
--- a/services/symfony/symfony-insight-base.spec.js
+++ b/services/symfony/symfony-insight-base.spec.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const { expect } = require('chai')
-const { NotFound } = require('..')
-const { SymfonyInsightBase } = require('./symfony-insight-base')
+import {expect} from 'chai';
+import {NotFound} from '..';
+import {SymfonyInsightBase} from './symfony-insight-base.js';
describe('SymfonyInsightBase', function () {
context('transform()', function () {
diff --git a/services/symfony/symfony-insight-grade.service.js b/services/symfony/symfony-insight-grade.service.js
index 6c0a05594d30c..e0f9d2d58e2d7 100644
--- a/services/symfony/symfony-insight-grade.service.js
+++ b/services/symfony/symfony-insight-grade.service.js
@@ -1,12 +1,6 @@
-'use strict'
+import {SymfonyInsightBase, keywords, gradeColors} from './symfony-insight-base.js';
-const {
- SymfonyInsightBase,
- keywords,
- gradeColors,
-} = require('./symfony-insight-base')
-
-module.exports = class SymfonyInsightGrade extends SymfonyInsightBase {
+export default class SymfonyInsightGrade extends SymfonyInsightBase {
static route = {
base: 'symfony/i/grade',
pattern: ':projectUuid',
@@ -50,4 +44,4 @@ module.exports = class SymfonyInsightGrade extends SymfonyInsightBase {
return this.constructor.render({ grade, status })
}
-}
+};
diff --git a/services/symfony/symfony-insight-grade.tester.js b/services/symfony/symfony-insight-grade.tester.js
index 4c0a741b823bf..5c315a1c63913 100644
--- a/services/symfony/symfony-insight-grade.tester.js
+++ b/services/symfony/symfony-insight-grade.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
-const { sampleProjectUuid, noSymfonyToken } = require('./symfony-test-helpers')
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
+import {sampleProjectUuid, noSymfonyToken} from './symfony-test-helpers.js';
t.create('valid project grade')
.skipWhen(noSymfonyToken)
diff --git a/services/symfony/symfony-insight-stars.service.js b/services/symfony/symfony-insight-stars.service.js
index 78cb0f94bc334..db35fb965e3ad 100644
--- a/services/symfony/symfony-insight-stars.service.js
+++ b/services/symfony/symfony-insight-stars.service.js
@@ -1,11 +1,5 @@
-'use strict'
-
-const { starRating } = require('../text-formatters')
-const {
- SymfonyInsightBase,
- keywords,
- gradeColors,
-} = require('./symfony-insight-base')
+import {starRating} from '../text-formatters.js';
+import {SymfonyInsightBase, keywords, gradeColors} from './symfony-insight-base.js';
const gradeStars = {
none: 0,
@@ -15,7 +9,7 @@ const gradeStars = {
platinum: 4,
}
-module.exports = class SymfonyInsightStars extends SymfonyInsightBase {
+export default class SymfonyInsightStars extends SymfonyInsightBase {
static route = {
base: 'symfony/i/stars',
pattern: ':projectUuid',
@@ -57,4 +51,4 @@ module.exports = class SymfonyInsightStars extends SymfonyInsightBase {
const { grade, status } = this.transform({ data })
return this.constructor.render({ grade, status })
}
-}
+};
diff --git a/services/symfony/symfony-insight-stars.tester.js b/services/symfony/symfony-insight-stars.tester.js
index 7bc4162ae7968..901e14d404aab 100644
--- a/services/symfony/symfony-insight-stars.tester.js
+++ b/services/symfony/symfony-insight-stars.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { withRegex } = require('../test-validators')
-const { sampleProjectUuid, noSymfonyToken } = require('./symfony-test-helpers')
+const t = (function() {
+ export default __a;
+}())
+import {withRegex} from '../test-validators.js';
+import {sampleProjectUuid, noSymfonyToken} from './symfony-test-helpers.js';
t.create('valid project stars')
.skipWhen(noSymfonyToken)
diff --git a/services/symfony/symfony-insight-violations.service.js b/services/symfony/symfony-insight-violations.service.js
index a00650865a4f2..47c86bfa08af8 100644
--- a/services/symfony/symfony-insight-violations.service.js
+++ b/services/symfony/symfony-insight-violations.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {SymfonyInsightBase, keywords} from './symfony-insight-base.js';
-const { SymfonyInsightBase, keywords } = require('./symfony-insight-base')
-
-module.exports = class SymfonyInsightViolations extends SymfonyInsightBase {
+export default class SymfonyInsightViolations extends SymfonyInsightBase {
static route = {
base: 'symfony/i/violations',
pattern: ':projectUuid',
@@ -78,4 +76,4 @@ module.exports = class SymfonyInsightViolations extends SymfonyInsightBase {
const lastAnalysis = this.transform({ data })
return this.constructor.render(lastAnalysis)
}
-}
+};
diff --git a/services/symfony/symfony-insight-violations.tester.js b/services/symfony/symfony-insight-violations.tester.js
index 5d2e0306dd819..bd606e0028c30 100644
--- a/services/symfony/symfony-insight-violations.tester.js
+++ b/services/symfony/symfony-insight-violations.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { withRegex } = require('../test-validators')
-const { sampleProjectUuid, noSymfonyToken } = require('./symfony-test-helpers')
+const t = (function() {
+ export default __a;
+}())
+import {withRegex} from '../test-validators.js';
+import {sampleProjectUuid, noSymfonyToken} from './symfony-test-helpers.js';
t.create('valid project violations')
.skipWhen(noSymfonyToken)
diff --git a/services/symfony/symfony-insight.spec.js b/services/symfony/symfony-insight.spec.js
index d2c0b10324829..40c55105ff76a 100644
--- a/services/symfony/symfony-insight.spec.js
+++ b/services/symfony/symfony-insight.spec.js
@@ -1,29 +1,10 @@
-'use strict'
-
-const { expect } = require('chai')
-const nock = require('nock')
-const { cleanUpNockAfterEach, defaultContext } = require('../test-helpers')
-const SymfonyInsightGrade = require('./symfony-insight-grade.service')
-const SymfonyInsightStars = require('./symfony-insight-stars.service')
-const SymfonyInsightViolations = require('./symfony-insight-violations.service')
-const {
- sampleProjectUuid: projectUuid,
- runningMockResponse,
- platinumMockResponse,
- goldMockResponse,
- silverMockResponse,
- bronzeMockResponse,
- noMedalMockResponse,
- noGradeMockResponse,
- criticalViolation,
- majorViolation,
- minorViolation,
- infoViolation,
- multipleViolations,
- user,
- token,
- config,
-} = require('./symfony-test-helpers')
+import {expect} from 'chai';
+import nock from 'nock';
+import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
+import SymfonyInsightGrade from './symfony-insight-grade.service.js';
+import SymfonyInsightStars from './symfony-insight-stars.service.js';
+import SymfonyInsightViolations from './symfony-insight-violations.service.js';
+import {sampleProjectUuid as projectUuid, runningMockResponse, platinumMockResponse, goldMockResponse, silverMockResponse, bronzeMockResponse, noMedalMockResponse, noGradeMockResponse, criticalViolation, majorViolation, minorViolation, infoViolation, multipleViolations, user, token, config} from './symfony-test-helpers.js';
// These tests are organized in a fairly unusual way because the service uses
// XML, so it's difficult to decouple the parsing from the transform + render.
diff --git a/services/symfony/symfony-test-helpers.js b/services/symfony/symfony-test-helpers.js
index 3652fddd7b0db..317cbfe59787e 100644
--- a/services/symfony/symfony-test-helpers.js
+++ b/services/symfony/symfony-test-helpers.js
@@ -1,5 +1,3 @@
-'use strict'
-
const sampleProjectUuid = '825be328-29f8-44f7-a750-f82818ae9111'
function createMockResponse({ status = 'finished', grade, violations }) {
@@ -86,11 +84,11 @@ const config = {
},
}
-const { noToken } = require('../test-helpers')
-const { SymfonyInsightBase } = require('./symfony-insight-base')
+import {noToken} from '../test-helpers.js';
+import {SymfonyInsightBase} from './symfony-insight-base.js';
const noSymfonyToken = noToken(SymfonyInsightBase)
-module.exports = {
+export default {
sampleProjectUuid,
runningMockResponse,
platinumMockResponse,
@@ -108,4 +106,4 @@ module.exports = {
token,
config,
noSymfonyToken,
-}
+};
diff --git a/services/teamcity/teamcity-base.js b/services/teamcity/teamcity-base.js
index 4abbac669b731..7feb05b656706 100644
--- a/services/teamcity/teamcity-base.js
+++ b/services/teamcity/teamcity-base.js
@@ -1,8 +1,6 @@
-'use strict'
+import {BaseJsonService} from '..';
-const { BaseJsonService } = require('..')
-
-module.exports = class TeamCityBase extends BaseJsonService {
+export default class TeamCityBase extends BaseJsonService {
static auth = {
userKey: 'teamcity_user',
passKey: 'teamcity_pass',
@@ -25,4 +23,4 @@ module.exports = class TeamCityBase extends BaseJsonService {
})
)
}
-}
+};
diff --git a/services/teamcity/teamcity-build-redirect.service.js b/services/teamcity/teamcity-build-redirect.service.js
index 09684097b3ba9..7384be0397ae7 100644
--- a/services/teamcity/teamcity-build-redirect.service.js
+++ b/services/teamcity/teamcity-build-redirect.service.js
@@ -1,13 +1,11 @@
-'use strict'
-
-const { redirector } = require('..')
+import {redirector} from '..';
const commonAttrs = {
dateAdded: new Date('2019-09-15'),
category: 'build',
}
-module.exports = [
+export default [
redirector({
...commonAttrs,
name: 'TeamCityBuildLegacyCodeBetterRedirect',
@@ -34,4 +32,4 @@ module.exports = [
server: `${protocol}://${hostAndPath}`,
}),
}),
-]
+];
diff --git a/services/teamcity/teamcity-build-redirect.tester.js b/services/teamcity/teamcity-build-redirect.tester.js
index fc1870445c79b..ade18ec2b9057 100644
--- a/services/teamcity/teamcity-build-redirect.tester.js
+++ b/services/teamcity/teamcity-build-redirect.tester.js
@@ -1,12 +1,8 @@
-'use strict'
+import {ServiceTester} from '../tester.js';
-const { ServiceTester } = require('../tester')
-
-const t = (module.exports = new ServiceTester({
- id: 'TeamCityBuildRedirect',
- title: 'TeamCityBuildRedirect',
- pathPrefix: '/teamcity',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('codebetter')
.get('/codebetter/IntelliJIdeaCe_JavaDecompilerEngineTests.svg')
diff --git a/services/teamcity/teamcity-build.service.js b/services/teamcity/teamcity-build.service.js
index b318decf7f897..dd401d18a6eb9 100644
--- a/services/teamcity/teamcity-build.service.js
+++ b/services/teamcity/teamcity-build.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { optionalUrl } = require('../validators')
-const TeamCityBase = require('./teamcity-base')
+import Joi from 'joi';
+import {optionalUrl} from '../validators.js';
+import TeamCityBase from './teamcity-base.js';
const buildStatusSchema = Joi.object({
status: Joi.equal('SUCCESS', 'FAILURE', 'ERROR').required(),
@@ -13,7 +11,7 @@ const queryParamSchema = Joi.object({
server: optionalUrl,
}).required()
-module.exports = class TeamCityBuild extends TeamCityBase {
+export default class TeamCityBuild extends TeamCityBase {
static category = 'build'
static route = {
@@ -96,4 +94,4 @@ module.exports = class TeamCityBuild extends TeamCityBase {
useVerbose,
})
}
-}
+};
diff --git a/services/teamcity/teamcity-build.spec.js b/services/teamcity/teamcity-build.spec.js
index b19b6148801dd..693779c6ad30e 100644
--- a/services/teamcity/teamcity-build.spec.js
+++ b/services/teamcity/teamcity-build.spec.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const { expect } = require('chai')
-const nock = require('nock')
-const { cleanUpNockAfterEach, defaultContext } = require('../test-helpers')
-const TeamCityBuild = require('./teamcity-build.service')
-const { user, pass, host, config } = require('./teamcity-test-helpers')
+import {expect} from 'chai';
+import nock from 'nock';
+import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
+import TeamCityBuild from './teamcity-build.service.js';
+import {user, pass, host, config} from './teamcity-test-helpers.js';
describe('TeamCityBuild', function () {
cleanUpNockAfterEach()
diff --git a/services/teamcity/teamcity-build.tester.js b/services/teamcity/teamcity-build.tester.js
index da29069c45482..d64332b09f6e5 100644
--- a/services/teamcity/teamcity-build.tester.js
+++ b/services/teamcity/teamcity-build.tester.js
@@ -1,8 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { withRegex } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import Joi from 'joi';
+import {withRegex} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
const buildStatusValues = Joi.equal('passing', 'failure', 'error').required()
const buildStatusTextRegex =
diff --git a/services/teamcity/teamcity-coverage-redirect.service.js b/services/teamcity/teamcity-coverage-redirect.service.js
index d41c37dabc312..d42eca87ab9c6 100644
--- a/services/teamcity/teamcity-coverage-redirect.service.js
+++ b/services/teamcity/teamcity-coverage-redirect.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {redirector} from '..';
-const { redirector } = require('..')
-
-module.exports = [
+export default [
redirector({
category: 'coverage',
route: {
@@ -15,4 +13,4 @@ module.exports = [
}),
dateAdded: new Date('2019-09-15'),
}),
-]
+];
diff --git a/services/teamcity/teamcity-coverage-redirect.tester.js b/services/teamcity/teamcity-coverage-redirect.tester.js
index df0decb3912b7..3c142013e25f7 100644
--- a/services/teamcity/teamcity-coverage-redirect.tester.js
+++ b/services/teamcity/teamcity-coverage-redirect.tester.js
@@ -1,12 +1,8 @@
-'use strict'
+import {ServiceTester} from '../tester.js';
-const { ServiceTester } = require('../tester')
-
-const t = (module.exports = new ServiceTester({
- id: 'TeamCityCoverageRedirect',
- title: 'TeamCityCoverageRedirect',
- pathPrefix: '/teamcity/coverage',
-}))
+const t = (function() {
+ export default __a;
+}())
t.create('coverage')
.get('/https/teamcity.jetbrains.com/ReactJSNet_PullRequests.svg')
diff --git a/services/teamcity/teamcity-coverage.service.js b/services/teamcity/teamcity-coverage.service.js
index cffb07ee3a1bc..c98fa8cc4d54a 100644
--- a/services/teamcity/teamcity-coverage.service.js
+++ b/services/teamcity/teamcity-coverage.service.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const { coveragePercentage } = require('../color-formatters')
-const { optionalUrl } = require('../validators')
-const { InvalidResponse } = require('..')
-const TeamCityBase = require('./teamcity-base')
+import Joi from 'joi';
+import {coveragePercentage} from '../color-formatters.js';
+import {optionalUrl} from '../validators.js';
+import {InvalidResponse} from '..';
+import TeamCityBase from './teamcity-base.js';
const buildStatisticsSchema = Joi.object({
property: Joi.array()
@@ -21,7 +19,7 @@ const queryParamSchema = Joi.object({
server: optionalUrl,
}).required()
-module.exports = class TeamCityCoverage extends TeamCityBase {
+export default class TeamCityCoverage extends TeamCityBase {
static category = 'coverage'
static route = {
@@ -89,4 +87,4 @@ module.exports = class TeamCityCoverage extends TeamCityBase {
const { coverage } = this.transform({ data })
return this.constructor.render({ coverage })
}
-}
+};
diff --git a/services/teamcity/teamcity-coverage.spec.js b/services/teamcity/teamcity-coverage.spec.js
index b6bcd35fb7a3e..49bc77b9aef3b 100644
--- a/services/teamcity/teamcity-coverage.spec.js
+++ b/services/teamcity/teamcity-coverage.spec.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const { expect } = require('chai')
-const nock = require('nock')
-const { cleanUpNockAfterEach, defaultContext } = require('../test-helpers')
-const TeamCityCoverage = require('./teamcity-coverage.service')
-const { user, pass, host, config } = require('./teamcity-test-helpers')
+import {expect} from 'chai';
+import nock from 'nock';
+import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
+import TeamCityCoverage from './teamcity-coverage.service.js';
+import {user, pass, host, config} from './teamcity-test-helpers.js';
describe('TeamCityCoverage', function () {
cleanUpNockAfterEach()
diff --git a/services/teamcity/teamcity-coverage.tester.js b/services/teamcity/teamcity-coverage.tester.js
index a259d150512ec..f75688df29e73 100644
--- a/services/teamcity/teamcity-coverage.tester.js
+++ b/services/teamcity/teamcity-coverage.tester.js
@@ -1,7 +1,7 @@
-'use strict'
-
-const { isIntegerPercentage } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import {isIntegerPercentage} from '../test-validators.js';
+const t = (function() {
+ export default __a;
+}())
t.create('invalid buildId')
.get('/btABC999.json')
diff --git a/services/teamcity/teamcity-test-helpers.js b/services/teamcity/teamcity-test-helpers.js
index 21d7a8b3ad89c..5cb3ed14e42f7 100644
--- a/services/teamcity/teamcity-test-helpers.js
+++ b/services/teamcity/teamcity-test-helpers.js
@@ -1,5 +1,3 @@
-'use strict'
-
const user = 'admin'
const pass = 'password'
const host = 'mycompany.teamcity.com'
@@ -17,9 +15,9 @@ const config = {
},
}
-module.exports = {
+export default {
user,
pass,
host,
config,
-}
+};
diff --git a/services/test-helpers.js b/services/test-helpers.js
index cc3013135d4ac..8bfbd351fdff1 100644
--- a/services/test-helpers.js
+++ b/services/test-helpers.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const nock = require('nock')
-const request = require('request')
+import nock from 'nock';
+import request from 'request';
const runnerConfig = require('config').util.toObject()
-const { promisify } = require('../core/base-service/legacy-request-handler')
+import {promisify} from '../core/base-service/legacy-request-handler.js';
function cleanUpNockAfterEach() {
afterEach(function () {
@@ -36,9 +34,9 @@ const sendAndCacheRequest = promisify(request)
const defaultContext = { sendAndCacheRequest }
-module.exports = {
+export default {
cleanUpNockAfterEach,
noToken,
sendAndCacheRequest,
defaultContext,
-}
+};
diff --git a/services/test-results.js b/services/test-results.js
index a46841939e65a..47828966ec5f0 100644
--- a/services/test-results.js
+++ b/services/test-results.js
@@ -1,6 +1,4 @@
-'use strict'
-
-const Joi = require('joi')
+import Joi from 'joi';
const testResultQueryParamSchema = Joi.object({
compact_message: Joi.equal(''),
@@ -106,9 +104,9 @@ const documentation = `
@@ -14,7 +12,7 @@ const documentation = ` // This service exists separately from the other Marketplace downloads badges (in ./visual-studio-marketplace-downloads.js) // due differences in how the Marketplace tracks metrics for Azure DevOps extensions vs. other extension types. // See https://github.com/badges/shields/pull/2748 for more information on the discussion and decision. -module.exports = class VisualStudioMarketplaceAzureDevOpsInstalls extends ( +export default class VisualStudioMarketplaceAzureDevOpsInstalls extends ( VisualStudioMarketplaceBase ) { static category = 'downloads' @@ -62,4 +60,4 @@ module.exports = class VisualStudioMarketplaceAzureDevOpsInstalls extends ( return this.constructor.render({ count: statistics.onpremDownloads }) } } -} +}; diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.tester.js b/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.tester.js index 741722d819910..baccf3681efc5 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.tester.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { isMetric } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {isMetric} from '../test-validators.js'; const mockResponse = { results: [ diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-base.js b/services/visual-studio-marketplace/visual-studio-marketplace-base.js index 12a7218129d21..7d66defbef893 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-base.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-base.js @@ -1,8 +1,6 @@ -'use strict' - -const Joi = require('joi') -const validate = require('../../core/base-service/validate') -const { BaseJsonService, NotFound } = require('..') +import Joi from 'joi'; +import validate from '../../core/base-service/validate.js'; +import {BaseJsonService, NotFound} from '..'; const extensionQuerySchema = Joi.object({ results: Joi.array() @@ -45,7 +43,7 @@ const statisticSchema = Joi.object().keys({ ratingcount: Joi.number().default(0), }) -module.exports = class VisualStudioMarketplaceBase extends BaseJsonService { +export default class VisualStudioMarketplaceBase extends BaseJsonService { static keywords = [ 'vscode', 'tfs', @@ -110,4 +108,4 @@ module.exports = class VisualStudioMarketplaceBase extends BaseJsonService { return { statistics: value } } -} +}; diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-downloads.service.js b/services/visual-studio-marketplace/visual-studio-marketplace-downloads.service.js index 71e459f25390d..c0848974b7af6 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-downloads.service.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-downloads.service.js @@ -1,8 +1,6 @@ -'use strict' - -const { metric } = require('../text-formatters') -const { downloadCount } = require('../color-formatters') -const VisualStudioMarketplaceBase = require('./visual-studio-marketplace-base') +import {metric} from '../text-formatters.js'; +import {downloadCount} from '../color-formatters.js'; +import VisualStudioMarketplaceBase from './visual-studio-marketplace-base.js'; const documentation = `
@@ -13,7 +11,7 @@ const documentation = `
` -module.exports = class VisualStudioMarketplaceDownloads extends ( +export default class VisualStudioMarketplaceDownloads extends ( VisualStudioMarketplaceBase ) { static category = 'downloads' @@ -62,4 +60,4 @@ module.exports = class VisualStudioMarketplaceDownloads extends ( : statistics.install + statistics.updateCount return this.constructor.render({ measure, count }) } -} +}; diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-downloads.tester.js b/services/visual-studio-marketplace/visual-studio-marketplace-downloads.tester.js index 9c6b775de7b0d..3303eae143f6a 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-downloads.tester.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-downloads.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { isMetric } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {isMetric} from '../test-validators.js'; const mockResponse = { results: [ diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-last-updated.service.js b/services/visual-studio-marketplace/visual-studio-marketplace-last-updated.service.js index db4b5300a7e1e..9ce7bbce05633 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-last-updated.service.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-last-updated.service.js @@ -1,10 +1,8 @@ -'use strict' +import {age} from '../color-formatters.js'; +import {formatDate} from '../text-formatters.js'; +import VisualStudioMarketplaceBase from './visual-studio-marketplace-base.js'; -const { age } = require('../color-formatters') -const { formatDate } = require('../text-formatters') -const VisualStudioMarketplaceBase = require('./visual-studio-marketplace-base') - -module.exports = class VisualStudioMarketplaceLastUpdated extends ( +export default class VisualStudioMarketplaceLastUpdated extends ( VisualStudioMarketplaceBase ) { static category = 'activity' @@ -47,4 +45,4 @@ module.exports = class VisualStudioMarketplaceLastUpdated extends ( const { lastUpdated } = this.transform({ json }) return this.constructor.render({ lastUpdated }) } -} +}; diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-last-updated.tester.js b/services/visual-studio-marketplace/visual-studio-marketplace-last-updated.tester.js index 5588f0fdbdaba..15d18bc021e4f 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-last-updated.tester.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-last-updated.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { isFormattedDate } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {isFormattedDate} from '../test-validators.js'; t.create('date') .get('/visual-studio-marketplace/last-updated/yasht.terminal-all-in-one.json') diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-rating.service.js b/services/visual-studio-marketplace/visual-studio-marketplace-rating.service.js index 3c9f4312e56b5..117f2d604b6ca 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-rating.service.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-rating.service.js @@ -1,10 +1,8 @@ -'use strict' +import {starRating} from '../text-formatters.js'; +import {floorCount} from '../color-formatters.js'; +import VisualStudioMarketplaceBase from './visual-studio-marketplace-base.js'; -const { starRating } = require('../text-formatters') -const { floorCount } = require('../color-formatters') -const VisualStudioMarketplaceBase = require('./visual-studio-marketplace-base') - -module.exports = class VisualStudioMarketplaceRating extends ( +export default class VisualStudioMarketplaceRating extends ( VisualStudioMarketplaceBase ) { static category = 'rating' @@ -63,4 +61,4 @@ module.exports = class VisualStudioMarketplaceRating extends ( ratingCount: statistics.ratingcount, }) } -} +}; diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-rating.tester.js b/services/visual-studio-marketplace/visual-studio-marketplace-rating.tester.js index 7457cbc753914..ffde1a841731d 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-rating.tester.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-rating.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { withRegex, isStarRating } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {withRegex, isStarRating} from '../test-validators.js'; const isVscodeRating = withRegex(/[0-5]\.[0-9]{1}\/5?\s*\([0-9]*\)$/) diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-release-date.service.js b/services/visual-studio-marketplace/visual-studio-marketplace-release-date.service.js index 4a3bb5d0554fe..9f8d82dbfde93 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-release-date.service.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-release-date.service.js @@ -1,10 +1,8 @@ -'use strict' +import {age} from '../color-formatters.js'; +import {formatDate} from '../text-formatters.js'; +import VisualStudioMarketplaceBase from './visual-studio-marketplace-base.js'; -const { age } = require('../color-formatters') -const { formatDate } = require('../text-formatters') -const VisualStudioMarketplaceBase = require('./visual-studio-marketplace-base') - -module.exports = class VisualStudioMarketplaceReleaseDate extends ( +export default class VisualStudioMarketplaceReleaseDate extends ( VisualStudioMarketplaceBase ) { static category = 'activity' @@ -47,4 +45,4 @@ module.exports = class VisualStudioMarketplaceReleaseDate extends ( const { releaseDate } = this.transform({ json }) return this.constructor.render({ releaseDate }) } -} +}; diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-release-date.tester.js b/services/visual-studio-marketplace/visual-studio-marketplace-release-date.tester.js index 6469ab49c97ad..f8c0413e09977 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-release-date.tester.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-release-date.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { isFormattedDate } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {isFormattedDate} from '../test-validators.js'; t.create('date') .get('/visual-studio-marketplace/release-date/yasht.terminal-all-in-one.json') diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-version.service.js b/services/visual-studio-marketplace/visual-studio-marketplace-version.service.js index 3d4eff80d4920..d7877a89f9d3f 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-version.service.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-version.service.js @@ -1,9 +1,7 @@ -'use strict' +import {renderVersionBadge} from '../version.js'; +import VisualStudioMarketplaceBase from './visual-studio-marketplace-base.js'; -const { renderVersionBadge } = require('../version') -const VisualStudioMarketplaceBase = require('./visual-studio-marketplace-base') - -module.exports = class VisualStudioMarketplaceVersion extends ( +export default class VisualStudioMarketplaceVersion extends ( VisualStudioMarketplaceBase ) { static category = 'version' @@ -43,4 +41,4 @@ module.exports = class VisualStudioMarketplaceVersion extends ( return this.constructor.render({ version }) } -} +}; diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-version.tester.js b/services/visual-studio-marketplace/visual-studio-marketplace-version.tester.js index 6e026eb69928d..109a478a2a56a 100644 --- a/services/visual-studio-marketplace/visual-studio-marketplace-version.tester.js +++ b/services/visual-studio-marketplace/visual-studio-marketplace-version.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { withRegex } = require('../test-validators') +const t = (function() { + export default __a; +}()) +import {withRegex} from '../test-validators.js'; const isMarketplaceVersion = withRegex(/^v(\d+\.\d+\.\d+)(\.\d+)?$/) diff --git a/services/w3c/w3c-validation-helper.js b/services/w3c/w3c-validation-helper.js index 3f0a75f4016db..19aa2bbaa7980 100644 --- a/services/w3c/w3c-validation-helper.js +++ b/services/w3c/w3c-validation-helper.js @@ -1,5 +1,3 @@ -'use strict' - const html5Expression = '^HTML\\s?,\\s?SVG\\s?1\\.1\\s?,\\s?MathML\\s?3\\.0(\\s?,\\s?((ITS\\s?2\\.0)|(RDFa\\s?Lite\\s?1\\.1)))?$' const html4Expression = @@ -147,10 +145,10 @@ const documentation = ` ` -module.exports = { +export default { documentation, presetRegex, getColor, getMessage, getSchema, -} +}; diff --git a/services/w3c/w3c-validation-helper.spec.js b/services/w3c/w3c-validation-helper.spec.js index 819f1afd53969..6622d5e008633 100644 --- a/services/w3c/w3c-validation-helper.spec.js +++ b/services/w3c/w3c-validation-helper.spec.js @@ -1,12 +1,6 @@ -'use strict' -const { expect } = require('chai') -const { test, given, forCases } = require('sazerac') -const { - presetRegex, - getMessage, - getColor, - getSchema, -} = require('./w3c-validation-helper') +import {expect} from 'chai'; +import {test, given, forCases} from 'sazerac'; +import {presetRegex, getMessage, getColor, getSchema} from './w3c-validation-helper.js'; describe('w3c-validation-helper', function () { describe('presetRegex', function () { diff --git a/services/w3c/w3c-validation.service.js b/services/w3c/w3c-validation.service.js index a0482c5002d21..f5dcb3c75070b 100644 --- a/services/w3c/w3c-validation.service.js +++ b/services/w3c/w3c-validation.service.js @@ -1,14 +1,7 @@ -'use strict' -const Joi = require('joi') -const { optionalUrl } = require('../validators') -const { BaseJsonService, NotFound } = require('..') -const { - documentation, - presetRegex, - getColor, - getMessage, - getSchema, -} = require('./w3c-validation-helper') +import Joi from 'joi'; +import {optionalUrl} from '../validators.js'; +import {BaseJsonService, NotFound} from '..'; +import {documentation, presetRegex, getColor, getMessage, getSchema} from './w3c-validation-helper.js'; const schema = Joi.object({ url: Joi.string().optional(), @@ -30,7 +23,7 @@ const queryParamSchema = Joi.object({ preset: Joi.string().regex(presetRegex).allow(''), }).required() -module.exports = class W3cValidation extends BaseJsonService { +export default class W3cValidation extends BaseJsonService { static category = 'analysis' static route = { @@ -123,4 +116,4 @@ module.exports = class W3cValidation extends BaseJsonService { messageTypes: this.transform(url, messages), }) } -} +}; diff --git a/services/w3c/w3c-validation.tester.js b/services/w3c/w3c-validation.tester.js index 4dc93b6e0d76a..1cdefe8fbbaac 100644 --- a/services/w3c/w3c-validation.tester.js +++ b/services/w3c/w3c-validation.tester.js @@ -1,6 +1,7 @@ -'use strict' -const Joi = require('joi') -const t = (module.exports = require('../tester').createServiceTester()) +import Joi from 'joi'; +const t = (function() { + export default __a; +}()) const isErrorOnly = Joi.string().regex(/^[0-9]+ errors?$/) diff --git a/services/waffle/waffle-label-redirect.service.js b/services/waffle/waffle-label-redirect.service.js index 0275bc1d5cbf3..fc8c0d16366b9 100644 --- a/services/waffle/waffle-label-redirect.service.js +++ b/services/waffle/waffle-label-redirect.service.js @@ -1,8 +1,6 @@ -'use strict' +import {redirector} from '..'; -const { redirector } = require('..') - -module.exports = [ +export default [ // The WaffleLabel service originally had 'label' as an optional parameter // with a default value of 'ready'. However, after some discussion it was // agreed that 'ready' didn't make sense as a default, nor was there any other @@ -18,4 +16,4 @@ module.exports = [ transformPath: ({ user, repo }) => `/waffle/label/${user}/${repo}/ready`, dateAdded: new Date('2019-03-05'), }), -] +]; diff --git a/services/waffle/waffle-label-redirect.tester.js b/services/waffle/waffle-label-redirect.tester.js index fb1b0cd6cabfa..3180f6fb53270 100644 --- a/services/waffle/waffle-label-redirect.tester.js +++ b/services/waffle/waffle-label-redirect.tester.js @@ -1,12 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'WaffleLabelRedirect', - title: 'WaffleLabelRedirect', - pathPrefix: '/waffle/label', -})) +const t = (function() { + export default __a; +}()) t.create('waffle label redirect') .get('/waffleio/waffle.io.svg') diff --git a/services/waffle/waffle-label.service.js b/services/waffle/waffle-label.service.js index de28fb92643e2..19718dcbe6239 100644 --- a/services/waffle/waffle-label.service.js +++ b/services/waffle/waffle-label.service.js @@ -1,8 +1,6 @@ -'use strict' +import {deprecatedService} from '..'; -const { deprecatedService } = require('..') - -module.exports = deprecatedService({ +export default deprecatedService({ route: { base: 'waffle/label', pattern: ':various*', @@ -10,4 +8,4 @@ module.exports = deprecatedService({ label: 'waffle', category: 'issue-tracking', dateAdded: new Date('2019-05-21'), -}) +}); diff --git a/services/waffle/waffle-label.tester.js b/services/waffle/waffle-label.tester.js index 98158d93fc8ff..995ef96d1c41f 100644 --- a/services/waffle/waffle-label.tester.js +++ b/services/waffle/waffle-label.tester.js @@ -1,12 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'Waffle', - title: 'WaffleLabel', - pathPrefix: '/waffle/label', -})) +const t = (function() { + export default __a; +}()) t.create('no longer available') .get('/ritwickdey/vscode-live-server/bug.json') diff --git a/services/website-status.js b/services/website-status.js index c22cf690bde61..3e6896d0eac25 100644 --- a/services/website-status.js +++ b/services/website-status.js @@ -1,6 +1,4 @@ -'use strict' - -const Joi = require('joi') +import Joi from 'joi'; const queryParamSchema = Joi.object({ up_message: Joi.string(), @@ -30,8 +28,8 @@ function renderWebsiteStatus({ } } -module.exports = { +export default { queryParamSchema, exampleQueryParams, renderWebsiteStatus, -} +}; diff --git a/services/website-status.spec.js b/services/website-status.spec.js index d87f33a4a0003..b1473c9f7f54c 100644 --- a/services/website-status.spec.js +++ b/services/website-status.spec.js @@ -1,7 +1,5 @@ -'use strict' - -const { test, given } = require('sazerac') -const { renderWebsiteStatus } = require('./website-status') +import {test, given} from 'sazerac'; +import {renderWebsiteStatus} from './website-status.js'; describe('Website status helpers', function () { const customOptions = { diff --git a/services/website/website-redirect.service.js b/services/website/website-redirect.service.js index f2597dd1ceb72..b43aae3bba3a1 100644 --- a/services/website/website-redirect.service.js +++ b/services/website/website-redirect.service.js @@ -1,14 +1,10 @@ -'use strict' - -const { escapeFormat } = require('../../core/badge-urls/path-helpers') -const { redirector } = require('..') +import {escapeFormat} from '../../core/badge-urls/path-helpers.js'; +import {redirector} from '..'; function escapeFormatSlashes(t) { - return ( - escapeFormat(t) - // Double slash - .replace(/\/\//g, '/') - ) + return escapeFormat(t) + // Double slash + .replace(/\/\//g, '/'); } /* @@ -51,7 +47,7 @@ Old documentation, for reference: */ -module.exports = [ +export default [ redirector({ category: 'monitoring', route: { @@ -104,4 +100,4 @@ module.exports = [ }), dateAdded: new Date('2019-09-17'), }), -] +]; diff --git a/services/website/website-redirect.tester.js b/services/website/website-redirect.tester.js index 4e0b27bca2d73..fdc76b3d13c03 100644 --- a/services/website/website-redirect.tester.js +++ b/services/website/website-redirect.tester.js @@ -1,12 +1,8 @@ -'use strict' +import {ServiceTester} from '../tester.js'; -const { ServiceTester } = require('../tester') - -const t = (module.exports = new ServiceTester({ - id: 'WebsiteRedirect', - title: 'WebsiteRedirect', - pathPrefix: '', -})) +const t = (function() { + export default __a; +}()) t.create('Website with custom messages') .get('/website-up-down/https/www.google.com.svg') diff --git a/services/website/website.service.js b/services/website/website.service.js index 0a9b278daa135..4ea20bc26079b 100644 --- a/services/website/website.service.js +++ b/services/website/website.service.js @@ -1,15 +1,9 @@ -'use strict' - -const Joi = require('joi') -const emojic = require('emojic') -const { optionalUrl } = require('../validators') -const { - queryParamSchema, - exampleQueryParams, - renderWebsiteStatus, -} = require('../website-status') -const { BaseService } = require('..') -const trace = require('../../core/base-service/trace') +import Joi from 'joi'; +import emojic from 'emojic'; +import {optionalUrl} from '../validators.js'; +import {queryParamSchema, exampleQueryParams, renderWebsiteStatus} from '../website-status.js'; +import {BaseService} from '..'; +import trace from '../../core/base-service/trace.js'; const documentation = `@@ -35,7 +29,7 @@ const urlQueryParamSchema = Joi.object({ url: optionalUrl.required(), }).required() -module.exports = class Website extends BaseService { +export default class Website extends BaseService { static category = 'monitoring' static route = { @@ -105,4 +99,4 @@ module.exports = class Website extends BaseService { downColor, }) } -} +}; diff --git a/services/website/website.tester.js b/services/website/website.tester.js index f60fafbd2ac89..ded23b550487d 100644 --- a/services/website/website.tester.js +++ b/services/website/website.tester.js @@ -1,6 +1,6 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) +const t = (function() { + export default __a; +}()) t.create('status of http://shields.io') .get('/website.json?url=http://shields.io') diff --git a/services/wercker/wercker.service.js b/services/wercker/wercker.service.js index 94bb3288ffbd2..0ffe42d732860 100644 --- a/services/wercker/wercker.service.js +++ b/services/wercker/wercker.service.js @@ -1,8 +1,6 @@ -'use strict' - -const Joi = require('joi') -const { isBuildStatus, renderBuildStatusBadge } = require('../build-status') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js'; +import {BaseJsonService} from '..'; const werckerSchema = Joi.array() .items( @@ -32,7 +30,7 @@ const werckerCIDocumentation = `
` -module.exports = class Wercker extends BaseJsonService { +export default class Wercker extends BaseJsonService { static category = 'build' static route = { @@ -126,4 +124,4 @@ module.exports = class Wercker extends BaseJsonService { const { result } = json[0] return this.constructor.render({ result }) } -} +}; diff --git a/services/wercker/wercker.tester.js b/services/wercker/wercker.tester.js index 28cba83661019..7cb159c44bb2f 100644 --- a/services/wercker/wercker.tester.js +++ b/services/wercker/wercker.tester.js @@ -1,7 +1,7 @@ -'use strict' - -const { isBuildStatus } = require('../build-status') -const t = (module.exports = require('../tester').createServiceTester()) +import {isBuildStatus} from '../build-status.js'; +const t = (function() { + export default __a; +}()) t.create('Build status') .get('/build/wercker/go-wercker-api.json') diff --git a/services/wheelmap/wheelmap.service.js b/services/wheelmap/wheelmap.service.js index 1973d0b326c42..43f2e4f6b2a0b 100644 --- a/services/wheelmap/wheelmap.service.js +++ b/services/wheelmap/wheelmap.service.js @@ -1,7 +1,5 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService } = require('..') +import Joi from 'joi'; +import {BaseJsonService} from '..'; const schema = Joi.object({ node: Joi.object({ @@ -9,7 +7,7 @@ const schema = Joi.object({ }).required(), }).required() -module.exports = class Wheelmap extends BaseJsonService { +export default class Wheelmap extends BaseJsonService { static category = 'other' static route = { @@ -66,4 +64,4 @@ module.exports = class Wheelmap extends BaseJsonService { const accessibility = json.node.wheelchair return this.constructor.render({ accessibility }) } -} +}; diff --git a/services/wheelmap/wheelmap.spec.js b/services/wheelmap/wheelmap.spec.js index 41b80594b4afa..20c4eeee36d3f 100644 --- a/services/wheelmap/wheelmap.spec.js +++ b/services/wheelmap/wheelmap.spec.js @@ -1,9 +1,7 @@ -'use strict' - -const { expect } = require('chai') -const nock = require('nock') -const { cleanUpNockAfterEach, defaultContext } = require('../test-helpers') -const Wheelmap = require('./wheelmap.service') +import {expect} from 'chai'; +import nock from 'nock'; +import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js'; +import Wheelmap from './wheelmap.service.js'; describe('Wheelmap', function () { cleanUpNockAfterEach() diff --git a/services/wheelmap/wheelmap.tester.js b/services/wheelmap/wheelmap.tester.js index 1a618029fd413..2bc5c97011669 100644 --- a/services/wheelmap/wheelmap.tester.js +++ b/services/wheelmap/wheelmap.tester.js @@ -1,8 +1,9 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) -const { noToken } = require('../test-helpers') -const noWheelmapToken = noToken(require('./wheelmap.service')) +const t = (function() { + export default __a; +}()) +import {noToken} from '../test-helpers.js'; +import _noWheelmapToken from './wheelmap.service'; +const noWheelmapToken = noToken(_noWheelmapToken); t.create('node with accessibility') .skipWhen(noWheelmapToken) diff --git a/services/wordpress/wordpress-base.js b/services/wordpress/wordpress-base.js index 36a04628e4bfd..f807879402d15 100644 --- a/services/wordpress/wordpress-base.js +++ b/services/wordpress/wordpress-base.js @@ -1,8 +1,6 @@ -'use strict' - -const Joi = require('joi') -const { nonNegativeInteger } = require('../validators') -const { BaseJsonService, NotFound } = require('..') +import Joi from 'joi'; +import {nonNegativeInteger} from '../validators.js'; +import {BaseJsonService, NotFound} from '..'; const stringOrFalse = Joi.alternatives(Joi.string(), Joi.bool()) @@ -42,7 +40,7 @@ const notFoundSchema = Joi.object() const pluginSchemas = Joi.alternatives(pluginSchema, notFoundSchema) const themeSchemas = Joi.alternatives(themeSchema, notFoundSchema) -module.exports = class BaseWordpress extends BaseJsonService { +export default class BaseWordpress extends BaseJsonService { async fetch({ extensionType, slug }) { const url = `https://api.wordpress.org/${extensionType}s/info/1.2/` let schemas @@ -81,4 +79,4 @@ module.exports = class BaseWordpress extends BaseJsonService { } return json } -} +}; diff --git a/services/wordpress/wordpress-downloads.service.js b/services/wordpress/wordpress-downloads.service.js index 81a7ae3e381d0..d227a69fba66e 100644 --- a/services/wordpress/wordpress-downloads.service.js +++ b/services/wordpress/wordpress-downloads.service.js @@ -1,10 +1,8 @@ -'use strict' - -const Joi = require('joi') -const { metric } = require('../text-formatters') -const { downloadCount } = require('../color-formatters') -const { NotFound } = require('..') -const BaseWordpress = require('./wordpress-base') +import Joi from 'joi'; +import {metric} from '../text-formatters.js'; +import {downloadCount} from '../color-formatters.js'; +import {NotFound} from '..'; +import BaseWordpress from './wordpress-base.js'; const dateSchema = Joi.object() .pattern(Joi.date().iso(), Joi.number().integer()) @@ -158,4 +156,4 @@ function InstallsForExtensionType(extensionType) { const downloadServices = ['plugin', 'theme'].map(DownloadsForExtensionType) const installServices = ['plugin', 'theme'].map(InstallsForExtensionType) const modules = [...downloadServices, ...installServices] -module.exports = modules +export default modules; diff --git a/services/wordpress/wordpress-downloads.tester.js b/services/wordpress/wordpress-downloads.tester.js index 21b48fcd08594..f04a2cfbe90dd 100644 --- a/services/wordpress/wordpress-downloads.tester.js +++ b/services/wordpress/wordpress-downloads.tester.js @@ -1,13 +1,11 @@ -'use strict' - -const { ServiceTester } = require('../tester') -const { isMetric, isMetricOverTimePeriod } = require('../test-validators') +import {ServiceTester} from '../tester.js'; +import {isMetric, isMetricOverTimePeriod} from '../test-validators.js'; const t = new ServiceTester({ id: 'wordpress', title: 'WordPress Download Tests', }) -module.exports = t +export default t; t.create('Plugin Downloads - Total') .get('/plugin/dt/akismet.json') diff --git a/services/wordpress/wordpress-last-update.service.js b/services/wordpress/wordpress-last-update.service.js index cbf018d9319a3..9a987e178f838 100644 --- a/services/wordpress/wordpress-last-update.service.js +++ b/services/wordpress/wordpress-last-update.service.js @@ -1,10 +1,8 @@ -'use strict' - -const moment = require('moment') -const { InvalidResponse } = require('..') -const { formatDate } = require('../text-formatters') -const { age: ageColor } = require('../color-formatters') -const BaseWordpress = require('./wordpress-base') +import moment from 'moment'; +import {InvalidResponse} from '..'; +import {formatDate} from '../text-formatters.js'; +import {age as ageColor} from '../color-formatters.js'; +import BaseWordpress from './wordpress-base.js'; const extensionData = { plugin: { @@ -76,4 +74,4 @@ function LastUpdateForType(extensionType) { } const lastupdate = ['plugin', 'theme'].map(LastUpdateForType) -module.exports = [...lastupdate] +export default [...lastupdate]; diff --git a/services/wordpress/wordpress-last-update.tester.js b/services/wordpress/wordpress-last-update.tester.js index 9301a0d6267b1..e02a0c021905f 100644 --- a/services/wordpress/wordpress-last-update.tester.js +++ b/services/wordpress/wordpress-last-update.tester.js @@ -1,13 +1,11 @@ -'use strict' - -const { ServiceTester } = require('../tester') -const { isFormattedDate } = require('../test-validators') +import {ServiceTester} from '../tester.js'; +import {isFormattedDate} from '../test-validators.js'; const t = new ServiceTester({ id: 'wordpress', title: 'WordPress Last Update', }) -module.exports = t +export default t; t.create('Plugin Last Update') .get('/plugin/last-updated/akismet.json') diff --git a/services/wordpress/wordpress-platform-redirect.service.js b/services/wordpress/wordpress-platform-redirect.service.js index 10b74f8d99893..814e388459db5 100644 --- a/services/wordpress/wordpress-platform-redirect.service.js +++ b/services/wordpress/wordpress-platform-redirect.service.js @@ -1,8 +1,6 @@ -'use strict' +import {redirector} from '..'; -const { redirector } = require('..') - -module.exports = redirector({ +export default redirector({ category: 'platform-support', route: { base: 'wordpress/v', @@ -10,4 +8,4 @@ module.exports = redirector({ }, transformPath: ({ slug }) => `/wordpress/plugin/tested/${slug}`, dateAdded: new Date('2019-04-17'), -}) +}); diff --git a/services/wordpress/wordpress-platform-redirect.tester.js b/services/wordpress/wordpress-platform-redirect.tester.js index 2e665cadb9266..91c3527fa5301 100644 --- a/services/wordpress/wordpress-platform-redirect.tester.js +++ b/services/wordpress/wordpress-platform-redirect.tester.js @@ -1,6 +1,6 @@ -'use strict' - -const t = (module.exports = require('../tester').createServiceTester()) +const t = (function() { + export default __a; +}()) t.create('Plugin Tested WP Version (Alias)') .get('/akismet.svg') diff --git a/services/wordpress/wordpress-platform.service.js b/services/wordpress/wordpress-platform.service.js index cca782975c558..00b19bd1cb00e 100644 --- a/services/wordpress/wordpress-platform.service.js +++ b/services/wordpress/wordpress-platform.service.js @@ -1,10 +1,8 @@ -'use strict' - -const { NotFound } = require('..') -const { addv } = require('../text-formatters') -const { version: versionColor } = require('../color-formatters') -const BaseWordpress = require('./wordpress-base') -const { versionColorForWordpressVersion } = require('./wordpress-version-color') +import {NotFound} from '..'; +import {addv} from '../text-formatters.js'; +import {version as versionColor} from '../color-formatters.js'; +import BaseWordpress from './wordpress-base.js'; +import {versionColorForWordpressVersion} from './wordpress-version-color.js'; const extensionData = { plugin: { @@ -164,8 +162,8 @@ function RequiresPHPVersionForType(extensionType) { const requiredPhp = ['plugin', 'theme'].map(RequiresPHPVersionForType) const requiresVersion = ['plugin', 'theme'].map(WordpressRequiresVersion) -module.exports = [ +export default [ ...requiredPhp, ...requiresVersion, WordpressPluginTestedVersion, -] +]; diff --git a/services/wordpress/wordpress-platform.tester.js b/services/wordpress/wordpress-platform.tester.js index 43e7edb27287b..42d394be28e4d 100644 --- a/services/wordpress/wordpress-platform.tester.js +++ b/services/wordpress/wordpress-platform.tester.js @@ -1,17 +1,10 @@ -'use strict' - -const Joi = require('joi') -const { ServiceTester } = require('../tester') -const { - isVPlusDottedVersionAtLeastOne, - isComposerVersion, -} = require('../test-validators') - -const t = (module.exports = new ServiceTester({ - id: 'WordpressPlatform', - title: 'WordPress Platform Tests', - pathPrefix: '/wordpress', -})) +import Joi from 'joi'; +import {ServiceTester} from '../tester.js'; +import {isVPlusDottedVersionAtLeastOne, isComposerVersion} from '../test-validators.js'; + +const t = (function() { + export default __a; +}()) t.create('Plugin Required WP Version') .get('/plugin/wp-version/akismet.json') diff --git a/services/wordpress/wordpress-rating.service.js b/services/wordpress/wordpress-rating.service.js index 843915f1e5ab6..9ee53b6428c3d 100644 --- a/services/wordpress/wordpress-rating.service.js +++ b/services/wordpress/wordpress-rating.service.js @@ -1,8 +1,6 @@ -'use strict' - -const { starRating, metric } = require('../text-formatters') -const { floorCount } = require('../color-formatters') -const BaseWordpress = require('./wordpress-base') +import {starRating, metric} from '../text-formatters.js'; +import {floorCount} from '../color-formatters.js'; +import BaseWordpress from './wordpress-base.js'; const extensionData = { plugin: { @@ -103,4 +101,4 @@ const ratingsServices = ['plugin', 'theme'].map(RatingForExtensionType) const starsServices = ['plugin', 'theme'].map(StarsForExtensionType) const modules = [...ratingsServices, ...starsServices] -module.exports = modules +export default modules; diff --git a/services/wordpress/wordpress-rating.tester.js b/services/wordpress/wordpress-rating.tester.js index a1e1b8c3bae2b..bfb0daa0c9af8 100644 --- a/services/wordpress/wordpress-rating.tester.js +++ b/services/wordpress/wordpress-rating.tester.js @@ -1,13 +1,11 @@ -'use strict' - -const { ServiceTester } = require('../tester') -const { isStarRating } = require('../test-validators') +import {ServiceTester} from '../tester.js'; +import {isStarRating} from '../test-validators.js'; const t = new ServiceTester({ id: 'wordpress', title: 'WordPress Rating Tests', }) -module.exports = t +export default t; t.create('Plugin Rating - Stars') .get('/plugin/stars/akismet.json') diff --git a/services/wordpress/wordpress-version-color.js b/services/wordpress/wordpress-version-color.js index fd46f718987a2..a8bd6f9457c3c 100644 --- a/services/wordpress/wordpress-version-color.js +++ b/services/wordpress/wordpress-version-color.js @@ -1,8 +1,6 @@ -'use strict' - -const { promisify } = require('util') -const semver = require('semver') -const { regularUpdate } = require('../../core/legacy/regular-update') +import {promisify} from 'util'; +import semver from 'semver'; +import {regularUpdate} from '../../core/legacy/regular-update.js'; // TODO: Incorporate this schema. // const schema = Joi.object() @@ -61,8 +59,8 @@ async function versionColorForWordpressVersion(version) { } } -module.exports = { +export default { toSemver, getOfferedVersions, versionColorForWordpressVersion, -} +}; diff --git a/services/wordpress/wordpress-version-color.spec.js b/services/wordpress/wordpress-version-color.spec.js index d7d9d8cb8635f..5f9a9210e8be0 100644 --- a/services/wordpress/wordpress-version-color.spec.js +++ b/services/wordpress/wordpress-version-color.spec.js @@ -1,10 +1,5 @@ -'use strict' - -const { expect } = require('chai') -const { - toSemver, - versionColorForWordpressVersion, -} = require('./wordpress-version-color') +import {expect} from 'chai'; +import {toSemver, versionColorForWordpressVersion} from './wordpress-version-color.js'; describe('toSemver() function', function () { it('coerces versions', function () { diff --git a/services/wordpress/wordpress-version.service.js b/services/wordpress/wordpress-version.service.js index 4980ec7f6a4e2..4127759b5ba4b 100644 --- a/services/wordpress/wordpress-version.service.js +++ b/services/wordpress/wordpress-version.service.js @@ -1,8 +1,6 @@ -'use strict' - -const { addv } = require('../text-formatters') -const { version: versionColor } = require('../color-formatters') -const BaseWordpress = require('./wordpress-base') +import {addv} from '../text-formatters.js'; +import {version as versionColor} from '../color-formatters.js'; +import BaseWordpress from './wordpress-base.js'; function VersionForExtensionType(extensionType) { const { capt, exampleSlug } = { @@ -53,4 +51,4 @@ function VersionForExtensionType(extensionType) { } } -module.exports = ['theme', 'plugin'].map(VersionForExtensionType) +export default ['theme', 'plugin'].map(VersionForExtensionType); diff --git a/services/wordpress/wordpress-version.tester.js b/services/wordpress/wordpress-version.tester.js index e8fc1a94de078..94e419d7c5a5e 100644 --- a/services/wordpress/wordpress-version.tester.js +++ b/services/wordpress/wordpress-version.tester.js @@ -1,12 +1,9 @@ -'use strict' +import {ServiceTester} from '../tester.js'; +import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js'; -const { ServiceTester } = require('../tester') -const { isVPlusDottedVersionAtLeastOne } = require('../test-validators') - -const t = (module.exports = new ServiceTester({ - id: 'wordpress', - title: 'WordPress Version Tests', -})) +const t = (function() { + export default __a; +}()) t.create('Plugin Version').get('/plugin/v/akismet.json').expectBadge({ label: 'plugin', diff --git a/services/youtube/youtube-base.js b/services/youtube/youtube-base.js index ad2bfd83fc3c6..58a0414840ef3 100644 --- a/services/youtube/youtube-base.js +++ b/services/youtube/youtube-base.js @@ -1,9 +1,7 @@ -'use strict' - -const Joi = require('joi') -const { BaseJsonService, NotFound } = require('..') -const { metric } = require('../text-formatters') -const { nonNegativeInteger } = require('../validators') +import Joi from 'joi'; +import {BaseJsonService, NotFound} from '..'; +import {metric} from '../text-formatters.js'; +import {nonNegativeInteger} from '../validators.js'; const documentation = `By using the YouTube badges provided by Shields.io, you are agreeing to be bound by the YouTube Terms of Service. These can be found here:
@@ -92,4 +90,4 @@ class YouTubeChannelBase extends YouTubeBase {
static type = 'channel'
}
-module.exports = { documentation, YouTubeVideoBase, YouTubeChannelBase }
+export default { documentation, YouTubeVideoBase, YouTubeChannelBase };
diff --git a/services/youtube/youtube-channel-views.service.js b/services/youtube/youtube-channel-views.service.js
index 27712d5c83ebf..599fa05d17f89 100644
--- a/services/youtube/youtube-channel-views.service.js
+++ b/services/youtube/youtube-channel-views.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {documentation, YouTubeChannelBase} from './youtube-base.js';
-const { documentation, YouTubeChannelBase } = require('./youtube-base')
-
-module.exports = class YouTubeChannelViews extends YouTubeChannelBase {
+export default class YouTubeChannelViews extends YouTubeChannelBase {
static route = {
base: 'youtube/channel/views',
pattern: ':channelId',
@@ -28,4 +26,4 @@ module.exports = class YouTubeChannelViews extends YouTubeChannelBase {
static render({ statistics, id }) {
return super.renderSingleStat({ statistics, statisticName: 'view', id })
}
-}
+};
diff --git a/services/youtube/youtube-channel-views.tester.js b/services/youtube/youtube-channel-views.tester.js
index eab2689fd0ec7..972e61dbad600 100644
--- a/services/youtube/youtube-channel-views.tester.js
+++ b/services/youtube/youtube-channel-views.tester.js
@@ -1,9 +1,10 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { noToken } = require('../test-helpers')
-const { isMetric } = require('../test-validators')
-const noYouTubeToken = noToken(require('./youtube-channel-views.service'))
+const t = (function() {
+ export default __a;
+}())
+import {noToken} from '../test-helpers.js';
+import {isMetric} from '../test-validators.js';
+import _noYouTubeToken from './youtube-channel-views.service';
+const noYouTubeToken = noToken(_noYouTubeToken);
t.create('channel view count')
.skipWhen(noYouTubeToken)
diff --git a/services/youtube/youtube-comments.service.js b/services/youtube/youtube-comments.service.js
index 679605684cc6a..ca8bc8143f569 100644
--- a/services/youtube/youtube-comments.service.js
+++ b/services/youtube/youtube-comments.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {documentation, YouTubeVideoBase} from './youtube-base.js';
-const { documentation, YouTubeVideoBase } = require('./youtube-base')
-
-module.exports = class YouTubeComments extends YouTubeVideoBase {
+export default class YouTubeComments extends YouTubeVideoBase {
static route = {
base: 'youtube/comments',
pattern: ':videoId',
@@ -28,4 +26,4 @@ module.exports = class YouTubeComments extends YouTubeVideoBase {
static render({ statistics, id }) {
return super.renderSingleStat({ statistics, statisticName: 'comment', id })
}
-}
+};
diff --git a/services/youtube/youtube-comments.tester.js b/services/youtube/youtube-comments.tester.js
index dfdbde45d49c2..ac1f7ccbf3c80 100644
--- a/services/youtube/youtube-comments.tester.js
+++ b/services/youtube/youtube-comments.tester.js
@@ -1,9 +1,10 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { noToken } = require('../test-helpers')
-const { isMetric } = require('../test-validators')
-const noYouTubeToken = noToken(require('./youtube-comments.service'))
+const t = (function() {
+ export default __a;
+}())
+import {noToken} from '../test-helpers.js';
+import {isMetric} from '../test-validators.js';
+import _noYouTubeToken from './youtube-comments.service';
+const noYouTubeToken = noToken(_noYouTubeToken);
t.create('video comment count')
.skipWhen(noYouTubeToken)
diff --git a/services/youtube/youtube-likes.service.js b/services/youtube/youtube-likes.service.js
index e2133cd392c1a..09d3ab4419654 100644
--- a/services/youtube/youtube-likes.service.js
+++ b/services/youtube/youtube-likes.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { metric } = require('../text-formatters')
-const { documentation, YouTubeVideoBase } = require('./youtube-base')
+import Joi from 'joi';
+import {metric} from '../text-formatters.js';
+import {documentation, YouTubeVideoBase} from './youtube-base.js';
const documentationWithDislikes = `
${documentation}
@@ -16,7 +14,7 @@ const queryParamSchema = Joi.object({
withDislikes: Joi.equal(''),
}).required()
-module.exports = class YouTubeLikes extends YouTubeVideoBase {
+export default class YouTubeLikes extends YouTubeVideoBase {
static route = {
base: 'youtube/likes',
pattern: ':videoId',
@@ -73,4 +71,4 @@ module.exports = class YouTubeLikes extends YouTubeVideoBase {
}
return renderedBadge
}
-}
+};
diff --git a/services/youtube/youtube-likes.tester.js b/services/youtube/youtube-likes.tester.js
index 5c266e0987323..4e12b30a27686 100644
--- a/services/youtube/youtube-likes.tester.js
+++ b/services/youtube/youtube-likes.tester.js
@@ -1,10 +1,11 @@
-'use strict'
-
-const Joi = require('joi')
-const t = (module.exports = require('../tester').createServiceTester())
-const { noToken } = require('../test-helpers')
-const { isMetric } = require('../test-validators')
-const noYouTubeToken = noToken(require('./youtube-likes.service'))
+import Joi from 'joi';
+const t = (function() {
+ export default __a;
+}())
+import {noToken} from '../test-helpers.js';
+import {isMetric} from '../test-validators.js';
+import _noYouTubeToken from './youtube-likes.service';
+const noYouTubeToken = noToken(_noYouTubeToken);
t.create('video like count')
.skipWhen(noYouTubeToken)
diff --git a/services/youtube/youtube-subscribers.service.js b/services/youtube/youtube-subscribers.service.js
index 408b451bae908..47bbb0e2ecf6d 100644
--- a/services/youtube/youtube-subscribers.service.js
+++ b/services/youtube/youtube-subscribers.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {documentation, YouTubeChannelBase} from './youtube-base.js';
-const { documentation, YouTubeChannelBase } = require('./youtube-base')
-
-module.exports = class YouTubeSubscribes extends YouTubeChannelBase {
+export default class YouTubeSubscribes extends YouTubeChannelBase {
static route = {
base: 'youtube/channel/subscribers',
pattern: ':channelId',
@@ -32,4 +30,4 @@ module.exports = class YouTubeSubscribes extends YouTubeChannelBase {
id,
})
}
-}
+};
diff --git a/services/youtube/youtube-subscribers.tester.js b/services/youtube/youtube-subscribers.tester.js
index acff789b0c64b..ef5f5e6d5a464 100644
--- a/services/youtube/youtube-subscribers.tester.js
+++ b/services/youtube/youtube-subscribers.tester.js
@@ -1,9 +1,10 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { noToken } = require('../test-helpers')
-const { isMetric } = require('../test-validators')
-const noYouTubeToken = noToken(require('./youtube-subscribers.service'))
+const t = (function() {
+ export default __a;
+}())
+import {noToken} from '../test-helpers.js';
+import {isMetric} from '../test-validators.js';
+import _noYouTubeToken from './youtube-subscribers.service';
+const noYouTubeToken = noToken(_noYouTubeToken);
t.create('subscriber count')
.skipWhen(noYouTubeToken)
diff --git a/services/youtube/youtube-views.service.js b/services/youtube/youtube-views.service.js
index 5259e6818add2..d645c35fb65ac 100644
--- a/services/youtube/youtube-views.service.js
+++ b/services/youtube/youtube-views.service.js
@@ -1,8 +1,6 @@
-'use strict'
+import {documentation, YouTubeVideoBase} from './youtube-base.js';
-const { documentation, YouTubeVideoBase } = require('./youtube-base')
-
-module.exports = class YouTubeViews extends YouTubeVideoBase {
+export default class YouTubeViews extends YouTubeVideoBase {
static route = {
base: 'youtube/views',
pattern: ':videoId',
@@ -28,4 +26,4 @@ module.exports = class YouTubeViews extends YouTubeVideoBase {
static render({ statistics, id }) {
return super.renderSingleStat({ statistics, statisticName: 'view', id })
}
-}
+};
diff --git a/services/youtube/youtube-views.tester.js b/services/youtube/youtube-views.tester.js
index af7c036daff38..bd1ba2b1937b1 100644
--- a/services/youtube/youtube-views.tester.js
+++ b/services/youtube/youtube-views.tester.js
@@ -1,9 +1,10 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { noToken } = require('../test-helpers')
-const { isMetric } = require('../test-validators')
-const noYouTubeToken = noToken(require('./youtube-views.service'))
+const t = (function() {
+ export default __a;
+}())
+import {noToken} from '../test-helpers.js';
+import {isMetric} from '../test-validators.js';
+import _noYouTubeToken from './youtube-views.service';
+const noYouTubeToken = noToken(_noYouTubeToken);
t.create('video view count')
.skipWhen(noYouTubeToken)
From 819a676a92e3b5a553876dbd92dd3653b924721a Mon Sep 17 00:00:00 2001
From: PyvesB
diff --git a/services/david/david.service.js b/services/david/david.service.js index 22fa083f7fc14..6cc68524701f3 100644 --- a/services/david/david.service.js +++ b/services/david/david.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ status: Joi.allow( diff --git a/services/debian/debian.service.js b/services/debian/debian.service.js index aef7030cf05c9..cddfbf2ec93f5 100644 --- a/services/debian/debian.service.js +++ b/services/debian/debian.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {latest, renderVersionBadge} from '../version.js'; -import {BaseJsonService, NotFound, InvalidResponse} from '..'; +import {BaseJsonService, NotFound, InvalidResponse} from '../index.js'; const schema = Joi.array() .items( diff --git a/services/debug/debug.service.js b/services/debug/debug.service.js index 48d285a32bf06..04b0474ba1de5 100644 --- a/services/debug/debug.service.js +++ b/services/debug/debug.service.js @@ -1,4 +1,4 @@ -import {BaseService} from '..'; +import {BaseService} from '../index.js'; const serverStartTime = new Date(new Date().toGMTString()) let bitFlip = false diff --git a/services/dependabot/dependabot.service.js b/services/dependabot/dependabot.service.js index 02fc6263b9eff..00af1095ee393 100644 --- a/services/dependabot/dependabot.service.js +++ b/services/dependabot/dependabot.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ status: Joi.string().required(), diff --git a/services/depfu/depfu.service.js b/services/depfu/depfu.service.js index 378c900e0d89c..74b4d547d7de5 100644 --- a/services/depfu/depfu.service.js +++ b/services/depfu/depfu.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const depfuSchema = Joi.object({ text: Joi.string().required(), diff --git a/services/deprecation-helpers.js b/services/deprecation-helpers.js index 3a35dfeb6877b..bf048c9e6d4d5 100644 --- a/services/deprecation-helpers.js +++ b/services/deprecation-helpers.js @@ -1,4 +1,4 @@ -import {Deprecated} from '.'; +import {Deprecated} from './index.js'; function enforceDeprecation(effectiveDate) { if (Date.now() >= effectiveDate.getTime()) { diff --git a/services/discord/discord.service.js b/services/discord/discord.service.js index 46f54001a9805..bbff2c5ddfa9f 100644 --- a/services/discord/discord.service.js +++ b/services/discord/discord.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ presence_count: nonNegativeInteger, diff --git a/services/discourse/discourse-redirect.service.js b/services/discourse/discourse-redirect.service.js index 8ecf1434a9bcd..083c485d4132b 100644 --- a/services/discourse/discourse-redirect.service.js +++ b/services/discourse/discourse-redirect.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; export default [ redirector({ diff --git a/services/discourse/discourse.service.js b/services/discourse/discourse.service.js index d9244356bd223..b43e5c0a8f9de 100644 --- a/services/discourse/discourse.service.js +++ b/services/discourse/discourse.service.js @@ -2,7 +2,7 @@ import camelcase from 'camelcase'; import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {nonNegativeInteger, optionalUrl} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ topic_count: nonNegativeInteger, diff --git a/services/dockbit/dockbit.service.js b/services/dockbit/dockbit.service.js index 7dc0515cffc27..89eac1cd5d971 100644 --- a/services/dockbit/dockbit.service.js +++ b/services/dockbit/dockbit.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ category: 'build', diff --git a/services/docker/docker-automated.service.js b/services/docker/docker-automated.service.js index 60689900d79b4..5badd6c996f79 100644 --- a/services/docker/docker-automated.service.js +++ b/services/docker/docker-automated.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {dockerBlue, buildDockerUrl, getDockerHubUser} from './docker-helpers.js'; const automatedBuildSchema = Joi.object({ diff --git a/services/docker/docker-build.service.js b/services/docker/docker-build.service.js index 3eba72c8be260..cbb8be1c7faf7 100644 --- a/services/docker/docker-build.service.js +++ b/services/docker/docker-build.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ category: 'build', diff --git a/services/docker/docker-cloud-automated.service.js b/services/docker/docker-cloud-automated.service.js index 56d5a4ed37280..deafeb2cfeaa3 100644 --- a/services/docker/docker-cloud-automated.service.js +++ b/services/docker/docker-cloud-automated.service.js @@ -1,4 +1,4 @@ -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {dockerBlue, buildDockerUrl} from './docker-helpers.js'; import {fetchBuild} from './docker-cloud-common-fetch.js'; diff --git a/services/docker/docker-cloud-build.service.js b/services/docker/docker-cloud-build.service.js index 1456ecfe90596..6840cc5223333 100644 --- a/services/docker/docker-cloud-build.service.js +++ b/services/docker/docker-cloud-build.service.js @@ -1,4 +1,4 @@ -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {dockerBlue, buildDockerUrl} from './docker-helpers.js'; import {fetchBuild} from './docker-cloud-common-fetch.js'; diff --git a/services/docker/docker-helpers.js b/services/docker/docker-helpers.js index c147577dec642..be353c80c1bd5 100644 --- a/services/docker/docker-helpers.js +++ b/services/docker/docker-helpers.js @@ -1,5 +1,5 @@ const dockerBlue = '066da5' // see https://github.com/badges/shields/pull/1690 -import {NotFound} from '..'; +import {NotFound} from '../index.js'; function buildDockerUrl(badgeName, includeTagRoute) { if (includeTagRoute) { diff --git a/services/docker/docker-pulls.service.js b/services/docker/docker-pulls.service.js index fd10a1c2a0e66..12815e5425115 100644 --- a/services/docker/docker-pulls.service.js +++ b/services/docker/docker-pulls.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {dockerBlue, buildDockerUrl, getDockerHubUser} from './docker-helpers.js'; const pullsSchema = Joi.object({ diff --git a/services/docker/docker-size.service.js b/services/docker/docker-size.service.js index cdc3edb32908b..9907986fa0d24 100644 --- a/services/docker/docker-size.service.js +++ b/services/docker/docker-size.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import prettyBytes from 'pretty-bytes'; import {nonNegativeInteger} from '../validators.js'; import {latest} from '../version.js'; -import {BaseJsonService, NotFound} from '..'; +import {BaseJsonService, NotFound} from '../index.js'; import {buildDockerUrl, getDockerHubUser, getMultiPageData} from './docker-helpers.js'; const buildSchema = Joi.object({ diff --git a/services/docker/docker-stars.service.js b/services/docker/docker-stars.service.js index f8ef7955389d1..401cb2b3bf072 100644 --- a/services/docker/docker-stars.service.js +++ b/services/docker/docker-stars.service.js @@ -1,6 +1,6 @@ import {metric} from '../text-formatters.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseService} from '..'; +import {BaseService} from '../index.js'; import {dockerBlue, buildDockerUrl, getDockerHubUser} from './docker-helpers.js'; export default class DockerStars extends BaseService { diff --git a/services/docker/docker-version.service.js b/services/docker/docker-version.service.js index 64f60b231a4c3..2f2b69b8f1e57 100644 --- a/services/docker/docker-version.service.js +++ b/services/docker/docker-version.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {nonNegativeInteger} from '../validators.js'; import {latest, renderVersionBadge} from '../version.js'; -import {BaseJsonService, NotFound, InvalidResponse} from '..'; +import {BaseJsonService, NotFound, InvalidResponse} from '../index.js'; import {buildDockerUrl, getDockerHubUser, getMultiPageData, getDigestSemVerMatches} from './docker-helpers.js'; const buildSchema = Joi.object({ diff --git a/services/docker/docker-version.spec.js b/services/docker/docker-version.spec.js index 499e3c690a82a..a3e89da2ad2fd 100644 --- a/services/docker/docker-version.spec.js +++ b/services/docker/docker-version.spec.js @@ -1,6 +1,6 @@ import {expect} from 'chai'; import {test, given} from 'sazerac'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import DockerVersion from './docker-version.service.js'; import {versionDataNoTagDateSort, versionPagedDataNoTagDateSort, versionDataNoTagSemVerSort, versionDataWithTag, versionDataWithVaryingArchitectures} from './docker-fixtures.js'; diff --git a/services/docsrs/docsrs.service.js b/services/docsrs/docsrs.service.js index 5267fac1835a6..be8362e402b6c 100644 --- a/services/docsrs/docsrs.service.js +++ b/services/docsrs/docsrs.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.array() .items( diff --git a/services/dotnetstatus/dotnetstatus.service.js b/services/dotnetstatus/dotnetstatus.service.js index 11f1df47d27ec..87a5f3c12f9f7 100644 --- a/services/dotnetstatus/dotnetstatus.service.js +++ b/services/dotnetstatus/dotnetstatus.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ category: 'dependencies', diff --git a/services/drone/drone-build.service.js b/services/drone/drone-build.service.js index 5691ddab9ca96..678f71aa8e58d 100644 --- a/services/drone/drone-build.service.js +++ b/services/drone/drone-build.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js'; import {optionalUrl} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ status: Joi.alternatives() diff --git a/services/dub/dub-download.service.js b/services/dub/dub-download.service.js index 96e4c945880b8..b6da730864b2d 100644 --- a/services/dub/dub-download.service.js +++ b/services/dub/dub-download.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {downloadCount as downloadCountColor} from '../color-formatters.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ downloads: Joi.object({ diff --git a/services/dub/dub-license.service.js b/services/dub/dub-license.service.js index bf814e06f296b..47e34c1e845f2 100644 --- a/services/dub/dub-license.service.js +++ b/services/dub/dub-license.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderLicenseBadge} from '../licenses.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ info: Joi.object({ license: Joi.string().required() }).required(), diff --git a/services/dub/dub-version.service.js b/services/dub/dub-version.service.js index ab4788e3f99ac..2c1d80eb62b50 100644 --- a/services/dub/dub-version.service.js +++ b/services/dub/dub-version.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.string().required() diff --git a/services/dynamic-common.js b/services/dynamic-common.js index 42cccf081b50e..d8e97163614fc 100644 --- a/services/dynamic-common.js +++ b/services/dynamic-common.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import toArray from '../core/base-service/to-array.js'; import validate from '../core/base-service/validate.js'; -import {InvalidResponse} from '.'; +import {InvalidResponse} from './index.js'; const errorMessages = { 404: 'resource not found', diff --git a/services/dynamic/dynamic-json.service.js b/services/dynamic/dynamic-json.service.js index c4238751a2b17..631b7cb1821f0 100644 --- a/services/dynamic/dynamic-json.service.js +++ b/services/dynamic/dynamic-json.service.js @@ -1,5 +1,5 @@ import {MetricNames} from '../../core/base-service/metric-helper.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {createRoute} from './dynamic-helpers.js'; import jsonPath from './json-path.js'; diff --git a/services/dynamic/dynamic-xml.service.js b/services/dynamic/dynamic-xml.service.js index 66379708a5012..1990e0d594b44 100644 --- a/services/dynamic/dynamic-xml.service.js +++ b/services/dynamic/dynamic-xml.service.js @@ -2,7 +2,7 @@ import {DOMParser} from 'xmldom'; import xpath from 'xpath'; import {MetricNames} from '../../core/base-service/metric-helper.js'; import {renderDynamicBadge, errorMessages} from '../dynamic-common.js'; -import {BaseService, InvalidResponse, InvalidParameter} from '..'; +import {BaseService, InvalidResponse, InvalidParameter} from '../index.js'; import {createRoute} from './dynamic-helpers.js'; // This service extends BaseService because it uses a different XML parser diff --git a/services/dynamic/dynamic-xml.spec.js b/services/dynamic/dynamic-xml.spec.js index 61c767f3faa06..67d76e6993f9c 100644 --- a/services/dynamic/dynamic-xml.spec.js +++ b/services/dynamic/dynamic-xml.spec.js @@ -2,7 +2,7 @@ import {expect} from 'chai'; import sinon from 'sinon'; import xpath from 'xpath'; import {test, given} from 'sazerac'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import DynamicXml from './dynamic-xml.service.js'; const exampleXml = ` diff --git a/services/dynamic/dynamic-yaml.service.js b/services/dynamic/dynamic-yaml.service.js index 2e7ad757bf4d6..493064f5d5ab7 100644 --- a/services/dynamic/dynamic-yaml.service.js +++ b/services/dynamic/dynamic-yaml.service.js @@ -1,5 +1,5 @@ import {MetricNames} from '../../core/base-service/metric-helper.js'; -import {BaseYamlService} from '..'; +import {BaseYamlService} from '../index.js'; import {createRoute} from './dynamic-helpers.js'; import jsonPath from './json-path.js'; diff --git a/services/dynamic/json-path.js b/services/dynamic/json-path.js index 82fb867768367..6c0c5dd541b99 100644 --- a/services/dynamic/json-path.js +++ b/services/dynamic/json-path.js @@ -5,7 +5,7 @@ import Joi from 'joi'; import jp from 'jsonpath'; import {renderDynamicBadge, errorMessages} from '../dynamic-common.js'; -import {InvalidParameter, InvalidResponse} from '..'; +import {InvalidParameter, InvalidResponse} from '../index.js'; /** * Dynamic service class factory which wraps {@link module:core/base-service/base~BaseService} with support of {@link https://jsonpath.com/|JSONPath}. diff --git a/services/eclipse-marketplace/eclipse-marketplace-base.js b/services/eclipse-marketplace/eclipse-marketplace-base.js index 6d4158829694f..2ed8615434620 100644 --- a/services/eclipse-marketplace/eclipse-marketplace-base.js +++ b/services/eclipse-marketplace/eclipse-marketplace-base.js @@ -1,4 +1,4 @@ -import {BaseXmlService} from '..'; +import {BaseXmlService} from '../index.js'; export default class EclipseMarketplaceBase extends BaseXmlService { static buildRoute(base) { diff --git a/services/ecologi/ecologi-carbon.service.js b/services/ecologi/ecologi-carbon.service.js index 30b14e2edea47..103ebf5bcf7e3 100644 --- a/services/ecologi/ecologi-carbon.service.js +++ b/services/ecologi/ecologi-carbon.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {floorCount} from '../color-formatters.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const apiSchema = Joi.object({ total: Joi.number().positive().required(), diff --git a/services/ecologi/ecologi-trees.service.js b/services/ecologi/ecologi-trees.service.js index 4af82a1867fea..b0aff6d38d781 100644 --- a/services/ecologi/ecologi-trees.service.js +++ b/services/ecologi/ecologi-trees.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {floorCount} from '../color-formatters.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const apiSchema = Joi.object({ total: nonNegativeInteger, diff --git a/services/elm-package/elm-package.service.js b/services/elm-package/elm-package.service.js index 1fbdd6afbfc42..f2d3a32115942 100644 --- a/services/elm-package/elm-package.service.js +++ b/services/elm-package/elm-package.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; import {semver} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ version: semver }).required() diff --git a/services/endpoint-common.js b/services/endpoint-common.js index 2e21c9ecc6d9a..f193e9e146d1e 100644 --- a/services/endpoint-common.js +++ b/services/endpoint-common.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import validate from '../core/base-service/validate.js'; -import {InvalidResponse} from '.'; +import {InvalidResponse} from './index.js'; const optionalStringWhenNamedLogoPresent = Joi.alternatives().conditional( 'namedLogo', diff --git a/services/endpoint/endpoint-redirect.service.js b/services/endpoint/endpoint-redirect.service.js index 86787cd424e04..31790ebdd5897 100644 --- a/services/endpoint/endpoint-redirect.service.js +++ b/services/endpoint/endpoint-redirect.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; export default redirector({ category: 'other', diff --git a/services/endpoint/endpoint.service.js b/services/endpoint/endpoint.service.js index d395e9d3479b4..46d22cdf388f4 100644 --- a/services/endpoint/endpoint.service.js +++ b/services/endpoint/endpoint.service.js @@ -3,7 +3,7 @@ import Joi from 'joi'; import {errorMessages} from '../dynamic-common.js'; import {optionalUrl} from '../validators.js'; import {fetchEndpointData} from '../endpoint-common.js'; -import {BaseJsonService, InvalidParameter} from '..'; +import {BaseJsonService, InvalidParameter} from '../index.js'; const blockedDomains = ['github.com', 'shields.io'] diff --git a/services/f-droid/f-droid.service.js b/services/f-droid/f-droid.service.js index 9f25c8dba2f79..e3fb53c50e9cc 100644 --- a/services/f-droid/f-droid.service.js +++ b/services/f-droid/f-droid.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {optionalNonNegativeInteger, nonNegativeInteger} from '../validators.js'; import {addv} from '../text-formatters.js'; import {version as versionColor} from '../color-formatters.js'; -import {BaseJsonService, NotFound} from '..'; +import {BaseJsonService, NotFound} from '../index.js'; const schema = Joi.object({ packageName: Joi.string().required(), diff --git a/services/fedora/fedora.service.js b/services/fedora/fedora.service.js index 2bf514e72b21b..0a5cb92f4f9fe 100644 --- a/services/fedora/fedora.service.js +++ b/services/fedora/fedora.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ version: Joi.string().required(), diff --git a/services/feedz/feedz.service.js b/services/feedz/feedz.service.js index 81a920e060041..9c6cd825485cf 100644 --- a/services/feedz/feedz.service.js +++ b/services/feedz/feedz.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService, NotFound} from '..'; +import {BaseJsonService, NotFound} from '../index.js'; import {renderVersionBadge, searchServiceUrl, stripBuildMetadata, selectVersion} from '../nuget/nuget-helpers.js'; const schema = Joi.object({ diff --git a/services/flathub/flathub.service.js b/services/flathub/flathub.service.js index 5416e950fb600..c83b61c866b28 100644 --- a/services/flathub/flathub.service.js +++ b/services/flathub/flathub.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ currentReleaseVersion: Joi.string().required(), diff --git a/services/gem/gem-downloads.service.js b/services/gem/gem-downloads.service.js index c67c77b86becb..d9c47df78fce0 100644 --- a/services/gem/gem-downloads.service.js +++ b/services/gem/gem-downloads.service.js @@ -4,7 +4,7 @@ import {downloadCount} from '../color-formatters.js'; import {metric} from '../text-formatters.js'; import {latest as latestVersion} from '../version.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService, InvalidParameter, InvalidResponse} from '..'; +import {BaseJsonService, InvalidParameter, InvalidResponse} from '../index.js'; const keywords = ['ruby'] diff --git a/services/gem/gem-owner.service.js b/services/gem/gem-owner.service.js index 60e013ccd0353..2ff80c6e2ed19 100644 --- a/services/gem/gem-owner.service.js +++ b/services/gem/gem-owner.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {floorCount as floorCountColor} from '../color-formatters.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const ownerSchema = Joi.array().required() diff --git a/services/gem/gem-rank.service.js b/services/gem/gem-rank.service.js index 85349e68f8e3c..51c76e2121bfd 100644 --- a/services/gem/gem-rank.service.js +++ b/services/gem/gem-rank.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {floorCount} from '../color-formatters.js'; import {ordinalNumber} from '../text-formatters.js'; -import {BaseJsonService, InvalidResponse} from '..'; +import {BaseJsonService, InvalidResponse} from '../index.js'; const keywords = ['ruby'] diff --git a/services/gem/gem-version.service.js b/services/gem/gem-version.service.js index d4589f542cb18..9dea28e1922d8 100644 --- a/services/gem/gem-version.service.js +++ b/services/gem/gem-version.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge, latest} from '../version.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ // In most cases `version` will be a SemVer but the registry doesn't diff --git a/services/gemnasium/gemnasium.service.js b/services/gemnasium/gemnasium.service.js index e714b7defec3c..d533d55a32408 100644 --- a/services/gemnasium/gemnasium.service.js +++ b/services/gemnasium/gemnasium.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ category: 'dependencies', diff --git a/services/gerrit/gerrit.service.js b/services/gerrit/gerrit.service.js index 542e3a5bd8c10..74ffeb8687171 100644 --- a/services/gerrit/gerrit.service.js +++ b/services/gerrit/gerrit.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {optionalUrl} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const queryParamSchema = Joi.object({ baseUrl: optionalUrl.required(), diff --git a/services/github/github-auth-service.js b/services/github/github-auth-service.js index aebb6905a7fbb..b60f88fb1ab73 100644 --- a/services/github/github-auth-service.js +++ b/services/github/github-auth-service.js @@ -1,6 +1,6 @@ import gql from 'graphql-tag'; import {mergeQueries} from '../../core/base-service/graphql.js'; -import {BaseGraphqlService, BaseJsonService} from '..'; +import {BaseGraphqlService, BaseJsonService} from '../index.js'; function createRequestFetcher(context, config) { const { sendAndCacheRequestWithCallbacks, githubApiProvider } = context diff --git a/services/github/github-commit-status.service.js b/services/github/github-commit-status.service.js index 6d3211fa858ba..9776142bed367 100644 --- a/services/github/github-commit-status.service.js +++ b/services/github/github-commit-status.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {NotFound, InvalidParameter} from '..'; +import {NotFound, InvalidParameter} from '../index.js'; import {GithubAuthV3Service} from './github-auth-service.js'; import {documentation, errorMessagesFor} from './github-helpers.js'; diff --git a/services/github/github-common-fetch.js b/services/github/github-common-fetch.js index b3e5a9769aadd..6c753bc6c21f1 100644 --- a/services/github/github-common-fetch.js +++ b/services/github/github-common-fetch.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import {errorMessagesFor} from './github-helpers.js'; const issueSchema = Joi.object({ diff --git a/services/github/github-common-release.js b/services/github/github-common-release.js index 081ae343013f0..ef9069a1c1b1d 100644 --- a/services/github/github-common-release.js +++ b/services/github/github-common-release.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {nonNegativeInteger} from '../validators.js'; import {latest} from '../version.js'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import {errorMessagesFor} from './github-helpers.js'; const releaseInfoSchema = Joi.object({ @@ -97,5 +97,5 @@ async function fetchLatestRelease( export { fetchLatestRelease, queryParamSchema, - _getLatestRelease: getLatestRelease, // currently only used for tests }; +export const _getLatestRelease = getLatestRelease // currently only used for tests diff --git a/services/github/github-deployments.service.js b/services/github/github-deployments.service.js index df300b0f4c13b..a339216d4b9c5 100644 --- a/services/github/github-deployments.service.js +++ b/services/github/github-deployments.service.js @@ -1,6 +1,6 @@ import gql from 'graphql-tag'; import Joi from 'joi'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import {GithubAuthV4Service} from './github-auth-service.js'; import {documentation, transformErrors} from './github-helpers.js'; diff --git a/services/github/github-directory-file-count.service.js b/services/github/github-directory-file-count.service.js index 57b64275097c0..4d7b4fe351594 100644 --- a/services/github/github-directory-file-count.service.js +++ b/services/github/github-directory-file-count.service.js @@ -1,7 +1,7 @@ import path from 'path'; import Joi from 'joi'; import {metric} from '../text-formatters.js'; -import {InvalidParameter} from '..'; +import {InvalidParameter} from '../index.js'; import {ConditionalGithubAuthV3Service} from './github-auth-service.js'; import {documentation as commonDocumentation, errorMessagesFor} from './github-helpers.js'; diff --git a/services/github/github-directory-file-count.spec.js b/services/github/github-directory-file-count.spec.js index eefdd14c9fe18..fadf9f4a5640b 100644 --- a/services/github/github-directory-file-count.spec.js +++ b/services/github/github-directory-file-count.spec.js @@ -1,6 +1,6 @@ import {expect} from 'chai'; import {test, given} from 'sazerac'; -import {InvalidParameter} from '..'; +import {InvalidParameter} from '../index.js'; import GithubDirectoryFileCount from './github-directory-file-count.service.js'; describe('GithubDirectoryFileCount', function () { diff --git a/services/github/github-downloads.service.js b/services/github/github-downloads.service.js index 6ce9be6c751c2..7c60a77279aeb 100644 --- a/services/github/github-downloads.service.js +++ b/services/github/github-downloads.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {nonNegativeInteger} from '../validators.js'; import {downloadCount as downloadCountColor} from '../color-formatters.js'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import {GithubAuthV3Service} from './github-auth-service.js'; import {fetchLatestRelease} from './github-common-release.js'; import {documentation, errorMessagesFor} from './github-helpers.js'; diff --git a/services/github/github-go-mod.service.js b/services/github/github-go-mod.service.js index 2dc1e131dd80d..1e006c46d09ab 100644 --- a/services/github/github-go-mod.service.js +++ b/services/github/github-go-mod.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import {ConditionalGithubAuthV3Service} from './github-auth-service.js'; import {fetchRepoContent} from './github-common-fetch.js'; import {documentation} from './github-helpers.js'; diff --git a/services/github/github-helpers.js b/services/github/github-helpers.js index ca6e8a18adc19..261157752ffa2 100644 --- a/services/github/github-helpers.js +++ b/services/github/github-helpers.js @@ -1,5 +1,5 @@ import {colorScale} from '../color-formatters.js'; -import {InvalidResponse, NotFound} from '..'; +import {InvalidResponse, NotFound} from '../index.js'; const documentation = `
diff --git a/services/github/github-issue-detail-redirect.service.js b/services/github/github-issue-detail-redirect.service.js index 76d2a695c2fdc..b95d3da95dc33 100644 --- a/services/github/github-issue-detail-redirect.service.js +++ b/services/github/github-issue-detail-redirect.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; const variantMap = { s: 'state', diff --git a/services/github/github-issue-detail.service.js b/services/github/github-issue-detail.service.js index 20a5e4ed6e706..5d2c7fa0d0f33 100644 --- a/services/github/github-issue-detail.service.js +++ b/services/github/github-issue-detail.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {nonNegativeInteger} from '../validators.js'; import {formatDate, metric} from '../text-formatters.js'; import {age} from '../color-formatters.js'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import {GithubAuthV3Service} from './github-auth-service.js'; import {documentation, errorMessagesFor, stateColor, commentsColor} from './github-helpers.js'; diff --git a/services/github/github-issue-detail.spec.js b/services/github/github-issue-detail.spec.js index bf1e9f31b4670..649cc17ad7e28 100644 --- a/services/github/github-issue-detail.spec.js +++ b/services/github/github-issue-detail.spec.js @@ -2,7 +2,7 @@ import {expect} from 'chai'; import {test, given} from 'sazerac'; import {age} from '../color-formatters.js'; import {formatDate, metric} from '../text-formatters.js'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import GithubIssueDetail from './github-issue-detail.service.js'; import {stateColor, commentsColor} from './github-helpers.js'; diff --git a/services/github/github-pipenv.service.js b/services/github/github-pipenv.service.js index daee298794125..8d5b1230e20b6 100644 --- a/services/github/github-pipenv.service.js +++ b/services/github/github-pipenv.service.js @@ -1,7 +1,7 @@ import {renderVersionBadge} from '../version.js'; import {isLockfile, getDependencyVersion} from '../pipenv-helpers.js'; import {addv} from '../text-formatters.js'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import {ConditionalGithubAuthV3Service} from './github-auth-service.js'; import {fetchJsonFromRepo} from './github-common-fetch.js'; import {documentation as githubDocumentation} from './github-helpers.js'; diff --git a/services/github/github-r-package.service.js b/services/github/github-r-package.service.js index f638e7174477b..b6896024c1e19 100644 --- a/services/github/github-r-package.service.js +++ b/services/github/github-r-package.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import {ConditionalGithubAuthV3Service} from './github-auth-service.js'; import {fetchRepoContent} from './github-common-fetch.js'; import {documentation} from './github-helpers.js'; diff --git a/services/github/github-r-package.spec.js b/services/github/github-r-package.spec.js index 67d39fd3a79c5..23fd48e57c0d0 100644 --- a/services/github/github-r-package.spec.js +++ b/services/github/github-r-package.spec.js @@ -1,6 +1,6 @@ import {expect} from 'chai'; import {test, given} from 'sazerac'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import GithubRPackageVersion from './github-r-package.service.js'; describe('GithubRPackageVersion', function () { diff --git a/services/github/github-release.service.js b/services/github/github-release.service.js index 4ee1ecb56f988..a2a83afc69b98 100644 --- a/services/github/github-release.service.js +++ b/services/github/github-release.service.js @@ -1,6 +1,6 @@ import {addv} from '../text-formatters.js'; import {version as versionColor} from '../color-formatters.js'; -import {redirector} from '..'; +import {redirector} from '../index.js'; import {GithubAuthV3Service} from './github-auth-service.js'; import {fetchLatestRelease, queryParamSchema} from './github-common-release.js'; import {documentation} from './github-helpers.js'; @@ -119,5 +119,5 @@ const redirects = { export { GithubRelease, - ...redirects, + redirects, }; diff --git a/services/github/github-size.service.js b/services/github/github-size.service.js index 9eeb1603690dc..ca31c7bafc4b8 100644 --- a/services/github/github-size.service.js +++ b/services/github/github-size.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import prettyBytes from 'pretty-bytes'; import {nonNegativeInteger} from '../validators.js'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import {GithubAuthV3Service} from './github-auth-service.js'; import {documentation, errorMessagesFor} from './github-helpers.js'; diff --git a/services/github/github-sponsors.service.js b/services/github/github-sponsors.service.js index b8512918cdf8c..2992e63f9a6fb 100644 --- a/services/github/github-sponsors.service.js +++ b/services/github/github-sponsors.service.js @@ -2,7 +2,7 @@ import gql from 'graphql-tag'; import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {nonNegativeInteger} from '../validators.js'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import {GithubAuthV4Service} from './github-auth-service.js'; import {documentation, transformErrors} from './github-helpers.js'; diff --git a/services/github/github-tag.service.js b/services/github/github-tag.service.js index 9eaa535fcbb97..6bccae7e15cc3 100644 --- a/services/github/github-tag.service.js +++ b/services/github/github-tag.service.js @@ -3,7 +3,7 @@ import Joi from 'joi'; import {addv} from '../text-formatters.js'; import {version as versionColor} from '../color-formatters.js'; import {latest} from '../version.js'; -import {NotFound, redirector} from '..'; +import {NotFound, redirector} from '../index.js'; import {GithubAuthV4Service} from './github-auth-service.js'; import {queryParamSchema} from './github-common-release.js'; import {documentation, transformErrors} from './github-helpers.js'; @@ -163,5 +163,5 @@ const redirects = { export { GithubTag, - ...redirects, + redirects, }; diff --git a/services/github/github-workflow-status.service.js b/services/github/github-workflow-status.service.js index 85aa3b27f9d9b..122228371a3a7 100644 --- a/services/github/github-workflow-status.service.js +++ b/services/github/github-workflow-status.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js'; -import {BaseSvgScrapingService} from '..'; +import {BaseSvgScrapingService} from '../index.js'; import {documentation} from './github-helpers.js'; const schema = Joi.object({ diff --git a/services/gitlab/gitlab-coverage.service.js b/services/gitlab/gitlab-coverage.service.js index f35d42583b569..6035f9a285e64 100644 --- a/services/gitlab/gitlab-coverage.service.js +++ b/services/gitlab/gitlab-coverage.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {coveragePercentage} from '../color-formatters.js'; import {optionalUrl} from '../validators.js'; -import {BaseSvgScrapingService, NotFound} from '..'; +import {BaseSvgScrapingService, NotFound} from '../index.js'; const schema = Joi.object({ message: Joi.string() diff --git a/services/gitlab/gitlab-pipeline-status.service.js b/services/gitlab/gitlab-pipeline-status.service.js index 3e47d1159eaea..379246124500e 100644 --- a/services/gitlab/gitlab-pipeline-status.service.js +++ b/services/gitlab/gitlab-pipeline-status.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js'; import {optionalUrl} from '../validators.js'; -import {BaseSvgScrapingService, NotFound, redirector} from '..'; +import {BaseSvgScrapingService, NotFound, redirector} from '../index.js'; const badgeSchema = Joi.object({ message: Joi.alternatives() diff --git a/services/gitter/gitter.service.js b/services/gitter/gitter.service.js index f8ade3ae9872c..bd1ae135c50d9 100644 --- a/services/gitter/gitter.service.js +++ b/services/gitter/gitter.service.js @@ -1,4 +1,4 @@ -import {BaseStaticService} from '..'; +import {BaseStaticService} from '../index.js'; export default class Gitter extends BaseStaticService { static category = 'chat' diff --git a/services/gratipay/gratipay.service.js b/services/gratipay/gratipay.service.js index 5038e1152a01f..b93af93369bc3 100644 --- a/services/gratipay/gratipay.service.js +++ b/services/gratipay/gratipay.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; const commonAttrs = { category: 'funding', diff --git a/services/hackage/hackage-deps.service.js b/services/hackage/hackage-deps.service.js index bffa5d48d2aae..e9648802d14c0 100644 --- a/services/hackage/hackage-deps.service.js +++ b/services/hackage/hackage-deps.service.js @@ -1,4 +1,4 @@ -import {BaseService} from '..'; +import {BaseService} from '../index.js'; export default class HackageDeps extends BaseService { static category = 'dependencies' diff --git a/services/hackage/hackage-version.service.js b/services/hackage/hackage-version.service.js index 93d5cf6b3873f..6d0d50ffa26a0 100644 --- a/services/hackage/hackage-version.service.js +++ b/services/hackage/hackage-version.service.js @@ -1,5 +1,5 @@ import {renderVersionBadge} from '../version.js'; -import {BaseService, InvalidResponse} from '..'; +import {BaseService, InvalidResponse} from '../index.js'; export default class HackageVersion extends BaseService { static category = 'version' diff --git a/services/hexpm/hexpm.service.js b/services/hexpm/hexpm.service.js index e7388697a3f82..d3de6048a6f05 100644 --- a/services/hexpm/hexpm.service.js +++ b/services/hexpm/hexpm.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {metric, addv, maybePluralize} from '../text-formatters.js'; import {downloadCount, version as versionColor} from '../color-formatters.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const hexSchema = Joi.object({ downloads: Joi.object({ diff --git a/services/homebrew/homebrew-cask.service.js b/services/homebrew/homebrew-cask.service.js index 2d80a62d786c1..75d50563c1eb3 100644 --- a/services/homebrew/homebrew-cask.service.js +++ b/services/homebrew/homebrew-cask.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ version: Joi.string().required(), diff --git a/services/homebrew/homebrew-downloads.service.js b/services/homebrew/homebrew-downloads.service.js index 31a19c61595f9..430c2e4de8539 100644 --- a/services/homebrew/homebrew-downloads.service.js +++ b/services/homebrew/homebrew-downloads.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {downloadCount} from '../color-formatters.js'; import {metric} from '../text-formatters.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {nonNegativeInteger} from '../validators.js'; function getSchema({ formula }) { diff --git a/services/homebrew/homebrew-version.service.js b/services/homebrew/homebrew-version.service.js index 93997041bd178..1241f876f7d81 100644 --- a/services/homebrew/homebrew-version.service.js +++ b/services/homebrew/homebrew-version.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ versions: Joi.object({ diff --git a/services/hsts/hsts.service.js b/services/hsts/hsts.service.js index 2bf7c00229855..9f7682c87bee1 100644 --- a/services/hsts/hsts.service.js +++ b/services/hsts/hsts.service.js @@ -1,6 +1,6 @@ const label = 'hsts preloaded' import Joi from 'joi'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ status: Joi.string().required(), }).required() diff --git a/services/imagelayers/imagelayers.service.js b/services/imagelayers/imagelayers.service.js index b5a771d4a84da..cf58467a44647 100644 --- a/services/imagelayers/imagelayers.service.js +++ b/services/imagelayers/imagelayers.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ category: 'size', diff --git a/services/index.js b/services/index.js index ba46d3891c03f..941f68457d777 100644 --- a/services/index.js +++ b/services/index.js @@ -1,5 +1 @@ -import base from '../core/base-service.js'; - -export { - ...base, -}; +export * from '../core/base-service/index.js'; diff --git a/services/issuestats/issuestats.service.js b/services/issuestats/issuestats.service.js index c2261ee361a1c..2035ae7b417b3 100644 --- a/services/issuestats/issuestats.service.js +++ b/services/issuestats/issuestats.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ category: 'issue-tracking', diff --git a/services/itunes/itunes.service.js b/services/itunes/itunes.service.js index 7fa9cb63b4c13..adb272b33c520 100644 --- a/services/itunes/itunes.service.js +++ b/services/itunes/itunes.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService, NotFound} from '..'; +import {BaseJsonService, NotFound} from '../index.js'; const schema = Joi.object({ resultCount: nonNegativeInteger, diff --git a/services/jenkins/jenkins-base.js b/services/jenkins/jenkins-base.js index 62c3ada6044d7..8af64f294c5ed 100644 --- a/services/jenkins/jenkins-base.js +++ b/services/jenkins/jenkins-base.js @@ -1,4 +1,4 @@ -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; export default class JenkinsBase extends BaseJsonService { static auth = { diff --git a/services/jenkins/jenkins-build-redirect.service.js b/services/jenkins/jenkins-build-redirect.service.js index 3d7f2dcb4c145..2a556521393ec 100644 --- a/services/jenkins/jenkins-build-redirect.service.js +++ b/services/jenkins/jenkins-build-redirect.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; import {buildRedirectUrl} from './jenkins-common.js'; const commonProps = { diff --git a/services/jenkins/jenkins-common.js b/services/jenkins/jenkins-common.js index e2aee8d3ea81f..7de91605dcce2 100644 --- a/services/jenkins/jenkins-common.js +++ b/services/jenkins/jenkins-common.js @@ -21,7 +21,7 @@ const buildUrl = ({ jobUrl, lastCompletedBuild = true, plugin }) => { export { queryParamSchema, - buildTreeParamQueryString: tree => ({ tree }), buildUrl, buildRedirectUrl, }; +export const buildTreeParamQueryString = tree => ({ tree }) diff --git a/services/jenkins/jenkins-coverage-redirector.service.js b/services/jenkins/jenkins-coverage-redirector.service.js index e756813345793..b40ac65f5540e 100644 --- a/services/jenkins/jenkins-coverage-redirector.service.js +++ b/services/jenkins/jenkins-coverage-redirector.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; import {buildRedirectUrl} from './jenkins-common.js'; const commonProps = { diff --git a/services/jenkins/jenkins-plugin-installs.service.js b/services/jenkins/jenkins-plugin-installs.service.js index e39c8808ead5c..bc9dc98378633 100644 --- a/services/jenkins/jenkins-plugin-installs.service.js +++ b/services/jenkins/jenkins-plugin-installs.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {downloadCount as downloadCountColor} from '../color-formatters.js'; import {metric} from '../text-formatters.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService, NotFound} from '..'; +import {BaseJsonService, NotFound} from '../index.js'; const schemaInstallations = Joi.object() .keys({ diff --git a/services/jenkins/jenkins-plugin-version.service.js b/services/jenkins/jenkins-plugin-version.service.js index 8f876b4bdf464..89e4dd47e10be 100644 --- a/services/jenkins/jenkins-plugin-version.service.js +++ b/services/jenkins/jenkins-plugin-version.service.js @@ -1,7 +1,7 @@ import {promisify} from 'util'; import {regularUpdate} from '../../core/legacy/regular-update.js'; import {renderVersionBadge} from '../version.js'; -import {BaseService, NotFound} from '..'; +import {BaseService, NotFound} from '../index.js'; export default class JenkinsPluginVersion extends BaseService { static category = 'version' diff --git a/services/jenkins/jenkins-tests-redirector.service.js b/services/jenkins/jenkins-tests-redirector.service.js index fdb0c7c6663f3..9368513db9246 100644 --- a/services/jenkins/jenkins-tests-redirector.service.js +++ b/services/jenkins/jenkins-tests-redirector.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; import {buildRedirectUrl} from './jenkins-common.js'; const commonProps = { diff --git a/services/jenkins/jenkins-tests.service.js b/services/jenkins/jenkins-tests.service.js index 724f3911023f7..5a1e64a0cfb42 100644 --- a/services/jenkins/jenkins-tests.service.js +++ b/services/jenkins/jenkins-tests.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {documentation, testResultQueryParamSchema, renderTestResultBadge} from '../test-results.js'; import {optionalNonNegativeInteger} from '../validators.js'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import JenkinsBase from './jenkins-base.js'; import {buildTreeParamQueryString, buildUrl, queryParamSchema} from './jenkins-common.js'; diff --git a/services/jetbrains/jetbrains-base.js b/services/jetbrains/jetbrains-base.js index 04fc0a7a7d1b7..af6ed9ab1776c 100644 --- a/services/jetbrains/jetbrains-base.js +++ b/services/jetbrains/jetbrains-base.js @@ -1,4 +1,4 @@ -import {BaseXmlService, NotFound} from '..'; +import {BaseXmlService, NotFound} from '../index.js'; import {parseJson} from '../../core/base-service/json.js'; /* diff --git a/services/jira/jira-issue-redirect.service.js b/services/jira/jira-issue-redirect.service.js index 69d3307d7677f..e6d42b3fda771 100644 --- a/services/jira/jira-issue-redirect.service.js +++ b/services/jira/jira-issue-redirect.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; export default [ redirector({ diff --git a/services/jira/jira-issue.service.js b/services/jira/jira-issue.service.js index 7baa6e4a5c9f8..da78639fccb52 100644 --- a/services/jira/jira-issue.service.js +++ b/services/jira/jira-issue.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {optionalUrl} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {authConfig} from './jira-common.js'; const queryParamSchema = Joi.object({ diff --git a/services/jira/jira-sprint-redirect.service.js b/services/jira/jira-sprint-redirect.service.js index 58b5e6a566563..32ff4da3e20c9 100644 --- a/services/jira/jira-sprint-redirect.service.js +++ b/services/jira/jira-sprint-redirect.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; export default [ redirector({ diff --git a/services/jira/jira-sprint.service.js b/services/jira/jira-sprint.service.js index 6ad618b50fcde..9582e0c79eea3 100644 --- a/services/jira/jira-sprint.service.js +++ b/services/jira/jira-sprint.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {optionalUrl} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {authConfig} from './jira-common.js'; const queryParamSchema = Joi.object({ diff --git a/services/jitpack/jitpack-downloads.service.js b/services/jitpack/jitpack-downloads.service.js index 099095e1f6613..fd78726eace48 100644 --- a/services/jitpack/jitpack-downloads.service.js +++ b/services/jitpack/jitpack-downloads.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ route: { diff --git a/services/jitpack/jitpack-version-redirector.service.js b/services/jitpack/jitpack-version-redirector.service.js index aaf95efe83588..ad5ec714c9ac5 100644 --- a/services/jitpack/jitpack-version-redirector.service.js +++ b/services/jitpack/jitpack-version-redirector.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; export default [ redirector({ diff --git a/services/jitpack/jitpack-version.service.js b/services/jitpack/jitpack-version.service.js index 92df88ce8aa45..d463e8028cf05 100644 --- a/services/jitpack/jitpack-version.service.js +++ b/services/jitpack/jitpack-version.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ version: Joi.string().required(), diff --git a/services/jsdelivr/jsdelivr-base.js b/services/jsdelivr/jsdelivr-base.js index 0dc2d66003457..04a2145e3343d 100644 --- a/services/jsdelivr/jsdelivr-base.js +++ b/services/jsdelivr/jsdelivr-base.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {downloadCount} from '../color-formatters.js'; import {metric} from '../text-formatters.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ total: Joi.number().required(), diff --git a/services/keybase/keybase-profile.js b/services/keybase/keybase-profile.js index 5c268b985c4f9..45fa744c897df 100644 --- a/services/keybase/keybase-profile.js +++ b/services/keybase/keybase-profile.js @@ -1,4 +1,4 @@ -import {BaseJsonService, NotFound} from '..'; +import {BaseJsonService, NotFound} from '../index.js'; export default class KeybaseProfile extends BaseJsonService { static get apiVersion() { diff --git a/services/leanpub/leanpub-book-summary.service.js b/services/leanpub/leanpub-book-summary.service.js index 15a38b71db232..44cb3a36b0716 100644 --- a/services/leanpub/leanpub-book-summary.service.js +++ b/services/leanpub/leanpub-book-summary.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ route: { diff --git a/services/lgtm/lgtm-base.js b/services/lgtm/lgtm-base.js index e867f80ce5c6a..a32e47f6cb6e7 100644 --- a/services/lgtm/lgtm-base.js +++ b/services/lgtm/lgtm-base.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ alerts: Joi.number().required(), diff --git a/services/lgtm/lgtm-redirector.service.js b/services/lgtm/lgtm-redirector.service.js index 2c019f5cd4825..a94679fbe016d 100644 --- a/services/lgtm/lgtm-redirector.service.js +++ b/services/lgtm/lgtm-redirector.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; const commonAttrs = { category: 'analysis', diff --git a/services/liberapay/liberapay-base.js b/services/liberapay/liberapay-base.js index 59e7204f87560..ed1fd232465d2 100644 --- a/services/liberapay/liberapay-base.js +++ b/services/liberapay/liberapay-base.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {colorScale} from '../color-formatters.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ npatrons: nonNegativeInteger, diff --git a/services/liberapay/liberapay-gives.service.js b/services/liberapay/liberapay-gives.service.js index 879d7ee57530a..42992ef5f2ffe 100644 --- a/services/liberapay/liberapay-gives.service.js +++ b/services/liberapay/liberapay-gives.service.js @@ -1,4 +1,4 @@ -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import {renderCurrencyBadge, LiberapayBase} from './liberapay-base.js'; export default class LiberapayGives extends LiberapayBase { diff --git a/services/liberapay/liberapay-goal.service.js b/services/liberapay/liberapay-goal.service.js index 4bf9727e3fbbd..c1053e60f4d93 100644 --- a/services/liberapay/liberapay-goal.service.js +++ b/services/liberapay/liberapay-goal.service.js @@ -1,5 +1,5 @@ import {colorScale} from '../color-formatters.js'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import {LiberapayBase} from './liberapay-base.js'; export default class LiberapayGoal extends LiberapayBase { diff --git a/services/liberapay/liberapay-goal.spec.js b/services/liberapay/liberapay-goal.spec.js index 0e22317df1e8b..096e9d4137a29 100644 --- a/services/liberapay/liberapay-goal.spec.js +++ b/services/liberapay/liberapay-goal.spec.js @@ -1,6 +1,6 @@ import {expect} from 'chai'; import {test, given} from 'sazerac'; -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import LiberapayGoal from './liberapay-goal.service.js'; describe('LiberapayGoal', function () { diff --git a/services/liberapay/liberapay-receives.service.js b/services/liberapay/liberapay-receives.service.js index c6953de1ecdee..1007da63ce9ec 100644 --- a/services/liberapay/liberapay-receives.service.js +++ b/services/liberapay/liberapay-receives.service.js @@ -1,4 +1,4 @@ -import {InvalidResponse} from '..'; +import {InvalidResponse} from '../index.js'; import {renderCurrencyBadge, LiberapayBase} from './liberapay-base.js'; export default class LiberapayReceives extends LiberapayBase { diff --git a/services/librariesio/librariesio-dependencies.service.js b/services/librariesio/librariesio-dependencies.service.js index c91e02020b06e..3aed6a5ea8981 100644 --- a/services/librariesio/librariesio-dependencies.service.js +++ b/services/librariesio/librariesio-dependencies.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {transform, renderDependenciesBadge} from './librariesio-dependencies-helpers.js'; const schema = Joi.object({ diff --git a/services/librariesio/librariesio-dependent-repos.service.js b/services/librariesio/librariesio-dependent-repos.service.js index e5e727e989453..ef5e819835847 100644 --- a/services/librariesio/librariesio-dependent-repos.service.js +++ b/services/librariesio/librariesio-dependent-repos.service.js @@ -1,5 +1,5 @@ import {metric} from '../text-formatters.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {fetchProject} from './librariesio-common.js'; // https://libraries.io/api#project-dependent-repositories diff --git a/services/librariesio/librariesio-dependents.service.js b/services/librariesio/librariesio-dependents.service.js index 772903a459c45..6442486d4185a 100644 --- a/services/librariesio/librariesio-dependents.service.js +++ b/services/librariesio/librariesio-dependents.service.js @@ -1,5 +1,5 @@ import {metric} from '../text-formatters.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {fetchProject} from './librariesio-common.js'; // https://libraries.io/api#project-dependents diff --git a/services/librariesio/librariesio-sourcerank.service.js b/services/librariesio/librariesio-sourcerank.service.js index 48b0c1b326e0c..451c244f0de41 100644 --- a/services/librariesio/librariesio-sourcerank.service.js +++ b/services/librariesio/librariesio-sourcerank.service.js @@ -1,5 +1,5 @@ import {colorScale} from '../color-formatters.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; import {fetchProject} from './librariesio-common.js'; const sourceRankColor = colorScale([10, 15, 20, 25, 30]) diff --git a/services/libscore/libscore.service.js b/services/libscore/libscore.service.js index 4febb62f60217..7b73f8ef3c5a1 100644 --- a/services/libscore/libscore.service.js +++ b/services/libscore/libscore.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ category: 'rating', diff --git a/services/localizely/localizely.service.js b/services/localizely/localizely.service.js index 46e5b82677fed..833ced776b78d 100644 --- a/services/localizely/localizely.service.js +++ b/services/localizely/localizely.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService, InvalidResponse} from '..'; +import {BaseJsonService, InvalidResponse} from '../index.js'; import {coveragePercentage} from '../color-formatters.js'; const keywords = [ diff --git a/services/luarocks/luarocks.service.js b/services/luarocks/luarocks.service.js index 2e8261935bc22..7bc6cef6083b7 100644 --- a/services/luarocks/luarocks.service.js +++ b/services/luarocks/luarocks.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {addv} from '../text-formatters.js'; -import {BaseJsonService, NotFound} from '..'; +import {BaseJsonService, NotFound} from '../index.js'; import {latestVersion} from './luarocks-version-helpers.js'; const schema = Joi.object({ diff --git a/services/magnumci/magnumci.service.js b/services/magnumci/magnumci.service.js index 51b31717f046b..fffa239e6a0cc 100644 --- a/services/magnumci/magnumci.service.js +++ b/services/magnumci/magnumci.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ category: 'build', diff --git a/services/maintenance/maintenance.service.js b/services/maintenance/maintenance.service.js index c12cb4e025c87..ed2cfc4b7f4a3 100644 --- a/services/maintenance/maintenance.service.js +++ b/services/maintenance/maintenance.service.js @@ -1,4 +1,4 @@ -import {BaseService} from '..'; +import {BaseService} from '../index.js'; export default class Maintenance extends BaseService { static category = 'other' diff --git a/services/mastodon/mastodon-follow.service.js b/services/mastodon/mastodon-follow.service.js index 707f82498bf2e..9047617d110d6 100644 --- a/services/mastodon/mastodon-follow.service.js +++ b/services/mastodon/mastodon-follow.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {optionalUrl, nonNegativeInteger} from '../validators.js'; -import {BaseJsonService, NotFound} from '..'; +import {BaseJsonService, NotFound} from '../index.js'; const schema = Joi.object({ username: Joi.string().required(), diff --git a/services/matrix/matrix.service.js b/services/matrix/matrix.service.js index 314eb6b6b8789..46442844949b1 100644 --- a/services/matrix/matrix.service.js +++ b/services/matrix/matrix.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService, InvalidParameter} from '..'; +import {BaseJsonService, InvalidParameter} from '../index.js'; const queryParamSchema = Joi.object({ server_fqdn: Joi.string().hostname(), diff --git a/services/maven-central/maven-central.service.js b/services/maven-central/maven-central.service.js index 9bbd322250668..2cb47457c6dd2 100644 --- a/services/maven-central/maven-central.service.js +++ b/services/maven-central/maven-central.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; -import {BaseXmlService, NotFound} from '..'; +import {BaseXmlService, NotFound} from '../index.js'; const schema = Joi.object({ metadata: Joi.object({ diff --git a/services/maven-metadata/maven-metadata-redirect.service.js b/services/maven-metadata/maven-metadata-redirect.service.js index fb275c6cfd4dc..bf088ea879861 100644 --- a/services/maven-metadata/maven-metadata-redirect.service.js +++ b/services/maven-metadata/maven-metadata-redirect.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; export default redirector({ category: 'version', diff --git a/services/maven-metadata/maven-metadata.service.js b/services/maven-metadata/maven-metadata.service.js index 6bc71a8443664..5d7a56fb929dc 100644 --- a/services/maven-metadata/maven-metadata.service.js +++ b/services/maven-metadata/maven-metadata.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {optionalUrl} from '../validators.js'; import {renderVersionBadge} from '../version.js'; -import {BaseXmlService} from '..'; +import {BaseXmlService} from '../index.js'; const queryParamSchema = Joi.object({ metadataUrl: optionalUrl.required(), diff --git a/services/microbadger/microbadger-base.js b/services/microbadger/microbadger-base.js index 544737dbf2f68..afffbc18f1b2f 100644 --- a/services/microbadger/microbadger-base.js +++ b/services/microbadger/microbadger-base.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService, NotFound} from '..'; +import {BaseJsonService, NotFound} from '../index.js'; const schema = Joi.object({ LayerCount: nonNegativeInteger, diff --git a/services/microbadger/microbadger-size.service.js b/services/microbadger/microbadger-size.service.js index 1e20d9543f482..2b784d0e1ec18 100644 --- a/services/microbadger/microbadger-size.service.js +++ b/services/microbadger/microbadger-size.service.js @@ -1,5 +1,5 @@ import prettyBytes from 'pretty-bytes'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import BaseMicrobadgerService from './microbadger-base.js'; const documentation = ` diff --git a/services/mozilla-observatory/mozilla-observatory.service.js b/services/mozilla-observatory/mozilla-observatory.service.js index 2b388bf541906..688fa22ed8093 100644 --- a/services/mozilla-observatory/mozilla-observatory.service.js +++ b/services/mozilla-observatory/mozilla-observatory.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.object({ state: Joi.string() diff --git a/services/netlify/netlify.service.js b/services/netlify/netlify.service.js index 4371d292f7912..f2ab3da6080e1 100644 --- a/services/netlify/netlify.service.js +++ b/services/netlify/netlify.service.js @@ -1,5 +1,5 @@ import {renderBuildStatusBadge} from '../build-status.js'; -import {BaseSvgScrapingService} from '..'; +import {BaseSvgScrapingService} from '../index.js'; const pendingStatus = 'building' const notBuiltStatus = 'not built' diff --git a/services/nexus/nexus-redirect.service.js b/services/nexus/nexus-redirect.service.js index 605e098910b33..ac06886554022 100644 --- a/services/nexus/nexus-redirect.service.js +++ b/services/nexus/nexus-redirect.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; export default [ redirector({ diff --git a/services/nexus/nexus.service.js b/services/nexus/nexus.service.js index 8350fd9f07dec..60c084027668e 100644 --- a/services/nexus/nexus.service.js +++ b/services/nexus/nexus.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {version as versionColor} from '../color-formatters.js'; import {addv} from '../text-formatters.js'; import {optionalUrl, optionalDottedVersionNClausesWithOptionalSuffix} from '../validators.js'; -import {BaseJsonService, InvalidResponse, NotFound} from '..'; +import {BaseJsonService, InvalidResponse, NotFound} from '../index.js'; import {isSnapshotVersion} from './nexus-version.js'; const nexus2SearchApiSchema = Joi.object({ diff --git a/services/nexus/nexus.spec.js b/services/nexus/nexus.spec.js index c7af2dc639149..63d3b3266e22e 100644 --- a/services/nexus/nexus.spec.js +++ b/services/nexus/nexus.spec.js @@ -1,7 +1,7 @@ import {expect} from 'chai'; import nock from 'nock'; import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js'; -import {InvalidResponse, NotFound} from '..'; +import {InvalidResponse, NotFound} from '../index.js'; import Nexus from './nexus.service.js'; describe('Nexus', function () { diff --git a/services/nodeping/nodeping-status.service.js b/services/nodeping/nodeping-status.service.js index 8b921d51e363c..5461f6fd573fa 100644 --- a/services/nodeping/nodeping-status.service.js +++ b/services/nodeping/nodeping-status.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {queryParamSchema, exampleQueryParams, renderWebsiteStatus} from '../website-status.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const schema = Joi.array() .items(Joi.object().keys({ su: Joi.boolean() })) diff --git a/services/nodeping/nodeping-uptime.service.js b/services/nodeping/nodeping-uptime.service.js index 93a8df7354ce9..92b4240af56ac 100644 --- a/services/nodeping/nodeping-uptime.service.js +++ b/services/nodeping/nodeping-uptime.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {colorScale} from '../color-formatters.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const colorFormatter = colorScale([99, 99.5, 100]) diff --git a/services/npm/npm-base.js b/services/npm/npm-base.js index e00f002060024..a2656cadbadca 100644 --- a/services/npm/npm-base.js +++ b/services/npm/npm-base.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {optionalUrl} from '../validators.js'; import {isDependencyMap} from '../package-json-helpers.js'; -import {BaseJsonService, InvalidResponse, NotFound} from '..'; +import {BaseJsonService, InvalidResponse, NotFound} from '../index.js'; const deprecatedLicenseObjectSchema = Joi.object({ type: Joi.string().required(), diff --git a/services/npm/npm-downloads.service.js b/services/npm/npm-downloads.service.js index 5119c382c4cf4..fd03ce813bf88 100644 --- a/services/npm/npm-downloads.service.js +++ b/services/npm/npm-downloads.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; // https://github.com/npm/registry/blob/master/docs/download-counts.md#output const pointResponseSchema = Joi.object({ diff --git a/services/npm/npm-version.service.js b/services/npm/npm-version.service.js index cb69debf9464b..c6f6f21909e13 100644 --- a/services/npm/npm-version.service.js +++ b/services/npm/npm-version.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import NpmBase from './npm-base.js'; const keywords = ['node'] diff --git a/services/nsp/nsp.service.js b/services/nsp/nsp.service.js index 7f8b5e9649b06..d9189cee000fa 100644 --- a/services/nsp/nsp.service.js +++ b/services/nsp/nsp.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default deprecatedService({ route: { diff --git a/services/nuget/nuget-v2-service-family.js b/services/nuget/nuget-v2-service-family.js index 57bab6671b076..6a2abf558476f 100644 --- a/services/nuget/nuget-v2-service-family.js +++ b/services/nuget/nuget-v2-service-family.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService, BaseXmlService, NotFound, redirector} from '..'; +import {BaseJsonService, BaseXmlService, NotFound, redirector} from '../index.js'; import {renderVersionBadge, renderDownloadBadge, odataToObject} from './nuget-helpers.js'; function createFilter({ packageName, includePrereleases }) { diff --git a/services/nuget/nuget-v3-service-family.js b/services/nuget/nuget-v3-service-family.js index 008a23d99a180..8569f8b681f43 100644 --- a/services/nuget/nuget-v3-service-family.js +++ b/services/nuget/nuget-v3-service-family.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import RouteBuilder from '../route-builder.js'; -import {BaseJsonService, NotFound} from '..'; +import {BaseJsonService, NotFound} from '../index.js'; import {renderVersionBadge, renderDownloadBadge, searchServiceUrl, stripBuildMetadata, selectVersion} from './nuget-helpers.js'; /* diff --git a/services/nycrc/nycrc.service.js b/services/nycrc/nycrc.service.js index 3723da72846ff..b08d6a8dfd377 100644 --- a/services/nycrc/nycrc.service.js +++ b/services/nycrc/nycrc.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {coveragePercentage} from '../color-formatters.js'; import {ConditionalGithubAuthV3Service} from '../github/github-auth-service.js'; import {fetchJsonFromRepo} from '../github/github-common-fetch.js'; -import {InvalidParameter, InvalidResponse, NotFound} from '..'; +import {InvalidParameter, InvalidResponse, NotFound} from '../index.js'; const nycrcSchema = Joi.object({ branches: Joi.number().min(0).max(100), diff --git a/services/offset-earth/offset-earth-carbon-redirect.service.js b/services/offset-earth/offset-earth-carbon-redirect.service.js index 45bc4a8ffed8e..26f284e81cfde 100644 --- a/services/offset-earth/offset-earth-carbon-redirect.service.js +++ b/services/offset-earth/offset-earth-carbon-redirect.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; export default [ // https://github.com/badges/shields/issues/5433 diff --git a/services/offset-earth/offset-earth-trees-redirect.service.js b/services/offset-earth/offset-earth-trees-redirect.service.js index 60c3671d57e8c..cd29c30c9dc5f 100644 --- a/services/offset-earth/offset-earth-trees-redirect.service.js +++ b/services/offset-earth/offset-earth-trees-redirect.service.js @@ -1,4 +1,4 @@ -import {redirector} from '..'; +import {redirector} from '../index.js'; export default [ // https://github.com/badges/shields/issues/5433 diff --git a/services/open-vsx/open-vsx-base.js b/services/open-vsx/open-vsx-base.js index 408dd23b8c65a..1b069ac78889a 100644 --- a/services/open-vsx/open-vsx-base.js +++ b/services/open-vsx/open-vsx-base.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {optionalNonNegativeInteger} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const extensionQuerySchema = Joi.object({ error: Joi.string(), diff --git a/services/opencollective/opencollective-base.js b/services/opencollective/opencollective-base.js index ed4ed5c0e6fb6..f6f8e96177d0c 100644 --- a/services/opencollective/opencollective-base.js +++ b/services/opencollective/opencollective-base.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; // https://developer.opencollective.com/#/api/collectives?id=get-info const collectiveDetailsSchema = Joi.object().keys({ diff --git a/services/opm/opm-version.service.js b/services/opm/opm-version.service.js index 1d4eefbf43563..71231728355f0 100644 --- a/services/opm/opm-version.service.js +++ b/services/opm/opm-version.service.js @@ -1,5 +1,5 @@ import {renderVersionBadge} from '../version.js'; -import {BaseService, NotFound, InvalidResponse} from '..'; +import {BaseService, NotFound, InvalidResponse} from '../index.js'; export default class OpmVersion extends BaseService { static category = 'version' diff --git a/services/ore/ore-base.js b/services/ore/ore-base.js index 5110967393152..bf19ea22c3887 100644 --- a/services/ore/ore-base.js +++ b/services/ore/ore-base.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService, InvalidResponse} from '..'; +import {BaseJsonService, InvalidResponse} from '../index.js'; const sessionSchema = Joi.object({ session: Joi.string().required(), diff --git a/services/osslifecycle/osslifecycle.service.js b/services/osslifecycle/osslifecycle.service.js index 5ba5d950cf3a4..acefdf0810767 100644 --- a/services/osslifecycle/osslifecycle.service.js +++ b/services/osslifecycle/osslifecycle.service.js @@ -1,4 +1,4 @@ -import {BaseService, InvalidResponse} from '..'; +import {BaseService, InvalidResponse} from '../index.js'; const documentation = `
diff --git a/services/package-json-helpers.js b/services/package-json-helpers.js index 1196566430af1..1d17bb8cba0e2 100644 --- a/services/package-json-helpers.js +++ b/services/package-json-helpers.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {InvalidParameter} from '.'; +import {InvalidParameter} from './index.js'; const isDependencyMap = Joi.object() .pattern( diff --git a/services/packagecontrol/packagecontrol.service.js b/services/packagecontrol/packagecontrol.service.js index d907d1a295441..c0c3752f46123 100644 --- a/services/packagecontrol/packagecontrol.service.js +++ b/services/packagecontrol/packagecontrol.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {metric} from '../text-formatters.js'; import {downloadCount} from '../color-formatters.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const keywords = ['sublime', 'sublimetext', 'packagecontrol'] diff --git a/services/packagist/packagist-base.js b/services/packagist/packagist-base.js index ae5754c862271..53fafe00577ce 100644 --- a/services/packagist/packagist-base.js +++ b/services/packagist/packagist-base.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const packageSchema = Joi.object() .pattern( diff --git a/services/packagist/packagist-license.service.js b/services/packagist/packagist-license.service.js index e5f60518f6428..65f55817323dd 100644 --- a/services/packagist/packagist-license.service.js +++ b/services/packagist/packagist-license.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {renderLicenseBadge} from '../licenses.js'; import {optionalUrl} from '../validators.js'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import {keywords, BasePackagistService, customServerDocumentationFragment} from './packagist-base.js'; const packageSchema = Joi.object() diff --git a/services/packagist/packagist-license.spec.js b/services/packagist/packagist-license.spec.js index 765f34c4d767c..fce371877dca9 100644 --- a/services/packagist/packagist-license.spec.js +++ b/services/packagist/packagist-license.spec.js @@ -1,5 +1,5 @@ import {expect} from 'chai'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import PackagistLicense from './packagist-license.service.js'; describe('PackagistLicense', function () { diff --git a/services/packagist/packagist-php-version.service.js b/services/packagist/packagist-php-version.service.js index c0d0b7c442847..b2db629d8fda2 100644 --- a/services/packagist/packagist-php-version.service.js +++ b/services/packagist/packagist-php-version.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {optionalUrl} from '../validators.js'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import {allVersionsSchema, BasePackagistService, customServerDocumentationFragment} from './packagist-base.js'; const queryParamSchema = Joi.object({ diff --git a/services/packagist/packagist-php-version.spec.js b/services/packagist/packagist-php-version.spec.js index b02f860284ffb..18a2dd6411c2e 100644 --- a/services/packagist/packagist-php-version.spec.js +++ b/services/packagist/packagist-php-version.spec.js @@ -1,5 +1,5 @@ import {expect} from 'chai'; -import {NotFound} from '..'; +import {NotFound} from '../index.js'; import PackagistPhpVersion from './packagist-php-version.service.js'; describe('PackagistPhpVersion', function () { diff --git a/services/packagist/packagist-version.service.js b/services/packagist/packagist-version.service.js index 9e40b9d42888e..387b5a971c0c8 100644 --- a/services/packagist/packagist-version.service.js +++ b/services/packagist/packagist-version.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {renderVersionBadge} from '../version.js'; import {compare, isStable, latest} from '../php-version.js'; import {optionalUrl} from '../validators.js'; -import {NotFound, redirector} from '..'; +import {NotFound, redirector} from '../index.js'; import {allVersionsSchema, keywords, BasePackagistService, customServerDocumentationFragment} from './packagist-base.js'; const packageSchema = Joi.object() diff --git a/services/php-eye/php-eye-hhvm.service.js b/services/php-eye/php-eye-hhvm.service.js index 5c224139d8b55..bdb2a744df966 100644 --- a/services/php-eye/php-eye-hhvm.service.js +++ b/services/php-eye/php-eye-hhvm.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default [ deprecatedService({ diff --git a/services/php-eye/php-eye-php-version.service.js b/services/php-eye/php-eye-php-version.service.js index 53bb0a2f1ae61..4235c930456e7 100644 --- a/services/php-eye/php-eye-php-version.service.js +++ b/services/php-eye/php-eye-php-version.service.js @@ -1,4 +1,4 @@ -import {deprecatedService} from '..'; +import {deprecatedService} from '../index.js'; export default [ deprecatedService({ diff --git a/services/pingpong/pingpong-status.service.js b/services/pingpong/pingpong-status.service.js index 9a2cd2d498b72..8c47ead1a2122 100644 --- a/services/pingpong/pingpong-status.service.js +++ b/services/pingpong/pingpong-status.service.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {BaseJsonService, InvalidParameter, InvalidResponse} from '..'; +import {BaseJsonService, InvalidParameter, InvalidResponse} from '../index.js'; const schema = Joi.object({ status: Joi.string().required(), diff --git a/services/pingpong/pingpong-uptime.service.js b/services/pingpong/pingpong-uptime.service.js index 2e16e22d56d0b..3dea3e0f43363 100644 --- a/services/pingpong/pingpong-uptime.service.js +++ b/services/pingpong/pingpong-uptime.service.js @@ -1,6 +1,6 @@ import Joi from 'joi'; import {coveragePercentage} from '../color-formatters.js'; -import {BaseJsonService, InvalidParameter} from '..'; +import {BaseJsonService, InvalidParameter} from '../index.js'; const schema = Joi.object({ uptime: Joi.number().min(0).max(100).required(), diff --git a/services/pipenv-helpers.js b/services/pipenv-helpers.js index e212850c66364..2992617a89bb4 100644 --- a/services/pipenv-helpers.js +++ b/services/pipenv-helpers.js @@ -1,5 +1,5 @@ import Joi from 'joi'; -import {InvalidParameter} from '.'; +import {InvalidParameter} from './index.js'; const isDependency = Joi.alternatives( Joi.object({ diff --git a/services/pkgreview/package-rating.service.js b/services/pkgreview/package-rating.service.js index af522234c1111..6297d67ad0dd4 100644 --- a/services/pkgreview/package-rating.service.js +++ b/services/pkgreview/package-rating.service.js @@ -2,7 +2,7 @@ import Joi from 'joi'; import {starRating, metric} from '../text-formatters.js'; import {colorScale} from '../color-formatters.js'; import {nonNegativeInteger} from '../validators.js'; -import {BaseJsonService} from '..'; +import {BaseJsonService} from '../index.js'; const pkgReviewColor = colorScale([2, 3, 4]) diff --git a/services/poeditor/poeditor.service.js b/services/poeditor/poeditor.service.js index 0d2acec00f3f9..1671050b549f3 100644 --- a/services/poeditor/poeditor.service.js +++ b/services/poeditor/poeditor.service.js @@ -1,7 +1,7 @@ import Joi from 'joi'; import {nonNegativeInteger} from '../validators.js'; import {coveragePercentage} from '../color-formatters.js'; -import {BaseJsonService, InvalidResponse} from '..'; +import {BaseJsonService, InvalidResponse} from '../index.js'; const documentation = `
diff --git a/services/powershellgallery/powershellgallery.service.js b/services/powershellgallery/powershellgallery.service.js
index e7f69cf41e6e2..9d07486bad1ae 100644
--- a/services/powershellgallery/powershellgallery.service.js
+++ b/services/powershellgallery/powershellgallery.service.js
@@ -1,5 +1,5 @@
import {fetch, createServiceFamily} from '../nuget/nuget-v2-service-family.js';
-import {BaseXmlService} from '..';
+import {BaseXmlService} from '../index.js';
const WINDOWS_TAG_NAME = 'windows'
const MACOS_TAG_NAME = 'macos'
diff --git a/services/pub/pub.service.js b/services/pub/pub.service.js
index f753c58aa70e5..cda5e01bfb896 100644
--- a/services/pub/pub.service.js
+++ b/services/pub/pub.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {latest, renderVersionBadge} from '../version.js';
-import {BaseJsonService, redirector} from '..';
+import {BaseJsonService, redirector} from '../index.js';
const schema = Joi.object({
versions: Joi.array().items(Joi.string()).required(),
diff --git a/services/puppetforge/puppetforge-base.js b/services/puppetforge/puppetforge-base.js
index b8dec23a79ae3..4446670a888a0 100644
--- a/services/puppetforge/puppetforge-base.js
+++ b/services/puppetforge/puppetforge-base.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {nonNegativeInteger, semver} from '../validators.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const usersSchema = Joi.object({
module_count: nonNegativeInteger,
diff --git a/services/puppetforge/puppetforge-module-endorsement.service.js b/services/puppetforge/puppetforge-module-endorsement.service.js
index 11d544fea8448..425cd02157a6e 100644
--- a/services/puppetforge/puppetforge-module-endorsement.service.js
+++ b/services/puppetforge/puppetforge-module-endorsement.service.js
@@ -1,4 +1,4 @@
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import {BasePuppetForgeModulesService} from './puppetforge-base.js';
export default class PuppetforgeModuleEndorsement extends (
diff --git a/services/puppetforge/puppetforge-module-feedback.service.js b/services/puppetforge/puppetforge-module-feedback.service.js
index 207f790703ebc..a1420f18aa149 100644
--- a/services/puppetforge/puppetforge-module-feedback.service.js
+++ b/services/puppetforge/puppetforge-module-feedback.service.js
@@ -1,5 +1,5 @@
import {coveragePercentage as coveragePercentageColor} from '../color-formatters.js';
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import {BasePuppetForgeModulesService} from './puppetforge-base.js';
export default class PuppetforgeModuleFeedback extends (
diff --git a/services/puppetforge/puppetforge-module-pdk-version.service.js b/services/puppetforge/puppetforge-module-pdk-version.service.js
index 43129da1072e9..e9ac7cb12049b 100644
--- a/services/puppetforge/puppetforge-module-pdk-version.service.js
+++ b/services/puppetforge/puppetforge-module-pdk-version.service.js
@@ -1,5 +1,5 @@
import {renderVersionBadge} from '../version.js';
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import {BasePuppetForgeModulesService} from './puppetforge-base.js';
export default class PuppetforgeModulePdkVersion extends (
diff --git a/services/pypi/pypi-base.js b/services/pypi/pypi-base.js
index 540b93244e017..bb5d81b87c9f2 100644
--- a/services/pypi/pypi-base.js
+++ b/services/pypi/pypi-base.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const schema = Joi.object({
info: Joi.object({
diff --git a/services/pypi/pypi-downloads.service.js b/services/pypi/pypi-downloads.service.js
index 70152d2d1d1be..147ac8144c573 100644
--- a/services/pypi/pypi-downloads.service.js
+++ b/services/pypi/pypi-downloads.service.js
@@ -2,7 +2,7 @@ import Joi from 'joi';
import {downloadCount} from '../color-formatters.js';
import {metric} from '../text-formatters.js';
import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const keywords = ['python']
diff --git a/services/readthedocs/readthedocs.service.js b/services/readthedocs/readthedocs.service.js
index f3da497a5fae0..a441fd9c3f245 100644
--- a/services/readthedocs/readthedocs.service.js
+++ b/services/readthedocs/readthedocs.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseSvgScrapingService, NotFound} from '..';
+import {BaseSvgScrapingService, NotFound} from '../index.js';
const keywords = ['documentation']
diff --git a/services/reddit/subreddit-subscribers.service.js b/services/reddit/subreddit-subscribers.service.js
index 8bf8b843c4030..3537662d85296 100644
--- a/services/reddit/subreddit-subscribers.service.js
+++ b/services/reddit/subreddit-subscribers.service.js
@@ -1,7 +1,7 @@
import Joi from 'joi';
import {optionalNonNegativeInteger} from '../validators.js';
import {metric} from '../text-formatters.js';
-import {BaseJsonService, NotFound} from '..';
+import {BaseJsonService, NotFound} from '../index.js';
const schema = Joi.object({
data: Joi.object({
diff --git a/services/reddit/user-karma.service.js b/services/reddit/user-karma.service.js
index 3bcbd954317b6..014c9807029e4 100644
--- a/services/reddit/user-karma.service.js
+++ b/services/reddit/user-karma.service.js
@@ -1,7 +1,7 @@
import Joi from 'joi';
import {nonNegativeInteger} from '../validators.js';
import {metric} from '../text-formatters.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const schema = Joi.object({
data: Joi.object({
diff --git a/services/redmine/redmine.service.js b/services/redmine/redmine.service.js
index 7e48dd78f17d9..7dc06bc5b13d7 100644
--- a/services/redmine/redmine.service.js
+++ b/services/redmine/redmine.service.js
@@ -1,7 +1,7 @@
import Joi from 'joi';
import {starRating} from '../text-formatters.js';
import {floorCount as floorCountColor} from '../color-formatters.js';
-import {BaseXmlService} from '..';
+import {BaseXmlService} from '../index.js';
const schema = Joi.object({
'redmine-plugin': Joi.object({
diff --git a/services/repology/repology-repositories.service.js b/services/repology/repology-repositories.service.js
index d2c9603e44ee2..a49453065f767 100644
--- a/services/repology/repology-repositories.service.js
+++ b/services/repology/repology-repositories.service.js
@@ -1,7 +1,7 @@
import Joi from 'joi';
import {metric} from '../text-formatters.js';
import {nonNegativeInteger} from '../validators.js';
-import {BaseSvgScrapingService} from '..';
+import {BaseSvgScrapingService} from '../index.js';
const schema = Joi.object({
message: nonNegativeInteger,
diff --git a/services/requires/requires.service.js b/services/requires/requires.service.js
index 7f8c7840c12db..90836be2aad67 100644
--- a/services/requires/requires.service.js
+++ b/services/requires/requires.service.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const statusSchema = Joi.object({
status: Joi.string().required(),
diff --git a/services/reuse/reuse-compliance.service.js b/services/reuse/reuse-compliance.service.js
index 9e09691ff9f5d..25d99a92275f1 100644
--- a/services/reuse/reuse-compliance.service.js
+++ b/services/reuse/reuse-compliance.service.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
import {isReuseCompliance, COLOR_MAP} from './reuse-compliance-helper.js';
const responseSchema = Joi.object({
diff --git a/services/scoop/scoop-version.service.js b/services/scoop/scoop-version.service.js
index 8d89b8f241c13..d565c3f2b7431 100644
--- a/services/scoop/scoop-version.service.js
+++ b/services/scoop/scoop-version.service.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import {ConditionalGithubAuthV3Service} from '../github/github-auth-service.js';
import {fetchJsonFromRepo} from '../github/github-common-fetch.js';
import {renderVersionBadge} from '../version.js';
diff --git a/services/scrutinizer/scrutinizer-base.js b/services/scrutinizer/scrutinizer-base.js
index 66f3ba6517cb9..babeb83caadba 100644
--- a/services/scrutinizer/scrutinizer-base.js
+++ b/services/scrutinizer/scrutinizer-base.js
@@ -1,4 +1,4 @@
-import {BaseJsonService, NotFound, InvalidResponse} from '..';
+import {BaseJsonService, NotFound, InvalidResponse} from '../index.js';
export default class ScrutinizerBase extends BaseJsonService {
// https://scrutinizer-ci.com/docs/api/#repository-details
diff --git a/services/scrutinizer/scrutinizer-coverage.service.js b/services/scrutinizer/scrutinizer-coverage.service.js
index 611b2d167aebf..1be3405078d83 100644
--- a/services/scrutinizer/scrutinizer-coverage.service.js
+++ b/services/scrutinizer/scrutinizer-coverage.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {colorScale} from '../color-formatters.js';
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import ScrutinizerBase from './scrutinizer-base.js';
const schema = Joi.object({
diff --git a/services/scrutinizer/scrutinizer-coverage.spec.js b/services/scrutinizer/scrutinizer-coverage.spec.js
index cfde5dfa26733..34821fe47940e 100644
--- a/services/scrutinizer/scrutinizer-coverage.spec.js
+++ b/services/scrutinizer/scrutinizer-coverage.spec.js
@@ -1,6 +1,6 @@
import {expect} from 'chai';
import {test, given} from 'sazerac';
-import {InvalidResponse, NotFound} from '..';
+import {InvalidResponse, NotFound} from '../index.js';
import {ScrutinizerCoverage} from './scrutinizer-coverage.service.js';
describe('ScrutinizerCoverage', function () {
diff --git a/services/scrutinizer/scrutinizer-redirect.service.js b/services/scrutinizer/scrutinizer-redirect.service.js
index 0d5c4b07c4797..5a6581cbaac6d 100644
--- a/services/scrutinizer/scrutinizer-redirect.service.js
+++ b/services/scrutinizer/scrutinizer-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '..';
+import {redirector} from '../index.js';
const commonAttrs = {
category: 'analysis',
diff --git a/services/security-headers/security-headers.service.js b/services/security-headers/security-headers.service.js
index 4f13457b543a0..b7723c10763b0 100644
--- a/services/security-headers/security-headers.service.js
+++ b/services/security-headers/security-headers.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {optionalUrl} from '../validators.js';
-import {BaseService, NotFound} from '..';
+import {BaseService, NotFound} from '../index.js';
const queryParamSchema = Joi.object({
url: optionalUrl.required(),
diff --git a/services/shippable/shippable.service.js b/services/shippable/shippable.service.js
index 0abe36a357c31..3a35e2025b8e5 100644
--- a/services/shippable/shippable.service.js
+++ b/services/shippable/shippable.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {renderBuildStatusBadge} from '../build-status.js';
-import {BaseJsonService, NotFound, redirector} from '..';
+import {BaseJsonService, NotFound, redirector} from '../index.js';
// source: https://github.com/badges/shields/pull/1362#discussion_r161693830
const statusCodes = {
diff --git a/services/snap-ci/snap-ci.service.js b/services/snap-ci/snap-ci.service.js
index 4fb1f1cb38fa7..dbb29fad744c4 100644
--- a/services/snap-ci/snap-ci.service.js
+++ b/services/snap-ci/snap-ci.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '..';
+import {deprecatedService} from '../index.js';
const commonAttrs = {
category: 'build',
diff --git a/services/snyk/snyk-vulnerability-base.js b/services/snyk/snyk-vulnerability-base.js
index f8a29afc3523d..ff983a21042cd 100644
--- a/services/snyk/snyk-vulnerability-base.js
+++ b/services/snyk/snyk-vulnerability-base.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseSvgScrapingService} from '..';
+import {BaseSvgScrapingService} from '../index.js';
const schema = Joi.object({
message: Joi.alternatives()
diff --git a/services/snyk/snyk-vulnerability-npm.service.js b/services/snyk/snyk-vulnerability-npm.service.js
index 45aefa3b96134..463545e3cfff0 100644
--- a/services/snyk/snyk-vulnerability-npm.service.js
+++ b/services/snyk/snyk-vulnerability-npm.service.js
@@ -1,4 +1,4 @@
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import SynkVulnerabilityBase from './snyk-vulnerability-base.js';
export default class SnykVulnerabilityNpm extends SynkVulnerabilityBase {
diff --git a/services/sonar/sonar-base.js b/services/sonar/sonar-base.js
index a0a476d33dd6c..aed5d2f5ea2c0 100644
--- a/services/sonar/sonar-base.js
+++ b/services/sonar/sonar-base.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService, NotFound} from '..';
+import {BaseJsonService, NotFound} from '../index.js';
import {isLegacyVersion} from './sonar-helpers.js';
// It is possible to see HTTP 404 response codes and HTTP 200 responses
diff --git a/services/sonar/sonar-redirector.service.js b/services/sonar/sonar-redirector.service.js
index 3153796eb3f8d..2530afeb8c22d 100644
--- a/services/sonar/sonar-redirector.service.js
+++ b/services/sonar/sonar-redirector.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '..';
+import {redirector} from '../index.js';
export default [
redirector({
diff --git a/services/sourceforge/sourceforge-open-tickets.service.js b/services/sourceforge/sourceforge-open-tickets.service.js
index 9e6f500ac722e..9266f32879446 100644
--- a/services/sourceforge/sourceforge-open-tickets.service.js
+++ b/services/sourceforge/sourceforge-open-tickets.service.js
@@ -1,7 +1,7 @@
import Joi from 'joi';
import {metric} from '../text-formatters.js';
import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const schema = Joi.object({
count: nonNegativeInteger.required(),
diff --git a/services/sourceforge/sourceforge.service.js b/services/sourceforge/sourceforge.service.js
index 831ae582fe579..7fed8dcd01635 100644
--- a/services/sourceforge/sourceforge.service.js
+++ b/services/sourceforge/sourceforge.service.js
@@ -3,7 +3,7 @@ import moment from 'moment';
import {metric} from '../text-formatters.js';
import {downloadCount} from '../color-formatters.js';
import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const schema = Joi.object({
total: nonNegativeInteger,
diff --git a/services/sourcegraph/sourcegraph.service.js b/services/sourcegraph/sourcegraph.service.js
index e49a6eb0230fe..1a35bdd4022d2 100644
--- a/services/sourcegraph/sourcegraph.service.js
+++ b/services/sourcegraph/sourcegraph.service.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const projectsCountRegex = /^\s[0-9]*(\.[0-9]k)?\sprojects$/
const schema = Joi.object({
diff --git a/services/spack/spack.service.js b/services/spack/spack.service.js
index 847710266ee3a..50b7a8a9bd83f 100644
--- a/services/spack/spack.service.js
+++ b/services/spack/spack.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {renderVersionBadge} from '..//version.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const schema = Joi.object({
latest_version: Joi.string().required(),
}).required()
diff --git a/services/spiget/spiget-base.js b/services/spiget/spiget-base.js
index 0162114808461..83f1d81afff36 100644
--- a/services/spiget/spiget-base.js
+++ b/services/spiget/spiget-base.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const resourceSchema = Joi.object({
downloads: Joi.number().required(),
diff --git a/services/stackexchange/stackexchange-monthlyquestions.service.js b/services/stackexchange/stackexchange-monthlyquestions.service.js
index 57f5c18c67e15..fa56898021b19 100644
--- a/services/stackexchange/stackexchange-monthlyquestions.service.js
+++ b/services/stackexchange/stackexchange-monthlyquestions.service.js
@@ -1,7 +1,7 @@
import moment from 'moment';
import Joi from 'joi';
import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
import renderQuestionsBadge from './stackexchange-helpers.js';
const tagSchema = Joi.object({
diff --git a/services/stackexchange/stackexchange-reputation.service.js b/services/stackexchange/stackexchange-reputation.service.js
index 56505ed7d1a92..13ffe894d5264 100644
--- a/services/stackexchange/stackexchange-reputation.service.js
+++ b/services/stackexchange/stackexchange-reputation.service.js
@@ -1,7 +1,7 @@
import Joi from 'joi';
import {metric} from '../text-formatters.js';
import {floorCount as floorCountColor} from '../color-formatters.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const reputationSchema = Joi.object({
items: Joi.array()
diff --git a/services/stackexchange/stackexchange-taginfo.service.js b/services/stackexchange/stackexchange-taginfo.service.js
index 8e577742f0f41..67787171c41a6 100644
--- a/services/stackexchange/stackexchange-taginfo.service.js
+++ b/services/stackexchange/stackexchange-taginfo.service.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
import renderQuestionsBadge from './stackexchange-helpers.js';
const tagSchema = Joi.object({
diff --git a/services/static-badge/query-string-static.service.js b/services/static-badge/query-string-static.service.js
index dc5709b89b43e..5445539613880 100644
--- a/services/static-badge/query-string-static.service.js
+++ b/services/static-badge/query-string-static.service.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseStaticService} from '..';
+import {BaseStaticService} from '../index.js';
const queryParamSchema = Joi.object({
message: Joi.string().required(),
diff --git a/services/static-badge/static-badge.service.js b/services/static-badge/static-badge.service.js
index 93e1b40a9e0be..12e4280e99b0f 100644
--- a/services/static-badge/static-badge.service.js
+++ b/services/static-badge/static-badge.service.js
@@ -1,5 +1,5 @@
import {escapeFormat} from '../../core/badge-urls/path-helpers.js';
-import {BaseStaticService} from '..';
+import {BaseStaticService} from '../index.js';
export default class StaticBadge extends BaseStaticService {
static category = 'static'
diff --git a/services/steam/steam-base.js b/services/steam/steam-base.js
index 7230a11fd1285..a3b7afd55d48c 100644
--- a/services/steam/steam-base.js
+++ b/services/steam/steam-base.js
@@ -2,7 +2,7 @@
* @module
*/
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
/**
* The steam api is based like /{interface}/{method}/v{version}/
diff --git a/services/steam/steam-workshop.service.js b/services/steam/steam-workshop.service.js
index 05fd53a298685..68cf48606af72 100644
--- a/services/steam/steam-workshop.service.js
+++ b/services/steam/steam-workshop.service.js
@@ -2,7 +2,7 @@ import Joi from 'joi';
import prettyBytes from 'pretty-bytes';
import {metric, formatDate} from '../text-formatters.js';
import {age as ageColor, downloadCount} from '../color-formatters.js';
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import BaseSteamAPI from './steam-base.js';
const documentation = `
diff --git a/services/swagger/swagger-redirect.service.js b/services/swagger/swagger-redirect.service.js
index b10109ff5a162..150d41d0ff7e6 100644
--- a/services/swagger/swagger-redirect.service.js
+++ b/services/swagger/swagger-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '..';
+import {redirector} from '../index.js';
export default [
redirector({
diff --git a/services/swagger/swagger.service.js b/services/swagger/swagger.service.js
index 90edd6417047d..13e6516d4038e 100644
--- a/services/swagger/swagger.service.js
+++ b/services/swagger/swagger.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {optionalUrl} from '../validators.js';
-import {BaseJsonService, NotFound} from '..';
+import {BaseJsonService, NotFound} from '../index.js';
const schema = Joi.object()
.keys({
diff --git a/services/symfony/sensiolabs-redirect.service.js b/services/symfony/sensiolabs-redirect.service.js
index 497a036f5d9a3..df889ca1fd6d7 100644
--- a/services/symfony/sensiolabs-redirect.service.js
+++ b/services/symfony/sensiolabs-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '..';
+import {redirector} from '../index.js';
export default [
// The SymfonyInsight service was previously branded as SensioLabs, and
diff --git a/services/symfony/symfony-insight-base.js b/services/symfony/symfony-insight-base.js
index ad13462243f65..19276a155c0a5 100644
--- a/services/symfony/symfony-insight-base.js
+++ b/services/symfony/symfony-insight-base.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseXmlService, NotFound} from '..';
+import {BaseXmlService, NotFound} from '../index.js';
const violationSchema = Joi.object({
severity: Joi.equal('info', 'minor', 'major', 'critical').required(),
diff --git a/services/symfony/symfony-insight-base.spec.js b/services/symfony/symfony-insight-base.spec.js
index ab03abe62df48..36bbe44317c12 100644
--- a/services/symfony/symfony-insight-base.spec.js
+++ b/services/symfony/symfony-insight-base.spec.js
@@ -1,5 +1,5 @@
import {expect} from 'chai';
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import {SymfonyInsightBase} from './symfony-insight-base.js';
describe('SymfonyInsightBase', function () {
diff --git a/services/teamcity/teamcity-base.js b/services/teamcity/teamcity-base.js
index 7feb05b656706..d1769d58663c2 100644
--- a/services/teamcity/teamcity-base.js
+++ b/services/teamcity/teamcity-base.js
@@ -1,4 +1,4 @@
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
export default class TeamCityBase extends BaseJsonService {
static auth = {
diff --git a/services/teamcity/teamcity-build-redirect.service.js b/services/teamcity/teamcity-build-redirect.service.js
index 7384be0397ae7..865a973a89868 100644
--- a/services/teamcity/teamcity-build-redirect.service.js
+++ b/services/teamcity/teamcity-build-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '..';
+import {redirector} from '../index.js';
const commonAttrs = {
dateAdded: new Date('2019-09-15'),
diff --git a/services/teamcity/teamcity-coverage-redirect.service.js b/services/teamcity/teamcity-coverage-redirect.service.js
index d42eca87ab9c6..400b436697164 100644
--- a/services/teamcity/teamcity-coverage-redirect.service.js
+++ b/services/teamcity/teamcity-coverage-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '..';
+import {redirector} from '../index.js';
export default [
redirector({
diff --git a/services/teamcity/teamcity-coverage.service.js b/services/teamcity/teamcity-coverage.service.js
index c98fa8cc4d54a..8909d4dcbde47 100644
--- a/services/teamcity/teamcity-coverage.service.js
+++ b/services/teamcity/teamcity-coverage.service.js
@@ -1,7 +1,7 @@
import Joi from 'joi';
import {coveragePercentage} from '../color-formatters.js';
import {optionalUrl} from '../validators.js';
-import {InvalidResponse} from '..';
+import {InvalidResponse} from '../index.js';
import TeamCityBase from './teamcity-base.js';
const buildStatisticsSchema = Joi.object({
diff --git a/services/testspace/testspace-base.js b/services/testspace/testspace-base.js
index ae3998f210105..16e038f54ebb1 100644
--- a/services/testspace/testspace-base.js
+++ b/services/testspace/testspace-base.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, NotFound} from '..';
+import {BaseJsonService, NotFound} from '../index.js';
// https://help.testspace.com/docs/reference/web-api#list-results
// case_counts|array|The contained cases [passed, failed, na, errored]|counters of result
diff --git a/services/testspace/testspace-base.spec.js b/services/testspace/testspace-base.spec.js
index 47c8d82369ee5..9ffb803096f20 100644
--- a/services/testspace/testspace-base.spec.js
+++ b/services/testspace/testspace-base.spec.js
@@ -1,5 +1,5 @@
import {expect} from 'chai';
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import TestspaceBase from './testspace-base.js';
describe('TestspaceBase', function () {
diff --git a/services/tokei/tokei.service.js b/services/tokei/tokei.service.js
index c5d282b836f9c..0b207358ebaad 100644
--- a/services/tokei/tokei.service.js
+++ b/services/tokei/tokei.service.js
@@ -1,7 +1,7 @@
import Joi from 'joi';
import {metric} from '../text-formatters.js';
import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const schema = Joi.object({
lines: nonNegativeInteger,
diff --git a/services/travis/travis-build.service.js b/services/travis/travis-build.service.js
index 7aa1fdf954f99..4acb847d62b62 100644
--- a/services/travis/travis-build.service.js
+++ b/services/travis/travis-build.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseSvgScrapingService} from '..';
+import {BaseSvgScrapingService} from '../index.js';
const schema = Joi.object({
message: Joi.alternatives()
diff --git a/services/travis/travis-php-version-redirect.service.js b/services/travis/travis-php-version-redirect.service.js
index e24e659d908a8..3f292fbd9f3e0 100644
--- a/services/travis/travis-php-version-redirect.service.js
+++ b/services/travis/travis-php-version-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '..';
+import {redirector} from '../index.js';
const ciRedirect = redirector({
category: 'platform-support',
diff --git a/services/travis/travis-php-version.service.js b/services/travis/travis-php-version.service.js
index 3f4c8a90367fb..e03fc9b578b0d 100644
--- a/services/travis/travis-php-version.service.js
+++ b/services/travis/travis-php-version.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {minorVersion, versionReduction, getPhpReleases} from '../php-version.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const optionalNumberOrString = Joi.alternatives(Joi.string(), Joi.number())
const schema = Joi.object({
diff --git a/services/treeware/treeware-trees.service.js b/services/treeware/treeware-trees.service.js
index 2f545b5c2b4f5..f5487f54c50a9 100644
--- a/services/treeware/treeware-trees.service.js
+++ b/services/treeware/treeware-trees.service.js
@@ -2,7 +2,7 @@ import crypto from 'crypto';
import Joi from 'joi';
import {metric} from '../text-formatters.js';
import {floorCount} from '../color-formatters.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const apiSchema = Joi.object({
total: Joi.number().required(),
diff --git a/services/twitch/twitch-base.js b/services/twitch/twitch-base.js
index ebd21e4d89b12..b11a03ffb0157 100644
--- a/services/twitch/twitch-base.js
+++ b/services/twitch/twitch-base.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const tokenSchema = Joi.object({
access_token: Joi.string().required(),
diff --git a/services/twitter/twitter-redirect.service.js b/services/twitter/twitter-redirect.service.js
index c6bee1c552c49..29b85ac1e796d 100644
--- a/services/twitter/twitter-redirect.service.js
+++ b/services/twitter/twitter-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '..';
+import {redirector} from '../index.js';
export default [
redirector({
diff --git a/services/twitter/twitter.service.js b/services/twitter/twitter.service.js
index 9118824067109..013a9f21b1fd1 100644
--- a/services/twitter/twitter.service.js
+++ b/services/twitter/twitter.service.js
@@ -1,7 +1,7 @@
import Joi from 'joi';
import {metric} from '../text-formatters.js';
import {optionalUrl} from '../validators.js';
-import {BaseService, BaseJsonService, NotFound} from '..';
+import {BaseService, BaseJsonService, NotFound} from '../index.js';
const queryParamSchema = Joi.object({
url: optionalUrl.required(),
diff --git a/services/ubuntu/ubuntu.service.js b/services/ubuntu/ubuntu.service.js
index e76bbca51244c..7f85fbeeaf5d4 100644
--- a/services/ubuntu/ubuntu.service.js
+++ b/services/ubuntu/ubuntu.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {renderVersionBadge} from '../version.js';
-import {BaseJsonService, NotFound} from '..';
+import {BaseJsonService, NotFound} from '../index.js';
const schema = Joi.object({
entries: Joi.array()
diff --git a/services/uptimerobot/uptimerobot-base.js b/services/uptimerobot/uptimerobot-base.js
index ae19ff25a492f..eb972726a5903 100644
--- a/services/uptimerobot/uptimerobot-base.js
+++ b/services/uptimerobot/uptimerobot-base.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService, InvalidParameter, InvalidResponse} from '..';
+import {BaseJsonService, InvalidParameter, InvalidResponse} from '../index.js';
// https://uptimerobot.com/api
// POST getMonitors
diff --git a/services/vaadin-directory/vaadin-directory-base.js b/services/vaadin-directory/vaadin-directory-base.js
index d93647eccdedb..26a58fe31d1a4 100644
--- a/services/vaadin-directory/vaadin-directory-base.js
+++ b/services/vaadin-directory/vaadin-directory-base.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const schema = Joi.object({
ratingCount: nonNegativeInteger,
diff --git a/services/validators.js b/services/validators.js
index 580dd1aa31293..424c6d4593f35 100644
--- a/services/validators.js
+++ b/services/validators.js
@@ -1,24 +1,17 @@
-import {semver, semverRange} from 'joi-extension-semver';
-const Joi = require('joi').extend(semver).extend(semverRange)
+import {semver as joiSemver, semverRange as joiSemverRange} from 'joi-extension-semver';
+import joi from 'joi'
+const Joi = joi.extend(joiSemver).extend(joiSemverRange)
const optionalNonNegativeInteger = Joi.number().integer().min(0)
-export {
- optionalNonNegativeInteger,
-
- nonNegativeInteger: optionalNonNegativeInteger.required(),
-
- anyInteger: Joi.number().integer().required(),
-
- semver: Joi.semver().valid().required(),
-
- semverRange: Joi.semverRange().valid().required(),
-
- optionalDottedVersionNClausesWithOptionalSuffix: Joi.string().regex(
+export { optionalNonNegativeInteger }
+export const nonNegativeInteger = optionalNonNegativeInteger.required()
+export const anyInteger = Joi.number().integer().required()
+export const semver = Joi.semver().valid().required()
+export const semverRange = Joi.semverRange().valid().required()
+export const optionalDottedVersionNClausesWithOptionalSuffix = Joi.string().regex(
/^\d+(\.\d+)*([-+].*)?$/
- ),
-
+)
// TODO This accepts URLs with query strings and fragments, which for some
// purposes should be rejected.
- optionalUrl: Joi.string().uri({ scheme: ['http', 'https'] }),
-};
+export const optionalUrl = Joi.string().uri({ scheme: ['http', 'https'] })
diff --git a/services/versioneye/versioneye.service.js b/services/versioneye/versioneye.service.js
index 1ae838cd0186e..575c7925f9e98 100644
--- a/services/versioneye/versioneye.service.js
+++ b/services/versioneye/versioneye.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '..';
+import {deprecatedService} from '../index.js';
export default deprecatedService({
category: 'downloads',
diff --git a/services/visual-studio-app-center/visual-studio-app-center-base.js b/services/visual-studio-app-center/visual-studio-app-center-base.js
index 091c9d9613ec1..46132d1f9c67b 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-base.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-base.js
@@ -1,4 +1,4 @@
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const keywords = [
'visual-studio',
diff --git a/services/visual-studio-app-center/visual-studio-app-center-builds.service.js b/services/visual-studio-app-center/visual-studio-app-center-builds.service.js
index b7f452774ece4..fcd9ba715d6b9 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-builds.service.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-builds.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import {BaseVisualStudioAppCenterService, keywords, documentation} from './visual-studio-app-center-base.js';
const schema = Joi.array().items({
diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-base.js b/services/visual-studio-marketplace/visual-studio-marketplace-base.js
index 7d66defbef893..e07dd0d62b9f5 100644
--- a/services/visual-studio-marketplace/visual-studio-marketplace-base.js
+++ b/services/visual-studio-marketplace/visual-studio-marketplace-base.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import validate from '../../core/base-service/validate.js';
-import {BaseJsonService, NotFound} from '..';
+import {BaseJsonService, NotFound} from '../index.js';
const extensionQuerySchema = Joi.object({
results: Joi.array()
diff --git a/services/w3c/w3c-validation.service.js b/services/w3c/w3c-validation.service.js
index f5dcb3c75070b..2b83604b40368 100644
--- a/services/w3c/w3c-validation.service.js
+++ b/services/w3c/w3c-validation.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {optionalUrl} from '../validators.js';
-import {BaseJsonService, NotFound} from '..';
+import {BaseJsonService, NotFound} from '../index.js';
import {documentation, presetRegex, getColor, getMessage, getSchema} from './w3c-validation-helper.js';
const schema = Joi.object({
diff --git a/services/waffle/waffle-label-redirect.service.js b/services/waffle/waffle-label-redirect.service.js
index fc8c0d16366b9..f857c77ee1c88 100644
--- a/services/waffle/waffle-label-redirect.service.js
+++ b/services/waffle/waffle-label-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '..';
+import {redirector} from '../index.js';
export default [
// The WaffleLabel service originally had 'label' as an optional parameter
diff --git a/services/waffle/waffle-label.service.js b/services/waffle/waffle-label.service.js
index 19718dcbe6239..cb665ff3db25f 100644
--- a/services/waffle/waffle-label.service.js
+++ b/services/waffle/waffle-label.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '..';
+import {deprecatedService} from '../index.js';
export default deprecatedService({
route: {
diff --git a/services/website/website-redirect.service.js b/services/website/website-redirect.service.js
index b43aae3bba3a1..3b0f21e338841 100644
--- a/services/website/website-redirect.service.js
+++ b/services/website/website-redirect.service.js
@@ -1,5 +1,5 @@
import {escapeFormat} from '../../core/badge-urls/path-helpers.js';
-import {redirector} from '..';
+import {redirector} from '../index.js';
function escapeFormatSlashes(t) {
return escapeFormat(t)
diff --git a/services/website/website.service.js b/services/website/website.service.js
index 4ea20bc26079b..7e1c61a1d4e65 100644
--- a/services/website/website.service.js
+++ b/services/website/website.service.js
@@ -2,7 +2,7 @@ import Joi from 'joi';
import emojic from 'emojic';
import {optionalUrl} from '../validators.js';
import {queryParamSchema, exampleQueryParams, renderWebsiteStatus} from '../website-status.js';
-import {BaseService} from '..';
+import {BaseService} from '../index.js';
import trace from '../../core/base-service/trace.js';
const documentation = `
diff --git a/services/wercker/wercker.service.js b/services/wercker/wercker.service.js
index 0ffe42d732860..d9523e34a1b79 100644
--- a/services/wercker/wercker.service.js
+++ b/services/wercker/wercker.service.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const werckerSchema = Joi.array()
.items(
diff --git a/services/wheelmap/wheelmap.service.js b/services/wheelmap/wheelmap.service.js
index 43f2e4f6b2a0b..c739a768af6d1 100644
--- a/services/wheelmap/wheelmap.service.js
+++ b/services/wheelmap/wheelmap.service.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService} from '..';
+import {BaseJsonService} from '../index.js';
const schema = Joi.object({
node: Joi.object({
diff --git a/services/wordpress/wordpress-base.js b/services/wordpress/wordpress-base.js
index f807879402d15..2cf4c55c93e46 100644
--- a/services/wordpress/wordpress-base.js
+++ b/services/wordpress/wordpress-base.js
@@ -1,6 +1,6 @@
import Joi from 'joi';
import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, NotFound} from '..';
+import {BaseJsonService, NotFound} from '../index.js';
const stringOrFalse = Joi.alternatives(Joi.string(), Joi.bool())
diff --git a/services/wordpress/wordpress-downloads.service.js b/services/wordpress/wordpress-downloads.service.js
index d227a69fba66e..ca33b07597dcd 100644
--- a/services/wordpress/wordpress-downloads.service.js
+++ b/services/wordpress/wordpress-downloads.service.js
@@ -1,7 +1,7 @@
import Joi from 'joi';
import {metric} from '../text-formatters.js';
import {downloadCount} from '../color-formatters.js';
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import BaseWordpress from './wordpress-base.js';
const dateSchema = Joi.object()
diff --git a/services/wordpress/wordpress-last-update.service.js b/services/wordpress/wordpress-last-update.service.js
index 9a987e178f838..e73e58b5335b1 100644
--- a/services/wordpress/wordpress-last-update.service.js
+++ b/services/wordpress/wordpress-last-update.service.js
@@ -1,5 +1,5 @@
import moment from 'moment';
-import {InvalidResponse} from '..';
+import {InvalidResponse} from '../index.js';
import {formatDate} from '../text-formatters.js';
import {age as ageColor} from '../color-formatters.js';
import BaseWordpress from './wordpress-base.js';
diff --git a/services/wordpress/wordpress-platform-redirect.service.js b/services/wordpress/wordpress-platform-redirect.service.js
index 814e388459db5..414e88374e568 100644
--- a/services/wordpress/wordpress-platform-redirect.service.js
+++ b/services/wordpress/wordpress-platform-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '..';
+import {redirector} from '../index.js';
export default redirector({
category: 'platform-support',
diff --git a/services/wordpress/wordpress-platform.service.js b/services/wordpress/wordpress-platform.service.js
index 00b19bd1cb00e..e81e2d723f741 100644
--- a/services/wordpress/wordpress-platform.service.js
+++ b/services/wordpress/wordpress-platform.service.js
@@ -1,4 +1,4 @@
-import {NotFound} from '..';
+import {NotFound} from '../index.js';
import {addv} from '../text-formatters.js';
import {version as versionColor} from '../color-formatters.js';
import BaseWordpress from './wordpress-base.js';
diff --git a/services/youtube/youtube-base.js b/services/youtube/youtube-base.js
index 34115a2c4fcc0..1aa69759c2347 100644
--- a/services/youtube/youtube-base.js
+++ b/services/youtube/youtube-base.js
@@ -1,5 +1,5 @@
import Joi from 'joi';
-import {BaseJsonService, NotFound} from '..';
+import {BaseJsonService, NotFound} from '../index.js';
import {metric} from '../text-formatters.js';
import {nonNegativeInteger} from '../validators.js';
From 183d0e0882cf62b88a3346a1d1cf83971912bade Mon Sep 17 00:00:00 2001
From: PyvesB
@@ -52,7 +52,4 @@ const AmoLegacyRedirect = redirector({
dateAdded: new Date('2019-02-23'),
})
-export {
- AmoWeeklyDownloads,
- AmoLegacyRedirect,
-};
+export { AmoWeeklyDownloads, AmoLegacyRedirect }
diff --git a/services/amo/amo-downloads.tester.js b/services/amo/amo-downloads.tester.js
index f7147d4579da4..b181673ec5373 100644
--- a/services/amo/amo-downloads.tester.js
+++ b/services/amo/amo-downloads.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isMetricOverTimePeriod} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isMetricOverTimePeriod } from '../test-validators.js'
export const t = new ServiceTester({
id: 'AmoDownloads',
title: 'AmoDownloads',
diff --git a/services/amo/amo-rating.service.js b/services/amo/amo-rating.service.js
index 03612d2f5e9d9..1f26f9127cf0d 100644
--- a/services/amo/amo-rating.service.js
+++ b/services/amo/amo-rating.service.js
@@ -1,6 +1,6 @@
-import {starRating} from '../text-formatters.js';
-import {floorCount as floorCountColor} from '../color-formatters.js';
-import {BaseAmoService, keywords} from './amo-base.js';
+import { starRating } from '../text-formatters.js'
+import { floorCount as floorCountColor } from '../color-formatters.js'
+import { BaseAmoService, keywords } from './amo-base.js'
export default class AmoRating extends BaseAmoService {
static category = 'rating'
@@ -36,4 +36,4 @@ export default class AmoRating extends BaseAmoService {
const data = await this.fetch({ addonId })
return this.constructor.render({ format, rating: data.ratings.average })
}
-};
+}
diff --git a/services/amo/amo-rating.tester.js b/services/amo/amo-rating.tester.js
index 8a38d67fdb90c..9843273741585 100644
--- a/services/amo/amo-rating.tester.js
+++ b/services/amo/amo-rating.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isStarRating} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isStarRating } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Rating')
diff --git a/services/amo/amo-users.service.js b/services/amo/amo-users.service.js
index a1364812c8c90..0d42ee8731b35 100644
--- a/services/amo/amo-users.service.js
+++ b/services/amo/amo-users.service.js
@@ -1,5 +1,5 @@
-import {metric} from '../text-formatters.js';
-import {BaseAmoService, keywords} from './amo-base.js';
+import { metric } from '../text-formatters.js'
+import { BaseAmoService, keywords } from './amo-base.js'
export default class AmoUsers extends BaseAmoService {
static category = 'downloads'
@@ -27,4 +27,4 @@ export default class AmoUsers extends BaseAmoService {
const data = await this.fetch({ addonId })
return this.constructor.render({ users: data.average_daily_users })
}
-};
+}
diff --git a/services/amo/amo-users.tester.js b/services/amo/amo-users.tester.js
index 70d95207a538e..5355be2ce1c25 100644
--- a/services/amo/amo-users.tester.js
+++ b/services/amo/amo-users.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Users')
diff --git a/services/amo/amo-version.service.js b/services/amo/amo-version.service.js
index 7c8f6fdfca6dc..96394bba7fc44 100644
--- a/services/amo/amo-version.service.js
+++ b/services/amo/amo-version.service.js
@@ -1,5 +1,5 @@
-import {renderVersionBadge} from '../version.js';
-import {BaseAmoService, keywords} from './amo-base.js';
+import { renderVersionBadge } from '../version.js'
+import { BaseAmoService, keywords } from './amo-base.js'
export default class AmoVersion extends BaseAmoService {
static category = 'version'
@@ -18,4 +18,4 @@ export default class AmoVersion extends BaseAmoService {
const data = await this.fetch({ addonId })
return renderVersionBadge({ version: data.current_version.version })
}
-};
+}
diff --git a/services/amo/amo-version.tester.js b/services/amo/amo-version.tester.js
index 215a3d6ffea89..e900a589a6484 100644
--- a/services/amo/amo-version.tester.js
+++ b/services/amo/amo-version.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Version').get('/IndieGala-Helper.json').expectBadge({
diff --git a/services/ansible/ansible-quality.service.js b/services/ansible/ansible-quality.service.js
index c9449aaa96fc2..6af7ae16ca588 100644
--- a/services/ansible/ansible-quality.service.js
+++ b/services/ansible/ansible-quality.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {floorCount} from '../color-formatters.js';
-import {BaseJsonService, InvalidResponse} from '../index.js';
+import Joi from 'joi'
+import { floorCount } from '../color-formatters.js'
+import { BaseJsonService, InvalidResponse } from '../index.js'
const ansibleContentSchema = Joi.object({
quality_score: Joi.number().allow(null).required(),
@@ -16,9 +16,7 @@ class AnsibleGalaxyContent extends BaseJsonService {
}
}
-export default class AnsibleGalaxyContentQualityScore extends (
- AnsibleGalaxyContent
-) {
+export default class AnsibleGalaxyContentQualityScore extends AnsibleGalaxyContent {
static category = 'analysis'
static route = { base: 'ansible/quality', pattern: ':projectId' }
@@ -52,4 +50,4 @@ export default class AnsibleGalaxyContentQualityScore extends (
return this.constructor.render({ qualityScore })
}
-};
+}
diff --git a/services/ansible/ansible-quality.tester.js b/services/ansible/ansible-quality.tester.js
index d7606a8a5881a..4ac15bff0c845 100644
--- a/services/ansible/ansible-quality.tester.js
+++ b/services/ansible/ansible-quality.tester.js
@@ -1,5 +1,5 @@
-import {nonNegativeInteger} from '../validators.js';
-import {createServiceTester} from '../tester.js'
+import { nonNegativeInteger } from '../validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('quality score (valid)')
diff --git a/services/ansible/ansible-role.service.js b/services/ansible/ansible-role.service.js
index 2553f6f0f03e9..aa1cdcb7731c9 100644
--- a/services/ansible/ansible-role.service.js
+++ b/services/ansible/ansible-role.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {downloadCount} from '../color-formatters.js';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { downloadCount } from '../color-formatters.js'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const ansibleRoleSchema = Joi.object({
download_count: nonNegativeInteger,
@@ -78,7 +78,4 @@ class AnsibleGalaxyRoleName extends AnsibleGalaxyRole {
}
}
-export {
- AnsibleGalaxyRoleDownloads,
- AnsibleGalaxyRoleName,
-};
+export { AnsibleGalaxyRoleDownloads, AnsibleGalaxyRoleName }
diff --git a/services/ansible/ansible-role.tester.js b/services/ansible/ansible-role.tester.js
index 4ab60f330efd2..8679789fa0a83 100644
--- a/services/ansible/ansible-role.tester.js
+++ b/services/ansible/ansible-role.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {ServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'AnsibleRole',
title: 'AnsibleRole',
diff --git a/services/apm/apm.service.js b/services/apm/apm.service.js
index 5ac3ab23cce29..681bd0d46504b 100644
--- a/services/apm/apm.service.js
+++ b/services/apm/apm.service.js
@@ -1,9 +1,9 @@
-import Joi from 'joi';
-import {renderLicenseBadge} from '../licenses.js';
-import {renderVersionBadge} from '../version.js';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, InvalidResponse} from '../index.js';
+import Joi from 'joi'
+import { renderLicenseBadge } from '../licenses.js'
+import { renderVersionBadge } from '../version.js'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService, InvalidResponse } from '../index.js'
const keywords = ['atom']
@@ -114,8 +114,4 @@ class APMLicense extends BaseAPMService {
}
}
-export {
- APMDownloads,
- APMVersion,
- APMLicense,
-};
+export { APMDownloads, APMVersion, APMLicense }
diff --git a/services/apm/apm.tester.js b/services/apm/apm.tester.js
index 2ce60c8b30eec..ed6f7c861e54a 100644
--- a/services/apm/apm.tester.js
+++ b/services/apm/apm.tester.js
@@ -1,6 +1,6 @@
-import {ServiceTester} from '../tester.js';
-import {invalidJSON} from '../response-fixtures.js';
-import {isMetric, isVPlusTripleDottedVersion} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { invalidJSON } from '../response-fixtures.js'
+import { isMetric, isVPlusTripleDottedVersion } from '../test-validators.js'
export const t = new ServiceTester({
id: 'apm',
diff --git a/services/appveyor/appveyor-base.js b/services/appveyor/appveyor-base.js
index b5d7e8b6a579c..923b718466cbf 100644
--- a/services/appveyor/appveyor-base.js
+++ b/services/appveyor/appveyor-base.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {isBuildStatus} from '../build-status.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { isBuildStatus } from '../build-status.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
build: Joi.object({
@@ -39,4 +39,4 @@ export default class AppVeyorBase extends BaseJsonService {
pattern: ':user/:repo/:branch*',
}
}
-};
+}
diff --git a/services/appveyor/appveyor-build-redirect.service.js b/services/appveyor/appveyor-build-redirect.service.js
index 0d2760a7907a5..61e43b31b2ccb 100644
--- a/services/appveyor/appveyor-build-redirect.service.js
+++ b/services/appveyor/appveyor-build-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
redirector({
@@ -11,4 +11,4 @@ export default [
`/appveyor/build/${user}/${repo}${branch ? `/${branch}` : ''}`,
dateAdded: new Date('2019-12-10'),
}),
-];
+]
diff --git a/services/appveyor/appveyor-build-redirect.tester.js b/services/appveyor/appveyor-build-redirect.tester.js
index 474822da9fca5..40ad8049d48c8 100644
--- a/services/appveyor/appveyor-build-redirect.tester.js
+++ b/services/appveyor/appveyor-build-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'AppveyorBuildRedirect',
diff --git a/services/appveyor/appveyor-build.service.js b/services/appveyor/appveyor-build.service.js
index 3a1c9603f3fdd..29cb395835394 100644
--- a/services/appveyor/appveyor-build.service.js
+++ b/services/appveyor/appveyor-build.service.js
@@ -1,5 +1,5 @@
-import {renderBuildStatusBadge} from '../build-status.js';
-import AppVeyorBase from './appveyor-base.js';
+import { renderBuildStatusBadge } from '../build-status.js'
+import AppVeyorBase from './appveyor-base.js'
export default class AppVeyorBuild extends AppVeyorBase {
static route = this.buildRoute('appveyor/build')
@@ -31,4 +31,4 @@ export default class AppVeyorBuild extends AppVeyorBase {
}
return this.constructor.render({ status: data.build.status })
}
-};
+}
diff --git a/services/appveyor/appveyor-build.tester.js b/services/appveyor/appveyor-build.tester.js
index 6b491f96f1765..b1141067e49b0 100644
--- a/services/appveyor/appveyor-build.tester.js
+++ b/services/appveyor/appveyor-build.tester.js
@@ -1,5 +1,5 @@
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('CI status')
diff --git a/services/appveyor/appveyor-job-build.service.js b/services/appveyor/appveyor-job-build.service.js
index a890331dd9af1..fc856aa7f25a2 100644
--- a/services/appveyor/appveyor-job-build.service.js
+++ b/services/appveyor/appveyor-job-build.service.js
@@ -1,6 +1,6 @@
-import {renderBuildStatusBadge} from '../build-status.js';
-import {NotFound} from '../index.js';
-import AppVeyorBase from './appveyor-base.js';
+import { renderBuildStatusBadge } from '../build-status.js'
+import { NotFound } from '../index.js'
+import AppVeyorBase from './appveyor-base.js'
export default class AppVeyorJobBuild extends AppVeyorBase {
static route = {
@@ -59,4 +59,4 @@ export default class AppVeyorJobBuild extends AppVeyorBase {
const { status } = this.transform({ data, jobName: job })
return renderBuildStatusBadge({ status })
}
-};
+}
diff --git a/services/appveyor/appveyor-job-build.spec.js b/services/appveyor/appveyor-job-build.spec.js
index 4cfb58d597382..4e83a26fd427d 100644
--- a/services/appveyor/appveyor-job-build.spec.js
+++ b/services/appveyor/appveyor-job-build.spec.js
@@ -1,7 +1,7 @@
-import {expect} from 'chai';
-import {test, given} from 'sazerac';
-import {NotFound} from '../index.js';
-import AppveyorJobBuild from './appveyor-job-build.service.js';
+import { expect } from 'chai'
+import { test, given } from 'sazerac'
+import { NotFound } from '../index.js'
+import AppveyorJobBuild from './appveyor-job-build.service.js'
describe('AppveyorJobBuild', function () {
test(AppveyorJobBuild.prototype.transform, () => {
diff --git a/services/appveyor/appveyor-job-build.tester.js b/services/appveyor/appveyor-job-build.tester.js
index 5bc2b52ec19ed..a31306e30ec00 100644
--- a/services/appveyor/appveyor-job-build.tester.js
+++ b/services/appveyor/appveyor-job-build.tester.js
@@ -1,5 +1,5 @@
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Job CI status')
diff --git a/services/appveyor/appveyor-tests.service.js b/services/appveyor/appveyor-tests.service.js
index c0fdbf288bca7..465130445eb49 100644
--- a/services/appveyor/appveyor-tests.service.js
+++ b/services/appveyor/appveyor-tests.service.js
@@ -1,5 +1,8 @@
-import {testResultQueryParamSchema, renderTestResultBadge} from '../test-results.js';
-import AppVeyorBase from './appveyor-base.js';
+import {
+ testResultQueryParamSchema,
+ renderTestResultBadge,
+} from '../test-results.js'
+import AppVeyorBase from './appveyor-base.js'
const documentation = `
@@ -158,4 +161,4 @@ export default class AppVeyorTests extends AppVeyorBase {
isCompact,
})
}
-};
+}
diff --git a/services/appveyor/appveyor-tests.tester.js b/services/appveyor/appveyor-tests.tester.js
index eaee7f907544c..102f532d29958 100644
--- a/services/appveyor/appveyor-tests.tester.js
+++ b/services/appveyor/appveyor-tests.tester.js
@@ -1,6 +1,6 @@
-import queryString from 'querystring';
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import queryString from 'querystring'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isAppveyorTestTotals = Joi.string().regex(
diff --git a/services/archlinux/archlinux.service.js b/services/archlinux/archlinux.service.js
index 26d715c4c2978..c3ee192b13fdc 100644
--- a/services/archlinux/archlinux.service.js
+++ b/services/archlinux/archlinux.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
pkgver: Joi.string().required(),
@@ -38,4 +38,4 @@ export default class ArchLinux extends BaseJsonService {
})
return renderVersionBadge({ version: data.pkgver })
}
-};
+}
diff --git a/services/archlinux/archlinux.tester.js b/services/archlinux/archlinux.tester.js
index 15a0099afaafe..d92b65464b2cd 100644
--- a/services/archlinux/archlinux.tester.js
+++ b/services/archlinux/archlinux.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionNClausesWithOptionalSuffixAndEpoch} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionNClausesWithOptionalSuffixAndEpoch } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Arch Linux package (valid)')
diff --git a/services/aur/aur.service.js b/services/aur/aur.service.js
index c2b276f7bf598..901e8e0bf9915 100644
--- a/services/aur/aur.service.js
+++ b/services/aur/aur.service.js
@@ -1,8 +1,11 @@
-import Joi from 'joi';
-import {floorCount as floorCountColor, age as ageColor} from '../color-formatters.js';
-import {addv, metric, formatDate} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, NotFound, InvalidResponse} from '../index.js';
+import Joi from 'joi'
+import {
+ floorCount as floorCountColor,
+ age as ageColor,
+} from '../color-formatters.js'
+import { addv, metric, formatDate } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService, NotFound, InvalidResponse } from '../index.js'
const aurSchema = Joi.object({
resultcount: nonNegativeInteger,
@@ -193,10 +196,4 @@ class AurLastModified extends BaseAurService {
}
}
-export {
- AurLicense,
- AurVersion,
- AurVotes,
- AurMaintainer,
- AurLastModified,
-};
+export { AurLicense, AurVersion, AurVotes, AurMaintainer, AurLastModified }
diff --git a/services/aur/aur.spec.js b/services/aur/aur.spec.js
index 1a79b69ec02fb..0bdc44bec721b 100644
--- a/services/aur/aur.spec.js
+++ b/services/aur/aur.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import {AurVersion} from './aur.service.js';
+import { test, given } from 'sazerac'
+import { AurVersion } from './aur.service.js'
describe('AurVersion', function () {
test(AurVersion.render, () => {
diff --git a/services/aur/aur.tester.js b/services/aur/aur.tester.js
index 73332274bff26..c6026d4f351af 100644
--- a/services/aur/aur.tester.js
+++ b/services/aur/aur.tester.js
@@ -1,5 +1,9 @@
-import {ServiceTester} from '../tester.js';
-import {isVPlusDottedVersionNClausesWithOptionalSuffix, isMetric, isFormattedDate} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import {
+ isVPlusDottedVersionNClausesWithOptionalSuffix,
+ isMetric,
+ isFormattedDate,
+} from '../test-validators.js'
export const t = new ServiceTester({
id: 'aur',
diff --git a/services/azure-devops/azure-devops-base.js b/services/azure-devops/azure-devops-base.js
index 3d6dcc516b205..184530bde7c5b 100644
--- a/services/azure-devops/azure-devops-base.js
+++ b/services/azure-devops/azure-devops-base.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService, NotFound } from '../index.js'
const latestBuildSchema = Joi.object({
count: Joi.number().required(),
@@ -65,4 +65,4 @@ export default class AzureDevOpsBase extends BaseJsonService {
return json.value[0].id
}
-};
+}
diff --git a/services/azure-devops/azure-devops-build.service.js b/services/azure-devops/azure-devops-build.service.js
index 91042238f747f..8485fa49fe502 100644
--- a/services/azure-devops/azure-devops-build.service.js
+++ b/services/azure-devops/azure-devops-build.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {renderBuildStatusBadge} from '../build-status.js';
-import {BaseSvgScrapingService, NotFound} from '../index.js';
-import {keywords, fetch} from './azure-devops-helpers.js';
+import Joi from 'joi'
+import { renderBuildStatusBadge } from '../build-status.js'
+import { BaseSvgScrapingService, NotFound } from '../index.js'
+import { keywords, fetch } from './azure-devops-helpers.js'
const queryParamSchema = Joi.object({
stage: Joi.string(),
@@ -121,4 +121,4 @@ export default class AzureDevOpsBuild extends BaseSvgScrapingService {
}
return renderBuildStatusBadge({ status })
}
-};
+}
diff --git a/services/azure-devops/azure-devops-build.tester.js b/services/azure-devops/azure-devops-build.tester.js
index 819b2e632a706..73027411170a8 100644
--- a/services/azure-devops/azure-devops-build.tester.js
+++ b/services/azure-devops/azure-devops-build.tester.js
@@ -1,5 +1,5 @@
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// https://dev.azure.com/totodem/Shields.io is a public Azure DevOps project
diff --git a/services/azure-devops/azure-devops-coverage.service.js b/services/azure-devops/azure-devops-coverage.service.js
index 92f89e8733861..4234b36f48d6a 100644
--- a/services/azure-devops/azure-devops-coverage.service.js
+++ b/services/azure-devops/azure-devops-coverage.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {coveragePercentage as coveragePercentageColor} from '../color-formatters.js';
-import AzureDevOpsBase from './azure-devops-base.js';
-import {keywords} from './azure-devops-helpers.js';
+import Joi from 'joi'
+import { coveragePercentage as coveragePercentageColor } from '../color-formatters.js'
+import AzureDevOpsBase from './azure-devops-base.js'
+import { keywords } from './azure-devops-helpers.js'
const documentation = `
@@ -126,4 +126,4 @@ export default class AzureDevOpsCoverage extends AzureDevOpsBase {
const coverage = covered ? (covered / total) * 100 : 0
return this.constructor.render({ coverage })
}
-};
+}
diff --git a/services/azure-devops/azure-devops-coverage.tester.js b/services/azure-devops/azure-devops-coverage.tester.js
index d1c181cb756b7..2177d9077c8bf 100644
--- a/services/azure-devops/azure-devops-coverage.tester.js
+++ b/services/azure-devops/azure-devops-coverage.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const org = 'swellaby'
diff --git a/services/azure-devops/azure-devops-helpers.js b/services/azure-devops/azure-devops-helpers.js
index 9004354a7d76a..67b457352a303 100644
--- a/services/azure-devops/azure-devops-helpers.js
+++ b/services/azure-devops/azure-devops-helpers.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {isBuildStatus} from '../build-status.js';
+import Joi from 'joi'
+import { isBuildStatus } from '../build-status.js'
const keywords = ['vso', 'vsts', 'azure-devops']
@@ -26,4 +26,4 @@ async function fetch(serviceInstance, { url, qs = {}, errorMessages }) {
return { status }
}
-export { keywords, fetch };
+export { keywords, fetch }
diff --git a/services/azure-devops/azure-devops-release.service.js b/services/azure-devops/azure-devops-release.service.js
index 914df9e521355..96393ad4b0d94 100644
--- a/services/azure-devops/azure-devops-release.service.js
+++ b/services/azure-devops/azure-devops-release.service.js
@@ -1,6 +1,6 @@
-import {renderBuildStatusBadge} from '../build-status.js';
-import {BaseSvgScrapingService} from '../index.js';
-import {keywords, fetch} from './azure-devops-helpers.js';
+import { renderBuildStatusBadge } from '../build-status.js'
+import { BaseSvgScrapingService } from '../index.js'
+import { keywords, fetch } from './azure-devops-helpers.js'
const documentation = `
@@ -57,4 +57,4 @@ export default class AzureDevOpsRelease extends BaseSvgScrapingService {
})
return renderBuildStatusBadge(props)
}
-};
+}
diff --git a/services/azure-devops/azure-devops-release.tester.js b/services/azure-devops/azure-devops-release.tester.js
index bc577047d6c9c..7ffa1d94e3275 100644
--- a/services/azure-devops/azure-devops-release.tester.js
+++ b/services/azure-devops/azure-devops-release.tester.js
@@ -1,5 +1,5 @@
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// https://dev.azure.com/totodem/Shields.io is a public Azure DevOps project
diff --git a/services/azure-devops/azure-devops-tests.service.js b/services/azure-devops/azure-devops-tests.service.js
index c6ce4474ffc40..a2939b95aebfc 100644
--- a/services/azure-devops/azure-devops-tests.service.js
+++ b/services/azure-devops/azure-devops-tests.service.js
@@ -1,6 +1,9 @@
-import Joi from 'joi';
-import {testResultQueryParamSchema, renderTestResultBadge} from '../test-results.js';
-import AzureDevOpsBase from './azure-devops-base.js';
+import Joi from 'joi'
+import {
+ testResultQueryParamSchema,
+ renderTestResultBadge,
+} from '../test-results.js'
+import AzureDevOpsBase from './azure-devops-base.js'
const commonAttrs = {
keywords: ['vso', 'vsts', 'azure-devops'],
@@ -228,4 +231,4 @@ export default class AzureDevOpsTests extends AzureDevOpsBase {
isCompact,
})
}
-};
+}
diff --git a/services/azure-devops/azure-devops-tests.tester.js b/services/azure-devops/azure-devops-tests.tester.js
index 5b36fc968fc1e..d708183ac8fa5 100644
--- a/services/azure-devops/azure-devops-tests.tester.js
+++ b/services/azure-devops/azure-devops-tests.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const org = 'azuredevops-powershell'
diff --git a/services/azure-devops/vso-redirect.service.js b/services/azure-devops/vso-redirect.service.js
index 389b091be735c..e67c703dd8eac 100644
--- a/services/azure-devops/vso-redirect.service.js
+++ b/services/azure-devops/vso-redirect.service.js
@@ -1,27 +1,27 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export const VsoBuildRedirector = redirector({
- category: 'build',
- route: {
- base: 'vso/build',
- pattern: ':organization/:projectId/:definitionId/:branch*',
- },
- transformPath: ({ organization, projectId, definitionId, branch }) => {
- let path = `/azure-devops/build/${organization}/${projectId}/${definitionId}`
- if (branch) {
- path += `/${branch}`
- }
- return path
- },
- dateAdded: new Date('2019-02-08'),
- })
+ category: 'build',
+ route: {
+ base: 'vso/build',
+ pattern: ':organization/:projectId/:definitionId/:branch*',
+ },
+ transformPath: ({ organization, projectId, definitionId, branch }) => {
+ let path = `/azure-devops/build/${organization}/${projectId}/${definitionId}`
+ if (branch) {
+ path += `/${branch}`
+ }
+ return path
+ },
+ dateAdded: new Date('2019-02-08'),
+})
export const VsoReleaseRedirector = redirector({
- category: 'build',
- route: {
- base: 'vso/release',
- pattern: ':organization/:projectId/:definitionId/:environmentId',
- },
- transformPath: ({ organization, projectId, definitionId, environmentId }) =>
- `/azure-devops/release/${organization}/${projectId}/${definitionId}/${environmentId}`,
- dateAdded: new Date('2019-02-08'),
- })
+ category: 'build',
+ route: {
+ base: 'vso/release',
+ pattern: ':organization/:projectId/:definitionId/:environmentId',
+ },
+ transformPath: ({ organization, projectId, definitionId, environmentId }) =>
+ `/azure-devops/release/${organization}/${projectId}/${definitionId}/${environmentId}`,
+ dateAdded: new Date('2019-02-08'),
+})
diff --git a/services/azure-devops/vso-redirect.tester.js b/services/azure-devops/vso-redirect.tester.js
index a42a75b861ed7..d36f81ca2779e 100644
--- a/services/azure-devops/vso-redirect.tester.js
+++ b/services/azure-devops/vso-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'vso',
diff --git a/services/beerpay/beerpay.service.js b/services/beerpay/beerpay.service.js
index 1e99d39416fed..1f9bc1545056f 100644
--- a/services/beerpay/beerpay.service.js
+++ b/services/beerpay/beerpay.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
total_amount: Joi.number().min(0).required(),
@@ -38,4 +38,4 @@ export default class Beerpay extends BaseJsonService {
})
return this.constructor.render({ totalAmount })
}
-};
+}
diff --git a/services/beerpay/beerpay.tester.js b/services/beerpay/beerpay.tester.js
index 1010f26a20552..cc85ddc375395 100644
--- a/services/beerpay/beerpay.tester.js
+++ b/services/beerpay/beerpay.tester.js
@@ -1,5 +1,5 @@
-import {withRegex} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { withRegex } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const amountOfMoney = withRegex(/^\$[0-9]+(\.[0-9]+)?/)
diff --git a/services/bintray/bintray.service.js b/services/bintray/bintray.service.js
index 7780e4df8f1a6..f181fb2c25354 100644
--- a/services/bintray/bintray.service.js
+++ b/services/bintray/bintray.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default [
deprecatedService({
@@ -19,4 +19,4 @@ export default [
label: 'bintray',
dateAdded: new Date('2021-04-24'),
}),
-];
+]
diff --git a/services/bintray/bintray.tester.js b/services/bintray/bintray.tester.js
index c93a2f8cefcea..cc55f5bdba1ca 100644
--- a/services/bintray/bintray.tester.js
+++ b/services/bintray/bintray.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'bintray',
diff --git a/services/bit/bit-components.service.js b/services/bit/bit-components.service.js
index 954fe0ecb1ff0..e2236639034b7 100644
--- a/services/bit/bit-components.service.js
+++ b/services/bit/bit-components.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {downloadCount} from '../color-formatters.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { downloadCount } from '../color-formatters.js'
+import { BaseJsonService } from '../index.js'
const collectionSchema = Joi.object({
payload: Joi.object({
@@ -47,4 +47,4 @@ export default class BitComponents extends BaseJsonService {
const json = await this.fetch({ owner, collection })
return this.constructor.render({ count: json.payload.totalComponents })
}
-};
+}
diff --git a/services/bit/bit-components.tester.js b/services/bit/bit-components.tester.js
index 64363242b2851..2f6dee749d2f7 100644
--- a/services/bit/bit-components.tester.js
+++ b/services/bit/bit-components.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isMetric} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isMetric } from '../test-validators.js'
export const t = await createServiceTester()
t.create('collection (valid)').get('/ramda/ramda.json').expectBadge({
diff --git a/services/bitbucket/bitbucket-issues.service.js b/services/bitbucket/bitbucket-issues.service.js
index c87a2caffc816..9bcf5a5b92fbd 100644
--- a/services/bitbucket/bitbucket-issues.service.js
+++ b/services/bitbucket/bitbucket-issues.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const bitbucketIssuesSchema = Joi.object({
size: nonNegativeInteger,
diff --git a/services/bitbucket/bitbucket-issues.tester.js b/services/bitbucket/bitbucket-issues.tester.js
index f4d9f01824e0b..4bdb300b52e05 100644
--- a/services/bitbucket/bitbucket-issues.tester.js
+++ b/services/bitbucket/bitbucket-issues.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isMetric, isMetricOpenIssues} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isMetric, isMetricOpenIssues } from '../test-validators.js'
export const t = new ServiceTester({
id: 'BitbucketIssues',
diff --git a/services/bitbucket/bitbucket-pipelines.service.js b/services/bitbucket/bitbucket-pipelines.service.js
index 70262e037357e..dc28820bcdb1a 100644
--- a/services/bitbucket/bitbucket-pipelines.service.js
+++ b/services/bitbucket/bitbucket-pipelines.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderBuildStatusBadge} from '../build-status.js';
-import {BaseJsonService, redirector} from '../index.js';
+import Joi from 'joi'
+import { renderBuildStatusBadge } from '../build-status.js'
+import { BaseJsonService, redirector } from '../index.js'
const bitbucketPipelinesSchema = Joi.object({
values: Joi.array()
@@ -94,7 +94,4 @@ const BitbucketPipelinesRedirector = redirector({
dateAdded: new Date('2020-07-12'),
})
-export {
- BitbucketPipelines,
- BitbucketPipelinesRedirector,
-};
+export { BitbucketPipelines, BitbucketPipelinesRedirector }
diff --git a/services/bitbucket/bitbucket-pipelines.tester.js b/services/bitbucket/bitbucket-pipelines.tester.js
index 56b07053c639c..1fe7293a8a7cb 100644
--- a/services/bitbucket/bitbucket-pipelines.tester.js
+++ b/services/bitbucket/bitbucket-pipelines.tester.js
@@ -1,5 +1,5 @@
-import {isBuildStatus} from '../build-status.js';
-import {ServiceTester} from '../tester.js';
+import { isBuildStatus } from '../build-status.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'BitbucketPipelines',
title: 'Bitbucket Pipelines',
diff --git a/services/bitbucket/bitbucket-pull-request.service.js b/services/bitbucket/bitbucket-pull-request.service.js
index f069293c573e3..add3ad820f96b 100644
--- a/services/bitbucket/bitbucket-pull-request.service.js
+++ b/services/bitbucket/bitbucket-pull-request.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {AuthHelper} from '../../core/base-service/auth-helper.js';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger, optionalUrl} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { AuthHelper } from '../../core/base-service/auth-helper.js'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger, optionalUrl } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
size: nonNegativeInteger,
diff --git a/services/bitbucket/bitbucket-pull-request.spec.js b/services/bitbucket/bitbucket-pull-request.spec.js
index 5b085b5f97310..565a2c1634777 100644
--- a/services/bitbucket/bitbucket-pull-request.spec.js
+++ b/services/bitbucket/bitbucket-pull-request.spec.js
@@ -1,7 +1,7 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import {BitbucketRawPullRequests} from './bitbucket-pull-request.service.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import { BitbucketRawPullRequests } from './bitbucket-pull-request.service.js'
describe('BitbucketPullRequest', function () {
cleanUpNockAfterEach()
diff --git a/services/bitbucket/bitbucket-pull-request.tester.js b/services/bitbucket/bitbucket-pull-request.tester.js
index b5fde795cefd6..c9ab932578836 100644
--- a/services/bitbucket/bitbucket-pull-request.tester.js
+++ b/services/bitbucket/bitbucket-pull-request.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isMetric, isMetricOpenIssues} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isMetric, isMetricOpenIssues } from '../test-validators.js'
export const t = new ServiceTester({
id: 'BitbucketPullRequest',
diff --git a/services/bithound/bithound.service.js b/services/bithound/bithound.service.js
index fe8746cd812c1..1898317b547af 100644
--- a/services/bithound/bithound.service.js
+++ b/services/bithound/bithound.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
category: 'dependencies',
@@ -8,4 +8,4 @@ export default deprecatedService({
},
label: 'bithound',
dateAdded: new Date('2018-07-08'),
-});
+})
diff --git a/services/bithound/bithound.tester.js b/services/bithound/bithound.tester.js
index 41531ff39fc74..03bbf3c049bcd 100644
--- a/services/bithound/bithound.tester.js
+++ b/services/bithound/bithound.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'bithound',
diff --git a/services/bitrise/bitrise.service.js b/services/bitrise/bitrise.service.js
index 568cdb40e64f2..ee76f55972efb 100644
--- a/services/bitrise/bitrise.service.js
+++ b/services/bitrise/bitrise.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
// https://devcenter.bitrise.io/api/app-status-badge/
const schema = Joi.object({
@@ -65,4 +65,4 @@ export default class Bitrise extends BaseJsonService {
const { status } = await this.fetch({ appId, branch, token })
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/bitrise/bitrise.tester.js b/services/bitrise/bitrise.tester.js
index 5df6deafd619d..26c2b238ad96e 100644
--- a/services/bitrise/bitrise.tester.js
+++ b/services/bitrise/bitrise.tester.js
@@ -1,5 +1,5 @@
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('deploy status')
diff --git a/services/bountysource/bountysource.service.js b/services/bountysource/bountysource.service.js
index f6df4f3d10e5f..1bb4b81aff9f9 100644
--- a/services/bountysource/bountysource.service.js
+++ b/services/bountysource/bountysource.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {metric} from '../text-formatters.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { metric } from '../text-formatters.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({ activity_total: nonNegativeInteger })
@@ -41,4 +41,4 @@ export default class Bountysource extends BaseJsonService {
const json = await this.fetch({ team })
return this.constructor.render({ total: json.activity_total })
}
-};
+}
diff --git a/services/bountysource/bountysource.tester.js b/services/bountysource/bountysource.tester.js
index 1eaf2b42df877..cec68a500c333 100644
--- a/services/bountysource/bountysource.tester.js
+++ b/services/bountysource/bountysource.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import { isMetric } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'bountysource',
diff --git a/services/bower/bower-base.js b/services/bower/bower-base.js
index f144155f8b04d..43a70542895ca 100644
--- a/services/bower/bower-base.js
+++ b/services/bower/bower-base.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object()
.keys({
@@ -27,4 +27,4 @@ export default class BaseBowerService extends BaseJsonService {
},
})
}
-};
+}
diff --git a/services/bower/bower-license.service.js b/services/bower/bower-license.service.js
index 199a20f40360b..24476a20d60d2 100644
--- a/services/bower/bower-license.service.js
+++ b/services/bower/bower-license.service.js
@@ -1,5 +1,5 @@
-import {renderLicenseBadge} from '../licenses.js';
-import BaseBowerService from './bower-base.js';
+import { renderLicenseBadge } from '../licenses.js'
+import BaseBowerService from './bower-base.js'
export default class BowerLicense extends BaseBowerService {
static category = 'license'
@@ -19,4 +19,4 @@ export default class BowerLicense extends BaseBowerService {
const data = await this.fetch({ packageName })
return renderLicenseBadge({ licenses: data.normalized_licenses })
}
-};
+}
diff --git a/services/bower/bower-license.tester.js b/services/bower/bower-license.tester.js
index 10ddaf8b7e178..18ba64b760210 100644
--- a/services/bower/bower-license.tester.js
+++ b/services/bower/bower-license.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('licence')
diff --git a/services/bower/bower-version.service.js b/services/bower/bower-version.service.js
index ce03d6910a39d..277d704021d88 100644
--- a/services/bower/bower-version.service.js
+++ b/services/bower/bower-version.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {InvalidResponse, redirector} from '../index.js';
-import BaseBowerService from './bower-base.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { InvalidResponse, redirector } from '../index.js'
+import BaseBowerService from './bower-base.js'
const queryParamSchema = Joi.object({
include_prereleases: Joi.equal(''),
@@ -55,4 +55,4 @@ const BowerVersionRedirect = redirector({
dateAdded: new Date('2019-12-15'),
})
-export { BowerVersion, BowerVersionRedirect };
+export { BowerVersion, BowerVersionRedirect }
diff --git a/services/bower/bower-version.tester.js b/services/bower/bower-version.tester.js
index 0648198205da2..acccf3a756fec 100644
--- a/services/bower/bower-version.tester.js
+++ b/services/bower/bower-version.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import Joi from 'joi'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'BowerVersion',
title: 'Bower Version',
diff --git a/services/bstats/bstats-players.service.js b/services/bstats/bstats-players.service.js
index 3ce6bbe8cb5a2..5b8eccd36f741 100644
--- a/services/bstats/bstats-players.service.js
+++ b/services/bstats/bstats-players.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.array()
.items(Joi.array().items(Joi.number().required(), Joi.number().required()))
@@ -52,4 +52,4 @@ export default class BStatsPlayers extends BaseJsonService {
const { players } = this.transform({ json })
return this.constructor.render({ players })
}
-};
+}
diff --git a/services/bstats/bstats-players.tester.js b/services/bstats/bstats-players.tester.js
index 6c91419c94ddf..31b84be9fd645 100644
--- a/services/bstats/bstats-players.tester.js
+++ b/services/bstats/bstats-players.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Players').get('/1.json').expectBadge({
diff --git a/services/bstats/bstats-servers.service.js b/services/bstats/bstats-servers.service.js
index f0738b2577db0..f90f95397acd6 100644
--- a/services/bstats/bstats-servers.service.js
+++ b/services/bstats/bstats-servers.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.array()
.items(Joi.array().items(Joi.number().required(), Joi.number().required()))
@@ -52,4 +52,4 @@ export default class BStatsServers extends BaseJsonService {
const { servers } = this.transform({ json })
return this.constructor.render({ servers })
}
-};
+}
diff --git a/services/bstats/bstats-servers.tester.js b/services/bstats/bstats-servers.tester.js
index cf87b30ae9757..c673891b67cc6 100644
--- a/services/bstats/bstats-servers.tester.js
+++ b/services/bstats/bstats-servers.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Servers').get('/1.json').expectBadge({
diff --git a/services/bugzilla/bugzilla.service.js b/services/bugzilla/bugzilla.service.js
index 6bbb58604c674..aadc849eedd0d 100644
--- a/services/bugzilla/bugzilla.service.js
+++ b/services/bugzilla/bugzilla.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {optionalUrl} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { optionalUrl } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const queryParamSchema = Joi.object({
baseUrl: optionalUrl,
@@ -113,4 +113,4 @@ export default class Bugzilla extends BaseJsonService {
resolution: data.bugs[0].resolution,
})
}
-};
+}
diff --git a/services/bugzilla/bugzilla.spec.js b/services/bugzilla/bugzilla.spec.js
index d172813f881d8..114e29fa429e0 100644
--- a/services/bugzilla/bugzilla.spec.js
+++ b/services/bugzilla/bugzilla.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import Bugzilla from './bugzilla.service.js';
+import { test, given } from 'sazerac'
+import Bugzilla from './bugzilla.service.js'
describe('getDisplayStatus function', function () {
it('formats status correctly', async function () {
diff --git a/services/bugzilla/bugzilla.tester.js b/services/bugzilla/bugzilla.tester.js
index 507fd16c8e01a..f3489bfee520d 100644
--- a/services/bugzilla/bugzilla.tester.js
+++ b/services/bugzilla/bugzilla.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const bzBugStatus = Joi.equal(
diff --git a/services/build-status.js b/services/build-status.js
index 49d9175bdd044..9b33b6c2be907 100644
--- a/services/build-status.js
+++ b/services/build-status.js
@@ -1,4 +1,4 @@
-import Joi from 'joi';
+import Joi from 'joi'
const greenStatuses = [
'fixed',
@@ -72,4 +72,4 @@ function renderBuildStatusBadge({ label, status }) {
}
}
-export { isBuildStatus, renderBuildStatusBadge };
+export { isBuildStatus, renderBuildStatusBadge }
diff --git a/services/build-status.spec.js b/services/build-status.spec.js
index 03dc25b2d5c00..07cf9be308657 100644
--- a/services/build-status.spec.js
+++ b/services/build-status.spec.js
@@ -1,6 +1,6 @@
-import {expect} from 'chai';
-import {test, given, forCases} from 'sazerac';
-import {renderBuildStatusBadge} from './build-status.js';
+import { expect } from 'chai'
+import { test, given, forCases } from 'sazerac'
+import { renderBuildStatusBadge } from './build-status.js'
test(renderBuildStatusBadge, () => {
given({ label: 'build', status: 'passed' }).expect({
diff --git a/services/buildkite/buildkite.service.js b/services/buildkite/buildkite.service.js
index 9a645afe88b5e..c9cfb31648f7c 100644
--- a/services/buildkite/buildkite.service.js
+++ b/services/buildkite/buildkite.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { BaseJsonService } from '../index.js'
// unknown is a valid 'other' status for Buildkite
const schema = Joi.object({
@@ -47,4 +47,4 @@ export default class Buildkite extends BaseJsonService {
const json = await this.fetch({ identifier, branch })
return renderBuildStatusBadge({ status: json.status })
}
-};
+}
diff --git a/services/buildkite/buildkite.tester.js b/services/buildkite/buildkite.tester.js
index 02f457bebe3a0..d2819659f97d0 100644
--- a/services/buildkite/buildkite.tester.js
+++ b/services/buildkite/buildkite.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('buildkite invalid pipeline')
diff --git a/services/bundlephobia/bundlephobia.service.js b/services/bundlephobia/bundlephobia.service.js
index c17b53658d937..5609e0880ab72 100644
--- a/services/bundlephobia/bundlephobia.service.js
+++ b/services/bundlephobia/bundlephobia.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import prettyBytes from 'pretty-bytes';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import prettyBytes from 'pretty-bytes'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
size: nonNegativeInteger,
@@ -95,4 +95,4 @@ export default class Bundlephobia extends BaseJsonService {
const size = format === 'min' ? json.size : json.gzip
return this.constructor.render({ format, size })
}
-};
+}
diff --git a/services/bundlephobia/bundlephobia.tester.js b/services/bundlephobia/bundlephobia.tester.js
index 95222627a95d1..525bff0e026b3 100644
--- a/services/bundlephobia/bundlephobia.tester.js
+++ b/services/bundlephobia/bundlephobia.tester.js
@@ -1,5 +1,5 @@
-import {isFileSize} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isFileSize } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const formats = {
diff --git a/services/categories.js b/services/categories.js
index 86d3b8af63bdf..a17077b32db23 100644
--- a/services/categories.js
+++ b/services/categories.js
@@ -20,4 +20,4 @@ export default [
{ id: 'monitoring', name: 'Monitoring', keywords: ['monitoring'] },
{ id: 'activity', name: 'Activity', keywords: ['activity'] },
{ id: 'other', name: 'Other', keywords: [] },
-];
+]
diff --git a/services/cauditor/cauditor.service.js b/services/cauditor/cauditor.service.js
index 0c0fcf36e5785..85b64cab52109 100644
--- a/services/cauditor/cauditor.service.js
+++ b/services/cauditor/cauditor.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
category: 'other',
@@ -8,4 +8,4 @@ export default deprecatedService({
},
label: 'cauditor',
dateAdded: new Date('2018-02-15'),
-});
+})
diff --git a/services/cauditor/cauditor.tester.js b/services/cauditor/cauditor.tester.js
index 75a5768faae38..14c96f7e3e1e6 100644
--- a/services/cauditor/cauditor.tester.js
+++ b/services/cauditor/cauditor.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'cauditor',
diff --git a/services/cdnjs/cdnjs.service.js b/services/cdnjs/cdnjs.service.js
index ae50273584248..d1d9e967f59b2 100644
--- a/services/cdnjs/cdnjs.service.js
+++ b/services/cdnjs/cdnjs.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { BaseJsonService, NotFound } from '../index.js'
const cdnjsSchema = Joi.object({
// optional due to non-standard 'not found' condition
@@ -43,4 +43,4 @@ export default class Cdnjs extends BaseJsonService {
return this.constructor.render({ version: json.version })
}
-};
+}
diff --git a/services/cdnjs/cdnjs.tester.js b/services/cdnjs/cdnjs.tester.js
index 8c113be24e0d4..a2da7ec37576c 100644
--- a/services/cdnjs/cdnjs.tester.js
+++ b/services/cdnjs/cdnjs.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusTripleDottedVersion} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusTripleDottedVersion } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('cdnjs (valid)').get('/jquery.json').expectBadge({
diff --git a/services/check-services.spec.js b/services/check-services.spec.js
index e99253c6d98af..8ee0365156ac7 100644
--- a/services/check-services.spec.js
+++ b/services/check-services.spec.js
@@ -1,4 +1,4 @@
-import {checkNames, collectDefinitions} from '../core/base-service/loader.js';
+import { checkNames, collectDefinitions } from '../core/base-service/loader.js'
// When these tests fail, they will throw AssertionErrors. Wrapping them in an
// `expect().not.to.throw()` makes the error output unreadable.
diff --git a/services/chocolatey/chocolatey.service.js b/services/chocolatey/chocolatey.service.js
index 734683b2c8e4d..584c6c9f14c50 100644
--- a/services/chocolatey/chocolatey.service.js
+++ b/services/chocolatey/chocolatey.service.js
@@ -1,4 +1,4 @@
-import {createServiceFamily} from '../nuget/nuget-v2-service-family.js';
+import { createServiceFamily } from '../nuget/nuget-v2-service-family.js'
export default createServiceFamily({
defaultLabel: 'chocolatey',
@@ -10,4 +10,4 @@ export default createServiceFamily({
exampleVersion: '2.19.2',
examplePrereleaseVersion: '2.19.2',
exampleDownloadCount: 2.2e6,
-});
+})
diff --git a/services/chocolatey/chocolatey.tester.js b/services/chocolatey/chocolatey.tester.js
index e185869640943..6c2a3a18decd1 100644
--- a/services/chocolatey/chocolatey.tester.js
+++ b/services/chocolatey/chocolatey.tester.js
@@ -1,5 +1,9 @@
-import {isMetric, isVPlusDottedVersionNClauses, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import {
+ isMetric,
+ isVPlusDottedVersionNClauses,
+ isVPlusDottedVersionNClausesWithOptionalSuffix,
+} from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'chocolatey',
diff --git a/services/chrome-web-store/chrome-web-store-base.js b/services/chrome-web-store/chrome-web-store-base.js
index f8893b9dc71b8..77e917c2b71a4 100644
--- a/services/chrome-web-store/chrome-web-store-base.js
+++ b/services/chrome-web-store/chrome-web-store-base.js
@@ -1,6 +1,6 @@
-import ChromeWebStore from 'webextension-store-meta/lib/chrome-web-store/index.js';
-import checkErrorResponse from '../../core/base-service/check-error-response.js';
-import {BaseService, Inaccessible} from '../index.js';
+import ChromeWebStore from 'webextension-store-meta/lib/chrome-web-store/index.js'
+import checkErrorResponse from '../../core/base-service/check-error-response.js'
+import { BaseService, Inaccessible } from '../index.js'
export default class BaseChromeWebStoreService extends BaseService {
async fetch({ storeId }) {
@@ -15,4 +15,4 @@ export default class BaseChromeWebStoreService extends BaseService {
return checkErrorResponse({})({ buffer: '', res: e })
}
}
-};
+}
diff --git a/services/chrome-web-store/chrome-web-store-price.service.js b/services/chrome-web-store/chrome-web-store-price.service.js
index b0cd9d3904c00..99068389d04b6 100644
--- a/services/chrome-web-store/chrome-web-store-price.service.js
+++ b/services/chrome-web-store/chrome-web-store-price.service.js
@@ -1,6 +1,6 @@
-import {currencyFromCode} from '../text-formatters.js';
-import {NotFound} from '../index.js';
-import BaseChromeWebStoreService from './chrome-web-store-base.js';
+import { currencyFromCode } from '../text-formatters.js'
+import { NotFound } from '../index.js'
+import BaseChromeWebStoreService from './chrome-web-store-base.js'
export default class ChromeWebStorePrice extends BaseChromeWebStoreService {
static category = 'funding'
@@ -32,4 +32,4 @@ export default class ChromeWebStorePrice extends BaseChromeWebStoreService {
}
return this.constructor.render({ priceCurrency, price })
}
-};
+}
diff --git a/services/chrome-web-store/chrome-web-store-price.tester.js b/services/chrome-web-store/chrome-web-store-price.tester.js
index 7eacd88daa68f..8c017faf5774c 100644
--- a/services/chrome-web-store/chrome-web-store-price.tester.js
+++ b/services/chrome-web-store/chrome-web-store-price.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Price')
diff --git a/services/chrome-web-store/chrome-web-store-rating.service.js b/services/chrome-web-store/chrome-web-store-rating.service.js
index 5cd3141db7a76..5c273b5357961 100644
--- a/services/chrome-web-store/chrome-web-store-rating.service.js
+++ b/services/chrome-web-store/chrome-web-store-rating.service.js
@@ -1,7 +1,7 @@
-import {floorCount as floorCountColor} from '../color-formatters.js';
-import {metric, starRating} from '../text-formatters.js';
-import {NotFound} from '../index.js';
-import BaseChromeWebStoreService from './chrome-web-store-base.js';
+import { floorCount as floorCountColor } from '../color-formatters.js'
+import { metric, starRating } from '../text-formatters.js'
+import { NotFound } from '../index.js'
+import BaseChromeWebStoreService from './chrome-web-store-base.js'
class BaseChromeWebStoreRating extends BaseChromeWebStoreService {
static category = 'rating'
@@ -110,4 +110,4 @@ export {
ChromeWebStoreRating,
ChromeWebStoreRatingCount,
ChromeWebStoreRatingStars,
-};
+}
diff --git a/services/chrome-web-store/chrome-web-store-rating.tester.js b/services/chrome-web-store/chrome-web-store-rating.tester.js
index 6c32e2eb2775d..3d4f20c1d5f32 100644
--- a/services/chrome-web-store/chrome-web-store-rating.tester.js
+++ b/services/chrome-web-store/chrome-web-store-rating.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isStarRating} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import Joi from 'joi'
+import { isStarRating } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'ChromeWebStoreRating',
diff --git a/services/chrome-web-store/chrome-web-store-users.service.js b/services/chrome-web-store/chrome-web-store-users.service.js
index dd0e8d402ef93..7e8341c9694e2 100644
--- a/services/chrome-web-store/chrome-web-store-users.service.js
+++ b/services/chrome-web-store/chrome-web-store-users.service.js
@@ -1,7 +1,7 @@
-import {metric} from '../text-formatters.js';
-import {downloadCount} from '../color-formatters.js';
-import {redirector, NotFound} from '../index.js';
-import BaseChromeWebStoreService from './chrome-web-store-base.js';
+import { metric } from '../text-formatters.js'
+import { downloadCount } from '../color-formatters.js'
+import { redirector, NotFound } from '../index.js'
+import BaseChromeWebStoreService from './chrome-web-store-base.js'
class ChromeWebStoreUsers extends BaseChromeWebStoreService {
static category = 'downloads'
@@ -44,7 +44,4 @@ const ChromeWebStoreDownloads = redirector({
dateAdded: new Date('2019-02-27'),
})
-export {
- ChromeWebStoreDownloads,
- ChromeWebStoreUsers,
-};
+export { ChromeWebStoreDownloads, ChromeWebStoreUsers }
diff --git a/services/chrome-web-store/chrome-web-store-users.tester.js b/services/chrome-web-store/chrome-web-store-users.tester.js
index e27644a4752c8..d00b6c3c13217 100644
--- a/services/chrome-web-store/chrome-web-store-users.tester.js
+++ b/services/chrome-web-store/chrome-web-store-users.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import { isMetric } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'ChromeWebStoreUsers',
diff --git a/services/chrome-web-store/chrome-web-store-version.service.js b/services/chrome-web-store/chrome-web-store-version.service.js
index a7249241347ae..e9e42af9596a0 100644
--- a/services/chrome-web-store/chrome-web-store-version.service.js
+++ b/services/chrome-web-store/chrome-web-store-version.service.js
@@ -1,6 +1,6 @@
-import {renderVersionBadge} from '../version.js';
-import {NotFound} from '../index.js';
-import BaseChromeWebStoreService from './chrome-web-store-base.js';
+import { renderVersionBadge } from '../version.js'
+import { NotFound } from '../index.js'
+import BaseChromeWebStoreService from './chrome-web-store-base.js'
export default class ChromeWebStoreVersion extends BaseChromeWebStoreService {
static category = 'version'
@@ -24,4 +24,4 @@ export default class ChromeWebStoreVersion extends BaseChromeWebStoreService {
}
return renderVersionBadge({ version })
}
-};
+}
diff --git a/services/chrome-web-store/chrome-web-store-version.tester.js b/services/chrome-web-store/chrome-web-store-version.tester.js
index fa688e4f41d78..cccf0b95e14be 100644
--- a/services/chrome-web-store/chrome-web-store-version.tester.js
+++ b/services/chrome-web-store/chrome-web-store-version.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Version').get('/alhjnofcnnpeaphgeakdhkebafjcpeae.json').expectBadge({
diff --git a/services/cii-best-practices/cii-best-practices.service.js b/services/cii-best-practices/cii-best-practices.service.js
index 53861f255b48c..4aefbf8af72a5 100644
--- a/services/cii-best-practices/cii-best-practices.service.js
+++ b/services/cii-best-practices/cii-best-practices.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {colorScale, coveragePercentage} from '../color-formatters.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { colorScale, coveragePercentage } from '../color-formatters.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
badge_level: Joi.string().required(),
@@ -128,4 +128,4 @@ export default class CIIBestPracticesService extends BaseJsonService {
return this.constructor.renderSummaryBadge({ percentage })
}
}
-};
+}
diff --git a/services/cii-best-practices/cii-best-practices.tester.js b/services/cii-best-practices/cii-best-practices.tester.js
index 8de52d01a16b3..ba62ffaa11fa1 100644
--- a/services/cii-best-practices/cii-best-practices.tester.js
+++ b/services/cii-best-practices/cii-best-practices.tester.js
@@ -1,5 +1,5 @@
-import {withRegex} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { withRegex } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('level known project')
diff --git a/services/circleci/circleci.service.js b/services/circleci/circleci.service.js
index 7f92a88164b50..2087af453136a 100644
--- a/services/circleci/circleci.service.js
+++ b/services/circleci/circleci.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseSvgScrapingService, redirector} from '../index.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { BaseSvgScrapingService, redirector } from '../index.js'
const circleSchema = Joi.object({ message: isBuildStatus }).required()
const queryParamSchema = Joi.object({ token: Joi.string() }).required()
@@ -96,4 +96,4 @@ const legacyRoutes = [
}),
]
-export default {...legacyRoutes, CircleCi};
+export default { ...legacyRoutes, CircleCi }
diff --git a/services/circleci/circleci.tester.js b/services/circleci/circleci.tester.js
index 014d186361a9a..8cbda6b312e33 100644
--- a/services/circleci/circleci.tester.js
+++ b/services/circleci/circleci.tester.js
@@ -1,5 +1,5 @@
-import {isBuildStatus} from '../build-status.js';
-import {ServiceTester} from '../tester.js';
+import { isBuildStatus } from '../build-status.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'circleci',
diff --git a/services/cirrus/cirrus.service.js b/services/cirrus/cirrus.service.js
index dd1696cac16d0..437f2d630ab3c 100644
--- a/services/cirrus/cirrus.service.js
+++ b/services/cirrus/cirrus.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
subject: Joi.string().required(),
@@ -70,4 +70,4 @@ export default class Cirrus extends BaseJsonService {
return this.constructor.render(json)
}
-};
+}
diff --git a/services/cirrus/cirrus.tester.js b/services/cirrus/cirrus.tester.js
index d867aab8d7ae8..a3f6e396fb01b 100644
--- a/services/cirrus/cirrus.tester.js
+++ b/services/cirrus/cirrus.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('cirrus bad repo')
diff --git a/services/clojars/clojars-base.js b/services/clojars/clojars-base.js
index c18ce1c4cbd2e..15996eebb3797 100644
--- a/services/clojars/clojars-base.js
+++ b/services/clojars/clojars-base.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const clojarsSchema = Joi.object({
downloads: nonNegativeInteger,
@@ -19,4 +19,4 @@ class BaseClojarsService extends BaseJsonService {
}
}
-export { BaseClojarsService };
+export { BaseClojarsService }
diff --git a/services/clojars/clojars-downloads.service.js b/services/clojars/clojars-downloads.service.js
index 2ecfc5312486d..1a5932354daa7 100644
--- a/services/clojars/clojars-downloads.service.js
+++ b/services/clojars/clojars-downloads.service.js
@@ -1,6 +1,6 @@
-import {metric} from '../text-formatters.js';
-import {downloadCount as downloadsColor} from '../color-formatters.js';
-import {BaseClojarsService} from './clojars-base.js';
+import { metric } from '../text-formatters.js'
+import { downloadCount as downloadsColor } from '../color-formatters.js'
+import { BaseClojarsService } from './clojars-base.js'
export default class ClojarsDownloads extends BaseClojarsService {
static category = 'downloads'
@@ -27,4 +27,4 @@ export default class ClojarsDownloads extends BaseClojarsService {
const json = await this.fetch({ clojar })
return this.constructor.render({ downloads: json.downloads })
}
-};
+}
diff --git a/services/clojars/clojars-downloads.tester.js b/services/clojars/clojars-downloads.tester.js
index e2125b596a6a8..afb116f46d3e0 100644
--- a/services/clojars/clojars-downloads.tester.js
+++ b/services/clojars/clojars-downloads.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('clojars downloads (valid)').get('/prismic.json').expectBadge({
diff --git a/services/clojars/clojars-version.service.js b/services/clojars/clojars-version.service.js
index 3cd0d76731ecc..344eddc90110d 100644
--- a/services/clojars/clojars-version.service.js
+++ b/services/clojars/clojars-version.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {version as versionColor} from '../color-formatters.js';
-import {redirector} from '../index.js';
-import {BaseClojarsService} from './clojars-base.js';
+import Joi from 'joi'
+import { version as versionColor } from '../color-formatters.js'
+import { redirector } from '../index.js'
+import { BaseClojarsService } from './clojars-base.js'
const queryParamSchema = Joi.object({
include_prereleases: Joi.equal(''),
@@ -61,4 +61,4 @@ const ClojarsVersionRedirector = redirector({
dateAdded: new Date('2019-12-15'),
})
-export { ClojarsVersionService, ClojarsVersionRedirector };
+export { ClojarsVersionService, ClojarsVersionRedirector }
diff --git a/services/clojars/clojars-version.tester.js b/services/clojars/clojars-version.tester.js
index 6cd3b3d3d29d6..5d7e23cd35844 100644
--- a/services/clojars/clojars-version.tester.js
+++ b/services/clojars/clojars-version.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'ClojarsVersion',
title: 'Clojars Version',
diff --git a/services/cocoapods/cocoapods-apps.service.js b/services/cocoapods/cocoapods-apps.service.js
index 8aeaa4f171f87..b0b65a80bd5db 100644
--- a/services/cocoapods/cocoapods-apps.service.js
+++ b/services/cocoapods/cocoapods-apps.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
name: 'CocoapodsApps',
@@ -9,4 +9,4 @@ export default deprecatedService({
},
label: 'apps',
dateAdded: new Date('2018-01-06'),
-});
+})
diff --git a/services/cocoapods/cocoapods-apps.tester.js b/services/cocoapods/cocoapods-apps.tester.js
index 0fb4e0edef241..cba658950f401 100644
--- a/services/cocoapods/cocoapods-apps.tester.js
+++ b/services/cocoapods/cocoapods-apps.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'CocoapodsApps',
title: 'CocoapodsApps',
diff --git a/services/cocoapods/cocoapods-base.js b/services/cocoapods/cocoapods-base.js
index fbbd905e6364a..98bcbf49ded2c 100644
--- a/services/cocoapods/cocoapods-base.js
+++ b/services/cocoapods/cocoapods-base.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
version: Joi.string().required(),
@@ -21,4 +21,4 @@ export default class BaseCocoaPodsService extends BaseJsonService {
url: `https://trunk.cocoapods.org/api/v1/pods/${spec}/specs/latest`,
})
}
-};
+}
diff --git a/services/cocoapods/cocoapods-docs.service.js b/services/cocoapods/cocoapods-docs.service.js
index d980fc07a2793..a25403ad65efb 100644
--- a/services/cocoapods/cocoapods-docs.service.js
+++ b/services/cocoapods/cocoapods-docs.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {coveragePercentage as coveragePercentageColor} from '../color-formatters.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { coveragePercentage as coveragePercentageColor } from '../color-formatters.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
cocoadocs: Joi.object({
@@ -41,4 +41,4 @@ export default class CocoapodsDocs extends BaseJsonService {
const percentage = data.cocoadocs.doc_percent || 0
return this.constructor.render({ percentage })
}
-};
+}
diff --git a/services/cocoapods/cocoapods-docs.tester.js b/services/cocoapods/cocoapods-docs.tester.js
index 4c7315f5f593b..746505bc21e7f 100644
--- a/services/cocoapods/cocoapods-docs.tester.js
+++ b/services/cocoapods/cocoapods-docs.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('doc percent (valid)').get('/AFNetworking.json').expectBadge({
diff --git a/services/cocoapods/cocoapods-downloads.service.js b/services/cocoapods/cocoapods-downloads.service.js
index afd7a2b937b2b..e54056deed34e 100644
--- a/services/cocoapods/cocoapods-downloads.service.js
+++ b/services/cocoapods/cocoapods-downloads.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
name: 'CocoapodsDownloads',
@@ -9,4 +9,4 @@ export default deprecatedService({
},
label: 'downloads',
dateAdded: new Date('2018-01-06'),
-});
+})
diff --git a/services/cocoapods/cocoapods-downloads.tester.js b/services/cocoapods/cocoapods-downloads.tester.js
index b6f81138a7a83..b7dbf18ba8fbf 100644
--- a/services/cocoapods/cocoapods-downloads.tester.js
+++ b/services/cocoapods/cocoapods-downloads.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'CocoapodsDownloads',
diff --git a/services/cocoapods/cocoapods-license.service.js b/services/cocoapods/cocoapods-license.service.js
index ec9882c8989f6..95f401b054c8f 100644
--- a/services/cocoapods/cocoapods-license.service.js
+++ b/services/cocoapods/cocoapods-license.service.js
@@ -1,4 +1,4 @@
-import BaseCocoaPodsService from './cocoapods-base.js';
+import BaseCocoaPodsService from './cocoapods-base.js'
export default class CocoapodsLicense extends BaseCocoaPodsService {
static category = 'license'
@@ -35,4 +35,4 @@ export default class CocoapodsLicense extends BaseCocoaPodsService {
typeof data.license === 'object' ? data.license.type : data.license
return this.constructor.render({ license })
}
-};
+}
diff --git a/services/cocoapods/cocoapods-license.tester.js b/services/cocoapods/cocoapods-license.tester.js
index c466bf9f8ffae..c4eba4f9ff26e 100644
--- a/services/cocoapods/cocoapods-license.tester.js
+++ b/services/cocoapods/cocoapods-license.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('license (valid)')
diff --git a/services/cocoapods/cocoapods-platform.service.js b/services/cocoapods/cocoapods-platform.service.js
index 01a17e0f4f803..83cb468d84191 100644
--- a/services/cocoapods/cocoapods-platform.service.js
+++ b/services/cocoapods/cocoapods-platform.service.js
@@ -1,4 +1,4 @@
-import BaseCocoaPodsService from './cocoapods-base.js';
+import BaseCocoaPodsService from './cocoapods-base.js'
export default class CocoapodsPlatform extends BaseCocoaPodsService {
static category = 'platform-support'
@@ -28,4 +28,4 @@ export default class CocoapodsPlatform extends BaseCocoaPodsService {
const { platforms } = await this.fetch({ spec })
return this.constructor.render({ platforms: Object.keys(platforms) })
}
-};
+}
diff --git a/services/cocoapods/cocoapods-platform.tester.js b/services/cocoapods/cocoapods-platform.tester.js
index a67d8cf7588b1..f2d176f97355f 100644
--- a/services/cocoapods/cocoapods-platform.tester.js
+++ b/services/cocoapods/cocoapods-platform.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isPlatform = Joi.string().regex(
diff --git a/services/cocoapods/cocoapods-version.service.js b/services/cocoapods/cocoapods-version.service.js
index 3431526d8e398..bc55f8306361d 100644
--- a/services/cocoapods/cocoapods-version.service.js
+++ b/services/cocoapods/cocoapods-version.service.js
@@ -1,5 +1,5 @@
-import {renderVersionBadge} from '../version.js';
-import BaseCocoaPodsService from './cocoapods-base.js';
+import { renderVersionBadge } from '../version.js'
+import BaseCocoaPodsService from './cocoapods-base.js'
export default class CocoapodsVersion extends BaseCocoaPodsService {
static category = 'version'
@@ -19,4 +19,4 @@ export default class CocoapodsVersion extends BaseCocoaPodsService {
const { version } = await this.fetch({ spec })
return renderVersionBadge({ version })
}
-};
+}
diff --git a/services/cocoapods/cocoapods-version.tester.js b/services/cocoapods/cocoapods-version.tester.js
index a92fadc9d12c5..e4e934abf5693 100644
--- a/services/cocoapods/cocoapods-version.tester.js
+++ b/services/cocoapods/cocoapods-version.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('version (valid)').get('/AFNetworking.json').expectBadge({
diff --git a/services/codacy/codacy-coverage.service.js b/services/codacy/codacy-coverage.service.js
index 4a1b6ebcf1b7e..04da6a9b74774 100644
--- a/services/codacy/codacy-coverage.service.js
+++ b/services/codacy/codacy-coverage.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {coveragePercentage as coveragePercentageColor} from '../color-formatters.js';
-import {BaseSvgScrapingService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { coveragePercentage as coveragePercentageColor } from '../color-formatters.js'
+import { BaseSvgScrapingService, NotFound } from '../index.js'
const schema = Joi.object({
message: Joi.alternatives()
@@ -42,7 +42,7 @@ export default class CodacyCoverage extends BaseSvgScrapingService {
static transform({ coverageString }) {
return {
percentage: parseFloat(coverageString.replace(/%$/, '')),
- };
+ }
}
async handle({ projectId, branch }) {
@@ -70,4 +70,4 @@ export default class CodacyCoverage extends BaseSvgScrapingService {
const { percentage } = this.constructor.transform({ coverageString })
return this.constructor.render({ percentage })
}
-};
+}
diff --git a/services/codacy/codacy-coverage.tester.js b/services/codacy/codacy-coverage.tester.js
index ab777a69119fc..ab0c24fed26a7 100644
--- a/services/codacy/codacy-coverage.tester.js
+++ b/services/codacy/codacy-coverage.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Coverage').get('/59d607d0e311408885e418004068ea58.json').expectBadge({
diff --git a/services/codacy/codacy-grade.service.js b/services/codacy/codacy-grade.service.js
index 2333108c916d9..4c4d35d76d96a 100644
--- a/services/codacy/codacy-grade.service.js
+++ b/services/codacy/codacy-grade.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {BaseSvgScrapingService} from '../index.js';
-import {codacyGrade} from './codacy-helpers.js';
+import Joi from 'joi'
+import { BaseSvgScrapingService } from '../index.js'
+import { codacyGrade } from './codacy-helpers.js'
const schema = Joi.object({ message: codacyGrade }).required()
@@ -56,4 +56,4 @@ export default class CodacyGrade extends BaseSvgScrapingService {
})
return this.constructor.render({ grade })
}
-};
+}
diff --git a/services/codacy/codacy-grade.tester.js b/services/codacy/codacy-grade.tester.js
index 6c7081600f965..be97c7eae00c5 100644
--- a/services/codacy/codacy-grade.tester.js
+++ b/services/codacy/codacy-grade.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {codacyGrade} from './codacy-helpers.js';
+import { createServiceTester } from '../tester.js'
+import { codacyGrade } from './codacy-helpers.js'
export const t = await createServiceTester()
t.create('Code quality')
diff --git a/services/codacy/codacy-helpers.js b/services/codacy/codacy-helpers.js
index 60218268ccd06..8408c492ad7e0 100644
--- a/services/codacy/codacy-helpers.js
+++ b/services/codacy/codacy-helpers.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
+import Joi from 'joi'
const codacyGrade = Joi.equal('A', 'B', 'C', 'D', 'E', 'F')
-export { codacyGrade };
+export { codacyGrade }
diff --git a/services/codeclimate/codeclimate-analysis-redirector.service.js b/services/codeclimate/codeclimate-analysis-redirector.service.js
index 02810a1479971..d2b68b56defce 100644
--- a/services/codeclimate/codeclimate-analysis-redirector.service.js
+++ b/services/codeclimate/codeclimate-analysis-redirector.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
// http://github.com/badges/shields/issues/1387
@@ -14,4 +14,4 @@ export default [
`/codeclimate/maintainability/${user}/${repo}`,
dateAdded: new Date('2019-04-16'),
}),
-];
+]
diff --git a/services/codeclimate/codeclimate-analysis-redirector.tester.js b/services/codeclimate/codeclimate-analysis-redirector.tester.js
index f142d787263d6..38531168c81bc 100644
--- a/services/codeclimate/codeclimate-analysis-redirector.tester.js
+++ b/services/codeclimate/codeclimate-analysis-redirector.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'CodeclimateCoverageRedirector',
diff --git a/services/codeclimate/codeclimate-analysis.service.js b/services/codeclimate/codeclimate-analysis.service.js
index 9e09aaa2defd7..811ceb6db1f97 100644
--- a/services/codeclimate/codeclimate-analysis.service.js
+++ b/services/codeclimate/codeclimate-analysis.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {colorScale, letterScore} from '../color-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, NotFound} from '../index.js';
-import {keywords, isLetterGrade, fetchRepo} from './codeclimate-common.js';
+import Joi from 'joi'
+import { colorScale, letterScore } from '../color-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService, NotFound } from '../index.js'
+import { keywords, isLetterGrade, fetchRepo } from './codeclimate-common.js'
const schema = Joi.object({
data: Joi.object({
@@ -164,4 +164,4 @@ export default class CodeclimateAnalysis extends BaseJsonService {
...props,
})
}
-};
+}
diff --git a/services/codeclimate/codeclimate-analysis.tester.js b/services/codeclimate/codeclimate-analysis.tester.js
index cf0951be5b866..9bab1043d1310 100644
--- a/services/codeclimate/codeclimate-analysis.tester.js
+++ b/services/codeclimate/codeclimate-analysis.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// Examples for this service can be found through the explore page:
diff --git a/services/codeclimate/codeclimate-common.js b/services/codeclimate/codeclimate-common.js
index b0fc076a65ac3..b987317b0bf1d 100644
--- a/services/codeclimate/codeclimate-common.js
+++ b/services/codeclimate/codeclimate-common.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {NotFound} from '../index.js';
+import Joi from 'joi'
+import { NotFound } from '../index.js'
const keywords = ['codeclimate']
@@ -42,8 +42,4 @@ async function fetchRepo(serviceInstance, { user, repo }) {
return repoInfo
}
-export {
- keywords,
- isLetterGrade,
- fetchRepo,
-};
+export { keywords, isLetterGrade, fetchRepo }
diff --git a/services/codeclimate/codeclimate-coverage-redirector.service.js b/services/codeclimate/codeclimate-coverage-redirector.service.js
index a9686473b0acc..49997961887ad 100644
--- a/services/codeclimate/codeclimate-coverage-redirector.service.js
+++ b/services/codeclimate/codeclimate-coverage-redirector.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
// http://github.com/badges/shields/issues/1387
@@ -34,4 +34,4 @@ export default [
transformPath: ({ user, repo }) => `/codeclimate/coverage/${user}/${repo}`,
dateAdded: new Date('2019-04-15'),
}),
-];
+]
diff --git a/services/codeclimate/codeclimate-coverage-redirector.tester.js b/services/codeclimate/codeclimate-coverage-redirector.tester.js
index 1287af63667e0..cc0ead2a188ee 100644
--- a/services/codeclimate/codeclimate-coverage-redirector.tester.js
+++ b/services/codeclimate/codeclimate-coverage-redirector.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'CodeclimateCoverageRedirector',
diff --git a/services/codeclimate/codeclimate-coverage.service.js b/services/codeclimate/codeclimate-coverage.service.js
index 9dea3febc6bd6..9b7f81eb8a416 100644
--- a/services/codeclimate/codeclimate-coverage.service.js
+++ b/services/codeclimate/codeclimate-coverage.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {coveragePercentage, letterScore} from '../color-formatters.js';
-import {BaseJsonService, NotFound} from '../index.js';
-import {keywords, isLetterGrade, fetchRepo} from './codeclimate-common.js';
+import Joi from 'joi'
+import { coveragePercentage, letterScore } from '../color-formatters.js'
+import { BaseJsonService, NotFound } from '../index.js'
+import { keywords, isLetterGrade, fetchRepo } from './codeclimate-common.js'
const schema = Joi.object({
data: Joi.object({
@@ -83,4 +83,4 @@ export default class CodeclimateCoverage extends BaseJsonService {
percentage,
})
}
-};
+}
diff --git a/services/codeclimate/codeclimate-coverage.tester.js b/services/codeclimate/codeclimate-coverage.tester.js
index e6727e70d292e..66ca3045126e1 100644
--- a/services/codeclimate/codeclimate-coverage.tester.js
+++ b/services/codeclimate/codeclimate-coverage.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// Examples for this service can be found through the explore page:
diff --git a/services/codecov/codecov-redirect.service.js b/services/codecov/codecov-redirect.service.js
index 35c0509cc0c84..2707d2e180253 100644
--- a/services/codecov/codecov-redirect.service.js
+++ b/services/codecov/codecov-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
const vcsSNameShortFormMap = {
bb: 'bitbucket',
@@ -21,4 +21,4 @@ export default [
transformQueryParams: ({ token }) => ({ token }),
dateAdded: new Date('2019-03-04'),
}),
-];
+]
diff --git a/services/codecov/codecov-redirect.tester.js b/services/codecov/codecov-redirect.tester.js
index e0a8581136483..4e23c04550b7f 100644
--- a/services/codecov/codecov-redirect.tester.js
+++ b/services/codecov/codecov-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'CodecovTokenRedirect',
diff --git a/services/codecov/codecov.service.js b/services/codecov/codecov.service.js
index 4f5852a3e63b2..6bb90813dd6cf 100644
--- a/services/codecov/codecov.service.js
+++ b/services/codecov/codecov.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {coveragePercentage} from '../color-formatters.js';
-import {BaseSvgScrapingService} from '../index.js';
-import {parseJson} from '../../core/base-service/json.js';
+import Joi from 'joi'
+import { coveragePercentage } from '../color-formatters.js'
+import { BaseSvgScrapingService } from '../index.js'
+import { parseJson } from '../../core/base-service/json.js'
// https://docs.codecov.io/reference#totals
// A new repository that's been added but never had any coverage reports
@@ -175,4 +175,4 @@ export default class Codecov extends BaseSvgScrapingService {
const { coverage } = this.transform({ data })
return this.constructor.render({ coverage })
}
-};
+}
diff --git a/services/codecov/codecov.spec.js b/services/codecov/codecov.spec.js
index 9007307366373..d0f599a3fa0f6 100644
--- a/services/codecov/codecov.spec.js
+++ b/services/codecov/codecov.spec.js
@@ -1,5 +1,5 @@
-import {test, forCases, given} from 'sazerac';
-import Codecov from './codecov.service.js';
+import { test, forCases, given } from 'sazerac'
+import Codecov from './codecov.service.js'
describe('Codecov', function () {
test(Codecov.prototype.legacyTransform, () => {
diff --git a/services/codecov/codecov.tester.js b/services/codecov/codecov.tester.js
index c83ed61bb74ea..4eeea1c609c43 100644
--- a/services/codecov/codecov.tester.js
+++ b/services/codecov/codecov.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets coverage status')
diff --git a/services/codefactor/codefactor-grade.service.js b/services/codefactor/codefactor-grade.service.js
index b9cf1da86a084..748a87950b671 100644
--- a/services/codefactor/codefactor-grade.service.js
+++ b/services/codefactor/codefactor-grade.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {BaseSvgScrapingService} from '../index.js';
-import {isValidGrade, gradeColor} from './codefactor-helpers.js';
+import Joi from 'joi'
+import { BaseSvgScrapingService } from '../index.js'
+import { isValidGrade, gradeColor } from './codefactor-helpers.js'
const schema = Joi.object({
message: isValidGrade,
@@ -45,4 +45,4 @@ export default class CodeFactorGrade extends BaseSvgScrapingService {
})
return this.constructor.render({ grade: message })
}
-};
+}
diff --git a/services/codefactor/codefactor-grade.spec.js b/services/codefactor/codefactor-grade.spec.js
index b6afefe516000..a4ba4d95e8928 100644
--- a/services/codefactor/codefactor-grade.spec.js
+++ b/services/codefactor/codefactor-grade.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import CodeFactorGrade from './codefactor-grade.service.js';
+import { test, given } from 'sazerac'
+import CodeFactorGrade from './codefactor-grade.service.js'
describe('CodeFactorGrade', function () {
test(CodeFactorGrade.render, () => {
diff --git a/services/codefactor/codefactor-grade.tester.js b/services/codefactor/codefactor-grade.tester.js
index ebec37cf2c169..56be9a4fd3849 100644
--- a/services/codefactor/codefactor-grade.tester.js
+++ b/services/codefactor/codefactor-grade.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isValidGrade} from './codefactor-helpers.js';
+import { createServiceTester } from '../tester.js'
+import { isValidGrade } from './codefactor-helpers.js'
export const t = await createServiceTester()
t.create('Grade').get('/github/google/guava.json').expectBadge({
diff --git a/services/codefactor/codefactor-helpers.js b/services/codefactor/codefactor-helpers.js
index 4059217a31777..d110eabdfb591 100644
--- a/services/codefactor/codefactor-helpers.js
+++ b/services/codefactor/codefactor-helpers.js
@@ -1,4 +1,4 @@
-import Joi from 'joi';
+import Joi from 'joi'
// https://support.codefactor.io/i14-glossary
// https://github.com/badges/shields/issues/4269
@@ -29,4 +29,4 @@ function gradeColor(grade) {
return color
}
-export { isValidGrade, gradeColor };
+export { isValidGrade, gradeColor }
diff --git a/services/codeship/codeship.service.js b/services/codeship/codeship.service.js
index 9096b6cb6bdf2..d9a8bde1d6637 100644
--- a/services/codeship/codeship.service.js
+++ b/services/codeship/codeship.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseSvgScrapingService} from '../index.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { BaseSvgScrapingService } from '../index.js'
const schema = Joi.object({
message: Joi.alternatives()
@@ -62,11 +62,11 @@ export default class Codeship extends BaseSvgScrapingService {
url,
options: { qs: { branch } },
valueMatcher: /
@@ -36,4 +36,4 @@ export default class Date extends BaseService {
relativeDateString: formatRelativeDate(timestamp),
})
}
-};
+}
diff --git a/services/date/date.tester.js b/services/date/date.tester.js
index 117ee7166c54b..ec5000da23e66 100644
--- a/services/date/date.tester.js
+++ b/services/date/date.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isRelativeFormattedDate} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isRelativeFormattedDate } from '../test-validators.js'
export const t = new ServiceTester({
id: 'date',
diff --git a/services/david/david.service.js b/services/david/david.service.js
index 6cc68524701f3..67e171d93b08e 100644
--- a/services/david/david.service.js
+++ b/services/david/david.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
status: Joi.allow(
@@ -95,4 +95,4 @@ export default class David extends BaseJsonService {
const json = await this.fetch({ kind, user, repo, path })
return this.constructor.render({ status: json.status, kind })
}
-};
+}
diff --git a/services/david/david.tester.js b/services/david/david.tester.js
index dec9e5c49118b..b7e4ac0761c24 100644
--- a/services/david/david.tester.js
+++ b/services/david/david.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isDependencyStatus = Joi.string().valid(
diff --git a/services/debian/debian.service.js b/services/debian/debian.service.js
index cddfbf2ec93f5..404cc75b3d469 100644
--- a/services/debian/debian.service.js
+++ b/services/debian/debian.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {latest, renderVersionBadge} from '../version.js';
-import {BaseJsonService, NotFound, InvalidResponse} from '../index.js';
+import Joi from 'joi'
+import { latest, renderVersionBadge } from '../version.js'
+import { BaseJsonService, NotFound, InvalidResponse } from '../index.js'
const schema = Joi.array()
.items(
@@ -62,4 +62,4 @@ export default class Debian extends BaseJsonService {
const versions = Object.keys(packageData[distKeys[0]])
return renderVersionBadge({ version: latest(versions) })
}
-};
+}
diff --git a/services/debian/debian.tester.js b/services/debian/debian.tester.js
index c03f2cd9b747d..d56026c476516 100644
--- a/services/debian/debian.tester.js
+++ b/services/debian/debian.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionNClausesWithOptionalSuffixAndEpoch} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionNClausesWithOptionalSuffixAndEpoch } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Debian package (default distribution, valid)')
diff --git a/services/debug/debug.service.js b/services/debug/debug.service.js
index 04b0474ba1de5..93dc625deaf3a 100644
--- a/services/debug/debug.service.js
+++ b/services/debug/debug.service.js
@@ -1,4 +1,4 @@
-import {BaseService} from '../index.js';
+import { BaseService } from '../index.js'
const serverStartTime = new Date(new Date().toGMTString())
let bitFlip = false
@@ -39,4 +39,4 @@ export default class Debug extends BaseService {
}
}
}
-};
+}
diff --git a/services/debug/debug.tester.js b/services/debug/debug.tester.js
index c6922666cbf93..f57dcaf34141e 100644
--- a/services/debug/debug.tester.js
+++ b/services/debug/debug.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('start time')
diff --git a/services/dependabot/dependabot.service.js b/services/dependabot/dependabot.service.js
index 00af1095ee393..57d2cf3a31106 100644
--- a/services/dependabot/dependabot.service.js
+++ b/services/dependabot/dependabot.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
status: Joi.string().required(),
@@ -50,4 +50,4 @@ export default class DependabotSemverCompatibility extends BaseJsonService {
message: json.status,
}
}
-};
+}
diff --git a/services/dependabot/dependabot.tester.js b/services/dependabot/dependabot.tester.js
index b5bdc0dcdec56..9ac85a9e1ee0b 100644
--- a/services/dependabot/dependabot.tester.js
+++ b/services/dependabot/dependabot.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('semver stability (valid)').get('/bundler/puma.json').expectBadge({
diff --git a/services/depfu/depfu.service.js b/services/depfu/depfu.service.js
index 74b4d547d7de5..b35daf9f904f3 100644
--- a/services/depfu/depfu.service.js
+++ b/services/depfu/depfu.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const depfuSchema = Joi.object({
text: Joi.string().required(),
@@ -38,4 +38,4 @@ export default class Depfu extends BaseJsonService {
const { text, colorscheme } = await this.fetch({ user, repo })
return this.constructor.render({ text, colorscheme })
}
-};
+}
diff --git a/services/depfu/depfu.tester.js b/services/depfu/depfu.tester.js
index 2aa1864b94d06..04aeaf2b02cf9 100644
--- a/services/depfu/depfu.tester.js
+++ b/services/depfu/depfu.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
const isDependencyStatus = Joi.string().valid(
'insecure',
diff --git a/services/deprecation-helpers.js b/services/deprecation-helpers.js
index bf048c9e6d4d5..fb6ecc6b7968b 100644
--- a/services/deprecation-helpers.js
+++ b/services/deprecation-helpers.js
@@ -1,4 +1,4 @@
-import {Deprecated} from './index.js';
+import { Deprecated } from './index.js'
function enforceDeprecation(effectiveDate) {
if (Date.now() >= effectiveDate.getTime()) {
@@ -6,6 +6,4 @@ function enforceDeprecation(effectiveDate) {
}
}
-export {
- enforceDeprecation,
-};
+export { enforceDeprecation }
diff --git a/services/deprecation-helpers.spec.js b/services/deprecation-helpers.spec.js
index 3cef2082d3bcf..34779dad7f9a3 100644
--- a/services/deprecation-helpers.spec.js
+++ b/services/deprecation-helpers.spec.js
@@ -1,6 +1,6 @@
-import {expect} from 'chai';
-import {Deprecated} from '../core/base-service/errors.js';
-import {enforceDeprecation} from './deprecation-helpers.js';
+import { expect } from 'chai'
+import { Deprecated } from '../core/base-service/errors.js'
+import { enforceDeprecation } from './deprecation-helpers.js'
describe('enforceDeprecation', function () {
it('throws Deprecated for a date in the past', function () {
diff --git a/services/discord/discord.service.js b/services/discord/discord.service.js
index bbff2c5ddfa9f..65837b9a35004 100644
--- a/services/discord/discord.service.js
+++ b/services/discord/discord.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
presence_count: nonNegativeInteger,
@@ -77,4 +77,4 @@ export default class Discord extends BaseJsonService {
const data = await this.fetch({ serverId })
return this.constructor.render({ members: data.presence_count })
}
-};
+}
diff --git a/services/discord/discord.spec.js b/services/discord/discord.spec.js
index 7abe355cc7eaa..4dbbeae36b858 100644
--- a/services/discord/discord.spec.js
+++ b/services/discord/discord.spec.js
@@ -1,7 +1,7 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import Discord from './discord.service.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import Discord from './discord.service.js'
describe('Discord', function () {
cleanUpNockAfterEach()
diff --git a/services/discord/discord.tester.js b/services/discord/discord.tester.js
index 4f701fa2f7a2b..4e9ca9d6d627a 100644
--- a/services/discord/discord.tester.js
+++ b/services/discord/discord.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets status for Reactiflux')
diff --git a/services/discourse/discourse-redirect.service.js b/services/discourse/discourse-redirect.service.js
index 083c485d4132b..f1285eba110b8 100644
--- a/services/discourse/discourse-redirect.service.js
+++ b/services/discourse/discourse-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
redirector({
@@ -13,4 +13,4 @@ export default [
}),
dateAdded: new Date('2019-09-15'),
}),
-];
+]
diff --git a/services/discourse/discourse-redirect.tester.js b/services/discourse/discourse-redirect.tester.js
index 64cc98e888609..6dce032f5b321 100644
--- a/services/discourse/discourse-redirect.tester.js
+++ b/services/discourse/discourse-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'DiscourseRedirect',
diff --git a/services/discourse/discourse.service.js b/services/discourse/discourse.service.js
index b43e5c0a8f9de..e6c1322c38300 100644
--- a/services/discourse/discourse.service.js
+++ b/services/discourse/discourse.service.js
@@ -1,8 +1,8 @@
-import camelcase from 'camelcase';
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger, optionalUrl} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import camelcase from 'camelcase'
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger, optionalUrl } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
topic_count: nonNegativeInteger,
@@ -103,4 +103,4 @@ const metricIntegrations = [
{ metricName: 'likes', property: 'like_count' },
].map(DiscourseMetricIntegrationFactory)
-export default [...metricIntegrations, DiscourseStatus];
+export default [...metricIntegrations, DiscourseStatus]
diff --git a/services/discourse/discourse.tester.js b/services/discourse/discourse.tester.js
index 281add0ad884f..dc779eb291a45 100644
--- a/services/discourse/discourse.tester.js
+++ b/services/discourse/discourse.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'discourse',
diff --git a/services/dockbit/dockbit.service.js b/services/dockbit/dockbit.service.js
index 89eac1cd5d971..c9ecc64ddcc0e 100644
--- a/services/dockbit/dockbit.service.js
+++ b/services/dockbit/dockbit.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
category: 'build',
@@ -8,4 +8,4 @@ export default deprecatedService({
},
label: 'dockbit',
dateAdded: new Date('2017-12-31'),
-});
+})
diff --git a/services/dockbit/dockbit.tester.js b/services/dockbit/dockbit.tester.js
index e6a1b307c1f6f..76029da3c424c 100644
--- a/services/dockbit/dockbit.tester.js
+++ b/services/dockbit/dockbit.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'dockbit',
diff --git a/services/docker/docker-automated.service.js b/services/docker/docker-automated.service.js
index 5badd6c996f79..ba28af2990520 100644
--- a/services/docker/docker-automated.service.js
+++ b/services/docker/docker-automated.service.js
@@ -1,6 +1,10 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
-import {dockerBlue, buildDockerUrl, getDockerHubUser} from './docker-helpers.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
+import {
+ dockerBlue,
+ buildDockerUrl,
+ getDockerHubUser,
+} from './docker-helpers.js'
const automatedBuildSchema = Joi.object({
is_automated: Joi.boolean().required(),
@@ -44,4 +48,4 @@ export default class DockerAutomatedBuild extends BaseJsonService {
const data = await this.fetch({ user, repo })
return this.constructor.render({ isAutomated: data.is_automated })
}
-};
+}
diff --git a/services/docker/docker-automated.tester.js b/services/docker/docker-automated.tester.js
index b85272b37be21..f52ae96d0db69 100644
--- a/services/docker/docker-automated.tester.js
+++ b/services/docker/docker-automated.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
-import {dockerBlue} from './docker-helpers.js';
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
+import { dockerBlue } from './docker-helpers.js'
export const t = await createServiceTester()
const isAutomatedBuildStatus = Joi.string().valid('automated', 'manual')
diff --git a/services/docker/docker-build.service.js b/services/docker/docker-build.service.js
index cbb8be1c7faf7..7c4d0985f35f5 100644
--- a/services/docker/docker-build.service.js
+++ b/services/docker/docker-build.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
category: 'build',
diff --git a/services/docker/docker-build.tester.js b/services/docker/docker-build.tester.js
index 7a685c485b342..9d5876845948d 100644
--- a/services/docker/docker-build.tester.js
+++ b/services/docker/docker-build.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'dockerbuild',
diff --git a/services/docker/docker-cloud-automated.service.js b/services/docker/docker-cloud-automated.service.js
index deafeb2cfeaa3..a4692a643583b 100644
--- a/services/docker/docker-cloud-automated.service.js
+++ b/services/docker/docker-cloud-automated.service.js
@@ -1,6 +1,6 @@
-import {BaseJsonService} from '../index.js';
-import {dockerBlue, buildDockerUrl} from './docker-helpers.js';
-import {fetchBuild} from './docker-cloud-common-fetch.js';
+import { BaseJsonService } from '../index.js'
+import { dockerBlue, buildDockerUrl } from './docker-helpers.js'
+import { fetchBuild } from './docker-cloud-common-fetch.js'
export default class DockerCloudAutomatedBuild extends BaseJsonService {
static category = 'build'
@@ -32,4 +32,4 @@ export default class DockerCloudAutomatedBuild extends BaseJsonService {
buildSettings: data.objects[0].build_settings,
})
}
-};
+}
diff --git a/services/docker/docker-cloud-automated.tester.js b/services/docker/docker-cloud-automated.tester.js
index da9fae0b0baae..936451900d448 100644
--- a/services/docker/docker-cloud-automated.tester.js
+++ b/services/docker/docker-cloud-automated.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
-import {dockerBlue} from './docker-helpers.js';
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
+import { dockerBlue } from './docker-helpers.js'
export const t = await createServiceTester()
const isAutomatedBuildStatus = Joi.string().valid('automated', 'manual')
diff --git a/services/docker/docker-cloud-build.service.js b/services/docker/docker-cloud-build.service.js
index 6840cc5223333..8fd3aa8b45f3e 100644
--- a/services/docker/docker-cloud-build.service.js
+++ b/services/docker/docker-cloud-build.service.js
@@ -1,6 +1,6 @@
-import {BaseJsonService} from '../index.js';
-import {dockerBlue, buildDockerUrl} from './docker-helpers.js';
-import {fetchBuild} from './docker-cloud-common-fetch.js';
+import { BaseJsonService } from '../index.js'
+import { dockerBlue, buildDockerUrl } from './docker-helpers.js'
+import { fetchBuild } from './docker-cloud-common-fetch.js'
export default class DockerCloudBuild extends BaseJsonService {
static category = 'build'
@@ -33,4 +33,4 @@ export default class DockerCloudBuild extends BaseJsonService {
const data = await fetchBuild(this, { user, repo })
return this.constructor.render({ state: data.objects[0].state })
}
-};
+}
diff --git a/services/docker/docker-cloud-build.tester.js b/services/docker/docker-cloud-build.tester.js
index e7147a9dbbc47..9335af250124d 100644
--- a/services/docker/docker-cloud-build.tester.js
+++ b/services/docker/docker-cloud-build.tester.js
@@ -1,6 +1,6 @@
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
-import {dockerBlue} from './docker-helpers.js';
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
+import { dockerBlue } from './docker-helpers.js'
export const t = await createServiceTester()
t.create('docker cloud build status (valid, user)')
diff --git a/services/docker/docker-cloud-common-fetch.js b/services/docker/docker-cloud-common-fetch.js
index 29ee356fd8ac6..51a5317348a6a 100644
--- a/services/docker/docker-cloud-common-fetch.js
+++ b/services/docker/docker-cloud-common-fetch.js
@@ -1,4 +1,4 @@
-import Joi from 'joi';
+import Joi from 'joi'
const cloudBuildSchema = Joi.object({
objects: Joi.array()
@@ -20,6 +20,4 @@ async function fetchBuild(serviceInstance, { user, repo }) {
})
}
-export {
- fetchBuild,
-};
+export { fetchBuild }
diff --git a/services/docker/docker-fixtures.js b/services/docker/docker-fixtures.js
index 3f79f5fac7b07..26218ca350c12 100644
--- a/services/docker/docker-fixtures.js
+++ b/services/docker/docker-fixtures.js
@@ -3040,4 +3040,4 @@ export {
versionDataNoTagSemVerSort,
versionDataWithTag,
versionDataWithVaryingArchitectures,
-};
+}
diff --git a/services/docker/docker-helpers.js b/services/docker/docker-helpers.js
index 59b56d97d4424..0b9b1d6879494 100644
--- a/services/docker/docker-helpers.js
+++ b/services/docker/docker-helpers.js
@@ -1,5 +1,6 @@
// see https://github.com/badges/shields/pull/1690
-import {NotFound} from '../index.js'; const dockerBlue = '066da5'
+import { NotFound } from '../index.js'
+const dockerBlue = '066da5'
function buildDockerUrl(badgeName, includeTagRoute) {
if (includeTagRoute) {
@@ -59,4 +60,4 @@ export {
getDockerHubUser,
getMultiPageData,
getDigestSemVerMatches,
-};
+}
diff --git a/services/docker/docker-pulls.service.js b/services/docker/docker-pulls.service.js
index 12815e5425115..9d741f8f96158 100644
--- a/services/docker/docker-pulls.service.js
+++ b/services/docker/docker-pulls.service.js
@@ -1,8 +1,12 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
-import {dockerBlue, buildDockerUrl, getDockerHubUser} from './docker-helpers.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
+import {
+ dockerBlue,
+ buildDockerUrl,
+ getDockerHubUser,
+} from './docker-helpers.js'
const pullsSchema = Joi.object({
pull_count: nonNegativeInteger,
@@ -45,4 +49,4 @@ export default class DockerPulls extends BaseJsonService {
const data = await this.fetch({ user, repo })
return this.constructor.render({ count: data.pull_count })
}
-};
+}
diff --git a/services/docker/docker-pulls.tester.js b/services/docker/docker-pulls.tester.js
index 3d670073325fe..2482edea4acd7 100644
--- a/services/docker/docker-pulls.tester.js
+++ b/services/docker/docker-pulls.tester.js
@@ -1,6 +1,6 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
-import {dockerBlue} from './docker-helpers.js';
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
+import { dockerBlue } from './docker-helpers.js'
export const t = await createServiceTester()
t.create('docker pulls (valid, library)')
diff --git a/services/docker/docker-size.service.js b/services/docker/docker-size.service.js
index 9907986fa0d24..16c7ea49467ce 100644
--- a/services/docker/docker-size.service.js
+++ b/services/docker/docker-size.service.js
@@ -1,9 +1,13 @@
-import Joi from 'joi';
-import prettyBytes from 'pretty-bytes';
-import {nonNegativeInteger} from '../validators.js';
-import {latest} from '../version.js';
-import {BaseJsonService, NotFound} from '../index.js';
-import {buildDockerUrl, getDockerHubUser, getMultiPageData} from './docker-helpers.js';
+import Joi from 'joi'
+import prettyBytes from 'pretty-bytes'
+import { nonNegativeInteger } from '../validators.js'
+import { latest } from '../version.js'
+import { BaseJsonService, NotFound } from '../index.js'
+import {
+ buildDockerUrl,
+ getDockerHubUser,
+ getMultiPageData,
+} from './docker-helpers.js'
const buildSchema = Joi.object({
name: Joi.string().required(),
@@ -110,4 +114,4 @@ export default class DockerSize extends BaseJsonService {
const { size } = await this.transform({ tag, sort, data })
return this.constructor.render({ size })
}
-};
+}
diff --git a/services/docker/docker-size.spec.js b/services/docker/docker-size.spec.js
index 44b881965eee0..946e0d161b668 100644
--- a/services/docker/docker-size.spec.js
+++ b/services/docker/docker-size.spec.js
@@ -1,6 +1,6 @@
-import {test, given} from 'sazerac';
-import DockerSize from './docker-size.service.js';
-import {sizeDataNoTagSemVerSort} from './docker-fixtures.js';
+import { test, given } from 'sazerac'
+import DockerSize from './docker-size.service.js'
+import { sizeDataNoTagSemVerSort } from './docker-fixtures.js'
describe('DockerSize', function () {
test(DockerSize.prototype.transform, () => {
diff --git a/services/docker/docker-size.tester.js b/services/docker/docker-size.tester.js
index 231781dc714ab..c476a773f32c8 100644
--- a/services/docker/docker-size.tester.js
+++ b/services/docker/docker-size.tester.js
@@ -1,5 +1,5 @@
-import {isFileSize} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isFileSize } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('docker image size (valid, library)')
diff --git a/services/docker/docker-stars.service.js b/services/docker/docker-stars.service.js
index 401cb2b3bf072..92cc8eb81e85b 100644
--- a/services/docker/docker-stars.service.js
+++ b/services/docker/docker-stars.service.js
@@ -1,7 +1,11 @@
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseService} from '../index.js';
-import {dockerBlue, buildDockerUrl, getDockerHubUser} from './docker-helpers.js';
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseService } from '../index.js'
+import {
+ dockerBlue,
+ buildDockerUrl,
+ getDockerHubUser,
+} from './docker-helpers.js'
export default class DockerStars extends BaseService {
static category = 'rating'
@@ -41,4 +45,4 @@ export default class DockerStars extends BaseService {
const stars = await this.fetch({ user, repo })
return this.constructor.render({ stars })
}
-};
+}
diff --git a/services/docker/docker-stars.tester.js b/services/docker/docker-stars.tester.js
index 6390e71e4ca77..ebd715c3372e3 100644
--- a/services/docker/docker-stars.tester.js
+++ b/services/docker/docker-stars.tester.js
@@ -1,6 +1,6 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
-import {dockerBlue} from './docker-helpers.js';
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
+import { dockerBlue } from './docker-helpers.js'
export const t = await createServiceTester()
t.create('docker stars (valid, library)')
diff --git a/services/docker/docker-version.service.js b/services/docker/docker-version.service.js
index 2f2b69b8f1e57..00bb00e985698 100644
--- a/services/docker/docker-version.service.js
+++ b/services/docker/docker-version.service.js
@@ -1,8 +1,13 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {latest, renderVersionBadge} from '../version.js';
-import {BaseJsonService, NotFound, InvalidResponse} from '../index.js';
-import {buildDockerUrl, getDockerHubUser, getMultiPageData, getDigestSemVerMatches} from './docker-helpers.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { latest, renderVersionBadge } from '../version.js'
+import { BaseJsonService, NotFound, InvalidResponse } from '../index.js'
+import {
+ buildDockerUrl,
+ getDockerHubUser,
+ getMultiPageData,
+ getDigestSemVerMatches,
+} from './docker-helpers.js'
const buildSchema = Joi.object({
count: nonNegativeInteger.required(),
@@ -153,4 +158,4 @@ export default class DockerVersion extends BaseJsonService {
})
return this.constructor.render({ version })
}
-};
+}
diff --git a/services/docker/docker-version.spec.js b/services/docker/docker-version.spec.js
index a3e89da2ad2fd..bd1681c27b0da 100644
--- a/services/docker/docker-version.spec.js
+++ b/services/docker/docker-version.spec.js
@@ -1,8 +1,14 @@
-import {expect} from 'chai';
-import {test, given} from 'sazerac';
-import {InvalidResponse} from '../index.js';
-import DockerVersion from './docker-version.service.js';
-import {versionDataNoTagDateSort, versionPagedDataNoTagDateSort, versionDataNoTagSemVerSort, versionDataWithTag, versionDataWithVaryingArchitectures} from './docker-fixtures.js';
+import { expect } from 'chai'
+import { test, given } from 'sazerac'
+import { InvalidResponse } from '../index.js'
+import DockerVersion from './docker-version.service.js'
+import {
+ versionDataNoTagDateSort,
+ versionPagedDataNoTagDateSort,
+ versionDataNoTagSemVerSort,
+ versionDataWithTag,
+ versionDataWithVaryingArchitectures,
+} from './docker-fixtures.js'
describe('DockerVersion', function () {
test(DockerVersion.prototype.transform, () => {
diff --git a/services/docker/docker-version.tester.js b/services/docker/docker-version.tester.js
index f31467b0d8753..097ccc0c5349b 100644
--- a/services/docker/docker-version.tester.js
+++ b/services/docker/docker-version.tester.js
@@ -1,5 +1,5 @@
-import {isSemver} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isSemver } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('docker version (valid, library)').get('/_/alpine.json').expectBadge({
diff --git a/services/docsrs/docsrs.service.js b/services/docsrs/docsrs.service.js
index be8362e402b6c..ca88f67e49259 100644
--- a/services/docsrs/docsrs.service.js
+++ b/services/docsrs/docsrs.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const schema = Joi.array()
.items(
@@ -57,4 +57,4 @@ export default class DocsRs extends BaseJsonService {
).pop()
return this.constructor.render({ version, buildStatus })
}
-};
+}
diff --git a/services/docsrs/docsrs.tester.js b/services/docsrs/docsrs.tester.js
index 0fce39fdba917..0bd6157bdc6ff 100644
--- a/services/docsrs/docsrs.tester.js
+++ b/services/docsrs/docsrs.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Passing docs')
diff --git a/services/dotnetstatus/dotnetstatus.service.js b/services/dotnetstatus/dotnetstatus.service.js
index 87a5f3c12f9f7..7e243fd9c07ab 100644
--- a/services/dotnetstatus/dotnetstatus.service.js
+++ b/services/dotnetstatus/dotnetstatus.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
category: 'dependencies',
@@ -8,4 +8,4 @@ export default deprecatedService({
},
label: 'dotnet status',
dateAdded: new Date('2018-04-01'),
-});
+})
diff --git a/services/dotnetstatus/dotnetstatus.tester.js b/services/dotnetstatus/dotnetstatus.tester.js
index a290f8cc10012..f15285b3bb461 100644
--- a/services/dotnetstatus/dotnetstatus.tester.js
+++ b/services/dotnetstatus/dotnetstatus.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'dotnetstatus',
diff --git a/services/drone/drone-build.service.js b/services/drone/drone-build.service.js
index 678f71aa8e58d..5b5986efb6dc3 100644
--- a/services/drone/drone-build.service.js
+++ b/services/drone/drone-build.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {optionalUrl} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { optionalUrl } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
status: Joi.alternatives()
@@ -82,4 +82,4 @@ export default class DroneBuild extends BaseJsonService {
)
return renderBuildStatusBadge({ status: json.status })
}
-};
+}
diff --git a/services/drone/drone-build.spec.js b/services/drone/drone-build.spec.js
index d5d59c8890579..0cb15273618a2 100644
--- a/services/drone/drone-build.spec.js
+++ b/services/drone/drone-build.spec.js
@@ -1,7 +1,7 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import DroneBuild from './drone-build.service.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import DroneBuild from './drone-build.service.js'
describe('DroneBuild', function () {
cleanUpNockAfterEach()
diff --git a/services/drone/drone-build.tester.js b/services/drone/drone-build.tester.js
index f8ce864215471..abd50e8feeb97 100644
--- a/services/drone/drone-build.tester.js
+++ b/services/drone/drone-build.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isDroneBuildStatus = Joi.alternatives().try(
diff --git a/services/dub/dub-download.service.js b/services/dub/dub-download.service.js
index b6da730864b2d..e82bf59d6eae6 100644
--- a/services/dub/dub-download.service.js
+++ b/services/dub/dub-download.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {downloadCount as downloadCountColor} from '../color-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { downloadCount as downloadCountColor } from '../color-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
downloads: Joi.object({
@@ -101,4 +101,4 @@ export default class DubDownloads extends BaseJsonService {
const downloadCount = transform(json)
return this.constructor.render({ interval, downloadCount, version })
}
-};
+}
diff --git a/services/dub/dub-download.tester.js b/services/dub/dub-download.tester.js
index f7f13b2a54582..4733e5343a2b9 100644
--- a/services/dub/dub-download.tester.js
+++ b/services/dub/dub-download.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isMetric, isMetricOverTimePeriod} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isMetric, isMetricOverTimePeriod } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isDownloadsColor = Joi.equal(
diff --git a/services/dub/dub-license.service.js b/services/dub/dub-license.service.js
index 47e34c1e845f2..52608f43d3e26 100644
--- a/services/dub/dub-license.service.js
+++ b/services/dub/dub-license.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderLicenseBadge} from '../licenses.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { renderLicenseBadge } from '../licenses.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
info: Joi.object({ license: Joi.string().required() }).required(),
@@ -30,4 +30,4 @@ export default class DubLicense extends BaseJsonService {
const data = await this.fetch({ packageName })
return renderLicenseBadge({ licenses: [data.info.license] })
}
-};
+}
diff --git a/services/dub/dub-license.tester.js b/services/dub/dub-license.tester.js
index 77f7578f37d1e..0da04e2a2411f 100644
--- a/services/dub/dub-license.tester.js
+++ b/services/dub/dub-license.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('license (valid)')
diff --git a/services/dub/dub-version.service.js b/services/dub/dub-version.service.js
index 2c1d80eb62b50..19c2c1626f0dc 100644
--- a/services/dub/dub-version.service.js
+++ b/services/dub/dub-version.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.string().required()
@@ -28,4 +28,4 @@ export default class DubVersion extends BaseJsonService {
const version = await this.fetch({ packageName })
return renderVersionBadge({ version })
}
-};
+}
diff --git a/services/dub/dub-version.tester.js b/services/dub/dub-version.tester.js
index 7032d5acc1624..88015d7660e5a 100644
--- a/services/dub/dub-version.tester.js
+++ b/services/dub/dub-version.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isVPlusDottedVersionNClausesWithOptionalSuffix } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('version (valid)')
diff --git a/services/dynamic-common.js b/services/dynamic-common.js
index d8e97163614fc..7cacafa411233 100644
--- a/services/dynamic-common.js
+++ b/services/dynamic-common.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import toArray from '../core/base-service/to-array.js';
-import validate from '../core/base-service/validate.js';
-import {InvalidResponse} from './index.js';
+import Joi from 'joi'
+import toArray from '../core/base-service/to-array.js'
+import validate from '../core/base-service/validate.js'
+import { InvalidResponse } from './index.js'
const errorMessages = {
404: 'resource not found',
@@ -51,4 +51,4 @@ export {
individualValueSchema,
transformAndValidate,
renderDynamicBadge,
-};
+}
diff --git a/services/dynamic/dynamic-helpers.js b/services/dynamic/dynamic-helpers.js
index 8dd5b134cacf6..cb3b6c6ebe3d8 100644
--- a/services/dynamic/dynamic-helpers.js
+++ b/services/dynamic/dynamic-helpers.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {optionalUrl} from '../validators.js';
+import Joi from 'joi'
+import { optionalUrl } from '../validators.js'
const queryParamSchema = Joi.object({
url: optionalUrl.required(),
@@ -18,6 +18,4 @@ function createRoute(which) {
}
}
-export {
- createRoute,
-};
+export { createRoute }
diff --git a/services/dynamic/dynamic-json.service.js b/services/dynamic/dynamic-json.service.js
index 631b7cb1821f0..5e01de94d1cde 100644
--- a/services/dynamic/dynamic-json.service.js
+++ b/services/dynamic/dynamic-json.service.js
@@ -1,7 +1,7 @@
-import {MetricNames} from '../../core/base-service/metric-helper.js';
-import {BaseJsonService} from '../index.js';
-import {createRoute} from './dynamic-helpers.js';
-import jsonPath from './json-path.js';
+import { MetricNames } from '../../core/base-service/metric-helper.js'
+import { BaseJsonService } from '../index.js'
+import { createRoute } from './dynamic-helpers.js'
+import jsonPath from './json-path.js'
export default class DynamicJson extends jsonPath(BaseJsonService) {
static enabledMetrics = [MetricNames.SERVICE_RESPONSE_SIZE]
@@ -14,4 +14,4 @@ export default class DynamicJson extends jsonPath(BaseJsonService) {
errorMessages,
})
}
-};
+}
diff --git a/services/dynamic/dynamic-json.tester.js b/services/dynamic/dynamic-json.tester.js
index 93a4a9e94a67c..38bb48ee74794 100644
--- a/services/dynamic/dynamic-json.tester.js
+++ b/services/dynamic/dynamic-json.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {expect} from 'chai';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { expect } from 'chai'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('No URL specified')
diff --git a/services/dynamic/dynamic-xml.service.js b/services/dynamic/dynamic-xml.service.js
index 1990e0d594b44..2278f7260a305 100644
--- a/services/dynamic/dynamic-xml.service.js
+++ b/services/dynamic/dynamic-xml.service.js
@@ -1,9 +1,9 @@
-import {DOMParser} from 'xmldom';
-import xpath from 'xpath';
-import {MetricNames} from '../../core/base-service/metric-helper.js';
-import {renderDynamicBadge, errorMessages} from '../dynamic-common.js';
-import {BaseService, InvalidResponse, InvalidParameter} from '../index.js';
-import {createRoute} from './dynamic-helpers.js';
+import { DOMParser } from 'xmldom'
+import xpath from 'xpath'
+import { MetricNames } from '../../core/base-service/metric-helper.js'
+import { renderDynamicBadge, errorMessages } from '../dynamic-common.js'
+import { BaseService, InvalidResponse, InvalidParameter } from '../index.js'
+import { createRoute } from './dynamic-helpers.js'
// This service extends BaseService because it uses a different XML parser
// than BaseXmlService which can be used with xpath.
@@ -76,4 +76,4 @@ export default class DynamicXml extends BaseService {
return renderDynamicBadge({ value, prefix, suffix })
}
-};
+}
diff --git a/services/dynamic/dynamic-xml.spec.js b/services/dynamic/dynamic-xml.spec.js
index 67d76e6993f9c..ca233d2c0abeb 100644
--- a/services/dynamic/dynamic-xml.spec.js
+++ b/services/dynamic/dynamic-xml.spec.js
@@ -1,9 +1,9 @@
-import {expect} from 'chai';
-import sinon from 'sinon';
-import xpath from 'xpath';
-import {test, given} from 'sazerac';
-import {InvalidResponse} from '../index.js';
-import DynamicXml from './dynamic-xml.service.js';
+import { expect } from 'chai'
+import sinon from 'sinon'
+import xpath from 'xpath'
+import { test, given } from 'sazerac'
+import { InvalidResponse } from '../index.js'
+import DynamicXml from './dynamic-xml.service.js'
const exampleXml = `
@@ -40,9 +43,7 @@ const queryParamSchema = Joi.object({
extension: Joi.string(),
})
-export default class GithubDirectoryFileCount extends (
- ConditionalGithubAuthV3Service
-) {
+export default class GithubDirectoryFileCount extends ConditionalGithubAuthV3Service {
static category = 'size'
static route = {
@@ -153,4 +154,4 @@ export default class GithubDirectoryFileCount extends (
const { count } = this.constructor.transform(content, { type, extension })
return this.constructor.render({ count })
}
-};
+}
diff --git a/services/github/github-directory-file-count.spec.js b/services/github/github-directory-file-count.spec.js
index fadf9f4a5640b..056a9622a0a8a 100644
--- a/services/github/github-directory-file-count.spec.js
+++ b/services/github/github-directory-file-count.spec.js
@@ -1,7 +1,7 @@
-import {expect} from 'chai';
-import {test, given} from 'sazerac';
-import {InvalidParameter} from '../index.js';
-import GithubDirectoryFileCount from './github-directory-file-count.service.js';
+import { expect } from 'chai'
+import { test, given } from 'sazerac'
+import { InvalidParameter } from '../index.js'
+import GithubDirectoryFileCount from './github-directory-file-count.service.js'
describe('GithubDirectoryFileCount', function () {
const contents = [
diff --git a/services/github/github-directory-file-count.tester.js b/services/github/github-directory-file-count.tester.js
index 8248648bd372d..b4ac6c6f2c6c4 100644
--- a/services/github/github-directory-file-count.tester.js
+++ b/services/github/github-directory-file-count.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('directory file count').get('/badges/shields.json').expectBadge({
diff --git a/services/github/github-discussions-total.service.js b/services/github/github-discussions-total.service.js
index cc89cefc51342..425563c220a90 100644
--- a/services/github/github-discussions-total.service.js
+++ b/services/github/github-discussions-total.service.js
@@ -1,8 +1,8 @@
-import gql from 'graphql-tag';
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV4Service} from './github-auth-service.js';
-import {transformErrors} from './github-helpers.js';
+import gql from 'graphql-tag'
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV4Service } from './github-auth-service.js'
+import { transformErrors } from './github-helpers.js'
const schema = Joi.object({
data: Joi.object({
@@ -69,4 +69,4 @@ export default class GithubTotalDiscussions extends GithubAuthV4Service {
} = json
return this.constructor.render({ discussions: `${totalCount} total` })
}
-};
+}
diff --git a/services/github/github-discussions-total.tester.js b/services/github/github-discussions-total.tester.js
index e73c64f3c3f35..7a347876685ce 100644
--- a/services/github/github-discussions-total.tester.js
+++ b/services/github/github-discussions-total.tester.js
@@ -1,5 +1,5 @@
-import {withRegex} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { withRegex } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('GitHub Total Discussions (repo not found)')
diff --git a/services/github/github-downloads.service.js b/services/github/github-downloads.service.js
index 7c60a77279aeb..d544a91e743d8 100644
--- a/services/github/github-downloads.service.js
+++ b/services/github/github-downloads.service.js
@@ -1,11 +1,11 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {downloadCount as downloadCountColor} from '../color-formatters.js';
-import {NotFound} from '../index.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {fetchLatestRelease} from './github-common-release.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { downloadCount as downloadCountColor } from '../color-formatters.js'
+import { NotFound } from '../index.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { fetchLatestRelease } from './github-common-release.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const queryParamSchema = Joi.object({
sort: Joi.string().valid('date', 'semver').default('date'),
@@ -263,4 +263,4 @@ export default class GithubDownloads extends GithubAuthV3Service {
return this.constructor.render({ tag, assetName, downloadCount })
}
-};
+}
diff --git a/services/github/github-downloads.tester.js b/services/github/github-downloads.tester.js
index 22f2873785f8a..e002516906684 100644
--- a/services/github/github-downloads.tester.js
+++ b/services/github/github-downloads.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const mockLatestRelease = release => nock =>
diff --git a/services/github/github-followers.service.js b/services/github/github-followers.service.js
index effcdb1e3beca..71b3d01b05c9f 100644
--- a/services/github/github-followers.service.js
+++ b/services/github/github-followers.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.object({
followers: nonNegativeInteger,
@@ -41,4 +41,4 @@ export default class GithubFollowers extends GithubAuthV3Service {
})
return this.constructor.render({ followers })
}
-};
+}
diff --git a/services/github/github-followers.tester.js b/services/github/github-followers.tester.js
index ce5c9856d1ca4..4e1babb264c26 100644
--- a/services/github/github-followers.tester.js
+++ b/services/github/github-followers.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Followers').get('/webcaetano.json').expectBadge({
diff --git a/services/github/github-forks.service.js b/services/github/github-forks.service.js
index 5a78e2633c644..0c60e03c67ba7 100644
--- a/services/github/github-forks.service.js
+++ b/services/github/github-forks.service.js
@@ -1,9 +1,9 @@
-import gql from 'graphql-tag';
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV4Service} from './github-auth-service.js';
-import {documentation, transformErrors} from './github-helpers.js';
+import gql from 'graphql-tag'
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV4Service } from './github-auth-service.js'
+import { documentation, transformErrors } from './github-helpers.js'
const schema = Joi.object({
data: Joi.object({
@@ -72,4 +72,4 @@ export default class GithubForks extends GithubAuthV4Service {
forkCount: json.data.repository.forkCount,
})
}
-};
+}
diff --git a/services/github/github-forks.tester.js b/services/github/github-forks.tester.js
index 3f61e5d9bae24..31ad83fbbf8c7 100644
--- a/services/github/github-forks.tester.js
+++ b/services/github/github-forks.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Forks')
diff --git a/services/github/github-go-mod.service.js b/services/github/github-go-mod.service.js
index 1e006c46d09ab..9feded9bae79d 100644
--- a/services/github/github-go-mod.service.js
+++ b/services/github/github-go-mod.service.js
@@ -1,9 +1,9 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {InvalidResponse} from '../index.js';
-import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
-import {fetchRepoContent} from './github-common-fetch.js';
-import {documentation} from './github-helpers.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { InvalidResponse } from '../index.js'
+import { ConditionalGithubAuthV3Service } from './github-auth-service.js'
+import { fetchRepoContent } from './github-common-fetch.js'
+import { documentation } from './github-helpers.js'
const queryParamSchema = Joi.object({
filename: Joi.string(),
@@ -13,9 +13,7 @@ const goVersionRegExp = /^go (.+)$/m
const keywords = ['golang']
-export default class GithubGoModGoVersion extends (
- ConditionalGithubAuthV3Service
-) {
+export default class GithubGoModGoVersion extends ConditionalGithubAuthV3Service {
static category = 'version'
static route = {
base: 'github/go-mod/go-version',
@@ -93,4 +91,4 @@ export default class GithubGoModGoVersion extends (
const { go } = this.constructor.transform(content)
return this.constructor.render({ version: go, branch })
}
-};
+}
diff --git a/services/github/github-go-mod.tester.js b/services/github/github-go-mod.tester.js
index b055aad8d5b2d..d42378079cc10 100644
--- a/services/github/github-go-mod.tester.js
+++ b/services/github/github-go-mod.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Go version').get('/gohugoio/hugo.json').expectBadge({
diff --git a/services/github/github-hacktoberfest.service.js b/services/github/github-hacktoberfest.service.js
index d4ff657997351..bf8782c17a5bf 100644
--- a/services/github/github-hacktoberfest.service.js
+++ b/services/github/github-hacktoberfest.service.js
@@ -1,10 +1,13 @@
-import gql from 'graphql-tag';
-import Joi from 'joi';
-import moment from 'moment';
-import {metric, maybePluralize} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV4Service} from './github-auth-service.js';
-import {documentation as githubDocumentation, transformErrors} from './github-helpers.js';
+import gql from 'graphql-tag'
+import Joi from 'joi'
+import moment from 'moment'
+import { metric, maybePluralize } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV4Service } from './github-auth-service.js'
+import {
+ documentation as githubDocumentation,
+ transformErrors,
+} from './github-helpers.js'
const documentation = `
@@ -53,9 +56,7 @@ const queryParamSchema = Joi.object({
suggestion_label: Joi.string(),
}).required()
-export default class GithubHacktoberfestCombinedStatus extends (
- GithubAuthV4Service
-) {
+export default class GithubHacktoberfestCombinedStatus extends GithubAuthV4Service {
static category = 'issue-tracking'
static route = {
base: 'github/hacktoberfest',
@@ -232,4 +233,4 @@ export default class GithubHacktoberfestCombinedStatus extends (
year,
})
}
-};
+}
diff --git a/services/github/github-hacktoberfest.spec.js b/services/github/github-hacktoberfest.spec.js
index 7d86cc0ff9705..c872f7ab64bf7 100644
--- a/services/github/github-hacktoberfest.spec.js
+++ b/services/github/github-hacktoberfest.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import GitHubHacktoberfest from './github-hacktoberfest.service.js';
+import { test, given } from 'sazerac'
+import GitHubHacktoberfest from './github-hacktoberfest.service.js'
describe('GitHubHacktoberfest', function () {
test(GitHubHacktoberfest.render, () => {
diff --git a/services/github/github-hacktoberfest.tester.js b/services/github/github-hacktoberfest.tester.js
index 99c861f7d0e75..5fb0212a9f710 100644
--- a/services/github/github-hacktoberfest.tester.js
+++ b/services/github/github-hacktoberfest.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isHacktoberfestNoIssuesStatus = Joi.string().regex(
diff --git a/services/github/github-helpers.js b/services/github/github-helpers.js
index 261157752ffa2..9bbeda52c6961 100644
--- a/services/github/github-helpers.js
+++ b/services/github/github-helpers.js
@@ -1,5 +1,5 @@
-import {colorScale} from '../color-formatters.js';
-import {InvalidResponse, NotFound} from '../index.js';
+import { colorScale } from '../color-formatters.js'
+import { InvalidResponse, NotFound } from '../index.js'
const documentation = `
@@ -37,4 +37,4 @@ export {
commentsColor,
errorMessagesFor,
transformErrors,
-};
+}
diff --git a/services/github/github-issue-detail-redirect.service.js b/services/github/github-issue-detail-redirect.service.js
index b95d3da95dc33..8bf174f7b67d9 100644
--- a/services/github/github-issue-detail-redirect.service.js
+++ b/services/github/github-issue-detail-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
const variantMap = {
s: 'state',
@@ -17,4 +17,4 @@ export default [
`/github/${issueKind}/detail/${variantMap[variant]}/${user}/${repo}/${number}`,
dateAdded: new Date('2019-04-04'),
}),
-];
+]
diff --git a/services/github/github-issue-detail-redirect.tester.js b/services/github/github-issue-detail-redirect.tester.js
index aa25d1c3ed3b5..1be7ba22c6b96 100644
--- a/services/github/github-issue-detail-redirect.tester.js
+++ b/services/github/github-issue-detail-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'GithubIssueDetailRedirect',
diff --git a/services/github/github-issue-detail.service.js b/services/github/github-issue-detail.service.js
index 5d2c7fa0d0f33..48359527c6793 100644
--- a/services/github/github-issue-detail.service.js
+++ b/services/github/github-issue-detail.service.js
@@ -1,10 +1,15 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {formatDate, metric} from '../text-formatters.js';
-import {age} from '../color-formatters.js';
-import {InvalidResponse} from '../index.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor, stateColor, commentsColor} from './github-helpers.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { formatDate, metric } from '../text-formatters.js'
+import { age } from '../color-formatters.js'
+import { InvalidResponse } from '../index.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import {
+ documentation,
+ errorMessagesFor,
+ stateColor,
+ commentsColor,
+} from './github-helpers.js'
const commonSchemaFields = {
number: nonNegativeInteger,
@@ -210,4 +215,4 @@ export default class GithubIssueDetail extends GithubAuthV3Service {
const { value, isPR } = this.transform({ json, property, issueKind })
return this.constructor.render({ property, value, isPR, number })
}
-};
+}
diff --git a/services/github/github-issue-detail.spec.js b/services/github/github-issue-detail.spec.js
index 649cc17ad7e28..e639bbd4cca42 100644
--- a/services/github/github-issue-detail.spec.js
+++ b/services/github/github-issue-detail.spec.js
@@ -1,10 +1,10 @@
-import {expect} from 'chai';
-import {test, given} from 'sazerac';
-import {age} from '../color-formatters.js';
-import {formatDate, metric} from '../text-formatters.js';
-import {InvalidResponse} from '../index.js';
-import GithubIssueDetail from './github-issue-detail.service.js';
-import {stateColor, commentsColor} from './github-helpers.js';
+import { expect } from 'chai'
+import { test, given } from 'sazerac'
+import { age } from '../color-formatters.js'
+import { formatDate, metric } from '../text-formatters.js'
+import { InvalidResponse } from '../index.js'
+import GithubIssueDetail from './github-issue-detail.service.js'
+import { stateColor, commentsColor } from './github-helpers.js'
describe('GithubIssueDetail', function () {
test(GithubIssueDetail.render, () => {
diff --git a/services/github/github-issue-detail.tester.js b/services/github/github-issue-detail.tester.js
index d023b254a2e72..bb0103e48ca48 100644
--- a/services/github/github-issue-detail.tester.js
+++ b/services/github/github-issue-detail.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isFormattedDate} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isFormattedDate } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('github issue state')
diff --git a/services/github/github-issues-search.service.js b/services/github/github-issues-search.service.js
index e27308232db2c..68e1b2a5eb766 100644
--- a/services/github/github-issues-search.service.js
+++ b/services/github/github-issues-search.service.js
@@ -1,9 +1,9 @@
-import gql from 'graphql-tag';
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV4Service} from './github-auth-service.js';
-import {documentation, transformErrors} from './github-helpers.js';
+import gql from 'graphql-tag'
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV4Service } from './github-auth-service.js'
+import { documentation, transformErrors } from './github-helpers.js'
const issueCountSchema = Joi.object({
data: Joi.object({
@@ -104,7 +104,4 @@ class GithubRepoIssuesSearch extends BaseGithubIssuesSearch {
}
}
-export {
- GithubIssuesSearch,
- GithubRepoIssuesSearch,
-};
+export { GithubIssuesSearch, GithubRepoIssuesSearch }
diff --git a/services/github/github-issues-search.tester.js b/services/github/github-issues-search.tester.js
index f787d8abb717e..57bd0c11a778b 100644
--- a/services/github/github-issues-search.tester.js
+++ b/services/github/github-issues-search.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import { isMetric } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'GithubIssuesSearch',
title: 'Github Issues Search',
diff --git a/services/github/github-issues.service.js b/services/github/github-issues.service.js
index af603094a20aa..d9bfe3d2adecc 100644
--- a/services/github/github-issues.service.js
+++ b/services/github/github-issues.service.js
@@ -1,9 +1,9 @@
-import gql from 'graphql-tag';
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV4Service} from './github-auth-service.js';
-import {documentation, transformErrors} from './github-helpers.js';
+import gql from 'graphql-tag'
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV4Service } from './github-auth-service.js'
+import { documentation, transformErrors } from './github-helpers.js'
const issueCountSchema = Joi.object({
data: Joi.object({
@@ -399,4 +399,4 @@ export default class GithubIssues extends GithubAuthV4Service {
label,
})
}
-};
+}
diff --git a/services/github/github-issues.tester.js b/services/github/github-issues.tester.js
index 193c4127c08ea..f84a99f432ac5 100644
--- a/services/github/github-issues.tester.js
+++ b/services/github/github-issues.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isMetric, isMetricOpenIssues} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isMetric, isMetricOpenIssues } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('GitHub closed pull requests')
diff --git a/services/github/github-labels.service.js b/services/github/github-labels.service.js
index 3217ca881d3fe..70176517bf507 100644
--- a/services/github/github-labels.service.js
+++ b/services/github/github-labels.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.object({
color: Joi.string().hex().required(),
@@ -43,4 +43,4 @@ export default class GithubLabels extends GithubAuthV3Service {
const { color } = await this.fetch({ user, repo, name })
return this.constructor.render({ name, color })
}
-};
+}
diff --git a/services/github/github-labels.tester.js b/services/github/github-labels.tester.js
index 1a1d6b6246fbd..d493e03ffd850 100644
--- a/services/github/github-labels.tester.js
+++ b/services/github/github-labels.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('labels').get('/badges/shields/bug.json').expectBadge({
diff --git a/services/github/github-language-count.service.js b/services/github/github-language-count.service.js
index 012dce66d8c41..b730372221517 100644
--- a/services/github/github-language-count.service.js
+++ b/services/github/github-language-count.service.js
@@ -1,5 +1,5 @@
-import {BaseGithubLanguage} from './github-languages-base.js';
-import {documentation} from './github-helpers.js';
+import { BaseGithubLanguage } from './github-languages-base.js'
+import { documentation } from './github-helpers.js'
export default class GithubLanguageCount extends BaseGithubLanguage {
static category = 'analysis'
@@ -29,4 +29,4 @@ export default class GithubLanguageCount extends BaseGithubLanguage {
const data = await this.fetch({ user, repo })
return this.constructor.render({ count: Object.keys(data).length })
}
-};
+}
diff --git a/services/github/github-language-count.tester.js b/services/github/github-language-count.tester.js
index 2440aa1937506..b7464402995f4 100644
--- a/services/github/github-language-count.tester.js
+++ b/services/github/github-language-count.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('language count').get('/badges/shields.json').expectBadge({
diff --git a/services/github/github-languages-base.js b/services/github/github-languages-base.js
index 64ed4d03d6a1f..92427519feb91 100644
--- a/services/github/github-languages-base.js
+++ b/services/github/github-languages-base.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { errorMessagesFor } from './github-helpers.js'
/*
We're expecting a response like { "Python": 39624, "Shell": 104 }
@@ -23,4 +23,4 @@ class BaseGithubLanguage extends GithubAuthV3Service {
}
}
-export { BaseGithubLanguage };
+export { BaseGithubLanguage }
diff --git a/services/github/github-last-commit.service.js b/services/github/github-last-commit.service.js
index e12c9245e02a6..b452fbe96b6d4 100644
--- a/services/github/github-last-commit.service.js
+++ b/services/github/github-last-commit.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {formatDate} from '../text-formatters.js';
-import {age as ageColor} from '../color-formatters.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import { formatDate } from '../text-formatters.js'
+import { age as ageColor } from '../color-formatters.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const commonExampleAttrs = {
keywords: ['latest'],
documentation,
@@ -69,4 +69,4 @@ export default class GithubLastCommit extends GithubAuthV3Service {
const body = await this.fetch({ user, repo, branch })
return this.constructor.render({ commitDate: body[0].commit.author.date })
}
-};
+}
diff --git a/services/github/github-last-commit.tester.js b/services/github/github-last-commit.tester.js
index cadeff74c25e6..23eed9fb37bb6 100644
--- a/services/github/github-last-commit.tester.js
+++ b/services/github/github-last-commit.tester.js
@@ -1,5 +1,5 @@
-import {isFormattedDate} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isFormattedDate } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('last commit (recent)')
diff --git a/services/github/github-lerna-json.service.js b/services/github/github-lerna-json.service.js
index b114bbd396cff..f306563a5912f 100644
--- a/services/github/github-lerna-json.service.js
+++ b/services/github/github-lerna-json.service.js
@@ -1,9 +1,9 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {semver} from '../validators.js';
-import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
-import {fetchJsonFromRepo} from './github-common-fetch.js';
-import {documentation} from './github-helpers.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { semver } from '../validators.js'
+import { ConditionalGithubAuthV3Service } from './github-auth-service.js'
+import { fetchJsonFromRepo } from './github-common-fetch.js'
+import { documentation } from './github-helpers.js'
const versionSchema = Joi.object({
version: Joi.alternatives().try(semver, Joi.equal('independent').required()),
@@ -56,4 +56,4 @@ export default class GithubLernaJson extends ConditionalGithubAuthV3Service {
})
return this.constructor.render({ version, branch })
}
-};
+}
diff --git a/services/github/github-lerna-json.tester.js b/services/github/github-lerna-json.tester.js
index 7e6478db8974b..c86f97bcdb826 100644
--- a/services/github/github-lerna-json.tester.js
+++ b/services/github/github-lerna-json.tester.js
@@ -1,5 +1,5 @@
-import {isSemver} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isSemver } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Lerna version').get('/facebook/jest.json').expectBadge({
diff --git a/services/github/github-license.service.js b/services/github/github-license.service.js
index ed038b3b4fc8e..360153f29e61f 100644
--- a/services/github/github-license.service.js
+++ b/services/github/github-license.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {renderLicenseBadge} from '../licenses.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import { renderLicenseBadge } from '../licenses.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.object({
// Some repos do not have a license, in which case GitHub returns `{ license: null }`.
@@ -46,4 +46,4 @@ export default class GithubLicense extends GithubAuthV3Service {
const license = licenseObject ? licenseObject.spdx_id : undefined
return this.constructor.render({ license })
}
-};
+}
diff --git a/services/github/github-license.spec.js b/services/github/github-license.spec.js
index a80bb68b8504c..87167fc26d516 100644
--- a/services/github/github-license.spec.js
+++ b/services/github/github-license.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import GithubLicense from './github-license.service.js';
+import { test, given } from 'sazerac'
+import GithubLicense from './github-license.service.js'
test(GithubLicense.render, () => {
given({ license: undefined }).expect({ message: 'not specified' })
diff --git a/services/github/github-license.tester.js b/services/github/github-license.tester.js
index 40508f9c3928f..0cef52f4c75b8 100644
--- a/services/github/github-license.tester.js
+++ b/services/github/github-license.tester.js
@@ -1,5 +1,5 @@
-import {licenseToColor} from '../licenses.js';
-import {createServiceTester} from '../tester.js'
+import { licenseToColor } from '../licenses.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const publicDomainLicenseColor = licenseToColor('CC0-1.0')
diff --git a/services/github/github-manifest.service.js b/services/github/github-manifest.service.js
index b233746db3fd7..5919507398597 100644
--- a/services/github/github-manifest.service.js
+++ b/services/github/github-manifest.service.js
@@ -1,9 +1,13 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {individualValueSchema, transformAndValidate, renderDynamicBadge} from '../dynamic-common.js';
-import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
-import {fetchJsonFromRepo} from './github-common-fetch.js';
-import {documentation} from './github-helpers.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import {
+ individualValueSchema,
+ transformAndValidate,
+ renderDynamicBadge,
+} from '../dynamic-common.js'
+import { ConditionalGithubAuthV3Service } from './github-auth-service.js'
+import { fetchJsonFromRepo } from './github-common-fetch.js'
+import { documentation } from './github-helpers.js'
const schema = Joi.object({
version: individualValueSchema,
@@ -198,7 +202,4 @@ class DynamicGithubManifest extends ConditionalGithubAuthV3Service {
}
}
-export {
- GithubManifestVersion,
- DynamicGithubManifest,
-};
+export { GithubManifestVersion, DynamicGithubManifest }
diff --git a/services/github/github-manifest.tester.js b/services/github/github-manifest.tester.js
index 4dec6dd2c8edd..a1e9849f9779e 100644
--- a/services/github/github-manifest.tester.js
+++ b/services/github/github-manifest.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
export const t = new ServiceTester({
id: 'GithubManifest',
diff --git a/services/github/github-milestone-detail.service.js b/services/github/github-milestone-detail.service.js
index 3bebf1882a0fc..ac3b071c5dd6c 100644
--- a/services/github/github-milestone-detail.service.js
+++ b/services/github/github-milestone-detail.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.object({
open_issues: nonNegativeInteger,
@@ -93,4 +93,4 @@ export default class GithubMilestoneDetail extends GithubAuthV3Service {
const milestone = await this.fetch({ user, repo, number })
return this.constructor.render({ user, repo, variant, number, milestone })
}
-};
+}
diff --git a/services/github/github-milestone-detail.tester.js b/services/github/github-milestone-detail.tester.js
index 24581d66a23e8..4305a6074b19d 100644
--- a/services/github/github-milestone-detail.tester.js
+++ b/services/github/github-milestone-detail.tester.js
@@ -1,5 +1,9 @@
-import {isMetric, isMetricOverMetric, isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import {
+ isMetric,
+ isMetricOverMetric,
+ isIntegerPercentage,
+} from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Milestone Open Issues')
diff --git a/services/github/github-milestone.service.js b/services/github/github-milestone.service.js
index 744a05be2d7c7..62b623aed7fd4 100644
--- a/services/github/github-milestone.service.js
+++ b/services/github/github-milestone.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.array()
.items(
@@ -78,4 +78,4 @@ export default class GithubMilestone extends GithubAuthV3Service {
const milestones = await this.fetch({ user, repo, variant })
return this.constructor.render({ user, repo, variant, milestones })
}
-};
+}
diff --git a/services/github/github-milestone.tester.js b/services/github/github-milestone.tester.js
index a91bb820bf142..dd9b92234ad72 100644
--- a/services/github/github-milestone.tester.js
+++ b/services/github/github-milestone.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('All Milestones')
diff --git a/services/github/github-package-json.service.js b/services/github/github-package-json.service.js
index 881384d300d45..dc2663069f22f 100644
--- a/services/github/github-package-json.service.js
+++ b/services/github/github-package-json.service.js
@@ -1,11 +1,14 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {transformAndValidate, renderDynamicBadge} from '../dynamic-common.js';
-import {isPackageJsonWithDependencies, getDependencyVersion} from '../package-json-helpers.js';
-import {semver} from '../validators.js';
-import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
-import {fetchJsonFromRepo} from './github-common-fetch.js';
-import {documentation} from './github-helpers.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { transformAndValidate, renderDynamicBadge } from '../dynamic-common.js'
+import {
+ isPackageJsonWithDependencies,
+ getDependencyVersion,
+} from '../package-json-helpers.js'
+import { semver } from '../validators.js'
+import { ConditionalGithubAuthV3Service } from './github-auth-service.js'
+import { fetchJsonFromRepo } from './github-common-fetch.js'
+import { documentation } from './github-helpers.js'
const keywords = ['npm', 'node']
@@ -243,4 +246,4 @@ export default [
GithubPackageJsonVersion,
GithubPackageJsonDependencyVersion,
DynamicGithubPackageJson,
-];
+]
diff --git a/services/github/github-package-json.tester.js b/services/github/github-package-json.tester.js
index 0bfdb806decee..eb16fb42b0147 100644
--- a/services/github/github-package-json.tester.js
+++ b/services/github/github-package-json.tester.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
-import {isSemver} from '../test-validators.js';
-import {semverRange} from '../validators.js';
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
+import { isSemver } from '../test-validators.js'
+import { semverRange } from '../validators.js'
export const t = new ServiceTester({
id: 'GithubPackageJson',
diff --git a/services/github/github-pipenv.service.js b/services/github/github-pipenv.service.js
index 8d5b1230e20b6..758903747a49d 100644
--- a/services/github/github-pipenv.service.js
+++ b/services/github/github-pipenv.service.js
@@ -1,10 +1,10 @@
-import {renderVersionBadge} from '../version.js';
-import {isLockfile, getDependencyVersion} from '../pipenv-helpers.js';
-import {addv} from '../text-formatters.js';
-import {NotFound} from '../index.js';
-import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
-import {fetchJsonFromRepo} from './github-common-fetch.js';
-import {documentation as githubDocumentation} from './github-helpers.js';
+import { renderVersionBadge } from '../version.js'
+import { isLockfile, getDependencyVersion } from '../pipenv-helpers.js'
+import { addv } from '../text-formatters.js'
+import { NotFound } from '../index.js'
+import { ConditionalGithubAuthV3Service } from './github-auth-service.js'
+import { fetchJsonFromRepo } from './github-common-fetch.js'
+import { documentation as githubDocumentation } from './github-helpers.js'
const keywords = ['pipfile']
@@ -175,4 +175,4 @@ class GithubPipenvLockedDependencyVersion extends ConditionalGithubAuthV3Service
export default [
GithubPipenvLockedPythonVersion,
GithubPipenvLockedDependencyVersion,
-];
+]
diff --git a/services/github/github-pipenv.tester.js b/services/github/github-pipenv.tester.js
index 584f101179ce9..c3fa864748eb3 100644
--- a/services/github/github-pipenv.tester.js
+++ b/services/github/github-pipenv.tester.js
@@ -1,6 +1,9 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
-import {isVPlusDottedVersionAtLeastOne, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
+import {
+ isVPlusDottedVersionAtLeastOne,
+ isVPlusDottedVersionNClausesWithOptionalSuffix,
+} from '../test-validators.js'
// e.g. v19.3b0
const isBlackVersion = Joi.string().regex(/^v\d+(\.\d+)*(.*)?$/)
diff --git a/services/github/github-pull-request-check-state.service.js b/services/github/github-pull-request-check-state.service.js
index 36c73b6b68f4e..969c75d91be9d 100644
--- a/services/github/github-pull-request-check-state.service.js
+++ b/services/github/github-pull-request-check-state.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import countBy from 'lodash.countby';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {fetchIssue} from './github-common-fetch.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import countBy from 'lodash.countby'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { fetchIssue } from './github-common-fetch.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.object({
state: Joi.equal('failure', 'pending', 'success').required(),
@@ -98,4 +98,4 @@ export default class GithubPullRequestCheckState extends GithubAuthV3Service {
return this.constructor.render({ variant, state, stateCounts })
}
-};
+}
diff --git a/services/github/github-pull-request-check-state.tester.js b/services/github/github-pull-request-check-state.tester.js
index 4ba9dc033dc1d..9095f266f95a1 100644
--- a/services/github/github-pull-request-check-state.tester.js
+++ b/services/github/github-pull-request-check-state.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('github pull request check state')
diff --git a/services/github/github-r-package.service.js b/services/github/github-r-package.service.js
index b6896024c1e19..837abf6151c94 100644
--- a/services/github/github-r-package.service.js
+++ b/services/github/github-r-package.service.js
@@ -1,9 +1,9 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {InvalidResponse} from '../index.js';
-import {ConditionalGithubAuthV3Service} from './github-auth-service.js';
-import {fetchRepoContent} from './github-common-fetch.js';
-import {documentation} from './github-helpers.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { InvalidResponse } from '../index.js'
+import { ConditionalGithubAuthV3Service } from './github-auth-service.js'
+import { fetchRepoContent } from './github-common-fetch.js'
+import { documentation } from './github-helpers.js'
const queryParamSchema = Joi.object({
filename: Joi.string(),
@@ -11,9 +11,7 @@ const queryParamSchema = Joi.object({
const versionRegExp = /^Version:[\s]*(.+)$/m
-export default class GithubRPackageVersion extends (
- ConditionalGithubAuthV3Service
-) {
+export default class GithubRPackageVersion extends ConditionalGithubAuthV3Service {
static category = 'version'
static route = {
@@ -88,4 +86,4 @@ export default class GithubRPackageVersion extends (
const { version } = this.constructor.transform(content, filename)
return this.constructor.render({ version, branch })
}
-};
+}
diff --git a/services/github/github-r-package.spec.js b/services/github/github-r-package.spec.js
index 23fd48e57c0d0..cc6516685e441 100644
--- a/services/github/github-r-package.spec.js
+++ b/services/github/github-r-package.spec.js
@@ -1,7 +1,7 @@
-import {expect} from 'chai';
-import {test, given} from 'sazerac';
-import {InvalidResponse} from '../index.js';
-import GithubRPackageVersion from './github-r-package.service.js';
+import { expect } from 'chai'
+import { test, given } from 'sazerac'
+import { InvalidResponse } from '../index.js'
+import GithubRPackageVersion from './github-r-package.service.js'
describe('GithubRPackageVersion', function () {
const content = versionLine =>
diff --git a/services/github/github-r-package.tester.js b/services/github/github-r-package.tester.js
index b8ef328f07d2c..18247e1918a2d 100644
--- a/services/github/github-r-package.tester.js
+++ b/services/github/github-r-package.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('R package version').get('/mixOmicsTeam/mixOmics.json').expectBadge({
diff --git a/services/github/github-release-date.service.js b/services/github/github-release-date.service.js
index 2eddcb77dce29..098bb7c11cc84 100644
--- a/services/github/github-release-date.service.js
+++ b/services/github/github-release-date.service.js
@@ -1,9 +1,9 @@
-import moment from 'moment';
-import Joi from 'joi';
-import {age} from '../color-formatters.js';
-import {formatDate} from '../text-formatters.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import moment from 'moment'
+import Joi from 'joi'
+import { age } from '../color-formatters.js'
+import { formatDate } from '../text-formatters.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.alternatives(
Joi.object({
@@ -77,4 +77,4 @@ export default class GithubReleaseDate extends GithubAuthV3Service {
}
return this.constructor.render({ date: body.created_at })
}
-};
+}
diff --git a/services/github/github-release-date.tester.js b/services/github/github-release-date.tester.js
index 2c9443e6991d2..3cf255fb731ee 100644
--- a/services/github/github-release-date.tester.js
+++ b/services/github/github-release-date.tester.js
@@ -1,5 +1,5 @@
-import {isFormattedDate} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isFormattedDate } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Release Date. e.g release date|today')
diff --git a/services/github/github-release.service.js b/services/github/github-release.service.js
index a2a83afc69b98..94343ad530a7d 100644
--- a/services/github/github-release.service.js
+++ b/services/github/github-release.service.js
@@ -1,9 +1,12 @@
-import {addv} from '../text-formatters.js';
-import {version as versionColor} from '../color-formatters.js';
-import {redirector} from '../index.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {fetchLatestRelease, queryParamSchema} from './github-common-release.js';
-import {documentation} from './github-helpers.js';
+import { addv } from '../text-formatters.js'
+import { version as versionColor } from '../color-formatters.js'
+import { redirector } from '../index.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import {
+ fetchLatestRelease,
+ queryParamSchema,
+} from './github-common-release.js'
+import { documentation } from './github-helpers.js'
class GithubRelease extends GithubAuthV3Service {
static category = 'version'
@@ -117,7 +120,4 @@ const redirects = {
}),
}
-export {
- GithubRelease,
- redirects,
-};
+export { GithubRelease, redirects }
diff --git a/services/github/github-release.tester.js b/services/github/github-release.tester.js
index ae255d17f17e1..629eafeecb50f 100644
--- a/services/github/github-release.tester.js
+++ b/services/github/github-release.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isSemver} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import Joi from 'joi'
+import { isSemver } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'GithubRelease',
diff --git a/services/github/github-repo-size.service.js b/services/github/github-repo-size.service.js
index d4455699de286..774ddad426399 100644
--- a/services/github/github-repo-size.service.js
+++ b/services/github/github-repo-size.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import prettyBytes from 'pretty-bytes';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import prettyBytes from 'pretty-bytes'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.object({
size: nonNegativeInteger,
@@ -45,4 +45,4 @@ export default class GithubRepoSize extends GithubAuthV3Service {
const { size } = await this.fetch({ user, repo })
return this.constructor.render({ size })
}
-};
+}
diff --git a/services/github/github-repo-size.tester.js b/services/github/github-repo-size.tester.js
index 5be24a5b8072e..c39f5c700f4a2 100644
--- a/services/github/github-repo-size.tester.js
+++ b/services/github/github-repo-size.tester.js
@@ -1,5 +1,5 @@
-import {isFileSize} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isFileSize } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('repository size').get('/badges/shields.json').expectBadge({
diff --git a/services/github/github-search.service.js b/services/github/github-search.service.js
index c927a4efbcebb..361d1b9eb737a 100644
--- a/services/github/github-search.service.js
+++ b/services/github/github-search.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {errorMessagesFor, documentation} from './github-helpers.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { errorMessagesFor, documentation } from './github-helpers.js'
const schema = Joi.object({ total_count: nonNegativeInteger }).required()
@@ -53,4 +53,4 @@ export default class GithubSearch extends GithubAuthV3Service {
})
return this.constructor.render({ query, totalCount })
}
-};
+}
diff --git a/services/github/github-search.tester.js b/services/github/github-search.tester.js
index 115d2885a5333..cb3fa80564a1c 100644
--- a/services/github/github-search.tester.js
+++ b/services/github/github-search.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('hit counter')
diff --git a/services/github/github-size.service.js b/services/github/github-size.service.js
index ca31c7bafc4b8..b932faf17e21a 100644
--- a/services/github/github-size.service.js
+++ b/services/github/github-size.service.js
@@ -1,9 +1,9 @@
-import Joi from 'joi';
-import prettyBytes from 'pretty-bytes';
-import {nonNegativeInteger} from '../validators.js';
-import {NotFound} from '../index.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import prettyBytes from 'pretty-bytes'
+import { nonNegativeInteger } from '../validators.js'
+import { NotFound } from '../index.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.alternatives(
Joi.object({
@@ -56,4 +56,4 @@ export default class GithubSize extends GithubAuthV3Service {
}
return this.constructor.render({ size: body.size })
}
-};
+}
diff --git a/services/github/github-size.tester.js b/services/github/github-size.tester.js
index 2625aac379d37..db61aa9ac9211 100644
--- a/services/github/github-size.tester.js
+++ b/services/github/github-size.tester.js
@@ -1,5 +1,5 @@
-import {isFileSize} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isFileSize } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('File size')
diff --git a/services/github/github-sponsors.service.js b/services/github/github-sponsors.service.js
index 2992e63f9a6fb..825104094c7aa 100644
--- a/services/github/github-sponsors.service.js
+++ b/services/github/github-sponsors.service.js
@@ -1,10 +1,10 @@
-import gql from 'graphql-tag';
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {NotFound} from '../index.js';
-import {GithubAuthV4Service} from './github-auth-service.js';
-import {documentation, transformErrors} from './github-helpers.js';
+import gql from 'graphql-tag'
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { NotFound } from '../index.js'
+import { GithubAuthV4Service } from './github-auth-service.js'
+import { documentation, transformErrors } from './github-helpers.js'
const schema = Joi.object({
data: Joi.object({
@@ -79,4 +79,4 @@ export default class GithubSponsors extends GithubAuthV4Service {
count,
})
}
-};
+}
diff --git a/services/github/github-sponsors.tester.js b/services/github/github-sponsors.tester.js
index d97dcccd09e2c..dc5247cc4e1d5 100644
--- a/services/github/github-sponsors.tester.js
+++ b/services/github/github-sponsors.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import { isMetric } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'GithubSponsors',
diff --git a/services/github/github-stars.service.js b/services/github/github-stars.service.js
index 28c1d99943829..c790da3f23815 100644
--- a/services/github/github-stars.service.js
+++ b/services/github/github-stars.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.object({
stargazers_count: nonNegativeInteger,
@@ -60,4 +60,4 @@ export default class GithubStars extends GithubAuthV3Service {
})
return this.constructor.render({ user, repo, stars })
}
-};
+}
diff --git a/services/github/github-stars.tester.js b/services/github/github-stars.tester.js
index bb957208e78f3..6155dd553baeb 100644
--- a/services/github/github-stars.tester.js
+++ b/services/github/github-stars.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Stars')
diff --git a/services/github/github-tag.service.js b/services/github/github-tag.service.js
index 6bccae7e15cc3..d97201d518853 100644
--- a/services/github/github-tag.service.js
+++ b/services/github/github-tag.service.js
@@ -1,12 +1,12 @@
-import gql from 'graphql-tag';
-import Joi from 'joi';
-import {addv} from '../text-formatters.js';
-import {version as versionColor} from '../color-formatters.js';
-import {latest} from '../version.js';
-import {NotFound, redirector} from '../index.js';
-import {GithubAuthV4Service} from './github-auth-service.js';
-import {queryParamSchema} from './github-common-release.js';
-import {documentation, transformErrors} from './github-helpers.js';
+import gql from 'graphql-tag'
+import Joi from 'joi'
+import { addv } from '../text-formatters.js'
+import { version as versionColor } from '../color-formatters.js'
+import { latest } from '../version.js'
+import { NotFound, redirector } from '../index.js'
+import { GithubAuthV4Service } from './github-auth-service.js'
+import { queryParamSchema } from './github-common-release.js'
+import { documentation, transformErrors } from './github-helpers.js'
const schema = Joi.object({
data: Joi.object({
@@ -161,7 +161,4 @@ const redirects = {
}),
}
-export {
- GithubTag,
- redirects,
-};
+export { GithubTag, redirects }
diff --git a/services/github/github-tag.spec.js b/services/github/github-tag.spec.js
index c396eb4a8ec04..c0fbd51e1b14e 100644
--- a/services/github/github-tag.spec.js
+++ b/services/github/github-tag.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import {GithubTag} from './github-tag.service.js';
+import { test, given } from 'sazerac'
+import { GithubTag } from './github-tag.service.js'
describe('GithubTag', function () {
test(GithubTag.getLatestTag, () => {
diff --git a/services/github/github-tag.tester.js b/services/github/github-tag.tester.js
index c98e32e00b019..1a804c288621d 100644
--- a/services/github/github-tag.tester.js
+++ b/services/github/github-tag.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isSemver} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import Joi from 'joi'
+import { isSemver } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'GithubTag',
diff --git a/services/github/github-top-language.service.js b/services/github/github-top-language.service.js
index 56e9008ff08c0..21aac82113531 100644
--- a/services/github/github-top-language.service.js
+++ b/services/github/github-top-language.service.js
@@ -1,5 +1,5 @@
-import {BaseGithubLanguage} from './github-languages-base.js';
-import {documentation} from './github-helpers.js';
+import { BaseGithubLanguage } from './github-languages-base.js'
+import { documentation } from './github-helpers.js'
export default class GithubTopLanguage extends BaseGithubLanguage {
static category = 'analysis'
@@ -49,4 +49,4 @@ export default class GithubTopLanguage extends BaseGithubLanguage {
totalSize: this.getTotalSize(data),
})
}
-};
+}
diff --git a/services/github/github-top-language.tester.js b/services/github/github-top-language.tester.js
index ee20fbd97bfa4..5bfea8d71299a 100644
--- a/services/github/github-top-language.tester.js
+++ b/services/github/github-top-language.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('top language')
diff --git a/services/github/github-total-star.service.js b/services/github/github-total-star.service.js
index d025727bb3c7b..70461fe72c64f 100644
--- a/services/github/github-total-star.service.js
+++ b/services/github/github-total-star.service.js
@@ -1,9 +1,12 @@
-import Joi from 'joi';
-import gql from 'graphql-tag';
-import {nonNegativeInteger} from '../validators.js';
-import {metric} from '../text-formatters.js';
-import {GithubAuthV4Service} from './github-auth-service.js';
-import {documentation as commonDocumentation, transformErrors} from './github-helpers.js';
+import Joi from 'joi'
+import gql from 'graphql-tag'
+import { nonNegativeInteger } from '../validators.js'
+import { metric } from '../text-formatters.js'
+import { GithubAuthV4Service } from './github-auth-service.js'
+import {
+ documentation as commonDocumentation,
+ transformErrors,
+} from './github-helpers.js'
const MAX_REPO_LIMIT = 200
@@ -238,4 +241,4 @@ export default class GithubTotalStarService extends GithubAuthV4Service {
const totalStars = await this.getTotalStars({ user }, queryParams)
return this.constructor.render({ totalStars, user })
}
-};
+}
diff --git a/services/github/github-total-star.tester.js b/services/github/github-total-star.tester.js
index 1724c28bcc50a..e67516275fe2f 100644
--- a/services/github/github-total-star.tester.js
+++ b/services/github/github-total-star.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Stars (User)')
diff --git a/services/github/github-watchers.service.js b/services/github/github-watchers.service.js
index 091e5236efa12..088757ff93a50 100644
--- a/services/github/github-watchers.service.js
+++ b/services/github/github-watchers.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {GithubAuthV3Service} from './github-auth-service.js';
-import {documentation, errorMessagesFor} from './github-helpers.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { GithubAuthV3Service } from './github-auth-service.js'
+import { documentation, errorMessagesFor } from './github-helpers.js'
const schema = Joi.object({
subscribers_count: nonNegativeInteger,
@@ -59,4 +59,4 @@ export default class GithubWatchers extends GithubAuthV3Service {
})
return this.constructor.render({ user, repo, watchers })
}
-};
+}
diff --git a/services/github/github-watchers.tester.js b/services/github/github-watchers.tester.js
index 5a8de82291172..606b9e53c8a37 100644
--- a/services/github/github-watchers.tester.js
+++ b/services/github/github-watchers.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Watchers')
diff --git a/services/github/github-workflow-status.service.js b/services/github/github-workflow-status.service.js
index 122228371a3a7..f5467d7b2aac8 100644
--- a/services/github/github-workflow-status.service.js
+++ b/services/github/github-workflow-status.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseSvgScrapingService} from '../index.js';
-import {documentation} from './github-helpers.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { BaseSvgScrapingService } from '../index.js'
+import { documentation } from './github-helpers.js'
const schema = Joi.object({
message: Joi.alternatives()
@@ -97,4 +97,4 @@ export default class GithubWorkflowStatus extends BaseSvgScrapingService {
const { status } = await this.fetch({ user, repo, workflow, branch, event })
return renderBuildStatusBadge({ status })
}
-};
+}
diff --git a/services/github/github-workflow-status.tester.js b/services/github/github-workflow-status.tester.js
index 8594851a979fa..573a16e7b18f1 100644
--- a/services/github/github-workflow-status.tester.js
+++ b/services/github/github-workflow-status.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isWorkflowStatus = Joi.alternatives()
diff --git a/services/gitlab/gitlab-coverage.service.js b/services/gitlab/gitlab-coverage.service.js
index 6035f9a285e64..f7b4c045d8b9b 100644
--- a/services/gitlab/gitlab-coverage.service.js
+++ b/services/gitlab/gitlab-coverage.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {coveragePercentage} from '../color-formatters.js';
-import {optionalUrl} from '../validators.js';
-import {BaseSvgScrapingService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { coveragePercentage } from '../color-formatters.js'
+import { optionalUrl } from '../validators.js'
+import { BaseSvgScrapingService, NotFound } from '../index.js'
const schema = Joi.object({
message: Joi.string()
@@ -136,4 +136,4 @@ export default class GitlabCoverage extends BaseSvgScrapingService {
coverage: this.constructor.transform({ coverage }),
})
}
-};
+}
diff --git a/services/gitlab/gitlab-coverage.tester.js b/services/gitlab/gitlab-coverage.tester.js
index 22d2b6d6e9145..576c5a8972807 100644
--- a/services/gitlab/gitlab-coverage.tester.js
+++ b/services/gitlab/gitlab-coverage.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Coverage (branch)')
diff --git a/services/gitlab/gitlab-pipeline-status.service.js b/services/gitlab/gitlab-pipeline-status.service.js
index 379246124500e..70494b1a6c21c 100644
--- a/services/gitlab/gitlab-pipeline-status.service.js
+++ b/services/gitlab/gitlab-pipeline-status.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {optionalUrl} from '../validators.js';
-import {BaseSvgScrapingService, NotFound, redirector} from '../index.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { optionalUrl } from '../validators.js'
+import { BaseSvgScrapingService, NotFound, redirector } from '../index.js'
const badgeSchema = Joi.object({
message: Joi.alternatives()
@@ -97,7 +97,4 @@ const GitlabPipelineStatusRedirector = redirector({
dateAdded: new Date('2020-07-12'),
})
-export {
- GitlabPipelineStatus,
- GitlabPipelineStatusRedirector,
-};
+export { GitlabPipelineStatus, GitlabPipelineStatusRedirector }
diff --git a/services/gitlab/gitlab-pipeline-status.tester.js b/services/gitlab/gitlab-pipeline-status.tester.js
index 293af5becd9b2..db8ee99ed77fd 100644
--- a/services/gitlab/gitlab-pipeline-status.tester.js
+++ b/services/gitlab/gitlab-pipeline-status.tester.js
@@ -1,5 +1,5 @@
-import {isBuildStatus} from '../build-status.js';
-import {ServiceTester} from '../tester.js';
+import { isBuildStatus } from '../build-status.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'GitlabPipeline',
title: 'Gitlab Pipeline',
diff --git a/services/gitter/gitter.service.js b/services/gitter/gitter.service.js
index bd1ae135c50d9..55e5d119f7ce7 100644
--- a/services/gitter/gitter.service.js
+++ b/services/gitter/gitter.service.js
@@ -1,4 +1,4 @@
-import {BaseStaticService} from '../index.js';
+import { BaseStaticService } from '../index.js'
export default class Gitter extends BaseStaticService {
static category = 'chat'
@@ -28,4 +28,4 @@ export default class Gitter extends BaseStaticService {
handle() {
return this.constructor.render()
}
-};
+}
diff --git a/services/gitter/gitter.tester.js b/services/gitter/gitter.tester.js
index 16abaebf2765d..53c8a9cdd9138 100644
--- a/services/gitter/gitter.tester.js
+++ b/services/gitter/gitter.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('on gitter').get('/nwjs/nw.js.json').expectBadge({
diff --git a/services/gradle-plugin-portal/gradle-plugin-portal.tester.js b/services/gradle-plugin-portal/gradle-plugin-portal.tester.js
index 8614b81f66461..978103d0189d3 100644
--- a/services/gradle-plugin-portal/gradle-plugin-portal.tester.js
+++ b/services/gradle-plugin-portal/gradle-plugin-portal.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gradle plugin portal')
diff --git a/services/gratipay/gratipay.service.js b/services/gratipay/gratipay.service.js
index b93af93369bc3..8ea38b6e9555e 100644
--- a/services/gratipay/gratipay.service.js
+++ b/services/gratipay/gratipay.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
const commonAttrs = {
category: 'funding',
@@ -21,4 +21,4 @@ export default [
},
...commonAttrs,
}),
-];
+]
diff --git a/services/gratipay/gratipay.tester.js b/services/gratipay/gratipay.tester.js
index a41a387c1d694..f7684a05de39f 100644
--- a/services/gratipay/gratipay.tester.js
+++ b/services/gratipay/gratipay.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'gratipay',
diff --git a/services/hackage/hackage-deps.service.js b/services/hackage/hackage-deps.service.js
index e9648802d14c0..f3cbd1deb996b 100644
--- a/services/hackage/hackage-deps.service.js
+++ b/services/hackage/hackage-deps.service.js
@@ -1,4 +1,4 @@
-import {BaseService} from '../index.js';
+import { BaseService } from '../index.js'
export default class HackageDeps extends BaseService {
static category = 'dependencies'
@@ -41,4 +41,4 @@ export default class HackageDeps extends BaseService {
const isOutdated = buffer.includes(outdatedStr)
return this.constructor.render({ isOutdated })
}
-};
+}
diff --git a/services/hackage/hackage-deps.tester.js b/services/hackage/hackage-deps.tester.js
index b40c95fe46356..6133b776e6099 100644
--- a/services/hackage/hackage-deps.tester.js
+++ b/services/hackage/hackage-deps.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('hackage deps (valid)')
diff --git a/services/hackage/hackage-version.service.js b/services/hackage/hackage-version.service.js
index 6d0d50ffa26a0..e1333a14e6510 100644
--- a/services/hackage/hackage-version.service.js
+++ b/services/hackage/hackage-version.service.js
@@ -1,5 +1,5 @@
-import {renderVersionBadge} from '../version.js';
-import {BaseService, InvalidResponse} from '../index.js';
+import { renderVersionBadge } from '../version.js'
+import { BaseService, InvalidResponse } from '../index.js'
export default class HackageVersion extends BaseService {
static category = 'version'
@@ -28,7 +28,7 @@ export default class HackageVersion extends BaseService {
static transform(data) {
const lines = data.split('\n')
const versionLines = lines.filter(e => /^version:/i.test(e) === true)
- return versionLines[0].split(/:/)[1].trim();
+ return versionLines[0].split(/:/)[1].trim()
}
async handle({ packageName }) {
@@ -40,4 +40,4 @@ export default class HackageVersion extends BaseService {
throw new InvalidResponse({ prettyMessage: 'invalid response data' })
}
}
-};
+}
diff --git a/services/hackage/hackage-version.tester.js b/services/hackage/hackage-version.tester.js
index c97554e4dc0cb..f4074ec9c1a99 100644
--- a/services/hackage/hackage-version.tester.js
+++ b/services/hackage/hackage-version.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('hackage version (valid)').get('/lens.json').expectBadge({
diff --git a/services/hexpm/hexpm.service.js b/services/hexpm/hexpm.service.js
index d3de6048a6f05..fe03981abe80e 100644
--- a/services/hexpm/hexpm.service.js
+++ b/services/hexpm/hexpm.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {metric, addv, maybePluralize} from '../text-formatters.js';
-import {downloadCount, version as versionColor} from '../color-formatters.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { metric, addv, maybePluralize } from '../text-formatters.js'
+import { downloadCount, version as versionColor } from '../color-formatters.js'
+import { BaseJsonService } from '../index.js'
const hexSchema = Joi.object({
downloads: Joi.object({
@@ -147,4 +147,4 @@ function DownloadsForInterval(interval) {
const downloadsServices = ['day', 'week', 'all'].map(DownloadsForInterval)
-export default [...downloadsServices, HexPmLicense, HexPmVersion];
+export default [...downloadsServices, HexPmLicense, HexPmVersion]
diff --git a/services/hexpm/hexpm.tester.js b/services/hexpm/hexpm.tester.js
index b37cf8f51b3bc..d7f1d661b77f2 100644
--- a/services/hexpm/hexpm.tester.js
+++ b/services/hexpm/hexpm.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
-import {isMetric, isMetricOverTimePeriod} from '../test-validators.js';
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
+import { isMetric, isMetricOverTimePeriod } from '../test-validators.js'
const isHexpmVersion = Joi.string().regex(/^v\d+.\d+.?\d?$/)
diff --git a/services/homebrew/homebrew-cask.service.js b/services/homebrew/homebrew-cask.service.js
index 75d50563c1eb3..bb08a435b4ed1 100644
--- a/services/homebrew/homebrew-cask.service.js
+++ b/services/homebrew/homebrew-cask.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
version: Joi.string().required(),
@@ -31,4 +31,4 @@ export default class HomebrewCask extends BaseJsonService {
const data = await this.fetch({ cask })
return renderVersionBadge({ version: data.version })
}
-};
+}
diff --git a/services/homebrew/homebrew-cask.tester.js b/services/homebrew/homebrew-cask.tester.js
index cf1a61996ccd3..7535c3a8e5cc1 100644
--- a/services/homebrew/homebrew-cask.tester.js
+++ b/services/homebrew/homebrew-cask.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusTripleDottedVersion} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusTripleDottedVersion } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('homebrew cask (valid)').get('/iterm2.json').expectBadge({
diff --git a/services/homebrew/homebrew-downloads.service.js b/services/homebrew/homebrew-downloads.service.js
index 430c2e4de8539..b4e39cbee8a20 100644
--- a/services/homebrew/homebrew-downloads.service.js
+++ b/services/homebrew/homebrew-downloads.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {downloadCount} from '../color-formatters.js';
-import {metric} from '../text-formatters.js';
-import {BaseJsonService} from '../index.js';
-import {nonNegativeInteger} from '../validators.js';
+import Joi from 'joi'
+import { downloadCount } from '../color-formatters.js'
+import { metric } from '../text-formatters.js'
+import { BaseJsonService } from '../index.js'
+import { nonNegativeInteger } from '../validators.js'
function getSchema({ formula }) {
return Joi.object({
@@ -72,4 +72,4 @@ export default class HomebrewDownloads extends BaseJsonService {
downloads: data.analytics.install[periodMap[interval].api_field][formula],
})
}
-};
+}
diff --git a/services/homebrew/homebrew-downloads.tester.js b/services/homebrew/homebrew-downloads.tester.js
index 2ef9c280d0b22..972df583f38c9 100644
--- a/services/homebrew/homebrew-downloads.tester.js
+++ b/services/homebrew/homebrew-downloads.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isMetricOverTimePeriod} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isMetricOverTimePeriod } from '../test-validators.js'
export const t = await createServiceTester()
t.create('daily downloads (valid)')
diff --git a/services/homebrew/homebrew-version.service.js b/services/homebrew/homebrew-version.service.js
index 1241f876f7d81..f32e77e518d76 100644
--- a/services/homebrew/homebrew-version.service.js
+++ b/services/homebrew/homebrew-version.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
versions: Joi.object({
@@ -34,4 +34,4 @@ export default class HomebrewVersion extends BaseJsonService {
const data = await this.fetch({ formula })
return renderVersionBadge({ version: data.versions.stable })
}
-};
+}
diff --git a/services/homebrew/homebrew-version.tester.js b/services/homebrew/homebrew-version.tester.js
index 2b12d613fde1e..1e69f15cfb6b9 100644
--- a/services/homebrew/homebrew-version.tester.js
+++ b/services/homebrew/homebrew-version.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusTripleDottedVersion} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusTripleDottedVersion } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('homebrew (valid)').get('/cake.json').expectBadge({
diff --git a/services/hsts/hsts.service.js b/services/hsts/hsts.service.js
index 79967c68a6e5f..c768815d5639e 100644
--- a/services/hsts/hsts.service.js
+++ b/services/hsts/hsts.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const label = 'hsts preloaded'
const schema = Joi.object({
status: Joi.string().required(),
@@ -64,4 +64,4 @@ export default class HSTS extends BaseJsonService {
const { status } = await this.fetch({ domain })
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/hsts/hsts.tester.js b/services/hsts/hsts.tester.js
index cce34f120a7c1..0f55a07b79359 100644
--- a/services/hsts/hsts.tester.js
+++ b/services/hsts/hsts.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const label = 'hsts preloaded'
diff --git a/services/imagelayers/imagelayers.service.js b/services/imagelayers/imagelayers.service.js
index cf58467a44647..1ae1d3f1e3032 100644
--- a/services/imagelayers/imagelayers.service.js
+++ b/services/imagelayers/imagelayers.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
category: 'size',
@@ -8,4 +8,4 @@ export default deprecatedService({
},
label: 'imagelayers',
dateAdded: new Date('2018-11-18'),
-});
+})
diff --git a/services/imagelayers/imagelayers.tester.js b/services/imagelayers/imagelayers.tester.js
index 34fd66b7d4eb7..7e4b7808172f0 100644
--- a/services/imagelayers/imagelayers.tester.js
+++ b/services/imagelayers/imagelayers.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'imagelayers',
diff --git a/services/index.js b/services/index.js
index 941f68457d777..1ba849b1b8f42 100644
--- a/services/index.js
+++ b/services/index.js
@@ -1 +1 @@
-export * from '../core/base-service/index.js';
+export * from '../core/base-service/index.js'
diff --git a/services/issuestats/issuestats.service.js b/services/issuestats/issuestats.service.js
index 2035ae7b417b3..1ab375a8c5c62 100644
--- a/services/issuestats/issuestats.service.js
+++ b/services/issuestats/issuestats.service.js
@@ -1,8 +1,8 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
category: 'issue-tracking',
route: { base: 'issuestats', pattern: ':various+' },
label: 'issue stats',
dateAdded: new Date('2018-09-01'),
-});
+})
diff --git a/services/issuestats/issuestats.tester.js b/services/issuestats/issuestats.tester.js
index 362200550b68d..3f4853bdad4f3 100644
--- a/services/issuestats/issuestats.tester.js
+++ b/services/issuestats/issuestats.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({ id: 'issuestats', title: 'Issue Stats' })
diff --git a/services/itunes/itunes.service.js b/services/itunes/itunes.service.js
index adb272b33c520..bcb367bc8abd0 100644
--- a/services/itunes/itunes.service.js
+++ b/services/itunes/itunes.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService, NotFound } from '../index.js'
const schema = Joi.object({
resultCount: nonNegativeInteger,
@@ -47,4 +47,4 @@ export default class Itunes extends BaseJsonService {
return renderVersionBadge({ version: data.results[0].version })
}
-};
+}
diff --git a/services/itunes/itunes.tester.js b/services/itunes/itunes.tester.js
index d759bb385539f..2499ed3f9702d 100644
--- a/services/itunes/itunes.tester.js
+++ b/services/itunes/itunes.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('iTunes version (valid)').get('/324684580.json').expectBadge({
diff --git a/services/jenkins/jenkins-base.js b/services/jenkins/jenkins-base.js
index 8af64f294c5ed..f7243d0b377d7 100644
--- a/services/jenkins/jenkins-base.js
+++ b/services/jenkins/jenkins-base.js
@@ -1,4 +1,4 @@
-import {BaseJsonService} from '../index.js';
+import { BaseJsonService } from '../index.js'
export default class JenkinsBase extends BaseJsonService {
static auth = {
@@ -26,4 +26,4 @@ export default class JenkinsBase extends BaseJsonService {
})
)
}
-};
+}
diff --git a/services/jenkins/jenkins-build-redirect.service.js b/services/jenkins/jenkins-build-redirect.service.js
index 2a556521393ec..b7666291c7152 100644
--- a/services/jenkins/jenkins-build-redirect.service.js
+++ b/services/jenkins/jenkins-build-redirect.service.js
@@ -1,5 +1,5 @@
-import {redirector} from '../index.js';
-import {buildRedirectUrl} from './jenkins-common.js';
+import { redirector } from '../index.js'
+import { buildRedirectUrl } from './jenkins-common.js'
const commonProps = {
category: 'build',
@@ -34,4 +34,4 @@ export default [
dateAdded: new Date('2019-11-29'),
...commonProps,
}),
-];
+]
diff --git a/services/jenkins/jenkins-build-redirect.tester.js b/services/jenkins/jenkins-build-redirect.tester.js
index 3ab7f2d8e4c3c..3e5e76aa0cf2d 100644
--- a/services/jenkins/jenkins-build-redirect.tester.js
+++ b/services/jenkins/jenkins-build-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'JenkinsBuildRedirect',
diff --git a/services/jenkins/jenkins-build.service.js b/services/jenkins/jenkins-build.service.js
index 4f535ffd9f01f..667d42bb376c6 100644
--- a/services/jenkins/jenkins-build.service.js
+++ b/services/jenkins/jenkins-build.service.js
@@ -1,7 +1,11 @@
-import Joi from 'joi';
-import {renderBuildStatusBadge} from '../build-status.js';
-import JenkinsBase from './jenkins-base.js';
-import {buildTreeParamQueryString, buildUrl, queryParamSchema} from './jenkins-common.js';
+import Joi from 'joi'
+import { renderBuildStatusBadge } from '../build-status.js'
+import JenkinsBase from './jenkins-base.js'
+import {
+ buildTreeParamQueryString,
+ buildUrl,
+ queryParamSchema,
+} from './jenkins-common.js'
// https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/BallColor.java#L56
const colorStatusMap = {
@@ -74,4 +78,4 @@ export default class JenkinsBuild extends JenkinsBase {
const { status } = this.transform({ json })
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/jenkins/jenkins-build.spec.js b/services/jenkins/jenkins-build.spec.js
index 67024e4329e6d..a821f272709f3 100644
--- a/services/jenkins/jenkins-build.spec.js
+++ b/services/jenkins/jenkins-build.spec.js
@@ -1,9 +1,9 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {test, forCases, given} from 'sazerac';
-import {renderBuildStatusBadge} from '../build-status.js';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import JenkinsBuild from './jenkins-build.service.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { test, forCases, given } from 'sazerac'
+import { renderBuildStatusBadge } from '../build-status.js'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import JenkinsBuild from './jenkins-build.service.js'
describe('JenkinsBuild', function () {
test(JenkinsBuild.prototype.transform, () => {
diff --git a/services/jenkins/jenkins-build.tester.js b/services/jenkins/jenkins-build.tester.js
index 001a2c3a4e4ef..7ebfb5df861f5 100644
--- a/services/jenkins/jenkins-build.tester.js
+++ b/services/jenkins/jenkins-build.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isJenkinsBuildStatus = Joi.alternatives(
diff --git a/services/jenkins/jenkins-common.js b/services/jenkins/jenkins-common.js
index 7de91605dcce2..c9c6b771be6d8 100644
--- a/services/jenkins/jenkins-common.js
+++ b/services/jenkins/jenkins-common.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {optionalUrl} from '../validators.js';
+import Joi from 'joi'
+import { optionalUrl } from '../validators.js'
const queryParamSchema = Joi.object({
disableStrictSSL: Joi.equal(''),
@@ -19,9 +19,5 @@ const buildUrl = ({ jobUrl, lastCompletedBuild = true, plugin }) => {
return `${jobUrl}/${lastCompletedBuildElement}${pluginElement}api/json`
}
-export {
- queryParamSchema,
- buildUrl,
- buildRedirectUrl,
-};
+export { queryParamSchema, buildUrl, buildRedirectUrl }
export const buildTreeParamQueryString = tree => ({ tree })
diff --git a/services/jenkins/jenkins-common.spec.js b/services/jenkins/jenkins-common.spec.js
index ad86acab3de51..ae1e2e998359f 100644
--- a/services/jenkins/jenkins-common.spec.js
+++ b/services/jenkins/jenkins-common.spec.js
@@ -1,5 +1,5 @@
-import {expect} from 'chai';
-import {buildRedirectUrl, buildUrl} from './jenkins-common.js';
+import { expect } from 'chai'
+import { buildRedirectUrl, buildUrl } from './jenkins-common.js'
describe('jenkins-common', function () {
describe('buildUrl', function () {
diff --git a/services/jenkins/jenkins-coverage-redirector.service.js b/services/jenkins/jenkins-coverage-redirector.service.js
index b40ac65f5540e..05b828f870a40 100644
--- a/services/jenkins/jenkins-coverage-redirector.service.js
+++ b/services/jenkins/jenkins-coverage-redirector.service.js
@@ -1,5 +1,5 @@
-import {redirector} from '../index.js';
-import {buildRedirectUrl} from './jenkins-common.js';
+import { redirector } from '../index.js'
+import { buildRedirectUrl } from './jenkins-common.js'
const commonProps = {
category: 'coverage',
@@ -30,4 +30,4 @@ export default [
dateAdded: new Date('2019-11-29'),
...commonProps,
}),
-];
+]
diff --git a/services/jenkins/jenkins-coverage-redirector.tester.js b/services/jenkins/jenkins-coverage-redirector.tester.js
index f5a1d58219d7d..d6475017c59e9 100644
--- a/services/jenkins/jenkins-coverage-redirector.tester.js
+++ b/services/jenkins/jenkins-coverage-redirector.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'JenkinsCoverageRedirector',
diff --git a/services/jenkins/jenkins-coverage.service.js b/services/jenkins/jenkins-coverage.service.js
index 04838491a3d86..1d918b4216e25 100644
--- a/services/jenkins/jenkins-coverage.service.js
+++ b/services/jenkins/jenkins-coverage.service.js
@@ -1,7 +1,11 @@
-import Joi from 'joi';
-import {coveragePercentage} from '../color-formatters.js';
-import JenkinsBase from './jenkins-base.js';
-import {buildTreeParamQueryString, buildUrl, queryParamSchema} from './jenkins-common.js';
+import Joi from 'joi'
+import { coveragePercentage } from '../color-formatters.js'
+import JenkinsBase from './jenkins-base.js'
+import {
+ buildTreeParamQueryString,
+ buildUrl,
+ queryParamSchema,
+} from './jenkins-common.js'
const formatMap = {
jacoco: {
@@ -123,4 +127,4 @@ export default class JenkinsCoverage extends JenkinsBase {
const { coverage } = transform(json)
return this.constructor.render({ coverage })
}
-};
+}
diff --git a/services/jenkins/jenkins-coverage.tester.js b/services/jenkins/jenkins-coverage.tester.js
index 56c021ec676a0..fae3f9b4d95d3 100644
--- a/services/jenkins/jenkins-coverage.tester.js
+++ b/services/jenkins/jenkins-coverage.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// The below page includes links to various publicly accessible Jenkins instances
diff --git a/services/jenkins/jenkins-plugin-installs.service.js b/services/jenkins/jenkins-plugin-installs.service.js
index bc9dc98378633..ef24d19e7221c 100644
--- a/services/jenkins/jenkins-plugin-installs.service.js
+++ b/services/jenkins/jenkins-plugin-installs.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {downloadCount as downloadCountColor} from '../color-formatters.js';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { downloadCount as downloadCountColor } from '../color-formatters.js'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService, NotFound } from '../index.js'
const schemaInstallations = Joi.object()
.keys({
@@ -113,4 +113,4 @@ export default class JenkinsPluginInstalls extends BaseJsonService {
return this.constructor.render({ label, installs })
}
-};
+}
diff --git a/services/jenkins/jenkins-plugin-installs.tester.js b/services/jenkins/jenkins-plugin-installs.tester.js
index 0f43bb8e78084..5c0f0687b8010 100644
--- a/services/jenkins/jenkins-plugin-installs.tester.js
+++ b/services/jenkins/jenkins-plugin-installs.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// total installs
diff --git a/services/jenkins/jenkins-plugin-version.service.js b/services/jenkins/jenkins-plugin-version.service.js
index 89e4dd47e10be..98486776bf8a9 100644
--- a/services/jenkins/jenkins-plugin-version.service.js
+++ b/services/jenkins/jenkins-plugin-version.service.js
@@ -1,7 +1,7 @@
-import {promisify} from 'util';
-import {regularUpdate} from '../../core/legacy/regular-update.js';
-import {renderVersionBadge} from '../version.js';
-import {BaseService, NotFound} from '../index.js';
+import { promisify } from 'util'
+import { regularUpdate } from '../../core/legacy/regular-update.js'
+import { renderVersionBadge } from '../version.js'
+import { BaseService, NotFound } from '../index.js'
export default class JenkinsPluginVersion extends BaseService {
static category = 'version'
@@ -51,4 +51,4 @@ export default class JenkinsPluginVersion extends BaseService {
}
return this.constructor.render({ version })
}
-};
+}
diff --git a/services/jenkins/jenkins-plugin-version.tester.js b/services/jenkins/jenkins-plugin-version.tester.js
index e700417b89e80..f9c4d2dfc9460 100644
--- a/services/jenkins/jenkins-plugin-version.tester.js
+++ b/services/jenkins/jenkins-plugin-version.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'jenkins-plugin',
diff --git a/services/jenkins/jenkins-tests-redirector.service.js b/services/jenkins/jenkins-tests-redirector.service.js
index 9368513db9246..051b21a81f4ed 100644
--- a/services/jenkins/jenkins-tests-redirector.service.js
+++ b/services/jenkins/jenkins-tests-redirector.service.js
@@ -1,5 +1,5 @@
-import {redirector} from '../index.js';
-import {buildRedirectUrl} from './jenkins-common.js';
+import { redirector } from '../index.js'
+import { buildRedirectUrl } from './jenkins-common.js'
const commonProps = {
category: 'build',
@@ -26,4 +26,4 @@ export default [
dateAdded: new Date('2019-11-29'),
...commonProps,
}),
-];
+]
diff --git a/services/jenkins/jenkins-tests-redirector.tester.js b/services/jenkins/jenkins-tests-redirector.tester.js
index 7939df6d9330e..837c9f4b1394d 100644
--- a/services/jenkins/jenkins-tests-redirector.tester.js
+++ b/services/jenkins/jenkins-tests-redirector.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'JenkinsTestsRedirector',
diff --git a/services/jenkins/jenkins-tests.service.js b/services/jenkins/jenkins-tests.service.js
index 5a1e64a0cfb42..4c9a74767a594 100644
--- a/services/jenkins/jenkins-tests.service.js
+++ b/services/jenkins/jenkins-tests.service.js
@@ -1,9 +1,17 @@
-import Joi from 'joi';
-import {documentation, testResultQueryParamSchema, renderTestResultBadge} from '../test-results.js';
-import {optionalNonNegativeInteger} from '../validators.js';
-import {InvalidResponse} from '../index.js';
-import JenkinsBase from './jenkins-base.js';
-import {buildTreeParamQueryString, buildUrl, queryParamSchema} from './jenkins-common.js';
+import Joi from 'joi'
+import {
+ documentation,
+ testResultQueryParamSchema,
+ renderTestResultBadge,
+} from '../test-results.js'
+import { optionalNonNegativeInteger } from '../validators.js'
+import { InvalidResponse } from '../index.js'
+import JenkinsBase from './jenkins-base.js'
+import {
+ buildTreeParamQueryString,
+ buildUrl,
+ queryParamSchema,
+} from './jenkins-common.js'
// In the API response, the `actions` array can be empty, and when it is not empty it will contain a
// mix of objects. Some will be empty objects, and several will not have the test count properties.
@@ -125,4 +133,4 @@ export default class JenkinsTests extends JenkinsBase {
skippedLabel,
})
}
-};
+}
diff --git a/services/jenkins/jenkins-tests.tester.js b/services/jenkins/jenkins-tests.tester.js
index d576ef2f5f995..a9269c9bd6747 100644
--- a/services/jenkins/jenkins-tests.tester.js
+++ b/services/jenkins/jenkins-tests.tester.js
@@ -1,5 +1,10 @@
-import {isDefaultTestTotals, isDefaultCompactTestTotals, isCustomTestTotals, isCustomCompactTestTotals} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import {
+ isDefaultTestTotals,
+ isDefaultCompactTestTotals,
+ isCustomTestTotals,
+ isCustomCompactTestTotals,
+} from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// The below page includes links to various publicly accessible Jenkins instances
diff --git a/services/jetbrains/jetbrains-base.js b/services/jetbrains/jetbrains-base.js
index af6ed9ab1776c..140a94b2a7559 100644
--- a/services/jetbrains/jetbrains-base.js
+++ b/services/jetbrains/jetbrains-base.js
@@ -1,5 +1,5 @@
-import {BaseXmlService, NotFound} from '../index.js';
-import {parseJson} from '../../core/base-service/json.js';
+import { BaseXmlService, NotFound } from '../index.js'
+import { parseJson } from '../../core/base-service/json.js'
/*
JetBrains is a bit awkward. Sometimes we want to call an XML API
@@ -10,7 +10,7 @@ inherit from BaseJsonService directly.
*/
export default class JetbrainsBase extends BaseXmlService {
static _isLegacyPluginId(pluginId) {
- return !pluginId.match(/^([0-9])+/);
+ return !pluginId.match(/^([0-9])+/)
}
static _cleanPluginId(pluginId) {
@@ -67,4 +67,4 @@ export default class JetbrainsBase extends BaseXmlService {
const json = this._parseJson(buffer)
return this.constructor._validateJson(json, schema)
}
-};
+}
diff --git a/services/jetbrains/jetbrains-downloads.service.js b/services/jetbrains/jetbrains-downloads.service.js
index 73fe262373e10..ab379c5eb7e4d 100644
--- a/services/jetbrains/jetbrains-downloads.service.js
+++ b/services/jetbrains/jetbrains-downloads.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {downloadCount as downloadCountColor} from '../color-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import JetbrainsBase from './jetbrains-base.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { downloadCount as downloadCountColor } from '../color-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import JetbrainsBase from './jetbrains-base.js'
const intelliJschema = Joi.object({
'plugin-repository': Joi.object({
@@ -71,4 +71,4 @@ export default class JetbrainsDownloads extends JetbrainsBase {
return this.constructor.render({ downloads })
}
-};
+}
diff --git a/services/jetbrains/jetbrains-downloads.tester.js b/services/jetbrains/jetbrains-downloads.tester.js
index 86b49cfa2891c..06c30636474e2 100644
--- a/services/jetbrains/jetbrains-downloads.tester.js
+++ b/services/jetbrains/jetbrains-downloads.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('downloads (number as a plugin id)')
diff --git a/services/jetbrains/jetbrains-rating.service.js b/services/jetbrains/jetbrains-rating.service.js
index e604dd3da2d8a..55ae8696273dd 100644
--- a/services/jetbrains/jetbrains-rating.service.js
+++ b/services/jetbrains/jetbrains-rating.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {starRating} from '../text-formatters.js';
-import {colorScale} from '../color-formatters.js';
-import JetbrainsBase from './jetbrains-base.js';
+import Joi from 'joi'
+import { starRating } from '../text-formatters.js'
+import { colorScale } from '../color-formatters.js'
+import JetbrainsBase from './jetbrains-base.js'
const pluginRatingColor = colorScale([2, 3, 4])
@@ -94,4 +94,4 @@ export default class JetbrainsRating extends JetbrainsBase {
return this.constructor.render({ rating, format })
}
-};
+}
diff --git a/services/jetbrains/jetbrains-rating.tester.js b/services/jetbrains/jetbrains-rating.tester.js
index 8913cc2988f28..b80d03c5ad824 100644
--- a/services/jetbrains/jetbrains-rating.tester.js
+++ b/services/jetbrains/jetbrains-rating.tester.js
@@ -1,5 +1,5 @@
-import {withRegex, isStarRating} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { withRegex, isStarRating } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isRating = withRegex(/^(([0-4](.?([0-9]))?)|5)\/5$/)
diff --git a/services/jetbrains/jetbrains-version.service.js b/services/jetbrains/jetbrains-version.service.js
index b03285b748a10..2b7d8dd3b2b07 100644
--- a/services/jetbrains/jetbrains-version.service.js
+++ b/services/jetbrains/jetbrains-version.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import JetbrainsBase from './jetbrains-base.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import JetbrainsBase from './jetbrains-base.js'
const intelliJschema = Joi.object({
'plugin-repository': Joi.object({
@@ -74,4 +74,4 @@ export default class JetbrainsVersion extends JetbrainsBase {
return this.constructor.render({ version })
}
-};
+}
diff --git a/services/jetbrains/jetbrains-version.tester.js b/services/jetbrains/jetbrains-version.tester.js
index ad3741af64ca0..5a4d477e62cd6 100644
--- a/services/jetbrains/jetbrains-version.tester.js
+++ b/services/jetbrains/jetbrains-version.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionNClauses} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionNClauses } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('version (user friendly plugin id)')
diff --git a/services/jira/jira-common.js b/services/jira/jira-common.js
index 2ded05438deab..546435a14f4b2 100644
--- a/services/jira/jira-common.js
+++ b/services/jira/jira-common.js
@@ -4,4 +4,4 @@ const authConfig = {
serviceKey: 'jira',
}
-export { authConfig };
+export { authConfig }
diff --git a/services/jira/jira-issue-redirect.service.js b/services/jira/jira-issue-redirect.service.js
index e6d42b3fda771..8f7f2b9f587ff 100644
--- a/services/jira/jira-issue-redirect.service.js
+++ b/services/jira/jira-issue-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
redirector({
@@ -13,4 +13,4 @@ export default [
}),
dateAdded: new Date('2019-09-14'),
}),
-];
+]
diff --git a/services/jira/jira-issue-redirect.tester.js b/services/jira/jira-issue-redirect.tester.js
index 983fbdab9043e..b414839c47ac3 100644
--- a/services/jira/jira-issue-redirect.tester.js
+++ b/services/jira/jira-issue-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'JiraIssueRedirect',
diff --git a/services/jira/jira-issue.service.js b/services/jira/jira-issue.service.js
index da78639fccb52..35fafa60a3a9b 100644
--- a/services/jira/jira-issue.service.js
+++ b/services/jira/jira-issue.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {optionalUrl} from '../validators.js';
-import {BaseJsonService} from '../index.js';
-import {authConfig} from './jira-common.js';
+import Joi from 'joi'
+import { optionalUrl } from '../validators.js'
+import { BaseJsonService } from '../index.js'
+import { authConfig } from './jira-common.js'
const queryParamSchema = Joi.object({
baseUrl: optionalUrl.required(),
@@ -91,4 +91,4 @@ export default class JiraIssue extends BaseJsonService {
statusColor,
})
}
-};
+}
diff --git a/services/jira/jira-issue.spec.js b/services/jira/jira-issue.spec.js
index 3d2eefd33f390..10ff23efd3762 100644
--- a/services/jira/jira-issue.spec.js
+++ b/services/jira/jira-issue.spec.js
@@ -1,8 +1,8 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import JiraIssue from './jira-issue.service.js';
-import {user, pass, host, config} from './jira-test-helpers.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import JiraIssue from './jira-issue.service.js'
+import { user, pass, host, config } from './jira-test-helpers.js'
describe('JiraIssue', function () {
cleanUpNockAfterEach()
diff --git a/services/jira/jira-issue.tester.js b/services/jira/jira-issue.tester.js
index 551e05c2f8f03..faab0a4ebbcfc 100644
--- a/services/jira/jira-issue.tester.js
+++ b/services/jira/jira-issue.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('unknown issue')
diff --git a/services/jira/jira-sprint-redirect.service.js b/services/jira/jira-sprint-redirect.service.js
index 32ff4da3e20c9..54dec2a42f509 100644
--- a/services/jira/jira-sprint-redirect.service.js
+++ b/services/jira/jira-sprint-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
redirector({
@@ -13,4 +13,4 @@ export default [
}),
dateAdded: new Date('2019-09-14'),
}),
-];
+]
diff --git a/services/jira/jira-sprint-redirect.tester.js b/services/jira/jira-sprint-redirect.tester.js
index 7610665e4d682..86c417106a0e6 100644
--- a/services/jira/jira-sprint-redirect.tester.js
+++ b/services/jira/jira-sprint-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'JiraSprintRedirect',
diff --git a/services/jira/jira-sprint.service.js b/services/jira/jira-sprint.service.js
index 9582e0c79eea3..875a85e92cff8 100644
--- a/services/jira/jira-sprint.service.js
+++ b/services/jira/jira-sprint.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {optionalUrl} from '../validators.js';
-import {BaseJsonService} from '../index.js';
-import {authConfig} from './jira-common.js';
+import Joi from 'joi'
+import { optionalUrl } from '../validators.js'
+import { BaseJsonService } from '../index.js'
+import { authConfig } from './jira-common.js'
const queryParamSchema = Joi.object({
baseUrl: optionalUrl.required(),
@@ -109,4 +109,4 @@ export default class JiraSprint extends BaseJsonService {
return this.constructor.render({ numTotalIssues, numCompletedIssues })
}
-};
+}
diff --git a/services/jira/jira-sprint.spec.js b/services/jira/jira-sprint.spec.js
index fb93c2a73f25e..8bcead5bb2e27 100644
--- a/services/jira/jira-sprint.spec.js
+++ b/services/jira/jira-sprint.spec.js
@@ -1,8 +1,15 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import JiraSprint from './jira-sprint.service.js';
-import {user, pass, host, config, sprintId, sprintQueryString} from './jira-test-helpers.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import JiraSprint from './jira-sprint.service.js'
+import {
+ user,
+ pass,
+ host,
+ config,
+ sprintId,
+ sprintQueryString,
+} from './jira-test-helpers.js'
describe('JiraSprint', function () {
cleanUpNockAfterEach()
diff --git a/services/jira/jira-sprint.tester.js b/services/jira/jira-sprint.tester.js
index 4b873e4b0d046..997b3aaf55c2f 100644
--- a/services/jira/jira-sprint.tester.js
+++ b/services/jira/jira-sprint.tester.js
@@ -1,6 +1,6 @@
-import {createServiceTester} from '../tester.js'
-import {isIntegerPercentage} from '../test-validators.js';
-import {sprintId, sprintQueryString} from './jira-test-helpers.js';
+import { createServiceTester } from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { sprintId, sprintQueryString } from './jira-test-helpers.js'
export const t = await createServiceTester()
t.create('unknown sprint')
diff --git a/services/jira/jira-test-helpers.js b/services/jira/jira-test-helpers.js
index fc9ca408434c7..e188179146bc5 100644
--- a/services/jira/jira-test-helpers.js
+++ b/services/jira/jira-test-helpers.js
@@ -19,11 +19,4 @@ const config = {
private: { jira_user: user, jira_pass: pass },
}
-export {
- sprintId,
- sprintQueryString,
- user,
- pass,
- host,
- config,
-};
+export { sprintId, sprintQueryString, user, pass, host, config }
diff --git a/services/jitpack/jitpack-downloads.service.js b/services/jitpack/jitpack-downloads.service.js
index fd78726eace48..b50ca6b519ad6 100644
--- a/services/jitpack/jitpack-downloads.service.js
+++ b/services/jitpack/jitpack-downloads.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
route: {
@@ -8,4 +8,4 @@ export default deprecatedService({
label: 'jitpack',
category: 'downloads',
dateAdded: new Date('2020-04-05'),
-});
+})
diff --git a/services/jitpack/jitpack-downloads.tester.js b/services/jitpack/jitpack-downloads.tester.js
index 01efff3fabaef..3e7fb42db05ed 100644
--- a/services/jitpack/jitpack-downloads.tester.js
+++ b/services/jitpack/jitpack-downloads.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'JitPackDownloads',
diff --git a/services/jitpack/jitpack-version-redirector.service.js b/services/jitpack/jitpack-version-redirector.service.js
index ad5ec714c9ac5..bda5c01485ae0 100644
--- a/services/jitpack/jitpack-version-redirector.service.js
+++ b/services/jitpack/jitpack-version-redirector.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
redirector({
@@ -11,4 +11,4 @@ export default [
`/jitpack/v/github/${groupId}/${artifactId}`,
dateAdded: new Date('2019-03-31'),
}),
-];
+]
diff --git a/services/jitpack/jitpack-version-redirector.tester.js b/services/jitpack/jitpack-version-redirector.tester.js
index bcab419915165..deb2b820cfe4b 100644
--- a/services/jitpack/jitpack-version-redirector.tester.js
+++ b/services/jitpack/jitpack-version-redirector.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'JitpackVersionRedirect',
diff --git a/services/jitpack/jitpack-version.service.js b/services/jitpack/jitpack-version.service.js
index d463e8028cf05..e739e06ce8a4d 100644
--- a/services/jitpack/jitpack-version.service.js
+++ b/services/jitpack/jitpack-version.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
version: Joi.string().required(),
@@ -44,4 +44,4 @@ export default class JitPackVersion extends BaseJsonService {
const { version } = await this.fetch({ vcs, user, repo })
return renderVersionBadge({ version })
}
-};
+}
diff --git a/services/jitpack/jitpack-version.tester.js b/services/jitpack/jitpack-version.tester.js
index 8ce17264baee6..5d7322f8e3dfc 100644
--- a/services/jitpack/jitpack-version.tester.js
+++ b/services/jitpack/jitpack-version.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// Github allows versions with chars, etc.
diff --git a/services/jsdelivr/jsdelivr-base.js b/services/jsdelivr/jsdelivr-base.js
index 04a2145e3343d..be2b3495fe368 100644
--- a/services/jsdelivr/jsdelivr-base.js
+++ b/services/jsdelivr/jsdelivr-base.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {downloadCount} from '../color-formatters.js';
-import {metric} from '../text-formatters.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { downloadCount } from '../color-formatters.js'
+import { metric } from '../text-formatters.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
total: Joi.number().required(),
@@ -29,4 +29,4 @@ class BaseJsDelivrService extends BaseJsonService {
}
}
-export { schema, periodMap, BaseJsDelivrService };
+export { schema, periodMap, BaseJsDelivrService }
diff --git a/services/jsdelivr/jsdelivr-hits-github.service.js b/services/jsdelivr/jsdelivr-hits-github.service.js
index 7fe707b7d55db..8d760b899266f 100644
--- a/services/jsdelivr/jsdelivr-hits-github.service.js
+++ b/services/jsdelivr/jsdelivr-hits-github.service.js
@@ -1,4 +1,4 @@
-import {schema, periodMap, BaseJsDelivrService} from './jsdelivr-base.js';
+import { schema, periodMap, BaseJsDelivrService } from './jsdelivr-base.js'
export default class JsDelivrHitsGitHub extends BaseJsDelivrService {
static route = {
@@ -29,4 +29,4 @@ export default class JsDelivrHitsGitHub extends BaseJsDelivrService {
const { total } = await this.fetch({ period, user, repo })
return this.constructor.render({ period, hits: total })
}
-};
+}
diff --git a/services/jsdelivr/jsdelivr-hits-github.tester.js b/services/jsdelivr/jsdelivr-hits-github.tester.js
index a81d8a66b4142..48231e1fd8436 100644
--- a/services/jsdelivr/jsdelivr-hits-github.tester.js
+++ b/services/jsdelivr/jsdelivr-hits-github.tester.js
@@ -1,6 +1,9 @@
-import Joi from 'joi';
-import {isMetricOverTimePeriod, isZeroOverTimePeriod} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import {
+ isMetricOverTimePeriod,
+ isZeroOverTimePeriod,
+} from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isDownloadsOverTimePeriod = Joi.alternatives().try(
diff --git a/services/jsdelivr/jsdelivr-hits-npm.service.js b/services/jsdelivr/jsdelivr-hits-npm.service.js
index f82acca68eda4..79db7f7f557d7 100644
--- a/services/jsdelivr/jsdelivr-hits-npm.service.js
+++ b/services/jsdelivr/jsdelivr-hits-npm.service.js
@@ -1,4 +1,4 @@
-import {schema, periodMap, BaseJsDelivrService} from './jsdelivr-base.js';
+import { schema, periodMap, BaseJsDelivrService } from './jsdelivr-base.js'
export default class JsDelivrHitsNPM extends BaseJsDelivrService {
static route = {
@@ -42,4 +42,4 @@ export default class JsDelivrHitsNPM extends BaseJsDelivrService {
})
return this.constructor.render({ period, hits: total })
}
-};
+}
diff --git a/services/jsdelivr/jsdelivr-hits-npm.tester.js b/services/jsdelivr/jsdelivr-hits-npm.tester.js
index 92bfb94a2df9a..2c41ed9fe828b 100644
--- a/services/jsdelivr/jsdelivr-hits-npm.tester.js
+++ b/services/jsdelivr/jsdelivr-hits-npm.tester.js
@@ -1,6 +1,9 @@
-import Joi from 'joi';
-import {isMetricOverTimePeriod, isZeroOverTimePeriod} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import {
+ isMetricOverTimePeriod,
+ isZeroOverTimePeriod,
+} from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isDownloadsOverTimePeriod = Joi.alternatives().try(
diff --git a/services/keybase/keybase-btc.service.js b/services/keybase/keybase-btc.service.js
index 69d4e38095eeb..1ef7d547ff6c3 100644
--- a/services/keybase/keybase-btc.service.js
+++ b/services/keybase/keybase-btc.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import KeybaseProfile from './keybase-profile.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import KeybaseProfile from './keybase-profile.js'
const bitcoinAddressSchema = Joi.object({
status: Joi.object({
@@ -81,4 +81,4 @@ export default class KeybaseBTC extends KeybaseProfile {
return this.constructor.render({ address: bitcoinAddresses[0].address })
}
-};
+}
diff --git a/services/keybase/keybase-btc.tester.js b/services/keybase/keybase-btc.tester.js
index 9ba36a0ba2fe8..01e4531ad8d68 100644
--- a/services/keybase/keybase-btc.tester.js
+++ b/services/keybase/keybase-btc.tester.js
@@ -1,5 +1,5 @@
-import {withRegex} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { withRegex } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('existing bitcoin address')
diff --git a/services/keybase/keybase-pgp.service.js b/services/keybase/keybase-pgp.service.js
index 6dd087cc63920..117a6f2582f66 100644
--- a/services/keybase/keybase-pgp.service.js
+++ b/services/keybase/keybase-pgp.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import KeybaseProfile from './keybase-profile.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import KeybaseProfile from './keybase-profile.js'
const keyFingerprintSchema = Joi.object({
status: Joi.object({
@@ -74,4 +74,4 @@ export default class KeybasePGP extends KeybaseProfile {
return this.constructor.render({ fingerprint: primaryKey.key_fingerprint })
}
-};
+}
diff --git a/services/keybase/keybase-pgp.tester.js b/services/keybase/keybase-pgp.tester.js
index d51bec66b7d53..4a964597d2fa2 100644
--- a/services/keybase/keybase-pgp.tester.js
+++ b/services/keybase/keybase-pgp.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('existing key fingerprint')
diff --git a/services/keybase/keybase-profile.js b/services/keybase/keybase-profile.js
index 45fa744c897df..1949c524578af 100644
--- a/services/keybase/keybase-profile.js
+++ b/services/keybase/keybase-profile.js
@@ -1,4 +1,4 @@
-import {BaseJsonService, NotFound} from '../index.js';
+import { BaseJsonService, NotFound } from '../index.js'
export default class KeybaseProfile extends BaseJsonService {
static get apiVersion() {
@@ -30,4 +30,4 @@ export default class KeybaseProfile extends BaseJsonService {
return { user: data.them[0] }
}
-};
+}
diff --git a/services/keybase/keybase-xlm.service.js b/services/keybase/keybase-xlm.service.js
index fe1645ff2889f..652f0a0b3af9a 100644
--- a/services/keybase/keybase-xlm.service.js
+++ b/services/keybase/keybase-xlm.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import KeybaseProfile from './keybase-profile.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import KeybaseProfile from './keybase-profile.js'
const stellarAddressSchema = Joi.object({
status: Joi.object({
@@ -79,4 +79,4 @@ export default class KeybaseXLM extends KeybaseProfile {
return this.constructor.render({ address: accountId })
}
-};
+}
diff --git a/services/keybase/keybase-xlm.tester.js b/services/keybase/keybase-xlm.tester.js
index 6ca00d3837657..ce8b78637cd65 100644
--- a/services/keybase/keybase-xlm.tester.js
+++ b/services/keybase/keybase-xlm.tester.js
@@ -1,5 +1,5 @@
-import {withRegex} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { withRegex } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('existing stellar address')
diff --git a/services/keybase/keybase-zec.service.js b/services/keybase/keybase-zec.service.js
index 79f066f5e63a6..0e367a9dfcae2 100644
--- a/services/keybase/keybase-zec.service.js
+++ b/services/keybase/keybase-zec.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import KeybaseProfile from './keybase-profile.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import KeybaseProfile from './keybase-profile.js'
const zcachAddressSchema = Joi.object({
status: Joi.object({
@@ -81,4 +81,4 @@ export default class KeybaseZEC extends KeybaseProfile {
return this.constructor.render({ address: zcashAddresses[0].address })
}
-};
+}
diff --git a/services/keybase/keybase-zec.tester.js b/services/keybase/keybase-zec.tester.js
index 198ebc2c0d348..f38a394116a0a 100644
--- a/services/keybase/keybase-zec.tester.js
+++ b/services/keybase/keybase-zec.tester.js
@@ -1,5 +1,5 @@
-import {withRegex} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { withRegex } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('existing zcash address')
diff --git a/services/leanpub/leanpub-book-summary.service.js b/services/leanpub/leanpub-book-summary.service.js
index 44cb3a36b0716..8328862ad3265 100644
--- a/services/leanpub/leanpub-book-summary.service.js
+++ b/services/leanpub/leanpub-book-summary.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
route: {
@@ -8,4 +8,4 @@ export default deprecatedService({
category: 'funding',
label: 'leanpub',
dateAdded: new Date('2019-12-30'),
-});
+})
diff --git a/services/leanpub/leanpub-book-summary.tester.js b/services/leanpub/leanpub-book-summary.tester.js
index e3ab0e65ce803..feef7ffd306d9 100644
--- a/services/leanpub/leanpub-book-summary.tester.js
+++ b/services/leanpub/leanpub-book-summary.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'LeanPub',
diff --git a/services/lgtm/lgtm-alerts.service.js b/services/lgtm/lgtm-alerts.service.js
index 87e32a3aeeaa6..814dce1d6352e 100644
--- a/services/lgtm/lgtm-alerts.service.js
+++ b/services/lgtm/lgtm-alerts.service.js
@@ -1,5 +1,5 @@
-import {metric} from '../text-formatters.js';
-import LgtmBaseService from './lgtm-base.js';
+import { metric } from '../text-formatters.js'
+import LgtmBaseService from './lgtm-base.js'
export default class LgtmAlerts extends LgtmBaseService {
static route = {
@@ -42,4 +42,4 @@ export default class LgtmAlerts extends LgtmBaseService {
const { alerts } = await this.fetch({ host, user, repo })
return this.constructor.render({ alerts })
}
-};
+}
diff --git a/services/lgtm/lgtm-alerts.tester.js b/services/lgtm/lgtm-alerts.tester.js
index 5358a8e95b01e..ed747c5a3d419 100644
--- a/services/lgtm/lgtm-alerts.tester.js
+++ b/services/lgtm/lgtm-alerts.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
-import {data} from './lgtm-test-helpers.js';
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
+import { data } from './lgtm-test-helpers.js'
export const t = await createServiceTester()
t.create('alerts: total alerts for a project')
diff --git a/services/lgtm/lgtm-base.js b/services/lgtm/lgtm-base.js
index a32e47f6cb6e7..ed1e12091092d 100644
--- a/services/lgtm/lgtm-base.js
+++ b/services/lgtm/lgtm-base.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
alerts: Joi.number().required(),
@@ -39,4 +39,4 @@ export default class LgtmBaseService extends BaseJsonService {
},
})
}
-};
+}
diff --git a/services/lgtm/lgtm-grade.service.js b/services/lgtm/lgtm-grade.service.js
index 97e90f5cdaa56..3f196949b428f 100644
--- a/services/lgtm/lgtm-grade.service.js
+++ b/services/lgtm/lgtm-grade.service.js
@@ -1,4 +1,4 @@
-import LgtmBaseService from './lgtm-base.js';
+import LgtmBaseService from './lgtm-base.js'
export default class LgtmGrade extends LgtmBaseService {
static route = {
@@ -85,4 +85,4 @@ export default class LgtmGrade extends LgtmBaseService {
const data = await this.fetch({ host, user, repo })
return this.constructor.render({ language, data })
}
-};
+}
diff --git a/services/lgtm/lgtm-grade.tester.js b/services/lgtm/lgtm-grade.tester.js
index 167cb0a022932..8e8c3ba3f8b59 100644
--- a/services/lgtm/lgtm-grade.tester.js
+++ b/services/lgtm/lgtm-grade.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
-import {data} from './lgtm-test-helpers.js';
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
+import { data } from './lgtm-test-helpers.js'
export const t = await createServiceTester()
t.create('grade: missing project')
diff --git a/services/lgtm/lgtm-redirector.service.js b/services/lgtm/lgtm-redirector.service.js
index a94679fbe016d..bc6bd04806fce 100644
--- a/services/lgtm/lgtm-redirector.service.js
+++ b/services/lgtm/lgtm-redirector.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
const commonAttrs = {
category: 'analysis',
@@ -23,4 +23,4 @@ export default [
`/lgtm/grade/${language}/github/${user}/${repo}`,
...commonAttrs,
}),
-];
+]
diff --git a/services/lgtm/lgtm-redirector.tester.js b/services/lgtm/lgtm-redirector.tester.js
index 5dcb4c4b6a197..d6d56631813b0 100644
--- a/services/lgtm/lgtm-redirector.tester.js
+++ b/services/lgtm/lgtm-redirector.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'LgtmRedirect',
diff --git a/services/lgtm/lgtm-test-helpers.js b/services/lgtm/lgtm-test-helpers.js
index 22bc59d1228e5..e169d4c6ddd34 100644
--- a/services/lgtm/lgtm-test-helpers.js
+++ b/services/lgtm/lgtm-test-helpers.js
@@ -11,6 +11,4 @@ const data = {
],
}
-export {
- data,
-};
+export { data }
diff --git a/services/liberapay/liberapay-base.js b/services/liberapay/liberapay-base.js
index ed1fd232465d2..a044844150ccd 100644
--- a/services/liberapay/liberapay-base.js
+++ b/services/liberapay/liberapay-base.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {colorScale} from '../color-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { colorScale } from '../color-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
npatrons: nonNegativeInteger,
@@ -62,8 +62,4 @@ class LiberapayBase extends BaseJsonService {
}
}
-export {
- renderCurrencyBadge,
- LiberapayBase,
- isCurrencyOverTime,
-};
+export { renderCurrencyBadge, LiberapayBase, isCurrencyOverTime }
diff --git a/services/liberapay/liberapay-gives.service.js b/services/liberapay/liberapay-gives.service.js
index 42992ef5f2ffe..127a3a34e8509 100644
--- a/services/liberapay/liberapay-gives.service.js
+++ b/services/liberapay/liberapay-gives.service.js
@@ -1,5 +1,5 @@
-import {InvalidResponse} from '../index.js';
-import {renderCurrencyBadge, LiberapayBase} from './liberapay-base.js';
+import { InvalidResponse } from '../index.js'
+import { renderCurrencyBadge, LiberapayBase } from './liberapay-base.js'
export default class LiberapayGives extends LiberapayBase {
static route = this.buildRoute('gives')
@@ -28,4 +28,4 @@ export default class LiberapayGives extends LiberapayBase {
throw new InvalidResponse({ prettyMessage: 'no public giving stats' })
}
}
-};
+}
diff --git a/services/liberapay/liberapay-gives.tester.js b/services/liberapay/liberapay-gives.tester.js
index 22c158d6ab4fd..daf77a689f0c3 100644
--- a/services/liberapay/liberapay-gives.tester.js
+++ b/services/liberapay/liberapay-gives.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isCurrencyOverTime} from './liberapay-base.js';
+import { createServiceTester } from '../tester.js'
+import { isCurrencyOverTime } from './liberapay-base.js'
export const t = await createServiceTester()
t.create('Giving (valid)').get('/Changaco.json').expectBadge({
diff --git a/services/liberapay/liberapay-goal.service.js b/services/liberapay/liberapay-goal.service.js
index c1053e60f4d93..4c7ae71e42767 100644
--- a/services/liberapay/liberapay-goal.service.js
+++ b/services/liberapay/liberapay-goal.service.js
@@ -1,6 +1,6 @@
-import {colorScale} from '../color-formatters.js';
-import {InvalidResponse} from '../index.js';
-import {LiberapayBase} from './liberapay-base.js';
+import { colorScale } from '../color-formatters.js'
+import { InvalidResponse } from '../index.js'
+import { LiberapayBase } from './liberapay-base.js'
export default class LiberapayGoal extends LiberapayBase {
static route = this.buildRoute('goal')
@@ -40,4 +40,4 @@ export default class LiberapayGoal extends LiberapayBase {
const { percentAchieved } = this.transform({ goal, receiving })
return this.constructor.render({ percentAchieved })
}
-};
+}
diff --git a/services/liberapay/liberapay-goal.spec.js b/services/liberapay/liberapay-goal.spec.js
index 096e9d4137a29..ace4d40c45576 100644
--- a/services/liberapay/liberapay-goal.spec.js
+++ b/services/liberapay/liberapay-goal.spec.js
@@ -1,7 +1,7 @@
-import {expect} from 'chai';
-import {test, given} from 'sazerac';
-import {InvalidResponse} from '../index.js';
-import LiberapayGoal from './liberapay-goal.service.js';
+import { expect } from 'chai'
+import { test, given } from 'sazerac'
+import { InvalidResponse } from '../index.js'
+import LiberapayGoal from './liberapay-goal.service.js'
describe('LiberapayGoal', function () {
test(LiberapayGoal.prototype.transform, () => {
diff --git a/services/liberapay/liberapay-goal.tester.js b/services/liberapay/liberapay-goal.tester.js
index 522a57db0c072..518a84b004107 100644
--- a/services/liberapay/liberapay-goal.tester.js
+++ b/services/liberapay/liberapay-goal.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Goal Progress (valid)').get('/Liberapay.json').expectBadge({
diff --git a/services/liberapay/liberapay-patrons.service.js b/services/liberapay/liberapay-patrons.service.js
index e0f46649774b2..dbcf4d8639637 100644
--- a/services/liberapay/liberapay-patrons.service.js
+++ b/services/liberapay/liberapay-patrons.service.js
@@ -1,6 +1,6 @@
-import {metric} from '../text-formatters.js';
-import {colorScale} from '../color-formatters.js';
-import {LiberapayBase} from './liberapay-base.js';
+import { metric } from '../text-formatters.js'
+import { colorScale } from '../color-formatters.js'
+import { LiberapayBase } from './liberapay-base.js'
export default class LiberapayPatrons extends LiberapayBase {
static route = this.buildRoute('patrons')
@@ -25,4 +25,4 @@ export default class LiberapayPatrons extends LiberapayBase {
const data = await this.fetch({ entity })
return this.constructor.render({ patrons: data.npatrons })
}
-};
+}
diff --git a/services/liberapay/liberapay-patrons.tester.js b/services/liberapay/liberapay-patrons.tester.js
index 8ec17eaeed8db..8c7f780c41cf5 100644
--- a/services/liberapay/liberapay-patrons.tester.js
+++ b/services/liberapay/liberapay-patrons.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Patrons (valid)').get('/Liberapay.json').expectBadge({
diff --git a/services/liberapay/liberapay-receives.service.js b/services/liberapay/liberapay-receives.service.js
index 1007da63ce9ec..7d828f90bd684 100644
--- a/services/liberapay/liberapay-receives.service.js
+++ b/services/liberapay/liberapay-receives.service.js
@@ -1,5 +1,5 @@
-import {InvalidResponse} from '../index.js';
-import {renderCurrencyBadge, LiberapayBase} from './liberapay-base.js';
+import { InvalidResponse } from '../index.js'
+import { renderCurrencyBadge, LiberapayBase } from './liberapay-base.js'
export default class LiberapayReceives extends LiberapayBase {
static route = this.buildRoute('receives')
@@ -28,4 +28,4 @@ export default class LiberapayReceives extends LiberapayBase {
throw new InvalidResponse({ prettyMessage: 'no public receiving stats' })
}
}
-};
+}
diff --git a/services/liberapay/liberapay-receives.tester.js b/services/liberapay/liberapay-receives.tester.js
index 60909abc7c79a..17988abc7c7a6 100644
--- a/services/liberapay/liberapay-receives.tester.js
+++ b/services/liberapay/liberapay-receives.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isCurrencyOverTime} from './liberapay-base.js';
+import { createServiceTester } from '../tester.js'
+import { isCurrencyOverTime } from './liberapay-base.js'
export const t = await createServiceTester()
t.create('Receiving (valid)').get('/Changaco.json').expectBadge({
diff --git a/services/librariesio/librariesio-common.js b/services/librariesio/librariesio-common.js
index e24914233e970..974060a688809 100644
--- a/services/librariesio/librariesio-common.js
+++ b/services/librariesio/librariesio-common.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {nonNegativeInteger, anyInteger} from '../validators.js';
+import Joi from 'joi'
+import { nonNegativeInteger, anyInteger } from '../validators.js'
// API doc: https://libraries.io/api#project
const projectSchema = Joi.object({
@@ -19,6 +19,4 @@ async function fetchProject(serviceInstance, { platform, scope, packageName }) {
})
}
-export {
- fetchProject,
-};
+export { fetchProject }
diff --git a/services/librariesio/librariesio-dependencies-helpers.js b/services/librariesio/librariesio-dependencies-helpers.js
index 5ea483f9e269a..7aaaf71536a37 100644
--- a/services/librariesio/librariesio-dependencies-helpers.js
+++ b/services/librariesio/librariesio-dependencies-helpers.js
@@ -26,4 +26,4 @@ function renderDependenciesBadge({ deprecatedCount, outdatedCount }) {
}
}
-export { transform, renderDependenciesBadge };
+export { transform, renderDependenciesBadge }
diff --git a/services/librariesio/librariesio-dependencies-helpers.spec.js b/services/librariesio/librariesio-dependencies-helpers.spec.js
index 2badbbf90d5b4..bdc1c3d17a15e 100644
--- a/services/librariesio/librariesio-dependencies-helpers.spec.js
+++ b/services/librariesio/librariesio-dependencies-helpers.spec.js
@@ -1,5 +1,5 @@
-import {test, given, forCases} from 'sazerac';
-import {renderDependenciesBadge} from './librariesio-dependencies-helpers.js';
+import { test, given, forCases } from 'sazerac'
+import { renderDependenciesBadge } from './librariesio-dependencies-helpers.js'
describe('Libraries.io dependency helpers', function () {
test(renderDependenciesBadge, () => {
diff --git a/services/librariesio/librariesio-dependencies.service.js b/services/librariesio/librariesio-dependencies.service.js
index 3aed6a5ea8981..05df0e6ae6420 100644
--- a/services/librariesio/librariesio-dependencies.service.js
+++ b/services/librariesio/librariesio-dependencies.service.js
@@ -1,6 +1,9 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
-import {transform, renderDependenciesBadge} from './librariesio-dependencies-helpers.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
+import {
+ transform,
+ renderDependenciesBadge,
+} from './librariesio-dependencies-helpers.js'
const schema = Joi.object({
dependencies: Joi.array()
@@ -129,4 +132,4 @@ class LibrariesIoRepoDependencies extends BaseJsonService {
}
}
-export default [LibrariesIoProjectDependencies, LibrariesIoRepoDependencies];
+export default [LibrariesIoProjectDependencies, LibrariesIoRepoDependencies]
diff --git a/services/librariesio/librariesio-dependencies.tester.js b/services/librariesio/librariesio-dependencies.tester.js
index 0fa02a7a0f7a0..6aeb2feda475a 100644
--- a/services/librariesio/librariesio-dependencies.tester.js
+++ b/services/librariesio/librariesio-dependencies.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isDependencyState} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isDependencyState } from '../test-validators.js'
export const t = new ServiceTester({
id: 'LibrariesIoDependencies',
title: 'LibrariesIoDependencies',
diff --git a/services/librariesio/librariesio-dependent-repos.service.js b/services/librariesio/librariesio-dependent-repos.service.js
index ef5e819835847..0f8217c11bc73 100644
--- a/services/librariesio/librariesio-dependent-repos.service.js
+++ b/services/librariesio/librariesio-dependent-repos.service.js
@@ -1,6 +1,6 @@
-import {metric} from '../text-formatters.js';
-import {BaseJsonService} from '../index.js';
-import {fetchProject} from './librariesio-common.js';
+import { metric } from '../text-formatters.js'
+import { BaseJsonService } from '../index.js'
+import { fetchProject } from './librariesio-common.js'
// https://libraries.io/api#project-dependent-repositories
export default class LibrariesIoDependentRepos extends BaseJsonService {
@@ -55,4 +55,4 @@ export default class LibrariesIoDependentRepos extends BaseJsonService {
)
return this.constructor.render({ dependentReposCount })
}
-};
+}
diff --git a/services/librariesio/librariesio-dependent-repos.tester.js b/services/librariesio/librariesio-dependent-repos.tester.js
index 789b38c4230bf..2c7df20c70801 100644
--- a/services/librariesio/librariesio-dependent-repos.tester.js
+++ b/services/librariesio/librariesio-dependent-repos.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('dependent repo count')
diff --git a/services/librariesio/librariesio-dependents.service.js b/services/librariesio/librariesio-dependents.service.js
index 6442486d4185a..ceaf4f5b27817 100644
--- a/services/librariesio/librariesio-dependents.service.js
+++ b/services/librariesio/librariesio-dependents.service.js
@@ -1,6 +1,6 @@
-import {metric} from '../text-formatters.js';
-import {BaseJsonService} from '../index.js';
-import {fetchProject} from './librariesio-common.js';
+import { metric } from '../text-formatters.js'
+import { BaseJsonService } from '../index.js'
+import { fetchProject } from './librariesio-common.js'
// https://libraries.io/api#project-dependents
export default class LibrariesIoDependents extends BaseJsonService {
@@ -52,4 +52,4 @@ export default class LibrariesIoDependents extends BaseJsonService {
})
return this.constructor.render({ dependentCount })
}
-};
+}
diff --git a/services/librariesio/librariesio-dependents.tester.js b/services/librariesio/librariesio-dependents.tester.js
index f401b23a752c9..8ca0b4393bd31 100644
--- a/services/librariesio/librariesio-dependents.tester.js
+++ b/services/librariesio/librariesio-dependents.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('dependent count').timeout(10000).get('/npm/got.json').expectBadge({
diff --git a/services/librariesio/librariesio-sourcerank.service.js b/services/librariesio/librariesio-sourcerank.service.js
index 451c244f0de41..351a668eeff7f 100644
--- a/services/librariesio/librariesio-sourcerank.service.js
+++ b/services/librariesio/librariesio-sourcerank.service.js
@@ -1,6 +1,6 @@
-import {colorScale} from '../color-formatters.js';
-import {BaseJsonService} from '../index.js';
-import {fetchProject} from './librariesio-common.js';
+import { colorScale } from '../color-formatters.js'
+import { BaseJsonService } from '../index.js'
+import { fetchProject } from './librariesio-common.js'
const sourceRankColor = colorScale([10, 15, 20, 25, 30])
@@ -53,4 +53,4 @@ export default class LibrariesIoSourcerank extends BaseJsonService {
})
return this.constructor.render({ rank })
}
-};
+}
diff --git a/services/librariesio/librariesio-sourcerank.tester.js b/services/librariesio/librariesio-sourcerank.tester.js
index 988fe629a2a7f..7135302de37c1 100644
--- a/services/librariesio/librariesio-sourcerank.tester.js
+++ b/services/librariesio/librariesio-sourcerank.tester.js
@@ -1,5 +1,5 @@
-import {anyInteger} from '../validators.js';
-import {createServiceTester} from '../tester.js'
+import { anyInteger } from '../validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('sourcerank').timeout(10000).get('/npm/got.json').expectBadge({
diff --git a/services/libscore/libscore.service.js b/services/libscore/libscore.service.js
index 7b73f8ef3c5a1..234d53e38f8db 100644
--- a/services/libscore/libscore.service.js
+++ b/services/libscore/libscore.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
category: 'rating',
@@ -8,4 +8,4 @@ export default deprecatedService({
},
label: 'libscore',
dateAdded: new Date('2018-09-22'),
-});
+})
diff --git a/services/libscore/libscore.tester.js b/services/libscore/libscore.tester.js
index 31d5d0592b6eb..bf5ec44d0ce07 100644
--- a/services/libscore/libscore.tester.js
+++ b/services/libscore/libscore.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({ id: 'libscore', title: 'libscore' })
diff --git a/services/licenses.js b/services/licenses.js
index df87246b7c92d..9def600c8f591 100644
--- a/services/licenses.js
+++ b/services/licenses.js
@@ -1,4 +1,4 @@
-import toArray from '../core/base-service/to-array.js';
+import toArray from '../core/base-service/to-array.js'
const licenseTypes = {
// permissive licenses - not public domain and not copyleft
@@ -128,4 +128,4 @@ function renderLicenseBadge({ license, licenses }) {
}
}
-export { licenseToColor, renderLicenseBadge };
+export { licenseToColor, renderLicenseBadge }
diff --git a/services/licenses.spec.js b/services/licenses.spec.js
index c7044e83937b0..20554dadc7305 100644
--- a/services/licenses.spec.js
+++ b/services/licenses.spec.js
@@ -1,5 +1,5 @@
-import {test, given, forCases} from 'sazerac';
-import {licenseToColor, renderLicenseBadge} from './licenses.js';
+import { test, given, forCases } from 'sazerac'
+import { licenseToColor, renderLicenseBadge } from './licenses.js'
describe('license helpers', function () {
test(licenseToColor, () => {
diff --git a/services/localizely/localizely.service.js b/services/localizely/localizely.service.js
index 833ced776b78d..1e8ac60608329 100644
--- a/services/localizely/localizely.service.js
+++ b/services/localizely/localizely.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {BaseJsonService, InvalidResponse} from '../index.js';
-import {coveragePercentage} from '../color-formatters.js';
+import Joi from 'joi'
+import { BaseJsonService, InvalidResponse } from '../index.js'
+import { coveragePercentage } from '../color-formatters.js'
const keywords = [
'l10n',
@@ -141,4 +141,4 @@ export default class Localizely extends BaseJsonService {
return this.constructor.render({ langName, reviewedProgress })
}
-};
+}
diff --git a/services/localizely/localizely.tester.js b/services/localizely/localizely.tester.js
index f79f8a4d9311f..9f996e287de16 100644
--- a/services/localizely/localizely.tester.js
+++ b/services/localizely/localizely.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isIntegerPercentage} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
export const t = await createServiceTester()
t.create('Overall progress')
diff --git a/services/luarocks/luarocks-version-helpers.js b/services/luarocks/luarocks-version-helpers.js
index 88d1ede996c7b..3523f38a5b597 100644
--- a/services/luarocks/luarocks-version-helpers.js
+++ b/services/luarocks/luarocks-version-helpers.js
@@ -24,7 +24,7 @@
* https://github.com/luarocks/luarocks/blob/405ee29ba8444d97646f62e72effeaff2bfe3f79/src/luarocks/search.lua#L182
* https://github.com/luarocks/luarocks/blob/405ee29ba8444d97646f62e72effeaff2bfe3f79/src/luarocks/core/vers.lua#L83
*/
-import {omitv} from '../text-formatters.js';
+import { omitv } from '../text-formatters.js'
// Compare two arrays containing split and transformed to
// positive/negative numbers parts of version strings,
@@ -84,8 +84,4 @@ function latestVersion(versions) {
.pop()
}
-export {
- parseVersion,
- compareVersionLists,
- latestVersion,
-};
+export { parseVersion, compareVersionLists, latestVersion }
diff --git a/services/luarocks/luarocks-version-helpers.spec.js b/services/luarocks/luarocks-version-helpers.spec.js
index 06f721ac1832f..fce50d9acf0ff 100644
--- a/services/luarocks/luarocks-version-helpers.spec.js
+++ b/services/luarocks/luarocks-version-helpers.spec.js
@@ -1,5 +1,9 @@
-import {test, given, forCases} from 'sazerac';
-import {parseVersion, compareVersionLists, latestVersion} from './luarocks-version-helpers.js';
+import { test, given, forCases } from 'sazerac'
+import {
+ parseVersion,
+ compareVersionLists,
+ latestVersion,
+} from './luarocks-version-helpers.js'
describe('LuaRocks-specific helpers', function () {
test(compareVersionLists, () => {
diff --git a/services/luarocks/luarocks.service.js b/services/luarocks/luarocks.service.js
index 7bc6cef6083b7..2ffb68616afad 100644
--- a/services/luarocks/luarocks.service.js
+++ b/services/luarocks/luarocks.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {addv} from '../text-formatters.js';
-import {BaseJsonService, NotFound} from '../index.js';
-import {latestVersion} from './luarocks-version-helpers.js';
+import Joi from 'joi'
+import { addv } from '../text-formatters.js'
+import { BaseJsonService, NotFound } from '../index.js'
+import { latestVersion } from './luarocks-version-helpers.js'
const schema = Joi.object({
repository: Joi.object()
@@ -86,4 +86,4 @@ export default class Luarocks extends BaseJsonService {
}
return this.constructor.render({ version })
}
-};
+}
diff --git a/services/luarocks/luarocks.spec.js b/services/luarocks/luarocks.spec.js
index a2e11fcf70715..811ab73ccf72a 100644
--- a/services/luarocks/luarocks.spec.js
+++ b/services/luarocks/luarocks.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import Luarocks from './luarocks.service.js';
+import { test, given } from 'sazerac'
+import Luarocks from './luarocks.service.js'
test(Luarocks.render, () => {
given({ version: 'dev-1' }).expect({ message: 'dev-1', color: 'yellow' })
diff --git a/services/luarocks/luarocks.tester.js b/services/luarocks/luarocks.tester.js
index e5ffcd690ff17..e82ddcf8eed4f 100644
--- a/services/luarocks/luarocks.tester.js
+++ b/services/luarocks/luarocks.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isLuaVersion = Joi.string()
diff --git a/services/magnumci/magnumci.service.js b/services/magnumci/magnumci.service.js
index fffa239e6a0cc..8830135f3a5f7 100644
--- a/services/magnumci/magnumci.service.js
+++ b/services/magnumci/magnumci.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
category: 'build',
@@ -8,4 +8,4 @@ export default deprecatedService({
},
label: 'magnum ci',
dateAdded: new Date('2018-07-08'),
-});
+})
diff --git a/services/magnumci/magnumci.tester.js b/services/magnumci/magnumci.tester.js
index fef5c1a8d71ee..c42c7f3297d98 100644
--- a/services/magnumci/magnumci.tester.js
+++ b/services/magnumci/magnumci.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({ id: 'magnumci', title: 'Magnum CI' })
diff --git a/services/maintenance/maintenance.service.js b/services/maintenance/maintenance.service.js
index ed2cfc4b7f4a3..c38bc236318ff 100644
--- a/services/maintenance/maintenance.service.js
+++ b/services/maintenance/maintenance.service.js
@@ -1,4 +1,4 @@
-import {BaseService} from '../index.js';
+import { BaseService } from '../index.js'
export default class Maintenance extends BaseService {
static category = 'other'
@@ -72,4 +72,4 @@ export default class Maintenance extends BaseService {
message: maintained,
})
}
-};
+}
diff --git a/services/maintenance/maintenance.spec.js b/services/maintenance/maintenance.spec.js
index 72f2b76a3619f..cb98567746fd1 100644
--- a/services/maintenance/maintenance.spec.js
+++ b/services/maintenance/maintenance.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import Maintenance from './maintenance.service.js';
+import { test, given } from 'sazerac'
+import Maintenance from './maintenance.service.js'
describe('Maintenance', function () {
test(Maintenance.prototype.transform, () => {
diff --git a/services/maintenance/maintenance.tester.js b/services/maintenance/maintenance.tester.js
index 2e68f673566f0..1fd3dee957477 100644
--- a/services/maintenance/maintenance.tester.js
+++ b/services/maintenance/maintenance.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const currentYear = new Date().getUTCFullYear()
diff --git a/services/mastodon/mastodon-follow.service.js b/services/mastodon/mastodon-follow.service.js
index 9047617d110d6..cea9e509948e7 100644
--- a/services/mastodon/mastodon-follow.service.js
+++ b/services/mastodon/mastodon-follow.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {optionalUrl, nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { optionalUrl, nonNegativeInteger } from '../validators.js'
+import { BaseJsonService, NotFound } from '../index.js'
const schema = Joi.object({
username: Joi.string().required(),
@@ -76,4 +76,4 @@ export default class MastodonFollow extends BaseJsonService {
domain,
})
}
-};
+}
diff --git a/services/mastodon/mastodon-follow.tester.js b/services/mastodon/mastodon-follow.tester.js
index 51995393683e0..1b792bad8c962 100644
--- a/services/mastodon/mastodon-follow.tester.js
+++ b/services/mastodon/mastodon-follow.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Followers - default domain')
diff --git a/services/matrix/matrix.service.js b/services/matrix/matrix.service.js
index 46442844949b1..d0cdf311e488a 100644
--- a/services/matrix/matrix.service.js
+++ b/services/matrix/matrix.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService, InvalidParameter} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService, InvalidParameter } from '../index.js'
const queryParamSchema = Joi.object({
server_fqdn: Joi.string().hostname(),
@@ -194,4 +194,4 @@ export default class Matrix extends BaseJsonService {
const members = await this.fetch({ roomAlias, serverFQDN })
return this.constructor.render({ members })
}
-};
+}
diff --git a/services/matrix/matrix.tester.js b/services/matrix/matrix.tester.js
index 86f796c1eb439..d87857497a2fc 100644
--- a/services/matrix/matrix.tester.js
+++ b/services/matrix/matrix.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('get room state as guest')
diff --git a/services/maven-central/maven-central.service.js b/services/maven-central/maven-central.service.js
index 2cb47457c6dd2..ac5a6b5fcc4e7 100644
--- a/services/maven-central/maven-central.service.js
+++ b/services/maven-central/maven-central.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {BaseXmlService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { BaseXmlService, NotFound } from '../index.js'
const schema = Joi.object({
metadata: Joi.object({
@@ -77,4 +77,4 @@ export default class MavenCentral extends BaseXmlService {
}
return renderVersionBadge({ version })
}
-};
+}
diff --git a/services/maven-central/maven-central.tester.js b/services/maven-central/maven-central.tester.js
index 76f8f27299d15..6cb9965d98065 100644
--- a/services/maven-central/maven-central.tester.js
+++ b/services/maven-central/maven-central.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionNClausesWithOptionalSuffix } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('latest version')
diff --git a/services/maven-metadata/maven-metadata-redirect.service.js b/services/maven-metadata/maven-metadata-redirect.service.js
index bf088ea879861..a7cffcca7c577 100644
--- a/services/maven-metadata/maven-metadata-redirect.service.js
+++ b/services/maven-metadata/maven-metadata-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default redirector({
category: 'version',
@@ -11,4 +11,4 @@ export default redirector({
metadataUrl: `${protocol}://${hostAndPath}`,
}),
dateAdded: new Date('2019-09-16'),
-});
+})
diff --git a/services/maven-metadata/maven-metadata-redirect.tester.js b/services/maven-metadata/maven-metadata-redirect.tester.js
index 6da5ffefb6777..ddd053e8bd129 100644
--- a/services/maven-metadata/maven-metadata-redirect.tester.js
+++ b/services/maven-metadata/maven-metadata-redirect.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('maven metadata (badge extension)')
diff --git a/services/maven-metadata/maven-metadata.service.js b/services/maven-metadata/maven-metadata.service.js
index 5d7a56fb929dc..3f924ecbb807f 100644
--- a/services/maven-metadata/maven-metadata.service.js
+++ b/services/maven-metadata/maven-metadata.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {optionalUrl} from '../validators.js';
-import {renderVersionBadge} from '../version.js';
-import {BaseXmlService} from '../index.js';
+import Joi from 'joi'
+import { optionalUrl } from '../validators.js'
+import { renderVersionBadge } from '../version.js'
+import { BaseXmlService } from '../index.js'
const queryParamSchema = Joi.object({
metadataUrl: optionalUrl.required(),
@@ -56,4 +56,4 @@ export default class MavenMetadata extends BaseXmlService {
version: data.metadata.versioning.versions.version.slice(-1)[0],
})
}
-};
+}
diff --git a/services/maven-metadata/maven-metadata.tester.js b/services/maven-metadata/maven-metadata.tester.js
index 37f1be7753608..50382b9f82504 100644
--- a/services/maven-metadata/maven-metadata.tester.js
+++ b/services/maven-metadata/maven-metadata.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
export const t = await createServiceTester()
t.create('valid maven-metadata.xml uri')
diff --git a/services/microbadger/microbadger-base.js b/services/microbadger/microbadger-base.js
index afffbc18f1b2f..0996b1e4e94ae 100644
--- a/services/microbadger/microbadger-base.js
+++ b/services/microbadger/microbadger-base.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService, NotFound } from '../index.js'
const schema = Joi.object({
LayerCount: nonNegativeInteger,
@@ -48,4 +48,4 @@ export default class BaseMicrobadgerService extends BaseJsonService {
}
return image
}
-};
+}
diff --git a/services/microbadger/microbadger-layers.service.js b/services/microbadger/microbadger-layers.service.js
index a46b5e7f4f182..67b75b9ae8344 100644
--- a/services/microbadger/microbadger-layers.service.js
+++ b/services/microbadger/microbadger-layers.service.js
@@ -1,4 +1,4 @@
-import BaseMicrobadgerService from './microbadger-base.js';
+import BaseMicrobadgerService from './microbadger-base.js'
export default class MicrobadgerLayers extends BaseMicrobadgerService {
static route = {
@@ -37,4 +37,4 @@ export default class MicrobadgerLayers extends BaseMicrobadgerService {
const image = this.constructor.getImage(data, tag)
return this.constructor.render({ layers: image.LayerCount })
}
-};
+}
diff --git a/services/microbadger/microbadger-layers.tester.js b/services/microbadger/microbadger-layers.tester.js
index ace6a63f89ae8..73b31933d61b8 100644
--- a/services/microbadger/microbadger-layers.tester.js
+++ b/services/microbadger/microbadger-layers.tester.js
@@ -1,5 +1,5 @@
-import {nonNegativeInteger} from '../validators.js';
-import {createServiceTester} from '../tester.js'
+import { nonNegativeInteger } from '../validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('layers without a specified tag')
diff --git a/services/microbadger/microbadger-size.service.js b/services/microbadger/microbadger-size.service.js
index 2b784d0e1ec18..3443f36465d45 100644
--- a/services/microbadger/microbadger-size.service.js
+++ b/services/microbadger/microbadger-size.service.js
@@ -1,6 +1,6 @@
-import prettyBytes from 'pretty-bytes';
-import {NotFound} from '../index.js';
-import BaseMicrobadgerService from './microbadger-base.js';
+import prettyBytes from 'pretty-bytes'
+import { NotFound } from '../index.js'
+import BaseMicrobadgerService from './microbadger-base.js'
const documentation = `
@@ -69,4 +69,4 @@ export default class MicrobadgerSize extends BaseMicrobadgerService {
}
return this.constructor.render({ size: image.DownloadSize })
}
-};
+}
diff --git a/services/microbadger/microbadger-size.tester.js b/services/microbadger/microbadger-size.tester.js
index d6066b26a8bc9..b7f11cb0e7ce8 100644
--- a/services/microbadger/microbadger-size.tester.js
+++ b/services/microbadger/microbadger-size.tester.js
@@ -1,5 +1,5 @@
-import {isFileSize} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isFileSize } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('image size without a specified tag')
diff --git a/services/mozilla-observatory/mozilla-observatory.service.js b/services/mozilla-observatory/mozilla-observatory.service.js
index 688fa22ed8093..8f436056c2d0d 100644
--- a/services/mozilla-observatory/mozilla-observatory.service.js
+++ b/services/mozilla-observatory/mozilla-observatory.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
state: Joi.string()
@@ -112,4 +112,4 @@ export default class MozillaObservatory extends BaseJsonService {
const { state, grade, score } = await this.fetch({ host, publish })
return this.constructor.render({ format, state, grade, score })
}
-};
+}
diff --git a/services/mozilla-observatory/mozilla-observatory.tester.js b/services/mozilla-observatory/mozilla-observatory.tester.js
index 6996cc42f1ee4..b3f73f658d512 100644
--- a/services/mozilla-observatory/mozilla-observatory.tester.js
+++ b/services/mozilla-observatory/mozilla-observatory.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isMessage = Joi.alternatives()
diff --git a/services/myget/myget.service.js b/services/myget/myget.service.js
index 4d29b76f9b6a5..8b654e6ffc31f 100644
--- a/services/myget/myget.service.js
+++ b/services/myget/myget.service.js
@@ -1,4 +1,4 @@
-import {createServiceFamily} from '../nuget/nuget-v3-service-family.js';
+import { createServiceFamily } from '../nuget/nuget-v3-service-family.js'
const { NugetVersionService: Version, NugetDownloadService: Downloads } =
createServiceFamily({
@@ -55,7 +55,4 @@ class MyGetDownloadService extends Downloads {
]
}
-export {
- MyGetVersionService,
- MyGetDownloadService,
-};
+export { MyGetVersionService, MyGetDownloadService }
diff --git a/services/myget/myget.tester.js b/services/myget/myget.tester.js
index ac8f57d1b566a..7b3e9ec5a6e08 100644
--- a/services/myget/myget.tester.js
+++ b/services/myget/myget.tester.js
@@ -1,7 +1,15 @@
-import {ServiceTester} from '../tester.js';
-import {isMetric, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
-import {queryIndex, nuGetV3VersionJsonWithDash, nuGetV3VersionJsonFirstCharZero, nuGetV3VersionJsonFirstCharNotZero} from '../nuget-fixtures.js';
-import {invalidJSON} from '../response-fixtures.js';
+import { ServiceTester } from '../tester.js'
+import {
+ isMetric,
+ isVPlusDottedVersionNClausesWithOptionalSuffix,
+} from '../test-validators.js'
+import {
+ queryIndex,
+ nuGetV3VersionJsonWithDash,
+ nuGetV3VersionJsonFirstCharZero,
+ nuGetV3VersionJsonFirstCharNotZero,
+} from '../nuget-fixtures.js'
+import { invalidJSON } from '../response-fixtures.js'
export const t = new ServiceTester({
id: 'myget',
diff --git a/services/netlify/netlify.service.js b/services/netlify/netlify.service.js
index f2ab3da6080e1..3feefa4165161 100644
--- a/services/netlify/netlify.service.js
+++ b/services/netlify/netlify.service.js
@@ -1,5 +1,5 @@
-import {renderBuildStatusBadge} from '../build-status.js';
-import {BaseSvgScrapingService} from '../index.js';
+import { renderBuildStatusBadge } from '../build-status.js'
+import { BaseSvgScrapingService } from '../index.js'
const pendingStatus = 'building'
const notBuiltStatus = 'not built'
@@ -62,4 +62,4 @@ export default class Netlify extends BaseSvgScrapingService {
const { message: status } = await this.fetch({ projectId, branch })
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/netlify/netlify.spec.js b/services/netlify/netlify.spec.js
index 9fa88bb3625de..c614e5ee62e1b 100644
--- a/services/netlify/netlify.spec.js
+++ b/services/netlify/netlify.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import Netlify from './netlify.service.js';
+import { test, given } from 'sazerac'
+import Netlify from './netlify.service.js'
const building = { message: 'building', label: undefined, color: 'yellow' }
const notBuilt = { message: 'not built', label: undefined, color: undefined }
diff --git a/services/netlify/netlify.tester.js b/services/netlify/netlify.tester.js
index ef99bface87ff..8d9d8a03eab98 100644
--- a/services/netlify/netlify.tester.js
+++ b/services/netlify/netlify.tester.js
@@ -1,5 +1,5 @@
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('netlify (valid, no branch)')
diff --git a/services/nexus/nexus-redirect.service.js b/services/nexus/nexus-redirect.service.js
index ac06886554022..12878567219c8 100644
--- a/services/nexus/nexus-redirect.service.js
+++ b/services/nexus/nexus-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
redirector({
@@ -16,4 +16,4 @@ export default [
}),
dateAdded: new Date('2019-07-26'),
}),
-];
+]
diff --git a/services/nexus/nexus-redirect.tester.js b/services/nexus/nexus-redirect.tester.js
index bfd1c6815b075..294b0f67143ad 100644
--- a/services/nexus/nexus-redirect.tester.js
+++ b/services/nexus/nexus-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'NexusRedirect',
diff --git a/services/nexus/nexus-version.js b/services/nexus/nexus-version.js
index dc621af6592c6..0adb7bf42527f 100644
--- a/services/nexus/nexus-version.js
+++ b/services/nexus/nexus-version.js
@@ -3,6 +3,4 @@ function isSnapshotVersion(version) {
return version && version.match(pattern)
}
-export {
- isSnapshotVersion,
-};
+export { isSnapshotVersion }
diff --git a/services/nexus/nexus.service.js b/services/nexus/nexus.service.js
index 60c084027668e..67451ef0c929e 100644
--- a/services/nexus/nexus.service.js
+++ b/services/nexus/nexus.service.js
@@ -1,9 +1,12 @@
-import Joi from 'joi';
-import {version as versionColor} from '../color-formatters.js';
-import {addv} from '../text-formatters.js';
-import {optionalUrl, optionalDottedVersionNClausesWithOptionalSuffix} from '../validators.js';
-import {BaseJsonService, InvalidResponse, NotFound} from '../index.js';
-import {isSnapshotVersion} from './nexus-version.js';
+import Joi from 'joi'
+import { version as versionColor } from '../color-formatters.js'
+import { addv } from '../text-formatters.js'
+import {
+ optionalUrl,
+ optionalDottedVersionNClausesWithOptionalSuffix,
+} from '../validators.js'
+import { BaseJsonService, InvalidResponse, NotFound } from '../index.js'
+import { isSnapshotVersion } from './nexus-version.js'
const nexus2SearchApiSchema = Joi.object({
data: Joi.array()
@@ -332,4 +335,4 @@ export default class Nexus extends BaseJsonService {
const { version } = this.transform({ repo, json, actualNexusVersion })
return this.constructor.render({ version })
}
-};
+}
diff --git a/services/nexus/nexus.spec.js b/services/nexus/nexus.spec.js
index 63d3b3266e22e..43104b8307da8 100644
--- a/services/nexus/nexus.spec.js
+++ b/services/nexus/nexus.spec.js
@@ -1,8 +1,8 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import {InvalidResponse, NotFound} from '../index.js';
-import Nexus from './nexus.service.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import { InvalidResponse, NotFound } from '../index.js'
+import Nexus from './nexus.service.js'
describe('Nexus', function () {
context('transform2()', function () {
diff --git a/services/nexus/nexus.tester.js b/services/nexus/nexus.tester.js
index ba74f2bd12154..f3c7d5c31ec26 100644
--- a/services/nexus/nexus.tester.js
+++ b/services/nexus/nexus.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusDottedVersionNClausesWithOptionalSuffix as isVersion} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isVPlusDottedVersionNClausesWithOptionalSuffix as isVersion } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Nexus 2 - search release version valid artifact')
diff --git a/services/node/node-base.js b/services/node/node-base.js
index 90932c84fff4d..61f049595eec9 100644
--- a/services/node/node-base.js
+++ b/services/node/node-base.js
@@ -1,4 +1,4 @@
-import NPMBase from '../npm/npm-base.js';
+import NPMBase from '../npm/npm-base.js'
const keywords = ['npm']
@@ -117,4 +117,4 @@ export default class NodeVersionBase extends NPMBase {
return this.constructor.render({ tag, nodeVersionRange })
}
-};
+}
diff --git a/services/node/node-current.service.js b/services/node/node-current.service.js
index 32ab3a42c0f71..4494641fc1f75 100644
--- a/services/node/node-current.service.js
+++ b/services/node/node-current.service.js
@@ -1,5 +1,5 @@
-import NodeVersionBase from './node-base.js';
-import {versionColorForRangeCurrent} from './node-version-color.js';
+import NodeVersionBase from './node-base.js'
+import { versionColorForRangeCurrent } from './node-version-color.js'
export default class NodeCurrentVersion extends NodeVersionBase {
static route = this.buildRoute('node/v', { withTag: true })
@@ -13,4 +13,4 @@ export default class NodeCurrentVersion extends NodeVersionBase {
static colorResolver = versionColorForRangeCurrent
static documentation = `This badge indicates whether the package supports the latest release of node`
-};
+}
diff --git a/services/node/node-current.spec.js b/services/node/node-current.spec.js
index 1981232f5566b..11cff97eefaa8 100644
--- a/services/node/node-current.spec.js
+++ b/services/node/node-current.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import NodeVersion from './node-current.service.js';
+import { test, given } from 'sazerac'
+import NodeVersion from './node-current.service.js'
describe('node static renderStaticPreview', function () {
it('should have parity with render()', async function () {
diff --git a/services/node/node-current.tester.js b/services/node/node-current.tester.js
index cd99c47df366c..7d50fa272df0a 100644
--- a/services/node/node-current.tester.js
+++ b/services/node/node-current.tester.js
@@ -1,8 +1,8 @@
-import {expect} from 'chai';
-import semverModule from 'semver';
-import {createServiceTester} from '../tester.js'
-import {mockPackageData, mockCurrentSha} from './testUtils/test-utils.js';
-const {Range} = semverModule;
+import { expect } from 'chai'
+import semverModule from 'semver'
+import { createServiceTester } from '../tester.js'
+import { mockPackageData, mockCurrentSha } from './testUtils/test-utils.js'
+const { Range } = semverModule
export const t = await createServiceTester()
function expectSemverRange(message) {
diff --git a/services/node/node-lts.service.js b/services/node/node-lts.service.js
index 929550d83e7cd..934e2ff71912d 100644
--- a/services/node/node-lts.service.js
+++ b/services/node/node-lts.service.js
@@ -1,5 +1,5 @@
-import NodeVersionBase from './node-base.js';
-import {versionColorForRangeLts} from './node-version-color.js';
+import NodeVersionBase from './node-base.js'
+import { versionColorForRangeLts } from './node-version-color.js'
export default class NodeLtsVersion extends NodeVersionBase {
static route = this.buildRoute('node/v-lts', { withTag: true })
@@ -13,4 +13,4 @@ export default class NodeLtsVersion extends NodeVersionBase {
static colorResolver = versionColorForRangeLts
static documentation = `This badge indicates whether the package supports all LTS node versions`
-};
+}
diff --git a/services/node/node-lts.spec.js b/services/node/node-lts.spec.js
index 782b9300e9608..cc3711731065d 100644
--- a/services/node/node-lts.spec.js
+++ b/services/node/node-lts.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import NodeVersion from './node-lts.service.js';
+import { test, given } from 'sazerac'
+import NodeVersion from './node-lts.service.js'
describe('node-lts 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
index 2be1b3359e35e..016604c21df79 100644
--- a/services/node/node-lts.tester.js
+++ b/services/node/node-lts.tester.js
@@ -1,8 +1,12 @@
-import {expect} from 'chai';
-import semverModule from 'semver';
-import {createServiceTester} from '../tester.js'
-import {mockPackageData, mockReleaseSchedule, mockVersionsSha} from './testUtils/test-utils.js';
-const {Range} = semverModule;
+import { expect } from 'chai'
+import semverModule from 'semver'
+import { createServiceTester } from '../tester.js'
+import {
+ mockPackageData,
+ mockReleaseSchedule,
+ mockVersionsSha,
+} from './testUtils/test-utils.js'
+const { Range } = semverModule
export const t = await createServiceTester()
function expectSemverRange(message) {
diff --git a/services/node/node-version-color.js b/services/node/node-version-color.js
index 25dd6207c13bf..44e36984a25ec 100644
--- a/services/node/node-version-color.js
+++ b/services/node/node-version-color.js
@@ -1,7 +1,7 @@
-import {promisify} from 'util';
-import moment from 'moment';
-import semver from 'semver';
-import {regularUpdate} from '../../core/legacy/regular-update.js';
+import { promisify } from 'util'
+import moment from 'moment'
+import semver from 'semver'
+import { regularUpdate } from '../../core/legacy/regular-update.js'
const dateFormat = 'YYYY-MM-DD'
@@ -82,7 +82,4 @@ async function versionColorForRangeCurrent(range) {
}
}
-export {
- versionColorForRangeCurrent,
- versionColorForRangeLts,
-};
+export { versionColorForRangeCurrent, versionColorForRangeLts }
diff --git a/services/node/testUtils/test-utils.js b/services/node/testUtils/test-utils.js
index 430a89914ae5e..2a7535ce04cf4 100644
--- a/services/node/testUtils/test-utils.js
+++ b/services/node/testUtils/test-utils.js
@@ -1,17 +1,23 @@
-import fs from 'fs';
-import path from 'path';
-import {fileURLToPath} from 'url'
-import moment from 'moment';
+import fs from 'fs'
+import path from 'path'
+import { fileURLToPath } from 'url'
+import moment from 'moment'
const dateFormat = 'YYYY-MM-DD'
const templates = {
packageJsonVersionsTemplate: fs.readFileSync(
- path.join(path.dirname(fileURLToPath(import.meta.url)), `packageJsonVersionsTemplate.json`),
+ path.join(
+ path.dirname(fileURLToPath(import.meta.url)),
+ `packageJsonVersionsTemplate.json`
+ ),
'utf-8'
),
packageJsonTemplate: fs.readFileSync(
- path.join(path.dirname(fileURLToPath(import.meta.url)), `packageJsonTemplate.json`),
+ path.join(
+ path.dirname(fileURLToPath(import.meta.url)),
+ `packageJsonTemplate.json`
+ ),
'utf-8'
),
}
@@ -144,9 +150,4 @@ const mockReleaseSchedule = () => nock => {
.reply(200, schedule)
}
-export {
- mockPackageData,
- mockCurrentSha,
- mockVersionsSha,
- mockReleaseSchedule,
-};
+export { mockPackageData, mockCurrentSha, mockVersionsSha, mockReleaseSchedule }
diff --git a/services/nodeping/nodeping-status.service.js b/services/nodeping/nodeping-status.service.js
index 5461f6fd573fa..32d145b995fed 100644
--- a/services/nodeping/nodeping-status.service.js
+++ b/services/nodeping/nodeping-status.service.js
@@ -1,6 +1,10 @@
-import Joi from 'joi';
-import {queryParamSchema, exampleQueryParams, renderWebsiteStatus} from '../website-status.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import {
+ queryParamSchema,
+ exampleQueryParams,
+ renderWebsiteStatus,
+} from '../website-status.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.array()
.items(Joi.object().keys({ su: Joi.boolean() }))
@@ -63,4 +67,4 @@ export default class NodePingStatus extends BaseJsonService {
downColor,
})
}
-};
+}
diff --git a/services/nodeping/nodeping-status.tester.js b/services/nodeping/nodeping-status.tester.js
index 16a73d72256d6..6361cb99ce305 100644
--- a/services/nodeping/nodeping-status.tester.js
+++ b/services/nodeping/nodeping-status.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('NodePing status')
diff --git a/services/nodeping/nodeping-uptime.service.js b/services/nodeping/nodeping-uptime.service.js
index 92b4240af56ac..827ac7b6a826d 100644
--- a/services/nodeping/nodeping-uptime.service.js
+++ b/services/nodeping/nodeping-uptime.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {colorScale} from '../color-formatters.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { colorScale } from '../color-formatters.js'
+import { BaseJsonService } from '../index.js'
const colorFormatter = colorScale([99, 99.5, 100])
@@ -74,4 +74,4 @@ export default class NodePingUptime extends BaseJsonService {
const { uptime } = await this.fetch({ checkUuid })
return this.constructor.render({ uptime })
}
-};
+}
diff --git a/services/nodeping/nodeping-uptime.tester.js b/services/nodeping/nodeping-uptime.tester.js
index 2dbc6b055c0bf..5e09a52eca4ac 100644
--- a/services/nodeping/nodeping-uptime.tester.js
+++ b/services/nodeping/nodeping-uptime.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isPercentage} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isPercentage } from '../test-validators.js'
export const t = await createServiceTester()
t.create('NodePing uptime')
diff --git a/services/npm/npm-base.js b/services/npm/npm-base.js
index a2656cadbadca..7f8ed6cbc2ca3 100644
--- a/services/npm/npm-base.js
+++ b/services/npm/npm-base.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {optionalUrl} from '../validators.js';
-import {isDependencyMap} from '../package-json-helpers.js';
-import {BaseJsonService, InvalidResponse, NotFound} from '../index.js';
+import Joi from 'joi'
+import { optionalUrl } from '../validators.js'
+import { isDependencyMap } from '../package-json-helpers.js'
+import { BaseJsonService, InvalidResponse, NotFound } from '../index.js'
const deprecatedLicenseObjectSchema = Joi.object({
type: Joi.string().required(),
@@ -32,7 +32,7 @@ const packageDataSchema = Joi.object({
export const queryParamSchema = Joi.object({
registry_uri: optionalUrl,
-}).required();
+}).required()
// Abstract class for NPM badges which display data about the latest version
// of a package.
@@ -140,4 +140,4 @@ export default class NpmBase extends BaseJsonService {
return this.constructor._validate(packageData, packageDataSchema)
}
-};
+}
diff --git a/services/npm/npm-base.spec.js b/services/npm/npm-base.spec.js
index f69040f7d19a5..1d68e226d027c 100644
--- a/services/npm/npm-base.spec.js
+++ b/services/npm/npm-base.spec.js
@@ -1,8 +1,8 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
// use NPM Version as an example implementation of NpmBase for this test
-import NpmVersion from './npm-version.service.js';
+import NpmVersion from './npm-version.service.js'
describe('npm', function () {
describe('auth', function () {
diff --git a/services/npm/npm-collaborators.service.js b/services/npm/npm-collaborators.service.js
index 9c430a5fad972..3c277b58c6f0f 100644
--- a/services/npm/npm-collaborators.service.js
+++ b/services/npm/npm-collaborators.service.js
@@ -1,5 +1,5 @@
-import {renderContributorBadge} from '../contributor-count.js';
-import NpmBase from './npm-base.js';
+import { renderContributorBadge } from '../contributor-count.js'
+import NpmBase from './npm-base.js'
const keywords = ['node']
@@ -47,4 +47,4 @@ export default class NpmCollaborators extends NpmBase {
const collaborators = maintainers.length
return this.constructor.render({ collaborators })
}
-};
+}
diff --git a/services/npm/npm-collaborators.tester.js b/services/npm/npm-collaborators.tester.js
index 9f40bdfaa09c7..90488d5e85366 100644
--- a/services/npm/npm-collaborators.tester.js
+++ b/services/npm/npm-collaborators.tester.js
@@ -1,5 +1,5 @@
-import {nonNegativeInteger} from '../validators.js';
-import {createServiceTester} from '../tester.js'
+import { nonNegativeInteger } from '../validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets the contributor count')
diff --git a/services/npm/npm-dependency-version.service.js b/services/npm/npm-dependency-version.service.js
index 77b38a63c335b..916a5d7e0a0a9 100644
--- a/services/npm/npm-dependency-version.service.js
+++ b/services/npm/npm-dependency-version.service.js
@@ -1,5 +1,5 @@
-import {getDependencyVersion} from '../package-json-helpers.js';
-import NpmBase from './npm-base.js';
+import { getDependencyVersion } from '../package-json-helpers.js'
+import NpmBase from './npm-base.js'
const { queryParamSchema } = NpmBase
const keywords = ['node']
@@ -140,4 +140,4 @@ export default class NpmDependencyVersion extends NpmBase {
range,
})
}
-};
+}
diff --git a/services/npm/npm-dependency-version.tester.js b/services/npm/npm-dependency-version.tester.js
index 191f54c4de059..864c4d6b15e7f 100644
--- a/services/npm/npm-dependency-version.tester.js
+++ b/services/npm/npm-dependency-version.tester.js
@@ -1,5 +1,5 @@
-import {semverRange} from '../validators.js';
-import {createServiceTester} from '../tester.js'
+import { semverRange } from '../validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets the peer dependency version')
diff --git a/services/npm/npm-downloads.service.js b/services/npm/npm-downloads.service.js
index fd03ce813bf88..ca01fae33f147 100644
--- a/services/npm/npm-downloads.service.js
+++ b/services/npm/npm-downloads.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
// https://github.com/npm/registry/blob/master/docs/download-counts.md#output
const pointResponseSchema = Joi.object({
@@ -86,4 +86,4 @@ export default class NpmDownloads extends BaseJsonService {
return this.constructor.render({ interval, downloadCount })
}
-};
+}
diff --git a/services/npm/npm-downloads.spec.js b/services/npm/npm-downloads.spec.js
index 33e67646fd5e8..edb9854226272 100644
--- a/services/npm/npm-downloads.spec.js
+++ b/services/npm/npm-downloads.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import NpmDownloads from './npm-downloads.service.js';
+import { test, given } from 'sazerac'
+import NpmDownloads from './npm-downloads.service.js'
describe('NpmDownloads', function () {
test(NpmDownloads._intervalMap.dt.transform, () => {
diff --git a/services/npm/npm-downloads.tester.js b/services/npm/npm-downloads.tester.js
index 8e8389c964092..4ff67bad94be1 100644
--- a/services/npm/npm-downloads.tester.js
+++ b/services/npm/npm-downloads.tester.js
@@ -1,5 +1,5 @@
-import {isMetricOverTimePeriod, isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetricOverTimePeriod, isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('weekly downloads of left-pad').get('/dw/left-pad.json').expectBadge({
diff --git a/services/npm/npm-license.service.js b/services/npm/npm-license.service.js
index a4030cf55dd2f..ed354e28b8e03 100644
--- a/services/npm/npm-license.service.js
+++ b/services/npm/npm-license.service.js
@@ -1,6 +1,6 @@
-import {renderLicenseBadge} from '../licenses.js';
-import toArray from '../../core/base-service/to-array.js';
-import NpmBase from './npm-base.js';
+import { renderLicenseBadge } from '../licenses.js'
+import toArray from '../../core/base-service/to-array.js'
+import NpmBase from './npm-base.js'
export default class NpmLicense extends NpmBase {
static category = 'license'
@@ -44,4 +44,4 @@ export default class NpmLicense extends NpmBase {
)
return this.constructor.render({ licenses })
}
-};
+}
diff --git a/services/npm/npm-license.tester.js b/services/npm/npm-license.tester.js
index e600d933f0edd..a06aef4774ae1 100644
--- a/services/npm/npm-license.tester.js
+++ b/services/npm/npm-license.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets the license of express')
diff --git a/services/npm/npm-type-definitions.service.js b/services/npm/npm-type-definitions.service.js
index 1d62485b147ab..9120b24593cae 100644
--- a/services/npm/npm-type-definitions.service.js
+++ b/services/npm/npm-type-definitions.service.js
@@ -1,4 +1,4 @@
-import NpmBase from './npm-base.js';
+import NpmBase from './npm-base.js'
// For this badge to correctly detect type definitions, either the relevant
// dependencies must be declared, or the `types` key must be set in
@@ -70,4 +70,4 @@ export default class NpmTypeDefinitions extends NpmBase {
const props = this.constructor.transform(json)
return this.constructor.render(props)
}
-};
+}
diff --git a/services/npm/npm-type-definitions.spec.js b/services/npm/npm-type-definitions.spec.js
index c5e0f1459dc70..69c4f3d45af9f 100644
--- a/services/npm/npm-type-definitions.spec.js
+++ b/services/npm/npm-type-definitions.spec.js
@@ -1,5 +1,5 @@
-import {test, given, forCases} from 'sazerac';
-import NpmTypeDefinitions from './npm-type-definitions.service.js';
+import { test, given, forCases } from 'sazerac'
+import NpmTypeDefinitions from './npm-type-definitions.service.js'
describe('NPM type definitions badge', function () {
test(NpmTypeDefinitions.transform, () => {
diff --git a/services/npm/npm-type-definitions.tester.js b/services/npm/npm-type-definitions.tester.js
index ba32c98563a24..60cadb61fac11 100644
--- a/services/npm/npm-type-definitions.tester.js
+++ b/services/npm/npm-type-definitions.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isTypeDefinition = Joi.string().regex(
diff --git a/services/npm/npm-version.service.js b/services/npm/npm-version.service.js
index c6f6f21909e13..95abd88a6c825 100644
--- a/services/npm/npm-version.service.js
+++ b/services/npm/npm-version.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {NotFound} from '../index.js';
-import NpmBase from './npm-base.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { NotFound } from '../index.js'
+import NpmBase from './npm-base.js'
const keywords = ['node']
@@ -92,4 +92,4 @@ export default class NpmVersion extends NpmBase {
version: packageData[tag || 'latest'],
})
}
-};
+}
diff --git a/services/npm/npm-version.tester.js b/services/npm/npm-version.tester.js
index 0f2bda1582763..a7f3d06a2e5ef 100644
--- a/services/npm/npm-version.tester.js
+++ b/services/npm/npm-version.tester.js
@@ -1,5 +1,5 @@
-import {isSemver} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isSemver } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets the package version of left-pad')
diff --git a/services/nsp/nsp.service.js b/services/nsp/nsp.service.js
index d9189cee000fa..63671c181ac0e 100644
--- a/services/nsp/nsp.service.js
+++ b/services/nsp/nsp.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
route: {
@@ -8,4 +8,4 @@ export default deprecatedService({
label: 'nsp',
category: 'other',
dateAdded: new Date('2018-12-13'),
-});
+})
diff --git a/services/nsp/nsp.tester.js b/services/nsp/nsp.tester.js
index 1c42eee5e60f0..c7c8a198ab554 100644
--- a/services/nsp/nsp.tester.js
+++ b/services/nsp/nsp.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'nsp',
diff --git a/services/nuget-fixtures.js b/services/nuget-fixtures.js
index 0b34d0e9e65f0..919cdd3b0bcf4 100644
--- a/services/nuget-fixtures.js
+++ b/services/nuget-fixtures.js
@@ -54,4 +54,4 @@ export {
nuGetV3VersionJsonFirstCharZero,
nuGetV3VersionJsonFirstCharNotZero,
nuGetV3VersionJsonBuildMetadataWithDash,
-};
+}
diff --git a/services/nuget/nuget-helpers.js b/services/nuget/nuget-helpers.js
index 753da5353c971..d39fbe4348869 100644
--- a/services/nuget/nuget-helpers.js
+++ b/services/nuget/nuget-helpers.js
@@ -1,8 +1,8 @@
-import {promisify} from 'util';
-import semver from 'semver';
-import {metric, addv} from '../text-formatters.js';
-import {downloadCount as downloadCountColor} from '../color-formatters.js';
-import {regularUpdate} from '../../core/legacy/regular-update.js';
+import { promisify } from 'util'
+import semver from 'semver'
+import { metric, addv } from '../text-formatters.js'
+import { downloadCount as downloadCountColor } from '../color-formatters.js'
+import { regularUpdate } from '../../core/legacy/regular-update.js'
function renderVersionBadge({ version, feed }) {
let color
@@ -108,4 +108,4 @@ export {
searchServiceUrl,
stripBuildMetadata,
selectVersion,
-};
+}
diff --git a/services/nuget/nuget-helpers.spec.js b/services/nuget/nuget-helpers.spec.js
index bd96935a6a18d..a5e316490d461 100644
--- a/services/nuget/nuget-helpers.spec.js
+++ b/services/nuget/nuget-helpers.spec.js
@@ -1,5 +1,10 @@
-import {test, given} from 'sazerac';
-import {renderVersionBadge, odataToObject, stripBuildMetadata, selectVersion} from './nuget-helpers.js';
+import { test, given } from 'sazerac'
+import {
+ renderVersionBadge,
+ odataToObject,
+ stripBuildMetadata,
+ selectVersion,
+} from './nuget-helpers.js'
describe('NuGet helpers', function () {
test(renderVersionBadge, () => {
diff --git a/services/nuget/nuget-v2-service-family.js b/services/nuget/nuget-v2-service-family.js
index 6a2abf558476f..b950a1ed2b6ea 100644
--- a/services/nuget/nuget-v2-service-family.js
+++ b/services/nuget/nuget-v2-service-family.js
@@ -1,7 +1,16 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, BaseXmlService, NotFound, redirector} from '../index.js';
-import {renderVersionBadge, renderDownloadBadge, odataToObject} from './nuget-helpers.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import {
+ BaseJsonService,
+ BaseXmlService,
+ NotFound,
+ redirector,
+} from '../index.js'
+import {
+ renderVersionBadge,
+ renderDownloadBadge,
+ odataToObject,
+} from './nuget-helpers.js'
function createFilter({ packageName, includePrereleases }) {
const releaseTypeFilter = includePrereleases
@@ -218,8 +227,4 @@ function createServiceFamily({
return { NugetVersionService, NugetVersionRedirector, NugetDownloadService }
}
-export {
- createFilter,
- fetch,
- createServiceFamily,
-};
+export { createFilter, fetch, createServiceFamily }
diff --git a/services/nuget/nuget-v3-service-family.js b/services/nuget/nuget-v3-service-family.js
index 8569f8b681f43..3a06cd297e84d 100644
--- a/services/nuget/nuget-v3-service-family.js
+++ b/services/nuget/nuget-v3-service-family.js
@@ -1,7 +1,13 @@
-import Joi from 'joi';
-import RouteBuilder from '../route-builder.js';
-import {BaseJsonService, NotFound} from '../index.js';
-import {renderVersionBadge, renderDownloadBadge, searchServiceUrl, stripBuildMetadata, selectVersion} from './nuget-helpers.js';
+import Joi from 'joi'
+import RouteBuilder from '../route-builder.js'
+import { BaseJsonService, NotFound } from '../index.js'
+import {
+ renderVersionBadge,
+ renderDownloadBadge,
+ searchServiceUrl,
+ stripBuildMetadata,
+ selectVersion,
+} from './nuget-helpers.js'
/*
* Build the Shields service URL object for the given service configuration. Return
@@ -205,6 +211,4 @@ function createServiceFamily({
}
}
-export {
- createServiceFamily,
-};
+export { createServiceFamily }
diff --git a/services/nuget/nuget-v3-service-family.spec.js b/services/nuget/nuget-v3-service-family.spec.js
index 41e616a5ca3a7..a6e49f6b6cb46 100644
--- a/services/nuget/nuget-v3-service-family.spec.js
+++ b/services/nuget/nuget-v3-service-family.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import {createServiceFamily} from './nuget-v3-service-family.js';
+import { test, given } from 'sazerac'
+import { createServiceFamily } from './nuget-v3-service-family.js'
const { NugetVersionService, NugetDownloadService } = createServiceFamily({
defaultLabel: 'nuget',
diff --git a/services/nuget/nuget.service.js b/services/nuget/nuget.service.js
index a0da143a69233..a05bbc3079075 100644
--- a/services/nuget/nuget.service.js
+++ b/services/nuget/nuget.service.js
@@ -1,4 +1,4 @@
-import {createServiceFamily} from './nuget-v3-service-family.js';
+import { createServiceFamily } from './nuget-v3-service-family.js'
const { NugetVersionService: Version, NugetDownloadService: Downloads } =
createServiceFamily({
@@ -37,4 +37,4 @@ class NugetDownloadService extends Downloads {
]
}
-export { NugetVersionService, NugetDownloadService };
+export { NugetVersionService, NugetDownloadService }
diff --git a/services/nuget/nuget.tester.js b/services/nuget/nuget.tester.js
index 1ab349eecfe5f..65878d6a11edd 100644
--- a/services/nuget/nuget.tester.js
+++ b/services/nuget/nuget.tester.js
@@ -1,7 +1,17 @@
-import {ServiceTester} from '../tester.js';
-import {isMetric, isVPlusDottedVersionNClauses, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
-import {queryIndex, nuGetV3VersionJsonWithDash, nuGetV3VersionJsonFirstCharZero, nuGetV3VersionJsonFirstCharNotZero, nuGetV3VersionJsonBuildMetadataWithDash} from '../nuget-fixtures.js';
-import {invalidJSON} from '../response-fixtures.js';
+import { ServiceTester } from '../tester.js'
+import {
+ isMetric,
+ isVPlusDottedVersionNClauses,
+ isVPlusDottedVersionNClausesWithOptionalSuffix,
+} from '../test-validators.js'
+import {
+ queryIndex,
+ nuGetV3VersionJsonWithDash,
+ nuGetV3VersionJsonFirstCharZero,
+ nuGetV3VersionJsonFirstCharNotZero,
+ nuGetV3VersionJsonBuildMetadataWithDash,
+} from '../nuget-fixtures.js'
+import { invalidJSON } from '../response-fixtures.js'
export const t = new ServiceTester({ id: 'nuget', title: 'NuGet' })
diff --git a/services/nycrc/nycrc.service.js b/services/nycrc/nycrc.service.js
index b08d6a8dfd377..1e4405e1b64e8 100644
--- a/services/nycrc/nycrc.service.js
+++ b/services/nycrc/nycrc.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {coveragePercentage} from '../color-formatters.js';
-import {ConditionalGithubAuthV3Service} from '../github/github-auth-service.js';
-import {fetchJsonFromRepo} from '../github/github-common-fetch.js';
-import {InvalidParameter, InvalidResponse, NotFound} from '../index.js';
+import Joi from 'joi'
+import { coveragePercentage } from '../color-formatters.js'
+import { ConditionalGithubAuthV3Service } from '../github/github-auth-service.js'
+import { fetchJsonFromRepo } from '../github/github-common-fetch.js'
+import { InvalidParameter, InvalidResponse, NotFound } from '../index.js'
const nycrcSchema = Joi.object({
branches: Joi.number().min(0).max(100),
@@ -127,4 +127,4 @@ export default class Nycrc extends ConditionalGithubAuthV3Service {
}
return this.constructor.render({ coverage })
}
-};
+}
diff --git a/services/nycrc/nycrc.tester.js b/services/nycrc/nycrc.tester.js
index 11e05513934de..66894780a8df9 100644
--- a/services/nycrc/nycrc.tester.js
+++ b/services/nycrc/nycrc.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('valid .nycrc')
diff --git a/services/offset-earth/offset-earth-carbon-redirect.service.js b/services/offset-earth/offset-earth-carbon-redirect.service.js
index 26f284e81cfde..ccbabfab208fc 100644
--- a/services/offset-earth/offset-earth-carbon-redirect.service.js
+++ b/services/offset-earth/offset-earth-carbon-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
// https://github.com/badges/shields/issues/5433
@@ -12,4 +12,4 @@ export default [
transformPath: ({ username }) => `/ecologi/carbon/${username}`,
dateAdded: new Date('2020-08-16'),
}),
-];
+]
diff --git a/services/offset-earth/offset-earth-carbon-redirect.tester.js b/services/offset-earth/offset-earth-carbon-redirect.tester.js
index 7dfa632c7ad61..66e171d95215b 100644
--- a/services/offset-earth/offset-earth-carbon-redirect.tester.js
+++ b/services/offset-earth/offset-earth-carbon-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'OffsetEarthCarbonRedirect',
diff --git a/services/offset-earth/offset-earth-trees-redirect.service.js b/services/offset-earth/offset-earth-trees-redirect.service.js
index cd29c30c9dc5f..bdc3b16c64d71 100644
--- a/services/offset-earth/offset-earth-trees-redirect.service.js
+++ b/services/offset-earth/offset-earth-trees-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
// https://github.com/badges/shields/issues/5433
@@ -12,4 +12,4 @@ export default [
transformPath: ({ username }) => `/ecologi/trees/${username}`,
dateAdded: new Date('2020-08-16'),
}),
-];
+]
diff --git a/services/offset-earth/offset-earth-trees-redirect.tester.js b/services/offset-earth/offset-earth-trees-redirect.tester.js
index 6b92b56025d4f..eea1a2098e2a4 100644
--- a/services/offset-earth/offset-earth-trees-redirect.tester.js
+++ b/services/offset-earth/offset-earth-trees-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'OffsetEarthTreesRedirect',
diff --git a/services/open-vsx/open-vsx-base.js b/services/open-vsx/open-vsx-base.js
index 1b069ac78889a..d17a1e66a8cf7 100644
--- a/services/open-vsx/open-vsx-base.js
+++ b/services/open-vsx/open-vsx-base.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {optionalNonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { optionalNonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const extensionQuerySchema = Joi.object({
error: Joi.string(),
@@ -40,4 +40,4 @@ export default class OpenVSXBase extends BaseJsonService {
},
})
}
-};
+}
diff --git a/services/open-vsx/open-vsx-downloads.service.js b/services/open-vsx/open-vsx-downloads.service.js
index 90b65b00a6b0f..b1d86ec4dccad 100644
--- a/services/open-vsx/open-vsx-downloads.service.js
+++ b/services/open-vsx/open-vsx-downloads.service.js
@@ -1,6 +1,6 @@
-import {metric} from '../text-formatters.js';
-import {downloadCount} from '../color-formatters.js';
-import OpenVSXBase from './open-vsx-base.js';
+import { metric } from '../text-formatters.js'
+import { downloadCount } from '../color-formatters.js'
+import OpenVSXBase from './open-vsx-base.js'
export default class OpenVSXDownloads extends OpenVSXBase {
static category = 'downloads'
@@ -55,4 +55,4 @@ export default class OpenVSXDownloads extends OpenVSXBase {
downloads: downloadCount,
})
}
-};
+}
diff --git a/services/open-vsx/open-vsx-downloads.tester.js b/services/open-vsx/open-vsx-downloads.tester.js
index 9ef3c2c7df79d..72da704337d0f 100644
--- a/services/open-vsx/open-vsx-downloads.tester.js
+++ b/services/open-vsx/open-vsx-downloads.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {withRegex, isMetric} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { withRegex, isMetric } from '../test-validators.js'
export const t = await createServiceTester()
const isVersionLabel = withRegex(/^downloads@(\d+\.\d+\.\d+)(\.\d+)?$/)
diff --git a/services/open-vsx/open-vsx-rating.service.js b/services/open-vsx/open-vsx-rating.service.js
index e6e5eab06d159..ae5702c0f10a0 100644
--- a/services/open-vsx/open-vsx-rating.service.js
+++ b/services/open-vsx/open-vsx-rating.service.js
@@ -1,6 +1,6 @@
-import {starRating} from '../text-formatters.js';
-import {floorCount} from '../color-formatters.js';
-import OpenVSXBase from './open-vsx-base.js';
+import { starRating } from '../text-formatters.js'
+import { floorCount } from '../color-formatters.js'
+import OpenVSXBase from './open-vsx-base.js'
export default class OpenVSXRating extends OpenVSXBase {
static category = 'rating'
@@ -75,4 +75,4 @@ export default class OpenVSXRating extends OpenVSXBase {
ratingCount: reviewCount,
})
}
-};
+}
diff --git a/services/open-vsx/open-vsx-rating.spec.js b/services/open-vsx/open-vsx-rating.spec.js
index 2ca8131ff7455..8dc1ec0c286aa 100644
--- a/services/open-vsx/open-vsx-rating.spec.js
+++ b/services/open-vsx/open-vsx-rating.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import OpenVSXRating from './open-vsx-rating.service.js';
+import { test, given } from 'sazerac'
+import OpenVSXRating from './open-vsx-rating.service.js'
describe('OpenVSXRating', function () {
test(OpenVSXRating.render, () => {
diff --git a/services/open-vsx/open-vsx-rating.tester.js b/services/open-vsx/open-vsx-rating.tester.js
index d37f6d20412b6..a007432b78bb4 100644
--- a/services/open-vsx/open-vsx-rating.tester.js
+++ b/services/open-vsx/open-vsx-rating.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {withRegex, isStarRating} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { withRegex, isStarRating } from '../test-validators.js'
export const t = await createServiceTester()
const isVscodeRating = withRegex(/[0-5]\.[0-9]{1}\/5?\s*\([0-9]*\)$/)
diff --git a/services/open-vsx/open-vsx-release-date.service.js b/services/open-vsx/open-vsx-release-date.service.js
index b75a6ee27579c..c201306c8eb6a 100644
--- a/services/open-vsx/open-vsx-release-date.service.js
+++ b/services/open-vsx/open-vsx-release-date.service.js
@@ -1,6 +1,6 @@
-import {age} from '../color-formatters.js';
-import {formatDate} from '../text-formatters.js';
-import OpenVSXBase from './open-vsx-base.js';
+import { age } from '../color-formatters.js'
+import { formatDate } from '../text-formatters.js'
+import OpenVSXBase from './open-vsx-base.js'
export default class OpenVSXReleaseDate extends OpenVSXBase {
static category = 'activity'
@@ -39,4 +39,4 @@ export default class OpenVSXReleaseDate extends OpenVSXBase {
releaseDate: timestamp,
})
}
-};
+}
diff --git a/services/open-vsx/open-vsx-release-date.tester.js b/services/open-vsx/open-vsx-release-date.tester.js
index 05bb2281aadb2..2f3649d3ad60e 100644
--- a/services/open-vsx/open-vsx-release-date.tester.js
+++ b/services/open-vsx/open-vsx-release-date.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isFormattedDate} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isFormattedDate } from '../test-validators.js'
export const t = await createServiceTester()
t.create('release date invalid extension')
diff --git a/services/open-vsx/open-vsx-version.service.js b/services/open-vsx/open-vsx-version.service.js
index 8c32f8b63ab9a..45f342a94c4e0 100644
--- a/services/open-vsx/open-vsx-version.service.js
+++ b/services/open-vsx/open-vsx-version.service.js
@@ -1,5 +1,5 @@
-import {renderVersionBadge} from '../version.js';
-import OpenVSXBase from './open-vsx-base.js';
+import { renderVersionBadge } from '../version.js'
+import OpenVSXBase from './open-vsx-base.js'
export default class OpenVSXVersion extends OpenVSXBase {
static category = 'version'
@@ -26,4 +26,4 @@ export default class OpenVSXVersion extends OpenVSXBase {
const { version } = await this.fetch({ namespace, extension })
return this.constructor.render({ version })
}
-};
+}
diff --git a/services/open-vsx/open-vsx-version.tester.js b/services/open-vsx/open-vsx-version.tester.js
index 64539f67808cb..ee3bc1a18a161 100644
--- a/services/open-vsx/open-vsx-version.tester.js
+++ b/services/open-vsx/open-vsx-version.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {withRegex} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { withRegex } from '../test-validators.js'
export const t = await createServiceTester()
const isVersion = withRegex(/^v(\d+\.\d+\.\d+)(\.\d+)?$/)
diff --git a/services/opencollective/opencollective-all.service.js b/services/opencollective/opencollective-all.service.js
index 2221a4349ae6c..dac3229f97791 100644
--- a/services/opencollective/opencollective-all.service.js
+++ b/services/opencollective/opencollective-all.service.js
@@ -1,4 +1,4 @@
-import OpencollectiveBase from './opencollective-base.js';
+import OpencollectiveBase from './opencollective-base.js'
export default class OpencollectiveAll extends OpencollectiveBase {
static route = this.buildRoute('all')
@@ -20,4 +20,4 @@ export default class OpencollectiveAll extends OpencollectiveBase {
const { backersCount } = await this.fetchCollectiveInfo(collective)
return this.constructor.render(backersCount)
}
-};
+}
diff --git a/services/opencollective/opencollective-all.tester.js b/services/opencollective/opencollective-all.tester.js
index fdaab6d9a5a43..d827313c509ad 100644
--- a/services/opencollective/opencollective-all.tester.js
+++ b/services/opencollective/opencollective-all.tester.js
@@ -1,5 +1,5 @@
-import {nonNegativeInteger} from '../validators.js';
-import {createServiceTester} from '../tester.js'
+import { nonNegativeInteger } from '../validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('renders correctly')
diff --git a/services/opencollective/opencollective-backers.service.js b/services/opencollective/opencollective-backers.service.js
index 991c7d477982e..3f2b7da4d7541 100644
--- a/services/opencollective/opencollective-backers.service.js
+++ b/services/opencollective/opencollective-backers.service.js
@@ -1,4 +1,4 @@
-import OpencollectiveBase from './opencollective-base.js';
+import OpencollectiveBase from './opencollective-base.js'
export default class OpencollectiveBackers extends OpencollectiveBase {
static route = this.buildRoute('backers')
@@ -23,4 +23,4 @@ export default class OpencollectiveBackers extends OpencollectiveBase {
)
return this.constructor.render(backersCount)
}
-};
+}
diff --git a/services/opencollective/opencollective-backers.tester.js b/services/opencollective/opencollective-backers.tester.js
index 4b40d276a74ec..7163f9a5da4ce 100644
--- a/services/opencollective/opencollective-backers.tester.js
+++ b/services/opencollective/opencollective-backers.tester.js
@@ -1,5 +1,5 @@
-import {nonNegativeInteger} from '../validators.js';
-import {createServiceTester} from '../tester.js'
+import { nonNegativeInteger } from '../validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('renders correctly')
diff --git a/services/opencollective/opencollective-base.js b/services/opencollective/opencollective-base.js
index f6f8e96177d0c..ec92f434e2808 100644
--- a/services/opencollective/opencollective-base.js
+++ b/services/opencollective/opencollective-base.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
// https://developer.opencollective.com/#/api/collectives?id=get-info
const collectiveDetailsSchema = Joi.object().keys({
@@ -79,4 +79,4 @@ export default class OpencollectiveBase extends BaseJsonService {
result.tier = members.map(member => member.tier)[0]
return result
}
-};
+}
diff --git a/services/opencollective/opencollective-by-tier.service.js b/services/opencollective/opencollective-by-tier.service.js
index b2a140b1cd278..98acc383f509d 100644
--- a/services/opencollective/opencollective-by-tier.service.js
+++ b/services/opencollective/opencollective-by-tier.service.js
@@ -1,4 +1,4 @@
-import OpencollectiveBase from './opencollective-base.js';
+import OpencollectiveBase from './opencollective-base.js'
const documentation = ` According to open collectives documentation, you can find the tierId by looking at the URL after clicking on a Tier Card on the collective page. (e.g. tierId for https://opencollective.com/shields/order/2988 is 2988)
@@ -94,4 +94,4 @@ export default class OssTracker extends BaseService {
})
}
}
-};
+}
diff --git a/services/osslifecycle/osslifecycle.tester.js b/services/osslifecycle/osslifecycle.tester.js
index a2a1248056aa9..9003d2e778d73 100644
--- a/services/osslifecycle/osslifecycle.tester.js
+++ b/services/osslifecycle/osslifecycle.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'osslifecycle',
diff --git a/services/package-json-helpers.js b/services/package-json-helpers.js
index 1d17bb8cba0e2..242243ad07dd3 100644
--- a/services/package-json-helpers.js
+++ b/services/package-json-helpers.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {InvalidParameter} from './index.js';
+import Joi from 'joi'
+import { InvalidParameter } from './index.js'
const isDependencyMap = Joi.object()
.pattern(
@@ -43,8 +43,4 @@ function getDependencyVersion({
return { range }
}
-export {
- isDependencyMap,
- isPackageJsonWithDependencies,
- getDependencyVersion,
-};
+export { isDependencyMap, isPackageJsonWithDependencies, getDependencyVersion }
diff --git a/services/package-json-helpers.spec.js b/services/package-json-helpers.spec.js
index 2e46c419ad19a..4cdd60741b4a4 100644
--- a/services/package-json-helpers.spec.js
+++ b/services/package-json-helpers.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import {getDependencyVersion} from './package-json-helpers.js';
+import { test, given } from 'sazerac'
+import { getDependencyVersion } from './package-json-helpers.js'
describe('Contributor count helpers', function () {
test(getDependencyVersion, () => {
diff --git a/services/packagecontrol/packagecontrol.service.js b/services/packagecontrol/packagecontrol.service.js
index c0c3752f46123..8189054d8b7fa 100644
--- a/services/packagecontrol/packagecontrol.service.js
+++ b/services/packagecontrol/packagecontrol.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {downloadCount} from '../color-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { downloadCount } from '../color-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const keywords = ['sublime', 'sublimetext', 'packagecontrol']
@@ -114,4 +114,4 @@ function DownloadsForInterval(interval) {
}
}
-export default ['day', 'week', 'month', 'total'].map(DownloadsForInterval);
+export default ['day', 'week', 'month', 'total'].map(DownloadsForInterval)
diff --git a/services/packagecontrol/packagecontrol.tester.js b/services/packagecontrol/packagecontrol.tester.js
index 3ff353fdbfaae..db61cf1251414 100644
--- a/services/packagecontrol/packagecontrol.tester.js
+++ b/services/packagecontrol/packagecontrol.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isMetric, isMetricOverTimePeriod} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isMetric, isMetricOverTimePeriod } from '../test-validators.js'
export const t = new ServiceTester({
id: 'packagecontrol',
diff --git a/services/packagist/packagist-base.js b/services/packagist/packagist-base.js
index 53fafe00577ce..083de17bdf102 100644
--- a/services/packagist/packagist-base.js
+++ b/services/packagist/packagist-base.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const packageSchema = Joi.object()
.pattern(
@@ -105,4 +105,4 @@ export {
BasePackagistService,
customServerDocumentationFragment,
cacheDocumentationFragment,
-};
+}
diff --git a/services/packagist/packagist-downloads.service.js b/services/packagist/packagist-downloads.service.js
index ba1a1b49144f3..5d8f133b026ec 100644
--- a/services/packagist/packagist-downloads.service.js
+++ b/services/packagist/packagist-downloads.service.js
@@ -1,8 +1,13 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {downloadCount} from '../color-formatters.js';
-import {optionalUrl} from '../validators.js';
-import {keywords, BasePackagistService, customServerDocumentationFragment, cacheDocumentationFragment} from './packagist-base.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { downloadCount } from '../color-formatters.js'
+import { optionalUrl } from '../validators.js'
+import {
+ keywords,
+ BasePackagistService,
+ customServerDocumentationFragment,
+ cacheDocumentationFragment,
+} from './packagist-base.js'
const periodMap = {
dm: {
@@ -96,4 +101,4 @@ export default class PackagistDownloads extends BasePackagistService {
interval,
})
}
-};
+}
diff --git a/services/packagist/packagist-downloads.tester.js b/services/packagist/packagist-downloads.tester.js
index c9daf2a44fe02..ee76c04e3f3cb 100644
--- a/services/packagist/packagist-downloads.tester.js
+++ b/services/packagist/packagist-downloads.tester.js
@@ -1,5 +1,5 @@
-import {isMetric, isMetricOverTimePeriod} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric, isMetricOverTimePeriod } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('daily downloads (valid, no package version specified)')
diff --git a/services/packagist/packagist-license.service.js b/services/packagist/packagist-license.service.js
index 65f55817323dd..241d9a291908e 100644
--- a/services/packagist/packagist-license.service.js
+++ b/services/packagist/packagist-license.service.js
@@ -1,8 +1,12 @@
-import Joi from 'joi';
-import {renderLicenseBadge} from '../licenses.js';
-import {optionalUrl} from '../validators.js';
-import {NotFound} from '../index.js';
-import {keywords, BasePackagistService, customServerDocumentationFragment} from './packagist-base.js';
+import Joi from 'joi'
+import { renderLicenseBadge } from '../licenses.js'
+import { optionalUrl } from '../validators.js'
+import { NotFound } from '../index.js'
+import {
+ keywords,
+ BasePackagistService,
+ customServerDocumentationFragment,
+} from './packagist-base.js'
const packageSchema = Joi.object()
.pattern(
@@ -66,4 +70,4 @@ export default class PackagistLicense extends BasePackagistService {
const { license } = this.transform({ json, user, repo })
return renderLicenseBadge({ license })
}
-};
+}
diff --git a/services/packagist/packagist-license.spec.js b/services/packagist/packagist-license.spec.js
index fce371877dca9..8c3aaf1d79ea2 100644
--- a/services/packagist/packagist-license.spec.js
+++ b/services/packagist/packagist-license.spec.js
@@ -1,6 +1,6 @@
-import {expect} from 'chai';
-import {NotFound} from '../index.js';
-import PackagistLicense from './packagist-license.service.js';
+import { expect } from 'chai'
+import { NotFound } from '../index.js'
+import PackagistLicense from './packagist-license.service.js'
describe('PackagistLicense', function () {
it('should throw NotFound when default branch is missing', function () {
diff --git a/services/packagist/packagist-license.tester.js b/services/packagist/packagist-license.tester.js
index 6d5093c8c0f00..a9f3ef370bcb2 100644
--- a/services/packagist/packagist-license.tester.js
+++ b/services/packagist/packagist-license.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('license (valid)')
diff --git a/services/packagist/packagist-php-version.service.js b/services/packagist/packagist-php-version.service.js
index b2db629d8fda2..72acd7ad98fce 100644
--- a/services/packagist/packagist-php-version.service.js
+++ b/services/packagist/packagist-php-version.service.js
@@ -1,7 +1,11 @@
-import Joi from 'joi';
-import {optionalUrl} from '../validators.js';
-import {NotFound} from '../index.js';
-import {allVersionsSchema, BasePackagistService, customServerDocumentationFragment} from './packagist-base.js';
+import Joi from 'joi'
+import { optionalUrl } from '../validators.js'
+import { NotFound } from '../index.js'
+import {
+ allVersionsSchema,
+ BasePackagistService,
+ customServerDocumentationFragment,
+} from './packagist-base.js'
const queryParamSchema = Joi.object({
server: optionalUrl,
@@ -94,4 +98,4 @@ export default class PackagistPhpVersion extends BasePackagistService {
})
return this.constructor.render({ php: phpVersion })
}
-};
+}
diff --git a/services/packagist/packagist-php-version.spec.js b/services/packagist/packagist-php-version.spec.js
index 18a2dd6411c2e..1eee30010e1aa 100644
--- a/services/packagist/packagist-php-version.spec.js
+++ b/services/packagist/packagist-php-version.spec.js
@@ -1,6 +1,6 @@
-import {expect} from 'chai';
-import {NotFound} from '../index.js';
-import PackagistPhpVersion from './packagist-php-version.service.js';
+import { expect } from 'chai'
+import { NotFound } from '../index.js'
+import PackagistPhpVersion from './packagist-php-version.service.js'
describe('PackagistPhpVersion', function () {
const json = {
diff --git a/services/packagist/packagist-php-version.tester.js b/services/packagist/packagist-php-version.tester.js
index cd2142bc6347c..c1c6015c3920a 100644
--- a/services/packagist/packagist-php-version.tester.js
+++ b/services/packagist/packagist-php-version.tester.js
@@ -1,5 +1,5 @@
-import {isComposerVersion} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isComposerVersion } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets the package version of symfony')
diff --git a/services/packagist/packagist-stars.service.js b/services/packagist/packagist-stars.service.js
index fff65931ec37d..2b3820ffbcddc 100644
--- a/services/packagist/packagist-stars.service.js
+++ b/services/packagist/packagist-stars.service.js
@@ -1,7 +1,12 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger, optionalUrl} from '../validators.js';
-import {keywords, BasePackagistService, customServerDocumentationFragment, cacheDocumentationFragment} from './packagist-base.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger, optionalUrl } from '../validators.js'
+import {
+ keywords,
+ BasePackagistService,
+ customServerDocumentationFragment,
+ cacheDocumentationFragment,
+} from './packagist-base.js'
const schema = Joi.object({
package: Joi.object({
@@ -71,4 +76,4 @@ export default class PackagistStars extends BasePackagistService {
stars: favers,
})
}
-};
+}
diff --git a/services/packagist/packagist-stars.tester.js b/services/packagist/packagist-stars.tester.js
index f994def8dfdf6..00b1e0cca071b 100644
--- a/services/packagist/packagist-stars.tester.js
+++ b/services/packagist/packagist-stars.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Stars (valid package)').get('/guzzlehttp/guzzle.json').expectBadge({
diff --git a/services/packagist/packagist-version.service.js b/services/packagist/packagist-version.service.js
index 387b5a971c0c8..b20c699206696 100644
--- a/services/packagist/packagist-version.service.js
+++ b/services/packagist/packagist-version.service.js
@@ -1,9 +1,14 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {compare, isStable, latest} from '../php-version.js';
-import {optionalUrl} from '../validators.js';
-import {NotFound, redirector} from '../index.js';
-import {allVersionsSchema, keywords, BasePackagistService, customServerDocumentationFragment} from './packagist-base.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { compare, isStable, latest } from '../php-version.js'
+import { optionalUrl } from '../validators.js'
+import { NotFound, redirector } from '../index.js'
+import {
+ allVersionsSchema,
+ keywords,
+ BasePackagistService,
+ customServerDocumentationFragment,
+} from './packagist-base.js'
const packageSchema = Joi.object()
.pattern(
@@ -141,4 +146,4 @@ const PackagistVersionRedirector = redirector({
dateAdded: new Date('2019-12-15'),
})
-export { PackagistVersion, PackagistVersionRedirector };
+export { PackagistVersion, PackagistVersionRedirector }
diff --git a/services/packagist/packagist-version.tester.js b/services/packagist/packagist-version.tester.js
index 500b35c20acd2..ba2c2797448f2 100644
--- a/services/packagist/packagist-version.tester.js
+++ b/services/packagist/packagist-version.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import Joi from 'joi'
+import { isVPlusDottedVersionNClausesWithOptionalSuffix } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'packagist',
title: 'Packagist Version',
diff --git a/services/php-eye/php-eye-hhvm.service.js b/services/php-eye/php-eye-hhvm.service.js
index bdb2a744df966..1cb7888a4172a 100644
--- a/services/php-eye/php-eye-hhvm.service.js
+++ b/services/php-eye/php-eye-hhvm.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default [
deprecatedService({
@@ -10,4 +10,4 @@ export default [
},
dateAdded: new Date('2018-04-20'),
}),
-];
+]
diff --git a/services/php-eye/php-eye-hhvm.tester.js b/services/php-eye/php-eye-hhvm.tester.js
index b97e2b6557353..c1c7408a945b0 100644
--- a/services/php-eye/php-eye-hhvm.tester.js
+++ b/services/php-eye/php-eye-hhvm.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'hhvm',
diff --git a/services/php-eye/php-eye-php-version.service.js b/services/php-eye/php-eye-php-version.service.js
index 4235c930456e7..42e15f8c864a3 100644
--- a/services/php-eye/php-eye-php-version.service.js
+++ b/services/php-eye/php-eye-php-version.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default [
deprecatedService({
@@ -10,4 +10,4 @@ export default [
},
dateAdded: new Date('2018-04-20'),
}),
-];
+]
diff --git a/services/php-eye/php-eye-php-version.tester.js b/services/php-eye/php-eye-php-version.tester.js
index 4ff362b17acd5..7806d60f67e0c 100644
--- a/services/php-eye/php-eye-php-version.tester.js
+++ b/services/php-eye/php-eye-php-version.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'php-eye',
diff --git a/services/php-version.js b/services/php-version.js
index 53b0e5cfa2bf9..091bca3c8b243 100644
--- a/services/php-version.js
+++ b/services/php-version.js
@@ -3,11 +3,11 @@
* using the algorithm followed by Composer (see
* https://getcomposer.org/doc/04-schema.md#version).
*/
-import {promisify} from 'util';
-import request from 'request';
-import {regularUpdate} from '../core/legacy/regular-update.js';
-import {listCompare} from './version.js';
-import {omitv} from './text-formatters.js';
+import { promisify } from 'util'
+import request from 'request'
+import { regularUpdate } from '../core/legacy/regular-update.js'
+import { listCompare } from './version.js'
+import { omitv } from './text-formatters.js'
// Return a negative value if v1 < v2,
// zero if v1 = v2, a positive value otherwise.
@@ -235,7 +235,7 @@ async function getPhpReleases(githubApiProvider) {
),
request: (url, options, cb) =>
githubApiProvider.request(request, url, {}, cb),
- });
+ })
}
export {
@@ -245,4 +245,4 @@ export {
minorVersion,
versionReduction,
getPhpReleases,
-};
+}
diff --git a/services/php-version.spec.js b/services/php-version.spec.js
index 81eaa4763a96f..2ccd237dd3b25 100644
--- a/services/php-version.spec.js
+++ b/services/php-version.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import {compare, minorVersion, versionReduction} from './php-version.js';
+import { test, given } from 'sazerac'
+import { compare, minorVersion, versionReduction } from './php-version.js'
const phpReleases = [
'5.0',
diff --git a/services/pingpong/pingpong-status.service.js b/services/pingpong/pingpong-status.service.js
index 8c47ead1a2122..7297f52a2e551 100644
--- a/services/pingpong/pingpong-status.service.js
+++ b/services/pingpong/pingpong-status.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService, InvalidParameter, InvalidResponse} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService, InvalidParameter, InvalidResponse } from '../index.js'
const schema = Joi.object({
status: Joi.string().required(),
@@ -65,4 +65,4 @@ export default class PingPongStatus extends BaseJsonService {
const { status } = await this.fetch({ apiKey })
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/pingpong/pingpong-status.tester.js b/services/pingpong/pingpong-status.tester.js
index 49eb2ae17cfb0..021e6c1897854 100644
--- a/services/pingpong/pingpong-status.tester.js
+++ b/services/pingpong/pingpong-status.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isCorrectStatus = Joi.string().valid(
diff --git a/services/pingpong/pingpong-uptime.service.js b/services/pingpong/pingpong-uptime.service.js
index 3dea3e0f43363..eb58d7e456b43 100644
--- a/services/pingpong/pingpong-uptime.service.js
+++ b/services/pingpong/pingpong-uptime.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {coveragePercentage} from '../color-formatters.js';
-import {BaseJsonService, InvalidParameter} from '../index.js';
+import Joi from 'joi'
+import { coveragePercentage } from '../color-formatters.js'
+import { BaseJsonService, InvalidParameter } from '../index.js'
const schema = Joi.object({
uptime: Joi.number().min(0).max(100).required(),
@@ -56,4 +56,4 @@ export default class PingPongUptime extends BaseJsonService {
const { uptime } = await this.fetch({ apiKey })
return this.constructor.render({ uptime })
}
-};
+}
diff --git a/services/pingpong/pingpong-uptime.tester.js b/services/pingpong/pingpong-uptime.tester.js
index 02abb346f7c71..0128983289ca4 100644
--- a/services/pingpong/pingpong-uptime.tester.js
+++ b/services/pingpong/pingpong-uptime.tester.js
@@ -1,5 +1,5 @@
-import {isPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('PingPong: Uptime (valid)')
diff --git a/services/pipenv-helpers.js b/services/pipenv-helpers.js
index 2992617a89bb4..f5663f6b363e8 100644
--- a/services/pipenv-helpers.js
+++ b/services/pipenv-helpers.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {InvalidParameter} from './index.js';
+import Joi from 'joi'
+import { InvalidParameter } from './index.js'
const isDependency = Joi.alternatives(
Joi.object({
@@ -50,7 +50,4 @@ function getDependencyVersion({
}
}
-export {
- isLockfile,
- getDependencyVersion,
-};
+export { isLockfile, getDependencyVersion }
diff --git a/services/pkgreview/package-rating.service.js b/services/pkgreview/package-rating.service.js
index 6297d67ad0dd4..25dbe0cba4bd5 100644
--- a/services/pkgreview/package-rating.service.js
+++ b/services/pkgreview/package-rating.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {starRating, metric} from '../text-formatters.js';
-import {colorScale} from '../color-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { starRating, metric } from '../text-formatters.js'
+import { colorScale } from '../color-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const pkgReviewColor = colorScale([2, 3, 4])
@@ -80,4 +80,4 @@ export default class PkgreviewRating extends BaseJsonService {
rating: rating * 5,
})
}
-};
+}
diff --git a/services/pkgreview/package-rating.tester.js b/services/pkgreview/package-rating.tester.js
index dd00a4bf4c0b9..ad4b483e56d7c 100644
--- a/services/pkgreview/package-rating.tester.js
+++ b/services/pkgreview/package-rating.tester.js
@@ -1,5 +1,5 @@
-import {withRegex, isStarRating} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { withRegex, isStarRating } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isRatingWithReviews = withRegex(
diff --git a/services/poeditor/poeditor.service.js b/services/poeditor/poeditor.service.js
index 1671050b549f3..806d9bfcfca28 100644
--- a/services/poeditor/poeditor.service.js
+++ b/services/poeditor/poeditor.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {coveragePercentage} from '../color-formatters.js';
-import {BaseJsonService, InvalidResponse} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { coveragePercentage } from '../color-formatters.js'
+import { BaseJsonService, InvalidResponse } from '../index.js'
const documentation = `
@@ -99,4 +99,4 @@ export default class POEditor extends BaseJsonService {
language: languages.find(lang => lang.code === languageCode),
})
}
-};
+}
diff --git a/services/poeditor/poeditor.tester.js b/services/poeditor/poeditor.tester.js
index 688f9a5cb7d66..691f4d816fa4c 100644
--- a/services/poeditor/poeditor.tester.js
+++ b/services/poeditor/poeditor.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets POEditor progress online')
diff --git a/services/powershellgallery/powershellgallery.service.js b/services/powershellgallery/powershellgallery.service.js
index 9d07486bad1ae..c5e66108deb60 100644
--- a/services/powershellgallery/powershellgallery.service.js
+++ b/services/powershellgallery/powershellgallery.service.js
@@ -1,5 +1,5 @@
-import {fetch, createServiceFamily} from '../nuget/nuget-v2-service-family.js';
-import {BaseXmlService} from '../index.js';
+import { fetch, createServiceFamily } from '../nuget/nuget-v2-service-family.js'
+import { BaseXmlService } from '../index.js'
const WINDOWS_TAG_NAME = 'windows'
const MACOS_TAG_NAME = 'macos'
@@ -97,4 +97,4 @@ export {
PowershellGalleryVersionRedirector,
PowershellGalleryDownloads,
PowershellGalleryPlatformSupport,
-};
+}
diff --git a/services/powershellgallery/powershellgallery.tester.js b/services/powershellgallery/powershellgallery.tester.js
index 0ef0845fb7494..14380ca4870de 100644
--- a/services/powershellgallery/powershellgallery.tester.js
+++ b/services/powershellgallery/powershellgallery.tester.js
@@ -1,6 +1,10 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
-import {isMetric, isVPlusDottedVersionNClauses, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
+import {
+ isMetric,
+ isVPlusDottedVersionNClauses,
+ isVPlusDottedVersionNClausesWithOptionalSuffix,
+} from '../test-validators.js'
const isPlatform = Joi.string().regex(
/^(windows|linux|macos)( \| (windows|linux|macos))*$/
)
diff --git a/services/pub/pub.service.js b/services/pub/pub.service.js
index cda5e01bfb896..19822dc4d5cbd 100644
--- a/services/pub/pub.service.js
+++ b/services/pub/pub.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {latest, renderVersionBadge} from '../version.js';
-import {BaseJsonService, redirector} from '../index.js';
+import Joi from 'joi'
+import { latest, renderVersionBadge } from '../version.js'
+import { BaseJsonService, redirector } from '../index.js'
const schema = Joi.object({
versions: Joi.array().items(Joi.string()).required(),
@@ -66,4 +66,4 @@ const PubVersionRedirector = redirector({
dateAdded: new Date('2019-12-15'),
})
-export { PubVersion, PubVersionRedirector };
+export { PubVersion, PubVersionRedirector }
diff --git a/services/pub/pub.tester.js b/services/pub/pub.tester.js
index d3b853fc85126..63ff3b6fee3aa 100644
--- a/services/pub/pub.tester.js
+++ b/services/pub/pub.tester.js
@@ -1,5 +1,5 @@
-import {isVPlusTripleDottedVersion} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import { isVPlusTripleDottedVersion } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'PubVersion',
title: 'Pub Version',
diff --git a/services/puppetforge/puppetforge-base.js b/services/puppetforge/puppetforge-base.js
index 4446670a888a0..8adb266bec92a 100644
--- a/services/puppetforge/puppetforge-base.js
+++ b/services/puppetforge/puppetforge-base.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger, semver} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger, semver } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const usersSchema = Joi.object({
module_count: nonNegativeInteger,
@@ -42,7 +42,4 @@ class BasePuppetForgeModulesService extends BaseJsonService {
}
}
-export {
- BasePuppetForgeModulesService,
- BasePuppetForgeUsersService,
-};
+export { BasePuppetForgeModulesService, BasePuppetForgeUsersService }
diff --git a/services/puppetforge/puppetforge-module-downloads.service.js b/services/puppetforge/puppetforge-module-downloads.service.js
index 3133e19278502..61a9795ff70ca 100644
--- a/services/puppetforge/puppetforge-module-downloads.service.js
+++ b/services/puppetforge/puppetforge-module-downloads.service.js
@@ -1,10 +1,8 @@
-import {downloadCount} from '../color-formatters.js';
-import {metric} from '../text-formatters.js';
-import {BasePuppetForgeModulesService} from './puppetforge-base.js';
+import { downloadCount } from '../color-formatters.js'
+import { metric } from '../text-formatters.js'
+import { BasePuppetForgeModulesService } from './puppetforge-base.js'
-export default class PuppetforgeModuleDownloads extends (
- BasePuppetForgeModulesService
-) {
+export default class PuppetforgeModuleDownloads extends BasePuppetForgeModulesService {
static category = 'downloads'
static route = {
@@ -36,4 +34,4 @@ export default class PuppetforgeModuleDownloads extends (
const data = await this.fetch({ user, moduleName })
return this.constructor.render({ downloads: data.downloads })
}
-};
+}
diff --git a/services/puppetforge/puppetforge-module-downloads.tester.js b/services/puppetforge/puppetforge-module-downloads.tester.js
index ea52b3c71eaae..ad5e9f10b07e5 100644
--- a/services/puppetforge/puppetforge-module-downloads.tester.js
+++ b/services/puppetforge/puppetforge-module-downloads.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('module downloads').get('/camptocamp/openssl.json').expectBadge({
diff --git a/services/puppetforge/puppetforge-module-endorsement.service.js b/services/puppetforge/puppetforge-module-endorsement.service.js
index 425cd02157a6e..2ebc258cb7a1d 100644
--- a/services/puppetforge/puppetforge-module-endorsement.service.js
+++ b/services/puppetforge/puppetforge-module-endorsement.service.js
@@ -1,9 +1,7 @@
-import {NotFound} from '../index.js';
-import {BasePuppetForgeModulesService} from './puppetforge-base.js';
+import { NotFound } from '../index.js'
+import { BasePuppetForgeModulesService } from './puppetforge-base.js'
-export default class PuppetforgeModuleEndorsement extends (
- BasePuppetForgeModulesService
-) {
+export default class PuppetforgeModuleEndorsement extends BasePuppetForgeModulesService {
static category = 'rating'
static route = {
@@ -43,4 +41,4 @@ export default class PuppetforgeModuleEndorsement extends (
}
return this.constructor.render({ endorsement })
}
-};
+}
diff --git a/services/puppetforge/puppetforge-module-endorsement.tester.js b/services/puppetforge/puppetforge-module-endorsement.tester.js
index 04aa3593c76f1..2f03a591fbbfd 100644
--- a/services/puppetforge/puppetforge-module-endorsement.tester.js
+++ b/services/puppetforge/puppetforge-module-endorsement.tester.js
@@ -1,5 +1,5 @@
-import {withRegex} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { withRegex } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('module endorsement')
diff --git a/services/puppetforge/puppetforge-module-feedback.service.js b/services/puppetforge/puppetforge-module-feedback.service.js
index a1420f18aa149..041d8b3e87dd0 100644
--- a/services/puppetforge/puppetforge-module-feedback.service.js
+++ b/services/puppetforge/puppetforge-module-feedback.service.js
@@ -1,10 +1,8 @@
-import {coveragePercentage as coveragePercentageColor} from '../color-formatters.js';
-import {NotFound} from '../index.js';
-import {BasePuppetForgeModulesService} from './puppetforge-base.js';
+import { coveragePercentage as coveragePercentageColor } from '../color-formatters.js'
+import { NotFound } from '../index.js'
+import { BasePuppetForgeModulesService } from './puppetforge-base.js'
-export default class PuppetforgeModuleFeedback extends (
- BasePuppetForgeModulesService
-) {
+export default class PuppetforgeModuleFeedback extends BasePuppetForgeModulesService {
static category = 'rating'
static route = {
@@ -39,4 +37,4 @@ export default class PuppetforgeModuleFeedback extends (
}
return this.constructor.render({ score: data.feedback_score })
}
-};
+}
diff --git a/services/puppetforge/puppetforge-module-feedback.tester.js b/services/puppetforge/puppetforge-module-feedback.tester.js
index be75019d37782..24128bd7e1d97 100644
--- a/services/puppetforge/puppetforge-module-feedback.tester.js
+++ b/services/puppetforge/puppetforge-module-feedback.tester.js
@@ -1,5 +1,5 @@
-import {isPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('module feedback').get('/camptocamp/openssl.json').expectBadge({
diff --git a/services/puppetforge/puppetforge-module-pdk-version.service.js b/services/puppetforge/puppetforge-module-pdk-version.service.js
index e9ac7cb12049b..69c8654214319 100644
--- a/services/puppetforge/puppetforge-module-pdk-version.service.js
+++ b/services/puppetforge/puppetforge-module-pdk-version.service.js
@@ -1,10 +1,8 @@
-import {renderVersionBadge} from '../version.js';
-import {NotFound} from '../index.js';
-import {BasePuppetForgeModulesService} from './puppetforge-base.js';
+import { renderVersionBadge } from '../version.js'
+import { NotFound } from '../index.js'
+import { BasePuppetForgeModulesService } from './puppetforge-base.js'
-export default class PuppetforgeModulePdkVersion extends (
- BasePuppetForgeModulesService
-) {
+export default class PuppetforgeModulePdkVersion extends BasePuppetForgeModulesService {
static category = 'platform-support'
static route = {
@@ -35,4 +33,4 @@ export default class PuppetforgeModulePdkVersion extends (
throw new NotFound({ prettyMessage: 'none' })
}
}
-};
+}
diff --git a/services/puppetforge/puppetforge-module-pdk-version.tester.js b/services/puppetforge/puppetforge-module-pdk-version.tester.js
index f8697b61e30f7..cbcd15d9b5c5e 100644
--- a/services/puppetforge/puppetforge-module-pdk-version.tester.js
+++ b/services/puppetforge/puppetforge-module-pdk-version.tester.js
@@ -1,5 +1,5 @@
-import {isSemver} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isSemver } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('PDK version').get('/tragiccode/azure_key_vault.json').expectBadge({
diff --git a/services/puppetforge/puppetforge-module-version.service.js b/services/puppetforge/puppetforge-module-version.service.js
index bda35c2cc89b9..b3cb980f7e594 100644
--- a/services/puppetforge/puppetforge-module-version.service.js
+++ b/services/puppetforge/puppetforge-module-version.service.js
@@ -1,9 +1,7 @@
-import {renderVersionBadge} from '../version.js';
-import {BasePuppetForgeModulesService} from './puppetforge-base.js';
+import { renderVersionBadge } from '../version.js'
+import { BasePuppetForgeModulesService } from './puppetforge-base.js'
-export default class PuppetforgeModuleVersion extends (
- BasePuppetForgeModulesService
-) {
+export default class PuppetforgeModuleVersion extends BasePuppetForgeModulesService {
static category = 'version'
static route = {
@@ -28,4 +26,4 @@ export default class PuppetforgeModuleVersion extends (
const data = await this.fetch({ user, moduleName })
return renderVersionBadge({ version: data.current_release.version })
}
-};
+}
diff --git a/services/puppetforge/puppetforge-module-version.tester.js b/services/puppetforge/puppetforge-module-version.tester.js
index d3b483f9366d1..79117a314e308 100644
--- a/services/puppetforge/puppetforge-module-version.tester.js
+++ b/services/puppetforge/puppetforge-module-version.tester.js
@@ -1,5 +1,5 @@
-import {isSemver} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isSemver } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('module version').get('/camptocamp/openssl.json').expectBadge({
diff --git a/services/puppetforge/puppetforge-user-module-count.service.js b/services/puppetforge/puppetforge-user-module-count.service.js
index d0da8557d3892..1666b110197db 100644
--- a/services/puppetforge/puppetforge-user-module-count.service.js
+++ b/services/puppetforge/puppetforge-user-module-count.service.js
@@ -1,10 +1,8 @@
-import {metric} from '../text-formatters.js';
-import {floorCount as floorCountColor} from '../color-formatters.js';
-import {BasePuppetForgeUsersService} from './puppetforge-base.js';
+import { metric } from '../text-formatters.js'
+import { floorCount as floorCountColor } from '../color-formatters.js'
+import { BasePuppetForgeUsersService } from './puppetforge-base.js'
-export default class PuppetForgeModuleCountService extends (
- BasePuppetForgeUsersService
-) {
+export default class PuppetForgeModuleCountService extends BasePuppetForgeUsersService {
static category = 'other'
static route = {
@@ -35,4 +33,4 @@ export default class PuppetForgeModuleCountService extends (
const data = await this.fetch({ user })
return this.constructor.render({ modules: data.module_count })
}
-};
+}
diff --git a/services/puppetforge/puppetforge-user-module-count.tester.js b/services/puppetforge/puppetforge-user-module-count.tester.js
index dde1b482f8b10..2d999d1078416 100644
--- a/services/puppetforge/puppetforge-user-module-count.tester.js
+++ b/services/puppetforge/puppetforge-user-module-count.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('modules by user').get('/camptocamp.json').expectBadge({
diff --git a/services/puppetforge/puppetforge-user-release-count.service.js b/services/puppetforge/puppetforge-user-release-count.service.js
index 918f01b5f812c..d13703dc395f8 100644
--- a/services/puppetforge/puppetforge-user-release-count.service.js
+++ b/services/puppetforge/puppetforge-user-release-count.service.js
@@ -1,10 +1,8 @@
-import {metric} from '../text-formatters.js';
-import {floorCount as floorCountColor} from '../color-formatters.js';
-import {BasePuppetForgeUsersService} from './puppetforge-base.js';
+import { metric } from '../text-formatters.js'
+import { floorCount as floorCountColor } from '../color-formatters.js'
+import { BasePuppetForgeUsersService } from './puppetforge-base.js'
-export default class PuppetForgeReleaseCountService extends (
- BasePuppetForgeUsersService
-) {
+export default class PuppetForgeReleaseCountService extends BasePuppetForgeUsersService {
static category = 'other'
static route = {
@@ -35,4 +33,4 @@ export default class PuppetForgeReleaseCountService extends (
const data = await this.fetch({ user })
return this.constructor.render({ releases: data.release_count })
}
-};
+}
diff --git a/services/puppetforge/puppetforge-user-release-count.tester.js b/services/puppetforge/puppetforge-user-release-count.tester.js
index d6d6c40edfbaa..f8a8d60028c05 100644
--- a/services/puppetforge/puppetforge-user-release-count.tester.js
+++ b/services/puppetforge/puppetforge-user-release-count.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('releases by user').get('/camptocamp.json').expectBadge({
diff --git a/services/pypi/pypi-base.js b/services/pypi/pypi-base.js
index bb5d81b87c9f2..e19d6e23a510c 100644
--- a/services/pypi/pypi-base.js
+++ b/services/pypi/pypi-base.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
info: Joi.object({
@@ -37,4 +37,4 @@ export default class PypiBase extends BaseJsonService {
errorMessages: { 404: 'package or version not found' },
})
}
-};
+}
diff --git a/services/pypi/pypi-django-versions.service.js b/services/pypi/pypi-django-versions.service.js
index 5a742b8ee6cb8..ffe0fbf1bf37f 100644
--- a/services/pypi/pypi-django-versions.service.js
+++ b/services/pypi/pypi-django-versions.service.js
@@ -1,5 +1,5 @@
-import PypiBase from './pypi-base.js';
-import {sortDjangoVersions, parseClassifiers} from './pypi-helpers.js';
+import PypiBase from './pypi-base.js'
+import { sortDjangoVersions, parseClassifiers } from './pypi-helpers.js'
export default class PypiDjangoVersions extends PypiBase {
static category = 'platform-support'
@@ -42,4 +42,4 @@ export default class PypiDjangoVersions extends PypiBase {
return this.constructor.render({ versions })
}
-};
+}
diff --git a/services/pypi/pypi-django-versions.tester.js b/services/pypi/pypi-django-versions.tester.js
index e57e87c71e999..83fdca15ec086 100644
--- a/services/pypi/pypi-django-versions.tester.js
+++ b/services/pypi/pypi-django-versions.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isPipeSeparatedDjangoVersions = Joi.string().regex(
diff --git a/services/pypi/pypi-downloads.service.js b/services/pypi/pypi-downloads.service.js
index 147ac8144c573..21cc1133dd96a 100644
--- a/services/pypi/pypi-downloads.service.js
+++ b/services/pypi/pypi-downloads.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {downloadCount} from '../color-formatters.js';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { downloadCount } from '../color-formatters.js'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const keywords = ['python']
@@ -75,4 +75,4 @@ export default class PypiDownloads extends BaseJsonService {
downloads: json.data[periodMap[period].api_field],
})
}
-};
+}
diff --git a/services/pypi/pypi-downloads.tester.js b/services/pypi/pypi-downloads.tester.js
index d119ed41fe8bb..5e4b57fe987c2 100644
--- a/services/pypi/pypi-downloads.tester.js
+++ b/services/pypi/pypi-downloads.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isMetricOverTimePeriod} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isMetricOverTimePeriod } from '../test-validators.js'
export const t = await createServiceTester()
t.create('daily downloads (valid)')
diff --git a/services/pypi/pypi-format.service.js b/services/pypi/pypi-format.service.js
index 127538fecf931..cef3285e48433 100644
--- a/services/pypi/pypi-format.service.js
+++ b/services/pypi/pypi-format.service.js
@@ -1,5 +1,5 @@
-import PypiBase from './pypi-base.js';
-import {getPackageFormats} from './pypi-helpers.js';
+import PypiBase from './pypi-base.js'
+import { getPackageFormats } from './pypi-helpers.js'
export default class PypiFormat extends PypiBase {
static category = 'other'
@@ -42,4 +42,4 @@ export default class PypiFormat extends PypiBase {
const { hasWheel, hasEgg } = getPackageFormats(packageData)
return this.constructor.render({ hasWheel, hasEgg })
}
-};
+}
diff --git a/services/pypi/pypi-format.tester.js b/services/pypi/pypi-format.tester.js
index ccded77bcb274..af025c67305b8 100644
--- a/services/pypi/pypi-format.tester.js
+++ b/services/pypi/pypi-format.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('format (wheel, package version in request)')
diff --git a/services/pypi/pypi-helpers.js b/services/pypi/pypi-helpers.js
index 1921bb7655a8a..3d3fa9f9f55a6 100644
--- a/services/pypi/pypi-helpers.js
+++ b/services/pypi/pypi-helpers.js
@@ -109,4 +109,4 @@ export {
sortDjangoVersions,
getLicenses,
getPackageFormats,
-};
+}
diff --git a/services/pypi/pypi-implementation.service.js b/services/pypi/pypi-implementation.service.js
index 27d8b5e1dad4a..b5a050fecdd37 100644
--- a/services/pypi/pypi-implementation.service.js
+++ b/services/pypi/pypi-implementation.service.js
@@ -1,5 +1,5 @@
-import PypiBase from './pypi-base.js';
-import {parseClassifiers} from './pypi-helpers.js';
+import PypiBase from './pypi-base.js'
+import { parseClassifiers } from './pypi-helpers.js'
export default class PypiImplementation extends PypiBase {
static category = 'platform-support'
@@ -39,4 +39,4 @@ export default class PypiImplementation extends PypiBase {
return this.constructor.render({ implementations })
}
-};
+}
diff --git a/services/pypi/pypi-implementation.tester.js b/services/pypi/pypi-implementation.tester.js
index f15de78ce3ac5..4de094f51205c 100644
--- a/services/pypi/pypi-implementation.tester.js
+++ b/services/pypi/pypi-implementation.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('implementation (valid, package version in request)')
diff --git a/services/pypi/pypi-license.service.js b/services/pypi/pypi-license.service.js
index 234e200d30947..c2d2a3228cf0a 100644
--- a/services/pypi/pypi-license.service.js
+++ b/services/pypi/pypi-license.service.js
@@ -1,6 +1,6 @@
-import {renderLicenseBadge} from '../licenses.js';
-import PypiBase from './pypi-base.js';
-import {getLicenses} from './pypi-helpers.js';
+import { renderLicenseBadge } from '../licenses.js'
+import PypiBase from './pypi-base.js'
+import { getLicenses } from './pypi-helpers.js'
export default class PypiLicense extends PypiBase {
static category = 'license'
@@ -26,4 +26,4 @@ export default class PypiLicense extends PypiBase {
const licenses = getLicenses(packageData)
return this.constructor.render({ licenses })
}
-};
+}
diff --git a/services/pypi/pypi-license.tester.js b/services/pypi/pypi-license.tester.js
index 96c6748739e3e..74cce2a414425 100644
--- a/services/pypi/pypi-license.tester.js
+++ b/services/pypi/pypi-license.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('license (valid, package version in request)')
diff --git a/services/pypi/pypi-python-versions.service.js b/services/pypi/pypi-python-versions.service.js
index b845f34d4ec02..569fc7aa993ec 100644
--- a/services/pypi/pypi-python-versions.service.js
+++ b/services/pypi/pypi-python-versions.service.js
@@ -1,6 +1,6 @@
-import semver from 'semver';
-import PypiBase from './pypi-base.js';
-import {parseClassifiers} from './pypi-helpers.js';
+import semver from 'semver'
+import PypiBase from './pypi-base.js'
+import { parseClassifiers } from './pypi-helpers.js'
export default class PypiPythonVersions extends PypiBase {
static category = 'platform-support'
@@ -63,4 +63,4 @@ export default class PypiPythonVersions extends PypiBase {
return this.constructor.render({ versions })
}
-};
+}
diff --git a/services/pypi/pypi-python-versions.spec.js b/services/pypi/pypi-python-versions.spec.js
index 3b7595bf60717..8a8c483882e9e 100644
--- a/services/pypi/pypi-python-versions.spec.js
+++ b/services/pypi/pypi-python-versions.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import PypiPythonVersions from './pypi-python-versions.service.js';
+import { test, given } from 'sazerac'
+import PypiPythonVersions from './pypi-python-versions.service.js'
describe('PyPI Python Version', function () {
test(PypiPythonVersions.render, function () {
diff --git a/services/pypi/pypi-python-versions.tester.js b/services/pypi/pypi-python-versions.tester.js
index fef7586e021ce..36146ddf92a97 100644
--- a/services/pypi/pypi-python-versions.tester.js
+++ b/services/pypi/pypi-python-versions.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isPipeSeparatedPythonVersions = Joi.string().regex(
diff --git a/services/pypi/pypi-status.service.js b/services/pypi/pypi-status.service.js
index e4f68afbda472..77bff049aace1 100644
--- a/services/pypi/pypi-status.service.js
+++ b/services/pypi/pypi-status.service.js
@@ -1,5 +1,5 @@
-import PypiBase from './pypi-base.js';
-import {parseClassifiers} from './pypi-helpers.js';
+import PypiBase from './pypi-base.js'
+import { parseClassifiers } from './pypi-helpers.js'
export default class PypiStatus extends PypiBase {
static category = 'other'
@@ -60,4 +60,4 @@ export default class PypiStatus extends PypiBase {
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/pypi/pypi-status.tester.js b/services/pypi/pypi-status.tester.js
index f24621976461c..764254fe0eba6 100644
--- a/services/pypi/pypi-status.tester.js
+++ b/services/pypi/pypi-status.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('status (valid, stable, package version in request)')
diff --git a/services/pypi/pypi-version.service.js b/services/pypi/pypi-version.service.js
index 86a34d66f8fce..9a421bd01c444 100644
--- a/services/pypi/pypi-version.service.js
+++ b/services/pypi/pypi-version.service.js
@@ -1,5 +1,5 @@
-import {renderVersionBadge} from '../version.js';
-import PypiBase from './pypi-base.js';
+import { renderVersionBadge } from '../version.js'
+import PypiBase from './pypi-base.js'
export default class PypiVersion extends PypiBase {
static category = 'version'
@@ -28,4 +28,4 @@ export default class PypiVersion extends PypiBase {
} = await this.fetch({ egg })
return this.constructor.render({ version })
}
-};
+}
diff --git a/services/pypi/pypi-version.tester.js b/services/pypi/pypi-version.tester.js
index de7ff70af4d95..ed083d92c6504 100644
--- a/services/pypi/pypi-version.tester.js
+++ b/services/pypi/pypi-version.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
-import {isSemver} from '../test-validators.js';
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
+import { isSemver } from '../test-validators.js'
export const t = await createServiceTester()
const isPsycopg2Version = Joi.string().regex(/^v([0-9][.]?)+$/)
diff --git a/services/pypi/pypi-wheel.service.js b/services/pypi/pypi-wheel.service.js
index 9525b17b97323..a81e2e4d42bd5 100644
--- a/services/pypi/pypi-wheel.service.js
+++ b/services/pypi/pypi-wheel.service.js
@@ -1,5 +1,5 @@
-import PypiBase from './pypi-base.js';
-import {getPackageFormats} from './pypi-helpers.js';
+import PypiBase from './pypi-base.js'
+import { getPackageFormats } from './pypi-helpers.js'
export default class PypiWheel extends PypiBase {
static category = 'platform-support'
@@ -37,4 +37,4 @@ export default class PypiWheel extends PypiBase {
const { hasWheel } = getPackageFormats(packageData)
return this.constructor.render({ hasWheel })
}
-};
+}
diff --git a/services/pypi/pypi-wheel.tester.js b/services/pypi/pypi-wheel.tester.js
index 0cd52775e71ba..a70afaf4d4bf5 100644
--- a/services/pypi/pypi-wheel.tester.js
+++ b/services/pypi/pypi-wheel.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('wheel (has wheel, package version in request)')
diff --git a/services/readthedocs/readthedocs.service.js b/services/readthedocs/readthedocs.service.js
index a441fd9c3f245..7522e69c3fc5f 100644
--- a/services/readthedocs/readthedocs.service.js
+++ b/services/readthedocs/readthedocs.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseSvgScrapingService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { BaseSvgScrapingService, NotFound } from '../index.js'
const keywords = ['documentation']
@@ -58,4 +58,4 @@ export default class ReadTheDocs extends BaseSvgScrapingService {
}
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/readthedocs/readthedocs.tester.js b/services/readthedocs/readthedocs.tester.js
index 762e843fff868..5bf83194da2d7 100644
--- a/services/readthedocs/readthedocs.tester.js
+++ b/services/readthedocs/readthedocs.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('build status')
diff --git a/services/reddit/subreddit-subscribers.service.js b/services/reddit/subreddit-subscribers.service.js
index 3537662d85296..2d0ce5c53d7d3 100644
--- a/services/reddit/subreddit-subscribers.service.js
+++ b/services/reddit/subreddit-subscribers.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {optionalNonNegativeInteger} from '../validators.js';
-import {metric} from '../text-formatters.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { optionalNonNegativeInteger } from '../validators.js'
+import { metric } from '../text-formatters.js'
+import { BaseJsonService, NotFound } from '../index.js'
const schema = Joi.object({
data: Joi.object({
@@ -71,4 +71,4 @@ export default class RedditSubredditSubscribers extends BaseJsonService {
subscribers,
})
}
-};
+}
diff --git a/services/reddit/subreddit-subscribers.tester.js b/services/reddit/subreddit-subscribers.tester.js
index 839e030e0db9d..1038718d523c8 100644
--- a/services/reddit/subreddit-subscribers.tester.js
+++ b/services/reddit/subreddit-subscribers.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('subreddit-subscribers (valid subreddit)')
diff --git a/services/reddit/user-karma.service.js b/services/reddit/user-karma.service.js
index 014c9807029e4..c5595f21e16e4 100644
--- a/services/reddit/user-karma.service.js
+++ b/services/reddit/user-karma.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {metric} from '../text-formatters.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { metric } from '../text-formatters.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
data: Joi.object({
@@ -83,4 +83,4 @@ export default class RedditUserKarma extends BaseJsonService {
user,
})
}
-};
+}
diff --git a/services/reddit/user-karma.tester.js b/services/reddit/user-karma.tester.js
index ff39e32b5b773..9023023dbb630 100644
--- a/services/reddit/user-karma.tester.js
+++ b/services/reddit/user-karma.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isMetric } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('user-karma (valid - link)')
diff --git a/services/redmine/redmine.service.js b/services/redmine/redmine.service.js
index 7dc06bc5b13d7..288a36ffe4719 100644
--- a/services/redmine/redmine.service.js
+++ b/services/redmine/redmine.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {starRating} from '../text-formatters.js';
-import {floorCount as floorCountColor} from '../color-formatters.js';
-import {BaseXmlService} from '../index.js';
+import Joi from 'joi'
+import { starRating } from '../text-formatters.js'
+import { floorCount as floorCountColor } from '../color-formatters.js'
+import { BaseXmlService } from '../index.js'
const schema = Joi.object({
'redmine-plugin': Joi.object({
@@ -76,4 +76,4 @@ class RedminePluginStars extends BaseRedminePluginRating {
}
}
-export { RedminePluginRating, RedminePluginStars };
+export { RedminePluginRating, RedminePluginStars }
diff --git a/services/redmine/redmine.tester.js b/services/redmine/redmine.tester.js
index 79a8242ce640e..c69e6e6eceac0 100644
--- a/services/redmine/redmine.tester.js
+++ b/services/redmine/redmine.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
-import {isStarRating} from '../test-validators.js';
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
+import { isStarRating } from '../test-validators.js'
export const t = new ServiceTester({
id: 'redmine',
diff --git a/services/repology/repology-repositories.service.js b/services/repology/repology-repositories.service.js
index a49453065f767..98b5e3ff55dc6 100644
--- a/services/repology/repology-repositories.service.js
+++ b/services/repology/repology-repositories.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseSvgScrapingService} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseSvgScrapingService } from '../index.js'
const schema = Joi.object({
message: nonNegativeInteger,
@@ -42,4 +42,4 @@ export default class RepologyRepositories extends BaseSvgScrapingService {
return this.constructor.render({ repositoryCount })
}
-};
+}
diff --git a/services/repology/repology-repositories.tester.js b/services/repology/repology-repositories.tester.js
index 1ceaff00b53b4..8250bec843d54 100644
--- a/services/repology/repology-repositories.tester.js
+++ b/services/repology/repology-repositories.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {nonNegativeInteger} from '../validators.js';
+import { createServiceTester } from '../tester.js'
+import { nonNegativeInteger } from '../validators.js'
export const t = await createServiceTester()
t.create('Existing project').get('/starship.json').expectBadge({
diff --git a/services/requires/requires.service.js b/services/requires/requires.service.js
index 90836be2aad67..03f822231647d 100644
--- a/services/requires/requires.service.js
+++ b/services/requires/requires.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const statusSchema = Joi.object({
status: Joi.string().required(),
@@ -62,4 +62,4 @@ export default class RequiresIo extends BaseJsonService {
const { status } = await this.fetch({ service, user, repo, branch })
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/requires/requires.tester.js b/services/requires/requires.tester.js
index a319423ca111f..b5dc253ba7087 100644
--- a/services/requires/requires.tester.js
+++ b/services/requires/requires.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isRequireStatus = Joi.string().regex(
diff --git a/services/resharper/resharper.service.js b/services/resharper/resharper.service.js
index 9dca4de372459..ef05a293379ac 100644
--- a/services/resharper/resharper.service.js
+++ b/services/resharper/resharper.service.js
@@ -1,4 +1,4 @@
-import {createServiceFamily} from '../nuget/nuget-v2-service-family.js';
+import { createServiceFamily } from '../nuget/nuget-v2-service-family.js'
export default createServiceFamily({
name: 'ResharperPlugin',
@@ -11,4 +11,4 @@ export default createServiceFamily({
exampleVersion: '2017.2.0',
examplePrereleaseVersion: '2017.3.0-pre0001',
exampleDownloadCount: 9e4,
-});
+})
diff --git a/services/resharper/resharper.tester.js b/services/resharper/resharper.tester.js
index 31bb81c7e49db..d4332f8961cd0 100644
--- a/services/resharper/resharper.tester.js
+++ b/services/resharper/resharper.tester.js
@@ -1,5 +1,9 @@
-import {ServiceTester} from '../tester.js';
-import {isMetric, isVPlusDottedVersionNClauses, isVPlusDottedVersionNClausesWithOptionalSuffix} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import {
+ isMetric,
+ isVPlusDottedVersionNClauses,
+ isVPlusDottedVersionNClausesWithOptionalSuffix,
+} from '../test-validators.js'
export const t = new ServiceTester({
id: 'resharper',
diff --git a/services/response-fixtures.js b/services/response-fixtures.js
index 575a9fea98dfe..90557126f56ad 100644
--- a/services/response-fixtures.js
+++ b/services/response-fixtures.js
@@ -1,7 +1,7 @@
export const invalidJSONString = '{{{{{invalid json}}'
export const invalidJSON = () => [
- 200,
- invalidJSONString,
- { 'Content-Type': 'application/json' },
- ]
+ 200,
+ invalidJSONString,
+ { 'Content-Type': 'application/json' },
+]
diff --git a/services/reuse/reuse-compliance-helper.js b/services/reuse/reuse-compliance-helper.js
index 67cd00b65c7c8..7503696bb373c 100644
--- a/services/reuse/reuse-compliance-helper.js
+++ b/services/reuse/reuse-compliance-helper.js
@@ -1,4 +1,4 @@
-import Joi from 'joi';
+import Joi from 'joi'
const COLOR_MAP = {
checking: 'brightgreen',
@@ -11,7 +11,4 @@ const isReuseCompliance = Joi.string()
.valid('compliant', 'non-compliant', 'checking', 'unregistered')
.required()
-export {
- isReuseCompliance,
- COLOR_MAP,
-};
+export { isReuseCompliance, COLOR_MAP }
diff --git a/services/reuse/reuse-compliance.service.js b/services/reuse/reuse-compliance.service.js
index 25d99a92275f1..93933f5f9008d 100644
--- a/services/reuse/reuse-compliance.service.js
+++ b/services/reuse/reuse-compliance.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
-import {isReuseCompliance, COLOR_MAP} from './reuse-compliance-helper.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
+import { isReuseCompliance, COLOR_MAP } from './reuse-compliance-helper.js'
const responseSchema = Joi.object({
status: isReuseCompliance,
@@ -51,4 +51,4 @@ export default class Reuse extends BaseJsonService {
const { status } = await this.fetch({ remote })
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/reuse/reuse-compliance.tester.js b/services/reuse/reuse-compliance.tester.js
index bf059a8f55040..de7202f6dbf76 100644
--- a/services/reuse/reuse-compliance.tester.js
+++ b/services/reuse/reuse-compliance.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isReuseCompliance, COLOR_MAP} from './reuse-compliance-helper.js';
+import { createServiceTester } from '../tester.js'
+import { isReuseCompliance, COLOR_MAP } from './reuse-compliance-helper.js'
export const t = await createServiceTester()
t.create('valid repo -- live')
diff --git a/services/route-builder.js b/services/route-builder.js
index aea4839305c51..a1c894c945a1c 100644
--- a/services/route-builder.js
+++ b/services/route-builder.js
@@ -1,4 +1,4 @@
-import toArray from '../core/base-service/to-array.js';
+import toArray from '../core/base-service/to-array.js'
/*
* Factory class for building a BaseService `route` object. This class is useful
@@ -31,4 +31,4 @@ export default class RouteBuilder {
const { base, format, capture } = this
return { base, format, capture }
}
-};
+}
diff --git a/services/scoop/scoop-version.service.js b/services/scoop/scoop-version.service.js
index d565c3f2b7431..566a259bf7b8c 100644
--- a/services/scoop/scoop-version.service.js
+++ b/services/scoop/scoop-version.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {NotFound} from '../index.js';
-import {ConditionalGithubAuthV3Service} from '../github/github-auth-service.js';
-import {fetchJsonFromRepo} from '../github/github-common-fetch.js';
-import {renderVersionBadge} from '../version.js';
+import Joi from 'joi'
+import { NotFound } from '../index.js'
+import { ConditionalGithubAuthV3Service } from '../github/github-auth-service.js'
+import { fetchJsonFromRepo } from '../github/github-common-fetch.js'
+import { renderVersionBadge } from '../version.js'
const gitHubRepoRegExp =
/https:\/\/github.com\/(?
@@ -409,4 +409,4 @@ export {
SteamFileFavorites,
SteamFileDownloads,
SteamFileViews,
-};
+}
diff --git a/services/steam/steam-workshop.tester.js b/services/steam/steam-workshop.tester.js
index 66962f29a103f..05b424ac9d658 100644
--- a/services/steam/steam-workshop.tester.js
+++ b/services/steam/steam-workshop.tester.js
@@ -1,7 +1,10 @@
-import {ServiceTester} from '../tester.js';
-import {isMetric, isFileSize, isFormattedDate} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isMetric, isFileSize, isFormattedDate } from '../test-validators.js'
-export const t = new ServiceTester({ id: 'steam', title: 'Steam Workshop Tests' })
+export const t = new ServiceTester({
+ id: 'steam',
+ title: 'Steam Workshop Tests',
+})
t.create('Collection Files')
.get('/collection-files/180077636.json')
diff --git a/services/suggest.integration.js b/services/suggest.integration.js
index 94a74a3a90943..68efaafcaae4f 100644
--- a/services/suggest.integration.js
+++ b/services/suggest.integration.js
@@ -1,10 +1,10 @@
-import {expect} from 'chai';
-import Camp from '@shields_io/camp';
-import portfinder from 'portfinder';
-import config from 'config';
-import got from '../core/got-test-client.js';
-import {setRoutes} from './suggest.js';
-import GithubApiProvider from './github/github-api-provider.js';
+import { expect } from 'chai'
+import Camp from '@shields_io/camp'
+import portfinder from 'portfinder'
+import config from 'config'
+import got from '../core/got-test-client.js'
+import { setRoutes } from './suggest.js'
+import GithubApiProvider from './github/github-api-provider.js'
describe('Badge suggestions for', function () {
const githubApiBaseUrl = process.env.GITHUB_URL || 'https://api.github.com'
diff --git a/services/suggest.js b/services/suggest.js
index fbcc1b5495b14..ce23724f9a5d3 100644
--- a/services/suggest.js
+++ b/services/suggest.js
@@ -4,8 +4,8 @@
//
// This endpoint is called from frontend/components/suggestion-and-search.js.
-import {URL} from 'url';
-import request from 'request';
+import { URL } from 'url'
+import request from 'request'
function twitterPage(url) {
if (url.protocol === null) {
@@ -198,8 +198,4 @@ function setRoutes(allowedOrigin, githubApiProvider, server) {
})
}
-export {
- findSuggestions,
- githubLicense,
- setRoutes,
-};
+export { findSuggestions, githubLicense, setRoutes }
diff --git a/services/suggest.spec.js b/services/suggest.spec.js
index 03ceb01e3cbd4..3e2a9c8f495c1 100644
--- a/services/suggest.spec.js
+++ b/services/suggest.spec.js
@@ -1,10 +1,10 @@
-import Camp from '@shields_io/camp';
-import {expect} from 'chai';
-import nock from 'nock';
-import portfinder from 'portfinder';
-import got from '../core/got-test-client.js';
-import {setRoutes, githubLicense} from './suggest.js';
-import GithubApiProvider from './github/github-api-provider.js';
+import Camp from '@shields_io/camp'
+import { expect } from 'chai'
+import nock from 'nock'
+import portfinder from 'portfinder'
+import got from '../core/got-test-client.js'
+import { setRoutes, githubLicense } from './suggest.js'
+import GithubApiProvider from './github/github-api-provider.js'
describe('Badge suggestions', function () {
const githubApiBaseUrl = 'https://api.github.test'
diff --git a/services/swagger/swagger-redirect.service.js b/services/swagger/swagger-redirect.service.js
index 150d41d0ff7e6..091acf5c08c6f 100644
--- a/services/swagger/swagger-redirect.service.js
+++ b/services/swagger/swagger-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
redirector({
@@ -15,4 +15,4 @@ export default [
},
dateAdded: new Date('2019-11-03'),
}),
-];
+]
diff --git a/services/swagger/swagger-redirect.tester.js b/services/swagger/swagger-redirect.tester.js
index 51bb1019a4f39..c4658882236c1 100644
--- a/services/swagger/swagger-redirect.tester.js
+++ b/services/swagger/swagger-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'SwaggerUrlRedirect',
diff --git a/services/swagger/swagger.service.js b/services/swagger/swagger.service.js
index 13e6516d4038e..be4127345553b 100644
--- a/services/swagger/swagger.service.js
+++ b/services/swagger/swagger.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {optionalUrl} from '../validators.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { optionalUrl } from '../validators.js'
+import { BaseJsonService, NotFound } from '../index.js'
const schema = Joi.object()
.keys({
@@ -83,4 +83,4 @@ export default class SwaggerValidatorService extends BaseJsonService {
const { status } = this.transform({ json, specUrl })
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/swagger/swagger.tester.js b/services/swagger/swagger.tester.js
index 659cdb03e0069..6c154b6354223 100644
--- a/services/swagger/swagger.tester.js
+++ b/services/swagger/swagger.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
const getURL = '/3.0.json?specUrl=https://example.com/example.json'
const getURLBase = '/3.0.json?specUrl='
diff --git a/services/symfony/sensiolabs-redirect.service.js b/services/symfony/sensiolabs-redirect.service.js
index df889ca1fd6d7..5196e02b8d4a7 100644
--- a/services/symfony/sensiolabs-redirect.service.js
+++ b/services/symfony/sensiolabs-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
// The SymfonyInsight service was previously branded as SensioLabs, and
@@ -12,4 +12,4 @@ export default [
transformPath: ({ projectUuid }) => `/symfony/i/grade/${projectUuid}`,
dateAdded: new Date('2019-02-08'),
}),
-];
+]
diff --git a/services/symfony/sensiolabs-redirect.tester.js b/services/symfony/sensiolabs-redirect.tester.js
index be8366fb6de2d..fd10afb597236 100644
--- a/services/symfony/sensiolabs-redirect.tester.js
+++ b/services/symfony/sensiolabs-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'sensiolabs',
diff --git a/services/symfony/symfony-insight-base.js b/services/symfony/symfony-insight-base.js
index 19276a155c0a5..8cace75a89741 100644
--- a/services/symfony/symfony-insight-base.js
+++ b/services/symfony/symfony-insight-base.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseXmlService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { BaseXmlService, NotFound } from '../index.js'
const violationSchema = Joi.object({
severity: Joi.equal('info', 'minor', 'major', 'critical').required(),
@@ -124,8 +124,4 @@ class SymfonyInsightBase extends BaseXmlService {
}
}
-export {
- SymfonyInsightBase,
- keywords,
- gradeColors,
-};
+export { SymfonyInsightBase, keywords, gradeColors }
diff --git a/services/symfony/symfony-insight-base.spec.js b/services/symfony/symfony-insight-base.spec.js
index 36bbe44317c12..91af55d63539b 100644
--- a/services/symfony/symfony-insight-base.spec.js
+++ b/services/symfony/symfony-insight-base.spec.js
@@ -1,6 +1,6 @@
-import {expect} from 'chai';
-import {NotFound} from '../index.js';
-import {SymfonyInsightBase} from './symfony-insight-base.js';
+import { expect } from 'chai'
+import { NotFound } from '../index.js'
+import { SymfonyInsightBase } from './symfony-insight-base.js'
describe('SymfonyInsightBase', function () {
context('transform()', function () {
diff --git a/services/symfony/symfony-insight-grade.service.js b/services/symfony/symfony-insight-grade.service.js
index e0f9d2d58e2d7..4e220915373a3 100644
--- a/services/symfony/symfony-insight-grade.service.js
+++ b/services/symfony/symfony-insight-grade.service.js
@@ -1,4 +1,8 @@
-import {SymfonyInsightBase, keywords, gradeColors} from './symfony-insight-base.js';
+import {
+ SymfonyInsightBase,
+ keywords,
+ gradeColors,
+} from './symfony-insight-base.js'
export default class SymfonyInsightGrade extends SymfonyInsightBase {
static route = {
@@ -44,4 +48,4 @@ export default class SymfonyInsightGrade extends SymfonyInsightBase {
return this.constructor.render({ grade, status })
}
-};
+}
diff --git a/services/symfony/symfony-insight-grade.tester.js b/services/symfony/symfony-insight-grade.tester.js
index 491194f57073e..85d4be697c0bc 100644
--- a/services/symfony/symfony-insight-grade.tester.js
+++ b/services/symfony/symfony-insight-grade.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
-import {sampleProjectUuid, noSymfonyToken} from './symfony-test-helpers.js';
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
+import { sampleProjectUuid, noSymfonyToken } from './symfony-test-helpers.js'
export const t = await createServiceTester()
t.create('valid project grade')
diff --git a/services/symfony/symfony-insight-stars.service.js b/services/symfony/symfony-insight-stars.service.js
index db35fb965e3ad..1665c255b8d6d 100644
--- a/services/symfony/symfony-insight-stars.service.js
+++ b/services/symfony/symfony-insight-stars.service.js
@@ -1,5 +1,9 @@
-import {starRating} from '../text-formatters.js';
-import {SymfonyInsightBase, keywords, gradeColors} from './symfony-insight-base.js';
+import { starRating } from '../text-formatters.js'
+import {
+ SymfonyInsightBase,
+ keywords,
+ gradeColors,
+} from './symfony-insight-base.js'
const gradeStars = {
none: 0,
@@ -51,4 +55,4 @@ export default class SymfonyInsightStars extends SymfonyInsightBase {
const { grade, status } = this.transform({ data })
return this.constructor.render({ grade, status })
}
-};
+}
diff --git a/services/symfony/symfony-insight-stars.tester.js b/services/symfony/symfony-insight-stars.tester.js
index c5068a4bab1af..0370fb01f2055 100644
--- a/services/symfony/symfony-insight-stars.tester.js
+++ b/services/symfony/symfony-insight-stars.tester.js
@@ -1,6 +1,6 @@
-import {createServiceTester} from '../tester.js'
-import {withRegex} from '../test-validators.js';
-import {sampleProjectUuid, noSymfonyToken} from './symfony-test-helpers.js';
+import { createServiceTester } from '../tester.js'
+import { withRegex } from '../test-validators.js'
+import { sampleProjectUuid, noSymfonyToken } from './symfony-test-helpers.js'
export const t = await createServiceTester()
t.create('valid project stars')
diff --git a/services/symfony/symfony-insight-violations.service.js b/services/symfony/symfony-insight-violations.service.js
index 47c86bfa08af8..b620286b254c4 100644
--- a/services/symfony/symfony-insight-violations.service.js
+++ b/services/symfony/symfony-insight-violations.service.js
@@ -1,4 +1,4 @@
-import {SymfonyInsightBase, keywords} from './symfony-insight-base.js';
+import { SymfonyInsightBase, keywords } from './symfony-insight-base.js'
export default class SymfonyInsightViolations extends SymfonyInsightBase {
static route = {
@@ -76,4 +76,4 @@ export default class SymfonyInsightViolations extends SymfonyInsightBase {
const lastAnalysis = this.transform({ data })
return this.constructor.render(lastAnalysis)
}
-};
+}
diff --git a/services/symfony/symfony-insight-violations.tester.js b/services/symfony/symfony-insight-violations.tester.js
index 4d858fe62fad3..f35a9bbc63762 100644
--- a/services/symfony/symfony-insight-violations.tester.js
+++ b/services/symfony/symfony-insight-violations.tester.js
@@ -1,6 +1,6 @@
-import {createServiceTester} from '../tester.js'
-import {withRegex} from '../test-validators.js';
-import {sampleProjectUuid, noSymfonyToken} from './symfony-test-helpers.js';
+import { createServiceTester } from '../tester.js'
+import { withRegex } from '../test-validators.js'
+import { sampleProjectUuid, noSymfonyToken } from './symfony-test-helpers.js'
export const t = await createServiceTester()
t.create('valid project violations')
diff --git a/services/symfony/symfony-insight.spec.js b/services/symfony/symfony-insight.spec.js
index 40c55105ff76a..ea9855d96878b 100644
--- a/services/symfony/symfony-insight.spec.js
+++ b/services/symfony/symfony-insight.spec.js
@@ -1,10 +1,27 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import SymfonyInsightGrade from './symfony-insight-grade.service.js';
-import SymfonyInsightStars from './symfony-insight-stars.service.js';
-import SymfonyInsightViolations from './symfony-insight-violations.service.js';
-import {sampleProjectUuid as projectUuid, runningMockResponse, platinumMockResponse, goldMockResponse, silverMockResponse, bronzeMockResponse, noMedalMockResponse, noGradeMockResponse, criticalViolation, majorViolation, minorViolation, infoViolation, multipleViolations, user, token, config} from './symfony-test-helpers.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import SymfonyInsightGrade from './symfony-insight-grade.service.js'
+import SymfonyInsightStars from './symfony-insight-stars.service.js'
+import SymfonyInsightViolations from './symfony-insight-violations.service.js'
+import {
+ sampleProjectUuid as projectUuid,
+ runningMockResponse,
+ platinumMockResponse,
+ goldMockResponse,
+ silverMockResponse,
+ bronzeMockResponse,
+ noMedalMockResponse,
+ noGradeMockResponse,
+ criticalViolation,
+ majorViolation,
+ minorViolation,
+ infoViolation,
+ multipleViolations,
+ user,
+ token,
+ config,
+} from './symfony-test-helpers.js'
// These tests are organized in a fairly unusual way because the service uses
// XML, so it's difficult to decouple the parsing from the transform + render.
diff --git a/services/symfony/symfony-test-helpers.js b/services/symfony/symfony-test-helpers.js
index 870ade4533d6e..3b8e3f7f64bbb 100644
--- a/services/symfony/symfony-test-helpers.js
+++ b/services/symfony/symfony-test-helpers.js
@@ -1,5 +1,5 @@
-import {noToken} from '../test-helpers.js';
-import {SymfonyInsightBase} from './symfony-insight-base.js';
+import { noToken } from '../test-helpers.js'
+import { SymfonyInsightBase } from './symfony-insight-base.js'
const sampleProjectUuid = '825be328-29f8-44f7-a750-f82818ae9111'
@@ -106,4 +106,4 @@ export {
token,
config,
noSymfonyToken,
-};
+}
diff --git a/services/teamcity/teamcity-base.js b/services/teamcity/teamcity-base.js
index d1769d58663c2..1e811a7aef5c6 100644
--- a/services/teamcity/teamcity-base.js
+++ b/services/teamcity/teamcity-base.js
@@ -1,4 +1,4 @@
-import {BaseJsonService} from '../index.js';
+import { BaseJsonService } from '../index.js'
export default class TeamCityBase extends BaseJsonService {
static auth = {
@@ -23,4 +23,4 @@ export default class TeamCityBase extends BaseJsonService {
})
)
}
-};
+}
diff --git a/services/teamcity/teamcity-build-redirect.service.js b/services/teamcity/teamcity-build-redirect.service.js
index 865a973a89868..bb63122228c5c 100644
--- a/services/teamcity/teamcity-build-redirect.service.js
+++ b/services/teamcity/teamcity-build-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
const commonAttrs = {
dateAdded: new Date('2019-09-15'),
@@ -32,4 +32,4 @@ export default [
server: `${protocol}://${hostAndPath}`,
}),
}),
-];
+]
diff --git a/services/teamcity/teamcity-build-redirect.tester.js b/services/teamcity/teamcity-build-redirect.tester.js
index 117df1ab95900..c3f20425bbf24 100644
--- a/services/teamcity/teamcity-build-redirect.tester.js
+++ b/services/teamcity/teamcity-build-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'TeamCityBuildRedirect',
diff --git a/services/teamcity/teamcity-build.service.js b/services/teamcity/teamcity-build.service.js
index dd401d18a6eb9..bf90c10979a8f 100644
--- a/services/teamcity/teamcity-build.service.js
+++ b/services/teamcity/teamcity-build.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {optionalUrl} from '../validators.js';
-import TeamCityBase from './teamcity-base.js';
+import Joi from 'joi'
+import { optionalUrl } from '../validators.js'
+import TeamCityBase from './teamcity-base.js'
const buildStatusSchema = Joi.object({
status: Joi.equal('SUCCESS', 'FAILURE', 'ERROR').required(),
@@ -94,4 +94,4 @@ export default class TeamCityBuild extends TeamCityBase {
useVerbose,
})
}
-};
+}
diff --git a/services/teamcity/teamcity-build.spec.js b/services/teamcity/teamcity-build.spec.js
index 693779c6ad30e..f81599a62e3b7 100644
--- a/services/teamcity/teamcity-build.spec.js
+++ b/services/teamcity/teamcity-build.spec.js
@@ -1,8 +1,8 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import TeamCityBuild from './teamcity-build.service.js';
-import {user, pass, host, config} from './teamcity-test-helpers.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import TeamCityBuild from './teamcity-build.service.js'
+import { user, pass, host, config } from './teamcity-test-helpers.js'
describe('TeamCityBuild', function () {
cleanUpNockAfterEach()
diff --git a/services/teamcity/teamcity-build.tester.js b/services/teamcity/teamcity-build.tester.js
index 10009fae49c78..3fcbb217e8b1e 100644
--- a/services/teamcity/teamcity-build.tester.js
+++ b/services/teamcity/teamcity-build.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {withRegex} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { withRegex } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const buildStatusValues = Joi.equal('passing', 'failure', 'error').required()
diff --git a/services/teamcity/teamcity-coverage-redirect.service.js b/services/teamcity/teamcity-coverage-redirect.service.js
index 400b436697164..5c989dea9e647 100644
--- a/services/teamcity/teamcity-coverage-redirect.service.js
+++ b/services/teamcity/teamcity-coverage-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
redirector({
@@ -13,4 +13,4 @@ export default [
}),
dateAdded: new Date('2019-09-15'),
}),
-];
+]
diff --git a/services/teamcity/teamcity-coverage-redirect.tester.js b/services/teamcity/teamcity-coverage-redirect.tester.js
index 7853711679f76..aeb6ce0068c27 100644
--- a/services/teamcity/teamcity-coverage-redirect.tester.js
+++ b/services/teamcity/teamcity-coverage-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'TeamCityCoverageRedirect',
diff --git a/services/teamcity/teamcity-coverage.service.js b/services/teamcity/teamcity-coverage.service.js
index 8909d4dcbde47..8737da79e91c5 100644
--- a/services/teamcity/teamcity-coverage.service.js
+++ b/services/teamcity/teamcity-coverage.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {coveragePercentage} from '../color-formatters.js';
-import {optionalUrl} from '../validators.js';
-import {InvalidResponse} from '../index.js';
-import TeamCityBase from './teamcity-base.js';
+import Joi from 'joi'
+import { coveragePercentage } from '../color-formatters.js'
+import { optionalUrl } from '../validators.js'
+import { InvalidResponse } from '../index.js'
+import TeamCityBase from './teamcity-base.js'
const buildStatisticsSchema = Joi.object({
property: Joi.array()
@@ -87,4 +87,4 @@ export default class TeamCityCoverage extends TeamCityBase {
const { coverage } = this.transform({ data })
return this.constructor.render({ coverage })
}
-};
+}
diff --git a/services/teamcity/teamcity-coverage.spec.js b/services/teamcity/teamcity-coverage.spec.js
index 49bc77b9aef3b..f0fc578371af8 100644
--- a/services/teamcity/teamcity-coverage.spec.js
+++ b/services/teamcity/teamcity-coverage.spec.js
@@ -1,8 +1,8 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import TeamCityCoverage from './teamcity-coverage.service.js';
-import {user, pass, host, config} from './teamcity-test-helpers.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import TeamCityCoverage from './teamcity-coverage.service.js'
+import { user, pass, host, config } from './teamcity-test-helpers.js'
describe('TeamCityCoverage', function () {
cleanUpNockAfterEach()
diff --git a/services/teamcity/teamcity-coverage.tester.js b/services/teamcity/teamcity-coverage.tester.js
index 7867c19d994d8..7a0c0387baab7 100644
--- a/services/teamcity/teamcity-coverage.tester.js
+++ b/services/teamcity/teamcity-coverage.tester.js
@@ -1,5 +1,5 @@
-import {isIntegerPercentage} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('invalid buildId')
diff --git a/services/teamcity/teamcity-test-helpers.js b/services/teamcity/teamcity-test-helpers.js
index 5ee1e61c3add0..655a16cbd94fb 100644
--- a/services/teamcity/teamcity-test-helpers.js
+++ b/services/teamcity/teamcity-test-helpers.js
@@ -15,9 +15,4 @@ const config = {
},
}
-export {
- user,
- pass,
- host,
- config,
-};
+export { user, pass, host, config }
diff --git a/services/test-helpers.js b/services/test-helpers.js
index b1687e245990d..0896cf57d5935 100644
--- a/services/test-helpers.js
+++ b/services/test-helpers.js
@@ -1,7 +1,7 @@
-import nock from 'nock';
-import request from 'request';
-import config from 'config';
-import {promisify} from '../core/base-service/legacy-request-handler.js';
+import nock from 'nock'
+import request from 'request'
+import config from 'config'
+import { promisify } from '../core/base-service/legacy-request-handler.js'
const runnerConfig = config.util.toObject()
function cleanUpNockAfterEach() {
@@ -35,9 +35,4 @@ const sendAndCacheRequest = promisify(request)
const defaultContext = { sendAndCacheRequest }
-export {
- cleanUpNockAfterEach,
- noToken,
- sendAndCacheRequest,
- defaultContext,
-};
+export { cleanUpNockAfterEach, noToken, sendAndCacheRequest, defaultContext }
diff --git a/services/test-results.js b/services/test-results.js
index 9b605509674cf..84f6831762087 100644
--- a/services/test-results.js
+++ b/services/test-results.js
@@ -1,4 +1,4 @@
-import Joi from 'joi';
+import Joi from 'joi'
const testResultQueryParamSchema = Joi.object({
compact_message: Joi.equal(''),
@@ -109,4 +109,4 @@ export {
renderTestResultMessage,
renderTestResultBadge,
documentation,
-};
+}
diff --git a/services/test-results.spec.js b/services/test-results.spec.js
index e9df50bda1e0c..d9c337676092c 100644
--- a/services/test-results.spec.js
+++ b/services/test-results.spec.js
@@ -1,5 +1,8 @@
-import {test, given} from 'sazerac';
-import {renderTestResultMessage, renderTestResultBadge} from './test-results.js';
+import { test, given } from 'sazerac'
+import {
+ renderTestResultMessage,
+ renderTestResultBadge,
+} from './test-results.js'
describe('Test result helpers', function () {
function renderBothStyles(props) {
diff --git a/services/test-validators.js b/services/test-validators.js
index c10236eef0bfb..25abd819fc48a 100644
--- a/services/test-validators.js
+++ b/services/test-validators.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {semver as isSemver} from './validators.js';
+import Joi from 'joi'
+import { semver as isSemver } from './validators.js'
/*
Note:
@@ -167,4 +167,4 @@ export {
isCustomCompactTestTotals,
makeTestTotalsValidator,
makeCompactTestTotalsValidator,
-};
+}
diff --git a/services/tester.js b/services/tester.js
index 5ed9f88fe0433..1eead4670f29d 100644
--- a/services/tester.js
+++ b/services/tester.js
@@ -1,7 +1,4 @@
-import createServiceTester from '../core/service-test-runner/create-service-tester.js';
-import ServiceTester from '../core/service-test-runner/service-tester.js';
+import createServiceTester from '../core/service-test-runner/create-service-tester.js'
+import ServiceTester from '../core/service-test-runner/service-tester.js'
-export {
- createServiceTester,
- ServiceTester,
-};
+export { createServiceTester, ServiceTester }
diff --git a/services/testspace/testspace-base.js b/services/testspace/testspace-base.js
index 16e038f54ebb1..1bb0d209a7353 100644
--- a/services/testspace/testspace-base.js
+++ b/services/testspace/testspace-base.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService, NotFound } from '../index.js'
// https://help.testspace.com/docs/reference/web-api#list-results
// case_counts|array|The contained cases [passed, failed, na, errored]|counters of result
@@ -56,4 +56,4 @@ export default class TestspaceBase extends BaseJsonService {
return { passed, failed, skipped, errored, total }
}
-};
+}
diff --git a/services/testspace/testspace-base.spec.js b/services/testspace/testspace-base.spec.js
index 9ffb803096f20..ff55a819653ce 100644
--- a/services/testspace/testspace-base.spec.js
+++ b/services/testspace/testspace-base.spec.js
@@ -1,6 +1,6 @@
-import {expect} from 'chai';
-import {NotFound} from '../index.js';
-import TestspaceBase from './testspace-base.js';
+import { expect } from 'chai'
+import { NotFound } from '../index.js'
+import TestspaceBase from './testspace-base.js'
describe('TestspaceBase', function () {
it('throws NotFound when response is missing space results', function () {
diff --git a/services/testspace/testspace-test-count.service.js b/services/testspace/testspace-test-count.service.js
index da4afc14d28f7..0a217254357b8 100644
--- a/services/testspace/testspace-test-count.service.js
+++ b/services/testspace/testspace-test-count.service.js
@@ -1,5 +1,5 @@
-import {metric as metricCount} from '../text-formatters.js';
-import TestspaceBase from './testspace-base.js';
+import { metric as metricCount } from '../text-formatters.js'
+import TestspaceBase from './testspace-base.js'
export default class TestspaceTestCount extends TestspaceBase {
static route = {
@@ -59,4 +59,4 @@ export default class TestspaceTestCount extends TestspaceBase {
const { value } = this.transform({ json, metric })
return this.constructor.render({ value, metric })
}
-};
+}
diff --git a/services/testspace/testspace-test-count.spec.js b/services/testspace/testspace-test-count.spec.js
index a1524f91bc7da..cb6b59b06e0fc 100644
--- a/services/testspace/testspace-test-count.spec.js
+++ b/services/testspace/testspace-test-count.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import TestspaceTestCount from './testspace-test-count.service.js';
+import { test, given } from 'sazerac'
+import TestspaceTestCount from './testspace-test-count.service.js'
describe('TestspaceTestCount', function () {
test(TestspaceTestCount.render, () => {
diff --git a/services/testspace/testspace-test-count.tester.js b/services/testspace/testspace-test-count.tester.js
index 32d47a1ecd36d..2ca45d6486096 100644
--- a/services/testspace/testspace-test-count.tester.js
+++ b/services/testspace/testspace-test-count.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
-import {isMetric} from '../test-validators.js';
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
+import { isMetric } from '../test-validators.js'
export const t = await createServiceTester()
const isMetricAllowZero = Joi.alternatives(
isMetric,
diff --git a/services/testspace/testspace-test-pass-ratio.service.js b/services/testspace/testspace-test-pass-ratio.service.js
index a57b73af104f0..ea78e7eaec6c9 100644
--- a/services/testspace/testspace-test-pass-ratio.service.js
+++ b/services/testspace/testspace-test-pass-ratio.service.js
@@ -1,4 +1,4 @@
-import TestspaceBase from './testspace-base.js';
+import TestspaceBase from './testspace-base.js'
export default class TestspacePassRatio extends TestspaceBase {
static route = {
@@ -40,4 +40,4 @@ export default class TestspacePassRatio extends TestspaceBase {
const { passed, total } = this.transform(json)
return this.constructor.render({ passed, total })
}
-};
+}
diff --git a/services/testspace/testspace-test-pass-ratio.spec.js b/services/testspace/testspace-test-pass-ratio.spec.js
index 87c918edd61c3..1aed0d418955e 100644
--- a/services/testspace/testspace-test-pass-ratio.spec.js
+++ b/services/testspace/testspace-test-pass-ratio.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import TestspacePassRatio from './testspace-test-pass-ratio.service.js';
+import { test, given } from 'sazerac'
+import TestspacePassRatio from './testspace-test-pass-ratio.service.js'
describe('TestspacePassRatio', function () {
test(TestspacePassRatio.render, () => {
diff --git a/services/testspace/testspace-test-pass-ratio.tester.js b/services/testspace/testspace-test-pass-ratio.tester.js
index e1ca861205313..4d0de2d72abb0 100644
--- a/services/testspace/testspace-test-pass-ratio.tester.js
+++ b/services/testspace/testspace-test-pass-ratio.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isIntegerPercentage} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isIntegerPercentage } from '../test-validators.js'
export const t = await createServiceTester()
t.create('Non-existent or unauthorized org')
diff --git a/services/testspace/testspace-test-summary.service.js b/services/testspace/testspace-test-summary.service.js
index 8e04fbf1d189d..f5176012a815b 100644
--- a/services/testspace/testspace-test-summary.service.js
+++ b/services/testspace/testspace-test-summary.service.js
@@ -1,5 +1,9 @@
-import {documentation, testResultQueryParamSchema, renderTestResultBadge} from '../test-results.js';
-import TestspaceBase from './testspace-base.js';
+import {
+ documentation,
+ testResultQueryParamSchema,
+ renderTestResultBadge,
+} from '../test-results.js'
+import TestspaceBase from './testspace-base.js'
export default class TestspaceTests extends TestspaceBase {
static route = {
@@ -94,4 +98,4 @@ export default class TestspaceTests extends TestspaceBase {
skippedLabel,
})
}
-};
+}
diff --git a/services/testspace/testspace-test-summary.tester.js b/services/testspace/testspace-test-summary.tester.js
index 760eefcd36775..2a4bc4ccf02a5 100644
--- a/services/testspace/testspace-test-summary.tester.js
+++ b/services/testspace/testspace-test-summary.tester.js
@@ -1,5 +1,10 @@
-import {createServiceTester} from '../tester.js'
-import {isDefaultTestTotals, isDefaultCompactTestTotals, isCustomTestTotals, isCustomCompactTestTotals} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import {
+ isDefaultTestTotals,
+ isDefaultCompactTestTotals,
+ isCustomTestTotals,
+ isCustomCompactTestTotals,
+} from '../test-validators.js'
export const t = await createServiceTester()
t.create('Tests')
diff --git a/services/text-formatters.js b/services/text-formatters.js
index 8bf9c259950bd..50525fd6debda 100644
--- a/services/text-formatters.js
+++ b/services/text-formatters.js
@@ -2,7 +2,7 @@
* Commonly-used functions for formatting text in badge labels. Includes
* ordinal numbers, currency codes, star ratings, versions, etc.
*/
-import moment from 'moment';
+import moment from 'moment'
moment().format()
function starRating(rating, max = 5) {
@@ -132,4 +132,4 @@ export {
maybePluralize,
formatDate,
formatRelativeDate,
-};
+}
diff --git a/services/text-formatters.spec.js b/services/text-formatters.spec.js
index af2e5a2c3281d..efcfae4c15b96 100644
--- a/services/text-formatters.spec.js
+++ b/services/text-formatters.spec.js
@@ -1,6 +1,16 @@
-import {test, given} from 'sazerac';
-import sinon from 'sinon';
-import {starRating, currencyFromCode, ordinalNumber, metric, omitv, addv, maybePluralize, formatDate, formatRelativeDate} from './text-formatters.js';
+import { test, given } from 'sazerac'
+import sinon from 'sinon'
+import {
+ starRating,
+ currencyFromCode,
+ ordinalNumber,
+ metric,
+ omitv,
+ addv,
+ maybePluralize,
+ formatDate,
+ formatRelativeDate,
+} from './text-formatters.js'
describe('Text formatters', function () {
test(starRating, () => {
diff --git a/services/tokei/tokei.service.js b/services/tokei/tokei.service.js
index 0b207358ebaad..dd01918b8d404 100644
--- a/services/tokei/tokei.service.js
+++ b/services/tokei/tokei.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
lines: nonNegativeInteger,
@@ -75,4 +75,4 @@ export default class Tokei extends BaseJsonService {
const { lines } = await this.fetch({ provider, user, repo })
return this.constructor.render({ lines })
}
-};
+}
diff --git a/services/tokei/tokei.tester.js b/services/tokei/tokei.tester.js
index 27a71c92c7fb6..9671c7b58848b 100644
--- a/services/tokei/tokei.tester.js
+++ b/services/tokei/tokei.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isMetric} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isMetric } from '../test-validators.js'
export const t = new ServiceTester({ id: 'tokei', title: 'Tokei LOC Tests' })
diff --git a/services/travis/travis-build.service.js b/services/travis/travis-build.service.js
index 4acb847d62b62..2c52799588a4c 100644
--- a/services/travis/travis-build.service.js
+++ b/services/travis/travis-build.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseSvgScrapingService} from '../index.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { BaseSvgScrapingService } from '../index.js'
const schema = Joi.object({
message: Joi.alternatives()
@@ -84,4 +84,4 @@ export default class TravisBuild extends BaseSvgScrapingService {
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/travis/travis-build.tester.js b/services/travis/travis-build.tester.js
index ca4b9c9aadcbb..f6bd4df392f79 100644
--- a/services/travis/travis-build.tester.js
+++ b/services/travis/travis-build.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// Travis (.org) CI
diff --git a/services/travis/travis-php-version-redirect.service.js b/services/travis/travis-php-version-redirect.service.js
index 3f292fbd9f3e0..a61b4467fcff9 100644
--- a/services/travis/travis-php-version-redirect.service.js
+++ b/services/travis/travis-php-version-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
const ciRedirect = redirector({
category: 'platform-support',
@@ -23,4 +23,4 @@ const branchRedirect = redirector({
dateAdded: new Date('2020-07-12'),
})
-export { ciRedirect, branchRedirect };
+export { ciRedirect, branchRedirect }
diff --git a/services/travis/travis-php-version-redirect.tester.js b/services/travis/travis-php-version-redirect.tester.js
index 997c84862ffe3..4326a1175d3dc 100644
--- a/services/travis/travis-php-version-redirect.tester.js
+++ b/services/travis/travis-php-version-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'TravisPhpVersionRedirect',
diff --git a/services/travis/travis-php-version.service.js b/services/travis/travis-php-version.service.js
index e03fc9b578b0d..f8a29a39cd76d 100644
--- a/services/travis/travis-php-version.service.js
+++ b/services/travis/travis-php-version.service.js
@@ -1,6 +1,10 @@
-import Joi from 'joi';
-import {minorVersion, versionReduction, getPhpReleases} from '../php-version.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import {
+ minorVersion,
+ versionReduction,
+ getPhpReleases,
+} from '../php-version.js'
+import { BaseJsonService } from '../index.js'
const optionalNumberOrString = Joi.alternatives(Joi.string(), Joi.number())
const schema = Joi.object({
@@ -93,4 +97,4 @@ export default class TravisPhpVersion extends BaseJsonService {
const { reduction, hasHhvm } = await this.transform(travisConfig)
return this.constructor.render({ reduction, hasHhvm })
}
-};
+}
diff --git a/services/travis/travis-php-version.tester.js b/services/travis/travis-php-version.tester.js
index 7819f3f5d47f5..16a23bd0c5183 100644
--- a/services/travis/travis-php-version.tester.js
+++ b/services/travis/travis-php-version.tester.js
@@ -1,5 +1,5 @@
-import {isPhpVersionReduction} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isPhpVersionReduction } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets the package version of symfony 5.1')
diff --git a/services/treeware/treeware-trees.service.js b/services/treeware/treeware-trees.service.js
index f5487f54c50a9..1fcbc10125cfb 100644
--- a/services/treeware/treeware-trees.service.js
+++ b/services/treeware/treeware-trees.service.js
@@ -1,8 +1,8 @@
-import crypto from 'crypto';
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {floorCount} from '../color-formatters.js';
-import {BaseJsonService} from '../index.js';
+import crypto from 'crypto'
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { floorCount } from '../color-formatters.js'
+import { BaseJsonService } from '../index.js'
const apiSchema = Joi.object({
total: Joi.number().required(),
@@ -52,4 +52,4 @@ export default class TreewareTrees extends BaseJsonService {
return this.constructor.render({ count: total })
}
-};
+}
diff --git a/services/treeware/treeware-trees.tester.js b/services/treeware/treeware-trees.tester.js
index 5b61e45ee8d3e..07ada0cf8de39 100644
--- a/services/treeware/treeware-trees.tester.js
+++ b/services/treeware/treeware-trees.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isMetric} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isMetric } from '../test-validators.js'
export const t = await createServiceTester()
t.create('request for existing package')
diff --git a/services/twitch/twitch-base.js b/services/twitch/twitch-base.js
index b11a03ffb0157..85d4e6b08303f 100644
--- a/services/twitch/twitch-base.js
+++ b/services/twitch/twitch-base.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const tokenSchema = Joi.object({
access_token: Joi.string().required(),
@@ -112,4 +112,4 @@ export default class TwitchBase extends BaseJsonService {
// one last time
return super._requestJson(request)
}
-};
+}
diff --git a/services/twitch/twitch.service.js b/services/twitch/twitch.service.js
index bca06c5712ff0..402f7e52cc459 100644
--- a/services/twitch/twitch.service.js
+++ b/services/twitch/twitch.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import TwitchBase from './twitch-base.js';
+import Joi from 'joi'
+import TwitchBase from './twitch-base.js'
const helixSchema = Joi.object({
data: Joi.array().required(),
@@ -64,4 +64,4 @@ export default class TwitchStatus extends TwitchBase {
const data = await this.fetch({ user })
return this.constructor.render({ user, isLive: data.data.length > 0 })
}
-};
+}
diff --git a/services/twitch/twitch.spec.js b/services/twitch/twitch.spec.js
index 74b8d7705975c..c3ec31522eb66 100644
--- a/services/twitch/twitch.spec.js
+++ b/services/twitch/twitch.spec.js
@@ -1,7 +1,7 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import TwitchStatus from './twitch.service.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import TwitchStatus from './twitch.service.js'
describe('TwitchStatus', function () {
describe('auth', function () {
diff --git a/services/twitch/twitch.tester.js b/services/twitch/twitch.tester.js
index e9e2fbcc41695..9f68a1d82caae 100644
--- a/services/twitch/twitch.tester.js
+++ b/services/twitch/twitch.tester.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
-import {noToken} from '../test-helpers.js';
-import _noTwitchToken from './twitch.service.js';
-const noTwitchToken = noToken(_noTwitchToken);
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
+import { noToken } from '../test-helpers.js'
+import _noTwitchToken from './twitch.service.js'
+const noTwitchToken = noToken(_noTwitchToken)
export const t = new ServiceTester({
id: 'twitch',
diff --git a/services/twitter/twitter-redirect.service.js b/services/twitter/twitter-redirect.service.js
index 29b85ac1e796d..5291115dbdf43 100644
--- a/services/twitter/twitter-redirect.service.js
+++ b/services/twitter/twitter-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default [
redirector({
@@ -14,4 +14,4 @@ export default [
}),
dateAdded: new Date('2019-09-17'),
}),
-];
+]
diff --git a/services/twitter/twitter-redirect.tester.js b/services/twitter/twitter-redirect.tester.js
index b479d4b808ca0..e777d9a5bee72 100644
--- a/services/twitter/twitter-redirect.tester.js
+++ b/services/twitter/twitter-redirect.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'TwitterUrlRedirect',
diff --git a/services/twitter/twitter.service.js b/services/twitter/twitter.service.js
index 013a9f21b1fd1..2da76486a0846 100644
--- a/services/twitter/twitter.service.js
+++ b/services/twitter/twitter.service.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {optionalUrl} from '../validators.js';
-import {BaseService, BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { optionalUrl } from '../validators.js'
+import { BaseService, BaseJsonService, NotFound } from '../index.js'
const queryParamSchema = Joi.object({
url: optionalUrl.required(),
@@ -113,4 +113,4 @@ class TwitterFollow extends BaseJsonService {
}
}
-export default [TwitterUrl, TwitterFollow];
+export default [TwitterUrl, TwitterFollow]
diff --git a/services/twitter/twitter.tester.js b/services/twitter/twitter.tester.js
index 1243440450594..e15b79f08f4dd 100644
--- a/services/twitter/twitter.tester.js
+++ b/services/twitter/twitter.tester.js
@@ -1,5 +1,5 @@
-import {isMetric} from '../test-validators.js';
-import {ServiceTester} from '../tester.js';
+import { isMetric } from '../test-validators.js'
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'twitter',
diff --git a/services/ubuntu/ubuntu.service.js b/services/ubuntu/ubuntu.service.js
index 7f85fbeeaf5d4..c584c95503edc 100644
--- a/services/ubuntu/ubuntu.service.js
+++ b/services/ubuntu/ubuntu.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import { BaseJsonService, NotFound } from '../index.js'
const schema = Joi.object({
entries: Joi.array()
@@ -68,4 +68,4 @@ export default class Ubuntu extends BaseJsonService {
version: data.entries[0].source_package_version,
})
}
-};
+}
diff --git a/services/ubuntu/ubuntu.tester.js b/services/ubuntu/ubuntu.tester.js
index 244b7871d0839..c622493075b08 100644
--- a/services/ubuntu/ubuntu.tester.js
+++ b/services/ubuntu/ubuntu.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isUbuntuVersion = Joi.string().regex(
diff --git a/services/uptimerobot/uptimerobot-base.js b/services/uptimerobot/uptimerobot-base.js
index eb972726a5903..2afa607b9fa70 100644
--- a/services/uptimerobot/uptimerobot-base.js
+++ b/services/uptimerobot/uptimerobot-base.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService, InvalidParameter, InvalidResponse} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService, InvalidParameter, InvalidResponse } from '../index.js'
// https://uptimerobot.com/api
// POST getMonitors
@@ -83,4 +83,4 @@ export default class UptimeRobotBase extends BaseJsonService {
return { monitors }
}
-};
+}
diff --git a/services/uptimerobot/uptimerobot-ratio.service.js b/services/uptimerobot/uptimerobot-ratio.service.js
index 64b5bad074e70..fa98e8ed1fd05 100644
--- a/services/uptimerobot/uptimerobot-ratio.service.js
+++ b/services/uptimerobot/uptimerobot-ratio.service.js
@@ -1,5 +1,5 @@
-import {colorScale} from '../color-formatters.js';
-import UptimeRobotBase from './uptimerobot-base.js';
+import { colorScale } from '../color-formatters.js'
+import UptimeRobotBase from './uptimerobot-base.js'
const ratioColor = colorScale([10, 30, 50, 70])
@@ -44,4 +44,4 @@ export default class UptimeRobotRatio extends UptimeRobotBase {
const ratio = Number.parseFloat(monitors[0].custom_uptime_ratio)
return this.constructor.render({ ratio })
}
-};
+}
diff --git a/services/uptimerobot/uptimerobot-ratio.tester.js b/services/uptimerobot/uptimerobot-ratio.tester.js
index 83dc62262fd20..db6b55c9da933 100644
--- a/services/uptimerobot/uptimerobot-ratio.tester.js
+++ b/services/uptimerobot/uptimerobot-ratio.tester.js
@@ -1,6 +1,6 @@
-import {isPercentage} from '../test-validators.js';
-import {invalidJSON} from '../response-fixtures.js';
-import {createServiceTester} from '../tester.js'
+import { isPercentage } from '../test-validators.js'
+import { invalidJSON } from '../response-fixtures.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Uptime Robot: Percentage (valid)')
diff --git a/services/uptimerobot/uptimerobot-status.service.js b/services/uptimerobot/uptimerobot-status.service.js
index 71a34f443f79c..a468175c42b62 100644
--- a/services/uptimerobot/uptimerobot-status.service.js
+++ b/services/uptimerobot/uptimerobot-status.service.js
@@ -1,4 +1,4 @@
-import UptimeRobotBase from './uptimerobot-base.js';
+import UptimeRobotBase from './uptimerobot-base.js'
export default class UptimeRobotStatus extends UptimeRobotBase {
static route = {
@@ -42,4 +42,4 @@ export default class UptimeRobotStatus extends UptimeRobotBase {
const { status } = monitors[0]
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/uptimerobot/uptimerobot-status.tester.js b/services/uptimerobot/uptimerobot-status.tester.js
index 94f6d12ade2c2..dca7e92554e3d 100644
--- a/services/uptimerobot/uptimerobot-status.tester.js
+++ b/services/uptimerobot/uptimerobot-status.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {invalidJSON} from '../response-fixtures.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { invalidJSON } from '../response-fixtures.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isUptimeStatus = Joi.string().valid(
diff --git a/services/vaadin-directory/vaadin-directory-base.js b/services/vaadin-directory/vaadin-directory-base.js
index 26a58fe31d1a4..b567df2b3177e 100644
--- a/services/vaadin-directory/vaadin-directory-base.js
+++ b/services/vaadin-directory/vaadin-directory-base.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
ratingCount: nonNegativeInteger,
@@ -27,4 +27,4 @@ class BaseVaadinDirectoryService extends BaseJsonService {
}
}
-export { BaseVaadinDirectoryService };
+export { BaseVaadinDirectoryService }
diff --git a/services/vaadin-directory/vaadin-directory-rating-count.service.js b/services/vaadin-directory/vaadin-directory-rating-count.service.js
index 617c1c42b4495..e8af652c66d28 100644
--- a/services/vaadin-directory/vaadin-directory-rating-count.service.js
+++ b/services/vaadin-directory/vaadin-directory-rating-count.service.js
@@ -1,10 +1,8 @@
-import {metric} from '../text-formatters.js';
-import {floorCount as floorCountColor} from '../color-formatters.js';
-import {BaseVaadinDirectoryService} from './vaadin-directory-base.js';
+import { metric } from '../text-formatters.js'
+import { floorCount as floorCountColor } from '../color-formatters.js'
+import { BaseVaadinDirectoryService } from './vaadin-directory-base.js'
-export default class VaadinDirectoryRatingCount extends (
- BaseVaadinDirectoryService
-) {
+export default class VaadinDirectoryRatingCount extends BaseVaadinDirectoryService {
static category = 'rating'
static route = {
@@ -37,4 +35,4 @@ export default class VaadinDirectoryRatingCount extends (
const { ratingCount } = await this.fetch({ packageName })
return this.constructor.render({ ratingCount })
}
-};
+}
diff --git a/services/vaadin-directory/vaadin-directory-rating-count.tester.js b/services/vaadin-directory/vaadin-directory-rating-count.tester.js
index 89728d433e996..8b43ed993cb71 100644
--- a/services/vaadin-directory/vaadin-directory-rating-count.tester.js
+++ b/services/vaadin-directory/vaadin-directory-rating-count.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('rating count of component')
diff --git a/services/vaadin-directory/vaadin-directory-rating.service.js b/services/vaadin-directory/vaadin-directory-rating.service.js
index f2875eaa7f4ce..c07ddf091b099 100644
--- a/services/vaadin-directory/vaadin-directory-rating.service.js
+++ b/services/vaadin-directory/vaadin-directory-rating.service.js
@@ -1,10 +1,8 @@
-import {starRating} from '../text-formatters.js';
-import {floorCount as floorCountColor} from '../color-formatters.js';
-import {BaseVaadinDirectoryService} from './vaadin-directory-base.js';
+import { starRating } from '../text-formatters.js'
+import { floorCount as floorCountColor } from '../color-formatters.js'
+import { BaseVaadinDirectoryService } from './vaadin-directory-base.js'
-export default class VaadinDirectoryRating extends (
- BaseVaadinDirectoryService
-) {
+export default class VaadinDirectoryRating extends BaseVaadinDirectoryService {
static category = 'rating'
static route = {
@@ -46,4 +44,4 @@ export default class VaadinDirectoryRating extends (
const { averageRating } = await this.fetch({ packageName })
return this.constructor.render({ format, score: averageRating })
}
-};
+}
diff --git a/services/vaadin-directory/vaadin-directory-rating.tester.js b/services/vaadin-directory/vaadin-directory-rating.tester.js
index 8598086732f8c..e4074eb1e6430 100644
--- a/services/vaadin-directory/vaadin-directory-rating.tester.js
+++ b/services/vaadin-directory/vaadin-directory-rating.tester.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isStarRating} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { isStarRating } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('stars of component displayed in star icons')
diff --git a/services/vaadin-directory/vaadin-directory-release-date.service.js b/services/vaadin-directory/vaadin-directory-release-date.service.js
index 8080b49cab4a5..d9069ca4c9897 100644
--- a/services/vaadin-directory/vaadin-directory-release-date.service.js
+++ b/services/vaadin-directory/vaadin-directory-release-date.service.js
@@ -1,10 +1,8 @@
-import {formatDate} from '../text-formatters.js';
-import {age as ageColor} from '../color-formatters.js';
-import {BaseVaadinDirectoryService} from './vaadin-directory-base.js';
+import { formatDate } from '../text-formatters.js'
+import { age as ageColor } from '../color-formatters.js'
+import { BaseVaadinDirectoryService } from './vaadin-directory-base.js'
-export default class VaadinDirectoryReleaseDate extends (
- BaseVaadinDirectoryService
-) {
+export default class VaadinDirectoryReleaseDate extends BaseVaadinDirectoryService {
static category = 'activity'
static route = {
@@ -36,4 +34,4 @@ export default class VaadinDirectoryReleaseDate extends (
date: data.latestAvailableRelease.publicationDate,
})
}
-};
+}
diff --git a/services/vaadin-directory/vaadin-directory-release-date.tester.js b/services/vaadin-directory/vaadin-directory-release-date.tester.js
index 328aee392d4f4..9c1c68dc64318 100644
--- a/services/vaadin-directory/vaadin-directory-release-date.tester.js
+++ b/services/vaadin-directory/vaadin-directory-release-date.tester.js
@@ -1,5 +1,5 @@
-import {isFormattedDate} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isFormattedDate } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('latest release date of the component (format: yyyy-mm-dd)')
diff --git a/services/vaadin-directory/vaadin-directory-status.service.js b/services/vaadin-directory/vaadin-directory-status.service.js
index a7c3c5ff42621..0ad9186faad5b 100644
--- a/services/vaadin-directory/vaadin-directory-status.service.js
+++ b/services/vaadin-directory/vaadin-directory-status.service.js
@@ -1,8 +1,6 @@
-import {BaseVaadinDirectoryService} from './vaadin-directory-base.js';
+import { BaseVaadinDirectoryService } from './vaadin-directory-base.js'
-export default class VaadinDirectoryStatus extends (
- BaseVaadinDirectoryService
-) {
+export default class VaadinDirectoryStatus extends BaseVaadinDirectoryService {
static category = 'other'
static route = {
@@ -34,4 +32,4 @@ export default class VaadinDirectoryStatus extends (
const { status } = await this.fetch({ packageName })
return this.constructor.render({ status })
}
-};
+}
diff --git a/services/vaadin-directory/vaadin-directory-status.tester.js b/services/vaadin-directory/vaadin-directory-status.tester.js
index 645bb3ea66c57..7caa48c2165fa 100644
--- a/services/vaadin-directory/vaadin-directory-status.tester.js
+++ b/services/vaadin-directory/vaadin-directory-status.tester.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('publish status of the component')
diff --git a/services/vaadin-directory/vaadin-directory-version.service.js b/services/vaadin-directory/vaadin-directory-version.service.js
index c1897383467a3..53af932836ecc 100644
--- a/services/vaadin-directory/vaadin-directory-version.service.js
+++ b/services/vaadin-directory/vaadin-directory-version.service.js
@@ -1,9 +1,7 @@
-import {renderVersionBadge} from '../version.js';
-import {BaseVaadinDirectoryService} from './vaadin-directory-base.js';
+import { renderVersionBadge } from '../version.js'
+import { BaseVaadinDirectoryService } from './vaadin-directory-base.js'
-export default class VaadinDirectoryVersion extends (
- BaseVaadinDirectoryService
-) {
+export default class VaadinDirectoryVersion extends BaseVaadinDirectoryService {
static category = 'version'
static route = {
@@ -30,4 +28,4 @@ export default class VaadinDirectoryVersion extends (
const lv = data.latestAvailableRelease.name.toLowerCase()
return renderVersionBadge({ version: lv })
}
-};
+}
diff --git a/services/vaadin-directory/vaadin-directory-version.tester.js b/services/vaadin-directory/vaadin-directory-version.tester.js
index df18d5a6bb35a..957e6006a5959 100644
--- a/services/vaadin-directory/vaadin-directory-version.tester.js
+++ b/services/vaadin-directory/vaadin-directory-version.tester.js
@@ -1,5 +1,5 @@
-import {isSemver} from '../test-validators.js';
-import {createServiceTester} from '../tester.js'
+import { isSemver } from '../test-validators.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('latest version of the component (can have v prefixed or without)')
diff --git a/services/validators.js b/services/validators.js
index 424c6d4593f35..42b89cd1d10e2 100644
--- a/services/validators.js
+++ b/services/validators.js
@@ -1,4 +1,7 @@
-import {semver as joiSemver, semverRange as joiSemverRange} from 'joi-extension-semver';
+import {
+ semver as joiSemver,
+ semverRange as joiSemverRange,
+} from 'joi-extension-semver'
import joi from 'joi'
const Joi = joi.extend(joiSemver).extend(joiSemverRange)
@@ -6,12 +9,11 @@ const optionalNonNegativeInteger = Joi.number().integer().min(0)
export { optionalNonNegativeInteger }
export const nonNegativeInteger = optionalNonNegativeInteger.required()
-export const anyInteger = Joi.number().integer().required()
-export const semver = Joi.semver().valid().required()
-export const semverRange = Joi.semverRange().valid().required()
-export const optionalDottedVersionNClausesWithOptionalSuffix = Joi.string().regex(
- /^\d+(\.\d+)*([-+].*)?$/
-)
- // TODO This accepts URLs with query strings and fragments, which for some
- // purposes should be rejected.
-export const optionalUrl = Joi.string().uri({ scheme: ['http', 'https'] })
+export const anyInteger = Joi.number().integer().required()
+export const semver = Joi.semver().valid().required()
+export const semverRange = Joi.semverRange().valid().required()
+export const optionalDottedVersionNClausesWithOptionalSuffix =
+ Joi.string().regex(/^\d+(\.\d+)*([-+].*)?$/)
+// TODO This accepts URLs with query strings and fragments, which for some
+// purposes should be rejected.
+export const optionalUrl = Joi.string().uri({ scheme: ['http', 'https'] })
diff --git a/services/version.js b/services/version.js
index 96083258577c6..934b4d8de71d5 100644
--- a/services/version.js
+++ b/services/version.js
@@ -5,9 +5,9 @@
*
* For utilities specific to PHP version ranges, see php-version.js.
*/
-import semver from 'semver';
-import {addv} from './text-formatters.js';
-import {version as versionColor} from './color-formatters.js';
+import semver from 'semver'
+import { addv } from './text-formatters.js'
+import { version as versionColor } from './color-formatters.js'
function listCompare(a, b) {
const alen = a.length
@@ -160,10 +160,4 @@ function renderVersionBadge({ version, tag, defaultLabel }) {
}
}
-export {
- latest,
- listCompare,
- slice,
- rangeStart,
- renderVersionBadge,
-};
+export { latest, listCompare, slice, rangeStart, renderVersionBadge }
diff --git a/services/version.spec.js b/services/version.spec.js
index f8d7c57141ea1..92b040cfa3090 100644
--- a/services/version.spec.js
+++ b/services/version.spec.js
@@ -1,5 +1,5 @@
-import {test, given} from 'sazerac';
-import {latest, slice, rangeStart, renderVersionBadge} from './version.js';
+import { test, given } from 'sazerac'
+import { latest, slice, rangeStart, renderVersionBadge } from './version.js'
const includePre = true
describe('Version helpers', function () {
diff --git a/services/versioneye/versioneye.service.js b/services/versioneye/versioneye.service.js
index 575c7925f9e98..c248e64c43a99 100644
--- a/services/versioneye/versioneye.service.js
+++ b/services/versioneye/versioneye.service.js
@@ -1,4 +1,4 @@
-import {deprecatedService} from '../index.js';
+import { deprecatedService } from '../index.js'
export default deprecatedService({
category: 'downloads',
@@ -8,4 +8,4 @@ export default deprecatedService({
},
label: 'versioneye',
dateAdded: new Date('2018-08-20'),
-});
+})
diff --git a/services/versioneye/versioneye.tester.js b/services/versioneye/versioneye.tester.js
index 3bcfb52c58870..77e17b5dca4e1 100644
--- a/services/versioneye/versioneye.tester.js
+++ b/services/versioneye/versioneye.tester.js
@@ -1,4 +1,4 @@
-import {ServiceTester} from '../tester.js';
+import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({ id: 'versioneye', title: 'VersionEye' })
diff --git a/services/visual-studio-app-center/visual-studio-app-center-base.js b/services/visual-studio-app-center/visual-studio-app-center-base.js
index 46132d1f9c67b..e90a6ee2f368b 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-base.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-base.js
@@ -1,4 +1,4 @@
-import {BaseJsonService} from '../index.js';
+import { BaseJsonService } from '../index.js'
const keywords = [
'visual-studio',
@@ -35,4 +35,4 @@ class BaseVisualStudioAppCenterService extends BaseJsonService {
}
}
-export { keywords, documentation, BaseVisualStudioAppCenterService };
+export { keywords, documentation, BaseVisualStudioAppCenterService }
diff --git a/services/visual-studio-app-center/visual-studio-app-center-builds.service.js b/services/visual-studio-app-center/visual-studio-app-center-builds.service.js
index fcd9ba715d6b9..6b70a31a6f7dd 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-builds.service.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-builds.service.js
@@ -1,15 +1,17 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {NotFound} from '../index.js';
-import {BaseVisualStudioAppCenterService, keywords, documentation} from './visual-studio-app-center-base.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { NotFound } from '../index.js'
+import {
+ BaseVisualStudioAppCenterService,
+ keywords,
+ documentation,
+} from './visual-studio-app-center-base.js'
const schema = Joi.array().items({
result: isBuildStatus.required(),
})
-export default class VisualStudioAppCenterBuilds extends (
- BaseVisualStudioAppCenterService
-) {
+export default class VisualStudioAppCenterBuilds extends BaseVisualStudioAppCenterService {
static category = 'build'
static route = {
@@ -47,4 +49,4 @@ export default class VisualStudioAppCenterBuilds extends (
throw new NotFound({ prettyMessage: 'no builds found' })
return renderBuildStatusBadge({ status: json[0].result })
}
-};
+}
diff --git a/services/visual-studio-app-center/visual-studio-app-center-builds.tester.js b/services/visual-studio-app-center/visual-studio-app-center-builds.tester.js
index f27c84d5ebabc..0a70d24e994d5 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-builds.tester.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-builds.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// Mocked response rather than real data as old builds are deleted after some time.
diff --git a/services/visual-studio-app-center/visual-studio-app-center-releases-osversion.service.js b/services/visual-studio-app-center/visual-studio-app-center-releases-osversion.service.js
index 9185092b94b5e..9f51181597afa 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-releases-osversion.service.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-releases-osversion.service.js
@@ -1,14 +1,16 @@
-import Joi from 'joi';
-import {BaseVisualStudioAppCenterService, keywords, documentation} from './visual-studio-app-center-base.js';
+import Joi from 'joi'
+import {
+ BaseVisualStudioAppCenterService,
+ keywords,
+ documentation,
+} from './visual-studio-app-center-base.js'
const schema = Joi.object({
app_os: Joi.string().required(),
min_os: Joi.string().required(),
}).required()
-export default class VisualStudioAppCenterReleasesOSVersion extends (
- BaseVisualStudioAppCenterService
-) {
+export default class VisualStudioAppCenterReleasesOSVersion extends BaseVisualStudioAppCenterService {
static category = 'version'
static route = {
@@ -51,4 +53,4 @@ export default class VisualStudioAppCenterReleasesOSVersion extends (
})
return this.constructor.render({ appOS, minOS })
}
-};
+}
diff --git a/services/visual-studio-app-center/visual-studio-app-center-releases-osversion.tester.js b/services/visual-studio-app-center/visual-studio-app-center-releases-osversion.tester.js
index ce30a448e4cb3..826bcf1ad863b 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-releases-osversion.tester.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-releases-osversion.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// Note:
diff --git a/services/visual-studio-app-center/visual-studio-app-center-releases-size.service.js b/services/visual-studio-app-center/visual-studio-app-center-releases-size.service.js
index f7c9b064edd00..76dd16ceb6f34 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-releases-size.service.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-releases-size.service.js
@@ -1,15 +1,17 @@
-import Joi from 'joi';
-import prettyBytes from 'pretty-bytes';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseVisualStudioAppCenterService, keywords, documentation} from './visual-studio-app-center-base.js';
+import Joi from 'joi'
+import prettyBytes from 'pretty-bytes'
+import { nonNegativeInteger } from '../validators.js'
+import {
+ BaseVisualStudioAppCenterService,
+ keywords,
+ documentation,
+} from './visual-studio-app-center-base.js'
const schema = Joi.object({
size: nonNegativeInteger,
}).required()
-export default class VisualStudioAppCenterReleasesSize extends (
- BaseVisualStudioAppCenterService
-) {
+export default class VisualStudioAppCenterReleasesSize extends BaseVisualStudioAppCenterService {
static category = 'size'
static route = {
@@ -46,4 +48,4 @@ export default class VisualStudioAppCenterReleasesSize extends (
const { size } = await this.fetch({ owner, app, token, schema })
return this.constructor.render({ size })
}
-};
+}
diff --git a/services/visual-studio-app-center/visual-studio-app-center-releases-size.tester.js b/services/visual-studio-app-center/visual-studio-app-center-releases-size.tester.js
index c0f7bd80f4f99..5a1681a79eab0 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-releases-size.tester.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-releases-size.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isFileSize} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isFileSize } from '../test-validators.js'
export const t = await createServiceTester()
t.create('8368844 bytes to 8.37 megabytes')
diff --git a/services/visual-studio-app-center/visual-studio-app-center-releases-version.service.js b/services/visual-studio-app-center/visual-studio-app-center-releases-version.service.js
index 576aab96fc4a2..a4f90d3096a93 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-releases-version.service.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-releases-version.service.js
@@ -1,15 +1,17 @@
-import Joi from 'joi';
-import {renderVersionBadge} from '../version.js';
-import {BaseVisualStudioAppCenterService, keywords, documentation} from './visual-studio-app-center-base.js';
+import Joi from 'joi'
+import { renderVersionBadge } from '../version.js'
+import {
+ BaseVisualStudioAppCenterService,
+ keywords,
+ documentation,
+} from './visual-studio-app-center-base.js'
const schema = Joi.object({
version: Joi.string().required(),
short_version: Joi.string().required(),
}).required()
-export default class VisualStudioAppCenterReleasesVersion extends (
- BaseVisualStudioAppCenterService
-) {
+export default class VisualStudioAppCenterReleasesVersion extends BaseVisualStudioAppCenterService {
static category = 'version'
static route = {
@@ -46,4 +48,4 @@ export default class VisualStudioAppCenterReleasesVersion extends (
version: `${shortVersion} (${version})`,
})
}
-};
+}
diff --git a/services/visual-studio-app-center/visual-studio-app-center-releases-version.tester.js b/services/visual-studio-app-center/visual-studio-app-center-releases-version.tester.js
index 975ad98ce80b7..49f528a0bfbe8 100644
--- a/services/visual-studio-app-center/visual-studio-app-center-releases-version.tester.js
+++ b/services/visual-studio-app-center/visual-studio-app-center-releases-version.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
// Note:
diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.service.js b/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.service.js
index b1756bf642734..8cfd950274f29 100644
--- a/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.service.js
+++ b/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.service.js
@@ -1,6 +1,6 @@
-import {metric} from '../text-formatters.js';
-import {downloadCount} from '../color-formatters.js';
-import VisualStudioMarketplaceBase from './visual-studio-marketplace-base.js';
+import { metric } from '../text-formatters.js'
+import { downloadCount } from '../color-formatters.js'
+import VisualStudioMarketplaceBase from './visual-studio-marketplace-base.js'
const documentation = `
@@ -12,9 +12,7 @@ const documentation = `
// This service exists separately from the other Marketplace downloads badges (in ./visual-studio-marketplace-downloads.js)
// due differences in how the Marketplace tracks metrics for Azure DevOps extensions vs. other extension types.
// See https://github.com/badges/shields/pull/2748 for more information on the discussion and decision.
-export default class VisualStudioMarketplaceAzureDevOpsInstalls extends (
- VisualStudioMarketplaceBase
-) {
+export default class VisualStudioMarketplaceAzureDevOpsInstalls extends VisualStudioMarketplaceBase {
static category = 'downloads'
static route = {
@@ -60,4 +58,4 @@ export default class VisualStudioMarketplaceAzureDevOpsInstalls extends (
return this.constructor.render({ count: statistics.onpremDownloads })
}
}
-};
+}
diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.tester.js b/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.tester.js
index 800c358f9bd18..f4b209c5460c5 100644
--- a/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.tester.js
+++ b/services/visual-studio-marketplace/visual-studio-marketplace-azure-devops-installs.tester.js
@@ -1,5 +1,5 @@
-import {createServiceTester} from '../tester.js'
-import {isMetric} from '../test-validators.js';
+import { createServiceTester } from '../tester.js'
+import { isMetric } from '../test-validators.js'
export const t = await createServiceTester()
const mockResponse = {
diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-base.js b/services/visual-studio-marketplace/visual-studio-marketplace-base.js
index e07dd0d62b9f5..d25e9c11a2fc7 100644
--- a/services/visual-studio-marketplace/visual-studio-marketplace-base.js
+++ b/services/visual-studio-marketplace/visual-studio-marketplace-base.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import validate from '../../core/base-service/validate.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import validate from '../../core/base-service/validate.js'
+import { BaseJsonService, NotFound } from '../index.js'
const extensionQuerySchema = Joi.object({
results: Joi.array()
@@ -108,4 +108,4 @@ export default class VisualStudioMarketplaceBase extends BaseJsonService {
return { statistics: value }
}
-};
+}
diff --git a/services/visual-studio-marketplace/visual-studio-marketplace-downloads.service.js b/services/visual-studio-marketplace/visual-studio-marketplace-downloads.service.js
index c0848974b7af6..1d90a6275cfa9 100644
--- a/services/visual-studio-marketplace/visual-studio-marketplace-downloads.service.js
+++ b/services/visual-studio-marketplace/visual-studio-marketplace-downloads.service.js
@@ -1,6 +1,6 @@
-import {metric} from '../text-formatters.js';
-import {downloadCount} from '../color-formatters.js';
-import VisualStudioMarketplaceBase from './visual-studio-marketplace-base.js';
+import { metric } from '../text-formatters.js'
+import { downloadCount } from '../color-formatters.js'
+import VisualStudioMarketplaceBase from './visual-studio-marketplace-base.js'
const documentation = `
@@ -11,9 +11,7 @@ const documentation = `
@@ -99,4 +103,4 @@ export default class Website extends BaseService {
downColor,
})
}
-};
+}
diff --git a/services/website/website.tester.js b/services/website/website.tester.js
index d84d9475ee064..95d2caeac1c59 100644
--- a/services/website/website.tester.js
+++ b/services/website/website.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('status of http://shields.io')
diff --git a/services/wercker/wercker.service.js b/services/wercker/wercker.service.js
index d9523e34a1b79..7dcb1faa9f417 100644
--- a/services/wercker/wercker.service.js
+++ b/services/wercker/wercker.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {isBuildStatus, renderBuildStatusBadge} from '../build-status.js';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
+import { BaseJsonService } from '../index.js'
const werckerSchema = Joi.array()
.items(
@@ -124,4 +124,4 @@ export default class Wercker extends BaseJsonService {
const { result } = json[0]
return this.constructor.render({ result })
}
-};
+}
diff --git a/services/wercker/wercker.tester.js b/services/wercker/wercker.tester.js
index 864a430d7f071..bcbd29368db1b 100644
--- a/services/wercker/wercker.tester.js
+++ b/services/wercker/wercker.tester.js
@@ -1,5 +1,5 @@
-import {isBuildStatus} from '../build-status.js';
-import {createServiceTester} from '../tester.js'
+import { isBuildStatus } from '../build-status.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Build status')
diff --git a/services/wheelmap/wheelmap.service.js b/services/wheelmap/wheelmap.service.js
index c739a768af6d1..c6abf22d8c6cd 100644
--- a/services/wheelmap/wheelmap.service.js
+++ b/services/wheelmap/wheelmap.service.js
@@ -1,5 +1,5 @@
-import Joi from 'joi';
-import {BaseJsonService} from '../index.js';
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
const schema = Joi.object({
node: Joi.object({
@@ -64,4 +64,4 @@ export default class Wheelmap extends BaseJsonService {
const accessibility = json.node.wheelchair
return this.constructor.render({ accessibility })
}
-};
+}
diff --git a/services/wheelmap/wheelmap.spec.js b/services/wheelmap/wheelmap.spec.js
index 20c4eeee36d3f..80287395c033d 100644
--- a/services/wheelmap/wheelmap.spec.js
+++ b/services/wheelmap/wheelmap.spec.js
@@ -1,7 +1,7 @@
-import {expect} from 'chai';
-import nock from 'nock';
-import {cleanUpNockAfterEach, defaultContext} from '../test-helpers.js';
-import Wheelmap from './wheelmap.service.js';
+import { expect } from 'chai'
+import nock from 'nock'
+import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
+import Wheelmap from './wheelmap.service.js'
describe('Wheelmap', function () {
cleanUpNockAfterEach()
diff --git a/services/wheelmap/wheelmap.tester.js b/services/wheelmap/wheelmap.tester.js
index 954361e2764d8..e4d5e6c49b580 100644
--- a/services/wheelmap/wheelmap.tester.js
+++ b/services/wheelmap/wheelmap.tester.js
@@ -1,8 +1,8 @@
-import {createServiceTester} from '../tester.js'
-import {noToken} from '../test-helpers.js';
-import _noWheelmapToken from './wheelmap.service.js';
+import { createServiceTester } from '../tester.js'
+import { noToken } from '../test-helpers.js'
+import _noWheelmapToken from './wheelmap.service.js'
export const t = await createServiceTester()
-const noWheelmapToken = noToken(_noWheelmapToken);
+const noWheelmapToken = noToken(_noWheelmapToken)
t.create('node with accessibility')
.skipWhen(noWheelmapToken)
diff --git a/services/wordpress/wordpress-base.js b/services/wordpress/wordpress-base.js
index 2cf4c55c93e46..c11852b4f5e23 100644
--- a/services/wordpress/wordpress-base.js
+++ b/services/wordpress/wordpress-base.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {nonNegativeInteger} from '../validators.js';
-import {BaseJsonService, NotFound} from '../index.js';
+import Joi from 'joi'
+import { nonNegativeInteger } from '../validators.js'
+import { BaseJsonService, NotFound } from '../index.js'
const stringOrFalse = Joi.alternatives(Joi.string(), Joi.bool())
@@ -79,4 +79,4 @@ export default class BaseWordpress extends BaseJsonService {
}
return json
}
-};
+}
diff --git a/services/wordpress/wordpress-downloads.service.js b/services/wordpress/wordpress-downloads.service.js
index ca33b07597dcd..83979488b5fa4 100644
--- a/services/wordpress/wordpress-downloads.service.js
+++ b/services/wordpress/wordpress-downloads.service.js
@@ -1,8 +1,8 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {downloadCount} from '../color-formatters.js';
-import {NotFound} from '../index.js';
-import BaseWordpress from './wordpress-base.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { downloadCount } from '../color-formatters.js'
+import { NotFound } from '../index.js'
+import BaseWordpress from './wordpress-base.js'
const dateSchema = Joi.object()
.pattern(Joi.date().iso(), Joi.number().integer())
@@ -156,4 +156,4 @@ function InstallsForExtensionType(extensionType) {
const downloadServices = ['plugin', 'theme'].map(DownloadsForExtensionType)
const installServices = ['plugin', 'theme'].map(InstallsForExtensionType)
const modules = [...downloadServices, ...installServices]
-export default modules;
+export default modules
diff --git a/services/wordpress/wordpress-downloads.tester.js b/services/wordpress/wordpress-downloads.tester.js
index 1702c237731ce..05019f0782733 100644
--- a/services/wordpress/wordpress-downloads.tester.js
+++ b/services/wordpress/wordpress-downloads.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isMetric, isMetricOverTimePeriod} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isMetric, isMetricOverTimePeriod } from '../test-validators.js'
export const t = new ServiceTester({
id: 'wordpress',
diff --git a/services/wordpress/wordpress-last-update.service.js b/services/wordpress/wordpress-last-update.service.js
index e73e58b5335b1..10b48ef92b7e4 100644
--- a/services/wordpress/wordpress-last-update.service.js
+++ b/services/wordpress/wordpress-last-update.service.js
@@ -1,8 +1,8 @@
-import moment from 'moment';
-import {InvalidResponse} from '../index.js';
-import {formatDate} from '../text-formatters.js';
-import {age as ageColor} from '../color-formatters.js';
-import BaseWordpress from './wordpress-base.js';
+import moment from 'moment'
+import { InvalidResponse } from '../index.js'
+import { formatDate } from '../text-formatters.js'
+import { age as ageColor } from '../color-formatters.js'
+import BaseWordpress from './wordpress-base.js'
const extensionData = {
plugin: {
@@ -74,4 +74,4 @@ function LastUpdateForType(extensionType) {
}
const lastupdate = ['plugin', 'theme'].map(LastUpdateForType)
-export default [...lastupdate];
+export default [...lastupdate]
diff --git a/services/wordpress/wordpress-last-update.tester.js b/services/wordpress/wordpress-last-update.tester.js
index 2e2c214eac08d..d490b6ee72f03 100644
--- a/services/wordpress/wordpress-last-update.tester.js
+++ b/services/wordpress/wordpress-last-update.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isFormattedDate} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isFormattedDate } from '../test-validators.js'
export const t = new ServiceTester({
id: 'wordpress',
diff --git a/services/wordpress/wordpress-platform-redirect.service.js b/services/wordpress/wordpress-platform-redirect.service.js
index 414e88374e568..5f9544e5e1bcf 100644
--- a/services/wordpress/wordpress-platform-redirect.service.js
+++ b/services/wordpress/wordpress-platform-redirect.service.js
@@ -1,4 +1,4 @@
-import {redirector} from '../index.js';
+import { redirector } from '../index.js'
export default redirector({
category: 'platform-support',
@@ -8,4 +8,4 @@ export default redirector({
},
transformPath: ({ slug }) => `/wordpress/plugin/tested/${slug}`,
dateAdded: new Date('2019-04-17'),
-});
+})
diff --git a/services/wordpress/wordpress-platform-redirect.tester.js b/services/wordpress/wordpress-platform-redirect.tester.js
index 22cc78000449b..2f0816dea5633 100644
--- a/services/wordpress/wordpress-platform-redirect.tester.js
+++ b/services/wordpress/wordpress-platform-redirect.tester.js
@@ -1,4 +1,4 @@
-import {createServiceTester} from '../tester.js'
+import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Plugin Tested WP Version (Alias)')
diff --git a/services/wordpress/wordpress-platform.service.js b/services/wordpress/wordpress-platform.service.js
index e81e2d723f741..5c0d1cbd05aa7 100644
--- a/services/wordpress/wordpress-platform.service.js
+++ b/services/wordpress/wordpress-platform.service.js
@@ -1,8 +1,8 @@
-import {NotFound} from '../index.js';
-import {addv} from '../text-formatters.js';
-import {version as versionColor} from '../color-formatters.js';
-import BaseWordpress from './wordpress-base.js';
-import {versionColorForWordpressVersion} from './wordpress-version-color.js';
+import { NotFound } from '../index.js'
+import { addv } from '../text-formatters.js'
+import { version as versionColor } from '../color-formatters.js'
+import BaseWordpress from './wordpress-base.js'
+import { versionColorForWordpressVersion } from './wordpress-version-color.js'
const extensionData = {
plugin: {
@@ -166,4 +166,4 @@ export default [
...requiredPhp,
...requiresVersion,
WordpressPluginTestedVersion,
-];
+]
diff --git a/services/wordpress/wordpress-platform.tester.js b/services/wordpress/wordpress-platform.tester.js
index b388ccf88e91e..ded6f1b6b094b 100644
--- a/services/wordpress/wordpress-platform.tester.js
+++ b/services/wordpress/wordpress-platform.tester.js
@@ -1,6 +1,9 @@
-import Joi from 'joi';
-import {ServiceTester} from '../tester.js';
-import {isVPlusDottedVersionAtLeastOne, isComposerVersion} from '../test-validators.js';
+import Joi from 'joi'
+import { ServiceTester } from '../tester.js'
+import {
+ isVPlusDottedVersionAtLeastOne,
+ isComposerVersion,
+} from '../test-validators.js'
export const t = new ServiceTester({
id: 'WordpressPlatform',
diff --git a/services/wordpress/wordpress-rating.service.js b/services/wordpress/wordpress-rating.service.js
index 9ee53b6428c3d..6489fde9dae90 100644
--- a/services/wordpress/wordpress-rating.service.js
+++ b/services/wordpress/wordpress-rating.service.js
@@ -1,6 +1,6 @@
-import {starRating, metric} from '../text-formatters.js';
-import {floorCount} from '../color-formatters.js';
-import BaseWordpress from './wordpress-base.js';
+import { starRating, metric } from '../text-formatters.js'
+import { floorCount } from '../color-formatters.js'
+import BaseWordpress from './wordpress-base.js'
const extensionData = {
plugin: {
@@ -101,4 +101,4 @@ const ratingsServices = ['plugin', 'theme'].map(RatingForExtensionType)
const starsServices = ['plugin', 'theme'].map(StarsForExtensionType)
const modules = [...ratingsServices, ...starsServices]
-export default modules;
+export default modules
diff --git a/services/wordpress/wordpress-rating.tester.js b/services/wordpress/wordpress-rating.tester.js
index b1007bffb0dc8..1c686890f16cf 100644
--- a/services/wordpress/wordpress-rating.tester.js
+++ b/services/wordpress/wordpress-rating.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isStarRating} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isStarRating } from '../test-validators.js'
export const t = new ServiceTester({
id: 'wordpress',
diff --git a/services/wordpress/wordpress-version-color.js b/services/wordpress/wordpress-version-color.js
index afe8a61d03c53..4e15ca3c32653 100644
--- a/services/wordpress/wordpress-version-color.js
+++ b/services/wordpress/wordpress-version-color.js
@@ -1,6 +1,6 @@
-import {promisify} from 'util';
-import semver from 'semver';
-import {regularUpdate} from '../../core/legacy/regular-update.js';
+import { promisify } from 'util'
+import semver from 'semver'
+import { regularUpdate } from '../../core/legacy/regular-update.js'
// TODO: Incorporate this schema.
// const schema = Joi.object()
@@ -59,8 +59,4 @@ async function versionColorForWordpressVersion(version) {
}
}
-export {
- toSemver,
- getOfferedVersions,
- versionColorForWordpressVersion,
-};
+export { toSemver, getOfferedVersions, versionColorForWordpressVersion }
diff --git a/services/wordpress/wordpress-version-color.spec.js b/services/wordpress/wordpress-version-color.spec.js
index 5f9a9210e8be0..c428886c55347 100644
--- a/services/wordpress/wordpress-version-color.spec.js
+++ b/services/wordpress/wordpress-version-color.spec.js
@@ -1,5 +1,8 @@
-import {expect} from 'chai';
-import {toSemver, versionColorForWordpressVersion} from './wordpress-version-color.js';
+import { expect } from 'chai'
+import {
+ toSemver,
+ versionColorForWordpressVersion,
+} from './wordpress-version-color.js'
describe('toSemver() function', function () {
it('coerces versions', function () {
diff --git a/services/wordpress/wordpress-version.service.js b/services/wordpress/wordpress-version.service.js
index 4127759b5ba4b..9f5d62741391e 100644
--- a/services/wordpress/wordpress-version.service.js
+++ b/services/wordpress/wordpress-version.service.js
@@ -1,6 +1,6 @@
-import {addv} from '../text-formatters.js';
-import {version as versionColor} from '../color-formatters.js';
-import BaseWordpress from './wordpress-base.js';
+import { addv } from '../text-formatters.js'
+import { version as versionColor } from '../color-formatters.js'
+import BaseWordpress from './wordpress-base.js'
function VersionForExtensionType(extensionType) {
const { capt, exampleSlug } = {
@@ -51,4 +51,4 @@ function VersionForExtensionType(extensionType) {
}
}
-export default ['theme', 'plugin'].map(VersionForExtensionType);
+export default ['theme', 'plugin'].map(VersionForExtensionType)
diff --git a/services/wordpress/wordpress-version.tester.js b/services/wordpress/wordpress-version.tester.js
index d999436fe01fd..9abf4a330e7b1 100644
--- a/services/wordpress/wordpress-version.tester.js
+++ b/services/wordpress/wordpress-version.tester.js
@@ -1,5 +1,5 @@
-import {ServiceTester} from '../tester.js';
-import {isVPlusDottedVersionAtLeastOne} from '../test-validators.js';
+import { ServiceTester } from '../tester.js'
+import { isVPlusDottedVersionAtLeastOne } from '../test-validators.js'
export const t = new ServiceTester({
id: 'wordpress',
diff --git a/services/youtube/youtube-base.js b/services/youtube/youtube-base.js
index 1aa69759c2347..94f14ee6018d2 100644
--- a/services/youtube/youtube-base.js
+++ b/services/youtube/youtube-base.js
@@ -1,7 +1,7 @@
-import Joi from 'joi';
-import {BaseJsonService, NotFound} from '../index.js';
-import {metric} from '../text-formatters.js';
-import {nonNegativeInteger} from '../validators.js';
+import Joi from 'joi'
+import { BaseJsonService, NotFound } from '../index.js'
+import { metric } from '../text-formatters.js'
+import { nonNegativeInteger } from '../validators.js'
const documentation = `
By using the YouTube badges provided by Shields.io, you are agreeing to be bound by the YouTube Terms of Service. These can be found here:
@@ -90,4 +90,4 @@ class YouTubeChannelBase extends YouTubeBase {
static type = 'channel'
}
-export { documentation, YouTubeVideoBase, YouTubeChannelBase };
+export { documentation, YouTubeVideoBase, YouTubeChannelBase }
diff --git a/services/youtube/youtube-channel-views.service.js b/services/youtube/youtube-channel-views.service.js
index 599fa05d17f89..d3f854a920a6f 100644
--- a/services/youtube/youtube-channel-views.service.js
+++ b/services/youtube/youtube-channel-views.service.js
@@ -1,4 +1,4 @@
-import {documentation, YouTubeChannelBase} from './youtube-base.js';
+import { documentation, YouTubeChannelBase } from './youtube-base.js'
export default class YouTubeChannelViews extends YouTubeChannelBase {
static route = {
@@ -26,4 +26,4 @@ export default class YouTubeChannelViews extends YouTubeChannelBase {
static render({ statistics, id }) {
return super.renderSingleStat({ statistics, statisticName: 'view', id })
}
-};
+}
diff --git a/services/youtube/youtube-channel-views.tester.js b/services/youtube/youtube-channel-views.tester.js
index 0ece891f7d7d1..47501da678108 100644
--- a/services/youtube/youtube-channel-views.tester.js
+++ b/services/youtube/youtube-channel-views.tester.js
@@ -1,9 +1,9 @@
-import {createServiceTester} from '../tester.js'
-import {noToken} from '../test-helpers.js';
-import {isMetric} from '../test-validators.js';
-import _noYouTubeToken from './youtube-channel-views.service.js';
+import { createServiceTester } from '../tester.js'
+import { noToken } from '../test-helpers.js'
+import { isMetric } from '../test-validators.js'
+import _noYouTubeToken from './youtube-channel-views.service.js'
export const t = await createServiceTester()
-const noYouTubeToken = noToken(_noYouTubeToken);
+const noYouTubeToken = noToken(_noYouTubeToken)
t.create('channel view count')
.skipWhen(noYouTubeToken)
diff --git a/services/youtube/youtube-comments.service.js b/services/youtube/youtube-comments.service.js
index ca8bc8143f569..0f7faf3c7806b 100644
--- a/services/youtube/youtube-comments.service.js
+++ b/services/youtube/youtube-comments.service.js
@@ -1,4 +1,4 @@
-import {documentation, YouTubeVideoBase} from './youtube-base.js';
+import { documentation, YouTubeVideoBase } from './youtube-base.js'
export default class YouTubeComments extends YouTubeVideoBase {
static route = {
@@ -26,4 +26,4 @@ export default class YouTubeComments extends YouTubeVideoBase {
static render({ statistics, id }) {
return super.renderSingleStat({ statistics, statisticName: 'comment', id })
}
-};
+}
diff --git a/services/youtube/youtube-comments.tester.js b/services/youtube/youtube-comments.tester.js
index 3727eb145bd2b..dded2be9dfb28 100644
--- a/services/youtube/youtube-comments.tester.js
+++ b/services/youtube/youtube-comments.tester.js
@@ -1,9 +1,9 @@
-import {createServiceTester} from '../tester.js'
-import {noToken} from '../test-helpers.js';
-import {isMetric} from '../test-validators.js';
-import _noYouTubeToken from './youtube-comments.service.js';
+import { createServiceTester } from '../tester.js'
+import { noToken } from '../test-helpers.js'
+import { isMetric } from '../test-validators.js'
+import _noYouTubeToken from './youtube-comments.service.js'
export const t = await createServiceTester()
-const noYouTubeToken = noToken(_noYouTubeToken);
+const noYouTubeToken = noToken(_noYouTubeToken)
t.create('video comment count')
.skipWhen(noYouTubeToken)
diff --git a/services/youtube/youtube-likes.service.js b/services/youtube/youtube-likes.service.js
index 09d3ab4419654..94e2d7ae66264 100644
--- a/services/youtube/youtube-likes.service.js
+++ b/services/youtube/youtube-likes.service.js
@@ -1,6 +1,6 @@
-import Joi from 'joi';
-import {metric} from '../text-formatters.js';
-import {documentation, YouTubeVideoBase} from './youtube-base.js';
+import Joi from 'joi'
+import { metric } from '../text-formatters.js'
+import { documentation, YouTubeVideoBase } from './youtube-base.js'
const documentationWithDislikes = `
${documentation}
@@ -71,4 +71,4 @@ export default class YouTubeLikes extends YouTubeVideoBase {
}
return renderedBadge
}
-};
+}
diff --git a/services/youtube/youtube-likes.tester.js b/services/youtube/youtube-likes.tester.js
index e830032e71a2d..8f6f8dc8fcac6 100644
--- a/services/youtube/youtube-likes.tester.js
+++ b/services/youtube/youtube-likes.tester.js
@@ -1,10 +1,10 @@
-import Joi from 'joi';
-import {createServiceTester} from '../tester.js'
-import {noToken} from '../test-helpers.js';
-import {isMetric} from '../test-validators.js';
-import _noYouTubeToken from './youtube-likes.service.js';
+import Joi from 'joi'
+import { createServiceTester } from '../tester.js'
+import { noToken } from '../test-helpers.js'
+import { isMetric } from '../test-validators.js'
+import _noYouTubeToken from './youtube-likes.service.js'
export const t = await createServiceTester()
-const noYouTubeToken = noToken(_noYouTubeToken);
+const noYouTubeToken = noToken(_noYouTubeToken)
t.create('video like count')
.skipWhen(noYouTubeToken)
diff --git a/services/youtube/youtube-subscribers.service.js b/services/youtube/youtube-subscribers.service.js
index 47bbb0e2ecf6d..0c0d1b69aaf70 100644
--- a/services/youtube/youtube-subscribers.service.js
+++ b/services/youtube/youtube-subscribers.service.js
@@ -1,4 +1,4 @@
-import {documentation, YouTubeChannelBase} from './youtube-base.js';
+import { documentation, YouTubeChannelBase } from './youtube-base.js'
export default class YouTubeSubscribes extends YouTubeChannelBase {
static route = {
@@ -30,4 +30,4 @@ export default class YouTubeSubscribes extends YouTubeChannelBase {
id,
})
}
-};
+}
diff --git a/services/youtube/youtube-subscribers.tester.js b/services/youtube/youtube-subscribers.tester.js
index 48f5608c5a4fb..d1d1c5175996b 100644
--- a/services/youtube/youtube-subscribers.tester.js
+++ b/services/youtube/youtube-subscribers.tester.js
@@ -1,9 +1,9 @@
-import {createServiceTester} from '../tester.js'
-import {noToken} from '../test-helpers.js';
-import {isMetric} from '../test-validators.js';
-import _noYouTubeToken from './youtube-subscribers.service.js';
+import { createServiceTester } from '../tester.js'
+import { noToken } from '../test-helpers.js'
+import { isMetric } from '../test-validators.js'
+import _noYouTubeToken from './youtube-subscribers.service.js'
export const t = await createServiceTester()
-const noYouTubeToken = noToken(_noYouTubeToken);
+const noYouTubeToken = noToken(_noYouTubeToken)
t.create('subscriber count')
.skipWhen(noYouTubeToken)
diff --git a/services/youtube/youtube-views.service.js b/services/youtube/youtube-views.service.js
index d645c35fb65ac..32c2d6afa92ec 100644
--- a/services/youtube/youtube-views.service.js
+++ b/services/youtube/youtube-views.service.js
@@ -1,4 +1,4 @@
-import {documentation, YouTubeVideoBase} from './youtube-base.js';
+import { documentation, YouTubeVideoBase } from './youtube-base.js'
export default class YouTubeViews extends YouTubeVideoBase {
static route = {
@@ -26,4 +26,4 @@ export default class YouTubeViews extends YouTubeVideoBase {
static render({ statistics, id }) {
return super.renderSingleStat({ statistics, statisticName: 'view', id })
}
-};
+}
diff --git a/services/youtube/youtube-views.tester.js b/services/youtube/youtube-views.tester.js
index cd69757421e66..f825e71fb46f8 100644
--- a/services/youtube/youtube-views.tester.js
+++ b/services/youtube/youtube-views.tester.js
@@ -1,9 +1,9 @@
-import {createServiceTester} from '../tester.js'
-import {noToken} from '../test-helpers.js';
-import {isMetric} from '../test-validators.js';
-import _noYouTubeToken from './youtube-views.service.js';
+import { createServiceTester } from '../tester.js'
+import { noToken } from '../test-helpers.js'
+import { isMetric } from '../test-validators.js'
+import _noYouTubeToken from './youtube-views.service.js'
export const t = await createServiceTester()
-const noYouTubeToken = noToken(_noYouTubeToken);
+const noYouTubeToken = noToken(_noYouTubeToken)
t.create('video view count')
.skipWhen(noYouTubeToken)
From c461cb1771ffe8fe270d99736df82066d01b9073 Mon Sep 17 00:00:00 2001
From: PyvesB
@@ -48,7 +46,7 @@ const schema = Joi.object({
*
* {@link https://www.mediawiki.org/wiki/Manual:Extensions MediaWiki Extensions Manual}
*/
-module.exports = class WikiapiaryInstalls extends BaseJsonService {
+export default class WikiapiaryInstalls extends BaseJsonService {
static category = 'downloads'
static route = {
base: 'wikiapiary',
diff --git a/services/wikiapiary/wikiapiary-installs.tester.js b/services/wikiapiary/wikiapiary-installs.tester.js
index fee38c87645f1..878ec756dd163 100644
--- a/services/wikiapiary/wikiapiary-installs.tester.js
+++ b/services/wikiapiary/wikiapiary-installs.tester.js
@@ -1,7 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-const { isMetric } = require('../test-validators')
+import { createServiceTester } from '../tester.js'
+import { isMetric } from '../test-validators.js'
+export const t = await createServiceTester()
t.create('Extension')
.get('/extension/installs/ParserFunctions.json')
From bae618b9a4f2d3f6b982573284b3b38f77ebe658 Mon Sep 17 00:00:00 2001
From: PyvesB
`,
From 6ab7cb5b779dec4d9b023d722f281b0df5362a78 Mon Sep 17 00:00:00 2001
From: PyvesB How to get the tierId
versionPrefix
and versionSuffix
allow narrowing down
the range of versions the badge will take into account,
diff --git a/services/npms-io/npms-io-score.service.js b/services/npms-io/npms-io-score.service.js
index 79adf48816e9b..23f54ac95eb51 100644
--- a/services/npms-io/npms-io-score.service.js
+++ b/services/npms-io/npms-io-score.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseJsonService } = require('..')
-const { coveragePercentage } = require('../color-formatters')
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
+import { coveragePercentage } from '../color-formatters.js'
// https://api-docs.npms.io/#api-Package-GetPackageInfo
const numberSchema = Joi.number().min(0).max(1).required()
@@ -19,7 +17,7 @@ const responseSchema = Joi.object({
const keywords = ['node', 'npm score']
-module.exports = class NpmsIOScore extends BaseJsonService {
+export default class NpmsIOScore extends BaseJsonService {
static category = 'analysis'
static route = {
diff --git a/services/npms-io/npms-io-score.tester.js b/services/npms-io/npms-io-score.tester.js
index 1c1769ed21f59..855efceefad30 100644
--- a/services/npms-io/npms-io-score.tester.js
+++ b/services/npms-io/npms-io-score.tester.js
@@ -1,7 +1,6 @@
-'use strict'
-
-const { isPercentage } = require('../test-validators')
-const t = (module.exports = require('../tester').createServiceTester())
+import { createServiceTester } from '../tester.js'
+import { isPercentage } from '../test-validators.js'
+export const t = await createServiceTester()
t.create('should show final score').get('/final-score/vue.json').expectBadge({
label: 'score',
diff --git a/services/weblate/weblate-component-license.service.js b/services/weblate/weblate-component-license.service.js
index 22e1038979d7b..bd1ce1b3fef8a 100644
--- a/services/weblate/weblate-component-license.service.js
+++ b/services/weblate/weblate-component-license.service.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseJsonService } = require('..')
-const { optionalUrl } = require('../validators')
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
+import { optionalUrl } from '../validators.js'
const schema = Joi.object({
license: Joi.string().required(),
@@ -15,7 +13,7 @@ const queryParamSchema = Joi.object({
/**
* This badge displays the license of a component on a Weblate instance.
*/
-module.exports = class WeblateComponentLicense extends BaseJsonService {
+export default class WeblateComponentLicense extends BaseJsonService {
static category = 'license'
static route = {
base: 'weblate/license',
diff --git a/services/weblate/weblate-component-license.tester.js b/services/weblate/weblate-component-license.tester.js
index 60ec6c726f032..844aa362c48f2 100644
--- a/services/weblate/weblate-component-license.tester.js
+++ b/services/weblate/weblate-component-license.tester.js
@@ -1,6 +1,5 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
+import { createServiceTester } from '../tester.js'
+export const t = await createServiceTester()
t.create('License')
.get('/godot-engine/godot.json?server=https://hosted.weblate.org')
diff --git a/services/weblate/weblate-entity-count.service.js b/services/weblate/weblate-entity-count.service.js
index 3b04ea3f0494b..8080f97d94c6c 100644
--- a/services/weblate/weblate-entity-count.service.js
+++ b/services/weblate/weblate-entity-count.service.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const camelcase = require('camelcase')
-const { BaseJsonService } = require('..')
-const { nonNegativeInteger, optionalUrl } = require('../validators')
-const { metric } = require('../text-formatters')
+import Joi from 'joi'
+import camelcase from 'camelcase'
+import { BaseJsonService } from '../index.js'
+import { nonNegativeInteger, optionalUrl } from '../validators.js'
+import { metric } from '../text-formatters.js'
const schema = Joi.object({
count: nonNegativeInteger,
@@ -71,4 +69,4 @@ const entityCounts = [
{ entityName: 'users', exampleValue: 33058 },
].map(WeblateEntityCountFactory)
-module.exports = [...entityCounts]
+export default [...entityCounts]
diff --git a/services/weblate/weblate-entity-count.tester.js b/services/weblate/weblate-entity-count.tester.js
index a78a5bfc8def7..4e5d183aff863 100644
--- a/services/weblate/weblate-entity-count.tester.js
+++ b/services/weblate/weblate-entity-count.tester.js
@@ -1,13 +1,10 @@
-'use strict'
-
-const { ServiceTester } = require('../tester')
-const { isMetric } = require('../test-validators')
-
-const t = (module.exports = new ServiceTester({
+import { ServiceTester } from '../tester.js'
+import { isMetric } from '../test-validators.js'
+export const t = new ServiceTester({
id: 'WeblateEntity',
title: 'Weblate Entity',
pathPrefix: '/weblate',
-}))
+})
t.create('Components')
.get('/components.json?server=https://hosted.weblate.org')
diff --git a/services/weblate/weblate-project-translated-percentage.service.js b/services/weblate/weblate-project-translated-percentage.service.js
index d5bf6bbbfb597..87e073514f4d1 100644
--- a/services/weblate/weblate-project-translated-percentage.service.js
+++ b/services/weblate/weblate-project-translated-percentage.service.js
@@ -1,9 +1,7 @@
-'use strict'
-
-const Joi = require('joi')
-const { BaseJsonService } = require('..')
-const { optionalUrl } = require('../validators')
-const { colorScale } = require('../color-formatters')
+import Joi from 'joi'
+import { BaseJsonService } from '../index.js'
+import { optionalUrl } from '../validators.js'
+import { colorScale } from '../color-formatters.js'
const schema = Joi.object({
translated_percent: Joi.number().required(),
@@ -17,9 +15,7 @@ const queryParamSchema = Joi.object({
* This badge displays the percentage of strings translated on a project on a
* Weblate instance.
*/
-module.exports = class WeblateProjectTranslatedPercentage extends (
- BaseJsonService
-) {
+export default class WeblateProjectTranslatedPercentage extends BaseJsonService {
static category = 'other'
static route = { base: 'weblate', pattern: ':project', queryParamSchema }
diff --git a/services/weblate/weblate-project-translated-percentage.tester.js b/services/weblate/weblate-project-translated-percentage.tester.js
index 52a8ba67d167d..20f9368ac333b 100644
--- a/services/weblate/weblate-project-translated-percentage.tester.js
+++ b/services/weblate/weblate-project-translated-percentage.tester.js
@@ -1,8 +1,6 @@
-'use strict'
-
-const t = (module.exports = require('../tester').createServiceTester())
-
-const { isPercentage } = require('../test-validators')
+import { createServiceTester } from '../tester.js'
+import { isPercentage } from '../test-validators.js'
+export const t = await createServiceTester()
t.create('License')
.get('/godot-engine.json?server=https://hosted.weblate.org')
diff --git a/services/weblate/weblate-user-statistics.service.js b/services/weblate/weblate-user-statistics.service.js
index e61cdd881494d..467b2df76dcc8 100644
--- a/services/weblate/weblate-user-statistics.service.js
+++ b/services/weblate/weblate-user-statistics.service.js
@@ -1,10 +1,8 @@
-'use strict'
-
-const Joi = require('joi')
-const camelcase = require('camelcase')
-const { BaseJsonService } = require('..')
-const { nonNegativeInteger, optionalUrl } = require('../validators')
-const { metric } = require('../text-formatters')
+import Joi from 'joi'
+import camelcase from 'camelcase'
+import { BaseJsonService } from '../index.js'
+import { nonNegativeInteger, optionalUrl } from '../validators.js'
+import { metric } from '../text-formatters.js'
const schema = Joi.object({
translated: nonNegativeInteger,
@@ -87,4 +85,4 @@ const userStatistics = [
{ statisticName: 'languages', property: 'languages', exampleValue: 1 },
].map(WeblateUserStatisticFactory)
-module.exports = [...userStatistics]
+export default [...userStatistics]
diff --git a/services/weblate/weblate-user-statistics.tester.js b/services/weblate/weblate-user-statistics.tester.js
index 42934b072fd71..1e0848fbd723a 100644
--- a/services/weblate/weblate-user-statistics.tester.js
+++ b/services/weblate/weblate-user-statistics.tester.js
@@ -1,13 +1,10 @@
-'use strict'
-
-const { ServiceTester } = require('../tester')
-const { isMetric } = require('../test-validators')
-
-const t = (module.exports = new ServiceTester({
+import { ServiceTester } from '../tester.js'
+import { isMetric } from '../test-validators.js'
+export const t = new ServiceTester({
id: 'WeblateUserStatistic',
title: 'Weblate User Statistic',
pathPrefix: '/weblate',
-}))
+})
t.create('Translations')
.get('/user/nijel/translations.json?server=https://hosted.weblate.org')
From 3e837bfd3300a29005ed88bb24acd635e3b66b01 Mon Sep 17 00:00:00 2001
From: PyvesB