@fingerprintjs/changesets-changelog-format
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -26,3 +26,9 @@ "use strict"; | ||
module.exports = __toCommonJS(changesets_changelog_format_exports); | ||
async function getReleaseLine(changeset) { | ||
function getCommitLink(sha, repo) { | ||
return `[${sha.slice(0, 7)}](https://github.com/${repo}/commit/${sha})`; | ||
} | ||
async function getReleaseLine(changeset, _versionType, options) { | ||
if (!options?.repo) { | ||
throw new TypeError("Missing `options.repo`"); | ||
} | ||
const [firstLine, ...futureLines] = changeset.summary.split("\n").map((l) => l.trimEnd()); | ||
@@ -35,3 +41,4 @@ let returnVal = `- ${firstLine}`; | ||
if (changeset.commit) { | ||
returnVal += ` (${changeset.commit.slice(0, 7)})`; | ||
const link = getCommitLink(changeset.commit, options.repo); | ||
returnVal += ` (${link})`; | ||
} | ||
@@ -38,0 +45,0 @@ return returnVal; |
{ | ||
"name": "@fingerprintjs/changesets-changelog-format", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Custom changelog format for changesets", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
3923
60