Remove usages of cross-fetch in backend packages

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-08-22 11:25:32 +02:00
parent c6c0b1978a
commit 148568b5c2
14 changed files with 29 additions and 22 deletions
+10
View File
@@ -0,0 +1,10 @@
---
'@backstage/plugin-airbrake-backend': patch
'@backstage/plugin-catalog-backend-module-bitbucket-server': patch
'@backstage/plugin-dynatrace': patch
'@backstage/plugin-periskop-backend': patch
'@backstage/plugin-stack-overflow-backend': patch
'@backstage/plugin-vault-backend': patch
---
Switched to using node-fetch instead of cross-fetch as is standard for our backend packages
+3 -4
View File
@@ -25,19 +25,18 @@
"@backstage/backend-common": "^0.15.1-next.0",
"@backstage/config": "^1.0.1",
"@types/express": "*",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"express": "^4.17.1",
"http-proxy-middleware": "^2.0.0",
"winston": "^3.2.1",
"cross-fetch": "^3.0.6",
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.18.2-next.0",
"@types/http-proxy-middleware": "^0.19.3",
"@types/supertest": "^2.0.8",
"supertest": "^6.1.6",
"msw": "^0.45.0"
"msw": "^0.45.0",
"supertest": "^6.1.6"
},
"files": [
"dist",
@@ -10,6 +10,7 @@ import { EntityProvider } from '@backstage/plugin-catalog-backend';
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
import { LocationSpec } from '@backstage/plugin-catalog-backend';
import { Logger } from 'winston';
import { Response as Response_2 } from 'node-fetch';
import { TaskRunner } from '@backstage/backend-tasks';
// @public
@@ -24,7 +25,7 @@ export class BitbucketServerClient {
projectKey: string;
repo: string;
path: string;
}): Promise<Response>;
}): Promise<Response_2>;
// (undocumented)
getRepository(options: {
projectKey: string;
@@ -39,7 +39,8 @@
"@backstage/errors": "^1.0.0",
"@backstage/integration": "^1.3.1-next.0",
"@backstage/plugin-catalog-backend": "^1.3.2-next.0",
"cross-fetch": "^3.1.5",
"@types/node-fetch": "^2.5.12",
"node-fetch": "^2.6.7",
"uuid": "^8.0.0",
"winston": "^3.2.1"
},
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { fetch, Request } from 'cross-fetch';
import fetch, { Request, Response } from 'node-fetch';
import {
BitbucketServerIntegrationConfig,
getBitbucketServerRequestOptions,
-2
View File
@@ -29,7 +29,6 @@
"@material-ui/core": "^4.9.13",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.57",
"cross-fetch": "^3.1.5",
"react-use": "^17.2.4"
},
"peerDependencies": {
@@ -46,7 +45,6 @@
"@testing-library/user-event": "^14.0.0",
"@types/jest": "*",
"@types/node": "*",
"cross-fetch": "^3.1.5",
"express": "^4.18.1",
"msw": "^0.45.0"
},
+1 -1
View File
@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import '@testing-library/jest-dom';
import 'cross-fetch/polyfill';
@@ -28,9 +28,8 @@
"@backstage/errors": "^1.1.0",
"@backstage/plugin-auth-node": "^0.2.5-next.0",
"@types/express": "^4.17.6",
"cross-fetch": "^3.1.5",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"express": "^4.17.1",
"uuid": "^8.3.2",
"winston": "^3.2.1",
"yn": "^4.0.0"
+2 -3
View File
@@ -27,10 +27,9 @@
"@backstage/backend-common": "^0.15.1-next.0",
"@backstage/config": "^1.0.1",
"@types/express": "*",
"cross-fetch": "^3.0.6",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"node-fetch": "^2.6.0",
"express": "^4.17.1",
"node-fetch": "^2.6.7",
"winston": "^3.2.1",
"yn": "^4.0.0"
},
+2 -2
View File
@@ -33,10 +33,10 @@
"clean": "backstage-cli package clean"
},
"dependencies": {
"@backstage/plugin-search-common": "^1.0.1-next.0",
"@backstage/config": "^1.0.1",
"@backstage/plugin-search-common": "^1.0.1-next.0",
"node-fetch": "^2.6.7",
"qs": "^6.9.4",
"cross-fetch": "^3.1.5",
"winston": "^3.2.1"
},
"files": [
@@ -20,7 +20,7 @@ import {
} from '@backstage/plugin-search-common';
import { Config } from '@backstage/config';
import { Readable } from 'stream';
import fetch from 'cross-fetch';
import fetch from 'node-fetch';
import qs from 'qs';
import { Logger } from 'winston';
+2 -2
View File
@@ -42,10 +42,10 @@
"@types/express": "*",
"compression": "^1.7.4",
"cors": "^2.8.5",
"cross-fetch": "^3.1.5",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"express": "^4.17.1",
"helmet": "^5.0.2",
"node-fetch": "^2.6.7",
"p-limit": "^3.1.0",
"winston": "^3.7.2",
"yn": "^5.0.0"
@@ -16,7 +16,7 @@
import { Config } from '@backstage/config';
import { NotFoundError } from '@backstage/errors';
import fetch from 'cross-fetch';
import fetch from 'node-fetch';
import plimit from 'p-limit';
import { getVaultConfig, VaultConfig } from '../config';
+1 -1
View File
@@ -11338,7 +11338,7 @@ cross-env@^7.0.0:
dependencies:
cross-spawn "^7.0.1"
cross-fetch@3.1.5, cross-fetch@^3.0.4, cross-fetch@^3.0.6, cross-fetch@^3.1.3, cross-fetch@^3.1.5:
cross-fetch@3.1.5, cross-fetch@^3.0.4, cross-fetch@^3.1.3, cross-fetch@^3.1.5:
version "3.1.5"
resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==