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(chromedriver): don't ignore patch version #413

Open
wants to merge 5 commits into
base: legacy
Choose a base branch
from
Open
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions lib/binaries/chrome_xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,12 @@ export function getValidSemver(version: string): string {
// no-op: is this is not valid, do not throw here.
}
// This supports downloading 74.0.3729.6
// Removing the 0 after 74, to keep patch version of webdriver
try {
const newRegex = /(\d+.\d+.\d+).\d+/g;
const newRegex = /(\d+.)\d+.(\d+.\d+)/g;
const exec = newRegex.exec(version);
if (exec) {
lookUpVersion = exec[1];
lookUpVersion = exec[1] + exec[2];
Copy link
Member

Choose a reason for hiding this comment

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

This is a good start but probably won't do it. I can see where we might have 74.0.5.5 and then we'll get 74.1.4.4. We will just grab 74.0.5.5 with your change. Possibly we could make two semver objs from chromedriver <a.b.c.d> we could have one that is a.b.c and another one that is b.c.d. We could check what is the a.b.c versions and then compare the b.c.d versions for the latest.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, done

}
} catch (_) {
// no-op: if this does not work, use the other regex pattern.
Expand Down