File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ### Remove deprecated git method
2+
3+ Removed deprecated git method
4+
5+ | old | replacement |
6+ | ---------------------- | ------------------------------------ |
7+ | ` faker.git.shortSha() ` | ` faker.git.commitSha({ length: 7 }) ` |
Original file line number Diff line number Diff line change 1- import { deprecated } from '../../internal/deprecated' ;
21import { ModuleBase } from '../../internal/module-base' ;
32
43const nbsp = '\u00A0' ;
@@ -196,6 +195,8 @@ export class GitModule extends ModuleBase {
196195 *
197196 * @example
198197 * faker.git.commitSha() // '2c6e3880fd94ddb7ef72d34e683cdc0c47bec6e6'
198+ * faker.git.commitSha({ length: 7 }) // 'dbee57b'
199+ * faker.git.commitSha({ length: 8 }) // '0e52376a'
199200 *
200201 * @since 5.0.0
201202 */
@@ -216,24 +217,4 @@ export class GitModule extends ModuleBase {
216217 prefix : '' ,
217218 } ) ;
218219 }
219-
220- /**
221- * Generates a random commit sha (short).
222- *
223- * @example
224- * faker.git.shortSha() // '6155732'
225- *
226- * @since 5.0.0
227- *
228- * @deprecated Use `faker.git.commitSha({ length: 7 })` instead.
229- */
230- shortSha ( ) : string {
231- deprecated ( {
232- deprecated : 'faker.git.shortSha()' ,
233- proposed : 'faker.git.commitSha({ length: 7 })' ,
234- since : '8.0' ,
235- until : '9.0' ,
236- } ) ;
237- return this . commitSha ( { length : 7 } ) ;
238- }
239220}
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ describe('git', () => {
1818 . it ( 'with length 8' , { length : 8 } ) ;
1919 } ) ;
2020
21- t . skip ( 'shortSha' ) ;
22-
2321 t . describeEach (
2422 'commitEntry' ,
2523 'commitDate'
You can’t perform that action at this time.
0 commit comments