install-module-linked
Advanced tools
@@ -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"} |
+2
-2
| { | ||
| "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" |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
109046
-0.1%1029
-0.77%- Removed