Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@octokit/plugin-enterprise-compatibility

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/plugin-enterprise-compatibility - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

dist-node/index.js

63

package.json
{
"name": "@octokit/plugin-enterprise-compatibility",
"version": "1.1.1",
"publishConfig": {
"access": "public",
"tag": "latest"
},
"description": "Octokit plugin for improving GHE compatibility",
"directories": {
"test": "test"
},
"scripts": {
"coverage": "tap --coverage-report=html",
"coverage:upload": "npm run test && tap --coverage-report=text-lcov | coveralls",
"generate-routes": "node scripts/generate-routes",
"pretest": "standard && standard-markdown *.md",
"test": "tap --coverage test.js"
},
"repository": {
"type": "git",
"url": "https://github.com/octokit/plugin-enterprise-compatibility.js.git"
},
"version": "1.2.0",
"license": "MIT",
"files": [
"dist-*/",
"bin/"
],
"pika": true,
"sideEffects": false,
"keywords": [

@@ -31,18 +20,32 @@ "octokit",

],
"author": "Gregor Martynus (https://github.com/gr2m)",
"license": "MIT",
"bugs": {
"url": "https://github.com/octokit/plugin-enterprise-compatibility.js/issues"
"repository": "https://github.com/octokit/plugin-enterprise-compatibility.js.git",
"dependencies": {
"@octokit/request-error": "^1.2.0",
"@octokit/types": "^2.0.1"
},
"homepage": "https://github.com/octokit/plugin-enterprise-compatibility.js#readme",
"devDependencies": {
"@octokit/core": "^2.1.0",
"@octokit/rest": "^16.24.2",
"coveralls": "^3.0.2",
"nock": "^10.0.6",
"@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.6.1",
"@pika/plugin-build-web": "^0.6.1",
"@pika/plugin-ts-standard-pkg": "^0.6.1",
"@types/fetch-mock": "^7.3.1",
"@types/jest": "^24.0.21",
"@types/node": "^12.12.5",
"fetch-mock": "^7.5.1",
"jest": "^24.9.0",
"prettier": "^1.18.2",
"semantic-release": "^15.13.12",
"standard": "^12.0.1",
"standard-markdown": "^5.0.1",
"tap": "^12.6.1"
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"ts-jest": "^24.1.0",
"typescript": "^3.6.4"
},
"dependencies": {}
"publishConfig": {
"access": "public"
},
"source": "dist-src/index.js",
"types": "dist-types/index.d.ts",
"main": "dist-node/index.js",
"module": "dist-web/index.js"
}

@@ -5,4 +5,4 @@ # plugin-enterprise-compatibility.js

[![Build Status](https://travis-ci.com/octokit/plugin-enterprise-compatibility.js.svg?branch=master)](https://travis-ci.com/octokit/plugin-enterprise-compatibility.js)
[![Coverage Status](https://img.shields.io/coveralls/github/octokit/plugin-enterprise-compatibility.js.svg)](https://coveralls.io/github/octokit/plugin-enterprise-compatibility.js?branch=master)
[![@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)
[![Greenkeeper badge](https://badges.greenkeeper.io/octokit/plugin-enterprise-compatibility.js.svg)](https://greenkeeper.io/)

@@ -18,14 +18,48 @@

<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 [cdn.pika.dev](https://cdn.pika.dev)
```html
<script type="module">
import { Octokit } from "https://cdn.pika.dev/@octokit/core";
import { enterpriseCompatibility } from "https://cdn.pika.dev/@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
const Octokit = require('@octokit/rest')
.plugin(require('@octokit/plugin-enterprise-compatibility'))
const octokit = new Octokit()
const { Octokit } = require("@octokit/core");
const {
enterpriseCompatibility
} = require("@octokit/plugin-enterprise-compatibility");
```
octokit.auth({
type: 'token',
token: GITHUB_TOKEN
})
</td></tr>
</tbody>
</table>
octokit.issues.addLabels({ owner, repo, number, labels: ['foo', 'bar'] })
// sends ["foo", "bar"] instead of {"labels":["foo", "bar"]}
```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
```

@@ -32,0 +66,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc