@teambit/merging 1.0.138 → 1.0.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/merge-cmd.js CHANGED
@@ -65,7 +65,7 @@ if no ids are specified, all pending-merge components will be merged. (run "bit
65
65
  optionally use '--abort' to revert the last merge. to revert a lane merge, use "bit lane merge-abort" command.
66
66
  ${(0, _constants().WILDCARD_HELP)('merge')}`);
67
67
  _defineProperty(this, "alias", '');
68
- _defineProperty(this, "options", [['', 'ours', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep the local modification'], ['', 'theirs', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, override the local modification with the specified version'], ['', 'manual', 'DEPRECATED. use --auto-merge-resolve'], ['', 'auto-merge-resolve <merge-strategy>', 'in case of a conflict, resolve according to the strategy: [ours, theirs, manual]'], ['', 'abort', 'in case of an unresolved merge, revert to pre-merge state'], ['', 'resolve', 'mark an unresolved merge as resolved and create a new snap with the changes'], ['', 'no-snap', 'do not auto snap even if the merge completed without conflicts'], ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'], ['', 'verbose', 'show details of components that were not merged successfully'], ['x', 'skip-dependency-installation', 'do not install new dependencies resulting from the merge'], ['m', 'message <message>', 'override the default message for the auto snap']]);
68
+ _defineProperty(this, "options", [['', 'ours', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep the local modification'], ['', 'theirs', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, override the local modification with the specified version'], ['', 'manual', 'same as "--auto-merge-resolve manual". in case of merge conflict, write the files with the conflict markers'], ['', 'auto-merge-resolve <merge-strategy>', 'in case of a conflict, resolve according to the strategy: [ours, theirs, manual]'], ['', 'abort', 'in case of an unresolved merge, revert to pre-merge state'], ['', 'resolve', 'mark an unresolved merge as resolved and create a new snap with the changes'], ['', 'no-snap', 'do not auto snap even if the merge completed without conflicts'], ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'], ['', 'verbose', 'show details of components that were not merged successfully'], ['x', 'skip-dependency-installation', 'do not install new dependencies resulting from the merge'], ['m', 'message <message>', 'override the default message for the auto snap']]);
69
69
  _defineProperty(this, "loader", true);
70
70
  }
71
71
  async report([ids = []], {
@@ -82,12 +82,13 @@ ${(0, _constants().WILDCARD_HELP)('merge')}`);
82
82
  skipDependencyInstallation = false
83
83
  }) {
84
84
  build = (await this.globalConfig.getBool(_constants().CFG_FORCE_LOCAL_BUILD)) || Boolean(build);
85
- if (ours || theirs || manual) {
86
- throw new (_bitError().BitError)('the "--ours", "--theirs" and "--manual" flags are deprecated. use "--auto-merge-resolve" instead');
85
+ if (ours || theirs) {
86
+ throw new (_bitError().BitError)('the "--ours" and "--theirs" flags are deprecated. use "--auto-merge-resolve" instead');
87
87
  }
88
88
  if (autoMergeResolve && autoMergeResolve !== 'ours' && autoMergeResolve !== 'theirs' && autoMergeResolve !== 'manual') {
89
89
  throw new (_bitError().BitError)('--auto-merge-resolve must be one of the following: [ours, theirs, manual]');
90
90
  }
91
+ if (manual) autoMergeResolve = 'manual';
91
92
  if (abort && resolve) throw new (_bitError().BitError)('unable to use "abort" and "resolve" flags together');
92
93
  if (noSnap && message) throw new (_bitError().BitError)('unable to use "noSnap" and "message" flags together');
93
94
  const {
@@ -141,7 +142,7 @@ function mergeReport({
141
142
  let componentsWithConflicts = 0;
142
143
  const getConflictSummary = () => {
143
144
  if (!components || !components.length || !leftUnresolvedConflicts) return '';
144
- const title = `\n\nfiles with conflicts summary\n`;
145
+ const title = `files with conflicts summary\n`;
145
146
  const suggestion = `\n\nmerge process not completed due to the conflicts above. fix conflicts manually and then run "bit install".
146
147
  once ready, snap/tag the components to complete the merge.`;
147
148
  const conflictSummary = conflictSummaryReport(components);
@@ -152,15 +153,14 @@ once ready, snap/tag the components to complete the merge.`;
152
153
  const getConfigMergeConflictSummary = () => {
153
154
  if (!configMergeWithConflicts.length) return '';
154
155
  const comps = configMergeWithConflicts.map(c => c.compIdStr).join('\n');
155
- const title = `\n\ncomponents with config-merge conflicts\n`;
156
+ const title = `components with config-merge conflicts\n`;
156
157
  const suggestion = `\nconflicts were found while trying to merge the config. fix them manually by editing the ${_constants().MergeConfigFilename} file in the workspace root.
157
158
  once ready, snap/tag the components to complete the merge.`;
158
159
  return _chalk().default.underline(title) + comps + _chalk().default.yellow(suggestion);
159
160
  };
160
161
  const getSnapsOutput = () => {
161
162
  if (mergeSnapError) {
162
- return `
163
- ${_chalk().default.bold('snapping merged components failed with the following error, please fix the issues and snap manually')}
163
+ return `${_chalk().default.bold('snapping merged components failed with the following error, please fix the issues and snap manually')}
164
164
  ${mergeSnapError.message}
165
165
  `;
166
166
  }
@@ -180,7 +180,7 @@ ${mergeSnapError.message}
180
180
  return componentOutput;
181
181
  }).join('\n');
182
182
  };
183
- return `\n${_chalk().default.underline('merge-snapped components')}\n(${'components snapped as a result of the merge'})\n${outputComponents(snappedComponents)}\n`;
183
+ return `${_chalk().default.underline('merge-snapped components')}\n(${'components snapped as a result of the merge'})\n${outputComponents(snappedComponents)}`;
184
184
  };
185
185
  const getFailureOutput = () => {
186
186
  if (!failedComponents || !failedComponents.length) return '';
@@ -194,7 +194,7 @@ ${mergeSnapError.message}
194
194
  return `${_chalk().default.bold(`\nmerge skipped legitimately for ${failedComponents.length} component(s)`)}
195
195
  (use --verbose to list them next time)`;
196
196
  }
197
- return `\n${_chalk().default.underline(title)}\n${body}\n\n`;
197
+ return `${_chalk().default.underline(title)}\n${body}`;
198
198
  };
