New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/worker

Package Overview
Dependencies
Maintainers
0
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/worker - npm Package Compare versions

Comparing version 1000.0.1 to 1000.0.2

28

lib/index.js

@@ -21,2 +21,5 @@ "use strict";

const error_1 = require("@pnpm/error");
const child_process_1 = require("child_process");
const is_windows_1 = __importDefault(require("is-windows"));
const shell_quote_1 = require("shell-quote");
let workerPool;

@@ -182,3 +185,4 @@ async function restartWorkerPool() {

if (status === 'error') {
reject(new error_1.PnpmError(error.code ?? 'SYMLINK_FAILED', error.message));
const hint = opts.deps?.[0]?.modules != null ? createErrorHint(error, opts.deps[0].modules) : undefined;
reject(new error_1.PnpmError(error.code ?? 'SYMLINK_FAILED', error.message, { hint }));
return;

@@ -194,2 +198,24 @@ }

}
function createErrorHint(err, checkedDir) {
if ('code' in err && err.code === 'EISDIR' && (0, is_windows_1.default)()) {
const checkedDrive = `${checkedDir.split(':')[0]}:`;
if (isDriveExFat(checkedDrive)) {
return `The "${checkedDrive}" drive is exFAT, which does not support symlinks. This will cause installation to fail. You can set the node-linker to "hoisted" to avoid this issue.`;
}
}
return undefined;
}
// In Windows system exFAT drive, symlink will result in error.
function isDriveExFat(drive) {
try {
// cspell:disable-next-line
const output = (0, child_process_1.execSync)(`wmic logicaldisk where ${(0, shell_quote_1.quote)([`DeviceID='${drive}'`])} get FileSystem`).toString();
const lines = output.trim().split('\n');
const name = lines.length > 1 ? lines[1].trim() : '';
return name === 'exFAT';
}
catch {
return false;
}
}
async function hardLinkDir(src, destDirs) {

@@ -196,0 +222,0 @@ if (!workerPool) {

20

package.json
{
"name": "@pnpm/worker",
"version": "1000.0.1",
"version": "1000.0.2",
"description": "A worker for extracting package taralls to the store",

@@ -30,17 +30,21 @@ "main": "lib/index.js",

"@rushstack/worker-pool": "0.4.9",
"is-windows": "^1.0.2",
"load-json-file": "^6.2.0",
"shell-quote": "^1.8.2",
"@pnpm/cafs-types": "1000.0.0",
"@pnpm/create-cafs-store": "1000.0.1",
"@pnpm/create-cafs-store": "1000.0.2",
"@pnpm/crypto.polyfill": "1000.0.0",
"@pnpm/exec.pkg-requires-build": "1000.0.0",
"@pnpm/error": "1000.0.1",
"@pnpm/exec.pkg-requires-build": "1000.0.0",
"@pnpm/crypto.polyfill": "1000.0.0",
"@pnpm/graceful-fs": "1000.0.0",
"@pnpm/fs.hard-link-dir": "1000.0.0",
"@pnpm/symlink-dependency": "1000.0.1",
"@pnpm/store.cafs": "1000.0.1",
"@pnpm/fs.hard-link-dir": "1000.0.0",
"@pnpm/symlink-dependency": "1000.0.0"
"@pnpm/graceful-fs": "1000.0.0"
},
"devDependencies": {
"@types/is-windows": "^1.0.2",
"@types/shell-quote": "^1.7.5",
"@pnpm/logger": "1000.0.0",
"@pnpm/types": "1000.0.0",
"@pnpm/worker": "1000.0.1"
"@pnpm/worker": "1000.0.2"
},

@@ -47,0 +51,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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc