1.0.34 • Published 2 years ago

semantic-release-npm-deprecate v1.0.34

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

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",
    [
      "semantic-release-npm-deprecate",
      {
        "deprecations": [
          {
            "version": "< ${nextRelease.version.split('.')[0]}",
            "message": "Please use ^${nextRelease.version.split('.')[0]}.0.0."
          }
        ]
      }
    ]
  ]
}

This plugin runs in the publish lifecycle.

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.

This plugin will also check for configuration in the package.json file under the deprecations field. This is experimental and the field name may change in the future.

NPM

Configuration for NPM registry, token, etc matches that of @semantic-release/npm.

Templates

The version and message fields support Lodash templates and are passed the Context object. The following example uses the nextRelease object to get the next release version and split off the major version.

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

See https://semver.npmjs.com/ for all supported version ranges.

1.0.33

2 years ago

1.0.32

2 years ago

1.0.34

2 years ago

1.0.29

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.22

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.21

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.20

3 years ago

1.0.16

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago