@covector/assemble
Advanced tools
Comparing version 0.2.0 to 0.2.1
# Changelog | ||
## [0.2.1] | ||
- Assemble process was async and the pkgFile needed a proper await. Switch to a generator to yield in the loop. | ||
- [1bb67ea](https://www.github.com/jbolda/covector/commit/1bb67ea671b6fbe9b21af9feb72612d166fd7662) fix: missing publish pipe ([#94](https://www.github.com/jbolda/covector/pull/94)) on 2020-07-10 | ||
## [0.2.0] | ||
@@ -4,0 +9,0 @@ |
29
index.js
@@ -110,3 +110,3 @@ const unified = require("unified"); | ||
module.exports.mergeIntoConfig = ({ | ||
module.exports.mergeIntoConfig = function* ({ | ||
config, | ||
@@ -117,3 +117,3 @@ assembledChanges, | ||
dryRun = false, | ||
}) => { | ||
}) { | ||
// build in assembledChanges to only issue commands with ones with changes | ||
@@ -157,6 +157,7 @@ // and pipe in data to template function | ||
const pipeOutput = {}; | ||
const commands = Object.keys( | ||
let commands = []; | ||
for (let pkg of Object.keys( | ||
command !== "version" ? pkgCommands : assembledChanges.releases | ||
).map(async (pkg) => { | ||
if (!pkgCommands[pkg]) return null; | ||
)) { | ||
if (!pkgCommands[pkg]) continue; | ||
@@ -174,3 +175,3 @@ const pkgs = | ||
: { | ||
pkgFile: await readPkgFile({ | ||
pkgFile: yield readPkgFile({ | ||
file: path.join( | ||
@@ -248,16 +249,14 @@ cwd, | ||
}; | ||
return merged; | ||
}); | ||
if (dryRun) | ||
commands = [...commands, merged]; | ||
} | ||
if (dryRun) { | ||
console.log("==== data piped into commands ==="); | ||
Object.keys(pipeOutput).forEach((pkg) => | ||
console.log(pkg, "pipe", pipeOutput[pkg].pipe) | ||
); | ||
} | ||
return Promise.all(commands).then((values) => | ||
values.reduce( | ||
(acc, current) => (!current ? acc : acc.concat([current])), | ||
[] | ||
) | ||
); | ||
return commands; | ||
}; | ||
@@ -264,0 +263,0 @@ |
{ | ||
"name": "@covector/assemble", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"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
11847
269