@pnpm/exportable-manifest
Advanced tools
Comparing version 1.0.8 to 1.1.0
# @pnpm/exportable-manifest | ||
## 1.1.0 | ||
### Minor Changes | ||
- 284e95c5e: Convert relative workspace paths to version specs. | ||
- 084614f55: Support aliases to workspace packages. For instance, `"foo": "workspace:bar@*"` will link bar from the repository but aliased to foo. Before publish, these specs are converted to regular aliased versions. | ||
## 1.0.8 | ||
@@ -4,0 +11,0 @@ |
@@ -61,3 +61,3 @@ "use strict"; | ||
} | ||
if (depSpec === 'workspace:*') { | ||
if (depSpec === 'workspace:*' || depSpec.endsWith('@*')) { | ||
const { manifest } = await read_project_manifest_1.tryReadProjectManifest(path.join(dir, 'node_modules', depName)); | ||
@@ -68,6 +68,23 @@ if (!manifest || !manifest.version) { | ||
} | ||
if (depName !== manifest.name) { | ||
return `npm:${manifest.name}@${manifest.version}`; | ||
} | ||
return manifest.version; | ||
} | ||
return depSpec.substr(10); | ||
if (depSpec.startsWith('workspace:./') || depSpec.startsWith('workspace:../')) { | ||
const { manifest } = await read_project_manifest_1.tryReadProjectManifest(path.join(dir, depSpec.substr(10))); | ||
if (!manifest || !manifest.name || !manifest.version) { | ||
throw new error_1.default('CANNOT_RESOLVE_WORKSPACE_PROTOCOL', `Cannot resolve workspace protocol of dependency "${depName}" ` + | ||
'because this dependency is not installed. Try running "pnpm install".'); | ||
} | ||
if (manifest.name === depName) | ||
return `${manifest.version}`; | ||
return `npm:${manifest.name}@${manifest.version}`; | ||
} | ||
depSpec = depSpec.substr(10); | ||
if (depSpec.includes('@')) { | ||
return `npm:${depSpec}`; | ||
} | ||
return depSpec; | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@pnpm/exportable-manifest", | ||
"version": "1.0.8", | ||
"version": "1.1.0", | ||
"description": "Creates an exportable manifest", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
8895
129