diff options
| author | Eric Cheng <[email protected]> | 2022-08-28 09:59:51 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-28 15:59:51 +0200 |
| commit | 379ba79ba3b9735ed039d87f32fc14fa9920d4ed (patch) | |
| tree | e2ab2bf145231bafc6aaa73ccfdd0124ee3e3c03 /src/modules/git/index.ts | |
| parent | f78843edb05913c44ebd86535b0d50d22e99fc5e (diff) | |
| download | faker-379ba79ba3b9735ed039d87f32fc14fa9920d4ed.tar.xz faker-379ba79ba3b9735ed039d87f32fc14fa9920d4ed.zip | |
fix(datatype): unintentional hex breaking change (#1306)
Co-authored-by: Leyla Jähnig <[email protected]>
Diffstat (limited to 'src/modules/git/index.ts')
| -rw-r--r-- | src/modules/git/index.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/git/index.ts b/src/modules/git/index.ts index 21596273..be8d02f1 100644 --- a/src/modules/git/index.ts +++ b/src/modules/git/index.ts @@ -92,7 +92,11 @@ export class Git { * faker.git.commitSha() // '2c6e3880fd94ddb7ef72d34e683cdc0c47bec6e6' */ commitSha(): string { - return this.faker.datatype.hexadecimal({ length: 40, case: 'lower' }); + return this.faker.datatype.hexadecimal({ + length: 40, + case: 'lower', + prefix: '', + }); } /** @@ -102,6 +106,10 @@ export class Git { * faker.git.shortSha() // '6155732' */ shortSha(): string { - return this.faker.datatype.hexadecimal({ length: 7, case: 'lower' }); + return this.faker.datatype.hexadecimal({ + length: 7, + case: 'lower', + prefix: '', + }); } } |
