# please-update

> Notify when you release a new version

Latest version **0.0.1** (published 2017-03-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install please-update
pnpm add please-update
yarn add please-update
bun add please-update
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-03-21 |
| First published | 2017-03-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Chris Andrejewski |
| Maintainers | andrejewski |
| Keywords | node, npm, package, starter |

## Links

- npm: https://www.npmjs.com/package/please-update
- Repository: https://github.com/andrejewski/please-update
- Homepage: https://github.com/andrejewski/please-update#readme
- Issues: https://github.com/andrejewski/please-update/issues
- npm.io page: https://npm.io/package/please-update

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [is-ci](https://npm.io/package/is-ci.md) ^1.0.10
- [semver](https://npm.io/package/semver.md) ^5.3.0
- [has-yarn](https://npm.io/package/has-yarn.md) ^1.0.0
- [node-emoji](https://npm.io/package/node-emoji.md) ^1.5.1

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2017-03-21

## README

<h1 align="center">
	<br>
	<br>
	<img width="320" height="180" src="https://cdn.rawgit.com/andrejewski/please-update/master/media/logo.svg" alt="Please Update">
	<br>
	<br>
</h1>

> Notify when you release a new version

[![Example message](media/screenshot.png)](example.js)

```sh
npm install please-update
```

[![Build Status](https://travis-ci.org/andrejewski/please-update.svg?branch=master)](https://travis-ci.org/andrejewski/please-update)
[![Coverage Status](https://coveralls.io/repos/github/andrejewski/please-update/badge.svg?branch=master)](https://coveralls.io/github/andrejewski/please-update?branch=master)

## Why even?
Cool CLI tools will notify users when a new version releases so they can update.
Please Update makes your CLI tool cool, fool.

Note: Programs that run longer than it takes for an HTTPS request can use this too.

## Usage

```js
import update from 'please-update'
import pkg from './package.json'

update({
  package: pkg.name,
  version: pkg.version
}).then(() => {
  /* message printed if an update is available */
})
```

#### Considerations
The [`is-ci`](https://github.com/watson/is-ci) library detects if a command runs on CI servers.
If so, no message prints.

The default message will contain [emoji](https://github.com/omnidan/node-emoji) when supported.

## Documentation
Here are all the supported options.

| Property | Type | Default | Description |
| -------- | ---- | ------- | ----------- |
| `package` | string | **required** | The package name
| `version` | string | **required** | The current, local package version
| `preferGlobal` | boolean | `false` | Whether to show the global install command
| `includeTaggedVersions` | boolean | `false` | Whether to count tagged versions (betas, alphas) as versions
| `persistCheck` | boolean | `true` | Delegate to Please Update the task of remembering the last check time for an update
| `checkInterval` | number | 24 hours | Number of milliseconds to wait before checking for an update again
| `lastCheck` | number | 0 | The last check time in milliseconds. Needed if `persistCheck` is false.
| `displayFn` | (info: object) -> void | *built-in* | Function passed all the data necessary to print an update warning.
| `preventUpdate` | boolean | `isCI` | Whether to never check or display a warning
| `silenceErrors` | boolean | `true` | Whether to ignore an error if the NPM registry is down

## Contributing
Contributions are incredibly welcome as long as they are standardly applicable and pass the tests (or break bad ones). Tests are in AVA.

```bash
# running tests
npm run test
```

Follow me on [Twitter](https://twitter.com/compooter) for updates or for the lolz and please check out my other [repositories](https://github.com/andrejewski) if I have earned it. I thank you for reading.

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