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

Fix skip non-semver tag names, instead of crashing #254

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

schadomi7
Copy link

As discussed in discord:
If a tag name is not a valid semver number, it gets cleaned to null. I propose to just skip offending tag names.
Please check if it has other consequences, I don't know.

Alternatively, the check could be made more explicit:

     let curVer = semver.clean(opts.tags[i].name);
-    if (curVer && curVer !== LATEST_VER) {
+    if (curVer !== null && curVer !== LATEST_VER) {
       out.versions[curVer] = buildAbsentVer(curVer, opts);
     }

Copy link
Member

@confused-Techie confused-Techie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a ton for contributing here, but yeah this looks great to me!

@confused-Techie confused-Techie merged commit a01d999 into pulsar-edit:main Apr 13, 2024
6 checks passed
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