Skip to content

Commit

Permalink
fix(watcher): Import AbortController from @whatwg-node/fetch
Browse files Browse the repository at this point in the history
There is no need for a poly/pony-fill.
  • Loading branch information
milesrichardson committed Apr 11, 2023
1 parent c45e68c commit 7a374c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 107 deletions.
105 changes: 0 additions & 105 deletions packages/graphql-codegen-cli/src/utils/abort-controller-polyfill.ts

This file was deleted.

3 changes: 1 addition & 2 deletions packages/graphql-codegen-cli/src/utils/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
makeLocalPatternSet,
makeShouldRebuild,
} from './patterns.js';
import { AbortController } from './abort-controller-polyfill.js';
import { AbortController } from '@whatwg-node/fetch';

function log(msg: string) {
// double spaces to inline the message with Listr
Expand Down Expand Up @@ -156,7 +156,6 @@ export const createWatcher = (
};

// Use an AbortController for shutdown signals
// NOTE: This will be polyfilled on Node 14 (or any environment without it defined)
const abortController = new AbortController();

/**
Expand Down

0 comments on commit 7a374c2

Please sign in to comment.