calibre
Version:
Performance monitoring with Synthetic testing, Chrome UX Report, and Real User Metrics
17 lines (14 loc) • 386 B
JavaScript
import chalk from 'chalk'
const deprecatedHandler = (oldCommand, newCommand, handler) => {
return async args => {
if (!process.env.CALIBRE_SUPPRESS_DEPRECATIONS) {
process.stderr.write(
chalk.yellow(
`[calibre:deprecated] "${oldCommand}" has moved to "${newCommand}"\n`
)
)
}
return handler(args)
}
}
export { deprecatedHandler }