Socket
Socket
Sign inDemoInstall

@pnpm/link-bins

Package Overview
Dependencies
16
Maintainers
2
Versions
140
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.2.7 to 7.2.8

17

lib/index.js

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

const cmd_shim_1 = __importDefault(require("@zkochan/cmd-shim"));
const rimraf_1 = __importDefault(require("@zkochan/rimraf"));
const is_subdir_1 = __importDefault(require("is-subdir"));

@@ -161,2 +162,9 @@ const is_windows_1 = __importDefault(require("is-windows"));

const externalBinPath = path_1.default.join(binsDir, cmd.name);
if (IS_WINDOWS) {
const exePath = path_1.default.join(binsDir, `${cmd.name}${getExeExtension()}`);
if ((0, fs_1.existsSync)(exePath)) {
(0, logger_1.globalWarn)(`The target bin directory already contains an exe called ${cmd.name}, so removing ${exePath}`);
await (0, rimraf_1.default)(exePath);
}
}
if (opts?.preferSymlinkedExecutables && !IS_WINDOWS && cmd.nodeExecPath == null) {

@@ -186,2 +194,11 @@ await (0, symlink_dir_1.default)(cmd.path, externalBinPath);

}
function getExeExtension() {
let cmdExtension;
if (process.env.PATHEXT) {
cmdExtension = process.env.PATHEXT
.split(path_1.default.delimiter)
.find(ext => ext.toUpperCase() === '.EXE');
}
return cmdExtension ?? '.exe';
}
async function safeReadPkgJson(pkgDir) {

@@ -188,0 +205,0 @@ try {

13

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

@@ -26,10 +26,11 @@ "main": "lib/index.js",

"dependencies": {
"@pnpm/error": "3.0.1",
"@pnpm/manifest-utils": "3.1.4",
"@pnpm/error": "3.1.0",
"@pnpm/manifest-utils": "3.1.5",
"@pnpm/package-bins": "6.0.8",
"@pnpm/read-modules-dir": "4.0.0",
"@pnpm/read-package-json": "6.0.10",
"@pnpm/read-project-manifest": "3.0.11",
"@pnpm/read-package-json": "6.0.11",
"@pnpm/read-project-manifest": "3.0.12",
"@pnpm/types": "8.7.0",
"@zkochan/cmd-shim": "^5.3.1",
"@zkochan/rimraf": "^2.1.2",
"bin-links": "^3.0.3",

@@ -44,3 +45,3 @@ "is-subdir": "^1.2.0",

"devDependencies": {
"@pnpm/link-bins": "7.2.7",
"@pnpm/link-bins": "7.2.8",
"@pnpm/test-fixtures": "0.0.23",

@@ -47,0 +48,0 @@ "@types/is-windows": "^1.0.0",

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