Socket
Socket
Sign inDemoInstall

@pnpm/link-bins

Package Overview
Dependencies
Maintainers
2
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/link-bins - npm Package Compare versions

Comparing version 8.0.9 to 8.0.10

28

lib/index.js

@@ -8,2 +8,3 @@ "use strict";

const fs_1 = require("fs");
const module_1 = __importDefault(require("module"));
const path_1 = __importDefault(require("path"));

@@ -160,5 +161,15 @@ const error_1 = require("@pnpm/error");

try {
let nodePath;
if (opts?.extraNodePaths?.length) {
nodePath = [];
for (const modulesPath of await getBinNodePaths(cmd.path)) {
if (opts.extraNodePaths.includes(modulesPath))
break;
nodePath.push(modulesPath);
}
nodePath.push(...opts.extraNodePaths);
}
await (0, cmd_shim_1.default)(cmd.path, externalBinPath, {
createPwshFile: cmd.makePowerShellShim,
nodePath: opts?.extraNodePaths,
nodePath,
nodeExecPath: cmd.nodeExecPath,

@@ -189,2 +200,17 @@ });

}
async function getBinNodePaths(target) {
const targetDir = path_1.default.dirname(target);
try {
const targetRealPath = await fs_1.promises.realpath(targetDir);
// @ts-expect-error
return module_1.default['_nodeModulePaths'](targetRealPath);
}
catch (err) { // eslint-disable-line
if (err.code !== 'ENOENT') {
throw err;
}
// @ts-expect-error
return module_1.default['_nodeModulePaths'](targetDir);
}
}
async function safeReadPkgJson(pkgDir) {

@@ -191,0 +217,0 @@ try {

4

package.json
{
"name": "@pnpm/link-bins",
"version": "8.0.9",
"version": "8.0.10",
"description": "Link bins to node_modules/.bin",

@@ -51,3 +51,3 @@ "main": "lib/index.js",

"tempy": "^1.0.1",
"@pnpm/link-bins": "8.0.9",
"@pnpm/link-bins": "8.0.10",
"@pnpm/test-fixtures": "0.0.33"

@@ -54,0 +54,0 @@ },

Sorry, the diff of this file is not supported yet

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