199
199
  const getSummary = () => {
200
200
  const merged = components?.length || 0;
@@ -206,16 +206,15 @@ ${mergeSnapError.message}
206
206
  const mergeConfig = configMergeWithConflicts.length ? `${_constants().MergeConfigFilename} file` : '';
207
207
  return (0, _lodash().compact)([comps, ws, mergeConfig]).join(', ');
208
208
  };
209
- const newLines = '\n\n';
210
209
  const title = _chalk().default.bold.underline('Merge Summary');
211
210
  const mergedStr = `\nTotal Merged: ${_chalk().default.bold(merged.toString())}`;
212
211
  const unchangedLegitimatelyStr = `\nTotal Unchanged: ${_chalk().default.bold(unchangedLegitimately.toString())}`;
213
212
  const autoSnappedStr = `\nTotal Snapped: ${_chalk().default.bold(autoSnapped.toString())}`;
214
213
  const removedStr = `\nTotal Removed: ${_chalk().default.bold(removedComponents?.length.toString() || '0')}`;
215
214
  const conflictStr = `\nConflicts: ${_chalk().default.bold(getConflictStr() || 'none')}`;
216
- return newLines + title + mergedStr + unchangedLegitimatelyStr + autoSnappedStr + removedStr + conflictStr;
215
+ return title + mergedStr + unchangedLegitimatelyStr + autoSnappedStr + removedStr + conflictStr;
217
216
  };
218
- return getSuccessOutput() + getFailureOutput() + getRemovedOutput(removedComponents) + getSnapsOutput() + getConfigMergeConflictSummary() + getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult) + getConflictSummary() + getSummary();
217
+ return (0, _lodash().compact)([getSuccessOutput(), getFailureOutput(), getRemovedOutput(removedComponents), getSnapsOutput(), getConfigMergeConflictSummary(), getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult), getConflictSummary(), getSummary()]).join('\n\n');
219
218
  }
220
219
  function getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult) {
221
220
  if (!workspaceConfigUpdateResult) return '';
@@ -227,11 +226,11 @@ function getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult) {
227
226
  const getWorkspaceConflictsOutput = () => {
228
227
  if (!workspaceDepsConflicts && !workspaceConfigConflictWriteError) return '';
229
228
  if (workspaceConfigConflictWriteError) {
230
- return `\n${_chalk().default.red(workspaceConfigConflictWriteError.message)}\n\n`;
229
+ return `${_chalk().default.red(workspaceConfigConflictWriteError.message)}`;
231
230
  }
232
- return _chalk().default.yellow('\nworkspace.jsonc has conflicts, please edit the file and fix them\n\n');
231
+ return _chalk().default.yellow('workspace.jsonc has conflicts, please edit the file and fix them');
233
232
  };
234
- return getWorkspaceDepsOutput(workspaceDepsUpdates) + getWorkspaceConflictsOutput();
233
+ return (0, _lodash().compact)([getWorkspaceDepsOutput(workspaceDepsUpdates), getWorkspaceConflictsOutput()]).join('\n\n');
235
234
  }
236
235
  function getWorkspaceDepsOutput(workspaceDepsUpdates) {
237
236
  if (!workspaceDepsUpdates) return '';
@@ -240,7 +239,7 @@ function getWorkspaceDepsOutput(workspaceDepsUpdates) {
240
239
  const [from, to] = workspaceDepsUpdates[pkgName];
241
240
  return ` ${pkgName}: ${from} => ${to}`;
242
241
  }).join('\n');
243
- return `\n${_chalk().default.underline(title)}\n${body}\n\n`;
242
+ return `${_chalk().default.underline(title)}\n${body}`;
244
243
  }
245
244
 
