@ckeditor/ckeditor5-dev-changelog 50.1.0 → 50.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -0
- package/dist/utils/constants.d.ts +1 -0
- package/package.json +4 -3
- package/template/template.md +45 -0
package/dist/index.js
CHANGED
|
@@ -44,6 +44,7 @@ const SECTIONS = {
|
|
|
44
44
|
const ISSUE_SLUG_PATTERN = /^(?<owner>[a-z0-9.-]+)\/(?<repository>[a-z0-9.-]+)#(?<number>\d+)$/;
|
|
45
45
|
const ISSUE_PATTERN = /^\d+$/;
|
|
46
46
|
const ISSUE_URL_PATTERN = /^(?<base>https:\/\/github\.com)\/(?<owner>[a-z0-9.-]+)\/(?<repository>[a-z0-9.-]+)\/issues\/(?<number>\d+)$/;
|
|
47
|
+
const NICK_NAME_PATTERN = /^@[a-z0-9-_]+$/i;
|
|
47
48
|
const TYPES = [
|
|
48
49
|
{ name: 'Feature' },
|
|
49
50
|
{ name: 'Other' },
|
|
@@ -147,6 +148,16 @@ function validateEntry(entry, packagesNames, singlePackage) {
|
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
150
|
data.closes = closesValidated;
|
|
151
|
+
const communityCreditsValidated = [];
|
|
152
|
+
for (const nickName of data.communityCredits) {
|
|
153
|
+
if (!nickName.match(NICK_NAME_PATTERN)) {
|
|
154
|
+
validations.push(`Community username "${nickName}" is not valid GitHub username.`);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
communityCreditsValidated.push(nickName);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
data.communityCredits = communityCreditsValidated;
|
|
150
161
|
const validatedEntry = {
|
|
151
162
|
...entry,
|
|
152
163
|
data: {
|
|
@@ -1165,6 +1176,12 @@ const main = async (options) => {
|
|
|
1165
1176
|
isSinglePackage,
|
|
1166
1177
|
files: parsedChangesetFiles
|
|
1167
1178
|
});
|
|
1179
|
+
// Exit when no changelog entries exist.
|
|
1180
|
+
if (!parsedChangesetFiles.length) {
|
|
1181
|
+
logInfo('');
|
|
1182
|
+
logInfo(chalk.bold('ℹ️ No changelog entries found, so there is nothing to prepare a changelog from.'));
|
|
1183
|
+
return disableFilesystemOperations ? '' : undefined;
|
|
1184
|
+
}
|
|
1168
1185
|
// Log changes in the console only when `nextVersion` is not provided.
|
|
1169
1186
|
if (!nextVersion) {
|
|
1170
1187
|
displayChanges({
|
|
@@ -41,6 +41,7 @@ export declare const SECTIONS: {
|
|
|
41
41
|
export declare const ISSUE_SLUG_PATTERN: RegExp;
|
|
42
42
|
export declare const ISSUE_PATTERN: RegExp;
|
|
43
43
|
export declare const ISSUE_URL_PATTERN: RegExp;
|
|
44
|
+
export declare const NICK_NAME_PATTERN: RegExp;
|
|
44
45
|
export declare const TYPES: readonly [{
|
|
45
46
|
readonly name: "Feature";
|
|
46
47
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-dev-changelog",
|
|
3
|
-
"version": "50.1.
|
|
3
|
+
"version": "50.1.2",
|
|
4
4
|
"description": "A CKEditor 5 development tool for handling changelogs.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -21,13 +21,14 @@
|
|
|
21
21
|
"types": "dist/index.d.ts",
|
|
22
22
|
"files": [
|
|
23
23
|
"bin",
|
|
24
|
-
"dist"
|
|
24
|
+
"dist",
|
|
25
|
+
"template"
|
|
25
26
|
],
|
|
26
27
|
"bin": {
|
|
27
28
|
"ckeditor5-dev-changelog-create-entry": "bin/generate-template.js"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@ckeditor/ckeditor5-dev-utils": "^50.1.
|
|
31
|
+
"@ckeditor/ckeditor5-dev-utils": "^50.1.2",
|
|
31
32
|
"chalk": "^5.0.0",
|
|
32
33
|
"date-fns": "^4.0.0",
|
|
33
34
|
"fs-extra": "^11.0.0",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Required: Type of change.
|
|
3
|
+
# Allowed values:
|
|
4
|
+
# - Feature
|
|
5
|
+
# - Fix
|
|
6
|
+
# - Other
|
|
7
|
+
# - Major breaking change
|
|
8
|
+
# - Minor breaking change
|
|
9
|
+
#
|
|
10
|
+
# For guidance on breaking changes, see:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/updating/versioning-policy.html#major-and-minor-breaking-changes
|
|
12
|
+
type:
|
|
13
|
+
|
|
14
|
+
# Optional: Affected package(s), using short names.
|
|
15
|
+
# Can be skipped when processing a non-mono-repository.
|
|
16
|
+
# Example: ckeditor5-core
|
|
17
|
+
scope:
|
|
18
|
+
-
|
|
19
|
+
|
|
20
|
+
# Optional: Issues this change closes.
|
|
21
|
+
# Format:
|
|
22
|
+
# - {issue-number}
|
|
23
|
+
# - {repo-owner}/{repo-name}#{issue-number}
|
|
24
|
+
# - Full GitHub URL
|
|
25
|
+
closes:
|
|
26
|
+
-
|
|
27
|
+
|
|
28
|
+
# Optional: Related issues.
|
|
29
|
+
# Format:
|
|
30
|
+
# - {issue-number}
|
|
31
|
+
# - {repo-owner}/{repo-name}#{issue-number}
|
|
32
|
+
# - Full GitHub URL
|
|
33
|
+
see:
|
|
34
|
+
-
|
|
35
|
+
|
|
36
|
+
# Optional: Community contributors.
|
|
37
|
+
# Format:
|
|
38
|
+
# - {github-username}
|
|
39
|
+
communityCredits:
|
|
40
|
+
-
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
Required concise and meaningful summary of the change.
|
|
44
|
+
|
|
45
|
+
Optional additional context or rationale. **Remove if not needed.**
|