|
| 1 | +import { |
| 2 | + isEmpty, |
| 3 | + isEqual, |
| 4 | +} from 'lodash'; |
| 5 | + |
1 | 6 | import { projectRoot } from '../webpack/helpers'; |
2 | 7 |
|
3 | 8 | const commander = require('commander'); |
4 | 9 | const fs = require('node:fs'); |
5 | 10 | const JSON5 = require('json5'); |
6 | 11 | const _cliProgress = require('cli-progress'); |
7 | | -const _ = require('lodash'); |
8 | 12 |
|
9 | 13 | const program = new commander.Command(); |
10 | 14 | program.version('1.0.0', '-v, --version'); |
@@ -201,13 +205,13 @@ function createNewChunkComparingSourceAndTarget(correspondingTargetChunk, source |
201 | 205 | if (oldKeyValueInTargetComments != null) { |
202 | 206 | const oldKeyValueUncommented = getSubStringWithRegex(oldKeyValueInTargetComments[0], '".*')[0]; |
203 | 207 |
|
204 | | - if (!(_.isEmpty(correspondingTargetChunk) && _.isEmpty(commentSource)) && !removeWhiteLines(correspondingTargetChunk).includes(removeWhiteLines(commentSource.trim()))) { |
| 208 | + if (!(isEmpty(correspondingTargetChunk) && isEmpty(commentSource)) && !removeWhiteLines(correspondingTargetChunk).includes(removeWhiteLines(commentSource.trim()))) { |
205 | 209 | commentsOfSourceHaveChanged = true; |
206 | 210 | newChunk.push(COMMENTS_CHANGED_TODO); |
207 | 211 | } |
208 | 212 | const parsedOldKey = JSON5.stringify('{' + oldKeyValueUncommented + '}'); |
209 | 213 | const parsedSourceKey = JSON5.stringify('{' + keyValueSource + '}'); |
210 | | - if (!_.isEqual(parsedOldKey, parsedSourceKey)) { |
| 214 | + if (!isEqual(parsedOldKey, parsedSourceKey)) { |
211 | 215 | messageOfSourceHasChanged = true; |
212 | 216 | newChunk.push(MESSAGE_CHANGED_TODO); |
213 | 217 | } |
|
0 commit comments