From e01e07fcd4fd4f5e8c5bab846eebf28cb0daab22 Mon Sep 17 00:00:00 2001 From: voltrexmaster Date: Fri, 6 Aug 2021 00:18:39 -0700 Subject: [PATCH] refactor: replace dependency with initial implementation Removed the `abortcontroller` from dependencies as a favor of the initial `AbortController` API implementation. Refs: [Graduation of the initial AbortController implementation](https://github.com/nodejs/node/pull/35949) --- package-lock.json | 35 +---------------------------------- package.json | 1 - src/rest/APIRequest.js | 1 - 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index a2da49d4178d..dc9340c51c18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,6 @@ "@discordjs/form-data": "^3.0.1", "@sapphire/async-queue": "^1.1.4", "@types/ws": "^7.4.7", - "abort-controller": "^3.0.0", "discord-api-types": "^0.22.0", "node-fetch": "^2.6.1", "ws": "^7.5.1" @@ -40,7 +39,7 @@ "typescript": "^4.3.5" }, "engines": { - "node": ">=14.6.0", + "node": ">=16.6.0", "npm": ">=7.0.0" } }, @@ -2218,17 +2217,6 @@ "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", "dev": true }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, "node_modules/acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -5090,14 +5078,6 @@ "node": ">=0.10.0" } }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "engines": { - "node": ">=6" - } - }, "node_modules/execa": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.0.tgz", @@ -13317,14 +13297,6 @@ "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", "dev": true }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "requires": { - "event-target-shim": "^5.0.0" - } - }, "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -15544,11 +15516,6 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" - }, "execa": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.0.tgz", diff --git a/package.json b/package.json index 8309d9bd47fd..7593f27d955d 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "@discordjs/form-data": "^3.0.1", "@sapphire/async-queue": "^1.1.4", "@types/ws": "^7.4.7", - "abort-controller": "^3.0.0", "discord-api-types": "^0.22.0", "node-fetch": "^2.6.1", "ws": "^7.5.1" diff --git a/src/rest/APIRequest.js b/src/rest/APIRequest.js index d710c58724f3..ce044c4711b0 100644 --- a/src/rest/APIRequest.js +++ b/src/rest/APIRequest.js @@ -2,7 +2,6 @@ const https = require('https'); const FormData = require('@discordjs/form-data'); -const AbortController = require('abort-controller'); const fetch = require('node-fetch'); const { UserAgent } = require('../util/Constants');