# semver-deprecate

> Semver aware deprecate function

Latest version **1.1.0** (published 2026-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install semver-deprecate
pnpm add semver-deprecate
yarn add semver-deprecate
bun add semver-deprecate
```

## Health

**Score 55/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; has provenance.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2026-05-11 |
| First published | 2025-09-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | Chris Manson |
| Maintainers | real_ate |

## Links

- npm: https://www.npmjs.com/package/semver-deprecate
- Repository: https://github.com/ember-cli/semver-deprecate
- Homepage: https://github.com/ember-cli/semver-deprecate#readme
- Issues: https://github.com/ember-cli/semver-deprecate/issues
- npm.io page: https://npm.io/package/semver-deprecate

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^5.4.1
- [semver](https://npm.io/package/semver.md) ^7.6.3

## Recent versions

- 1.1.0 (latest) — 2026-05-11
- 1.0.0 — 2025-09-07
- 0.0.0 — 2025-09-07

## README

# semver-deprecate

This is a tiny micro-library that extracts the "Ember way" of doing deprecations into a re-usable library. The philosophy of this library is that if you have marked something to be deprecated "until" a certain major version that deprecation call should throw an error once the library's version has exceeded that major version. This allows you to remove code in minor PRs after a major release has been cut because any code-path that used to hit this deprecation is now throwing and thus no longer supported.

## Usage

```js
import { makeDeprecate } from 'semver-deprecate';

import pkg from './package.json' with { type: 'json' };

const deprecate = makeDeprecate(pkg.name, pkg.version);

deprecate('The `foo` method is deprecated.', false, {
  for: 'your-lib',
  id: 'your-lib.foo-method', // a unique ID for the deprecation
  since: {
    available: '4.1.0',
    enabled: '4.2.0',
  },
  until: '5.0.0',
  url: 'https://example.com',
});
```

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