Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

install-module-linked

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

install-module-linked - npm Package Compare versions

Comparing version
1.5.1
to
1.6.0
+3
-7
dist/cjs/index.js

@@ -39,7 +39,4 @@ "use strict";

function installModule(installString, nodeModulesPath, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
callback = typeof options === 'function' ? options : callback;
options = typeof options === 'function' ? {} : options || {};
if (typeof callback === 'function') return (0, _asyncts.default)(installString, nodeModulesPath, options, callback);

@@ -53,5 +50,4 @@ return new Promise(function(resolve, reject) {

function sync(installString, nodeModulesPath, options) {
options = options || {};
return (0, _syncts.default)(installString, nodeModulesPath, options);
return (0, _syncts.default)(installString, nodeModulesPath, options || {});
}
/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }

@@ -1,1 +0,1 @@

{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/install-module-linked/src/index.ts"],"sourcesContent":["import type { InstallCallback, InstallOptions } from './types.ts';\nimport worker from './workers/async.ts';\nimport workerSync from './workers/sync.ts';\n\nexport { default as clear } from './lib/clear.ts';\nexport { default as install } from './lib/install.ts';\nexport { default as parseInstallString } from './lib/parseInstallString.ts';\nexport type * from './types.ts';\n\nexport default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions | InstallCallback, callback?: InstallCallback): void | Promise<string> {\n if (typeof options === 'function') {\n callback = options as InstallCallback;\n options = {};\n }\n options = options || {};\n\n if (typeof callback === 'function') return worker(installString, nodeModulesPath, options, callback);\n return new Promise((resolve, reject) => worker(installString, nodeModulesPath, options as InstallOptions, (err, dest) => (err ? reject(err) : resolve(dest))));\n}\n\nexport function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined {\n options = options || {};\n return workerSync(installString, nodeModulesPath, options);\n}\n"],"names":["clear","installModule","install","parseInstallString","sync","installString","nodeModulesPath","options","callback","worker","Promise","resolve","reject","err","dest","workerSync"],"mappings":";;;;;;;;;;;QAIoBA;eAAAA,gBAAK;;QAQzB;eAAwBC;;QAPJC;eAAAA,kBAAO;;QACPC;eAAAA,6BAAkB;;QAiBtBC;eAAAA;;;8DAtBG;6DACI;8DAEU;gEACE;2EACW;;;;;;AAM/B,SAASH,cAAcI,aAAqB,EAAEC,eAAuB,EAAEC,OAA0C,EAAEC,QAA0B;IAC1J,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU,CAAC;IACb;IACAA,UAAUA,WAAW,CAAC;IAEtB,IAAI,OAAOC,aAAa,YAAY,OAAOC,IAAAA,gBAAM,EAACJ,eAAeC,iBAAiBC,SAASC;IAC3F,OAAO,IAAIE,QAAQ,SAACC,SAASC;eAAWH,IAAAA,gBAAM,EAACJ,eAAeC,iBAAiBC,SAA2B,SAACM,KAAKC;mBAAUD,MAAMD,OAAOC,OAAOF,QAAQG;;;AACxJ;AAEO,SAASV,KAAKC,aAAqB,EAAEC,eAAuB,EAAEC,OAAwB;IAC3FA,UAAUA,WAAW,CAAC;IACtB,OAAOQ,IAAAA,eAAU,EAACV,eAAeC,iBAAiBC;AACpD"}
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/install-module-linked/src/index.ts"],"sourcesContent":["import type { InstallCallback, InstallOptions } from './types.ts';\nimport worker from './workers/async.ts';\nimport workerSync from './workers/sync.ts';\n\nexport { default as clear } from './lib/clear.ts';\nexport { default as install } from './lib/install.ts';\nexport { default as parseInstallString } from './lib/parseInstallString.ts';\nexport type * from './types.ts';\n\nexport default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions | InstallCallback, callback?: InstallCallback): void | Promise<string> {\n callback = typeof options === 'function' ? options : callback;\n options = typeof options === 'function' ? {} : ((options || {}) as InstallOptions);\n\n if (typeof callback === 'function') return worker(installString, nodeModulesPath, options, callback);\n return new Promise((resolve, reject) => worker(installString, nodeModulesPath, options, (err, dest) => (err ? reject(err) : resolve(dest))));\n}\n\nexport function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined {\n return workerSync(installString, nodeModulesPath, options || {});\n}\n"],"names":["clear","installModule","install","parseInstallString","sync","installString","nodeModulesPath","options","callback","worker","Promise","resolve","reject","err","dest","workerSync"],"mappings":";;;;;;;;;;;QAIoBA;eAAAA,gBAAK;;QAQzB;eAAwBC;;QAPJC;eAAAA,kBAAO;;QACPC;eAAAA,6BAAkB;;QActBC;eAAAA;;;8DAnBG;6DACI;8DAEU;gEACE;2EACW;;;;;;AAM/B,SAASH,cAAcI,aAAqB,EAAEC,eAAuB,EAAEC,OAA0C,EAAEC,QAA0B;IAC1JA,WAAW,OAAOD,YAAY,aAAaA,UAAUC;IACrDD,UAAU,OAAOA,YAAY,aAAa,CAAC,IAAMA,WAAW,CAAC;IAE7D,IAAI,OAAOC,aAAa,YAAY,OAAOC,IAAAA,gBAAM,EAACJ,eAAeC,iBAAiBC,SAASC;IAC3F,OAAO,IAAIE,QAAQ,SAACC,SAASC;eAAWH,IAAAA,gBAAM,EAACJ,eAAeC,iBAAiBC,SAAS,SAACM,KAAKC;mBAAUD,MAAMD,OAAOC,OAAOF,QAAQG;;;AACtI;AAEO,SAASV,KAAKC,aAAqB,EAAEC,eAAuB,EAAEC,OAAwB;IAC3F,OAAOQ,IAAAA,eAAU,EAACV,eAAeC,iBAAiBC,WAAW,CAAC;AAChE"}

@@ -7,7 +7,4 @@ import worker from './workers/async.js';

export default function installModule(installString, nodeModulesPath, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
callback = typeof options === 'function' ? options : callback;
options = typeof options === 'function' ? {} : options || {};
if (typeof callback === 'function') return worker(installString, nodeModulesPath, options, callback);

@@ -17,4 +14,3 @@ return new Promise((resolve, reject)=>worker(installString, nodeModulesPath, options, (err, dest)=>err ? reject(err) : resolve(dest)));

export function sync(installString, nodeModulesPath, options) {
options = options || {};
return workerSync(installString, nodeModulesPath, options);
return workerSync(installString, nodeModulesPath, options || {});
}

@@ -1,1 +0,1 @@

{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/install-module-linked/src/index.ts"],"sourcesContent":["import type { InstallCallback, InstallOptions } from './types.ts';\nimport worker from './workers/async.ts';\nimport workerSync from './workers/sync.ts';\n\nexport { default as clear } from './lib/clear.ts';\nexport { default as install } from './lib/install.ts';\nexport { default as parseInstallString } from './lib/parseInstallString.ts';\nexport type * from './types.ts';\n\nexport default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions | InstallCallback, callback?: InstallCallback): void | Promise<string> {\n if (typeof options === 'function') {\n callback = options as InstallCallback;\n options = {};\n }\n options = options || {};\n\n if (typeof callback === 'function') return worker(installString, nodeModulesPath, options, callback);\n return new Promise((resolve, reject) => worker(installString, nodeModulesPath, options as InstallOptions, (err, dest) => (err ? reject(err) : resolve(dest))));\n}\n\nexport function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined {\n options = options || {};\n return workerSync(installString, nodeModulesPath, options);\n}\n"],"names":["worker","workerSync","default","clear","install","parseInstallString","installModule","installString","nodeModulesPath","options","callback","Promise","resolve","reject","err","dest","sync"],"mappings":"AACA,OAAOA,YAAY,qBAAqB;AACxC,OAAOC,gBAAgB,oBAAoB;AAE3C,SAASC,WAAWC,KAAK,QAAQ,iBAAiB;AAClD,SAASD,WAAWE,OAAO,QAAQ,mBAAmB;AACtD,SAASF,WAAWG,kBAAkB,QAAQ,8BAA8B;AAM5E,eAAe,SAASC,cAAcC,aAAqB,EAAEC,eAAuB,EAAEC,OAA0C,EAAEC,QAA0B;IAC1J,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU,CAAC;IACb;IACAA,UAAUA,WAAW,CAAC;IAEtB,IAAI,OAAOC,aAAa,YAAY,OAAOV,OAAOO,eAAeC,iBAAiBC,SAASC;IAC3F,OAAO,IAAIC,QAAQ,CAACC,SAASC,SAAWb,OAAOO,eAAeC,iBAAiBC,SAA2B,CAACK,KAAKC,OAAUD,MAAMD,OAAOC,OAAOF,QAAQG;AACxJ;AAEA,OAAO,SAASC,KAAKT,aAAqB,EAAEC,eAAuB,EAAEC,OAAwB;IAC3FA,UAAUA,WAAW,CAAC;IACtB,OAAOR,WAAWM,eAAeC,iBAAiBC;AACpD"}
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/install-module-linked/src/index.ts"],"sourcesContent":["import type { InstallCallback, InstallOptions } from './types.ts';\nimport worker from './workers/async.ts';\nimport workerSync from './workers/sync.ts';\n\nexport { default as clear } from './lib/clear.ts';\nexport { default as install } from './lib/install.ts';\nexport { default as parseInstallString } from './lib/parseInstallString.ts';\nexport type * from './types.ts';\n\nexport default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions | InstallCallback, callback?: InstallCallback): void | Promise<string> {\n callback = typeof options === 'function' ? options : callback;\n options = typeof options === 'function' ? {} : ((options || {}) as InstallOptions);\n\n if (typeof callback === 'function') return worker(installString, nodeModulesPath, options, callback);\n return new Promise((resolve, reject) => worker(installString, nodeModulesPath, options, (err, dest) => (err ? reject(err) : resolve(dest))));\n}\n\nexport function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined {\n return workerSync(installString, nodeModulesPath, options || {});\n}\n"],"names":["worker","workerSync","default","clear","install","parseInstallString","installModule","installString","nodeModulesPath","options","callback","Promise","resolve","reject","err","dest","sync"],"mappings":"AACA,OAAOA,YAAY,qBAAqB;AACxC,OAAOC,gBAAgB,oBAAoB;AAE3C,SAASC,WAAWC,KAAK,QAAQ,iBAAiB;AAClD,SAASD,WAAWE,OAAO,QAAQ,mBAAmB;AACtD,SAASF,WAAWG,kBAAkB,QAAQ,8BAA8B;AAM5E,eAAe,SAASC,cAAcC,aAAqB,EAAEC,eAAuB,EAAEC,OAA0C,EAAEC,QAA0B;IAC1JA,WAAW,OAAOD,YAAY,aAAaA,UAAUC;IACrDD,UAAU,OAAOA,YAAY,aAAa,CAAC,IAAMA,WAAW,CAAC;IAE7D,IAAI,OAAOC,aAAa,YAAY,OAAOV,OAAOO,eAAeC,iBAAiBC,SAASC;IAC3F,OAAO,IAAIC,QAAQ,CAACC,SAASC,SAAWb,OAAOO,eAAeC,iBAAiBC,SAAS,CAACK,KAAKC,OAAUD,MAAMD,OAAOC,OAAOF,QAAQG;AACtI;AAEA,OAAO,SAASC,KAAKT,aAAqB,EAAEC,eAAuB,EAAEC,OAAwB;IAC3F,OAAOR,WAAWM,eAAeC,iBAAiBC,WAAW,CAAC;AAChE"}
{
"name": "install-module-linked",
"version": "1.5.1",
"version": "1.6.0",
"description": "Installs and symlinks a module into node_modules",

@@ -61,3 +61,3 @@ "keywords": [

"mkdirp-classic": "^0.5.2",
"node-version-call-local": "^0.3.0",
"node-version-call-local": "^1.0.0",
"queue-cb": "^1.0.0",

@@ -64,0 +64,0 @@ "temp-suffix": "^1.0.10"