Skip to content

Commit

Permalink
fix(roc-plugin-repo): Solved issue when doing collected releases
Browse files Browse the repository at this point in the history
Before the table would not display the correct data and fail to render scoped packages.
  • Loading branch information
dlmr committed Oct 3, 2017
1 parent 46395f1 commit 3ad7bad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions extensions/roc-plugin-repo/src/commands/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ export default projects => ({
selectedToBeReleased.map(async project => {
const releaseText = await createGithubReleaseText(
[project],
status,
isMonorepo,
individual,
from,
Expand All @@ -366,6 +367,7 @@ export default projects => ({

ctx.releaseText = await createGithubReleaseText(
selectedToBeReleased,
status,
isMonorepo,
individual,
from,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {

export default async function createGithubReleaseText(
projects,
status,
isMonorepo,
individual,
from,
Expand All @@ -33,7 +34,7 @@ export default async function createGithubReleaseText(
isMonorepo,
projects,
);
const projectTable = individual ? '' : createTable(projects);
const projectTable = individual ? '' : createTable(projects, status);
const fromRelease = project =>
prerelease && latest[project].prerelease.hash
? latest[project].prerelease.hash
Expand Down Expand Up @@ -136,10 +137,11 @@ function getTemplates(individual) {
}));
}

function createTable(projects) {
function createTable(projects, status) {
return `${projects.reduce(
(table, project) =>
`${table}\n| ${project.name} | ${project.packageJSON.version} |`,
`${table}\n| \`${project.name}\` | \`${status[project.name]
.newVersion}\` |`,
'| Package | Version |\n|---------|---------|',
)}\n\n`;
}

0 comments on commit 3ad7bad

Please sign in to comment.