chore: reworking all deps to use cross-fetch instead

This commit is contained in:
blam
2020-10-08 21:57:27 +02:00
parent cee9ca8777
commit 827bb733bf
11 changed files with 9 additions and 14 deletions
@@ -41,8 +41,8 @@
"@testing-library/user-event": "^12.0.7",
"@types/jest": "^26.0.7",
"@types/node": "^12.0.0",
"msw": "^0.20.5",
"node-fetch": "^2.6.1"
"msw": "^0.21.2",
"cross-fetch": "^3.0.6"
},
"files": [
"dist"
@@ -1,2 +1,2 @@
import '@testing-library/jest-dom';
global.fetch = require('node-fetch');
import 'cross-fetch/register'
-1
View File
@@ -49,7 +49,6 @@
"@types/node": "^12.0.0",
"@types/react": "^16.9",
"@types/swagger-ui-react": "^3.23.3",
"jest-fetch-mock": "^3.0.3",
"msw": "^0.20.5",
"node-fetch": "^2.6.1"
},
-2
View File
@@ -15,5 +15,3 @@
*/
import '@testing-library/jest-dom';
require('jest-fetch-mock').enableMocks();
-1
View File
@@ -61,7 +61,6 @@
"@types/passport-google-oauth20": "^2.0.3",
"@types/passport-microsoft": "^0.0.0",
"@types/passport-saml": "^1.1.2",
"jest-fetch-mock": "^3.0.3",
"msw": "^0.20.5"
},
"files": [
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import fetch from 'node-fetch';
import fetch from 'cross-fetch';
import { UserEntity } from '@backstage/catalog-model';
import {
ConflictError,
-2
View File
@@ -14,6 +14,4 @@
* limitations under the License.
*/
require('jest-fetch-mock').enableMocks();
export {};
+1
View File
@@ -23,6 +23,7 @@
"@backstage/backend-common": "^0.1.1-alpha.24",
"@backstage/catalog-model": "^0.1.1-alpha.24",
"@backstage/config": "^0.1.1-alpha.24",
"@backstage/test-utils": "^0.1.1-alpha.24",
"@octokit/graphql": "^4.5.6",
"@types/express": "^4.17.6",
"@types/node-fetch": "^2.5.7",
@@ -15,7 +15,7 @@
*/
import { Entity, EntityMeta } from '@backstage/catalog-model';
import fetch from 'node-fetch';
import fetch from 'cross-fetch';
import { JsonObject } from '@backstage/config';
export interface ReaderEntityMeta extends EntityMeta {
+2 -2
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import fetch from 'node-fetch';
import '@testing-library/jest-dom';
import fetch from 'node-fetch';
global.fetch = fetch as any;
window.fetch = fetch;
+1 -1
View File
@@ -23514,7 +23514,7 @@ whatwg-fetch@^2.0.4:
resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f"
integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==
whatwg-fetch@^3.0.0, whatwg-fetch@^3.4.0, whatwg-fetch@^3.4.1:
whatwg-fetch@^3.0.0, whatwg-fetch@^3.4.1:
version "3.4.1"
resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.4.1.tgz#e5f871572d6879663fa5674c8f833f15a8425ab3"
integrity sha512-sofZVzE1wKwO+EYPbWfiwzaKovWiZXf4coEzjGP9b2GBVgQRLQUZ2QcuPpQExGDAW5GItpEm6Tl4OU5mywnAoQ==