all-module-paths
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -35,3 +35,3 @@ { | ||
"typings": "src/index.d.ts", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"repository": "tunnckoCoreLabs/all-module-paths", | ||
@@ -38,0 +38,0 @@ "homepage": "https://github.com/tunnckoCoreLabs/all-module-paths", |
import os from 'os'; | ||
import mod from 'module'; | ||
import path from 'path'; | ||
import dirs from 'global-dirs'; | ||
const globalModules = Object.keys(dirs).reduce( | ||
(acc, manager) => acc.concat(dirs[manager].packages), | ||
[], | ||
export const globalModules = Object.keys(dirs) | ||
.reduce((acc, manager) => acc.concat(dirs[manager].packages), []) | ||
.concat(mod.globalPaths.slice(0, -1).reverse()); | ||
export const localModules = module.paths.filter((x) => | ||
x.startsWith(os.homedir()), | ||
); | ||
const localModules = module.paths.filter((x) => x.startsWith(os.homedir())); | ||
const allPaths = localModules.concat(globalModules); | ||
export const paths = allPaths; | ||
export const bins = allPaths.map((x) => path.join(x, '.bin')); | ||
export const allPaths = localModules.concat(globalModules); | ||
export const allBins = allPaths.map((x) => path.join(x, '.bin')); |
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
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
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
14026
25
2