Monorepo development & continuous integration tooling.
When we released monorepo, a headache problem was that release flow failed but some packages had been published to NPM. At this time, you may discard current release, or publish manually one by one, but it's quite troublesome in a monorepo with a large number of packages.
mono introduced a post patch
process, it helps you to continue current release with visible release status.
- Restartable release flow, powered by a post
patch
release process with visible release status. - Quickly launch on-demand development build for monorepo.
- Generated changelog with author.
npm i -g monoo # globally
npm i -D monoo # as devDependencies
If you had a monorepo as:
.
├── lerna.json
├── package.json
└── packages
├── foo
├── bar
├── baz
└── qux
If current version is 2.1.1
, after a period of time, I decide to release a patch version with latest
version, so I execute:
monoo release
You'll receive a prompt log to choose a release version, and you selected 2.1.2
to continue.
If release process got failed, you'll see a visible release status under patch
stage:
Just select Y
to finish release for all unpublished packages.
You may execute monoo release
after build packages, but if your build process generated assets that contains the version of each, you'll get a wrong version at final NPM assets, you can execute build after version is bumped:
monoo release --build --ignore-scripts
# Note that --ignore-scripts is required if you set `prepublishOnly` for sub packages.
Patch process has been integrated into release flow, you can also use it separately:
monoo patch --tag=latest # launch patch process with latest tag.
Changelog process has been integrated into release flow, You can also use it separately:
monoo changelog # generate changelog
The equivalent command under release flow is:
monoo changelog --beautify --commit --gitPush --attachAuthor --authorNameType name
monoo changelog --attachAuthor
Commits under generated changelog will be attached with commit author:
### Bug Fixes
-* **scope:** xx ([d1cfea5](...))
+* **scope:** xx ([d1cfea5](...)) [@ULIVZ](https://github.com/ulivz)
monoo changelog --commit
monoo will create a commit for generated changelog.
monoo changelog --gitPush
monoo will create a push action to remote repository.
using lerna run dev
will launch all dev process for all packages, using monoo dev
will launch a on-demand development build for monorepo.
monoo dev
Using monoo release
to replace lerna publish
:
monoo release # standard release flow
monoo release --no-changelog # do not generate changelog
monoo release --ignore-scripts # ignore npm scripts under release process.
monoo release --dry-run # preview execution
monoo patch --tag laest # standard release flow
monoo patch --tag next # launch patch process with next tag.
monoo patch --tag latest --ignore-scripts # Ignore npm scripts under patch process.
monoo changelog
monoo changelog --beautify # beautify changelog
monoo changelog --commit # create a commit
monoo changelog --gitPush # push to remote repository
monoo changelog --attachAuthor # add author to generated changelog
monoo changelog --authorNameType email # set display author to author's email
monoo changelog --authorNameType name # set display author to author's name
Recommended composable flags:
monoo changelog --beautify --commit --gitPush --attachAuthor --authorNameType name
monoo dev # launch a on-demand development build for monorepo.
Projects that use MONOO:
- VuePress: 📝 Minimalistic Vue-powered static site generator.
- Many ByteDance projects.
- Feel free to add yours here...
monoo leverage lerna under the hood, but you can still use it in other monorepo tool chains, such as rush.
MIT © ULIVZ