mirror of
https://github.com/zhigang1992/mtcute.git
synced 2026-04-30 13:11:54 +08:00
chore: pushed cjs deadline a bit further
This commit is contained in:
@@ -15,12 +15,12 @@ export default async (env: ConfigEnv): Promise<UserConfig> => {
|
|||||||
throw new Error('This config is only for building')
|
throw new Error('This config is only for building')
|
||||||
}
|
}
|
||||||
|
|
||||||
const packageJson = JSON.parse(readFileSync(join(rootDir, 'package.json'), 'utf8'))
|
const packageJson = JSON.parse(readFileSync(join(process.cwd(), 'package.json'), 'utf8'))
|
||||||
|
|
||||||
const CJS_DEPRECATION_WARNING = `
|
const CJS_DEPRECATION_WARNING = `
|
||||||
if (typeof globalThis !== 'undefined' && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
|
if (typeof globalThis !== 'undefined' && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
|
||||||
globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true
|
globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true
|
||||||
console.warn("[${packageJson.name}] CommonJS support is deprecated and will be removed in 0.20.0. Please consider switching to ESM, it's "+(new Date()).getFullYear()+" already.")
|
console.warn("[${packageJson.name}] CommonJS support is deprecated and will be removed in 0.25.0. Please consider switching to ESM, it's "+(new Date()).getFullYear()+" already.")
|
||||||
console.warn("[${packageJson.name}] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c")
|
console.warn("[${packageJson.name}] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c")
|
||||||
}
|
}
|
||||||
`.trim()
|
`.trim()
|
||||||
|
|||||||
Reference in New Issue
Block a user