Socket
Socket
Sign inDemoInstall

@pnpm/link-bins

Package Overview
Dependencies
Maintainers
3
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 4.3.1 to 4.4.0

2

lib/getPkgDirs.d.ts

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

export default function (modules: string, warn: (msg: string) => void): Promise<string[]>;
export default function (modules: string): Promise<string[]>;

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

const path = require("path");
async function default_1(modules, warn) {
const dirs = await getDirectories(modules, warn);
async function default_1(modules) {
const dirs = await getDirectories(modules);
const subdirs = await Promise.all(dirs.map((dir) => {
return isScopedPkgsDir(dir) ? getDirectories(dir, warn) : Promise.resolve([dir]);
return isScopedPkgsDir(dir) ? getDirectories(dir) : Promise.resolve([dir]);
}));

@@ -16,3 +16,3 @@ return flatten(subdirs);

exports.default = default_1;
async function getDirectories(srcPath, warn) {
async function getDirectories(srcPath) {
let dirs;

@@ -29,3 +29,3 @@ try {

return pFilter(dirs
.filter((relativePath) => relativePath[0] !== '.') // ignore directories like .bin, .store, etc
.filter((relativePath) => !relativePath.startsWith('.')) // ignore directories like .bin, .store, etc
.map((relativePath) => path.join(srcPath, relativePath)), async (absolutePath) => {

@@ -39,3 +39,5 @@ try {

throw err;
warn(`Cannot find file at ${absolutePath} although it was listed by readdir`);
// Cannot find file at ${absolutePath} although it was listed by readdir.
// This probably means that the target of the symlink does not exist (broken symlink).
// This used to be a warning but it didn't really cause any issues.
return false;

@@ -46,4 +48,4 @@ }

function isScopedPkgsDir(dirPath) {
return path.basename(dirPath)[0] === '@';
return path.basename(dirPath).startsWith('@');
}
//# sourceMappingURL=getPkgDirs.js.map

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

exports.default = async (modules, binPath, opts) => {
const pkgDirs = await getPkgDirs_1.default(modules, opts.warn);
const pkgDirs = await getPkgDirs_1.default(modules);
const pkgBinOpts = Object.assign({ allowExoticManifests: false }, opts);

@@ -58,3 +58,4 @@ const allCmds = R.unnest((await Promise.all(pkgDirs

if (!pkg) {
opts.warn(`There's a directory in node_modules without package.json: ${target}`);
// There's a directory in node_modules without package.json: ${target}.
// This used to be a warning but it didn't really cause any issues.
return [];

@@ -61,0 +62,0 @@ }

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

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

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