Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

import-global

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

import-global - npm Package Compare versions

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 @@

7

package.json
{
"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"
}
}
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