resolve-link-target
Advanced tools
Comparing version 1.0.1 to 2.0.0
15
index.js
'use strict' | ||
const fs = require('graceful-fs') | ||
const fs = require('fs') | ||
const path = require('path') | ||
@@ -8,13 +8,6 @@ | ||
function getLinkTarget (linkPath) { | ||
async function getLinkTarget (linkPath) { | ||
linkPath = path.resolve(linkPath) | ||
return new Promise((resolve, reject) => { | ||
fs.readlink(linkPath, (err, target) => { | ||
if (err) { | ||
reject(err) | ||
return | ||
} | ||
resolve(_resolveLink(linkPath, target)) | ||
}) | ||
}) | ||
const target = await fs.promises.readlink(linkPath) | ||
return _resolveLink(linkPath, target) | ||
} | ||
@@ -21,0 +14,0 @@ |
{ | ||
"name": "resolve-link-target", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "Resolve a symlink's (or junction's) target", | ||
@@ -15,8 +15,5 @@ "main": "index.js", | ||
"engines": { | ||
"node": ">=4" | ||
"node": ">=10" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/zkochan/resolve-link-target.git" | ||
}, | ||
"repository": "https://github.com/zkochan/packages/tree/master/resolve-link-target", | ||
"keywords": [ | ||
@@ -35,14 +32,8 @@ "symlink", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/zkochan/resolve-link-target/issues" | ||
}, | ||
"homepage": "https://github.com/zkochan/resolve-link-target#readme", | ||
"homepage": "https://github.com/zkochan/packages/tree/master/resolve-link-target#readme", | ||
"devDependencies": { | ||
"standard": "^10.0.2", | ||
"symlink-dir": "^1.0.2", | ||
"tape": "^4.6.3" | ||
}, | ||
"dependencies": { | ||
"graceful-fs": "^4.1.11" | ||
"standard": "^16.0.3", | ||
"symlink-dir": "^4.1.0", | ||
"tape": "^5.1.1" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # resolve-link-target | ||
[![npm version](https://img.shields.io/npm/v/resolve-link-target.svg)](https://www.npmjs.com/package/resolve-link-target) [![Build Status](https://img.shields.io/travis/zkochan/resolve-link-target/master.svg)](https://travis-ci.org/zkochan/resolve-link-target) [![Build Status on Windows](https://img.shields.io/appveyor/ci/zkochan/resolve-link-target/master.svg)](https://ci.appveyor.com/project/zkochan/resolve-link-target/branch/master) | ||
[![npm version](https://img.shields.io/npm/v/resolve-link-target.svg)](https://www.npmjs.com/package/resolve-link-target) | ||
@@ -11,3 +11,3 @@ ## Installation | ||
``` | ||
npm install resolve-link-target | ||
<npm|yarn|pnpm> add resolve-link-target | ||
``` | ||
@@ -14,0 +14,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
6
3721
28
1
2
- Removedgraceful-fs@^4.1.11
- Removedgraceful-fs@4.2.11(transitive)