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

@pnpm/symlink-dependency

Package Overview
Dependencies
Maintainers
2
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/symlink-dependency - npm Package Compare versions

Comparing version 4.0.7 to 4.0.8

16

lib/symlinkDirectRootDependency.js

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

const core_loggers_1 = require("@pnpm/core-loggers");
const logger_1 = require("@pnpm/logger");
const symlink_dir_1 = __importDefault(require("symlink-dir"));

@@ -35,5 +36,14 @@ const DEP_TYPE_BY_DEPS_FIELD_NAME = {

}
const dependencyRealocation = await fs_1.promises.realpath(dependencyLocation);
let dependencyRealLocation;
try {
dependencyRealLocation = await fs_1.promises.realpath(dependencyLocation);
}
catch (err) { // eslint-disable-line
if (err.code !== 'ENOENT')
throw err;
(0, logger_1.globalWarn)(`Local dependency not found at ${dependencyLocation}`);
return;
}
const dest = path_1.default.join(destModulesDirReal, importAs);
const { reused } = await (0, symlink_dir_1.default)(dependencyRealocation, dest);
const { reused } = await (0, symlink_dir_1.default)(dependencyRealLocation, dest);
if (reused)

@@ -44,3 +54,3 @@ return; // if the link was already present, don't log

dependencyType: opts.fromDependenciesField && DEP_TYPE_BY_DEPS_FIELD_NAME[opts.fromDependenciesField],
linkedFrom: dependencyRealocation,
linkedFrom: dependencyRealLocation,
name: importAs,

@@ -47,0 +57,0 @@ realName: opts.linkedPackage.name,

2

package.json
{
"name": "@pnpm/symlink-dependency",
"description": "Symlink a dependency to node_modules",
"version": "4.0.7",
"version": "4.0.8",
"bugs": {

@@ -6,0 +6,0 @@ "url": "https://github.com/pnpm/pnpm/issues"

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