File tree 3 files changed +9
-23
lines changed
3 files changed +9
-23
lines changed 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' ;
2
1
import { ModuleBase } from '../../internal/module-base' ;
3
2
4
3
const nbsp = '\u00A0' ;
@@ -196,6 +195,8 @@ export class GitModule extends ModuleBase {
196
195
*
197
196
* @example
198
197
* faker.git.commitSha() // '2c6e3880fd94ddb7ef72d34e683cdc0c47bec6e6'
198
+ * faker.git.commitSha({ length: 7 }) // 'dbee57b'
199
+ * faker.git.commitSha({ length: 8 }) // '0e52376a'
199
200
*
200
201
* @since 5.0.0
201
202
*/
@@ -216,24 +217,4 @@ export class GitModule extends ModuleBase {
216
217
prefix : '' ,
217
218
} ) ;
218
219
}
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
- }
239
220
}
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ describe('git', () => {
18
18
. it ( 'with length 8' , { length : 8 } ) ;
19
19
} ) ;
20
20
21
- t . skip ( 'shortSha' ) ;
22
-
23
21
t . describeEach (
24
22
'commitEntry' ,
25
23
'commitDate'
You can’t perform that action at this time.
0 commit comments