2.6.2 • Published 10 days ago

semantic-release-lerna v2.6.2

Weekly downloads
55
License
MIT
Repository
github
Last release
10 days ago

semantic-release-lerna

semantic-release plugin to publish lerna managed npm packages to npm.

This is WORK-IN-PROGRESS so there will most likely be bugs and it as only really been tested under the narrow use-cases I myself need it for.

It is intended to be a drop-in replacement of the @semantic-release/npm plugin.

The plugin works in the following way:

  • You manage a monorepo using lerna.
  • You use semantic-release to automate release handling.
  • The plugin will use lerna to check which packages has been updated.
  • Package versions are latched (default latching minor and greater), i.e. patches are only published for changed packages but minor and major bumps for all packages. Use latch option to configure this.
  • Changelog is generated in the project root by semantic-release.

As of now the following features from @semantic-release/npm is not supported/implemented:

  • addChannel.
  • tarball.
  • Only rudimentary support for configuration options.
  • Only rudimentary support for authentication verification.
  • Only rudimentary support for private packages.
StepDescription
generateNotesIf the plugin option generateNotes is true this plugin generate release notes with the commit scope set to a list of affected packages (unless otherwise specificed by the commit message). This option replaces @semantic-release/release-notes-generator, do not use both at the same time.
prepareUpdate the package.json version and create the npm package tarball.
publishPublish the npm package to the registry.

Dependencies

If a package version is bumped all the packages depending (dependencies, devDependencies and peerDependencies) on it will also have the range updated if the range has one of the following formats:

  • 1.2.3
  • ^1.2.3
  • ^1.2
  • ^1

Install

$ npm install semantic-release-lerna -D

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    ["semantic-release-lerna", { "generateNotes": true }],
    "@semantic-release/changelog",
    [
      "@semantic-release/git",
      {
        "assets": [
          "CHANGELOG.md",
          "lerna.json",
          "package.json",
          "package-lock.json",
          "packages/*/package.json",
          "packages/*/package-lock.json"
        ]
      }
    ]
  ]
}

Options

OptionDescriptionDefault
npmVerifyAuthSet to false to disable verifying NPM registry credentials.true
latchLatches package versions together. If the version bump is at least the given version all packages will be bumped regardless if the package has been touched or not. "major", "minor", "patch", "prerelease", "none""minor"
rootVersionAllow to update version on root package.json.true

Troubleshooting

Working tree has uncommitted changes

lerna ERR! EUNCOMMIT Working tree has uncommitted changes, please commit or remove the following changes before continuing:

Configure @semantic-release/git to commit lerna.json and package.json from the package folders. See example configuration above.

2.6.2

10 days ago

2.6.1

11 days ago

2.6.0

21 days ago

2.5.0

2 months ago

2.4.1

2 months ago

2.4.0

2 months ago

2.3.0

3 months ago

2.2.0

3 months ago

2.1.0

5 months ago

2.0.0

7 months ago

0.8.2

9 months ago

1.0.2

10 months ago

1.0.1

11 months ago

1.0.3

9 months ago

1.0.0

12 months ago

0.8.1

1 year ago

0.8.0

1 year ago

0.7.3

1 year ago

0.7.2

1 year ago

0.7.1

2 years ago

0.7.0

2 years ago

0.5.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.4.2

2 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.0

3 years ago

0.1.1

3 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.0

4 years ago