Socket
Socket
Sign inDemoInstall

@pnpm/link-bins

Package Overview
Dependencies
123
Maintainers
2
Versions
138
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.0.8 to 9.0.9

7

lib/index.d.ts

@@ -10,2 +10,9 @@ import { type DependencyManifest, type ProjectManifest } from '@pnpm/types';

}): Promise<string[]>;
export declare function linkBinsOfPkgsByAliases(depsAliases: string[], binsDir: string, opts: LinkBinOptions & {
modulesDir: string;
allowExoticManifests?: boolean;
nodeExecPathByAlias?: Record<string, string>;
projectManifest?: ProjectManifest;
warn: WarnFunction;
}): Promise<string[]>;
export declare function linkBinsOfPackages(pkgs: Array<{

@@ -12,0 +19,0 @@ manifest: DependencyManifest;

15

lib/index.js

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.linkBinsOfPackages = exports.linkBins = void 0;
exports.linkBinsOfPackages = exports.linkBinsOfPkgsByAliases = exports.linkBins = void 0;
const fs_1 = require("fs");

@@ -38,2 +38,9 @@ const module_1 = __importDefault(require("module"));

return [];
return linkBinsOfPkgsByAliases(allDeps, binsDir, {
...opts,
modulesDir,
});
}
exports.linkBins = linkBins;
async function linkBinsOfPkgsByAliases(depsAliases, binsDir, opts) {
const pkgBinOpts = {

@@ -46,5 +53,5 @@ allowExoticManifests: false,

: new Set(Object.keys((0, manifest_utils_1.getAllDependenciesFromManifest)(opts.projectManifest)));
const allCmds = (0, unnest_1.default)((await Promise.all(allDeps
const allCmds = (0, unnest_1.default)((await Promise.all(depsAliases
.map((alias) => ({
depDir: path_1.default.resolve(modulesDir, alias),
depDir: path_1.default.resolve(opts.modulesDir, alias),
isDirectDependency: directDependencies?.has(alias),

@@ -63,3 +70,3 @@ nodeExecPath: opts.nodeExecPathByAlias?.[alias],

}
exports.linkBins = linkBins;
exports.linkBinsOfPkgsByAliases = linkBinsOfPkgsByAliases;
function preferDirectCmds(allCmds) {

@@ -66,0 +73,0 @@ const [directCmds, hoistedCmds] = (0, partition_1.default)((cmd) => cmd.isDirectDependency === true, allCmds);

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

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

"@zkochan/rimraf": "^2.1.3",
"bin-links": "^4.0.2",
"bin-links": "^4.0.3",
"is-subdir": "^1.2.0",

@@ -37,12 +37,12 @@ "is-windows": "^1.0.2",

"@pnpm/error": "5.0.2",
"@pnpm/manifest-utils": "5.0.4",
"@pnpm/read-package-json": "8.0.4",
"@pnpm/read-modules-dir": "6.0.1",
"@pnpm/read-project-manifest": "5.0.7",
"@pnpm/package-bins": "8.0.3",
"@pnpm/read-package-json": "8.0.4",
"@pnpm/types": "9.3.0",
"@pnpm/manifest-utils": "5.0.4",
"@pnpm/read-modules-dir": "6.0.1"
"@pnpm/package-bins": "8.0.3"
},
"devDependencies": {
"@types/is-windows": "^1.0.0",
"@types/node": "^16.18.52",
"@types/node": "^16.18.58",
"@types/normalize-path": "^3.0.0",

@@ -53,4 +53,4 @@ "@types/ramda": "0.28.20",

"tempy": "^1.0.1",
"@pnpm/link-bins": "9.0.8",
"@pnpm/test-fixtures": "0.1.11"
"@pnpm/link-bins": "9.0.9",
"@pnpm/test-fixtures": "0.1.12"
},

@@ -57,0 +57,0 @@ "funding": "https://opencollective.com/pnpm",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc