Bump deps (incl. isomorphic-fetch replacement) (#2614)

* Bump deps (incl. isomorphic-fetch replacement)

* Bump ts
This commit is contained in:
Jaco Greeff
2020-09-16 08:53:50 +02:00
committed by GitHub
parent 12ea37d1ec
commit 2a36987140
6 changed files with 321 additions and 650 deletions
+2 -2
View File
@@ -28,8 +28,8 @@
"@babel/core": "^7.11.6",
"@babel/register": "^7.11.5",
"@babel/runtime": "^7.11.2",
"@polkadot/dev": "^0.55.51",
"@polkadot/ts": "^0.3.46",
"@polkadot/dev": "^0.55.52",
"@polkadot/ts": "^0.3.47",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^26.0.13",
"@vuepress/plugin-search": "^1.5.4",
+1 -1
View File
@@ -32,8 +32,8 @@
"@polkadot/util": "^3.4.1",
"@polkadot/util-crypto": "^3.4.1",
"bn.js": "^5.1.3",
"cross-fetch": "^3.0.6",
"eventemitter3": "^4.0.7",
"isomorphic-fetch": "^2.2.1",
"websocket": "^1.0.32"
},
"devDependencies": {
+1 -2
View File
@@ -4,8 +4,7 @@
import { ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitted, ProviderInterfaceEmitCb } from '../types';
import './polyfill';
import fetch from 'cross-fetch';
import { assert, logger } from '@polkadot/util';
import Coder from '../coder';
@@ -1,37 +0,0 @@
// Copyright 2017-2020 @polkadot/rpc-provider authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Global } from './../mock/types';
declare const global: Global;
describe('http/polyfill', (): void => {
let origFetch: any;
beforeEach((): void => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
origFetch = global.fetch;
});
afterEach((): void => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
global.fetch = origFetch;
});
it('polyfills with no exceptions (without fetch)', (): void => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
(global as any).fetch = undefined;
require('./polyfill');
expect(global.fetch).toBeDefined();
});
it('polyfills with no exceptions (with fetch)', (): void => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
(global as any).fetch = (): boolean => true;
require('./polyfill');
expect(global.fetch).toBeDefined();
});
});
@@ -1,7 +0,0 @@
// Copyright 2017-2020 @polkadot/rpc-provider authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
if (typeof fetch === 'undefined') {
require('isomorphic-fetch');
}
+317 -601
View File
File diff suppressed because it is too large Load Diff