is-installed-globally
Advanced tools
Comparing version 0.1.0 to 0.2.0
'use strict'; | ||
const fs = require('fs'); | ||
const globalDirs = require('global-dirs'); | ||
const isPathInside = require('is-path-inside'); | ||
module.exports = isPathInside(__dirname, globalDirs.yarn.packages) || isPathInside(__dirname, globalDirs.npm.packages); | ||
module.exports = | ||
isPathInside(__dirname, globalDirs.yarn.packages) || | ||
isPathInside(__dirname, fs.realpathSync(globalDirs.npm.packages)); |
{ | ||
"name": "is-installed-globally", | ||
"version": "0.1.0", | ||
"description": "Check if your package was installed globally", | ||
"license": "MIT", | ||
"repository": "sindresorhus/is-installed-globally", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"global", | ||
"package", | ||
"globally", | ||
"module", | ||
"install", | ||
"installed", | ||
"npm", | ||
"yarn", | ||
"is", | ||
"check", | ||
"detect", | ||
"local", | ||
"locally", | ||
"cli", | ||
"bin", | ||
"binary" | ||
], | ||
"dependencies": { | ||
"global-dirs": "^0.1.0", | ||
"is-path-inside": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"execa": "^0.7.0", | ||
"xo": "*" | ||
} | ||
"name": "is-installed-globally", | ||
"version": "0.2.0", | ||
"description": "Check if your package was installed globally", | ||
"license": "MIT", | ||
"repository": "sindresorhus/is-installed-globally", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava && tsd" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"keywords": [ | ||
"global", | ||
"package", | ||
"globally", | ||
"module", | ||
"install", | ||
"installed", | ||
"npm", | ||
"yarn", | ||
"is", | ||
"check", | ||
"detect", | ||
"local", | ||
"locally", | ||
"cli", | ||
"bin", | ||
"binary" | ||
], | ||
"dependencies": { | ||
"global-dirs": "^0.1.1", | ||
"is-path-inside": "^2.1.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"cpy": "^7.2.0", | ||
"del": "^4.1.0", | ||
"execa": "^1.0.0", | ||
"make-dir": "^3.0.0", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
} | ||
} |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3679
5
22
0
7
1
+ Addedis-path-inside@2.1.0(transitive)
- Removedis-path-inside@1.0.1(transitive)
Updatedglobal-dirs@^0.1.1
Updatedis-path-inside@^2.1.0