Skip to content

Commit 6569116

Browse files
authored
Merge pull request #1152 from ckeditor/epic/ck/18051-changeset
Feature: Introduce a new tool to generate the changelog based on changesets. Closes ckeditor/ckeditor5#18051.
2 parents 1dca061 + 4f8215d commit 6569116

File tree

202 files changed

+10920
-1283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+10920
-1283
lines changed

.changelog/.gitkeep

Whitespace-only changes.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
# Required: Type of change.
3+
# Allowed values:
4+
# - Feature
5+
# - Fix
6+
# - Other
7+
# - Major breaking change
8+
# - Minor breaking change
9+
# - Breaking change
10+
#
11+
# For guidance on breaking changes, see:
12+
# https://ckeditor.com/docs/ckeditor5/latest/updating/versioning-policy.html#major-and-minor-breaking-changes
13+
type: Feature
14+
15+
# Optional: Affected package(s), using short names.
16+
# Example: ckeditor5-core
17+
scope:
18+
- ckeditor5-dev-utils
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+
Created new namespaces: `workspaces` and `npm`.
44+
45+
* `workspaces` exposes the following functions:
46+
* `findPathsToPackages()`
47+
* `getPackageJson()`
48+
* `getRepositoryUrl()`
49+
* `npm` exposes the following functions:
50+
* `checkVersionAvailability()`
51+
* `manifest()` - a wrapper over the `packote` package that prevents using any cache
52+
* `packument()` - as above.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
# - Breaking change
10+
#
11+
# For guidance on breaking changes, see:
12+
# https://ckeditor.com/docs/ckeditor5/latest/updating/versioning-policy.html#major-and-minor-breaking-changes
13+
type: Feature
14+
15+
# Optional: Affected package(s), using short names.
16+
# Example: ckeditor5-core
17+
scope:
18+
- ckeditor5-dev-changelog
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+
- https://github.com/ckeditor/ckeditor5/issues/18051
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+
Initial version of the `@ckeditor/ckeditor5-dev-changelog` package that uses markdown files as the source of changelogs instead of Git commits.
44+
45+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
# - Breaking change
10+
#
11+
# For guidance on breaking changes, see:
12+
# https://ckeditor.com/docs/ckeditor5/latest/updating/versioning-policy.html#major-and-minor-breaking-changes
13+
type: Other
14+
15+
# Optional: Affected package(s), using short names.
16+
# Example: ckeditor5-core
17+
scope:
18+
- ckeditor5-dev-release-tools
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+
The `checkVersionAvailability()` and `findPathsToPackages()` functions exported by the `@ckeditor/ckeditor5-dev-release-tools` package have been moved to the `@ckeditor/ckeditor5-dev-utils` package.
44+
45+
For backward compatibility, they are still available in the `@ckeditor/ckeditor5-dev-release-tools` package and will be removed in the next major release.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
# Required: Type of change.
3+
# Allowed values:
4+
# - Feature
5+
# - Fix
6+
# - Other
7+
# - Major breaking change
8+
# - Minor breaking change
9+
# - Breaking change
10+
#
11+
# For guidance on breaking changes, see:
12+
# https://ckeditor.com/docs/ckeditor5/latest/updating/versioning-policy.html#major-and-minor-breaking-changes
13+
type: Feature
14+
15+
# Optional: Affected package(s), using short names.
16+
# Example: ckeditor5-core
17+
scope:
18+
- ckeditor5-dev-utils
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+
- https://github.com/ckeditor/ckeditor5/issues/18051
35+
36+
# Optional: Community contributors.
37+
# Format:
38+
# - @{github-username}
39+
communityCredits:
40+
-
41+
---
42+
43+
Added a new function to the `tools` namespace: `tools.commit()`.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
1-
### Suggested merge commit message ([convention](https://github.com/ckeditor/ckeditor5-design/wiki/Git-commit-message-convention))
1+
<!--
22
3-
Type: Message. Closes #000.
3+
This repository uses Markdown files to define changelog entries. If the changes in this pull request are **user-facing**, please create a changelog entry by running the following command:
4+
5+
yarn nice
6+
7+
This will generate a `*.md` file in the `.changelog/` directory for your description. You can create as many as you need.
8+
9+
**Note:**
10+
If your PR is internal-only (e.g., tests, tooling, docs), you can skip this step - just mention it below.
11+
12+
-->
13+
14+
### 🚀 Summary
15+
16+
*A brief summary of what this PR changes.*
17+
18+
---
19+
20+
### 📌 Related issues
21+
22+
<!--
23+
24+
Although changelog entries list connected issues, GitHub requires listing them here to automatically link and close them.
25+
26+
-->
27+
28+
* Closes #000
429

