Skip to content

Commit

Permalink
deps: update @octokit dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
bjohansebas authored and wesleytodd committed Nov 14, 2024
1 parent 7cd0a62 commit 2d6a0ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
15 changes: 9 additions & 6 deletions lib/github.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
'use strict'
const inquirer = require('inquirer')
const Octokit = require('@octokit/rest')
.plugin(require('@octokit/plugin-throttling'))
.plugin(require('@octokit/plugin-retry'))
const { retry } = require('@octokit/plugin-retry')
const { throttling } = require('@octokit/plugin-throttling')
const { Octokit } = require('@octokit/rest')

const OctokitRest = Octokit
.plugin(retry, throttling)

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

Expand Down Expand Up @@ -75,7 +78,7 @@ async function getOctokit (opts = {}) {
let {
token,
log,
onAbuseLimit,
onSecondaryRateLimit,
onRateLimit
} = opts

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

log = log || console

const octokit = Octokit({
const octokit = new OctokitRest({
auth,
throttle: {
onAbuseLimit: onAbuseLimit || ((err) => {
onSecondaryRateLimit: onSecondaryRateLimit || ((err) => {
log.error(err)
}),
onRateLimit: onRateLimit || ((err, options) => {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
"standard": "^12.0.1"
},
"dependencies": {
"@octokit/graphql": "^4.3.1",
"@octokit/plugin-retry": "^2.2.0",
"@octokit/plugin-throttling": "^2.6.0",
"@octokit/rest": "^16.28.2",
"@octokit/graphql": "^7.1.0",
"@octokit/plugin-retry": "^6.0.1",
"@octokit/plugin-throttling": "^8.2.0",
"@octokit/rest": "^20.1.1",
"@primer/octicons": "^9.1.1",
"@wesleytodd/buildcss": "0.0.6",
"@wesleytodd/buildjs": "0.0.8",
Expand Down

0 comments on commit 2d6a0ed

Please sign in to comment.