techdocs: do not use cross-fetch in backend
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-backend': patch
|
||||
---
|
||||
|
||||
Do not use cross-fetch in the backend
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user