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

Allow custom registries without trailing slash #1440

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

swantzter
Copy link
Contributor

Before this change, configuring the npm setting @foo:registry to the following values would give these results:

https://example.com/npm  => https://example.com/%40foo%2fbar
https://example.com/npm/ => https://example.com/npm/%40foo%2fbar

After this change, however, leniency is allowed for trailing slashes, giving the following results:

https://example.com/npm  => https://example.com/npm/%40foo%2fbar
https://example.com/npm/ => https://example.com/npm/%40foo%2fbar

fixes #1439

Before this change, configuring the npm setting @foo:registry to the
following values would give these results:

    https://example.com/npm  => https://example.com/%40foo%2fbar
    https://example.com/npm/ => https://example.com/npm/%40foo%2fbar

After this change, however, leniency is allowed for trailing slashes,
giving the following results:

    https://example.com/npm  => https://example.com/npm/%40foo%2fbar
    https://example.com/npm/ => https://example.com/npm/%40foo%2fbar
@raineorshine
Copy link
Owner

Thank you!

@raineorshine raineorshine merged commit c226e38 into raineorshine:main Aug 5, 2024
7 checks passed
@bashbers
Copy link

bashbers commented Aug 5, 2024

A unit test to prevent this from happening instead of a comment would be nice!

@swantzter swantzter deleted the fix-private-registry-2 branch August 5, 2024 13:06
@swantzter
Copy link
Contributor Author

@bashbers quoting my response to the original PR:

possibly, but that was beyond what I had time for this time so leaving that contribution to someone else :) #1438 (comment)

Looking forward to your PR

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.

Regression in 17.0.1: uses public registry instead of registry set in .npmrc
3 participants