Migrate from CommonJS to ESM (#6651)

This commit is contained in:
Pierre-Yves B
2021-07-09 12:53:55 +01:00
committed by GitHub
parent 23678fe2f5
commit 23c0406bed
1130 changed files with 4457 additions and 6711 deletions

View File

@@ -1,13 +1,11 @@
'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 '../index.js'
const schema = Joi.object({ activity_total: nonNegativeInteger })
module.exports = class Bountysource extends BaseJsonService {
export default class Bountysource extends BaseJsonService {
static category = 'funding'
static route = { base: 'bountysource/team', pattern: ':team/activity' }

View File

@@ -1,12 +1,10 @@
'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({
export const t = new ServiceTester({
id: 'bountysource',
title: 'Bountysource',
}))
})
t.create('bounties (valid)')
.get('/team/mozilla-core/activity.json')