@pnpm/symlink-dependency
Advanced tools
Comparing version 7.0.2 to 7.0.3
@@ -10,3 +10,2 @@ "use strict"; | ||
const core_loggers_1 = require("@pnpm/core-loggers"); | ||
const logger_1 = require("@pnpm/logger"); | ||
const symlink_dir_1 = __importDefault(require("symlink-dir")); | ||
@@ -37,17 +36,4 @@ const DEP_TYPE_BY_DEPS_FIELD_NAME = { | ||
} | ||
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}`); | ||
// Sometimes the linked in local package does not exist during installation | ||
// and is created later via a build script. | ||
// That is why we create the symlink even if the target directory does not exist. | ||
dependencyRealLocation = dependencyLocation; | ||
} | ||
const dest = path_1.default.join(destModulesDirReal, importAs); | ||
const { reused } = await (0, symlink_dir_1.default)(dependencyRealLocation, dest); | ||
const { reused } = await (0, symlink_dir_1.default)(dependencyLocation, dest); | ||
if (reused) | ||
@@ -58,3 +44,3 @@ return; // if the link was already present, don't log | ||
dependencyType: opts.fromDependenciesField && DEP_TYPE_BY_DEPS_FIELD_NAME[opts.fromDependenciesField], | ||
linkedFrom: dependencyRealLocation, | ||
linkedFrom: dependencyLocation, | ||
name: importAs, | ||
@@ -61,0 +47,0 @@ realName: opts.linkedPackage.name, |
{ | ||
"name": "@pnpm/symlink-dependency", | ||
"description": "Symlink a dependency to node_modules", | ||
"version": "7.0.2", | ||
"version": "7.0.3", | ||
"bugs": { | ||
@@ -18,4 +18,4 @@ "url": "https://github.com/pnpm/pnpm/issues" | ||
"devDependencies": { | ||
"@pnpm/prepare": "0.0.72", | ||
"@pnpm/symlink-dependency": "7.0.2" | ||
"@pnpm/prepare": "0.0.75", | ||
"@pnpm/symlink-dependency": "7.0.3" | ||
}, | ||
@@ -22,0 +22,0 @@ "directories": { |
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
8277
81