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