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.2.3 to 1.2.4

23

dist-node/index.js

@@ -7,3 +7,3 @@ 'use strict';

const VERSION = "1.2.3";
const VERSION = "1.2.4";

@@ -98,2 +98,23 @@ function isIssueLabelsUpdateOrReplace({

});
} // TODO: implement fix for #62 here
// https://github.com/octokit/plugin-enterprise-compatibility.js/issues/60
if (/\/orgs\/[^/]+\/teams/.test(options.url)) {
try {
return await request(options);
} catch (error) {
if (error.status !== 404) {
throw error;
}
if (!error.headers || !error.headers["x-github-enterprise-version"]) {
throw error;
}
const deprecatedUrl = options.url.replace(/\/orgs\/[^/]+\/teams\/[^/]+/, "/teams/:team_id");
throw new requestError.RequestError(`"${options.method} ${options.url}" is not supported in your GitHub Enterprise Server version. Please replace with octokit.request("${options.method} ${deprecatedUrl}", { team_id })`, 404, {
request: options
});
}
}

@@ -100,0 +121,0 @@

@@ -50,2 +50,21 @@ import { RequestError } from "@octokit/request-error";

}
// TODO: implement fix for #62 here
// https://github.com/octokit/plugin-enterprise-compatibility.js/issues/60
if (/\/orgs\/[^/]+\/teams/.test(options.url)) {
try {
return await request(options);
}
catch (error) {
if (error.status !== 404) {
throw error;
}
if (!error.headers || !error.headers["x-github-enterprise-version"]) {
throw error;
}
const deprecatedUrl = options.url.replace(/\/orgs\/[^/]+\/teams\/[^/]+/, "/teams/:team_id");
throw new RequestError(`"${options.method} ${options.url}" is not supported in your GitHub Enterprise Server version. Please replace with octokit.request("${options.method} ${deprecatedUrl}", { team_id })`, 404, {
request: options,
});
}
}
return request(options);

@@ -52,0 +71,0 @@ });

2

dist-src/version.js

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

export const VERSION = "1.2.3";
export const VERSION = "1.2.4";

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

export declare const VERSION = "1.2.3";
export declare const VERSION = "1.2.4";
import { RequestError } from '@octokit/request-error';
const VERSION = "1.2.3";
const VERSION = "1.2.4";

@@ -75,2 +75,21 @@ function isIssueLabelsUpdateOrReplace({ method, url }) {

}
// TODO: implement fix for #62 here
// https://github.com/octokit/plugin-enterprise-compatibility.js/issues/60
if (/\/orgs\/[^/]+\/teams/.test(options.url)) {
try {
return await request(options);
}
catch (error) {
if (error.status !== 404) {
throw error;
}
if (!error.headers || !error.headers["x-github-enterprise-version"]) {
throw error;
}
const deprecatedUrl = options.url.replace(/\/orgs\/[^/]+\/teams\/[^/]+/, "/teams/:team_id");
throw new RequestError(`"${options.method} ${options.url}" is not supported in your GitHub Enterprise Server version. Please replace with octokit.request("${options.method} ${deprecatedUrl}", { team_id })`, 404, {
request: options,
});
}
}
return request(options);

@@ -77,0 +96,0 @@ });

{
"name": "@octokit/plugin-enterprise-compatibility",
"description": "Octokit plugin for improving GHE compatibility",
"version": "1.2.3",
"version": "1.2.4",
"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