@@ -9,11 +9,14 @@ import {
99
1010import { Command } from 'commander' ;
1111import { stringify } from 'json5' ;
12+ import {
13+ isEmpty ,
14+ isEqual ,
15+ } from 'lodash' ;
1216
1317import { projectRoot } from '../webpack/helpers' ;
1418
1519const _cliProgress = require ( 'cli-progress' ) ;
16- const _ = require ( 'lodash' ) ;
1720
1821const program = new Command ( ) ;
1922program . version ( '1.0.0' , '-v, --version' ) ;
@@ -212,13 +215,13 @@ function createNewChunkComparingSourceAndTarget(correspondingTargetChunk, source
212215 if ( oldKeyValueInTargetComments != null ) {
213216 const oldKeyValueUncommented = getSubStringWithRegex ( oldKeyValueInTargetComments [ 0 ] , '".*' ) [ 0 ] ;
214217
215- if ( ! ( _ . isEmpty ( correspondingTargetChunk ) && _ . isEmpty ( commentSource ) ) && ! removeWhiteLines ( correspondingTargetChunk ) . includes ( removeWhiteLines ( commentSource . trim ( ) ) ) ) {
218+ if ( ! ( isEmpty ( correspondingTargetChunk ) && isEmpty ( commentSource ) ) && ! removeWhiteLines ( correspondingTargetChunk ) . includes ( removeWhiteLines ( commentSource . trim ( ) ) ) ) {
216219 commentsOfSourceHaveChanged = true ;
217220 newChunk . push ( COMMENTS_CHANGED_TODO ) ;
218221 }
219222 const parsedOldKey = stringify ( '{' + oldKeyValueUncommented + '}' ) ;
220223 const parsedSourceKey = stringify ( '{' + keyValueSource + '}' ) ;
221- if ( ! _ . isEqual ( parsedOldKey , parsedSourceKey ) ) {
224+ if ( ! isEqual ( parsedOldKey , parsedSourceKey ) ) {
222225 messageOfSourceHasChanged = true ;
223226 newChunk . push ( MESSAGE_CHANGED_TODO ) ;
224227 }
0 commit comments