New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

is-inner-link

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-inner-link - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

19

index.js
'use strict'
const getLinkTarget = require('get-link-target')
const fs = require('graceful-fs')
const path = require('path')

@@ -8,7 +8,14 @@ const isSubdir = require('is-subdir')

const linkPath = path.resolve(parent, relativePathToLink)
return getLinkTarget(linkPath)
.then(target => ({
isInner: isSubdir(parent, target),
target
}))
return new Promise((resolve, reject) => {
fs.realpath(linkPath, (err, target) => {
if (err) {
reject(err)
return
}
resolve({
isInner: isSubdir(parent, target),
target
})
})
})
}
{
"name": "is-inner-link",
"version": "2.0.0",
"version": "2.0.1",
"description": "Returns true if a link targets a directory inside its parent directory",

@@ -42,3 +42,3 @@ "main": "index.js",

"dependencies": {
"get-link-target": "^1.0.0",
"graceful-fs": "^4.1.11",
"is-subdir": "^1.0.0"

@@ -45,0 +45,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc