# not-prerelease

> Detect if the current package version, or the passed version is a prerelease

Latest version **1.0.1** (published 2018-08-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install not-prerelease
pnpm add not-prerelease
yarn add not-prerelease
bun add not-prerelease
```

Provides the commands `is-prerelease`, `not-prerelease`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-08-16 |
| First published | 2018-08-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Brandon Casey |
| Maintainers | brandonocasey |

## Links

- npm: https://www.npmjs.com/package/not-prerelease
- Repository: https://github.com/brandonocasey/not-prerelease
- Issues: https://github.com/brandonocasey/not-prerelease/issues
- npm.io page: https://npm.io/package/not-prerelease

## Dependencies (1)

- [semver](https://npm.io/package/semver.md) ^5.5.0

## Recent versions

- 1.0.1 (latest) — 2018-08-16
- 1.0.0 — 2018-08-16

## README

# not-prerelease

Detect if the current `npm version` call is a `prerelease` or not. That way the version
lifecycle script can do things selectively in actual releases vs prereleases, such as
update a changelog with [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog)

## Installation

```
$ npm install --save-dev not-prerelease
```

Then edit your package.json to have:

```json
  "scripts": {
    "version": "not-prerelease && thing-i-dont-want-to-do-on-prerelease || is-prerelease"
  }
```

Now when you run:

```
$ npm version <major|minor|patch|prerelease>
```

Then `thing-I-dont-want-on-prerelease` won't be run during a prerelease but,
will be run done during a major, minor, or patch releases.

## Other information
This package exports two binaries both of which default to looking at the version of package.json in the current directory, but they can also be passed one argument, a version to check.

- `not-prerelease`
  - If the version in package.json or that was passed is a prerelease it will exit 1 (failure) otherwise it will exit 0.
- `is-prerelease`
  - If the version in package.json or that was passed is a prerelease it will exit 0 (success) otherwise it will exit 1.

---
_Source: https://npm.io/package/not-prerelease · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
