Skip to content

Commit

Permalink
Fix AbortController polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Feb 16, 2021
1 parent a116f36 commit f99f791
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 15.8.0
nodejs 14.7.0
60 changes: 30 additions & 30 deletions bin/git-peek

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bin/git-peek.map

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions bin/registerProtocol.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bin/registerProtocol.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
"@types/tar": "^4.0.4",
"@types/tmp": "^0.2.0",
"@vercel/fetch": "^6.1.0",
"abort-controller": "^3.0.0",
"abortcontroller-polyfill": "^1.7.1",
"chalk": "^4.1.0",
"dotenv": "^8.2.0",
"dotenv-cli": "^4.0.0",
"pnpm": "^5.17.2",
"esbuild": "^0.8.43",
"git-url-parse": "^11.4.4",
"ink": "^3.0.8",
Expand Down
18 changes: 16 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import type { Writable } from "stream";
import zlib from "zlib";
import rimraf from "rimraf";

global.fetch = require("node-fetch");

if (typeof global.AbortController === "undefined") {
global.AbortController = require("abort-controller").AbortController;
global.AbortSignal = require("abort-controller").AbortSignal;
require("abortcontroller-polyfill/dist/polyfill-patch-fetch");
}

// This is to trick esbuild into code splitting these files
Expand Down

0 comments on commit f99f791

Please sign in to comment.