techdocs: do not use cross-fetch in backend

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-02-10 14:30:02 +01:00
parent e3a45b68c2
commit 453145abba
4 changed files with 7 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs-backend': patch
---
Do not use cross-fetch in the backend
-1
View File
@@ -41,7 +41,6 @@
"@backstage/search-common": "^0.2.2",
"@backstage/techdocs-common": "^0.11.7",
"@types/express": "^4.17.6",
"cross-fetch": "^3.1.5",
"dockerode": "^3.3.1",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
@@ -31,7 +31,7 @@ import { DocsSynchronizer, DocsSynchronizerSyncOpts } from './DocsSynchronizer';
jest.mock('../DocsBuilder');
jest.mock('cross-fetch', () => ({
jest.mock('node-fetch', () => ({
__esModule: true,
default: async () => {
return {
@@ -24,7 +24,7 @@ import {
PreparerBuilder,
PublisherBase,
} from '@backstage/techdocs-common';
import fetch from 'cross-fetch';
import fetch from 'node-fetch';
import { PassThrough } from 'stream';
import * as winston from 'winston';
import { TechDocsCache } from '../cache';