Skip to content

Commit

Permalink
chore(deps): npm audit fixes for vulnerabilities (#412)
Browse files Browse the repository at this point in the history
Fix formatVersion

Before
77.0.3865 ->  77.0.386
After
77.0.3865 -> 77.0.3865
  • Loading branch information
cnishina authored and CaptainGlac1er committed Sep 18, 2019
1 parent a6792d5 commit b35e9d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/provider/chromedriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export function matchBinaries(ostype: string): RegExp|null {
* @param version The actual version.
*/
export function formatVersion(version: string): string|null {
const newRegex = /([0-9]*\.[0-9]*\.[0-9]*).[0-9]*/g;
const newRegex = /([0-9]*\.[0-9]*\.[0-9]*)(\.[0-9]*)?/g;
try {
const exec = newRegex.exec(version);
if (exec) {
Expand All @@ -279,4 +279,4 @@ export function formatVersion(version: string): string|null {
// no-op: if exec[1] is not reachable, move on to return null.
}
return null;
}
}
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b35e9d3

Please sign in to comment.