From 92f8e71f8c97c44f404ce9b7df8787a4292e6830 Mon Sep 17 00:00:00 2001 From: Michael Stramel Date: Thu, 19 Oct 2023 09:36:02 -0500 Subject: [PATCH] feat: allow fallback to application/json for custom registries (#314) --- 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`;