alexandermendes / danger-plugin-lerna

Reports which packages in a lerna mono-repo will be published.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

danger-plugin-lerna

npm version semantic-release .github/workflows/deploy.yml

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
πŸ“– πŸš€ A new version of the stuff package will be published.
πŸ“– πŸš€ 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`;
  }
}));

About

Reports which packages in a lerna mono-repo will be published.


Languages

Language:JavaScript 100.0%