Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .changelog/.gitkeep
Empty file.
33 changes: 29 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
### Suggested merge commit message ([convention](https://github.com/ckeditor/ckeditor5-design/wiki/Git-commit-message-convention))
<!--

Type: Message. Closes #000.
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:

yarn run nice

This will generate a `*.md` file in the `.changelog/` directory for your description. You can create as many as you need.

**Note:**
If your PR is internal-only (e.g., tests, tooling, docs), you can skip this step - just mention it below.

-->

### 🚀 Summary

*A brief summary of what this PR changes.*

---

### 📌 Related issues

<!--

Although changelog entries list connected issues, GitHub requires listing them here to automatically link and close them.

-->

* Closes #000

---

### Additional information
### 💡 Additional information

*For example – encountered issues, assumptions you had to make, other affected tickets, etc.*
*Optional: Notes on decisions, edge cases, or anything helpful for reviewers.*
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,14 @@ Before you start, you need to prepare the changelog entries.

1. Make sure the `#master` branch is up-to-date: `git fetch && git checkout master && git pull`.
1. Prepare a release branch: `git checkout -b release-[YYYYMMDD]` where `YYYYMMDD` is the current day.
1. Generate the changelog entries: `yarn run changelog --branch release-[YYYYMMDD] [--from [GIT_TAG]]`.
* By default, the changelog generator uses the latest published tag as a starting point for collecting commits to process.

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`.

**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`.
* 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.
* 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.
1. Generate the changelog entries: `yarn run release:prepare-changelog`.
* You can specify the release date by passing the `--date` option, e.g., `--date=2025-06-11`.
* By passing the `--dry-run` option, you can check what the script will do without actually modifying the files.
* Read all the entries, correct poor wording and other issues, wrap code names in backticks to format them, etc.
* Add the missing `the/a` articles, `()` to method names, "it's" -> "its", etc.
* A newly introduced feature should have just one changelog entry – something like "The initial implementation of the FOO feature." with a description of what it does.
1. Commit all changes and prepare a new pull request targeting the `#master` branch.
1. Ping the `@ckeditor/ckeditor-5-devops` team to review the pull request and trigger the release process.
1. Ping the `@ckeditor/ckeditor-5-platform` team to review the pull request and trigger the release process.

## License

Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"description": "Official Angular component for CKEditor 5 – the best browser-based rich text editor.",
"scripts": {
"nice": "ckeditor5-dev-changelog-create-entry",
"postinstall": "node ./scripts/postinstall.js",
"start": "ng serve",
"build": "ng build --configuration production",
Expand All @@ -13,8 +14,8 @@
"test:e2e:ci": "start-server-and-test 'yarn run start' http://localhost:4200/ 'yarn run test:e2e --quiet'",
"coverage": "ng test --watch=false --code-coverage",
"lint": "eslint",
"changelog": "node ./scripts/changelog.mjs",
"build-package": "ng-packagr -p src/ckeditor/ng-package.json",
"release:prepare-changelog": "node scripts/preparechangelog.mjs",
"release:prepare-packages": "node scripts/preparepackages.mjs",
"release:publish-packages": "node scripts/publishpackages.mjs"
},
Expand All @@ -38,10 +39,11 @@
"@angular/cli": "^16",
"@angular/compiler-cli": "^16",
"@angular/language-service": "^16",
"@ckeditor/ckeditor5-dev-bump-year": "^49.0.0",
"@ckeditor/ckeditor5-dev-ci": "^49.0.0",
"@ckeditor/ckeditor5-dev-release-tools": "^49.0.0",
"@ckeditor/ckeditor5-dev-utils": "^49.0.0",
"@ckeditor/ckeditor5-dev-bump-year": "^50.0.0",
"@ckeditor/ckeditor5-dev-changelog": "^50.0.0",
"@ckeditor/ckeditor5-dev-ci": "^50.0.0",
"@ckeditor/ckeditor5-dev-release-tools": "^50.0.0",
"@ckeditor/ckeditor5-dev-utils": "^50.0.0",
"@types/jasminewd2": "^2.0.10",
"@types/node": "^14.11.8",
"ckeditor5": "^44.3.0",
Expand Down
13 changes: 0 additions & 13 deletions scripts/changelog.mjs

This file was deleted.

31 changes: 31 additions & 0 deletions scripts/preparechangelog.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/

import upath from 'upath';
import { fileURLToPath } from 'url';
import { generateChangelogForSingleRepository } from '@ckeditor/ckeditor5-dev-changelog';
import parseArguments from './utils/parsearguments.mjs';

const __filename = fileURLToPath( import.meta.url );
const __dirname = upath.dirname( __filename );
const ROOT_DIRECTORY = upath.join( __dirname, '..' );

const cliOptions = parseArguments( process.argv.slice( 2 ) );

const changelogOptions = {
cwd: ROOT_DIRECTORY,
disableFilesystemOperations: cliOptions.dryRun
};

if ( cliOptions.date ) {
changelogOptions.date = cliOptions.date;
}

generateChangelogForSingleRepository( changelogOptions )
.then( maybeChangelog => {
if ( maybeChangelog ) {
console.log( maybeChangelog );
}
} );
44 changes: 36 additions & 8 deletions scripts/utils/parsearguments.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,33 @@ export default function parseArguments( cliArguments ) {
boolean: [
'verbose',
'compile-only',
'ci'
'ci',
'dry-run'
],

string: [
'branch',
'npm-tag'
'npm-tag',
'date'
],

default: {
branch: 'master',
ci: false,
'compile-only': false,
'npm-tag': null,
verbose: false
verbose: false,
'dry-run': false
}
};

const options = minimist( cliArguments, config );

options.compileOnly = options[ 'compile-only' ];
delete options[ 'compile-only' ];

options.npmTag = options[ 'npm-tag' ];
delete options[ 'npm-tag' ];
replaceKebabCaseWithCamelCase( options, [
'npm-tag',
'compile-only',
'dry-run'
] );

if ( process.env.CI ) {
options.ci = true;
Expand All @@ -46,6 +49,27 @@ export default function parseArguments( cliArguments ) {
return options;
}

function replaceKebabCaseWithCamelCase( options, keys ) {
for ( const key of keys ) {
const camelCaseKey = toCamelCase( key );

options[ camelCaseKey ] = options[ key ];
delete options[ key ];
}
}

function toCamelCase( value ) {
return value.split( '-' )
.map( ( item, index ) => {
if ( index == 0 ) {
return item.toLowerCase();
}

return item.charAt( 0 ).toUpperCase() + item.slice( 1 ).toLowerCase();
} )
.join( '' );
}

/**
* @typedef {Object} ReleaseOptions
*
Expand All @@ -58,4 +82,8 @@ export default function parseArguments( cliArguments ) {
* @property {Boolean} [verbose=false]
*
* @property {Boolean} [ci=false]
*
* @property {Boolean} [dryRun=false]
*
* @property {String} [date]
*/
Loading