diff --git a/flow-libs/abortcontroller-polyfill.js.flow b/flow-libs/abortcontroller-polyfill.js.flow deleted file mode 100644 index ae721895856..00000000000 --- a/flow-libs/abortcontroller-polyfill.js.flow +++ /dev/null @@ -1,15 +0,0 @@ -// @flow - -declare module 'abortcontroller-polyfill/dist/cjs-ponyfill' { - // Identical to https://github.com/facebook/flow/blob/v0.92.1/lib/bom.js#L1048 - declare export class AbortController { - constructor(): void; - +signal: AbortSignal; - abort(): void; - } - - declare export class AbortSignal extends EventTarget { - +aborted: boolean; - onabort: (event: 'abort') => mixed; - } -} diff --git a/packages/core/cache/src/FSCache.js b/packages/core/cache/src/FSCache.js index dd807336dc9..90e9a136b0a 100644 --- a/packages/core/cache/src/FSCache.js +++ b/packages/core/cache/src/FSCache.js @@ -5,7 +5,6 @@ import type {FilePath} from '@parcel/types'; import type {FileSystem} from '@parcel/fs'; import type {Cache} from './types'; -import type {AbortSignal} from 'abortcontroller-polyfill/dist/cjs-ponyfill'; import stream from 'stream'; import path from 'path'; import {promisify} from 'util'; diff --git a/packages/core/cache/src/LMDBCache.js b/packages/core/cache/src/LMDBCache.js index 382fa29cb95..b2eef533203 100644 --- a/packages/core/cache/src/LMDBCache.js +++ b/packages/core/cache/src/LMDBCache.js @@ -3,7 +3,6 @@ import type {FilePath} from '@parcel/types'; import type {Cache} from './types'; import type {Readable, Writable} from 'stream'; -import type {AbortSignal} from 'abortcontroller-polyfill/dist/cjs-ponyfill'; import stream from 'stream'; import path from 'path'; import {promisify} from 'util'; diff --git a/packages/core/cache/src/types.js b/packages/core/cache/src/types.js index 56a545b40ff..c9dab9535b6 100644 --- a/packages/core/cache/src/types.js +++ b/packages/core/cache/src/types.js @@ -1,6 +1,5 @@ // @flow import type {Readable} from 'stream'; -import type {AbortSignal} from 'abortcontroller-polyfill/dist/cjs-ponyfill'; export interface Cache { ensure(): Promise; diff --git a/packages/core/core/package.json b/packages/core/core/package.json index 67fb61d364e..9060a55553c 100644 --- a/packages/core/core/package.json +++ b/packages/core/core/package.json @@ -40,7 +40,6 @@ "@parcel/types": "2.12.0", "@parcel/utils": "2.12.0", "@parcel/workers": "2.12.0", - "abortcontroller-polyfill": "^1.1.9", "base-x": "^3.0.8", "browserslist": "^4.6.6", "clone": "^2.1.1", diff --git a/packages/core/core/src/Parcel.js b/packages/core/core/src/Parcel.js index 3d94666ce82..7812c2e3dc1 100644 --- a/packages/core/core/src/Parcel.js +++ b/packages/core/core/src/Parcel.js @@ -16,7 +16,6 @@ import type {ParcelOptions} from './types'; // eslint-disable-next-line no-unused-vars import type {FarmOptions, SharedReference} from '@parcel/workers'; import type {Diagnostic} from '@parcel/diagnostic'; -import type {AbortSignal} from 'abortcontroller-polyfill/dist/cjs-ponyfill'; import invariant from 'assert'; import ThrowableDiagnostic, {anyToDiagnostic} from '@parcel/diagnostic'; @@ -32,7 +31,6 @@ import dumpGraphToGraphViz from './dumpGraphToGraphViz'; import resolveOptions from './resolveOptions'; import {ValueEmitter} from '@parcel/events'; import {registerCoreWithSerializer} from './registerCoreWithSerializer'; -import {AbortController} from 'abortcontroller-polyfill/dist/cjs-ponyfill'; import {PromiseQueue} from '@parcel/utils'; import ParcelConfig from './ParcelConfig'; import logger from '@parcel/logger'; diff --git a/packages/core/core/src/RequestTracker.js b/packages/core/core/src/RequestTracker.js index efb6ef42077..0c71775ad80 100644 --- a/packages/core/core/src/RequestTracker.js +++ b/packages/core/core/src/RequestTracker.js @@ -1,6 +1,5 @@ // @flow strict-local -import type {AbortSignal} from 'abortcontroller-polyfill/dist/cjs-ponyfill'; import type {Async, EnvMap} from '@parcel/types'; import type {Options as WatcherOptions, Event} from '@parcel/watcher'; import type WorkerFarm from '@parcel/workers'; diff --git a/packages/core/core/src/requests/BundleGraphRequest.js b/packages/core/core/src/requests/BundleGraphRequest.js index b6d02bb8ce2..466f76a1a1c 100644 --- a/packages/core/core/src/requests/BundleGraphRequest.js +++ b/packages/core/core/src/requests/BundleGraphRequest.js @@ -13,7 +13,6 @@ import type { ParcelOptions, } from '../types'; import type {ConfigAndCachePath} from './ParcelConfigRequest'; -import type {AbortSignal} from 'abortcontroller-polyfill/dist/cjs-ponyfill'; import invariant from 'assert'; import assert from 'assert'; diff --git a/packages/core/core/src/requests/ParcelBuildRequest.js b/packages/core/core/src/requests/ParcelBuildRequest.js index 04d22ca4548..b3057590783 100644 --- a/packages/core/core/src/requests/ParcelBuildRequest.js +++ b/packages/core/core/src/requests/ParcelBuildRequest.js @@ -3,7 +3,6 @@ import type {ContentKey} from '@parcel/graph'; import type {Async} from '@parcel/types'; import type {SharedReference} from '@parcel/workers'; -import type {AbortSignal} from 'abortcontroller-polyfill/dist/cjs-ponyfill'; import type {StaticRunOpts} from '../RequestTracker'; import type {Asset, AssetGroup, PackagedBundleInfo} from '../types'; diff --git a/packages/core/core/src/utils.js b/packages/core/core/src/utils.js index baa0266c8c4..c43c06741d9 100644 --- a/packages/core/core/src/utils.js +++ b/packages/core/core/src/utils.js @@ -1,6 +1,5 @@ // @flow strict-local -import type {AbortSignal} from 'abortcontroller-polyfill/dist/cjs-ponyfill'; import type { FilePath, FileCreateInvalidation, diff --git a/packages/core/core/test/RequestTracker.test.js b/packages/core/core/test/RequestTracker.test.js index c729768b934..8315445b00f 100644 --- a/packages/core/core/test/RequestTracker.test.js +++ b/packages/core/core/test/RequestTracker.test.js @@ -1,7 +1,6 @@ // @flow strict-local import assert from 'assert'; -import {AbortController} from 'abortcontroller-polyfill/dist/cjs-ponyfill'; import nullthrows from 'nullthrows'; import RequestTracker, {type RunAPI} from '../src/RequestTracker'; import WorkerFarm from '@parcel/workers'; diff --git a/yarn.lock b/yarn.lock index 54c452de05d..6798ef587ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2967,11 +2967,6 @@ abbrev@^2.0.0: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== -abortcontroller-polyfill@^1.1.9: - version "1.4.0" - resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.4.0.tgz#0d5eb58e522a461774af8086414f68e1dda7a6c4" - integrity sha512-3ZFfCRfDzx3GFjO6RAkYx81lPGpUS20ISxux9gLxuKnqafNcFQo59+IoZqpO2WvQlyc287B62HDnDdNYRmlvWA== - acorn-globals@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45"