From a6713ead94346b44e7d573726d235fbf199d0ea9 Mon Sep 17 00:00:00 2001 From: Daan Klarenbeek Date: Tue, 20 Jun 2023 19:34:24 +0200 Subject: [PATCH] fix(Octokit): bottleneck incompatible with redis v4 --- packages/octokit/package.json | 2 +- packages/octokit/src/Octokit.ts | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/octokit/package.json b/packages/octokit/package.json index 461715ec..d9b02308 100644 --- a/packages/octokit/package.json +++ b/packages/octokit/package.json @@ -8,7 +8,7 @@ "types": "./dist/index.d.ts", "scripts": { "build": "tsc --build", - "build:watch": "tsc --watch > /dev/null", + "build-watch": "tsc --watch > /dev/null", "lint": "TIMING=1 eslint" }, "dependencies": { diff --git a/packages/octokit/src/Octokit.ts b/packages/octokit/src/Octokit.ts index bb69ff6d..aa4465e9 100644 --- a/packages/octokit/src/Octokit.ts +++ b/packages/octokit/src/Octokit.ts @@ -1,7 +1,6 @@ import { createAppAuth } from "@octokit/auth-app"; import { Octokit as CoreOctokit } from "@octokit/core"; import { throttling } from "@octokit/plugin-throttling"; -import Bottleneck from "bottleneck"; import type { createClient } from "redis"; const ExtendableOctokit = CoreOctokit.plugin(throttling) as typeof CoreOctokit; @@ -40,7 +39,6 @@ export class Octokit extends ExtendableOctokit { public constructor(options: OctokitOptions) { const userAgent = "@ijsblokje/octokit (https://github.com/ijsKoud/ijsblokje)"; - const bottleneck = new Bottleneck.RedisConnection({ client: options.redis }); super({ userAgent, @@ -50,7 +48,6 @@ export class Octokit extends ExtendableOctokit { enabled: true, onRateLimit: Octokit.onRateLimit.bind(Octokit), onSecondaryRateLimit: Octokit.onSecondaryRateLimit.bind(Octokit), - connection: bottleneck, id: options.appId.toString() } });