Update dependency @octokit/rest to v17
Created by: renovate[bot]
This PR contains the following updates:
Package | Type | Update | New value | References | Sourcegraph |
---|---|---|---|---|---|
@octokit/rest | devDependencies | major | ^17.6.0 | source |
Release Notes
octokit/rest.js
v17.6.0
Features
v17.5.2
Bug Fixes
v17.5.1
Bug Fixes
v17.5.0
Features
v17.4.0
Features
v17.3.0
Features
Before
const options = octokit.issues.listForRepo.endpoint.merge({
owner: "octokit",
repo: "rest.js",
});
const issues = await octokit.paginate(options);
After
const issues = await octokit.paginate(octokit.issues.listForRepo, {
owner: "octokit",
repo: "rest.js",
});
v17.2.1
Bug Fixes
v17.2.0
Features
v17.1.4
Renames
The previous methods have been deprecated.
-
octokit.activity.checkStarringRepo()
->octokit.activity.checkRepoIsStarredByAuthenticatedUser()
-
octokit.activity.listEventsForOrg()
->octokit.activity.listOrgEventsForAuthenticatedUser()
-
octokit.activity.listEventsForUser()
->octokit.activity.listEventsForAuthenticatedUser()
-
octokit.activity.listFeeds()
->octokit.activity.getFeeds()
-
octokit.activity.listNotifications()
->octokit.activity.listNotificationsForAuthenticatedUser()
-
octokit.activity.listNotificationsForRepo()
->octokit.activity.listRepoNotificationsForAuthenticatedUser()
-
octokit.activity.listPublicEventsForOrg()
->octokit.activity.listPublicOrgEvents()
-
octokit.activity.markAsRead()
->octokit.activity.markNotificationsAsRead()
-
octokit.activity.markNotificationsAsReadForRepo()
->octokit.activity.markRepoNotificationsAsRead()
-
octokit.activity.starRepo()
->octokit.activity.starRepoForAuthenticatedUser()
-
octokit.activity.unstarRepo()
->octokit.activity.unstarRepoForAuthenticatedUser()
v17.1.3
Bug Fixes
- update @octokit/plugin-rest-endpoint-methods to version 3.3.3 and pin versino in package.json (a492db4), closes #1657
v17.1.2
Bug Fixes
v17.1.1
Bug Fixes
v17.1.0
Features
octokit.repos.deleteDeployment()
octokit.actions.listArtifactsForRepo()
- new octokit.reactions.* endpoints. Deprecates
octokit.reactions.delete()
- new endpoints and deprecations coming from restructuring in GitHubs REST API docs
v17.0.1
Bug Fixes
v17.0.0
Breaking Changes
-
All deprecated methods and options have been removed. Upgrade to the latest
16.x.x
version and address all deprecation messages for an easy upgrade.- For deprecated endpoint methods that have no replacement use
octokit.request
instead.-
octokit.oauthAuthorizations.createAuthorization()
➡ octokit.request("POST /authorizations", parameters)
(see deprecation notice) -
octokit.oauthAuthorizations.deleteAuthorization()
➡ octokit.request("DELETE /authorizations/:authorization_id", parameters)
(see deprecation notice) -
octokit.oauthAuthorizations.deleteGrant()
➡ octokit.request("DELETE /applications/grants/:grant_id", parameters)
(see deprecation notice) -
octokit.oauthAuthorizations.getAuthorization()
➡ octokit.request("GET /authorizations/:authorization_id", parameters)
(see deprecation notice) -
octokit.oauthAuthorizations.getGrant()
➡ octokit.request("GET /applications/grants/:grant_id", parameters)
(see deprecation notice) -
octokit.oauthAuthorizations.getOrCreateAuthorizationForApp()
➡ octokit.request("PUT /authorizations/clients/:client_id", parameters)
(see deprecation notice) -
octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint()
➡ octokit.request("PUT /authorizations/clients/:client_id/:fingerprint", parameters)
(see deprecation notice) -
octokit.oauthAuthorizations.listAuthorizations()
➡ octokit.request("GET /authorizations", parameters)
(see deprecation notice) -
octokit.oauthAuthorizations.listGrants()
➡ octokit.request("GET /applications/grants", parameters)
(see deprecation notice) -
octokit.oauthAuthorizations.updateAuthorization()
➡ octokit.request("PATCH /authorizations/:authorization_id", parameters)
(see deprecation notice) -
octokit.pulls.createFromIssue()
➡ octokit.request("POST /repos/:owner/:repo/pulls", parameters)
(see deprecation notice) -
octokit.repos.getCommitRefSha()
➡ octokit.request("GET /repos/:owner/:repo/commits/:ref", parameters)
(see deprecation notice) -
octokit.teams.addMemberLegacy()
➡ octokit.request("PUT /teams/:team_id/members/:username", parameters)
(see deprecation notice) -
octokit.teams.getLegacy()
➡ octokit.request("GET /teams/:team_id", parameters)
(see deprecation notice) -
octokit.teams.getMemberLegacy()
➡ octokit.request("GET /teams/:team_id/members/:username", parameters)
(see deprecation notice) -
octokit.teams.removeMemberLegacy()
➡ octokit.request("DELETE /teams/:team_id/members/:username", parameters)
(see deprecation notice)
-
- Methods have been replaced by new ones, some of which require new parameters
-
octokit.apps.checkAuthorization()
➡ octokit.apps.checkToken()
-
octokit.apps.resetAuthorization()
➡ octokit.apps.resetToken()
-
octokit.apps.revokeAuthorizationForApplication()
➡ octokit.apps.deleteToken()
-
octokit.apps.revokeGrantForApplication()
➡ octokit.apps.deleteAuthorization()
-
octokit.reactions.createForTeamDiscussionLegacy()
➡ octokit.reactions.createForTeamDiscussionInOrg()
(An "org" parameter is now required) -
octokit.reactions.createForTeamDiscussionCommentLegacy()
➡ octokit.reactions.createForTeamDiscussionCommentInOrg()
(An "org" parameter is now required) -
octokit.reactions.listForTeamDiscussionLegacy()
➡ octokit.reactions.listForTeamDiscussionInOrg()
(An "org" parameter is now required) -
octokit.reactions.listForTeamDiscussionCommentLegacy()
➡ octokit.reactions.listForTeamDiscussionCommentInOrg()
(An "org" parameter is now required) -
octokit.teams.addMemberLegacy()
➡ octokit.teams.addMemberInOrg()
(An "org" parameter is now required) -
octokit.teams.addOrUpdateMembershipLegacy()
➡ octokit.teams.addOrUpdateMembershipInOrg()
(An "org" parameter is now required) -
octokit.teams.addOrUpdateProjectLegacy()
➡ octokit.teams.addOrUpdateProjectInOrg()
(An "org" parameter is now required) -
octokit.teams.addOrUpdateRepoLegacy()
➡ octokit.teams.addOrUpdateRepoInOrg()
(An "org" parameter is now required) -
octokit.teams.checkManagesRepoLegacy()
➡ octokit.teams.checkManagesRepoInOrg()
(An "org" parameter is now required) -
octokit.teams.createDiscussionLegacy()
➡ octokit.teams.createDiscussionInOrg()
(An "org" parameter is now required) -
octokit.teams.createDiscussionCommentLegacy()
➡ octokit.teams.createDiscussionCommentInOrg()
(An "org" parameter is now required) -
octokit.teams.deleteLegacy()
➡ octokit.teams.deleteInOrg()
(An "org" parameter is now required) -
octokit.teams.deleteDiscussionLegacy()
➡ octokit.teams.deleteDiscussionInOrg()
(An "org" parameter is now required) -
octokit.teams.deleteDiscussionCommentLegacy()
➡ octokit.teams.deleteDiscussionCommentInOrg()
(An "org" parameter is now required) -
octokit.teams.getLegacy()
➡ octokit.teams.getInOrg()
(An "org" parameter is now required) -
octokit.teams.getDiscussionLegacy()
➡ octokit.teams.getDiscussionInOrg()
(An "org" parameter is now required) -
octokit.teams.getDiscussionCommentLegacy()
➡ octokit.teams.getDiscussionCommentInOrg()
(An "org" parameter is now required) -
octokit.teams.getMemberLegacy()
➡ octokit.teams.getMemberInOrg()
(An "org" parameter is now required) -
octokit.teams.getMembershipLegacy()
➡ octokit.teams.getMembershipInOrg()
(An "org" parameter is now required) -
octokit.teams.listChildLegacy()
➡ octokit.teams.listChildInOrg()
(An "org" parameter is now required) -
octokit.teams.listDiscussionCommentsLegacy()
➡ octokit.teams.listDiscussionCommentsInOrg()
(An "org" parameter is now required) -
octokit.teams.listDiscussionsLegacy()
➡ octokit.teams.listDiscussionsInOrg()
(An "org" parameter is now required) -
octokit.teams.listMembersLegacy()
➡ octokit.teams.listMembersInOrg()
(An "org" parameter is now required) -
octokit.teams.listPendingInvitationsLegacy()
➡ octokit.teams.listPendingInvitationsInOrg()
(An "org" parameter is now required) -
octokit.teams.listProjectsLegacy()
➡ octokit.teams.listProjectsInOrg()
(An "org" parameter is now required) -
octokit.teams.listReposLegacy()
➡ octokit.teams.listReposInOrg()
(An "org" parameter is now required) -
octokit.teams.removeMemberLegacy()
➡ octokit.teams.removeMemberInOrg()
(An "org" parameter is now required) -
octokit.teams.removeMembershipLegacy()
➡ octokit.teams.removeMembershipInOrg()
(An "org" parameter is now required) -
octokit.teams.removeProjectLegacy()
➡ octokit.teams.removeProjectInOrg()
(An "org" parameter is now required) -
octokit.teams.removeRepoLegacy()
➡ octokit.teams.removeRepoInOrg()
(An "org" parameter is now required) -
octokit.teams.reviewProjectLegacy()
➡ octokit.teams.reviewProjectInOrg()
(An "org" parameter is now required) -
octokit.teams.updateLegacy()
➡ octokit.teams.updateInOrg()
(An "org" parameter is now required) -
octokit.teams.updateDiscussionLegacy()
➡ octokit.teams.updateDiscussionInOrg()
(An "org" parameter is now required) -
octokit.teams.updateDiscussionCommentLegacy()
➡ octokit.teams.updateDiscussionCommentInOrg()
(An "org" parameter is now required) -
octokit.issues.updateLabel({current_name, name})
➡ octokit.issues.updateLabel({name, new_name})
(current_name
is nowname
,name
is nownew_name
)
-
- For deprecated endpoint methods that have no replacement use
-
octokit.paginate()
is now always returning an array, even when the response is a single object. -
Parameters passed to endpoint methods such as
octokit.issues.create(parameters)
are no longer validated on the client. We recommend using TypeScript or taking advantage of the TypeScript definitions in JavaScript. -
Plugins have to return an object in order to extend the
octokit
instance. It is technically still possible to alter theoctokit
instance directly, but returning an object is required for TypeScript supportInstead of
function myPlugin(octokit, options) { octokit.helloWorld = () => console.log('Hello, world!') }
do
function myPlugin(octokit, options) { return { helloWorld: () => console.log('Hello, world!') } }
-
octokit.registerEndpoints()
has been removed.Instead of
await octokit.registerEndpoints({ misc: { getRoot: { method: "GET", url: "/" } } });
do
Object.assign(octokit.misc, { getRoot: octokit.request.defaults({ method: "GET", url: "/" }) })
If you use
octokit.registerEndpoints()
in a plugin, return an object instead:function myPlugin(octokit, options) { return { misc: { octokit.request.defaults({ method: "GET", url: "/" }) } } }
-
The
User-Agent
header now includesoctokit-rest.js/X.Y.Z
instead ofoctokit.js/X.Y.Z
-
The
Octokit
constructor must now be invoked withnew
.const octokit = Octokit()
will throw a TypeError -
Node 8 is no longer supported.
-
TypeScript: The exportedUpdate: resolved via #1650{ Octokit }
is no longer a type, only a value. Usetypeof Octokit
instead #1624
Features
-
The documentation website is now versioned. https://octokit.github.io/rest.js/v17/ has the docs for the latest version, the docs for v16 are still accessible at https://octokit.github.io/rest.js/v16. Old links pointing to https://octokit.github.io/rest.js should redirect correctly to https://octokit.github.io/rest.js/v16.
-
reduction in bundle size: 23KB down to 10kb
-
octokit.graphql()
.@octokit/rest
is no longer a REST-only library, but a REST best-practice library. All Octokit libraries based on@ocotkit/core
have both.request()
and.graphql()
methods. -
octokit.auth()
. Async method that returns the currently used authentcation, based on configuredauthStrategy
. See https://github.com/octokit/auth.js#readme for official strategies -
octokit.repos.uploadReleaseAsset(parameters)
now accepts URL parametersowner
repo
release_id
Passing
url
will still work, but is not recommended. Useoctokit.request
instead:octokit.request(url, { method: "POST", ...parameters })
TypeScript
In v16, many types have been exported on the exported Octokit
Constructor. Although they were never documented, types such as Octokit.ChecksCreateParams
have been used when wrapping Octokit's code in custom logic.
Starting with v17.5.0, parameter and response times are being officially exported. For example:
import { RestEndpointMethodTypes } from "@​octokit/rest";
// for `octokit.checks.create()`
RestEndpointMethodTypes["checks"]["create"]["parameters"]
RestEndpointMethodTypes["checks"]["create"]["response"]
✨ 🦄
- 48,624 lines of code down to 10. As in 10. Not 10,000. 10. Learn more about that on GitHub's blog: From 48k lines of code to 10—the story of GitHub’s JavaScript SDK
v16.43.1
Bug Fixes
-
TypeScript: named
{ Octokit }
export (486eadd)
v16.43.0
Features
v16.42.2
Bug Fixes
- recover Octokit.plugin (7b316d8)
v16.42.1
Bug Fixes
- do not throw if using deprecated Octokit default export without options (dec7334)
v16.42.0
Features
- deprecate
const Octokit = require("@​octokit/rest")
in favor ofconst { Octokit } = require("@​octokit/rest")
(bbc3e48)
v16.41.2
Bug Fixes
- package: update @octokit/plugin-rest-endpoint-methods to version 2.3.0 (a10ef70), closes #1571
v16.41.1
Bug Fixes
- package: update @octokit/plugin-rest-endpoint-methods to version 2.2.0 (3539118)
-
Typescript:
since
parameter type is integer, not string (6285b6c) -
TypeScript:
file
parameter is nodata
for.repos.uploadReleaseAsset()
(dc2cc51)
v16.41.0
Features
v16.40.2
Bug Fixes
- typescript: new auth strategy options (0c7b109)
v16.40.1
Bug Fixes
v16.40.0
Features
- Actions endpoint methdos (a706b0d)
v16.39.0
Features
- accessing
response.data[namespacekey]
in.paginate(options, mapFn)
map function now logs a deprecation (3caa24a)
v16.38.3
Bug Fixes
v16.38.2
Bug Fixes
-
everest
preview graduated (441c452) - add
.endpoint()
method to all deprecated endpoint methods (9701151) - bring back
octokit.teams.removeMember()
(d439ca7) - bring back `octokit.teams.removeMembership() (dadfe9a)
- correct deprecation message for
octokit.apps.*
OAuth authorization methods' (5f5e62e)
v16.38.1
Bug Fixes
-
typescript:
authStrategy
key in Octokit constructor options (fb19f11)
v16.38.0
Features
- All authentication strategies from
@octokit/auth
are now supported. Settingauth
to an object or a basic authentication string is now deprecated and will be removed in v17 (4573ee2)
v16.37.0
Features
-
.apps.revokeInstallationToken()
(ed31137) -
.migrations.listReposForOrg()
,.migrations.listReposForUser()
(8777073) -
.repos.listForOrg()
'stype
parameter can now be set to"internal"
(GitHub Enterprise Cloud only) (9c71d18) -
visibility
parameter for.repos.createForAuthenticatedUser()
and.repos.createInOrg()
(31b094b) - new
delete_branch_on_merge
parameter for.repos.createForAuthenticatedUser()
,.repos.createInOrg()
,.repos.update()
(c783249) - new parameters for
.orgs.update()
:members_can_create_internal_repositories
,members_can_create_private_repositories
,members_can_create_public_repositories
(7be5174) - new parameters for
.repos.updateBranchProtection()
:allow_deletions
,allow_force_pushes
,required_linear_history
(c5632ff) - rename & deprecation of endpoint methods using
/teams/:team_id*
path internally. The are being replaced by*ForOrg
methods that use/orgs/:org/teams/:team_slug*
internally. With the next breaking version, the*ForOrg
suffix will be removed using another deprecation. (faecc99)
Bug Fixes
- graduated previews removed: barred-rock, echo, hagar (53b8021)
Renovate configuration
-
If you want to rebase/retry this PR, check this box
This PR has been generated by WhiteSource Renovate. View repository job log here.