From 6c87ce051787f1f5e43f8775acb887242db6e5c3 Mon Sep 17 00:00:00 2001 From: Michael Stramel Date: Tue, 10 Oct 2023 17:23:50 -0500 Subject: [PATCH] feat: allow fallback to application/json for custom registries --- sources/npmRegistryUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/npmRegistryUtils.ts b/sources/npmRegistryUtils.ts index ec2445096..7ccdd1f88 100644 --- a/sources/npmRegistryUtils.ts +++ b/sources/npmRegistryUtils.ts @@ -6,7 +6,7 @@ import * as httpUtils from './httpUtils'; // load abbreviated metadata as that's all we need for these calls // see: https://github.com/npm/registry/blob/cfe04736f34db9274a780184d1cdb2fb3e4ead2a/docs/responses/package-metadata.md export const DEFAULT_HEADERS: OutgoingHttpHeaders = { - [`Accept`]: `application/vnd.npm.install-v1+json`, + [`Accept`]: `application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8`, }; export const DEFAULT_NPM_REGISTRY_URL = `https://registry.npmjs.org`;