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,10 +1,8 @@
'use strict'
const Joi = require('joi')
const log = require('../../core/server/log')
const { TokenPool } = require('../../core/token-pooling/token-pool')
const { userAgent } = require('../../core/base-service/legacy-request-handler')
const { nonNegativeInteger } = require('../validators')
import Joi from 'joi'
import log from '../../core/server/log.js'
import { TokenPool } from '../../core/token-pooling/token-pool.js'
import { userAgent } from '../../core/base-service/legacy-request-handler.js'
import { nonNegativeInteger } from '../validators.js'
const headerSchema = Joi.object({
'x-ratelimit-limit': nonNegativeInteger,
@@ -214,4 +212,4 @@ class GithubApiProvider {
}
}
module.exports = GithubApiProvider
export default GithubApiProvider