From 6ca2a02766a842b6a85eb36b9741ccc8ce225bef Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Fri, 20 Jul 2018 11:58:38 -0700 Subject: Add AbortController polyfill to fetchAsync in utils --- packages/utils/package.json | 1 + packages/utils/src/fetchAsync.ts | 3 +++ 2 files changed, 4 insertions(+) (limited to 'packages/utils') diff --git a/packages/utils/package.json b/packages/utils/package.json index 7e3d46ce7..382604fdd 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -38,6 +38,7 @@ "@0xproject/types": "^1.0.0-rc.1", "@0xproject/typescript-typings": "^1.0.0", "@types/node": "^8.0.53", + "abortcontroller-polyfill": "^1.1.9", "bignumber.js": "~4.1.0", "detect-node": "2.0.3", "ethereum-types": "^1.0.0", diff --git a/packages/utils/src/fetchAsync.ts b/packages/utils/src/fetchAsync.ts index c02e5baba..b4c85718d 100644 --- a/packages/utils/src/fetchAsync.ts +++ b/packages/utils/src/fetchAsync.ts @@ -1,5 +1,8 @@ import isNode = require('detect-node'); import 'isomorphic-fetch'; +// WARNING: This needs to be imported after isomorphic-fetch: https://github.com/mo/abortcontroller-polyfill#using-it-on-browsers-without-fetch +// tslint:disable-next-line:ordered-imports +import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'; export const fetchAsync = async ( endpoint: string, -- cgit v1.2.3 From fd349b618a48716de1b4ed7fdabd51cbd27f71bb Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Fri, 20 Jul 2018 12:05:47 -0700 Subject: Add changelog entry for @0xproject/utils --- packages/utils/CHANGELOG.json | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages/utils') diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json index 4bd82d476..2ce48ab10 100644 --- a/packages/utils/CHANGELOG.json +++ b/packages/utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "1.0.1", + "changes": [ + { + "note": "Add `AbortController` polyfill to `fetchAsync`", + "pr": 903 + } + ] + }, { "version": "1.0.0", "changes": [ -- cgit v1.2.3