From 379ba79ba3b9735ed039d87f32fc14fa9920d4ed Mon Sep 17 00:00:00 2001 From: Eric Cheng Date: Sun, 28 Aug 2022 09:59:51 -0400 Subject: fix(datatype): unintentional hex breaking change (#1306) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Leyla Jähnig --- src/modules/git/index.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/modules/git') 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: '', + }); } } -- cgit v1.2.3