JSPM

  • Created
  • Published
  • Downloads 29
  • Score
    100M100P100Q122936F
  • License Apache-2.0

Semantic Release NPM Deprecate Plugin

Package Exports

  • semantic-release-npm-deprecate

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (semantic-release-npm-deprecate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Semantic Release NPM Deprecate Plugin

npm Build Release codecov GitHub contributors semantic-release

The semantic-release-npm-deprecate plugin provides functionality to mark NPM releases as deprecated.

Read more about Semantic Release.

Install

$ npm install -D semantic-release-npm-deprecate

Basic Usage

The following example will mark all previous major versions as deprecated. That is, if the next release is 2.3.4, all versions < 2 will be marked as deprecated.

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    [
      "semantic-release-npm-deprecate",
      {
        "deprecations": [
          {
            "version": "< ${nextRelease.version.split('.')[0]}",
            "message": "Please use ^${nextRelease.version.split('.')[0]}.0.0."
          }
        ]
      }
    ]
  ]
}

Configuration Options

  • deprecations: An array containing objects with the following properties:
    • version: A version range that will be deprecated.
    • message: A message that will be added to the release notes.

version and message support Lodash templates and are passed the Semantic Release Context. For example, see the following:

{
  version: "< ${nextRelease.version.split('.')[0]}"
}