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
2
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.2.10 to 1.2.11

33

dist-node/index.js

@@ -7,37 +7,8 @@ 'use strict';

const VERSION = "1.2.10";
const VERSION = "1.2.11";
function isIssueLabelsUpdateOrReplace({
method,
url
}) {
if (!["POST", "PUT"].includes(method)) {
return false;
}
if (!/\/repos\/[^/]+\/[^/]+\/issues\/[^/]+\/labels/.test(url)) {
return false;
}
return true;
}
function enterpriseCompatibility(octokit) {
octokit.hook.wrap("request", async (request, options) => {
// see https://github.com/octokit/rest.js/blob/15.x/lib/routes.json#L3046-L3068
if (isIssueLabelsUpdateOrReplace(options)) {
options.data = options.labels;
delete options.labels; // for @octokit/rest v16.x, remove validation of labels option
/* istanbul ignore if */
if (options.request.validate) {
delete options.request.validate.labels;
}
return request(options);
} // TODO: implement fix for #62 here
// TODO: implement fix for #62 here
// https://github.com/octokit/plugin-enterprise-compatibility.js/issues/60
if (/\/orgs\/[^/]+\/teams/.test(options.url)) {

@@ -44,0 +15,0 @@ try {

import { RequestError } from "@octokit/request-error";
import { VERSION } from "./version";
import { isIssueLabelsUpdateOrReplace } from "./is-issue-labels-update-or-replace";
export function enterpriseCompatibility(octokit) {
octokit.hook.wrap("request", async (request, options) => {
// see https://github.com/octokit/rest.js/blob/15.x/lib/routes.json#L3046-L3068
if (isIssueLabelsUpdateOrReplace(options)) {
options.data = options.labels;
delete options.labels;
// for @octokit/rest v16.x, remove validation of labels option
/* istanbul ignore if */
if (options.request.validate) {
delete options.request.validate.labels;
}
return request(options);
}
// TODO: implement fix for #62 here

@@ -18,0 +6,0 @@ // https://github.com/octokit/plugin-enterprise-compatibility.js/issues/60

2

dist-src/version.js

@@ -1,1 +0,1 @@

export const VERSION = "1.2.10";
export const VERSION = "1.2.11";

@@ -1,1 +0,1 @@

export declare const VERSION = "1.2.10";
export declare const VERSION = "1.2.11";
import { RequestError } from '@octokit/request-error';
const VERSION = "1.2.10";
const VERSION = "1.2.11";
function isIssueLabelsUpdateOrReplace({ method, url }) {
if (!["POST", "PUT"].includes(method)) {
return false;
}
if (!/\/repos\/[^/]+\/[^/]+\/issues\/[^/]+\/labels/.test(url)) {
return false;
}
return true;
}
function enterpriseCompatibility(octokit) {
octokit.hook.wrap("request", async (request, options) => {
// see https://github.com/octokit/rest.js/blob/15.x/lib/routes.json#L3046-L3068
if (isIssueLabelsUpdateOrReplace(options)) {
options.data = options.labels;
delete options.labels;
// for @octokit/rest v16.x, remove validation of labels option
/* istanbul ignore if */
if (options.request.validate) {
delete options.request.validate.labels;
}
return request(options);
}
// TODO: implement fix for #62 here

@@ -29,0 +8,0 @@ // https://github.com/octokit/plugin-enterprise-compatibility.js/issues/60

{
"name": "@octokit/plugin-enterprise-compatibility",
"description": "Octokit plugin for improving GHE compatibility",
"version": "1.2.10",
"version": "1.2.11",
"license": "MIT",

@@ -6,0 +6,0 @@ "files": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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