Skip to content

Commit

Permalink
deps: @npmcli/move-file@2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzy committed Aug 17, 2022
1 parent 07536a4 commit 8165501
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
22 changes: 16 additions & 6 deletions node_modules/@npmcli/move-file/lib/index.js
Expand Up @@ -97,14 +97,19 @@ const moveFile = async (source, destination, options = {}, root = true, symlinks
}
// try to determine what the actual file is so we can create the correct
// type of symlink in windows
let targetStat
let targetStat = 'file'
try {
targetStat = await stat(resolve(dirname(symSource), target))
} catch (err) {}
if (targetStat.isDirectory()) {
targetStat = 'junction'
}
} catch {
// targetStat remains 'file'
}
await symlink(
target,
symDestination,
targetStat && targetStat.isDirectory() ? 'junction' : 'file'
targetStat
)
}))
await rimraf(source)
Expand Down Expand Up @@ -157,14 +162,19 @@ const moveFileSync = (source, destination, options = {}, root = true, symlinks =
}
// try to determine what the actual file is so we can create the correct
// type of symlink in windows
let targetStat
let targetStat = 'file'
try {
targetStat = statSync(resolve(dirname(symSource), target))
} catch (err) {}
if (targetStat.isDirectory()) {
targetStat = 'junction'
}
} catch {
// targetStat remains 'file'
}
symlinkSync(
target,
symDestination,
targetStat && targetStat.isDirectory() ? 'junction' : 'file'
targetStat
)
}
rimrafSync(source)
Expand Down
6 changes: 3 additions & 3 deletions node_modules/@npmcli/move-file/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/move-file",
"version": "2.0.0",
"version": "2.0.1",
"files": [
"bin/",
"lib/"
Expand All @@ -13,7 +13,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.2.2",
"@npmcli/template-oss": "3.5.0",
"tap": "^16.0.1"
},
"scripts": {
Expand Down Expand Up @@ -42,6 +42,6 @@
"author": "GitHub Inc.",
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "3.2.2"
"version": "3.5.0"
}
}
6 changes: 3 additions & 3 deletions package-lock.json
Expand Up @@ -993,9 +993,9 @@
}
},
"node_modules/@npmcli/move-file": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.0.tgz",
"integrity": "sha512-UR6D5f4KEGWJV6BGPH3Qb2EtgH+t+1XQ1Tt85c7qicN6cezzuHPdZwwAxqZr4JLtnQu0LZsTza/5gmNmSl8XLg==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz",
"integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==",
"inBundle": true,
"dependencies": {
"mkdirp": "^1.0.4",
Expand Down

0 comments on commit 8165501

Please sign in to comment.