Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust releasing tools to work with monorepo #7205

Closed
mlewand opened this issue Mar 24, 2020 · 6 comments · Fixed by ckeditor/ckeditor5-dev#613
Closed

Adjust releasing tools to work with monorepo #7205

mlewand opened this issue Mar 24, 2020 · 6 comments · Fixed by ckeditor/ckeditor5-dev#613
Assignees
Labels
domain:accessibility This issue reports an accessibility problem. package:dev squad:platform Issue to be handled by the Platform team. type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@mlewand
Copy link
Contributor

mlewand commented Mar 24, 2020

Subissue of #6466.

Requires: https://github.com/ckeditor/ckeditor5-dev/issues/608.

@pomek
Copy link
Member

pomek commented Mar 26, 2020

A question: how to specify new versions of the packages? Now they are gathered from changelogs. If we will have a single changelog, it can be a little harder.

Or maybe not but we don't know how the changelog will look.

@mlewand
Copy link
Contributor Author

mlewand commented Mar 27, 2020

Estimated blindly at 5 points, we still need to clarify our requirements.

@mlewand
Copy link
Contributor Author

mlewand commented Mar 30, 2020

I think we should embrace the chance to reshape the changelog. I would see following changes:

  • We should drop long introductions in favor of (possibly) short and concise feature/change list.
  • The main changelog should contain all notable changes.
  • Longer text should be extracted, and available as a link for further reading only. I'm thinking here about migration instructions (see build-decoupled-document in the example below).
  • Changelog entries that are related to a particular package should be prefixed with the package name.
  • Changelog should contain a link to all (including ignored and minor) issues closed in a given release.

I agree with this quote from keep a changelog initiative:

Changelogs are for humans, not machines.

So legibility is important and we should avoid redundant text, or script-friendly lists.

A proposal is format like the following:

## 17.0.0

### Collaboration features

The CKEditor 5 Collaboration features changelog can be found here: <https://ckeditor.com/collaboration/changelog>.

### Major breaking changes

* [build-decoupled-document] The document editor build does not contain the highlight feature is replaced with the font color and font background color features. (link to migration instructions, e.g. GH comment permalink)
* [watchdog] The `Watchdog` class was renamed to `EditorWatchdog` and is available in `src/editorwatchdog.js`.
* [watchdog] The `EditorWatchdog.for()` method was removed in favor of the constructor.
* [watchdog] Now the `EditorWatchdog` constructor accepts the editor instance as the first argument and the watchdog configuration as the second argument. The `EditorWatchdog` editor creator now defaults to `( sourceElementOrData, config ) => Editor.create( sourceElementOrData, config )`.

### Minor breaking changes

* (...)

### Features

* [special-characters] Introduced new special characters feature. Closes ckeditor/ckeditor5#1110.
* [table] Implemented the table and table cell properties forms. Closes ckeditor/ckeditor5#3287.
* [core] Introduced [editor context API](https://ckeditor.com/docs/ckeditor5/latest/api/module_core_context-Context.html).
* [watchdog] Introduced `ContextWatchdog` which is a watchdog for `Context`. Closes [ckeditor/ckeditor5#6079](https://github.com/ckeditor/ckeditor5/issues/6079).    

### Fixes

* [table] Fixed a bug with spellchecking or pasting via the context menu into a table cell crashing the editor. Closes ckeditor/ckeditor5#6062. 

### Other

* [table] Implemented lazy loading for the table dropdown. This will reduce editor initialization time. Closes ckeditor/ckeditor5#6193.

You can find [all the fixed issues in v18.0.0 issues](https://github.com/ckeditor/ckeditor5/issues?q=is%3Aissue+milestone%3A%22iteration+29%22+is%3Aclosed) on our GitHub repository.

In case there are changes that affect (almost) all packages we could use [general] which would make sense to be placed at the top of its section. A good candidate would be accessibility or performance (in tehe example above I could aggregate table perf improvements with couple of other that were in this release).

Our current approach of picking initial changelog values from commit messages seem to work fine.

@pomek
Copy link
Member

pomek commented Apr 3, 2020

There is a problem with builds.

As for now, we are using npm prehooks for building fresh versions. The release tool at some point calls:

exec( `npm version ${ releaseDetails.version } --message "Release: v${ releaseDetails.version }. [skip ci]"` );

for every repository (in proper directory).

It means, the preversion hook was called before npm version and postversion (if defined) was called after.

After switching to one repository, calling this command will produce 5 the same commits. The preversion hook looks like:

{
  "preversion": "npm run build; if [ -n \"$(git status src/ckeditor.js build/ --porcelain)\" ]; then git add -u src/ckeditor.js build/ && git commit -m 'Internal: Build.'; fi"
}

Instead, we could remove "committing option" from the hooks (just call the build command) and commit everything after bumping version

@mlewand
Copy link
Contributor Author

mlewand commented Apr 3, 2020

Yup, it make sense to make just one commit. So preversion hook should not handle committing, instead this should be handled by parent builder script.

@pomek
Copy link
Member

pomek commented Apr 7, 2020

On the i/606 branch I've just pushed the adjusted version of release tools.

Release tools handle monorepo now. They also work with single repo (integrations).

mlewand referenced this issue in ckeditor/ckeditor5-dev May 15, 2020
Other (ckeditor5): Adjusted release tools to handle single mono-repository architecture. Closes #606.

MAJOR BREAKING CHANGE: CKEditor 5 release tools now are designed to work with monorepo architecture.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-dev May 18, 2020
@mlewand mlewand added this to the iteration 32 milestone May 18, 2020
@mlewand mlewand added squad:platform Issue to be handled by the Platform team. type:task This issue reports a chore (non-production change) and other types of "todos". package:dev labels May 18, 2020
@Reinmar Reinmar added the domain:accessibility This issue reports an accessibility problem. label Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:accessibility This issue reports an accessibility problem. package:dev squad:platform Issue to be handled by the Platform team. type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants