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

Semver parsing does not accept all pre-release tags. #15

Open
peterzeller opened this issue Jan 29, 2024 · 0 comments
Open

Semver parsing does not accept all pre-release tags. #15

peterzeller opened this issue Jan 29, 2024 · 0 comments

Comments

@peterzeller
Copy link

According to the semver spec, for pre-release tags:

Identifiers MUST comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-]

However, Versionomy seems to accept only certain letters rc0 is accepted, but abc is not:

irb(main):004:0> Versionomy.parse('1.2.3-rc0')
=> #<Versionomy::Value:0x1cb4c "1.2.3-rc0">
irb(main):005:0> Versionomy.parse('1.2.3-abc')
/opt/homebrew/lib/ruby/gems/3.2.0/gems/versionomy-0.5.0/lib/versionomy/format/delimiter.rb:199:in `parse': Extra characters: "-abc" (Versionomy::Errors::ParseError)                                                        
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/versionomy-0.5.0/lib/versionomy/interface.rb:130:in `parse'
        from (irb):5:in `<main>'                            
        from /opt/homebrew/Cellar/ruby/3.2.2_1/lib/ruby/gems/3.2.0/gems/irb-1.6.2/exe/irb:11:in `<top (required)>'
        from /opt/homebrew/opt/ruby/bin/irb:25:in `load'    
        from /opt/homebrew/opt/ruby/bin/irb:25:in `<main>'  
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

No branches or pull requests

1 participant