530
---
631

7-
### Additional information
32+
### 💡 Additional information
833

9-
*For example – encountered issues, assumptions you had to make, other affected tickets, etc.*
34+
*Optional: Notes on decisions, edge cases, or anything helpful for reviewers.*

DEPRECATIONS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,23 @@ Below, you can find all deprecation codes used in the `ckeditor5-dev-*` packages
99
### DEP0001: `verifyPackagesPublishedCorrectly()`
1010

1111
Since v45, the `verifyPackagesPublishedCorrectly()` function is no longer available as its responsibility has been merged with `publishPackages()`.
12+
13+
### DEP0002: `checkVersionAvailability()`
14+
15+
Since v51, the `checkVersionAvailability()` function is no longer exported by the `@ckeditor/ckeditor5-dev-release-tools` package. Use the `@ckeditor/ckeditor5-dev-utils` package instead.
16+
17+
```js
18+
import { npm } from '@ckeditor/ckeditor5-dev-utils';
19+
20+
npm.checkVersionAvailability( /* ... */ );
21+
```
22+
23+
### DEP0003: `findPathsToPackages()`
24+
25+
Since v51, the `findPathsToPackages()` function is no longer exported by the `@ckeditor/ckeditor5-dev-release-tools` package. Use the `@ckeditor/ckeditor5-dev-utils` package instead.
26+
27+
```js
28+
import { workspaces } from '@ckeditor/ckeditor5-dev-utils';
29+
30+
workspaces.findPathsToPackages( /* ... */ );
31+
```

