Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changelog #587

Merged
merged 7 commits into from May 12, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 43 additions & 1 deletion .grenrc.js
Expand Up @@ -3,12 +3,37 @@ module.exports = {
prefix: "",
onlyMilestones: false,
ignoreTagsWith: ["v0.32.0", "0.0.3"],
ignoreLabels: [
"semver-major",
"semver-minor",
"semver-patch",
"closed",
"breaking-change",
"bug",
"enhancement",
"dependencies",
],
tags: "all",
groupBy: false,
groupBy: {
"Major Changes": ["semver-major", "breaking-change"],
"Minor Changes": ["semver-minor", "enhancement"],
Dependencies: ["dependencies"],
"Bug Fixes": ["semver-patch", "bug"],
Other: ["..."],
},
changelogFilename: "CHANGELOG.md",
username: "node-saml",
repo: "passport-saml",
template: {
issue: function (placeholders) {
const parts = [
"-",
placeholders.labels,
placeholders.name,
`[${placeholders.text}](${placeholders.url})`,
];
return parts.filter((_) => _).join(" ");
},
release: function (placeholders) {
let dateParts = placeholders.date.split("/");
let placeholdersDate = new Date(
Expand All @@ -17,7 +42,24 @@ module.exports = {
Number(dateParts[0])
);
let isoDateString = placeholdersDate.toISOString().split("T")[0];
placeholders.body = placeholders.body.replace(
"*No changelog for this release.*",
"\n_No changelog for this release._"
);
return `## ${placeholders.release} (${isoDateString})\n${placeholders.body}`;
},
group: function (placeholders) {
const iconMap = {
Enhancements: "🚀",
"Minor Changes": "🚀",
"Bug Fixes": "🐛",
Documentation: "📚",
"Technical Tasks": "⚙️",
"Major Changes": "💣",
Dependencies: "🔗",
};
const icon = iconMap[placeholders.heading] || "🙈";
return "\n#### " + icon + " " + placeholders.heading + ":\n";
},
},
};
9 changes: 9 additions & 0 deletions .release-it.json
@@ -0,0 +1,9 @@
{
"github": {
"release": true,
"releaseName": "v${version}"
},
"hooks": {
"after:bump": "npm run changelog"
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "passport-saml",
"version": "2.0.6",
"version": "2.2.0",
"description": "SAML 2.0 authentication strategy for Passport",
"keywords": [
"saml",
Expand Down Expand Up @@ -42,6 +42,7 @@
"prettier-check": "prettier --config .prettierrc.json --check .",
"prettier-format": "prettier --config .prettierrc.json --write .",
"prettier-watch": "onchange -k -p 100 \".\" -- prettier --config .prettierrc.json --write {{file}}",
"release": "release-it",
"test": "npm run prettier-check && npm run lint && npm run tsc && mocha",
"test-watch": "mocha --watch",
"tsc": "tsc",
Expand Down Expand Up @@ -92,11 +93,5 @@
},
"engines": {
"node": ">= 10"
},
"release-it": {
"github": {
"release": true,
"releaseName": "v${version}"
}
}
}