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

Error with package with a prerelease version ("Invalid Version: 2.1.0pre") #15

Closed
ljharb opened this issue Jan 12, 2024 · 3 comments · Fixed by #16
Closed

Error with package with a prerelease version ("Invalid Version: 2.1.0pre") #15

ljharb opened this issue Jan 12, 2024 · 3 comments · Fixed by #16

Comments

@ljharb
Copy link
Contributor

ljharb commented Jan 12, 2024

Try knockout - in the console, you'll see Invalid Version: 2.1.0pre.

The data is:

[
    {
        "package": "knockout",
        "downloads": {
            "2.3.0": 633,
            "3.5.0": 2181,
            "3.4.1": 436,
            "3.1.0": 31,
            "2.1.0pre": 1,
            "3.0.0": 829,
            "3.2.0": 450,
            "3.4.0": 781,
            "3.5.0-beta": 10,
            "3.4.2": 5021,
            "2.2.1": 132,
            "3.3.0": 637,
            "3.5.1": 62666,
            "3.5.0-rc": 17,
            "2.1.0": 3
        }
    }
]

as you can see, 2.1.0pre (which is an invalid version) has a download. I think the logic probably needs to be updated to skip over invalid versions in groupByMajor?

@NullVoxPopuli
Copy link
Owner

I think you're correct!
Thanks for reporting!

@NullVoxPopuli
Copy link
Owner

I opened #16 which will print a message to the console if a library maintainer wants to debug or somethin'

@ljharb
Copy link
Contributor Author

ljharb commented Jan 12, 2024

Thanks, makes sense!

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 a pull request may close this issue.

2 participants