File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11'use strict'
22const 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
710const { 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 ) => {
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments