chore: remove node-fetch from the project

This commit is contained in:
blam
2020-10-09 14:14:53 +02:00
parent a45a5d9418
commit f36e1e9fe7
15 changed files with 12 additions and 21 deletions
-1
View File
@@ -65,7 +65,6 @@
"@types/compression": "^1.7.0",
"@types/http-errors": "^1.6.3",
"@types/morgan": "^1.9.0",
"@types/node-fetch": "^2.5.7",
"@types/stoppable": "^1.1.0",
"@types/supertest": "^2.0.8",
"@types/webpack-env": "^1.15.2",
@@ -29,15 +29,14 @@
"express": "^4.17.1",
"express-promise-router": "^3.0.3",
"winston": "^3.2.1",
"node-fetch": "^2.6.1",
"cross-fetch": "^3.0.6",
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/cli": "^{{version}}",
"@types/supertest": "^2.0.8",
"supertest": "^4.0.2",
"msw": "^0.21.2",
"cross-fetch": "^3.0.6"
"msw": "^0.21.2"
},
"files": [
"dist"
+1 -2
View File
@@ -48,8 +48,7 @@
"@testing-library/user-event": "^12.0.7",
"@types/jest": "^26.0.7",
"@types/node": "^12.0.0",
"@types/zen-observable": "^0.8.0",
"jest-fetch-mock": "^3.0.3"
"@types/zen-observable": "^0.8.0"
},
"files": [
"dist"
-2
View File
@@ -15,5 +15,3 @@
*/
import '@testing-library/jest-dom';
require('jest-fetch-mock').enableMocks();
+1 -2
View File
@@ -64,8 +64,7 @@
"@types/jest": "^26.0.7",
"@types/node": "^12.0.0",
"@types/react-helmet": "^6.1.0",
"@types/zen-observable": "^0.8.0",
"jest-fetch-mock": "^3.0.3"
"@types/zen-observable": "^0.8.0"
},
"files": [
"dist"
-2
View File
@@ -15,5 +15,3 @@
*/
import '@testing-library/jest-dom';
require('jest-fetch-mock').enableMocks();
+1 -1
View File
@@ -26,7 +26,7 @@
"@types/node": "^13.7.2",
"fs-extra": "^9.0.0",
"handlebars": "^4.7.3",
"node-fetch": "^2.6.0",
"cross-fetch": "^3.0.6",
"pgtools": "^0.3.0",
"tree-kill": "^1.2.2",
"ts-node": "^8.6.2",
+1 -1
View File
@@ -16,7 +16,7 @@
import os from 'os';
import fs from 'fs-extra';
import fetch from 'node-fetch';
import fetch from 'cross-fetch';
import handlebars from 'handlebars';
import killTree from 'tree-kill';
import { resolve as resolvePath, join as joinPath } from 'path';
-1
View File
@@ -51,7 +51,6 @@
"@types/jest": "^26.0.7",
"@types/node": "^12.0.0",
"msw": "^0.21.2",
"node-fetch": "^2.6.1",
"react-test-renderer": "^16.13.1",
"cross-fetch": "^3.0.6"
},
-2
View File
@@ -35,8 +35,6 @@
},
"devDependencies": {
"@backstage/cli": "^0.1.1-alpha.24",
"@types/node-fetch": "^2.5.7",
"@types/supertest": "^2.0.8",
"@types/uuid": "^8.0.0",
"@types/yup": "^0.28.2",
"supertest": "^4.0.2"
+1
View File
@@ -34,6 +34,7 @@
"git-url-parse": "^11.2.0",
"knex": "^0.21.1",
"nodegit": "^0.27.0",
"cross-fetch": "^3.0.6",
"winston": "^3.2.1"
},
"devDependencies": {
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import fetch, { RequestInit } from 'node-fetch';
import fetch from 'cross-fetch';
import parseGitUrl from 'git-url-parse';
import { ConfigReader, Config } from '@backstage/config';
import { loadBackendConfig } from '@backstage/backend-common';
@@ -1,4 +1,3 @@
import fetch from 'node-fetch';
/*
* Copyright 2020 Spotify AB
*
@@ -15,6 +14,8 @@ import fetch from 'node-fetch';
* limitations under the License.
*/
import fetch from 'cross-fetch';
export class TechDocsMetadata {
private async getMetadataFile(docsUrl: String) {
const metadataURL = `${docsUrl}/techdocs_metadata.json`;
@@ -17,7 +17,7 @@ import { Logger } from 'winston';
import Router from 'express-promise-router';
import express from 'express';
import Knex from 'knex';
import fetch from 'node-fetch';
import fetch from 'cross-fetch';
import { Config } from '@backstage/config';
import Docker from 'dockerode';
import {
+1 -1
View File
@@ -5180,7 +5180,7 @@
dependencies:
"@types/node" "*"
"@types/node-fetch@2.5.7", "@types/node-fetch@^2.5.4", "@types/node-fetch@^2.5.7":
"@types/node-fetch@2.5.7", "@types/node-fetch@^2.5.4":
version "2.5.7"
resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c"
integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==