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 scoped packages /size/ endpoint #16

Merged
merged 1 commit into from
Nov 20, 2017
Merged

Conversation

simonepri
Copy link
Contributor

@simonepri simonepri commented Nov 19, 2017

This PR fixes an issue that disallow us to use the /size/ endpoint with npm scoped packages.
I've completely removed the regex since it was useless.
It only checked if the first character was a word character [a-zA-Z0-9_].

We can implement a better regex for it but I think that is unnecessary work for the server.
Let me know what you think!

Example of non-working badge:

@exogen
Copy link
Owner

exogen commented Nov 20, 2017

Looks good to me, thanks @simonepri!

@exogen exogen merged commit fe4d146 into exogen:master Nov 20, 2017
@exogen
Copy link
Owner

exogen commented Nov 20, 2017

And deployed. It should work now, but your image URL above has .svg added to the end, if you point to just the JSON file it appears to work.

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.

2 participants