@pnpm/exportable-manifest
Advanced tools
Comparing version 1000.0.1 to 1000.0.2
@@ -69,4 +69,4 @@ "use strict"; | ||
} | ||
async function resolveManifest(depName, modulesDir) { | ||
const { manifest } = await (0, read_project_manifest_1.tryReadProjectManifest)(path_1.default.join(modulesDir, depName)); | ||
async function readAndCheckManifest(depName, dependencyDir) { | ||
const { manifest } = await (0, read_project_manifest_1.tryReadProjectManifest)(dependencyDir); | ||
if (!manifest?.name || !manifest?.version) { | ||
@@ -94,3 +94,3 @@ throw new error_1.PnpmError('CANNOT_RESOLVE_WORKSPACE_PROTOCOL', `Cannot resolve workspace protocol of dependency "${depName}" ` + | ||
modulesDir = modulesDir ?? path_1.default.join(dir, 'node_modules'); | ||
const manifest = await resolveManifest(depName, modulesDir); | ||
const manifest = await readAndCheckManifest(depName, path_1.default.join(modulesDir, depName)); | ||
const semverRangeToken = versionAliasSpecParts[2] !== '*' ? versionAliasSpecParts[2] : ''; | ||
@@ -103,3 +103,3 @@ if (depName !== manifest.name) { | ||
if (depSpec.startsWith('workspace:./') || depSpec.startsWith('workspace:../')) { | ||
const manifest = await resolveManifest(depName, path_1.default.join(dir, depSpec.slice(10))); | ||
const manifest = await readAndCheckManifest(depName, path_1.default.join(dir, depSpec.slice(10))); | ||
if (manifest.name === depName) | ||
@@ -128,3 +128,3 @@ return `${manifest.version}`; | ||
modulesDir = modulesDir ?? path_1.default.join(dir, 'node_modules'); | ||
const manifest = await resolveManifest(depName, modulesDir); | ||
const manifest = await readAndCheckManifest(depName, path_1.default.join(modulesDir, depName)); | ||
const semverRangeToken = semverRangGroup !== '*' ? semverRangGroup : ''; | ||
@@ -131,0 +131,0 @@ return depSpec.replace(workspaceSemverRegex, `${semverRangeToken}${manifest.version}`); |
{ | ||
"name": "@pnpm/exportable-manifest", | ||
"version": "1000.0.1", | ||
"version": "1000.0.2", | ||
"description": "Creates an exportable manifest", | ||
@@ -30,5 +30,5 @@ "main": "lib/index.js", | ||
"@pnpm/catalogs.config": "1000.0.1", | ||
"@pnpm/exportable-manifest": "1000.0.1", | ||
"@pnpm/catalogs.types": "1000.0.0", | ||
"@pnpm/prepare": "0.0.107" | ||
"@pnpm/prepare": "0.0.108", | ||
"@pnpm/exportable-manifest": "1000.0.2", | ||
"@pnpm/catalogs.types": "1000.0.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
17508