danger-plugin-lerna
v1.2.0
Published
Reports which packages in a lerna mono-repo will be published.
Downloads
1,495
Readme
danger-plugin-lerna
Reports which packages in a lerna mono-repo will be published.
Usage
Install:
yarn add danger-plugin-lerna --dev
At a glance:
// dangerfile.js
import lerna from 'danger-plugin-lerna';
schedule(lerna());
If package changes are detected messages will be published like so:
| | Message |
|--------|-----------------------------------------------------------------------|
| :book: | :rocket: A new version of the stuff
package will be published. |
| :book: | :rocket: A new version of the more-stuff
package will be published. |
Settings
The function accepts a settings object with the following properties:
| name | description |
|-----------------------|-------------------------------------------------------------|
| emoji
| An emoji to prepend to the success message |
| noPublishMessage
| A message to show if there is nothing to publish. |
| formatSuccessMessage
| A function to format the success message. |
Example:
import lerna from 'danger-plugin-lerna';
schedule(lerna({
emoji: ':thinking:',
noPublishMessage: 'No new package versions will be published',
formatSuccessMessage(emoji, pkg) {
return `${emoji} My custom message about the ${pkg.name} package`;
}
}));