Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow fallback to application/json for custom registries #314

Merged
merged 1 commit into from
Oct 19, 2023
Merged

feat: allow fallback to application/json for custom registries #314

merged 1 commit into from
Oct 19, 2023

Conversation

stramel
Copy link
Contributor

@stramel stramel commented Oct 10, 2023

Hello! 👋🏼

I just ran into an issue where our custom registry doesn't support the Accept header value of application/vnd.npm.install-v1+json. By providing a fallback to application/json, corepack can support custom registries that don't support the application/vnd.npm.install-v1+json value.

I followed the article linked in the comments above this code change where it is suggested to use application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */* for fallback. I opted to drop the */* since this is a json fetch implementation but feel free to change it.

This was also referenced in #296 where @arcanis mentioned this would likely be fine.

@stramel
Copy link
Contributor Author

stramel commented Oct 19, 2023

Thank you for the review and approval @aduh95! I just wanted to follow up to see what the timeline looks like for getting this merged in and released?

@arcanis arcanis merged commit 92f8e71 into nodejs:main Oct 19, 2023
7 checks passed
@stramel stramel deleted the patch-1 branch October 19, 2023 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants