@octokit/plugin-rest-endpoint-methods
Advanced tools
Comparing version 3.12.1 to 3.12.2
@@ -1246,3 +1246,3 @@ 'use strict'; | ||
const VERSION = "3.12.1"; | ||
const VERSION = "3.12.2"; | ||
@@ -1303,24 +1303,28 @@ function endpointsToMethods(octokit, endpointsMap) { | ||
octokit.log.warn(decorations.deprecated); | ||
} // There currently are no renamed parameters | ||
// if (decorations.renamedParameters) { | ||
// // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 | ||
// const options = requestWithDefaults.endpoint.merge(...args); | ||
// for (const [name, alias] of Object.entries( | ||
// decorations.renamedParameters | ||
// )) { | ||
// if (name in options) { | ||
// octokit.log.warn( | ||
// `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` | ||
// ); | ||
// if (!(alias in options)) { | ||
// options[alias] = options[name]; | ||
// } | ||
// delete options[name]; | ||
// } | ||
// } | ||
// return requestWithDefaults(options); | ||
// } | ||
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 | ||
} | ||
if (decorations.renamedParameters) { | ||
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 | ||
const options = requestWithDefaults.endpoint.merge(...args); | ||
for (const [name, alias] of Object.entries(decorations.renamedParameters)) { | ||
// There is currently no deprecated parameter that is optional, | ||
// so we never hit the else branch below at this point. | ||
/* istanbul ignore else */ | ||
if (name in options) { | ||
octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`); | ||
if (!(alias in options)) { | ||
options[alias] = options[name]; | ||
} | ||
delete options[name]; | ||
} | ||
} | ||
return requestWithDefaults(options); | ||
} // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 | ||
return requestWithDefaults(...args); | ||
@@ -1327,0 +1331,0 @@ } |
@@ -43,21 +43,19 @@ export function endpointsToMethods(octokit, endpointsMap) { | ||
} | ||
// There currently are no renamed parameters | ||
// if (decorations.renamedParameters) { | ||
// // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 | ||
// const options = requestWithDefaults.endpoint.merge(...args); | ||
// for (const [name, alias] of Object.entries( | ||
// decorations.renamedParameters | ||
// )) { | ||
// if (name in options) { | ||
// octokit.log.warn( | ||
// `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` | ||
// ); | ||
// if (!(alias in options)) { | ||
// options[alias] = options[name]; | ||
// } | ||
// delete options[name]; | ||
// } | ||
// } | ||
// return requestWithDefaults(options); | ||
// } | ||
if (decorations.renamedParameters) { | ||
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 | ||
const options = requestWithDefaults.endpoint.merge(...args); | ||
for (const [name, alias] of Object.entries(decorations.renamedParameters)) { | ||
// There is currently no deprecated parameter that is optional, | ||
// so we never hit the else branch below at this point. | ||
/* istanbul ignore else */ | ||
if (name in options) { | ||
octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`); | ||
if (!(alias in options)) { | ||
options[alias] = options[name]; | ||
} | ||
delete options[name]; | ||
} | ||
} | ||
return requestWithDefaults(options); | ||
} | ||
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 | ||
@@ -64,0 +62,0 @@ return requestWithDefaults(...args); |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "3.12.1"; | ||
export const VERSION = "3.12.2"; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "3.12.1"; | ||
export declare const VERSION = "3.12.2"; |
{ | ||
"name": "@octokit/plugin-rest-endpoint-methods", | ||
"description": "Octokit plugin adding one method for all of api.github.com REST API endpoints", | ||
"version": "3.12.1", | ||
"version": "3.12.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1058934
13741