246
245
  /**
@@ -291,28 +290,30 @@ function conflictSummaryReport(components) {
291
290
  function installationErrorOutput(installationError) {
292
291
  if (!installationError) return '';
293
292
  const title = _chalk().default.underline('Installation Error');
294
- const subTitle = 'The following error was thrown by the package manager, please fix the issue and run "bit install"';
293
+ const subTitle = 'The following error was thrown by the package manager:';
295
294
  const body = _chalk().default.red(installationError.message);
296
- return `\n\n${title}\n${subTitle}\n${body}`;
295
+ const suggestion = 'Use "bit install" to complete the installation, remove the imported components using "bit remove <comp id>" or remove the missing dependencies from their source code';
296
+ return `${title}\n${subTitle}\n${body}\n${suggestion}`;
297
297
  }
298
298
  function compilationErrorOutput(compilationError) {
299
299
  if (!compilationError) return '';
300
300
  const title = _chalk().default.underline('Compilation Error');
301
- const subTitle = 'The following error was thrown by the compiler, please fix the issue and run "bit compile"';
301
+ const subTitle = 'The following error was thrown by the compiler';
302
302
  const body = _chalk().default.red(compilationError.message);
303
- return `\n\n${title}\n${subTitle}\n${body}`;
303
+ const suggestion = 'Please fix the issue and run "bit compile"';
304
+ return `${title}\n${subTitle}\n${body}\n${suggestion}`;
304
305
  }
305
306
  function getRemovedOutput(removedComponents) {
306
307
  if (!removedComponents?.length) return '';
307
308
  const title = `the following ${removedComponents.length} component(s) have been removed`;
308
309
  const body = removedComponents.join('\n');
309
- return `\n\n${_chalk().default.underline(title)}\n${body}\n\n`;
310
+ return `${_chalk().default.underline(title)}\n${body}`;
310
311
  }
311
312
  function getAddedOutput(addedComponents) {
312
313
  if (!addedComponents?.length) return '';
313
314
  const title = `the following ${addedComponents.length} component(s) have been added`;
314
315
  const body = addedComponents.join('\n');
315
- return `\n\n${_chalk().default.underline(title)}\n${body}\n\n`;
316
+ return `${_chalk().default.underline(title)}\n${body}`;
316
317
  }
317
318
 
318
319
  //# sourceMappingURL=merge-cmd.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_constants","_mergeVersion","_bitError","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","MergeCmd","constructor","merging","globalConfig","WILDCARD_HELP","report","ids","ours","theirs","manual","autoMergeResolve","abort","resolve","build","noSnap","verbose","message","skipDependencyInstallation","getBool","CFG_FORCE_LOCAL_BUILD","Boolean","BitError","components","failedComponents","version","resolvedComponents","abortedComponents","mergeSnapResults","mergeSnapError","merge","title","componentsStr","map","c","id","toStringWithoutVersion","join","chalk","underline","green","mergeReport","exports","removedComponents","leftUnresolvedConflicts","configMergeResults","workspaceConfigUpdateResult","getSuccessOutput","length","bold","fileChangesReport","applyVersionReport","componentsWithConflicts","getConflictSummary","suggestion","conflictSummary","conflictSummaryReport","conflictedComponents","conflictStr","yellow","configMergeWithConflicts","filter","hasConflicts","getConfigMergeConflictSummary","comps","compIdStr","MergeConfigFilename","getSnapsOutput","snappedComponents","autoSnappedResults","outputComponents","component","componentOutput","toString","autoTag","result","triggeredBy","searchWithoutVersion","autoTagComp","a","AUTO_SNAPPED_MSG","getFailureOutput","body","compact","failedComponent","white","unchangedMessage","getSummary","merged","unchangedLegitimately","f","autoSnapped","getConflictStr","ws","workspaceDepsConflicts","mergeConfig","newLines","mergedStr","unchangedLegitimatelyStr","autoSnappedStr","removedStr","getRemovedOutput","getWorkspaceConfigUpdateOutput","workspaceConfigConflictWriteError","workspaceDepsUpdates","getWorkspaceConflictsOutput","red","getWorkspaceDepsOutput","keys","pkgName","from","to","addName","showVersion","tab","fileChanges","name","files","filesStatus","file","FileStatus","unchanged","note","cyan","FILE_CHANGES_CHECKOUT_MSG","conflictedFiles","installationErrorOutput","installationError","subTitle","compilationErrorOutput","compilationError","getAddedOutput","addedComponents"],"sources":["merge-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { compact } from 'lodash';\nimport {\n WILDCARD_HELP,\n AUTO_SNAPPED_MSG,\n MergeConfigFilename,\n FILE_CHANGES_CHECKOUT_MSG,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy/dist/constants';\nimport { FileStatus, MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { GlobalConfigMain } from '@teambit/global-config';\nimport { ConfigMergeResult, WorkspaceConfigUpdateResult, WorkspaceDepsUpdates } from '@teambit/config-merger';\nimport { BitError } from '@teambit/bit-error';\nimport { ApplyVersionResults, MergingMain, ApplyVersionResult } from './merging.main.runtime';\n\nexport class MergeCmd implements Command {\n name = 'merge [ids...]';\n description = 'merge changes of the remote head into local - auto-snaps all merged components';\n helpUrl = 'reference/components/merging-changes';\n group = 'development';\n extendedDescription = `merge changes of the remote head into local when they are diverged. when on a lane, merge the remote head of the lane into the local\nand creates snaps for merged components that have diverged, on the lane.\nif no ids are specified, all pending-merge components will be merged. (run \"bit status\" to list them).\noptionally use '--abort' to revert the last merge. to revert a lane merge, use \"bit lane merge-abort\" command.\n${WILDCARD_HELP('merge')}`;\n alias = '';\n options = [\n ['', 'ours', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep the local modification'],\n [\n '',\n 'theirs',\n 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, override the local modification with the specified version',\n ],\n ['', 'manual', 'DEPRECATED. use --auto-merge-resolve'],\n [\n '',\n 'auto-merge-resolve <merge-strategy>',\n 'in case of a conflict, resolve according to the strategy: [ours, theirs, manual]',\n ],\n ['', 'abort', 'in case of an unresolved merge, revert to pre-merge state'],\n ['', 'resolve', 'mark an unresolved merge as resolved and create a new snap with the changes'],\n ['', 'no-snap', 'do not auto snap even if the merge completed without conflicts'],\n ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'],\n ['', 'verbose', 'show details of components that were not merged successfully'],\n ['x', 'skip-dependency-installation', 'do not install new dependencies resulting from the merge'],\n ['m', 'message <message>', 'override the default message for the auto snap'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private merging: MergingMain, private globalConfig: GlobalConfigMain) {}\n\n async report(\n [ids = []]: [string[]],\n {\n ours = false,\n theirs = false,\n manual = false,\n autoMergeResolve,\n abort = false,\n resolve = false,\n build = false,\n noSnap = false,\n verbose = false,\n message,\n skipDependencyInstallation = false,\n }: {\n ours?: boolean;\n theirs?: boolean;\n manual?: boolean;\n autoMergeResolve?: MergeStrategy;\n abort?: boolean;\n resolve?: boolean;\n build?: boolean;\n noSnap?: boolean;\n verbose?: boolean;\n message: string;\n skipDependencyInstallation?: boolean;\n }\n ) {\n build = (await this.globalConfig.getBool(CFG_FORCE_LOCAL_BUILD)) || Boolean(build);\n if (ours || theirs || manual) {\n throw new BitError(\n 'the \"--ours\", \"--theirs\" and \"--manual\" flags are deprecated. use \"--auto-merge-resolve\" instead'\n );\n }\n if (\n autoMergeResolve &&\n autoMergeResolve !== 'ours' &&\n autoMergeResolve !== 'theirs' &&\n autoMergeResolve !== 'manual'\n ) {\n throw new BitError('--auto-merge-resolve must be one of the following: [ours, theirs, manual]');\n }\n if (abort && resolve) throw new BitError('unable to use \"abort\" and \"resolve\" flags together');\n if (noSnap && message) throw new BitError('unable to use \"noSnap\" and \"message\" flags together');\n const {\n components,\n failedComponents,\n version,\n resolvedComponents,\n abortedComponents,\n mergeSnapResults,\n mergeSnapError,\n }: ApplyVersionResults = await this.merging.merge(\n ids,\n autoMergeResolve as any,\n abort,\n resolve,\n noSnap,\n message,\n build,\n skipDependencyInstallation\n );\n if (resolvedComponents) {\n const title = 'successfully resolved component(s)\\n';\n const componentsStr = resolvedComponents.map((c) => c.id.toStringWithoutVersion()).join('\\n');\n return chalk.underline(title) + chalk.green(componentsStr);\n }\n if (abortedComponents) {\n const title = 'successfully aborted the merge of the following component(s)\\n';\n const componentsStr = abortedComponents.map((c) => c.id.toStringWithoutVersion()).join('\\n');\n return chalk.underline(title) + chalk.green(componentsStr);\n }\n\n return mergeReport({\n components,\n failedComponents,\n version,\n mergeSnapResults,\n mergeSnapError,\n verbose,\n });\n }\n}\n\nexport function mergeReport({\n components,\n failedComponents,\n removedComponents,\n version,\n mergeSnapResults,\n mergeSnapError,\n leftUnresolvedConflicts,\n verbose,\n configMergeResults,\n workspaceConfigUpdateResult,\n}: ApplyVersionResults & { configMergeResults?: ConfigMergeResult[] }): string {\n const getSuccessOutput = () => {\n if (!components || !components.length) return '';\n const title = `successfully merged ${components.length} components${\n version ? `from version ${chalk.bold(version)}` : ''\n }\\n`;\n const fileChangesReport = applyVersionReport(components);\n\n return chalk.bold(title) + fileChangesReport;\n };\n\n let componentsWithConflicts = 0;\n const getConflictSummary = () => {\n if (!components || !components.length || !leftUnresolvedConflicts) return '';\n const title = `\\n\\nfiles with conflicts summary\\n`;\n const suggestion = `\\n\\nmerge process not completed due to the conflicts above. fix conflicts manually and then run \"bit install\".\nonce ready, snap/tag the components to complete the merge.`;\n const conflictSummary = conflictSummaryReport(components);\n componentsWithConflicts = conflictSummary.conflictedComponents;\n return chalk.underline(title) + conflictSummary.conflictStr + chalk.yellow(suggestion);\n };\n\n const configMergeWithConflicts = configMergeResults?.filter((c) => c.hasConflicts()) || [];\n const getConfigMergeConflictSummary = () => {\n if (!configMergeWithConflicts.length) return '';\n const comps = configMergeWithConflicts.map((c) => c.compIdStr).join('\\n');\n const title = `\\n\\ncomponents with config-merge conflicts\\n`;\n const suggestion = `\\nconflicts were found while trying to merge the config. fix them manually by editing the ${MergeConfigFilename} file in the workspace root.\nonce ready, snap/tag the components to complete the merge.`;\n return chalk.underline(title) + comps + chalk.yellow(suggestion);\n };\n\n const getSnapsOutput = () => {\n if (mergeSnapError) {\n return `\n${chalk.bold('snapping merged components failed with the following error, please fix the issues and snap manually')}\n${mergeSnapError.message}\n`;\n }\n if (!mergeSnapResults || !mergeSnapResults.snappedComponents) return '';\n const { snappedComponents, autoSnappedResults } = mergeSnapResults;\n const outputComponents = (comps) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${component.id.toString()}`;\n const autoTag = autoSnappedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => a.component.id.toString());\n componentOutput += `\\n ${AUTO_SNAPPED_MSG}: ${autoTagComp.join(', ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n return `\\n${chalk.underline(\n 'merge-snapped components'\n )}\\n(${'components snapped as a result of the merge'})\\n${outputComponents(snappedComponents)}\\n`;\n };\n\n const getFailureOutput = () => {\n if (!failedComponents || !failedComponents.length) return '';\n const title = '\\nmerge skipped for the following component(s)';\n const body = compact(\n failedComponents.map((failedComponent) => {\n // all failures here are \"unchangedLegitimately\". otherwise, it would have been thrown as an error\n if (!verbose) return null;\n return `${chalk.bold(failedComponent.id.toString())} - ${chalk.white(failedComponent.unchangedMessage)}`;\n })\n ).join('\\n');\n if (!body) {\n return `${chalk.bold(`\\nmerge skipped legitimately for ${failedComponents.length} component(s)`)}\n(use --verbose to list them next time)`;\n }\n return `\\n${chalk.underline(title)}\\n${body}\\n\\n`;\n };\n\n const getSummary = () => {\n const merged = components?.length || 0;\n const unchangedLegitimately = failedComponents?.filter((f) => f.unchangedLegitimately).length || 0;\n const autoSnapped =\n (mergeSnapResults?.snappedComponents.length || 0) + (mergeSnapResults?.autoSnappedResults.length || 0);\n const getConflictStr = () => {\n const comps = componentsWithConflicts ? `${componentsWithConflicts} components` : '';\n const ws = workspaceConfigUpdateResult?.workspaceDepsConflicts ? 'workspace.jsonc file' : '';\n const mergeConfig = configMergeWithConflicts.length ? `${MergeConfigFilename} file` : '';\n return compact([comps, ws, mergeConfig]).join(', ');\n };\n\n const newLines = '\\n\\n';\n const title = chalk.bold.underline('Merge Summary');\n const mergedStr = `\\nTotal Merged: ${chalk.bold(merged.toString())}`;\n const unchangedLegitimatelyStr = `\\nTotal Unchanged: ${chalk.bold(unchangedLegitimately.toString())}`;\n const autoSnappedStr = `\\nTotal Snapped: ${chalk.bold(autoSnapped.toString())}`;\n const removedStr = `\\nTotal Removed: ${chalk.bold(removedComponents?.length.toString() || '0')}`;\n const conflictStr = `\\nConflicts: ${chalk.bold(getConflictStr() || 'none')}`;\n\n return newLines + title + mergedStr + unchangedLegitimatelyStr + autoSnappedStr + removedStr + conflictStr;\n };\n\n return (\n getSuccessOutput() +\n getFailureOutput() +\n getRemovedOutput(removedComponents) +\n getSnapsOutput() +\n getConfigMergeConflictSummary() +\n getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult) +\n getConflictSummary() +\n getSummary()\n );\n}\n\nexport function getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult): string {\n if (!workspaceConfigUpdateResult) return '';\n const { workspaceConfigConflictWriteError, workspaceDepsConflicts, workspaceDepsUpdates } =\n workspaceConfigUpdateResult;\n\n const getWorkspaceConflictsOutput = () => {\n if (!workspaceDepsConflicts && !workspaceConfigConflictWriteError) return '';\n if (workspaceConfigConflictWriteError) {\n return `\\n${chalk.red(workspaceConfigConflictWriteError.message)}\\n\\n`;\n }\n return chalk.yellow('\\nworkspace.jsonc has conflicts, please edit the file and fix them\\n\\n');\n };\n\n return getWorkspaceDepsOutput(workspaceDepsUpdates) + getWorkspaceConflictsOutput();\n}\n\nfunction getWorkspaceDepsOutput(workspaceDepsUpdates?: WorkspaceDepsUpdates): string {\n if (!workspaceDepsUpdates) return '';\n\n const title = '\\nworkspace.jsonc has been updated with the following dependencies';\n const body = Object.keys(workspaceDepsUpdates)\n .map((pkgName) => {\n const [from, to] = workspaceDepsUpdates[pkgName];\n return ` ${pkgName}: ${from} => ${to}`;\n })\n .join('\\n');\n\n return `\\n${chalk.underline(title)}\\n${body}\\n\\n`;\n}\n\n/**\n * shows only the file-changes section.\n * if all files are \"unchanged\", it returns an empty string\n */\nexport function applyVersionReport(components: ApplyVersionResult[], addName = true, showVersion = false): string {\n const tab = addName ? '\\t' : '';\n const fileChanges = compact(\n components.map((component: ApplyVersionResult) => {\n const name = showVersion ? component.id.toString() : component.id.toStringWithoutVersion();\n const files = compact(\n Object.keys(component.filesStatus).map((file) => {\n if (component.filesStatus[file] === FileStatus.unchanged) return null;\n const note =\n component.filesStatus[file] === FileStatus.manual\n ? chalk.white('automatic merge failed. please fix conflicts manually and then run \"bit install\"')\n : '';\n return `${tab}${String(component.filesStatus[file])} ${chalk.bold(file)} ${note}`;\n })\n ).join('\\n');\n if (!files) return null;\n return `${addName ? name : ''}\\n${chalk.cyan(files)}`;\n })\n ).join('\\n\\n');\n if (!fileChanges) {\n return '';\n }\n const title = `\\n${FILE_CHANGES_CHECKOUT_MSG}\\n`;\n return chalk.underline(title) + fileChanges;\n}\n\nexport function conflictSummaryReport(components: ApplyVersionResult[]): {\n conflictedComponents: number;\n conflictedFiles: number;\n conflictStr: string;\n} {\n const tab = '\\t';\n let conflictedComponents = 0;\n let conflictedFiles = 0;\n const conflictStr = compact(\n components.map((component: ApplyVersionResult) => {\n const name = component.id.toStringWithoutVersion();\n const files = compact(\n Object.keys(component.filesStatus).map((file) => {\n if (component.filesStatus[file] === FileStatus.manual) {\n conflictedFiles += 1;\n return `${tab}${String(component.filesStatus[file])} ${chalk.bold(file)}`;\n }\n return null;\n })\n );\n if (!files.length) return null;\n conflictedComponents += 1;\n return `${name}\\n${chalk.cyan(files.join('\\n'))}`;\n })\n ).join('\\n');\n\n return { conflictedComponents, conflictedFiles, conflictStr };\n}\n\nexport function installationErrorOutput(installationError?: Error) {\n if (!installationError) return '';\n const title = chalk.underline('Installation Error');\n const subTitle = 'The following error was thrown by the package manager, please fix the issue and run \"bit install\"';\n const body = chalk.red(installationError.message);\n return `\\n\\n${title}\\n${subTitle}\\n${body}`;\n}\n\nexport function compilationErrorOutput(compilationError?: Error) {\n if (!compilationError) return '';\n const title = chalk.underline('Compilation Error');\n const subTitle = 'The following error was thrown by the compiler, please fix the issue and run \"bit compile\"';\n const body = chalk.red(compilationError.message);\n return `\\n\\n${title}\\n${subTitle}\\n${body}`;\n}\n\nexport function getRemovedOutput(removedComponents?: ComponentID[]) {\n if (!removedComponents?.length) return '';\n const title = `the following ${removedComponents.length} component(s) have been removed`;\n const body = removedComponents.join('\\n');\n return `\\n\\n${chalk.underline(title)}\\n${body}\\n\\n`;\n}\n\nexport function getAddedOutput(addedComponents?: ComponentID[]) {\n if (!addedComponents?.length) return '';\n const title = `the following ${addedComponents.length} component(s) have been added`;\n const body = addedComponents.join('\\n');\n return `\\n\\n${chalk.underline(title)}\\n${body}\\n\\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAOA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAE,OAA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AgBY,iBAAiB,CAACK,MAAO,iCAAgC;EACxF,MAAMkC,IAAI,GAAGvC,iBAAiB,CAACN,IAAI,CAAC,IAAI,CAAC;EACzC,OAAQ,OAAMC,gBAAK,CAACC,SAAS,CAACR,KAAK,CAAE,KAAImD,IAAK,MAAK;AACrD;AAEO,SAASiD,cAAcA,CAACC,eAA+B,EAAE;EAC9D,IAAI,CAACA,eAAe,EAAEpF,MAAM,EAAE,OAAO,EAAE;EACvC,MAAMjB,KAAK,GAAI,iBAAgBqG,eAAe,CAACpF,MAAO,+BAA8B;EACpF,MAAMkC,IAAI,GAAGkD,eAAe,CAAC/F,IAAI,CAAC,IAAI,CAAC;EACvC,OAAQ,OAAMC,gBAAK,CAACC,SAAS,CAACR,KAAK,CAAE,KAAImD,IAAK,MAAK;AACrD"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_constants","_mergeVersion","_bitError","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","MergeCmd","constructor","merging","globalConfig","WILDCARD_HELP","report","ids","ours","theirs","manual","autoMergeResolve","abort","resolve","build","noSnap","verbose","message","skipDependencyInstallation","getBool","CFG_FORCE_LOCAL_BUILD","Boolean","BitError","components","failedComponents","version","resolvedComponents","abortedComponents","mergeSnapResults","mergeSnapError","merge","title","componentsStr","map","c","id","toStringWithoutVersion","join","chalk","underline","green","mergeReport","exports","removedComponents","leftUnresolvedConflicts","configMergeResults","workspaceConfigUpdateResult","getSuccessOutput","length","bold","fileChangesReport","applyVersionReport","componentsWithConflicts","getConflictSummary","suggestion","conflictSummary","conflictSummaryReport","conflictedComponents","conflictStr","yellow","configMergeWithConflicts","filter","hasConflicts","getConfigMergeConflictSummary","comps","compIdStr","MergeConfigFilename","getSnapsOutput","snappedComponents","autoSnappedResults","outputComponents","component","componentOutput","toString","autoTag","result","triggeredBy","searchWithoutVersion","autoTagComp","a","AUTO_SNAPPED_MSG","getFailureOutput","body","compact","failedComponent","white","unchangedMessage","getSummary","merged","unchangedLegitimately","f","autoSnapped","getConflictStr","ws","workspaceDepsConflicts","mergeConfig","mergedStr","unchangedLegitimatelyStr","autoSnappedStr","removedStr","getRemovedOutput","getWorkspaceConfigUpdateOutput","workspaceConfigConflictWriteError","workspaceDepsUpdates","getWorkspaceConflictsOutput","red","getWorkspaceDepsOutput","keys","pkgName","from","to","addName","showVersion","tab","fileChanges","name","files","filesStatus","file","FileStatus","unchanged","note","cyan","FILE_CHANGES_CHECKOUT_MSG","conflictedFiles","installationErrorOutput","installationError","subTitle","compilationErrorOutput","compilationError","getAddedOutput","addedComponents"],"sources":["merge-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { compact } from 'lodash';\nimport {\n WILDCARD_HELP,\n AUTO_SNAPPED_MSG,\n MergeConfigFilename,\n FILE_CHANGES_CHECKOUT_MSG,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy/dist/constants';\nimport { FileStatus, MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { GlobalConfigMain } from '@teambit/global-config';\nimport { ConfigMergeResult, WorkspaceConfigUpdateResult, WorkspaceDepsUpdates } from '@teambit/config-merger';\nimport { BitError } from '@teambit/bit-error';\nimport { ApplyVersionResults, MergingMain, ApplyVersionResult } from './merging.main.runtime';\n\nexport class MergeCmd implements Command {\n name = 'merge [ids...]';\n description = 'merge changes of the remote head into local - auto-snaps all merged components';\n helpUrl = 'reference/components/merging-changes';\n group = 'development';\n extendedDescription = `merge changes of the remote head into local when they are diverged. when on a lane, merge the remote head of the lane into the local\nand creates snaps for merged components that have diverged, on the lane.\nif no ids are specified, all pending-merge components will be merged. (run \"bit status\" to list them).\noptionally use '--abort' to revert the last merge. to revert a lane merge, use \"bit lane merge-abort\" command.\n${WILDCARD_HELP('merge')}`;\n alias = '';\n options = [\n ['', 'ours', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep the local modification'],\n [\n '',\n 'theirs',\n 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, override the local modification with the specified version',\n ],\n [\n '',\n 'manual',\n 'same as \"--auto-merge-resolve manual\". in case of merge conflict, write the files with the conflict markers',\n ],\n [\n '',\n 'auto-merge-resolve <merge-strategy>',\n 'in case of a conflict, resolve according to the strategy: [ours, theirs, manual]',\n ],\n ['', 'abort', 'in case of an unresolved merge, revert to pre-merge state'],\n ['', 'resolve', 'mark an unresolved merge as resolved and create a new snap with the changes'],\n ['', 'no-snap', 'do not auto snap even if the merge completed without conflicts'],\n ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'],\n ['', 'verbose', 'show details of components that were not merged successfully'],\n ['x', 'skip-dependency-installation', 'do not install new dependencies resulting from the merge'],\n ['m', 'message <message>', 'override the default message for the auto snap'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private merging: MergingMain, private globalConfig: GlobalConfigMain) {}\n\n async report(\n [ids = []]: [string[]],\n {\n ours = false,\n theirs = false,\n manual = false,\n autoMergeResolve,\n abort = false,\n resolve = false,\n build = false,\n noSnap = false,\n verbose = false,\n message,\n skipDependencyInstallation = false,\n }: {\n ours?: boolean;\n theirs?: boolean;\n manual?: boolean;\n autoMergeResolve?: MergeStrategy;\n abort?: boolean;\n resolve?: boolean;\n build?: boolean;\n noSnap?: boolean;\n verbose?: boolean;\n message: string;\n skipDependencyInstallation?: boolean;\n }\n ) {\n build = (await this.globalConfig.getBool(CFG_FORCE_LOCAL_BUILD)) || Boolean(build);\n if (ours || theirs) {\n throw new BitError('the \"--ours\" and \"--theirs\" flags are deprecated. use \"--auto-merge-resolve\" instead');\n }\n if (\n autoMergeResolve &&\n autoMergeResolve !== 'ours' &&\n autoMergeResolve !== 'theirs' &&\n autoMergeResolve !== 'manual'\n ) {\n throw new BitError('--auto-merge-resolve must be one of the following: [ours, theirs, manual]');\n }\n if (manual) autoMergeResolve = 'manual';\n if (abort && resolve) throw new BitError('unable to use \"abort\" and \"resolve\" flags together');\n if (noSnap && message) throw new BitError('unable to use \"noSnap\" and \"message\" flags together');\n const {\n components,\n failedComponents,\n version,\n resolvedComponents,\n abortedComponents,\n mergeSnapResults,\n mergeSnapError,\n }: ApplyVersionResults = await this.merging.merge(\n ids,\n autoMergeResolve as any,\n abort,\n resolve,\n noSnap,\n message,\n build,\n skipDependencyInstallation\n );\n if (resolvedComponents) {\n const title = 'successfully resolved component(s)\\n';\n const componentsStr = resolvedComponents.map((c) => c.id.toStringWithoutVersion()).join('\\n');\n return chalk.underline(title) + chalk.green(componentsStr);\n }\n if (abortedComponents) {\n const title = 'successfully aborted the merge of the following component(s)\\n';\n const componentsStr = abortedComponents.map((c) => c.id.toStringWithoutVersion()).join('\\n');\n return chalk.underline(title) + chalk.green(componentsStr);\n }\n\n return mergeReport({\n components,\n failedComponents,\n version,\n mergeSnapResults,\n mergeSnapError,\n verbose,\n });\n }\n}\n\nexport function mergeReport({\n components,\n failedComponents,\n removedComponents,\n version,\n mergeSnapResults,\n mergeSnapError,\n leftUnresolvedConflicts,\n verbose,\n configMergeResults,\n workspaceConfigUpdateResult,\n}: ApplyVersionResults & { configMergeResults?: ConfigMergeResult[] }): string {\n const getSuccessOutput = () => {\n if (!components || !components.length) return '';\n const title = `successfully merged ${components.length} components${\n version ? `from version ${chalk.bold(version)}` : ''\n }\\n`;\n const fileChangesReport = applyVersionReport(components);\n\n return chalk.bold(title) + fileChangesReport;\n };\n\n let componentsWithConflicts = 0;\n const getConflictSummary = () => {\n if (!components || !components.length || !leftUnresolvedConflicts) return '';\n const title = `files with conflicts summary\\n`;\n const suggestion = `\\n\\nmerge process not completed due to the conflicts above. fix conflicts manually and then run \"bit install\".\nonce ready, snap/tag the components to complete the merge.`;\n const conflictSummary = conflictSummaryReport(components);\n componentsWithConflicts = conflictSummary.conflictedComponents;\n return chalk.underline(title) + conflictSummary.conflictStr + chalk.yellow(suggestion);\n };\n\n const configMergeWithConflicts = configMergeResults?.filter((c) => c.hasConflicts()) || [];\n const getConfigMergeConflictSummary = () => {\n if (!configMergeWithConflicts.length) return '';\n const comps = configMergeWithConflicts.map((c) => c.compIdStr).join('\\n');\n const title = `components with config-merge conflicts\\n`;\n const suggestion = `\\nconflicts were found while trying to merge the config. fix them manually by editing the ${MergeConfigFilename} file in the workspace root.\nonce ready, snap/tag the components to complete the merge.`;\n return chalk.underline(title) + comps + chalk.yellow(suggestion);\n };\n\n const getSnapsOutput = () => {\n if (mergeSnapError) {\n return `${chalk.bold(\n 'snapping merged components failed with the following error, please fix the issues and snap manually'\n )}\n${mergeSnapError.message}\n`;\n }\n if (!mergeSnapResults || !mergeSnapResults.snappedComponents) return '';\n const { snappedComponents, autoSnappedResults } = mergeSnapResults;\n const outputComponents = (comps) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${component.id.toString()}`;\n const autoTag = autoSnappedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => a.component.id.toString());\n componentOutput += `\\n ${AUTO_SNAPPED_MSG}: ${autoTagComp.join(', ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n return `${chalk.underline(\n 'merge-snapped components'\n )}\\n(${'components snapped as a result of the merge'})\\n${outputComponents(snappedComponents)}`;\n };\n\n const getFailureOutput = () => {\n if (!failedComponents || !failedComponents.length) return '';\n const title = '\\nmerge skipped for the following component(s)';\n const body = compact(\n failedComponents.map((failedComponent) => {\n // all failures here are \"unchangedLegitimately\". otherwise, it would have been thrown as an error\n if (!verbose) return null;\n return `${chalk.bold(failedComponent.id.toString())} - ${chalk.white(failedComponent.unchangedMessage)}`;\n })\n ).join('\\n');\n if (!body) {\n return `${chalk.bold(`\\nmerge skipped legitimately for ${failedComponents.length} component(s)`)}\n(use --verbose to list them next time)`;\n }\n return `${chalk.underline(title)}\\n${body}`;\n };\n\n const getSummary = () => {\n const merged = components?.length || 0;\n const unchangedLegitimately = failedComponents?.filter((f) => f.unchangedLegitimately).length || 0;\n const autoSnapped =\n (mergeSnapResults?.snappedComponents.length || 0) + (mergeSnapResults?.autoSnappedResults.length || 0);\n const getConflictStr = () => {\n const comps = componentsWithConflicts ? `${componentsWithConflicts} components` : '';\n const ws = workspaceConfigUpdateResult?.workspaceDepsConflicts ? 'workspace.jsonc file' : '';\n const mergeConfig = configMergeWithConflicts.length ? `${MergeConfigFilename} file` : '';\n return compact([comps, ws, mergeConfig]).join(', ');\n };\n\n const title = chalk.bold.underline('Merge Summary');\n const mergedStr = `\\nTotal Merged: ${chalk.bold(merged.toString())}`;\n const unchangedLegitimatelyStr = `\\nTotal Unchanged: ${chalk.bold(unchangedLegitimately.toString())}`;\n const autoSnappedStr = `\\nTotal Snapped: ${chalk.bold(autoSnapped.toString())}`;\n const removedStr = `\\nTotal Removed: ${chalk.bold(removedComponents?.length.toString() || '0')}`;\n const conflictStr = `\\nConflicts: ${chalk.bold(getConflictStr() || 'none')}`;\n\n return title + mergedStr + unchangedLegitimatelyStr + autoSnappedStr + removedStr + conflictStr;\n };\n\n return compact([\n getSuccessOutput(),\n getFailureOutput(),\n getRemovedOutput(removedComponents),\n getSnapsOutput(),\n getConfigMergeConflictSummary(),\n getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult),\n getConflictSummary(),\n getSummary(),\n ]).join('\\n\\n');\n}\n\nexport function getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult): string {\n if (!workspaceConfigUpdateResult) return '';\n const { workspaceConfigConflictWriteError, workspaceDepsConflicts, workspaceDepsUpdates } =\n workspaceConfigUpdateResult;\n\n const getWorkspaceConflictsOutput = () => {\n if (!workspaceDepsConflicts && !workspaceConfigConflictWriteError) return '';\n if (workspaceConfigConflictWriteError) {\n return `${chalk.red(workspaceConfigConflictWriteError.message)}`;\n }\n return chalk.yellow('workspace.jsonc has conflicts, please edit the file and fix them');\n };\n\n return compact([getWorkspaceDepsOutput(workspaceDepsUpdates), getWorkspaceConflictsOutput()]).join('\\n\\n');\n}\n\nfunction getWorkspaceDepsOutput(workspaceDepsUpdates?: WorkspaceDepsUpdates): string {\n if (!workspaceDepsUpdates) return '';\n\n const title = '\\nworkspace.jsonc has been updated with the following dependencies';\n const body = Object.keys(workspaceDepsUpdates)\n .map((pkgName) => {\n const [from, to] = workspaceDepsUpdates[pkgName];\n return ` ${pkgName}: ${from} => ${to}`;\n })\n .join('\\n');\n\n return `${chalk.underline(title)}\\n${body}`;\n}\n\n/**\n * shows only the file-changes section.\n * if all files are \"unchanged\", it returns an empty string\n */\nexport function applyVersionReport(components: ApplyVersionResult[], addName = true, showVersion = false): string {\n const tab = addName ? '\\t' : '';\n const fileChanges = compact(\n components.map((component: ApplyVersionResult) => {\n const name = showVersion ? component.id.toString() : component.id.toStringWithoutVersion();\n const files = compact(\n Object.keys(component.filesStatus).map((file) => {\n if (component.filesStatus[file] === FileStatus.unchanged) return null;\n const note =\n component.filesStatus[file] === FileStatus.manual\n ? chalk.white('automatic merge failed. please fix conflicts manually and then run \"bit install\"')\n : '';\n return `${tab}${String(component.filesStatus[file])} ${chalk.bold(file)} ${note}`;\n })\n ).join('\\n');\n if (!files) return null;\n return `${addName ? name : ''}\\n${chalk.cyan(files)}`;\n })\n ).join('\\n\\n');\n if (!fileChanges) {\n return '';\n }\n const title = `\\n${FILE_CHANGES_CHECKOUT_MSG}\\n`;\n return chalk.underline(title) + fileChanges;\n}\n\nexport function conflictSummaryReport(components: ApplyVersionResult[]): {\n conflictedComponents: number;\n conflictedFiles: number;\n conflictStr: string;\n} {\n const tab = '\\t';\n let conflictedComponents = 0;\n let conflictedFiles = 0;\n const conflictStr = compact(\n components.map((component: ApplyVersionResult) => {\n const name = component.id.toStringWithoutVersion();\n const files = compact(\n Object.keys(component.filesStatus).map((file) => {\n if (component.filesStatus[file] === FileStatus.manual) {\n conflictedFiles += 1;\n return `${tab}${String(component.filesStatus[file])} ${chalk.bold(file)}`;\n }\n return null;\n })\n );\n if (!files.length) return null;\n conflictedComponents += 1;\n return `${name}\\n${chalk.cyan(files.join('\\n'))}`;\n })\n ).join('\\n');\n\n return { conflictedComponents, conflictedFiles, conflictStr };\n}\n\nexport function installationErrorOutput(installationError?: Error) {\n if (!installationError) return '';\n const title = chalk.underline('Installation Error');\n const subTitle = 'The following error was thrown by the package manager:';\n const body = chalk.red(installationError.message);\n const suggestion =\n 'Use \"bit install\" to complete the installation, remove the imported components using \"bit remove <comp id>\" or remove the missing dependencies from their source code';\n return `${title}\\n${subTitle}\\n${body}\\n${suggestion}`;\n}\n\nexport function compilationErrorOutput(compilationError?: Error) {\n if (!compilationError) return '';\n const title = chalk.underline('Compilation Error');\n const subTitle = 'The following error was thrown by the compiler';\n const body = chalk.red(compilationError.message);\n const suggestion = 'Please fix the issue and run \"bit compile\"';\n return `${title}\\n${subTitle}\\n${body}\\n${suggestion}`;\n}\n\nexport function getRemovedOutput(removedComponents?: ComponentID[]) {\n if (!removedComponents?.length) return '';\n const title = `the following ${removedComponents.length} component(s) have been removed`;\n const body = removedComponents.join('\\n');\n return `${chalk.underline(title)}\\n${body}`;\n}\n\nexport function getAddedOutput(addedComponents?: ComponentID[]) {\n if (!addedComponents?.length) return '';\n const title = `the following ${addedComponents.length} component(s) have been added`;\n const body = addedComponents.join('\\n');\n return `${chalk.underline(title)}\\n${body}`;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAA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gBAAgB,EAAE,OAAO,EAAE;EAChC,MAAMlG,KAAK,GAAGO,gBAAK,CAACC,SAAS,CAAC,mBAAmB,CAAC;EAClD,MAAMwF,QAAQ,GAAG,gDAAgD;EACjE,MAAM7C,IAAI,GAAG5C,gBAAK,CAACmE,GAAG,CAACwB,gBAAgB,CAAChH,OAAO,CAAC;EAChD,MAAMqC,UAAU,GAAG,4CAA4C;EAC/D,OAAQ,GAAEvB,KAAM,KAAIgG,QAAS,KAAI7C,IAAK,KAAI5B,UAAW,EAAC;AACxD;AAEO,SAAS8C,gBAAgBA,CAACzD,iBAAiC,EAAE;EAClE,IAAI,CAACA,iBAAiB,EAAEK,MAAM,EAAE,OAAO,EAAE;EACzC,MAAMjB,KAAK,GAAI,iBAAgBY,iBAAiB,CAACK,MAAO,iCAAgC;EACxF,MAAMkC,IAAI,GAAGvC,iBAAiB,CAACN,IAAI,CAAC,IAAI,CAAC;EACzC,OAAQ,GAAEC,gBAAK,CAACC,SAAS,CAACR,KAAK,CAAE,KAAImD,IAAK,EAAC;AAC7C;AAEO,SAASgD,cAAcA,CAACC,eAA+B,EAAE;EAC9D,IAAI,CAACA,eAAe,EAAEnF,MAAM,EAAE,OAAO,EAAE;EACvC,MAAMjB,KAAK,GAAI,iBAAgBoG,eAAe,CAACnF,MAAO,+BAA8B;EACpF,MAAMkC,IAAI,GAAGiD,eAAe,CAAC9F,IAAI,CAAC,IAAI,CAAC;EACvC,OAAQ,GAAEC,gBAAK,CAACC,SAAS,CAACR,KAAK,CAAE,KAAImD,IAAK,EAAC;AAC7C"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/merging",
3
- "version": "1.0.138",
3
+ "version": "1.0.139",
4
4
  "homepage": "https://bit.cloud/teambit/component/merging",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "merging",
9
- "version": "1.0.138"
9
+ "version": "1.0.139"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -17,17 +17,17 @@
17
17
  "@teambit/lane-id": "0.0.311",
18
18
  "@teambit/harmony": "0.4.6",
19
19
  "@teambit/cli": "0.0.848",
20
- "@teambit/config-merger": "0.0.5",
20
+ "@teambit/config-merger": "0.0.6",
21
21
  "@teambit/global-config": "0.0.851",
22
- "@teambit/importer": "1.0.138",
22
+ "@teambit/importer": "1.0.139",
23
23
  "@teambit/logger": "0.0.941",
24
- "@teambit/workspace": "1.0.138",
25
- "@teambit/checkout": "1.0.138",
26
- "@teambit/component-writer": "1.0.138",
27
- "@teambit/config": "0.0.889",
28
- "@teambit/install": "1.0.138",
29
- "@teambit/remove": "1.0.138",
30
- "@teambit/snapping": "1.0.138"
24
+ "@teambit/workspace": "1.0.139",
25
+ "@teambit/checkout": "1.0.139",
26
+ "@teambit/component-writer": "1.0.139",
27
+ "@teambit/config": "0.0.890",
28
+ "@teambit/install": "1.0.139",
29
+ "@teambit/remove": "1.0.139",
30
+ "@teambit/snapping": "1.0.139"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/lodash": "4.14.165",