diff --git a/.changeset/large-eagles-shop.md b/.changeset/large-eagles-shop.md new file mode 100644 index 0000000000..bd5bd2e28d --- /dev/null +++ b/.changeset/large-eagles-shop.md @@ -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 diff --git a/plugins/airbrake-backend/package.json b/plugins/airbrake-backend/package.json index ba9940b51c..db128b4c79 100644 --- a/plugins/airbrake-backend/package.json +++ b/plugins/airbrake-backend/package.json @@ -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", diff --git a/plugins/catalog-backend-module-bitbucket-server/api-report.md b/plugins/catalog-backend-module-bitbucket-server/api-report.md index 1f40f22242..7d95e148a3 100644 --- a/plugins/catalog-backend-module-bitbucket-server/api-report.md +++ b/plugins/catalog-backend-module-bitbucket-server/api-report.md @@ -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; + }): Promise; // (undocumented) getRepository(options: { projectKey: string; diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index 8facc9cceb..ebc7b929ca 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -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" }, diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts index 025cc555ce..b5baf66afd 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { fetch, Request } from 'cross-fetch'; +import fetch, { Request, Response } from 'node-fetch'; import { BitbucketServerIntegrationConfig, getBitbucketServerRequestOptions, diff --git a/plugins/dynatrace/package.json b/plugins/dynatrace/package.json index 93bc1911cc..e544c193d9 100644 --- a/plugins/dynatrace/package.json +++ b/plugins/dynatrace/package.json @@ -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" }, diff --git a/plugins/dynatrace/src/setupTests.ts b/plugins/dynatrace/src/setupTests.ts index 9bb3e72355..7a459ed24e 100644 --- a/plugins/dynatrace/src/setupTests.ts +++ b/plugins/dynatrace/src/setupTests.ts @@ -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'; diff --git a/plugins/example-todo-list-backend/package.json b/plugins/example-todo-list-backend/package.json index e95436b632..216b9dd440 100644 --- a/plugins/example-todo-list-backend/package.json +++ b/plugins/example-todo-list-backend/package.json @@ -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" diff --git a/plugins/periskop-backend/package.json b/plugins/periskop-backend/package.json index a52eefdf35..58374896d2 100644 --- a/plugins/periskop-backend/package.json +++ b/plugins/periskop-backend/package.json @@ -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" }, diff --git a/plugins/stack-overflow-backend/package.json b/plugins/stack-overflow-backend/package.json index db883dbfd1..27886b9625 100644 --- a/plugins/stack-overflow-backend/package.json +++ b/plugins/stack-overflow-backend/package.json @@ -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": [ diff --git a/plugins/stack-overflow-backend/src/search/StackOverflowQuestionsCollatorFactory.ts b/plugins/stack-overflow-backend/src/search/StackOverflowQuestionsCollatorFactory.ts index 45261ce546..4550c5aa9b 100644 --- a/plugins/stack-overflow-backend/src/search/StackOverflowQuestionsCollatorFactory.ts +++ b/plugins/stack-overflow-backend/src/search/StackOverflowQuestionsCollatorFactory.ts @@ -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'; diff --git a/plugins/vault-backend/package.json b/plugins/vault-backend/package.json index 27ca7069fe..af097d50e4 100644 --- a/plugins/vault-backend/package.json +++ b/plugins/vault-backend/package.json @@ -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" diff --git a/plugins/vault-backend/src/service/vaultApi.ts b/plugins/vault-backend/src/service/vaultApi.ts index 16aa39ae03..785352fea8 100644 --- a/plugins/vault-backend/src/service/vaultApi.ts +++ b/plugins/vault-backend/src/service/vaultApi.ts @@ -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'; diff --git a/yarn.lock b/yarn.lock index c973b39612..93495d935e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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==