Skip to content

Commit

Permalink
refactor: try cp again.
Browse files Browse the repository at this point in the history
  • Loading branch information
knightedcodemonkey committed Sep 30, 2024
1 parent 88b1661 commit 47983ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ export default [
},
},
],
'n/no-unsupported-features/node-builtins': [
'error',
{
ignores: [
// No longer experimental with v22.3.0
'fs/promises.cp',
],
},
],
},
},
]
6 changes: 3 additions & 3 deletions src/duel.js
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -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(/^(\.\.\/)*/, ''))),
),
)
Expand Down

0 comments on commit 47983ec

Please sign in to comment.