import-global
Advanced tools
Comparing version 1.0.0 to 1.1.0
14
index.js
@@ -1,15 +0,5 @@ | ||
import {createRequire} from 'node:module'; | ||
import globalDirectory from 'global-directory'; | ||
import {resolveGlobal} from 'resolve-global'; | ||
const {resolve} = createRequire(import.meta.url); | ||
export async function importGlobal(moduleName) { | ||
const modulePath = resolve(moduleName, { | ||
paths: [ | ||
globalDirectory.yarn.packages, | ||
globalDirectory.npm.packages, | ||
], | ||
}); | ||
return import(modulePath); | ||
return import(resolveGlobal(moduleName)); | ||
} | ||
@@ -16,0 +6,0 @@ |
{ | ||
"name": "import-global", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Import a globally installed module", | ||
@@ -40,3 +40,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"global-directory": "^4.0.1" | ||
"resolve-global": "^2.0.0" | ||
}, | ||
@@ -47,3 +47,6 @@ "devDependencies": { | ||
"xo": "^0.56.0" | ||
}, | ||
"ava": { | ||
"timeout": "10m" | ||
} | ||
} |
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
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
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
3575
9
1
+ Addedresolve-global@^2.0.0
+ Addedresolve-global@2.0.0(transitive)
- Removedglobal-directory@^4.0.1