Skip to content

Commit

Permalink
fix: use fs/promises in favor of fs.promises
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Jun 13, 2023
1 parent 02fc75d commit 0f75796
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/clean.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
'use strict'

const fs = require('fs')
const fs = require('fs/promises')
const log = require('./log')

async function clean (gyp, argv) {
// Remove the 'build' dir
const buildDir = 'build'

log.verbose('clean', 'removing "%s" directory', buildDir)
await fs.promises.rm(buildDir, { recursive: true, force: true })
await fs.rm(buildDir, { recursive: true, force: true })
}

module.exports = function (gyp, argv, callback) {
Expand Down
2 changes: 1 addition & 1 deletion lib/remove.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const fs = require('fs').promises
const fs = require('fs/promises')
const path = require('path')
const log = require('./log')
const semver = require('semver')
Expand Down

0 comments on commit 0f75796

Please sign in to comment.