Align on usage of cross-fetch vs node-fetch in frontend vs backend packages

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-11-24 19:01:46 +01:00
parent 9e4c323593
commit b055a6addc
23 changed files with 31 additions and 47 deletions
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import fetch from 'cross-fetch';
import fetch from 'node-fetch';
import { JWK, JWT, JWKS, JSONWebKey } from 'jose';
import { BackstageIdentity } from '../providers';
import { PluginEndpointDiscovery } from '@backstage/backend-common';
@@ -50,7 +50,7 @@ const mockClaims = {
};
jest.mock('jose');
jest.mock('cross-fetch', () => ({
jest.mock('node-fetch', () => ({
__esModule: true,
default: async () => {
return {
@@ -21,7 +21,7 @@ import {
SignInResolver,
} from '../types';
import express from 'express';
import fetch from 'cross-fetch';
import fetch from 'node-fetch';
import * as crypto from 'crypto';
import { KeyObject } from 'crypto';
import { Logger } from 'winston';