@pnpm/exportable-manifest
Advanced tools
Comparing version 2.0.1 to 2.1.0
# @pnpm/exportable-manifest | ||
## 2.1.0 | ||
### Minor Changes | ||
- 85fb21a83: Add support for workspace:^ and workspace:~ aliases | ||
### Patch Changes | ||
- Updated dependencies [6e9c112af] | ||
- Updated dependencies [97c64bae4] | ||
- @pnpm/read-project-manifest@2.0.1 | ||
- @pnpm/types@7.1.0 | ||
## 2.0.1 | ||
@@ -4,0 +17,0 @@ |
@@ -89,4 +89,6 @@ "use strict"; | ||
} | ||
if (depSpec === 'workspace:*' || depSpec.endsWith('@*')) { | ||
const { manifest } = await (0, read_project_manifest_1.tryReadProjectManifest)(path_1.default.join(dir, 'node_modules', depName)); | ||
// Dependencies with bare "*", "^" and "~" versions | ||
const versionAliasSpecParts = /^workspace:([^@]+@)?([\^~*])$/.exec(depSpec); | ||
if (versionAliasSpecParts != null) { | ||
const { manifest } = await read_project_manifest_1.tryReadProjectManifest(path_1.default.join(dir, 'node_modules', depName)); | ||
if ((manifest == null) || !manifest.version) { | ||
@@ -96,9 +98,10 @@ throw new error_1.default('CANNOT_RESOLVE_WORKSPACE_PROTOCOL', `Cannot resolve workspace protocol of dependency "${depName}" ` + | ||
} | ||
const semverRangeToken = versionAliasSpecParts[2] !== '*' ? versionAliasSpecParts[2] : ''; | ||
if (depName !== manifest.name) { | ||
return `npm:${manifest.name}@${manifest.version}`; | ||
return `npm:${manifest.name}@${semverRangeToken}${manifest.version}`; | ||
} | ||
return manifest.version; | ||
return `${semverRangeToken}${manifest.version}`; | ||
} | ||
if (depSpec.startsWith('workspace:./') || depSpec.startsWith('workspace:../')) { | ||
const { manifest } = await (0, read_project_manifest_1.tryReadProjectManifest)(path_1.default.join(dir, depSpec.substr(10))); | ||
const { manifest } = await read_project_manifest_1.tryReadProjectManifest(path_1.default.join(dir, depSpec.substr(10))); | ||
if ((manifest == null) || !manifest.name || !manifest.version) { | ||
@@ -105,0 +108,0 @@ throw new error_1.default('CANNOT_RESOLVE_WORKSPACE_PROTOCOL', `Cannot resolve workspace protocol of dependency "${depName}" ` + |
{ | ||
"name": "@pnpm/exportable-manifest", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "Creates an exportable manifest", | ||
@@ -14,9 +14,2 @@ "main": "lib/index.js", | ||
}, | ||
"scripts": { | ||
"lint": "eslint -c ../../eslint.json src/**/*.ts test/**/*.ts", | ||
"test": "pnpm run compile && pnpm run _test", | ||
"prepublishOnly": "pnpm run compile", | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix", | ||
"_test": "jest" | ||
}, | ||
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/exportable-manifest", | ||
@@ -32,11 +25,17 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/ramda": "^0.27.35" | ||
"@types/ramda": "0.27.39" | ||
}, | ||
"dependencies": { | ||
"@pnpm/error": "2.0.0", | ||
"@pnpm/read-project-manifest": "2.0.0", | ||
"@pnpm/types": "7.0.0", | ||
"@pnpm/read-project-manifest": "2.0.1", | ||
"@pnpm/types": "7.1.0", | ||
"ramda": "^0.27.1" | ||
}, | ||
"funding": "https://opencollective.com/pnpm" | ||
"funding": "https://opencollective.com/pnpm", | ||
"scripts": { | ||
"lint": "eslint -c ../../eslint.json src/**/*.ts test/**/*.ts", | ||
"test": "pnpm run compile && pnpm run _test", | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix", | ||
"_test": "jest" | ||
} | ||
} |
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
120
9856
6
+ Added@pnpm/read-project-manifest@2.0.1(transitive)
+ Added@pnpm/types@7.1.0(transitive)
+ Added@pnpm/write-project-manifest@2.0.1(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
- Removed@pnpm/read-project-manifest@2.0.0(transitive)
- Removed@pnpm/types@7.0.0(transitive)
- Removed@pnpm/write-project-manifest@2.0.0(transitive)
Updated@pnpm/types@7.1.0