Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

Remove trailing chars from changelog summaries

Changed files
+11 -2
scripts
changesets
+11 -2
scripts/changesets/changelog.js
···
const REPO = 'FormidableLabs/urql';
const SEE_LINE = /^See:\s*(.*)/i;
+
const TRAILING_CHAR = /[.;:]$/g;
-
const getSummaryLines = cs =>
-
cs.summary
+
const getSummaryLines = cs => {
+
const lines = cs.summary
.trim()
.split(/[\r\n]+/)
.map(l => l.trim())
.filter(Boolean);
+
const size = lines.length;
+
if (size > 0) {
+
lines[size - 1] = lines[size - 1]
+
.replace(TRAILING_CHAR, '');
+
}
+
+
return lines;
+
};
/** Creates a "(See X)" string from a template */
const templateSeeRef = links => {