# @octokit/plugin-enterprise-compatibility

> Octokit plugin for improving GHE compatibility

Latest version **6.0.3** (published 2025-11-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @octokit/plugin-enterprise-compatibility
pnpm add @octokit/plugin-enterprise-compatibility
yarn add @octokit/plugin-enterprise-compatibility
bun add @octokit/plugin-enterprise-compatibility
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.0.3 |
| Published | 2025-11-13 |
| First published | 2019-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 20 |
| Dependencies | 2 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Author | Gregor Martynus |
| Maintainers | octokitbot |
| Keywords | octokit, github, api, rest, plugin, enterprise |

## Links

- npm: https://www.npmjs.com/package/@octokit/plugin-enterprise-compatibility
- Repository: https://github.com/octokit/plugin-enterprise-compatibility.js
- Homepage: https://github.com/octokit/plugin-enterprise-compatibility.js#readme
- Issues: https://github.com/octokit/plugin-enterprise-compatibility.js/issues
- npm.io page: https://npm.io/package/@octokit/plugin-enterprise-compatibility

## Dependencies (2)

- [@octokit/types](https://npm.io/package/@octokit/types.md) ^16.0.0
- [@octokit/request-error](https://npm.io/package/@octokit/request-error.md) ^7.1.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 6.0.3 (latest) — 2025-11-13
- 6.0.2 — 2025-10-04
- 6.0.1 — 2025-05-20
- 6.0.0 — 2025-05-20
- 5.0.2 — 2025-04-13
- 5.0.1 — 2025-02-15
- 5.0.0 — 2024-04-30
- 4.1.0 — 2024-04-03
- 4.0.1 — 2023-10-01
- 4.0.0 — 2023-07-10
- 3.0.3 — 2023-06-14
- 3.0.2 — 2023-06-07
- 3.0.1 — 2023-06-03
- 3.0.0 — 2023-06-03
- 2.0.5 — 2023-06-02
- … 22 more at https://npm.io/package/@octokit/plugin-enterprise-compatibility/versions

## README

# plugin-enterprise-compatibility.js

> Octokit plugin for improving GHE compatibility

[![@latest](https://img.shields.io/npm/v/@octokit/plugin-enterprise-compatibility.svg)](https://www.npmjs.com/package/@octokit/plugin-enterprise-compatibility)
[![Build Status](https://github.com/octokit/plugin-enterprise-compatibility.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-enterprise-compatibility.js/actions?workflow=Test)

The GitHub API teams is continuously improving existing APIs to make the overall platform more consistent. For example, the [Add labels to an issue](https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue) expected the label names array to be sent directly in the request body root, as you can still see in the documentation for [GHE 2.15](https://developer.github.com/enterprise/2.15/v3/issues/labels/#input).

While consistency is great, changing like the above makes the current `octokit.issues.addLabels()` incompatible with GHE v2.15 and older. If you require compatibility with GHE versions, you can use the [Enterprise rest plugin](https://github.com/octokit/plugin-enterprise-rest.js), but that will remove new endpoint methods that are not available on Enterprise yet.

As a compromise, this plugin is reverting changes such as the one above to remain compatible with currently supported GitHub enterprise versions.

## Usage

<table>
<tbody valign=top align=left>
<tr><th>
Browsers
</th><td width=100%>

Load `@octokit/plugin-enterprise-compatibility` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [esm.sh](https://esm.sh)

```html
<script type="module">
  import { Octokit } from "https://esm.sh/@octokit/core";
  import { enterpriseCompatibility } from "https://esm.sh/@octokit/plugin-enterprise-compatibility";
</script>
```

</td></tr>
<tr><th>
Node
</th><td>

Install with `npm install @octokit/core @octokit/plugin-enterprise-compatibility`. Optionally replace `@octokit/core` with a core-compatible module

```js
import { Octokit } from "@octokit/core";
import { enterpriseCompatibility } from "@octokit/plugin-enterprise-compatibility";
```

</td></tr>
</tbody>
</table>

```js
const MyOctokit = Octokit.plugin(enterpriseCompatibility);
const octokit = new MyOctokit({
  auth: "token123",
});

octokit.request("POST /repos/{owner}/{repo}/issues/{issue_number}/labels", {
  owner,
  repo,
  number,
  labels: ["foo", "bar"],
});
// sends ["foo", "bar"] instead of {"labels":["foo", "bar"]} as request body
```

## LICENSE

[MIT](LICENSE)

---
_Source: https://npm.io/package/@octokit/plugin-enterprise-compatibility · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
