Skip to content

Commit 2d6a0ed

Browse files
bjohansebaswesleytodd
authored andcommitted
deps: update @octokit dependencies
1 parent 7cd0a62 commit 2d6a0ed

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

lib/github.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
'use strict'
22
const inquirer = require('inquirer')
3-
const Octokit = require('@octokit/rest')
4-
.plugin(require('@octokit/plugin-throttling'))
5-
.plugin(require('@octokit/plugin-retry'))
3+
const { retry } = require('@octokit/plugin-retry')
4+
const { throttling } = require('@octokit/plugin-throttling')
5+
const { Octokit } = require('@octokit/rest')
6+
7+
const OctokitRest = Octokit
8+
.plugin(retry, throttling)
69

710
const { graphql } = require('@octokit/graphql')
811

@@ -75,7 +78,7 @@ async function getOctokit (opts = {}) {
7578
let {
7679
token,
7780
log,
78-
onAbuseLimit,
81+
onSecondaryRateLimit,
7982
onRateLimit
8083
} = opts
8184

@@ -94,10 +97,10 @@ async function getOctokit (opts = {}) {
9497

9598
log = log || console
9699

97-
const octokit = Octokit({
100+
const octokit = new OctokitRest({
98101
auth,
99102
throttle: {
100-
onAbuseLimit: onAbuseLimit || ((err) => {
103+
onSecondaryRateLimit: onSecondaryRateLimit || ((err) => {
101104
log.error(err)
102105
}),
103106
onRateLimit: onRateLimit || ((err, options) => {

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
"standard": "^12.0.1"
3535
},
3636
"dependencies": {
37-
"@octokit/graphql": "^4.3.1",
38-
"@octokit/plugin-retry": "^2.2.0",
39-
"@octokit/plugin-throttling": "^2.6.0",
40-
"@octokit/rest": "^16.28.2",
37+
"@octokit/graphql": "^7.1.0",
38+
"@octokit/plugin-retry": "^6.0.1",
39+
"@octokit/plugin-throttling": "^8.2.0",
40+
"@octokit/rest": "^20.1.1",
4141
"@primer/octicons": "^9.1.1",
4242
"@wesleytodd/buildcss": "0.0.6",
4343
"@wesleytodd/buildjs": "0.0.8",

0 commit comments

Comments
 (0)