Skip to content

Commit

Permalink
fix(system): semver parts should not be limited to 0-9 (#3349)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmayer authored Dec 29, 2024
1 parent e6d27a3 commit c0d92b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/modules/system/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ export class SystemModule extends ModuleBase {
* Returns a [semantic version](https://semver.org).
*
* @example
* faker.system.semver() // '1.1.2'
* faker.system.semver() // '1.15.2'
*
* @since 3.1.0
*/
semver(): string {
return [
this.faker.number.int(9),
this.faker.number.int(9),
this.faker.number.int(9),
this.faker.number.int(20),
this.faker.number.int(20),
].join('.');
}

Expand Down
2 changes: 1 addition & 1 deletion test/modules/__snapshots__/internet.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ exports[`internet > 1211 > url > with slash appended 1`] = `"https://velvety-tar

exports[`internet > 1211 > url > without slash appended and with http protocol 1`] = `"http://velvety-tarragon.biz"`;

exports[`internet > 1211 > userAgent 1`] = `"Mozilla/5.0 (Linux; Android 13; SM-G998B) AppleWebKit/605.67 (KHTML, like Gecko) Chrome/107.7.3.6 Mobile Safari/592.76"`;
exports[`internet > 1211 > userAgent 1`] = `"Mozilla/5.0 (Linux; Android 13; SM-G998B) AppleWebKit/605.67 (KHTML, like Gecko) Chrome/107.7.7.14 Mobile Safari/592.76"`;

exports[`internet > 1211 > userName > noArgs 1`] = `"Tito67"`;

Expand Down
6 changes: 3 additions & 3 deletions test/modules/__snapshots__/system.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ exports[`system > 42 > networkInterface > with {"interfaceType":"ww"} 1`] = `"ww

exports[`system > 42 > networkInterface > with {} 1`] = `"wlp5s1f0"`;

exports[`system > 42 > semver 1`] = `"3.9.7"`;
exports[`system > 42 > semver 1`] = `"3.19.15"`;

exports[`system > 1211 > commonFileExt 1`] = `"shtml"`;

Expand Down Expand Up @@ -158,7 +158,7 @@ exports[`system > 1211 > networkInterface > with {"interfaceType":"ww"} 1`] = `"

exports[`system > 1211 > networkInterface > with {} 1`] = `"P9wwp6s6d6"`;

exports[`system > 1211 > semver 1`] = `"9.8.2"`;
exports[`system > 1211 > semver 1`] = `"9.18.4"`;

exports[`system > 1337 > commonFileExt 1`] = `"wav"`;

Expand Down Expand Up @@ -238,4 +238,4 @@ exports[`system > 1337 > networkInterface > with {"interfaceType":"ww"} 1`] = `"

exports[`system > 1337 > networkInterface > with {} 1`] = `"eno2"`;

exports[`system > 1337 > semver 1`] = `"2.1.2"`;
exports[`system > 1337 > semver 1`] = `"2.3.5"`;

0 comments on commit c0d92b8

Please sign in to comment.