From 9bf3d962bbca8f1d61b412d4ffea75a3a670b1db Mon Sep 17 00:00:00 2001 From: null <60427892+null8626@users.noreply.github.com> Date: Mon, 2 Feb 2026 18:55:29 +0700 Subject: [PATCH 1/7] deps: bump npm dependencies --- package.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 3861048..6b3591e 100644 --- a/package.json +++ b/package.json @@ -25,26 +25,26 @@ }, "homepage": "https://topgg.js.org", "devDependencies": { - "@types/express": "^4.17.17", - "@types/jest": "^29.5.4", - "@types/node": "^20.5.9", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", - "eslint-config-prettier": "^9.0.0", - "eslint-plugin-jest": "^27.2.3", - "express": "^4.18.2", - "husky": "^8.0.3", - "jest": "^29.6.4", - "lint-staged": "^14.0.1", - "prettier": "^3.0.3", - "ts-jest": "^29.1.1", - "typedoc": "^0.25.1", - "typescript": "^5.2.2" + "@types/express": "^5.0.6", + "@types/jest": "^30.0.0", + "@types/node": "^25.2.0", + "@typescript-eslint/eslint-plugin": "^8.54.0", + "@typescript-eslint/parser": "^8.54.0", + "eslint": "^9.39.2", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-jest": "^29.12.1", + "express": "^5.2.1", + "husky": "^9.1.7", + "jest": "^30.2.0", + "lint-staged": "^16.2.7", + "prettier": "^3.8.1", + "ts-jest": "^29.4.6", + "typedoc": "^0.28.16", + "typescript": "^5.9.3" }, "dependencies": { - "raw-body": "^2.5.2", - "undici": "^5.23.0" + "raw-body": "^3.0.2", + "undici": "^7.20.0" }, "types": "./dist/index.d.ts" } From d29d9911e95c22ee33eee4d22a507e2d7527939e Mon Sep 17 00:00:00 2001 From: null <60427892+null8626@users.noreply.github.com> Date: Mon, 2 Feb 2026 18:58:07 +0700 Subject: [PATCH 2/7] fix: fix eslint errors --- src/structs/Api.ts | 1 + src/structs/Webhook.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/structs/Api.ts b/src/structs/Api.ts index 74aaf73..451dab2 100644 --- a/src/structs/Api.ts +++ b/src/structs/Api.ts @@ -49,6 +49,7 @@ export class Api extends EventEmitter { const tokenData = atob(tokenSegments[1]); try { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions JSON.parse(tokenData).id; } catch { throw new Error( diff --git a/src/structs/Webhook.ts b/src/structs/Webhook.ts index d257ce8..80e1ffa 100644 --- a/src/structs/Webhook.ts +++ b/src/structs/Webhook.ts @@ -80,7 +80,7 @@ export class Webhook { const parsed = JSON.parse(body.toString("utf8")); resolve(this._formatIncoming(parsed)); - } catch (err) { + } catch { res.status(400).json({ error: "Invalid body" }); resolve(false); } From bc29672bdc30009f8c47052ee42f297d53077a06 Mon Sep 17 00:00:00 2001 From: null <60427892+null8626@users.noreply.github.com> Date: Mon, 2 Feb 2026 18:59:07 +0700 Subject: [PATCH 3/7] ci: update deprecated portion of pre-commit script --- .husky/pre-commit | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 20d0d06..a845b85 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npm run lint +npm run lint \ No newline at end of file From 78302b9f1ca5ac9f70f08adec8b31cf1e953ccd4 Mon Sep 17 00:00:00 2001 From: null <60427892+null8626@users.noreply.github.com> Date: Mon, 2 Feb 2026 19:08:40 +0700 Subject: [PATCH 4/7] meta: update npm scripts --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6b3591e..675419b 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,9 @@ "build:ci": "npm i --include=dev && tsc", "docs": "typedoc", "prepublishOnly": "npm run build:ci", - "lint": "eslint src/**/*.ts", - "lint:ci": "eslint --output-file eslint_report.json --format json src/**/*.ts", - "prepare": "npx husky install" + "lint": "eslint", + "lint:ci": "eslint --output-file eslint_report.json --format json", + "prepare": "npx husky init" }, "repository": { "type": "git", From d822d276163fc513e8ee58316eaea882fa1a49bf Mon Sep 17 00:00:00 2001 From: null <60427892+null8626@users.noreply.github.com> Date: Mon, 2 Feb 2026 19:12:26 +0700 Subject: [PATCH 5/7] deps: bump CI dependencies --- .github/workflows/build.yml | 6 +++--- .github/workflows/publish.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6232ab2..1127bc7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,9 +13,9 @@ jobs: matrix: node: [18, 20] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Cache node_modules - uses: actions/cache@v3 + uses: actions/cache@v5 env: cache-name: cache-node-modules with: @@ -26,7 +26,7 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node }} check-latest: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2d6d3e7..a71b22b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,8 +8,8 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 with: node-version: 18 check-latest: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bce1efc..736611e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,9 +10,9 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v6 with: node-version: 18 check-latest: true From 4d442bfc0f182e8e17fb060216f702f83e18d25f Mon Sep 17 00:00:00 2001 From: null <60427892+null8626@users.noreply.github.com> Date: Tue, 3 Feb 2026 01:48:53 +0700 Subject: [PATCH 6/7] ci: also test for node 22 and 24 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1127bc7..c11a696 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [18, 20] + node: [18, 20, 22, 24] steps: - uses: actions/checkout@v6 - name: Cache node_modules From 560843781447deae9158c602c36854095745f54e Mon Sep 17 00:00:00 2001 From: null <60427892+null8626@users.noreply.github.com> Date: Tue, 3 Feb 2026 01:54:56 +0700 Subject: [PATCH 7/7] ci: drop support for node 18 as it does not work with undici 7 or later --- .github/workflows/build.yml | 2 +- .github/workflows/publish.yml | 2 +- .github/workflows/test.yml | 2 +- .nvmrc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c11a696..46f0cea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [18, 20, 22, 24] + node: [20, 22, 24] steps: - uses: actions/checkout@v6 - name: Cache node_modules diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a71b22b..b55b8a4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 with: - node-version: 18 + node-version: 20 check-latest: true registry-url: https://registry.npmjs.org/ - run: npm publish --access public diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 736611e..deca056 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: 18 + node-version: 20 check-latest: true registry-url: https://registry.npmjs.org/ - name: Install Dependencies diff --git a/.nvmrc b/.nvmrc index 87ec884..54954dc 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.18.2 +20.0.0 \ No newline at end of file