@changesets/cli
Version:
Organise your package versioning and publishing to make both contributors and maintainers happy
19 lines (15 loc) • 839 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: !0
});
const getReleaseLine = async (changeset, type) => {
const [firstLine, ...futureLines] = changeset.summary.split("\n").map(l => l.trimRight());
return `- ${changeset.commit ? `${changeset.commit}: ` : ""}${firstLine}\n${futureLines.map(l => ` ${l}`).join("\n")}`;
}, getDependencyReleaseLine = async (changesets, dependenciesUpdated) => {
if (0 === dependenciesUpdated.length) return "";
return [ ...changesets.map(changeset => `- Updated dependencies [${changeset.commit}]`), ...dependenciesUpdated.map(dependency => ` - ${dependency.name}@${dependency.newVersion}`) ].join("\n");
}, defaultChangelogFunctions = {
getReleaseLine: getReleaseLine,
getDependencyReleaseLine: getDependencyReleaseLine
};
exports.default = defaultChangelogFunctions;
;