@octokit/plugin-rest-endpoint-methods
Advanced tools
Comparing version 10.0.0 to 10.0.1
@@ -26,2 +26,28 @@ import ENDPOINTS from "./generated/endpoints"; | ||
const handler = { | ||
has({ scope }, methodName) { | ||
return endpointMethodsMap.get(scope).has(methodName); | ||
}, | ||
getOwnPropertyDescriptor(target, methodName) { | ||
return { | ||
value: this.get(target, methodName), | ||
// ensures method is in the cache | ||
configurable: true, | ||
writable: true, | ||
enumerable: true | ||
}; | ||
}, | ||
defineProperty(target, methodName, descriptor) { | ||
Object.defineProperty(target.cache, methodName, descriptor); | ||
return true; | ||
}, | ||
deleteProperty(target, methodName) { | ||
delete target.cache[methodName]; | ||
return true; | ||
}, | ||
ownKeys({ scope }) { | ||
return [...endpointMethodsMap.get(scope).keys()]; | ||
}, | ||
set(target, methodName, value) { | ||
return target.cache[methodName] = value; | ||
}, | ||
get({ octokit, scope, cache }, methodName) { | ||
@@ -31,3 +57,7 @@ if (cache[methodName]) { | ||
} | ||
const { decorations, endpointDefaults } = endpointMethodsMap.get(scope).get(methodName); | ||
const method = endpointMethodsMap.get(scope).get(methodName); | ||
if (!method) { | ||
return void 0; | ||
} | ||
const { endpointDefaults, decorations } = method; | ||
if (decorations) { | ||
@@ -34,0 +64,0 @@ cache[methodName] = decorate( |
@@ -1,4 +0,4 @@ | ||
const VERSION = "10.0.0"; | ||
const VERSION = "10.0.1"; | ||
export { | ||
VERSION | ||
}; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "10.0.0"; | ||
export declare const VERSION = "10.0.1"; |
{ | ||
"name": "@octokit/plugin-rest-endpoint-methods", | ||
"version": "10.0.0", | ||
"version": "10.0.1", | ||
"description": "Octokit plugin adding one method for all of api.github.com REST API endpoints", | ||
@@ -18,3 +18,2 @@ "repository": "github:octokit/plugin-rest-endpoint-methods.js", | ||
"devDependencies": { | ||
"@gimenete/type-writer": "^0.1.5", | ||
"@octokit/core": "^5.0.0", | ||
@@ -25,5 +24,5 @@ "@octokit/tsconfig": "^2.0.0", | ||
"@types/node": "^18.0.0", | ||
"@types/sinon": "^10.0.19", | ||
"esbuild": "^0.19.0", | ||
"fetch-mock": "^9.0.0", | ||
"fs-extra": "^11.0.0", | ||
"fetch-mock": "npm:@gr2m/fetch-mock@^9.11.0-pull-request-644.1", | ||
"github-openapi-graphql-query": "^4.0.0", | ||
@@ -39,3 +38,4 @@ "glob": "^10.2.6", | ||
"semantic-release-plugin-update-version-in-files": "^1.0.0", | ||
"sort-keys": "^4.2.0", | ||
"sinon": "^16.1.0", | ||
"sort-keys": "^5.0.0", | ||
"string-to-jsdoc-comment": "^1.0.0", | ||
@@ -42,0 +42,0 @@ "ts-jest": "^29.0.0", |
Sorry, the diff of this file is too big to display
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
1511581
21267