build(node): migrate from CommonJS to ESM modules

This commit is contained in:
link2xt
2023-11-10 01:41:07 +00:00
parent 94dc65c1a2
commit b607f12b0e
20 changed files with 89 additions and 75 deletions

View File

@@ -1,4 +1,4 @@
const spawnSync = require('child_process').spawnSync
import { spawnSync } from 'child_process'
const verbose = isVerbose()
@@ -23,4 +23,4 @@ function isVerbose () {
return loglevel === 'verbose' || process.env.CI === 'true'
}
module.exports = { spawn, log, isVerbose, verbose }
export { spawn, log, isVerbose, verbose }