Let modifyNpmInfoRequestHeaders return the header collection as well.

This commit is contained in:
Sander Declerck 2025-11-24 15:22:41 +01:00
parent 5834229427
commit 44ee58aa9b
No known key found for this signature in database
3 changed files with 18 additions and 10 deletions

View file

@ -8,6 +8,7 @@ const state = {
/**
* @param {NodeJS.Dict<string | string[]>} headers
* @returns {NodeJS.Dict<string | string[]>}
*/
export function modifyNpmInfoRequestHeaders(headers) {
const accept = getHeaderValueAsString(headers, "accept");
@ -17,6 +18,7 @@ export function modifyNpmInfoRequestHeaders(headers) {
// Force the registry to return the full metadata by changing the Accept header.
headers["accept"] = "application/json";
}
return headers;
}
/**