README.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This repository is a monorepo. It contains multiple npm packages.
1111
| Package | Version |
1212
|--------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1313
| [`@ckeditor/ckeditor5-dev-bump-year`](/packages/ckeditor5-dev-bump-year) | [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-bump-year.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-bump-year) |
14+
| [`@ckeditor/ckeditor5-dev-changelog`](/packages/ckeditor5-dev-changelog) | [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-changelog.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-changelog) |
1415
| [`@ckeditor/ckeditor5-dev-ci`](/packages/ckeditor5-dev-ci) | [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-ci.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-ci) |
1516
| [`@ckeditor/ckeditor5-dev-dependency-checker`](/packages/ckeditor5-dev-dependency-checker) | [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-dependency-checker.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-dependency-checker) |
1617
| [`@ckeditor/ckeditor5-dev-docs`](/packages/ckeditor5-dev-docs) | [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-dev-docs.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-docs) |
@@ -19,7 +20,7 @@ This repository is a monorepo. It contains multiple npm packages.
1920
| [`@ckeditor/ckeditor5-dev-utils`](/packages/ckeditor5-dev-utils) | [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-dev-utils.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-utils) |
2021
| [`@ckeditor/ckeditor5-dev-translations`](/packages/ckeditor5-dev-translations) | [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-dev-translations.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-translations) |
2122
| [`@ckeditor/ckeditor5-dev-web-crawler`](/packages/ckeditor5-dev-web-crawler) | [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-dev-web-crawler.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-web-crawler) |
22-
| [`@ckeditor/typedoc-plugins`](/packages/typedoc-plugins) | [![npm version](https://badge.fury.io/js/%40ckeditor%2Ftypedoc-plugins.svg)](https://www.npmjs.com/package/@ckeditor/typedoc-plugins) |
23+
| [`@ckeditor/typedoc-plugins`](/packages/typedoc-plugins) | [![npm version](https://badge.fury.io/js/%40ckeditor%2Ftypedoc-plugins.svg)](https://www.npmjs.com/package/@ckeditor/typedoc-plugins) |
2324

2425
## Cloning
2526

@@ -35,17 +36,7 @@ Tests:
3536
yarn run test
3637
```
3738

38-
Tests with the debug mode on:
39-
40-
```bash
41-
DEBUG=true yarn run test
42-
```
43-
44-
Test a single package:
45-
46-
```bash
47-
./node_modules/.bin/mocha packages/ckeditor5-dev-release-tools/tests/* --recursive
48-
```
39+
Each package defines its own tests. To run them, change your working directory and use the `test` script.
4940

5041
Code coverage:
5142

@@ -61,14 +52,7 @@ Before you start, you need to prepare the changelog entries.
6152

6253
1. Make sure the `#master` branch is up-to-date: `git fetch && git checkout master && git pull`.
6354
1. Prepare a release branch: `git checkout -b release-[YYYYMMDD]` where `YYYYMMDD` is the current day.
64-
1. Generate the changelog entries: `yarn run changelog --branch release-[YYYYMMDD] [--from [GIT_TAG]]`.
65-
* By default, the changelog generator uses the latest published tag as a starting point for collecting commits to process.
66-
67-
The `--from` modifier option allows overriding the default behavior. It is required when preparing the changelog entries for the next stable release while the previous one was marked as a prerelease, e.g., `@alpha`.
68-
69-
**Example**: Let's assume that the `v40.5.0-alpha.0` tag is our latest and that we want to release it on a stable channel. The `--from` modifier should be equal to `--from v40.4.0`.
70-
* This task checks what changed in each package and bumps the version accordingly. It won't create a new changelog entry if nothing changes at all. If changes were irrelevant (e.g., only dependencies), it would make an "_internal changes_" entry.
71-
* Scan the logs printed by the tool to search for errors (incorrect changelog entries). Incorrect entries (e.g., ones without the type) should be addressed. You may need to create entries for them manually. This is done directly in CHANGELOG.md (in the root directory). Make sure to verify the proposed version after you modify the changelog.
55+
1. Generate the changelog entries: `yarn run release:prepare-changelog`.
7256
1. Commit all changes and prepare a new pull request targeting the `#master` branch.
7357
1. Ping the `@ckeditor/ckeditor-5-platform` team to review the pull request and trigger the release process.
7458

eslint.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ export default defineConfig( [
4949
' * For licensing, see LICENSE.md.',
5050
' */'
5151
]
52-
} ]
52+
} ],
53+
'ckeditor5-rules/require-file-extensions-in-imports': [
54+
'error',
55+
{
56+
extensions: [ '.ts', '.js', '.json' ]
57+
}
58+
]
5359
}
5460
},
5561
{

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"devDependencies": {
1818
"@ckeditor/ckeditor5-dev-bump-year": "^50.0.0",
1919
"@ckeditor/ckeditor5-dev-ci": "^50.0.0",
20+
"@ckeditor/ckeditor5-dev-changelog": "^0.0.1",
2021
"@ckeditor/ckeditor5-dev-dependency-checker": "^50.0.0",
2122
"@ckeditor/ckeditor5-dev-release-tools": "^50.0.0",
2223
"@inquirer/prompts": "^7.5.0",
@@ -37,11 +38,12 @@
3738
"upath": "^2.0.1"
3839
},
3940
"scripts": {
41+
"nice": "ckeditor5-dev-changelog-create-entry",
4042
"postinstall": "node ./scripts/postinstall.js",
4143
"test": "node ./scripts/runtest.js",
4244
"coverage": "node ./scripts/runtest.js --coverage",
43-
"changelog": "node ./scripts/changelog.js",
4445
"check-versions-match": "node scripts/ci/check-dependencies-versions-match.mjs",
46+
"release:prepare-changelog": "node ./scripts/preparechangelog.js",
4547
"release:prepare-packages": "node ./scripts/preparepackages.js",
4648
"release:publish-packages": "node ./scripts/publishpackages.js",
4749
"lint": "eslint",

packages/ckeditor5-dev-build-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"type": "module",
2020
"main": "dist/index.js",
21-
"types": "dist/types/index.d.ts",
21+
"types": "dist/index.d.ts",
2222
"files": [
2323
"bin",
2424
"dist"

packages/ckeditor5-dev-build-tools/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"rootDir": "src",
5-
"outDir": "dist/types"
5+
"outDir": "dist"
66
},
77
"include": [
88
"src",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage
2+
dist
3+
node_modules
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Changelog
2+
=========
3+
4+
All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5-dev/blob/master/CHANGELOG.md.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Software License Agreement
2+
==========================
3+
4+
Copyright (c) 2003-2025, [CKSource](http://cksource.com) Holding sp. z o.o. All rights reserved.
5+
6+
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
7+
8+
Sources of Intellectual Property Included in CKEditor
9+
-----------------------------------------------------
10+
11+
Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.
12+
13+
Trademarks
14+
----------
15+
16+
**CKEditor** is a trademark of [CKSource](http://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.

0 commit comments

Comments
 (0)