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: update vivaldi browser regex to match multiple versioning structures #575

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,8 @@ user_agent_parsers:
- regex: 'Superhuman'
family_replacement: 'Superhuman'

# Vivaldi uses "Vivaldi"
- regex: '(Vivaldi)/(\d+)\.(\d+)\.(\d+)'
# Vivaldi
- regex: '(Vivaldi)/(\d+)(?:\.(\d+)|)(?:\.(\d+)|)(?:\.(\d+)|)'

# Edge/major_version.minor_version
# Edge with chromium Edg/major_version.minor_version.patch.minor_patch
Expand Down
18 changes: 18 additions & 0 deletions tests/test_ua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,24 @@ test_cases:
minor: '0'
patch: '83'

- user_agent_string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.105 Safari/537.36 Vivaldi/1.0.162.9'
family: 'Vivaldi'
major: '1'
minor: '0'
patch: '162'

- user_agent_string: 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Vivaldi/114'
family: 'Vivaldi'
major: '114'
minor:
patch:

- user_agent_string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 Vivaldi/3.7'
family: 'Vivaldi'
major: '3'
minor: '7'
patch:

- user_agent_string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.9600'
family: 'Edge'
major: '12'
Expand Down
Loading