Development
Prerequisites
-
Install
pnpmglobally:npm install --global pnpmThe pnpm version used by this workspace is pinned via
packageManagerin the rootpackage.json; pnpm switches to it automatically.
Typical Build Process
pnpm install
pnpm -r build
Testing
Since Version 44 a license key is necessary to use the CkEditor.
Create a file named .env in the root of this workspace and add a line
CKEDITOR_LICENSE_KEY=<your-license-key>
Changesets
Every pull request needs a changeset, which states the kind of release the change requires (see Versioning) and becomes its changelog entry:
pnpm changeset
If a change needs no release (e.g. CI or documentation only), add an empty one:
pnpm changeset add --empty
All published packages share one version: a changeset for one package bumps all of them.
Maintenance Branches
main holds the newest major. To ship fixes for an older major (see
Versioning), create a maintenance branch maintenance/<major>
with the GitHub Actions workflow Create Maintenance Branch (input: the major,
e.g. 30). It creates the branch from the newest release of that major.
A maintenance branch is a release line of its own and works like main: pull
requests need a changeset, are integrated by the QA gate, and are released via a
“Version Packages” pull request. Differences:
- Only
patchandminorchangesets are allowed;majorchangesets are rejected. - Releases are published with the npm dist-tag
maintenance-<major>, solatestkeeps pointing to the newest release frommain. Their GitHub release is not marked as latest. - The API documentation on GitHub Pages is only deployed from
main.
A fix needed on both lines is made on one branch and cherry-picked to the other,
including its changeset. main and maintenance branches are never merged into each
other.
A maintenance branch keeps the GitHub Actions workflows of the release it was
created from. Fixes of the workflows on main do not reach it: cherry-pick them if
the branch needs them. Likewise, Dependabot only updates main; add an entry with
target-branch: maintenance/<major> to .github/dependabot.yml on main if a
branch should get action updates.
Example:
mainis released up to30.4.2; a CMCC version is bound to major 30.mainmoves on with breaking changes and releases31.0.0,31.1.0and32.0.0.- A customer on that CMCC version needs a security fix, still on major 30.
- Create Maintenance Branch with
30createsmaintenance/30from30.4.2. - The fix is cherry-picked into
maintenance/30with apatchchangeset and released as30.4.3(dist-tagmaintenance-30);lateststays on32.x.
The branch may also be created while main is still on that major, e.g. right
before breaking changes, as long as main has no unreleased version (e.g. after a
failed release). Changes merged into main with changesets that are not released
yet are not part of the branch: release them first or cherry-pick them; the
workflow lists them. main must then not release that major again: its
“Version Packages” pull request and its release fail until a major changeset is
pending, and pull requests into main get a warning until then.
The branch can only be created from a release that already contains the workflow
Create Maintenance Branch, i.e. a release made with Changesets after it was
introduced. Releases of the old release process (up to 28.1.1) and the legacy
branches maintenance/23.0, 24.0 and 25.0 are not supported by this workflow.
Major 28 becomes maintainable with its first release made with Changesets.
Update Process
All dependency versions are maintained centrally in the catalog of
pnpm-workspace.yaml; the packages refer to them as catalog:, including their
peerDependencies. To update CKEditor 5, change the ckeditor5 entry and the
@ckeditor/* entries there, then run:
pnpm install
pnpm only installs versions released at least one day ago (minimumReleaseAge),
except for the scopes listed in minimumReleaseAgeExclude.
Troubleshooting
-
Remove node_modules:
In case of problems, you may want to try to remove all
node_modulesfolders and re-install artifacts again viapnpm install. Removingnode_modulescan be triggered by:pnpm clean:node_modules