@covector/assemble
Advanced tools
Comparing version 0.2.5 to 0.3.0
# Changelog | ||
## [0.3.0] | ||
- Allow multiple publish sequences. Any command beginning with `publish` will invoke the related `getPublishedVersion`, e.g. `publishNPM` would look for and check `getPublishedVersionNPM`. This allows separation of concerns and re-run-ability for multiple deploy targets. | ||
- [ed3698d](https://www.github.com/jbolda/covector/commit/ed3698df85140dd13e98569c4266df03f8bbfc16) feat: allow multiple publishes ([#113](https://www.github.com/jbolda/covector/pull/113)) on 2020-07-19 | ||
## [0.2.5] | ||
@@ -4,0 +9,0 @@ |
36
index.js
@@ -145,10 +145,15 @@ const unified = require("unified"); | ||
let getPublishedVersion; | ||
let assets; | ||
let publishElements = {}; | ||
publishElements.subPublishCommand = command.slice(7, 999); | ||
if (command === "publish") { | ||
getPublishedVersion = mergeCommand({ | ||
publishElements[ | ||
`getPublishedVersion${publishElements.subPublishCommand}` | ||
] = mergeCommand({ | ||
...commandItems, | ||
command: "getPublishedVersion", | ||
command: `getPublishedVersion${publishElements.subPublishCommand}`, | ||
}); | ||
assets = mergeCommand({ ...commandItems, command: "assets" }); | ||
publishElements["assets"] = mergeCommand({ | ||
...commandItems, | ||
command: "assets", | ||
}); | ||
} | ||
@@ -166,4 +171,14 @@ | ||
}), | ||
...(!getPublishedVersion ? {} : { getPublishedVersion }), | ||
...(!assets ? {} : { assets }), | ||
...(!publishElements[ | ||
`getPublishedVersion${publishElements.subPublishCommand}` | ||
] | ||
? {} | ||
: { | ||
[`getPublishedVersion${publishElements.subPublishCommand}`]: publishElements[ | ||
`getPublishedVersion${publishElements.subPublishCommand}` | ||
], | ||
}), | ||
...(!publishElements[publishElements.assets] | ||
? {} | ||
: { assets: publishElements[publishElements.assets] }), | ||
manager: config.packages[pkg].manager, | ||
@@ -220,10 +235,11 @@ dependencies: config.packages[pkg].dependencies, | ||
if (command !== "version") { | ||
let subPublishCommand = command.slice(7, 999); | ||
// add these after that they can use pkgFile | ||
extraPublishParams = { | ||
...extraPublishParams, | ||
...(!pkgCommands[pkg].getPublishedVersion | ||
...(!pkgCommands[pkg][`getPublishedVersion${subPublishCommand}`] | ||
? {} | ||
: { | ||
getPublishedVersion: template( | ||
pkgCommands[pkg].getPublishedVersion | ||
[`getPublishedVersion${subPublishCommand}`]: template( | ||
pkgCommands[pkg][`getPublishedVersion${subPublishCommand}`] | ||
)(pipeToTemplate), | ||
@@ -230,0 +246,0 @@ }), |
{ | ||
"name": "@covector/assemble", | ||
"version": "0.2.5", | ||
"version": "0.3.0", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "files": [ |
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
15626
307