-
Notifications
You must be signed in to change notification settings - Fork 197
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
Conventional Commits & Changelogs #279
Conversation
@@ -0,0 +1,15 @@ | |||
### ISC License |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what to do about the fact that this was forked from https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular. We need to reach out to that project's owners and see if this needs to live in their monorepo...
In the mean time, then package is set to private
, so we're good.
{{#if isPatch~}} | ||
## | ||
{{~else~}} | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I like the fact that patch releases get a smaller heading... Thoughts from others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like small heading as it is more clear at the first glance.
3a5edc7
to
1ed924d
Compare
* lint commits with commitlint and husky * publish using conventional commits
* update package.json directly instead of using npm install
add conventional-changelog-spectrum package, link to component changelogs in changelog for bundles
support linking between bundle changelogs and component changelogs lots of pretty emojis
add ignore-optional to yarn config use yarn to install global gulp-cli package for ci
refactor subrunner to work on arbitrary collections of packages fix some cwd-induced bugs
only check if peerDependencies satisfy devDependencies, fail if they don't release all bundles with npm run release-bundles update docs
Todo
gulp releaseBundles
task to release all bundlesDescription
This PR adds CHANGELOG.md generation based on conventional commits. In addition, we're now using yarn, bundles are no longer managed by lerna, and a new release process has been added for bundles.
Adopt Conventional Commits
Git hooks are now included that ensure commit messages conform to the conventional commits convention.
This gets us consistency and automatic releases that know exactly what version of a component to release based on the commit messages as well as automatic CHANGELOG generation.
Generate CHANGELOGs
This PR adds CHANGELOG generation for components based on conventional commits and is able to generate CHANGELOGs for bundles as well, linking out to the individual component's CHANGELOG for details.
Custom Spectrum CHANGELOG template
It's pretty and it knows how to link to documentation for bundles. I've asked design to weigh in to see if we can make it prettier.
New release process for bundles
Since the version number of a bundle needs to be in step with the components inside of it, a new
gulp updateDeps
task was added to analyze the currentpackage.json
vs all of the components in the monorepo, update their version numbers if available, and bump the version number of the bundle appropriately. That is, if a component included in the bundle has a patch, minor, or major version bump, the bundle should get one too.Switch to yarn
It's faster and works based on
package.json
'sworkspaces
field. Nice.Codify use of
peerDependencies
If a component relies on another component to render the example markup, it should be declared in both
devDependencies
andpeerDependencies
.The release will error out if:
peerDependencies
that does not appear indevDependencies
devDependencies
satisfy the range defined for that package inpeerDependencies
Related Issues
Motivation and Context
This helps us perform releases efficiently and document what has changed.
How Has This Been Tested?
Many fake releases.
Bundle changelog: https://git.corp.adobe.com/lawdavis/spectrum-css-lerna-test/blob/ccc/bundles/spectrum-css-compat/CHANGELOG.md
Component changelog: https://git.corp.adobe.com/lawdavis/spectrum-css-lerna-test/blob/ccc/components/calendar/CHANGELOG.md
Screenshots (if appropriate):
Bundle changelog:
![image](https://user-images.githubusercontent.com/201344/64971846-24a71a80-d85d-11e9-9c4f-79c3ac199ec3.png)
Component changelog:
![image](https://user-images.githubusercontent.com/201344/64971889-2d97ec00-d85d-11e9-997a-c9722e097630.png)