diff --git a/eslint.config.js b/eslint.config.js index c3828ea..24f965e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -27,6 +27,15 @@ export default [ }, }, ], + 'n/no-unsupported-features/node-builtins': [ + 'error', + { + ignores: [ + // No longer experimental with v22.3.0 + 'fs/promises.cp', + ], + }, + ], }, }, ] diff --git a/src/duel.js b/src/duel.js index 27fab4c..59ca61d 100755 --- a/src/duel.js +++ b/src/duel.js @@ -1,9 +1,9 @@ #!/usr/bin/env node import { argv, platform } from 'node:process' -import { join, dirname, resolve, relative, parse } from 'node:path' +import { join, dirname, resolve, relative } from 'node:path' import { spawn } from 'node:child_process' -import { writeFile, rm, rename, mkdir, copyFile, lstat } from 'node:fs/promises' +import { writeFile, rm, rename, mkdir, cp } from 'node:fs/promises' import { randomBytes } from 'node:crypto' import { performance } from 'node:perf_hooks' @@ -146,7 +146,7 @@ const duel = async args => { dualConfigPath = join(subDir, `tsconfig.${hex}.json`) await mkdir(subDir) await Promise.all( - compileFiles.map( + compileFiles.map(file => cp(file, join(subDir, relative(projectDir, file).replace(/^(\.\.\/)*/, ''))), ), )