Skip to content

Commit

Permalink
techdocs: do not use cross-fetch in backend
Browse files Browse the repository at this point in the history
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
  • Loading branch information
freben committed Feb 10, 2022
1 parent e3a45b6 commit 453145a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-feet-tap.md
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs-backend': patch
---

Do not use cross-fetch in the backend
1 change: 0 additions & 1 deletion plugins/techdocs-backend/package.json
Expand Up @@ -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",
Expand Down
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion plugins/techdocs-backend/src/service/DocsSynchronizer.ts
Expand Up @@ -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';
Expand Down

0 comments on commit 453145a

Please sign in to comment.