Skip to content

Commit

Permalink
fix: replace move-file dep with @npmcli/move-file
Browse files Browse the repository at this point in the history
Fix #37
  • Loading branch information
isaacs committed Jun 3, 2020
1 parent 5ce07a7 commit bf88af0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lib/util/move-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const util = require('util')
const chmod = util.promisify(fs.chmod)
const unlink = util.promisify(fs.unlink)
const stat = util.promisify(fs.stat)
const move = require('move-file')
const move = require('@npmcli/move-file')
const pinflight = require('promise-inflight')

module.exports = moveFile
Expand Down
23 changes: 8 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
],
"license": "ISC",
"dependencies": {
"@npmcli/move-file": "^1.0.1",
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"glob": "^7.1.4",
Expand All @@ -68,7 +69,6 @@
"minipass-flush": "^1.0.5",
"minipass-pipeline": "^1.2.2",
"mkdirp": "^1.0.3",
"move-file": "^2.0.0",
"p-map": "^4.0.0",
"promise-inflight": "^1.0.1",
"rimraf": "^3.0.2",
Expand Down
7 changes: 2 additions & 5 deletions test/util.move-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,8 @@ test('fallback to renaming on missing files post-move', function (t) {
}
const mockedMoveFile = requireInject.withEmptyCache('../lib/util/move-file', {
fs: mockFS,
'move-file': requireInject.withEmptyCache('move-file', {
fs: mockFS,
'path-exists': requireInject.withEmptyCache('path-exists', {
fs: mockFS
})
'@npmcli/move-file': requireInject.withEmptyCache('@npmcli/move-file', {
fs: mockFS
})
})

Expand Down

0 comments on commit bf88af0

Please sign in to comment.