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

@pnpm/link-bins

Package Overview
Dependencies
Maintainers
2
Versions
145
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 6.1.0 to 6.2.0

2

lib/index.d.ts

@@ -6,2 +6,3 @@ import { DependencyManifest, ProjectManifest } from '@pnpm/types';

allowExoticManifests?: boolean;
extendNodePath?: boolean;
nodeExecPathByAlias?: Record<string, string>;

@@ -17,3 +18,4 @@ projectManifest?: ProjectManifest;

}>, binsTarget: string, opts: {
extendNodePath?: boolean;
warn: WarnFunction;
}): Promise<string[]>;

17

lib/index.js

@@ -82,3 +82,3 @@ "use strict";

const [cmdsWithOwnName, cmdsWithOtherNames] = partition_1.default(({ ownName }) => ownName, allCmds);
const results1 = await p_settle_1.default(cmdsWithOwnName.map(async (cmd) => linkBin(cmd, binsDir)));
const results1 = await p_settle_1.default(cmdsWithOwnName.map(async (cmd) => linkBin(cmd, binsDir, opts)));
const usedNames = fromPairs_1.default(cmdsWithOwnName.map((cmd) => [cmd.name, cmd.name]));

@@ -91,3 +91,3 @@ const results2 = await p_settle_1.default(cmdsWithOtherNames.map(async (cmd) => {

usedNames[cmd.name] = cmd.pkgName;
return linkBin(cmd, binsDir);
return linkBin(cmd, binsDir, opts);
}));

@@ -133,3 +133,3 @@ // We want to create all commands that we can create before throwing an exception

}
async function linkBin(cmd, binsDir) {
async function linkBin(cmd, binsDir, opts) {
const externalBinPath = path_1.default.join(binsDir, cmd.name);

@@ -139,6 +139,9 @@ if (EXECUTABLE_SHEBANG_SUPPORTED) {

}
let nodePath = await getBinNodePaths(cmd.path);
const binsParentDir = path_1.default.dirname(binsDir);
if (path_1.default.relative(cmd.path, binsParentDir) !== '') {
nodePath = union_1.default(nodePath, await getBinNodePaths(binsParentDir));
let nodePath;
if ((opts === null || opts === void 0 ? void 0 : opts.extendNodePath) !== false) {
nodePath = await getBinNodePaths(cmd.path);
const binsParentDir = path_1.default.dirname(binsDir);
if (path_1.default.relative(cmd.path, binsParentDir) !== '') {
nodePath = union_1.default(nodePath, await getBinNodePaths(binsParentDir));
}
}

@@ -145,0 +148,0 @@ return cmd_shim_1.default(cmd.path, externalBinPath, {

{
"name": "@pnpm/link-bins",
"version": "6.1.0",
"version": "6.2.0",
"description": "Link bins to node_modules/.bin",

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

"@pnpm/types": "7.4.0",
"@zkochan/cmd-shim": "^5.2.0",
"@zkochan/cmd-shim": "^5.2.1",
"is-subdir": "^1.1.1",

@@ -46,2 +46,3 @@ "is-windows": "^1.0.2",

"@types/ramda": "0.27.39",
"cmd-extension": "^1.0.2",
"ncp": "^2.0.0",

@@ -48,0 +49,0 @@ "path-exists": "^4.0.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