@pnpm/symlink-dependency
Advanced tools
Comparing version 4.0.7 to 4.0.8
@@ -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, |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8699
92