@teambit/merge-lanes 0.0.202 → 0.0.203

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.
@@ -65,6 +65,13 @@ function _chalk() {
65
65
  };
66
66
  return data;
67
67
  }
68
+ function _snapping() {
69
+ const data = require("@teambit/snapping");
70
+ _snapping = function () {
71
+ return data;
72
+ };
73
+ return data;
74
+ }
68
75
  function _pMapSeries() {
69
76
  const data = _interopRequireDefault(require("p-map-series"));
70
77
  _pMapSeries = function () {
@@ -156,6 +163,8 @@ function _mergeLaneFromScope() {
156
163
  };
157
164
  return data;
158
165
  }
166
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
167
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
159
168
  class MergeLanesMain {
160
169
  constructor(workspace, merging, lanes, logger, remove, scope, exporter, importer) {
161
170
  this.workspace = workspace;
@@ -363,6 +372,7 @@ class MergeLanesMain {
363
372
  const mergedPreviously = [];
364
373
  const mergedNow = [];
365
374
  const shouldSquash = !toLaneObj && !options.noSquash; // only when merging to main we squash.
375
+ const log = await getLogForSquash(fromLaneId);
366
376
  const bitObjectsPerComp = await (0, _pMapSeries().default)(idsToMerge, async id => {
367
377
  var _toLaneObj$getCompone;
368
378
  const modelComponent = await this.scope.legacyScope.getModelComponent(id);
@@ -384,7 +394,7 @@ class MergeLanesMain {
384
394
  sourceHead: toLaneHead,
385
395
  targetHead: fromLaneHead
386
396
  });
387
- const modifiedVersion = shouldSquash ? squashOneComp(_laneId().DEFAULT_LANE, fromLaneId, id, divergeData, fromVersionObj) : undefined;
397
+ const modifiedVersion = shouldSquash ? squashOneComp(_laneId().DEFAULT_LANE, fromLaneId, id, divergeData, log, fromVersionObj) : undefined;
388
398
  const objects = [];
389
399
  if (modifiedVersion) objects.push(modifiedVersion);
390
400
  if (toLaneObj) {
@@ -534,9 +544,17 @@ ${depsOnLane.map(d => d.toString()).join('\n')}`);
534
544
  }
535
545
  return filteredComponentStatus;
536
546
  }
547
+ async function getLogForSquash(otherLaneId) {
548
+ const basicLog = await (0, _snapping().getBasicLog)();
549
+ const log = _objectSpread(_objectSpread({}, basicLog), {}, {
550
+ message: `squashed during merge from ${otherLaneId.toString()}`
551
+ });
552
+ return log;
553
+ }
537
554
  async function squashSnaps(allComponentsStatus, otherLaneId, consumer) {
538
555
  const currentLaneName = consumer.getCurrentLaneId().name;
539
556
  const succeededComponents = allComponentsStatus.filter(c => !c.unmergedMessage);
557
+ const log = await getLogForSquash(otherLaneId);
540
558
  await Promise.all(succeededComponents.map(async ({
541
559
  id,
542
560
  divergeData,
@@ -545,7 +563,7 @@ async function squashSnaps(allComponentsStatus, otherLaneId, consumer) {
545
563
  if (!divergeData) {
546
564
  throw new Error(`unable to squash. divergeData is missing from ${id.toString()}`);
547
565
  }
548
- const modifiedComp = squashOneComp(currentLaneName, otherLaneId, id, divergeData, componentFromModel);
566
+ const modifiedComp = squashOneComp(currentLaneName, otherLaneId, id, divergeData, log, componentFromModel);
549
567
  if (modifiedComp) {
550
568
  consumer.scope.objects.add(modifiedComp);
551
569
  const modelComponent = await consumer.scope.getModelComponent(id);
@@ -558,7 +576,7 @@ async function squashSnaps(allComponentsStatus, otherLaneId, consumer) {
558
576
  /**
559
577
  * returns Version object if it was modified. otherwise, returns undefined
560
578
  */
561
- function squashOneComp(currentLaneName, otherLaneId, id, divergeData, componentFromModel) {
579
+ function squashOneComp(currentLaneName, otherLaneId, id, divergeData, log, componentFromModel) {
562
580
  if (divergeData.isDiverged()) {
563
581
  throw new (_bitError().BitError)(`unable to squash because ${id.toString()} is diverged in history.
564
582
  consider switching to "${otherLaneId.name}" first, merging "${currentLaneName}", then switching back to "${currentLaneName}" and merging "${otherLaneId.name}"
@@ -598,7 +616,7 @@ alternatively, use "--no-squash" flag to keep the entire history of "${otherLane
598
616
  componentFromModel.setSquashed({
599
617
  previousParents: currentParents,
600
618
  laneId: otherLaneId
601
- });
619
+ }, log);
602
620
  return componentFromModel;
603
621
  }
604
622
  _mergeLanes().MergeLanesAspect.addRuntime(MergeLanesMain);
@@ -1 +1 @@
1
- {"version":3,"names":["MergeLanesMain","constructor","workspace","merging","lanes","logger","remove","scope","exporter","importer","mergeLane","laneName","options","BitError","consumer","mergeStrategy","noSnap","tag","snapMessage","existingOnWorkspaceOnly","build","keepReadme","noSquash","pattern","includeDeps","skipDependencyInstallation","resolveUnrelated","ignoreConfigChanges","skipFetch","currentLaneId","getCurrentLaneId","isDefault","toString","otherLaneId","getParsedLaneId","isEqual","currentLane","loadLane","isDefaultLane","getOtherLane","importObjectsFromMainIfExist","toBitIds","toVersionLatest","undefined","lane","shouldFetch","isNew","otherLane","fetchLaneWithItsComponents","importHeadArtifactsFromLane","getBitIds","Error","DEFAULT_LANE","getMainIdsToMerge","bitIds","debug","allComponentsStatus","getMergeStatus","shouldSquash","componentIds","resolveMultipleComponentIds","compIdsFromPattern","filterIdsFromPoolIdsByPattern","filterComponentsStatus","forEach","bitId","find","c","id","isEqualWithoutVersion","push","unmergedLegitimately","unmergedMessage","workspaceIds","listIds","filter","_legacy","throwForFailures","squashSnaps","mergeResults","mergeSnaps","laneId","localLane","mergedSuccessfully","failedComponents","length","every","failedComponent","unchangedLegitimately","deleteResults","readmeComponent","readmeComponentId","changeVersion","head","hash","componentsPattern","force","remote","track","deleteFiles","fromLane","readmeResult","name","configMergeResults","map","configMergeResult","onDestroy","compact","failureMsgs","chalk","bold","red","join","laneIds","mainNotOnLane","ids","hasScope","modelComponents","Promise","all","legacyScope","getModelComponent","toBitId","mergeFromScope","toLane","fromLaneId","LaneId","parse","fromLaneObj","importLaneObject","toLaneId","getDefaultLaneId","toLaneObj","fromLaneBitIds","getIdsToMerge","laneCompIds","BitIds","fromArray","idsToMerge","scopeComponentsImporter","ScopeComponentsImporter","getInstance","importManyDeltaWithoutDeps","fromHead","ignoreMissingHead","throwIfNotUpToDate","repo","objects","mergedPreviously","mergedNow","bitObjectsPerComp","pMapSeries","modelComponent","fromVersionObj","loadVersion","version","isRemoved","fromLaneHead","getRef","toLaneHead","getComponent","divergeData","getDivergeData","sourceHead","targetHead","modifiedVersion","squashOneComp","addComponent","setHead","bitObjects","b","bitObjectsFlat","flat","writeObjectsToTheFS","exportedIds","exported","exportMany","idsWithFutureScope","laneObject","allVersions","exportHeadsOnly","ignoreMissingExternalArtifacts","status","diffStatus","skipChanges","compsNotUpToDate","componentsStatus","s","upToDate","componentId","provider","cli","loggerMain","createLogger","MergeLanesAspect","lanesCommand","getCommand","mergeLanesMain","commands","MergeLaneCmd","register","MergeLaneFromScopeCmd","LanesAspect","CLIAspect","WorkspaceAspect","MergingAspect","LoggerAspect","RemoveAspect","ScopeAspect","ExportAspect","ImporterAspect","MainRuntime","compIdsToKeep","allBitIds","bitIdsFromPattern","bitIdsNotFromPattern","hasWithoutVersion","filteredComponentStatus","depsToAdd","compId","fromStatus","targetVersions","snapsOnTargetOnly","headOnTarget","remoteVersion","versionObj","flattenedDeps","getAllFlattenedDependencies","depsNotIncludeInPattern","depsOnLane","dep","isOnLane","isIdOnLane","d","depsUniq","uniqFromArray","currentLaneName","succeededComponents","componentFromModel","modifiedComp","add","versionHistory","updateRebasedVersionHistory","isDiverged","isSourceAhead","isTargetAhead","remoteSnaps","currentParents","parents","commonSnapBeforeDiverge","addAsOnlyParent","ref","removeParent","setSquashed","previousParents","addRuntime"],"sources":["merge-lanes.main.runtime.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport ImporterAspect, { ImporterMain } from '@teambit/importer';\nimport { LanesAspect, LanesMain } from '@teambit/lanes';\nimport MergingAspect, {\n MergingMain,\n ComponentMergeStatus,\n ConfigMergeResult,\n ApplyVersionResults,\n} from '@teambit/merging';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport chalk from 'chalk';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport pMapSeries from 'p-map-series';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport ScopeComponentsImporter from '@teambit/legacy/dist/scope/component-ops/scope-components-importer';\nimport { ComponentID } from '@teambit/component-id';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport { Lane, Version } from '@teambit/legacy/dist/scope/models';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { SnapsDistance } from '@teambit/legacy/dist/scope/component-ops/snaps-distance';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { compact } from 'lodash';\nimport { ExportAspect, ExportMain } from '@teambit/export';\nimport { BitObject } from '@teambit/legacy/dist/scope/objects';\nimport { getDivergeData } from '@teambit/legacy/dist/scope/component-ops/get-diverge-data';\nimport { MergeLanesAspect } from './merge-lanes.aspect';\nimport { MergeLaneCmd } from './merge-lane.cmd';\nimport { MergeLaneFromScopeCmd } from './merge-lane-from-scope.cmd';\n\nexport type MergeLaneOptions = {\n mergeStrategy: MergeStrategy;\n noSnap: boolean;\n snapMessage: string;\n existingOnWorkspaceOnly: boolean;\n build: boolean;\n keepReadme: boolean;\n noSquash: boolean;\n tag?: boolean;\n pattern?: string;\n includeDeps?: boolean;\n skipDependencyInstallation?: boolean;\n resolveUnrelated?: MergeStrategy;\n ignoreConfigChanges?: boolean;\n skipFetch?: boolean;\n};\n\nexport class MergeLanesMain {\n constructor(\n private workspace: Workspace | undefined,\n private merging: MergingMain,\n private lanes: LanesMain,\n private logger: Logger,\n private remove: RemoveMain,\n private scope: ScopeMain,\n private exporter: ExportMain,\n private importer: ImporterMain\n ) {}\n\n async mergeLane(\n laneName: string,\n options: MergeLaneOptions\n ): Promise<{ mergeResults: ApplyVersionResults; deleteResults: any; configMergeResults: ConfigMergeResult[] }> {\n if (!this.workspace) {\n throw new BitError(`unable to merge a lane outside of Bit workspace`);\n }\n const consumer = this.workspace.consumer;\n\n const {\n mergeStrategy,\n noSnap,\n tag,\n snapMessage,\n existingOnWorkspaceOnly,\n build,\n keepReadme,\n noSquash,\n pattern,\n includeDeps,\n skipDependencyInstallation,\n resolveUnrelated,\n ignoreConfigChanges,\n skipFetch,\n } = options;\n\n const currentLaneId = consumer.getCurrentLaneId();\n if (tag && !currentLaneId.isDefault()) {\n throw new BitError(`--tag only possible when on main. currently checked out to ${currentLaneId.toString()}`);\n }\n const otherLaneId = await consumer.getParsedLaneId(laneName);\n if (otherLaneId.isEqual(currentLaneId)) {\n throw new BitError(\n `unable to merge lane \"${otherLaneId.toString()}\", you're already at this lane. to get updates, simply run \"bit checkout head\"`\n );\n }\n if (resolveUnrelated && currentLaneId.isDefault()) {\n throw new BitError(\n `unable to resolve unrelated when on main. switch to ${otherLaneId.toString()} and run \"bit lane merge main --resolve-unrelated\"`\n );\n }\n const currentLane = currentLaneId.isDefault() ? null : await consumer.scope.loadLane(currentLaneId);\n const isDefaultLane = otherLaneId.isDefault();\n const getOtherLane = async () => {\n if (isDefaultLane) {\n if (!skipFetch) {\n await this.importer.importObjectsFromMainIfExist(currentLane?.toBitIds().toVersionLatest() || []);\n }\n return undefined;\n }\n let lane = await consumer.scope.loadLane(otherLaneId);\n const shouldFetch = !lane || (!skipFetch && !lane.isNew);\n if (shouldFetch) {\n // don't assign `lane` to the result of this command. otherwise, if you have local snaps, it'll ignore them and use the remote-lane.\n const otherLane = await this.lanes.fetchLaneWithItsComponents(otherLaneId);\n\n await this.importer.importHeadArtifactsFromLane(otherLane, true);\n\n lane = await consumer.scope.loadLane(otherLaneId);\n }\n return lane;\n };\n const otherLane = await getOtherLane();\n const getBitIds = async () => {\n if (isDefaultLane) {\n if (!currentLane) throw new Error(`unable to merge ${DEFAULT_LANE}, the current lane was not found`);\n return this.getMainIdsToMerge(currentLane);\n }\n if (!otherLane) throw new Error(`lane must be defined for non-default`);\n return otherLane.toBitIds();\n };\n const bitIds = await getBitIds();\n this.logger.debug(`merging the following bitIds: ${bitIds.toString()}`);\n\n let allComponentsStatus = await this.merging.getMergeStatus(bitIds, currentLane, otherLane, {\n resolveUnrelated,\n ignoreConfigChanges,\n });\n const shouldSquash = currentLaneId.isDefault() && !noSquash;\n\n if (pattern) {\n const componentIds = await this.workspace.resolveMultipleComponentIds(bitIds);\n const compIdsFromPattern = this.workspace.scope.filterIdsFromPoolIdsByPattern(pattern, componentIds);\n allComponentsStatus = await filterComponentsStatus(\n allComponentsStatus,\n compIdsFromPattern,\n bitIds,\n this.workspace,\n includeDeps,\n otherLane || undefined,\n shouldSquash\n );\n bitIds.forEach((bitId) => {\n if (!allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(bitId))) {\n allComponentsStatus.push({ id: bitId, unmergedLegitimately: true, unmergedMessage: `excluded by pattern` });\n }\n });\n }\n if (existingOnWorkspaceOnly) {\n const workspaceIds = await this.workspace.listIds();\n const compIdsFromPattern = workspaceIds.filter((id) =>\n allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(id._legacy))\n );\n allComponentsStatus = await filterComponentsStatus(\n allComponentsStatus,\n compIdsFromPattern,\n bitIds,\n this.workspace,\n includeDeps,\n otherLane || undefined,\n shouldSquash\n );\n bitIds.forEach((bitId) => {\n if (!allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(bitId))) {\n allComponentsStatus.push({ id: bitId, unmergedLegitimately: true, unmergedMessage: `not in the workspace` });\n }\n });\n }\n\n throwForFailures();\n\n if (shouldSquash) {\n await squashSnaps(allComponentsStatus, otherLaneId, consumer);\n }\n\n const mergeResults = await this.merging.mergeSnaps({\n mergeStrategy,\n allComponentsStatus,\n laneId: otherLaneId,\n localLane: currentLane,\n noSnap,\n tag,\n snapMessage,\n build,\n skipDependencyInstallation,\n });\n\n const mergedSuccessfully =\n !mergeResults.failedComponents ||\n mergeResults.failedComponents.length === 0 ||\n mergeResults.failedComponents.every((failedComponent) => failedComponent.unchangedLegitimately);\n\n let deleteResults = {};\n\n if (!keepReadme && otherLane && otherLane.readmeComponent && mergedSuccessfully) {\n const readmeComponentId = otherLane.readmeComponent.id\n .changeVersion(otherLane.readmeComponent?.head?.hash)\n .toString();\n\n deleteResults = await this.remove.remove({\n componentsPattern: readmeComponentId,\n force: false,\n remote: false,\n track: false,\n deleteFiles: true,\n fromLane: false,\n });\n } else if (otherLane && !otherLane.readmeComponent) {\n deleteResults = { readmeResult: `\\nlane ${otherLane.name} doesn't have a readme component` };\n }\n const configMergeResults = allComponentsStatus.map((c) => c.configMergeResult);\n\n await this.workspace.consumer.onDestroy();\n\n return { mergeResults, deleteResults, configMergeResults: compact(configMergeResults) };\n\n function throwForFailures() {\n const failedComponents = allComponentsStatus.filter((c) => c.unmergedMessage && !c.unmergedLegitimately);\n if (failedComponents.length) {\n const failureMsgs = failedComponents\n .map(\n (failedComponent) =>\n `${chalk.bold(failedComponent.id.toString())} - ${chalk.red(failedComponent.unmergedMessage as string)}`\n )\n .join('\\n');\n throw new BitError(`unable to merge due to the following failures:\\n${failureMsgs}`);\n }\n }\n }\n\n private async getMainIdsToMerge(lane: Lane) {\n const laneIds = lane.toBitIds();\n if (!this.workspace) {\n throw new BitError(`getMainIdsToMerge needs workspace`);\n }\n const workspaceIds = (await this.workspace.listIds()).map((id) => id._legacy);\n const mainNotOnLane = workspaceIds.filter((id) => !laneIds.find((laneId) => laneId.isEqualWithoutVersion(id)));\n const ids = [...laneIds, ...mainNotOnLane].filter((id) => id.hasScope());\n const modelComponents = await Promise.all(ids.map((id) => this.scope.legacyScope.getModelComponent(id)));\n return compact(\n modelComponents.map((c) => {\n if (!c.head) return null; // probably the component was never merged to main\n return c.toBitId().changeVersion(c.head.toString());\n })\n );\n }\n\n async mergeFromScope(\n fromLane: string,\n toLane: string,\n options: Partial<MergeLaneOptions> & { push?: boolean }\n ): Promise<{\n mergedPreviously: string[];\n mergedNow: string[];\n exportedIds: string[];\n }> {\n if (this.workspace) {\n throw new BitError(\n `unable to run this command from a workspace, please create a new bare-scope and run it from there`\n );\n }\n const fromLaneId = LaneId.parse(fromLane);\n const fromLaneObj = await this.lanes.importLaneObject(fromLaneId);\n const toLaneId = toLane === DEFAULT_LANE ? this.lanes.getDefaultLaneId() : LaneId.parse(toLane);\n const toLaneObj = toLaneId.isDefault() ? undefined : await this.lanes.importLaneObject(toLaneId);\n const fromLaneBitIds = fromLaneObj.toBitIds();\n const getIdsToMerge = async (): Promise<BitIds> => {\n if (!options.pattern) return fromLaneBitIds;\n const laneCompIds = await this.scope.resolveMultipleComponentIds(fromLaneBitIds);\n const ids = this.scope.filterIdsFromPoolIdsByPattern(options.pattern, laneCompIds);\n return BitIds.fromArray(ids.map((id) => id._legacy));\n };\n const idsToMerge = await getIdsToMerge();\n const scopeComponentsImporter = ScopeComponentsImporter.getInstance(this.scope.legacyScope);\n await scopeComponentsImporter.importManyDeltaWithoutDeps({\n ids: idsToMerge,\n fromHead: true,\n lane: fromLaneObj,\n ignoreMissingHead: true,\n });\n // get their main/to-lane as well\n await scopeComponentsImporter.importManyDeltaWithoutDeps({\n ids: idsToMerge.toVersionLatest(),\n fromHead: true,\n ignoreMissingHead: true,\n lane: toLaneObj,\n });\n await this.importer.importHeadArtifactsFromLane(fromLaneObj, true);\n await this.throwIfNotUpToDate(fromLaneId, toLaneId);\n const repo = this.scope.legacyScope.objects;\n // loop through all components, make sure they're all ahead of main (it might not be on main yet).\n // then, change the version object to include an extra parent to point to the main.\n // then, change the component object head to point to this changed version\n const mergedPreviously: BitId[] = [];\n const mergedNow: BitId[] = [];\n const shouldSquash = !toLaneObj && !options.noSquash; // only when merging to main we squash.\n const bitObjectsPerComp = await pMapSeries(idsToMerge, async (id) => {\n const modelComponent = await this.scope.legacyScope.getModelComponent(id);\n const fromVersionObj = await modelComponent.loadVersion(id.version as string, repo);\n if (fromVersionObj.isRemoved()) return undefined;\n const fromLaneHead = modelComponent.getRef(id.version as string);\n if (!fromLaneHead) throw new Error(`lane head must be defined for ${id.toString()}`);\n const toLaneHead = toLaneObj ? toLaneObj.getComponent(id)?.head : modelComponent.head || null;\n if (toLaneHead?.isEqual(fromLaneHead)) {\n mergedPreviously.push(id);\n return undefined;\n }\n // this might be confusing, we pass the toLaneHead as the sourceHead and the fromLaneHead as the targetHead.\n // this is because normally, in the workspace, we merge another lane (target) into the current lane (source).\n // so effectively, in the workspace, we merge fromLane=target into toLane=source.\n const divergeData = await getDivergeData({\n repo,\n modelComponent,\n sourceHead: toLaneHead,\n targetHead: fromLaneHead,\n });\n const modifiedVersion = shouldSquash\n ? squashOneComp(DEFAULT_LANE, fromLaneId, id, divergeData, fromVersionObj)\n : undefined;\n const objects: BitObject[] = [];\n if (modifiedVersion) objects.push(modifiedVersion);\n if (toLaneObj) {\n toLaneObj.addComponent({ id: id.changeVersion(undefined), head: fromLaneHead });\n } else {\n modelComponent.setHead(fromLaneHead);\n objects.push(modelComponent);\n }\n mergedNow.push(id);\n return { id, objects };\n });\n const bitObjects = compact(bitObjectsPerComp).map((b) => b.objects);\n const bitObjectsFlat = bitObjects.flat();\n if (toLaneObj) bitObjectsFlat.push(toLaneObj);\n await repo.writeObjectsToTheFS(bitObjectsFlat);\n let exportedIds: string[] = [];\n if (options.push) {\n const ids = compact(bitObjectsPerComp).map((b) => b.id);\n const bitIds = BitIds.fromArray(ids);\n const { exported } = await this.exporter.exportMany({\n scope: this.scope.legacyScope,\n ids: shouldSquash ? bitIds : new BitIds(),\n idsWithFutureScope: shouldSquash ? bitIds : new BitIds(),\n laneObject: toLaneObj,\n allVersions: false,\n // no need to export anything else other than the head. the normal calculation of what to export won't apply here\n // as it is done from the scope.\n exportHeadsOnly: shouldSquash,\n // all artifacts must be pushed. they're all considered \"external\" in this case, because it's running from a\n // bare-scope, but we don't want to ignore them, otherwise, they'll be missing from the component-scopes.\n ignoreMissingExternalArtifacts: false,\n });\n exportedIds = exported.map((id) => id.toString());\n }\n\n return {\n mergedPreviously: mergedPreviously.map((id) => id.toString()),\n mergedNow: mergedNow.map((id) => id.toString()),\n exportedIds,\n };\n }\n private async throwIfNotUpToDate(fromLaneId: LaneId, toLaneId: LaneId) {\n const status = await this.lanes.diffStatus(fromLaneId, toLaneId, { skipChanges: true });\n const compsNotUpToDate = status.componentsStatus.filter((s) => !s.upToDate);\n if (compsNotUpToDate.length) {\n throw new Error(`unable to merge, the following components are not up-to-date:\n${compsNotUpToDate.map((s) => s.componentId.toString()).join('\\n')}`);\n }\n }\n\n static slots = [];\n static dependencies = [\n LanesAspect,\n CLIAspect,\n WorkspaceAspect,\n MergingAspect,\n LoggerAspect,\n RemoveAspect,\n ScopeAspect,\n ExportAspect,\n ImporterAspect,\n ];\n static runtime = MainRuntime;\n\n static async provider([lanes, cli, workspace, merging, loggerMain, remove, scope, exporter, importer]: [\n LanesMain,\n CLIMain,\n Workspace,\n MergingMain,\n LoggerMain,\n RemoveMain,\n ScopeMain,\n ExportMain,\n ImporterMain\n ]) {\n const logger = loggerMain.createLogger(MergeLanesAspect.id);\n const lanesCommand = cli.getCommand('lane');\n const mergeLanesMain = new MergeLanesMain(workspace, merging, lanes, logger, remove, scope, exporter, importer);\n lanesCommand?.commands?.push(new MergeLaneCmd(mergeLanesMain));\n cli.register(new MergeLaneFromScopeCmd(mergeLanesMain));\n return mergeLanesMain;\n }\n}\n\nasync function filterComponentsStatus(\n allComponentsStatus: ComponentMergeStatus[],\n compIdsToKeep: ComponentID[],\n allBitIds: BitId[],\n workspace: Workspace,\n includeDeps = false,\n otherLane?: Lane, // lane that gets merged into the current lane. if not provided, it's main that gets merged into the current lane\n shouldSquash?: boolean\n): Promise<ComponentMergeStatus[]> {\n const bitIdsFromPattern = BitIds.fromArray(compIdsToKeep.map((c) => c._legacy));\n const bitIdsNotFromPattern = allBitIds.filter((bitId) => !bitIdsFromPattern.hasWithoutVersion(bitId));\n const filteredComponentStatus: ComponentMergeStatus[] = [];\n const depsToAdd: BitId[] = [];\n await pMapSeries(compIdsToKeep, async (compId) => {\n const fromStatus = allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(compId._legacy));\n if (!fromStatus) {\n throw new Error(`filterComponentsStatus: unable to find ${compId.toString()} in component-status`);\n }\n filteredComponentStatus.push(fromStatus);\n if (fromStatus.unmergedMessage) {\n return;\n }\n if (!otherLane) {\n // if merging main, no need to check whether the deps are included in the pattern.\n return;\n }\n const { divergeData } = fromStatus;\n if (!divergeData) {\n throw new Error(`filterComponentsStatus: unable to find divergeData for ${compId.toString()}`);\n }\n let targetVersions = divergeData.snapsOnTargetOnly;\n if (!targetVersions.length) {\n return;\n }\n const modelComponent = await workspace.consumer.scope.getModelComponent(compId._legacy);\n if (shouldSquash) {\n // no need to check all versions, we merge only the head\n const headOnTarget = otherLane ? otherLane.getComponent(compId._legacy)?.head : modelComponent.head;\n if (!headOnTarget) {\n throw new Error(`filterComponentsStatus: unable to find head for ${compId.toString()}`);\n }\n targetVersions = [headOnTarget];\n }\n\n await pMapSeries(targetVersions, async (remoteVersion) => {\n const versionObj = await modelComponent.loadVersion(remoteVersion.toString(), workspace.consumer.scope.objects);\n const flattenedDeps = versionObj.getAllFlattenedDependencies();\n const depsNotIncludeInPattern = flattenedDeps.filter((id) =>\n bitIdsNotFromPattern.find((bitId) => bitId.isEqualWithoutVersion(id))\n );\n if (!depsNotIncludeInPattern.length) {\n return;\n }\n const depsOnLane: BitId[] = [];\n await Promise.all(\n depsNotIncludeInPattern.map(async (dep) => {\n const isOnLane = await workspace.consumer.scope.isIdOnLane(dep, otherLane);\n if (isOnLane) {\n depsOnLane.push(dep);\n }\n })\n );\n if (!depsOnLane.length) {\n return;\n }\n if (!includeDeps) {\n throw new BitError(`unable to merge ${compId.toString()}.\nit has (in version ${remoteVersion.toString()}) the following dependencies which were not included in the pattern. consider adding \"--include-deps\" flag\n${depsOnLane.map((d) => d.toString()).join('\\n')}`);\n }\n depsToAdd.push(...depsOnLane);\n });\n });\n if (depsToAdd.length) {\n const depsUniq = BitIds.uniqFromArray(depsToAdd);\n depsUniq.forEach((id) => {\n const fromStatus = allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(id));\n if (!fromStatus) {\n throw new Error(`filterComponentsStatus: unable to find ${id.toString()} in component-status`);\n }\n filteredComponentStatus.push(fromStatus);\n });\n }\n return filteredComponentStatus;\n}\n\nasync function squashSnaps(allComponentsStatus: ComponentMergeStatus[], otherLaneId: LaneId, consumer: Consumer) {\n const currentLaneName = consumer.getCurrentLaneId().name;\n const succeededComponents = allComponentsStatus.filter((c) => !c.unmergedMessage);\n await Promise.all(\n succeededComponents.map(async ({ id, divergeData, componentFromModel }) => {\n if (!divergeData) {\n throw new Error(`unable to squash. divergeData is missing from ${id.toString()}`);\n }\n const modifiedComp = squashOneComp(currentLaneName, otherLaneId, id, divergeData, componentFromModel);\n if (modifiedComp) {\n consumer.scope.objects.add(modifiedComp);\n const modelComponent = await consumer.scope.getModelComponent(id);\n const versionHistory = await modelComponent.updateRebasedVersionHistory(consumer.scope.objects, [modifiedComp]);\n if (versionHistory) consumer.scope.objects.add(versionHistory);\n }\n })\n );\n}\n\n/**\n * returns Version object if it was modified. otherwise, returns undefined\n */\nfunction squashOneComp(\n currentLaneName: string,\n otherLaneId: LaneId,\n id: BitId,\n divergeData: SnapsDistance,\n componentFromModel?: Version\n): Version | undefined {\n if (divergeData.isDiverged()) {\n throw new BitError(`unable to squash because ${id.toString()} is diverged in history.\nconsider switching to \"${\n otherLaneId.name\n }\" first, merging \"${currentLaneName}\", then switching back to \"${currentLaneName}\" and merging \"${\n otherLaneId.name\n }\"\nalternatively, use \"--no-squash\" flag to keep the entire history of \"${otherLaneId.name}\"`);\n }\n if (divergeData.isSourceAhead()) {\n // nothing to do. current is ahead, nothing to merge. (it was probably filtered out already as a \"failedComponent\")\n return undefined;\n }\n if (!divergeData.isTargetAhead()) {\n // nothing to do. current and remote are the same, nothing to merge. (it was probably filtered out already as a \"failedComponent\")\n return undefined;\n }\n // remote is ahead and was not diverge.\n const remoteSnaps = divergeData.snapsOnTargetOnly;\n if (remoteSnaps.length === 0) {\n throw new Error(`remote is ahead but it has no snaps. it's impossible`);\n }\n // no need to check this case. even if it has only one snap ahead, we want to do the \"squash\", and run \"addAsOnlyParent\"\n // to make sure it doesn't not have two parents.\n // if (remoteSnaps.length === 1) {\n // // nothing to squash. it has only one commit.\n // return;\n // }\n if (!componentFromModel) {\n throw new Error('unable to squash, the componentFromModel is missing');\n }\n\n const currentParents = componentFromModel.parents;\n\n // do the squash.\n if (divergeData.commonSnapBeforeDiverge) {\n componentFromModel.addAsOnlyParent(divergeData.commonSnapBeforeDiverge);\n } else {\n // there is no commonSnapBeforeDiverge. the local has no snaps, all are remote, no need for parents. keep only head.\n componentFromModel.parents.forEach((ref) => componentFromModel.removeParent(ref));\n }\n componentFromModel.setSquashed({ previousParents: currentParents, laneId: otherLaneId });\n return componentFromModel;\n}\n\nMergeLanesAspect.addRuntime(MergeLanesMain);\n\nexport default MergeLanesMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA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IAChC;IACA,OAAO1M,SAAS;EAClB;EACA;EACA,MAAM2M,WAAW,GAAGrF,WAAW,CAAC6D,iBAAiB;EACjD,IAAIwB,WAAW,CAACjK,MAAM,KAAK,CAAC,EAAE;IAC5B,MAAM,IAAIlC,KAAK,CAAE,sDAAqD,CAAC;EACzE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,IAAI,CAAC2L,kBAAkB,EAAE;IACvB,MAAM,IAAI3L,KAAK,CAAC,qDAAqD,CAAC;EACxE;EAEA,MAAMoM,cAAc,GAAGT,kBAAkB,CAACU,OAAO;;EAEjD;EACA,IAAIvF,WAAW,CAACwF,uBAAuB,EAAE;IACvCX,kBAAkB,CAACY,eAAe,CAACzF,WAAW,CAACwF,uBAAuB,CAAC;EACzE,CAAC,MAAM;IACL;IACAX,kBAAkB,CAACU,OAAO,CAACxL,OAAO,CAAE2L,GAAG,IAAKb,kBAAkB,CAACc,YAAY,CAACD,GAAG,CAAC,CAAC;EACnF;EACAb,kBAAkB,CAACe,WAAW,CAAC;IAAEC,eAAe,EAAEP,cAAc;IAAEtK,MAAM,EAAEhD;EAAY,CAAC,CAAC;EACxF,OAAO6M,kBAAkB;AAC3B;AAEA5C,8BAAgB,CAAC6D,UAAU,CAAC/P,cAAc,CAAC;AAAC,eAE7BA,cAAc;AAAA"}
1
+ {"version":3,"names":["MergeLanesMain","constructor","workspace","merging","lanes","logger","remove","scope","exporter","importer","mergeLane","laneName","options","BitError","consumer","mergeStrategy","noSnap","tag","snapMessage","existingOnWorkspaceOnly","build","keepReadme","noSquash","pattern","includeDeps","skipDependencyInstallation","resolveUnrelated","ignoreConfigChanges","skipFetch","currentLaneId","getCurrentLaneId","isDefault","toString","otherLaneId","getParsedLaneId","isEqual","currentLane","loadLane","isDefaultLane","getOtherLane","importObjectsFromMainIfExist","toBitIds","toVersionLatest","undefined","lane","shouldFetch","isNew","otherLane","fetchLaneWithItsComponents","importHeadArtifactsFromLane","getBitIds","Error","DEFAULT_LANE","getMainIdsToMerge","bitIds","debug","allComponentsStatus","getMergeStatus","shouldSquash","componentIds","resolveMultipleComponentIds","compIdsFromPattern","filterIdsFromPoolIdsByPattern","filterComponentsStatus","forEach","bitId","find","c","id","isEqualWithoutVersion","push","unmergedLegitimately","unmergedMessage","workspaceIds","listIds","filter","_legacy","throwForFailures","squashSnaps","mergeResults","mergeSnaps","laneId","localLane","mergedSuccessfully","failedComponents","length","every","failedComponent","unchangedLegitimately","deleteResults","readmeComponent","readmeComponentId","changeVersion","head","hash","componentsPattern","force","remote","track","deleteFiles","fromLane","readmeResult","name","configMergeResults","map","configMergeResult","onDestroy","compact","failureMsgs","chalk","bold","red","join","laneIds","mainNotOnLane","ids","hasScope","modelComponents","Promise","all","legacyScope","getModelComponent","toBitId","mergeFromScope","toLane","fromLaneId","LaneId","parse","fromLaneObj","importLaneObject","toLaneId","getDefaultLaneId","toLaneObj","fromLaneBitIds","getIdsToMerge","laneCompIds","BitIds","fromArray","idsToMerge","scopeComponentsImporter","ScopeComponentsImporter","getInstance","importManyDeltaWithoutDeps","fromHead","ignoreMissingHead","throwIfNotUpToDate","repo","objects","mergedPreviously","mergedNow","log","getLogForSquash","bitObjectsPerComp","pMapSeries","modelComponent","fromVersionObj","loadVersion","version","isRemoved","fromLaneHead","getRef","toLaneHead","getComponent","divergeData","getDivergeData","sourceHead","targetHead","modifiedVersion","squashOneComp","addComponent","setHead","bitObjects","b","bitObjectsFlat","flat","writeObjectsToTheFS","exportedIds","exported","exportMany","idsWithFutureScope","laneObject","allVersions","exportHeadsOnly","ignoreMissingExternalArtifacts","status","diffStatus","skipChanges","compsNotUpToDate","componentsStatus","s","upToDate","componentId","provider","cli","loggerMain","createLogger","MergeLanesAspect","lanesCommand","getCommand","mergeLanesMain","commands","MergeLaneCmd","register","MergeLaneFromScopeCmd","LanesAspect","CLIAspect","WorkspaceAspect","MergingAspect","LoggerAspect","RemoveAspect","ScopeAspect","ExportAspect","ImporterAspect","MainRuntime","compIdsToKeep","allBitIds","bitIdsFromPattern","bitIdsNotFromPattern","hasWithoutVersion","filteredComponentStatus","depsToAdd","compId","fromStatus","targetVersions","snapsOnTargetOnly","headOnTarget","remoteVersion","versionObj","flattenedDeps","getAllFlattenedDependencies","depsNotIncludeInPattern","depsOnLane","dep","isOnLane","isIdOnLane","d","depsUniq","uniqFromArray","basicLog","getBasicLog","message","currentLaneName","succeededComponents","componentFromModel","modifiedComp","add","versionHistory","updateRebasedVersionHistory","isDiverged","isSourceAhead","isTargetAhead","remoteSnaps","currentParents","parents","commonSnapBeforeDiverge","addAsOnlyParent","ref","removeParent","setSquashed","previousParents","addRuntime"],"sources":["merge-lanes.main.runtime.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport ImporterAspect, { ImporterMain } from '@teambit/importer';\nimport { LanesAspect, LanesMain } from '@teambit/lanes';\nimport MergingAspect, {\n MergingMain,\n ComponentMergeStatus,\n ConfigMergeResult,\n ApplyVersionResults,\n} from '@teambit/merging';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport chalk from 'chalk';\nimport { getBasicLog } from '@teambit/snapping';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { Log } from '@teambit/legacy/dist/scope/models/version';\nimport pMapSeries from 'p-map-series';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport ScopeComponentsImporter from '@teambit/legacy/dist/scope/component-ops/scope-components-importer';\nimport { ComponentID } from '@teambit/component-id';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport { Lane, Version } from '@teambit/legacy/dist/scope/models';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { SnapsDistance } from '@teambit/legacy/dist/scope/component-ops/snaps-distance';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { compact } from 'lodash';\nimport { ExportAspect, ExportMain } from '@teambit/export';\nimport { BitObject } from '@teambit/legacy/dist/scope/objects';\nimport { getDivergeData } from '@teambit/legacy/dist/scope/component-ops/get-diverge-data';\nimport { MergeLanesAspect } from './merge-lanes.aspect';\nimport { MergeLaneCmd } from './merge-lane.cmd';\nimport { MergeLaneFromScopeCmd } from './merge-lane-from-scope.cmd';\n\nexport type MergeLaneOptions = {\n mergeStrategy: MergeStrategy;\n noSnap: boolean;\n snapMessage: string;\n existingOnWorkspaceOnly: boolean;\n build: boolean;\n keepReadme: boolean;\n noSquash: boolean;\n tag?: boolean;\n pattern?: string;\n includeDeps?: boolean;\n skipDependencyInstallation?: boolean;\n resolveUnrelated?: MergeStrategy;\n ignoreConfigChanges?: boolean;\n skipFetch?: boolean;\n};\n\nexport class MergeLanesMain {\n constructor(\n private workspace: Workspace | undefined,\n private merging: MergingMain,\n private lanes: LanesMain,\n private logger: Logger,\n private remove: RemoveMain,\n private scope: ScopeMain,\n private exporter: ExportMain,\n private importer: ImporterMain\n ) {}\n\n async mergeLane(\n laneName: string,\n options: MergeLaneOptions\n ): Promise<{ mergeResults: ApplyVersionResults; deleteResults: any; configMergeResults: ConfigMergeResult[] }> {\n if (!this.workspace) {\n throw new BitError(`unable to merge a lane outside of Bit workspace`);\n }\n const consumer = this.workspace.consumer;\n\n const {\n mergeStrategy,\n noSnap,\n tag,\n snapMessage,\n existingOnWorkspaceOnly,\n build,\n keepReadme,\n noSquash,\n pattern,\n includeDeps,\n skipDependencyInstallation,\n resolveUnrelated,\n ignoreConfigChanges,\n skipFetch,\n } = options;\n\n const currentLaneId = consumer.getCurrentLaneId();\n if (tag && !currentLaneId.isDefault()) {\n throw new BitError(`--tag only possible when on main. currently checked out to ${currentLaneId.toString()}`);\n }\n const otherLaneId = await consumer.getParsedLaneId(laneName);\n if (otherLaneId.isEqual(currentLaneId)) {\n throw new BitError(\n `unable to merge lane \"${otherLaneId.toString()}\", you're already at this lane. to get updates, simply run \"bit checkout head\"`\n );\n }\n if (resolveUnrelated && currentLaneId.isDefault()) {\n throw new BitError(\n `unable to resolve unrelated when on main. switch to ${otherLaneId.toString()} and run \"bit lane merge main --resolve-unrelated\"`\n );\n }\n const currentLane = currentLaneId.isDefault() ? null : await consumer.scope.loadLane(currentLaneId);\n const isDefaultLane = otherLaneId.isDefault();\n const getOtherLane = async () => {\n if (isDefaultLane) {\n if (!skipFetch) {\n await this.importer.importObjectsFromMainIfExist(currentLane?.toBitIds().toVersionLatest() || []);\n }\n return undefined;\n }\n let lane = await consumer.scope.loadLane(otherLaneId);\n const shouldFetch = !lane || (!skipFetch && !lane.isNew);\n if (shouldFetch) {\n // don't assign `lane` to the result of this command. otherwise, if you have local snaps, it'll ignore them and use the remote-lane.\n const otherLane = await this.lanes.fetchLaneWithItsComponents(otherLaneId);\n\n await this.importer.importHeadArtifactsFromLane(otherLane, true);\n\n lane = await consumer.scope.loadLane(otherLaneId);\n }\n return lane;\n };\n const otherLane = await getOtherLane();\n const getBitIds = async () => {\n if (isDefaultLane) {\n if (!currentLane) throw new Error(`unable to merge ${DEFAULT_LANE}, the current lane was not found`);\n return this.getMainIdsToMerge(currentLane);\n }\n if (!otherLane) throw new Error(`lane must be defined for non-default`);\n return otherLane.toBitIds();\n };\n const bitIds = await getBitIds();\n this.logger.debug(`merging the following bitIds: ${bitIds.toString()}`);\n\n let allComponentsStatus = await this.merging.getMergeStatus(bitIds, currentLane, otherLane, {\n resolveUnrelated,\n ignoreConfigChanges,\n });\n const shouldSquash = currentLaneId.isDefault() && !noSquash;\n\n if (pattern) {\n const componentIds = await this.workspace.resolveMultipleComponentIds(bitIds);\n const compIdsFromPattern = this.workspace.scope.filterIdsFromPoolIdsByPattern(pattern, componentIds);\n allComponentsStatus = await filterComponentsStatus(\n allComponentsStatus,\n compIdsFromPattern,\n bitIds,\n this.workspace,\n includeDeps,\n otherLane || undefined,\n shouldSquash\n );\n bitIds.forEach((bitId) => {\n if (!allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(bitId))) {\n allComponentsStatus.push({ id: bitId, unmergedLegitimately: true, unmergedMessage: `excluded by pattern` });\n }\n });\n }\n if (existingOnWorkspaceOnly) {\n const workspaceIds = await this.workspace.listIds();\n const compIdsFromPattern = workspaceIds.filter((id) =>\n allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(id._legacy))\n );\n allComponentsStatus = await filterComponentsStatus(\n allComponentsStatus,\n compIdsFromPattern,\n bitIds,\n this.workspace,\n includeDeps,\n otherLane || undefined,\n shouldSquash\n );\n bitIds.forEach((bitId) => {\n if (!allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(bitId))) {\n allComponentsStatus.push({ id: bitId, unmergedLegitimately: true, unmergedMessage: `not in the workspace` });\n }\n });\n }\n\n throwForFailures();\n\n if (shouldSquash) {\n await squashSnaps(allComponentsStatus, otherLaneId, consumer);\n }\n\n const mergeResults = await this.merging.mergeSnaps({\n mergeStrategy,\n allComponentsStatus,\n laneId: otherLaneId,\n localLane: currentLane,\n noSnap,\n tag,\n snapMessage,\n build,\n skipDependencyInstallation,\n });\n\n const mergedSuccessfully =\n !mergeResults.failedComponents ||\n mergeResults.failedComponents.length === 0 ||\n mergeResults.failedComponents.every((failedComponent) => failedComponent.unchangedLegitimately);\n\n let deleteResults = {};\n\n if (!keepReadme && otherLane && otherLane.readmeComponent && mergedSuccessfully) {\n const readmeComponentId = otherLane.readmeComponent.id\n .changeVersion(otherLane.readmeComponent?.head?.hash)\n .toString();\n\n deleteResults = await this.remove.remove({\n componentsPattern: readmeComponentId,\n force: false,\n remote: false,\n track: false,\n deleteFiles: true,\n fromLane: false,\n });\n } else if (otherLane && !otherLane.readmeComponent) {\n deleteResults = { readmeResult: `\\nlane ${otherLane.name} doesn't have a readme component` };\n }\n const configMergeResults = allComponentsStatus.map((c) => c.configMergeResult);\n\n await this.workspace.consumer.onDestroy();\n\n return { mergeResults, deleteResults, configMergeResults: compact(configMergeResults) };\n\n function throwForFailures() {\n const failedComponents = allComponentsStatus.filter((c) => c.unmergedMessage && !c.unmergedLegitimately);\n if (failedComponents.length) {\n const failureMsgs = failedComponents\n .map(\n (failedComponent) =>\n `${chalk.bold(failedComponent.id.toString())} - ${chalk.red(failedComponent.unmergedMessage as string)}`\n )\n .join('\\n');\n throw new BitError(`unable to merge due to the following failures:\\n${failureMsgs}`);\n }\n }\n }\n\n private async getMainIdsToMerge(lane: Lane) {\n const laneIds = lane.toBitIds();\n if (!this.workspace) {\n throw new BitError(`getMainIdsToMerge needs workspace`);\n }\n const workspaceIds = (await this.workspace.listIds()).map((id) => id._legacy);\n const mainNotOnLane = workspaceIds.filter((id) => !laneIds.find((laneId) => laneId.isEqualWithoutVersion(id)));\n const ids = [...laneIds, ...mainNotOnLane].filter((id) => id.hasScope());\n const modelComponents = await Promise.all(ids.map((id) => this.scope.legacyScope.getModelComponent(id)));\n return compact(\n modelComponents.map((c) => {\n if (!c.head) return null; // probably the component was never merged to main\n return c.toBitId().changeVersion(c.head.toString());\n })\n );\n }\n\n async mergeFromScope(\n fromLane: string,\n toLane: string,\n options: Partial<MergeLaneOptions> & { push?: boolean }\n ): Promise<{\n mergedPreviously: string[];\n mergedNow: string[];\n exportedIds: string[];\n }> {\n if (this.workspace) {\n throw new BitError(\n `unable to run this command from a workspace, please create a new bare-scope and run it from there`\n );\n }\n const fromLaneId = LaneId.parse(fromLane);\n const fromLaneObj = await this.lanes.importLaneObject(fromLaneId);\n const toLaneId = toLane === DEFAULT_LANE ? this.lanes.getDefaultLaneId() : LaneId.parse(toLane);\n const toLaneObj = toLaneId.isDefault() ? undefined : await this.lanes.importLaneObject(toLaneId);\n const fromLaneBitIds = fromLaneObj.toBitIds();\n const getIdsToMerge = async (): Promise<BitIds> => {\n if (!options.pattern) return fromLaneBitIds;\n const laneCompIds = await this.scope.resolveMultipleComponentIds(fromLaneBitIds);\n const ids = this.scope.filterIdsFromPoolIdsByPattern(options.pattern, laneCompIds);\n return BitIds.fromArray(ids.map((id) => id._legacy));\n };\n const idsToMerge = await getIdsToMerge();\n const scopeComponentsImporter = ScopeComponentsImporter.getInstance(this.scope.legacyScope);\n await scopeComponentsImporter.importManyDeltaWithoutDeps({\n ids: idsToMerge,\n fromHead: true,\n lane: fromLaneObj,\n ignoreMissingHead: true,\n });\n // get their main/to-lane as well\n await scopeComponentsImporter.importManyDeltaWithoutDeps({\n ids: idsToMerge.toVersionLatest(),\n fromHead: true,\n ignoreMissingHead: true,\n lane: toLaneObj,\n });\n await this.importer.importHeadArtifactsFromLane(fromLaneObj, true);\n await this.throwIfNotUpToDate(fromLaneId, toLaneId);\n const repo = this.scope.legacyScope.objects;\n // loop through all components, make sure they're all ahead of main (it might not be on main yet).\n // then, change the version object to include an extra parent to point to the main.\n // then, change the component object head to point to this changed version\n const mergedPreviously: BitId[] = [];\n const mergedNow: BitId[] = [];\n const shouldSquash = !toLaneObj && !options.noSquash; // only when merging to main we squash.\n const log = await getLogForSquash(fromLaneId);\n const bitObjectsPerComp = await pMapSeries(idsToMerge, async (id) => {\n const modelComponent = await this.scope.legacyScope.getModelComponent(id);\n const fromVersionObj = await modelComponent.loadVersion(id.version as string, repo);\n if (fromVersionObj.isRemoved()) return undefined;\n const fromLaneHead = modelComponent.getRef(id.version as string);\n if (!fromLaneHead) throw new Error(`lane head must be defined for ${id.toString()}`);\n const toLaneHead = toLaneObj ? toLaneObj.getComponent(id)?.head : modelComponent.head || null;\n if (toLaneHead?.isEqual(fromLaneHead)) {\n mergedPreviously.push(id);\n return undefined;\n }\n // this might be confusing, we pass the toLaneHead as the sourceHead and the fromLaneHead as the targetHead.\n // this is because normally, in the workspace, we merge another lane (target) into the current lane (source).\n // so effectively, in the workspace, we merge fromLane=target into toLane=source.\n const divergeData = await getDivergeData({\n repo,\n modelComponent,\n sourceHead: toLaneHead,\n targetHead: fromLaneHead,\n });\n const modifiedVersion = shouldSquash\n ? squashOneComp(DEFAULT_LANE, fromLaneId, id, divergeData, log, fromVersionObj)\n : undefined;\n const objects: BitObject[] = [];\n if (modifiedVersion) objects.push(modifiedVersion);\n if (toLaneObj) {\n toLaneObj.addComponent({ id: id.changeVersion(undefined), head: fromLaneHead });\n } else {\n modelComponent.setHead(fromLaneHead);\n objects.push(modelComponent);\n }\n mergedNow.push(id);\n return { id, objects };\n });\n const bitObjects = compact(bitObjectsPerComp).map((b) => b.objects);\n const bitObjectsFlat = bitObjects.flat();\n if (toLaneObj) bitObjectsFlat.push(toLaneObj);\n await repo.writeObjectsToTheFS(bitObjectsFlat);\n let exportedIds: string[] = [];\n if (options.push) {\n const ids = compact(bitObjectsPerComp).map((b) => b.id);\n const bitIds = BitIds.fromArray(ids);\n const { exported } = await this.exporter.exportMany({\n scope: this.scope.legacyScope,\n ids: shouldSquash ? bitIds : new BitIds(),\n idsWithFutureScope: shouldSquash ? bitIds : new BitIds(),\n laneObject: toLaneObj,\n allVersions: false,\n // no need to export anything else other than the head. the normal calculation of what to export won't apply here\n // as it is done from the scope.\n exportHeadsOnly: shouldSquash,\n // all artifacts must be pushed. they're all considered \"external\" in this case, because it's running from a\n // bare-scope, but we don't want to ignore them, otherwise, they'll be missing from the component-scopes.\n ignoreMissingExternalArtifacts: false,\n });\n exportedIds = exported.map((id) => id.toString());\n }\n\n return {\n mergedPreviously: mergedPreviously.map((id) => id.toString()),\n mergedNow: mergedNow.map((id) => id.toString()),\n exportedIds,\n };\n }\n private async throwIfNotUpToDate(fromLaneId: LaneId, toLaneId: LaneId) {\n const status = await this.lanes.diffStatus(fromLaneId, toLaneId, { skipChanges: true });\n const compsNotUpToDate = status.componentsStatus.filter((s) => !s.upToDate);\n if (compsNotUpToDate.length) {\n throw new Error(`unable to merge, the following components are not up-to-date:\n${compsNotUpToDate.map((s) => s.componentId.toString()).join('\\n')}`);\n }\n }\n\n static slots = [];\n static dependencies = [\n LanesAspect,\n CLIAspect,\n WorkspaceAspect,\n MergingAspect,\n LoggerAspect,\n RemoveAspect,\n ScopeAspect,\n ExportAspect,\n ImporterAspect,\n ];\n static runtime = MainRuntime;\n\n static async provider([lanes, cli, workspace, merging, loggerMain, remove, scope, exporter, importer]: [\n LanesMain,\n CLIMain,\n Workspace,\n MergingMain,\n LoggerMain,\n RemoveMain,\n ScopeMain,\n ExportMain,\n ImporterMain\n ]) {\n const logger = loggerMain.createLogger(MergeLanesAspect.id);\n const lanesCommand = cli.getCommand('lane');\n const mergeLanesMain = new MergeLanesMain(workspace, merging, lanes, logger, remove, scope, exporter, importer);\n lanesCommand?.commands?.push(new MergeLaneCmd(mergeLanesMain));\n cli.register(new MergeLaneFromScopeCmd(mergeLanesMain));\n return mergeLanesMain;\n }\n}\n\nasync function filterComponentsStatus(\n allComponentsStatus: ComponentMergeStatus[],\n compIdsToKeep: ComponentID[],\n allBitIds: BitId[],\n workspace: Workspace,\n includeDeps = false,\n otherLane?: Lane, // lane that gets merged into the current lane. if not provided, it's main that gets merged into the current lane\n shouldSquash?: boolean\n): Promise<ComponentMergeStatus[]> {\n const bitIdsFromPattern = BitIds.fromArray(compIdsToKeep.map((c) => c._legacy));\n const bitIdsNotFromPattern = allBitIds.filter((bitId) => !bitIdsFromPattern.hasWithoutVersion(bitId));\n const filteredComponentStatus: ComponentMergeStatus[] = [];\n const depsToAdd: BitId[] = [];\n await pMapSeries(compIdsToKeep, async (compId) => {\n const fromStatus = allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(compId._legacy));\n if (!fromStatus) {\n throw new Error(`filterComponentsStatus: unable to find ${compId.toString()} in component-status`);\n }\n filteredComponentStatus.push(fromStatus);\n if (fromStatus.unmergedMessage) {\n return;\n }\n if (!otherLane) {\n // if merging main, no need to check whether the deps are included in the pattern.\n return;\n }\n const { divergeData } = fromStatus;\n if (!divergeData) {\n throw new Error(`filterComponentsStatus: unable to find divergeData for ${compId.toString()}`);\n }\n let targetVersions = divergeData.snapsOnTargetOnly;\n if (!targetVersions.length) {\n return;\n }\n const modelComponent = await workspace.consumer.scope.getModelComponent(compId._legacy);\n if (shouldSquash) {\n // no need to check all versions, we merge only the head\n const headOnTarget = otherLane ? otherLane.getComponent(compId._legacy)?.head : modelComponent.head;\n if (!headOnTarget) {\n throw new Error(`filterComponentsStatus: unable to find head for ${compId.toString()}`);\n }\n targetVersions = [headOnTarget];\n }\n\n await pMapSeries(targetVersions, async (remoteVersion) => {\n const versionObj = await modelComponent.loadVersion(remoteVersion.toString(), workspace.consumer.scope.objects);\n const flattenedDeps = versionObj.getAllFlattenedDependencies();\n const depsNotIncludeInPattern = flattenedDeps.filter((id) =>\n bitIdsNotFromPattern.find((bitId) => bitId.isEqualWithoutVersion(id))\n );\n if (!depsNotIncludeInPattern.length) {\n return;\n }\n const depsOnLane: BitId[] = [];\n await Promise.all(\n depsNotIncludeInPattern.map(async (dep) => {\n const isOnLane = await workspace.consumer.scope.isIdOnLane(dep, otherLane);\n if (isOnLane) {\n depsOnLane.push(dep);\n }\n })\n );\n if (!depsOnLane.length) {\n return;\n }\n if (!includeDeps) {\n throw new BitError(`unable to merge ${compId.toString()}.\nit has (in version ${remoteVersion.toString()}) the following dependencies which were not included in the pattern. consider adding \"--include-deps\" flag\n${depsOnLane.map((d) => d.toString()).join('\\n')}`);\n }\n depsToAdd.push(...depsOnLane);\n });\n });\n if (depsToAdd.length) {\n const depsUniq = BitIds.uniqFromArray(depsToAdd);\n depsUniq.forEach((id) => {\n const fromStatus = allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(id));\n if (!fromStatus) {\n throw new Error(`filterComponentsStatus: unable to find ${id.toString()} in component-status`);\n }\n filteredComponentStatus.push(fromStatus);\n });\n }\n return filteredComponentStatus;\n}\n\nasync function getLogForSquash(otherLaneId: LaneId) {\n const basicLog = await getBasicLog();\n const log = {\n ...basicLog,\n message: `squashed during merge from ${otherLaneId.toString()}`,\n };\n return log;\n}\n\nasync function squashSnaps(allComponentsStatus: ComponentMergeStatus[], otherLaneId: LaneId, consumer: Consumer) {\n const currentLaneName = consumer.getCurrentLaneId().name;\n const succeededComponents = allComponentsStatus.filter((c) => !c.unmergedMessage);\n const log = await getLogForSquash(otherLaneId);\n\n await Promise.all(\n succeededComponents.map(async ({ id, divergeData, componentFromModel }) => {\n if (!divergeData) {\n throw new Error(`unable to squash. divergeData is missing from ${id.toString()}`);\n }\n\n const modifiedComp = squashOneComp(currentLaneName, otherLaneId, id, divergeData, log, componentFromModel);\n if (modifiedComp) {\n consumer.scope.objects.add(modifiedComp);\n const modelComponent = await consumer.scope.getModelComponent(id);\n const versionHistory = await modelComponent.updateRebasedVersionHistory(consumer.scope.objects, [modifiedComp]);\n if (versionHistory) consumer.scope.objects.add(versionHistory);\n }\n })\n );\n}\n\n/**\n * returns Version object if it was modified. otherwise, returns undefined\n */\nfunction squashOneComp(\n currentLaneName: string,\n otherLaneId: LaneId,\n id: BitId,\n divergeData: SnapsDistance,\n log: Log,\n componentFromModel?: Version\n): Version | undefined {\n if (divergeData.isDiverged()) {\n throw new BitError(`unable to squash because ${id.toString()} is diverged in history.\nconsider switching to \"${\n otherLaneId.name\n }\" first, merging \"${currentLaneName}\", then switching back to \"${currentLaneName}\" and merging \"${\n otherLaneId.name\n }\"\nalternatively, use \"--no-squash\" flag to keep the entire history of \"${otherLaneId.name}\"`);\n }\n if (divergeData.isSourceAhead()) {\n // nothing to do. current is ahead, nothing to merge. (it was probably filtered out already as a \"failedComponent\")\n return undefined;\n }\n if (!divergeData.isTargetAhead()) {\n // nothing to do. current and remote are the same, nothing to merge. (it was probably filtered out already as a \"failedComponent\")\n return undefined;\n }\n // remote is ahead and was not diverge.\n const remoteSnaps = divergeData.snapsOnTargetOnly;\n if (remoteSnaps.length === 0) {\n throw new Error(`remote is ahead but it has no snaps. it's impossible`);\n }\n // no need to check this case. even if it has only one snap ahead, we want to do the \"squash\", and run \"addAsOnlyParent\"\n // to make sure it doesn't not have two parents.\n // if (remoteSnaps.length === 1) {\n // // nothing to squash. it has only one commit.\n // return;\n // }\n if (!componentFromModel) {\n throw new Error('unable to squash, the componentFromModel is missing');\n }\n\n const currentParents = componentFromModel.parents;\n\n // do the squash.\n if (divergeData.commonSnapBeforeDiverge) {\n componentFromModel.addAsOnlyParent(divergeData.commonSnapBeforeDiverge);\n } else {\n // there is no commonSnapBeforeDiverge. the local has no snaps, all are remote, no need for parents. keep only head.\n componentFromModel.parents.forEach((ref) => componentFromModel.removeParent(ref));\n }\n componentFromModel.setSquashed({ previousParents: currentParents, laneId: otherLaneId }, log);\n return componentFromModel;\n}\n\nMergeLanesAspect.addRuntime(MergeLanesMain);\n\nexport default MergeLanesMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAoE;AAAA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M,IAAIlC,KAAK,CAAE,sDAAqD,CAAC;EACzE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,IAAI,CAACgM,kBAAkB,EAAE;IACvB,MAAM,IAAIhM,KAAK,CAAC,qDAAqD,CAAC;EACxE;EAEA,MAAMyM,cAAc,GAAGT,kBAAkB,CAACU,OAAO;;EAEjD;EACA,IAAI1F,WAAW,CAAC2F,uBAAuB,EAAE;IACvCX,kBAAkB,CAACY,eAAe,CAAC5F,WAAW,CAAC2F,uBAAuB,CAAC;EACzE,CAAC,MAAM;IACL;IACAX,kBAAkB,CAACU,OAAO,CAAC7L,OAAO,CAAEgM,GAAG,IAAKb,kBAAkB,CAACc,YAAY,CAACD,GAAG,CAAC,CAAC;EACnF;EACAb,kBAAkB,CAACe,WAAW,CAAC;IAAEC,eAAe,EAAEP,cAAc;IAAE3K,MAAM,EAAEhD;EAAY,CAAC,EAAEqH,GAAG,CAAC;EAC7F,OAAO6F,kBAAkB;AAC3B;AAEA/C,8BAAgB,CAACgE,UAAU,CAACpQ,cAAc,CAAC;AAAC,eAE7BA,cAAc;AAAA"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/merge-lanes",
3
- "version": "0.0.202",
3
+ "version": "0.0.203",
4
4
  "homepage": "https://bit.dev/teambit/lanes/merge-lanes",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.lanes",
8
8
  "name": "merge-lanes",
9
- "version": "0.0.202"
9
+ "version": "0.0.203"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -18,16 +18,17 @@
18
18
  "@teambit/component-id": "0.0.427",
19
19
  "@teambit/legacy-bit-id": "0.0.423",
20
20
  "@teambit/bit-error": "0.0.402",
21
- "@teambit/cli": "0.0.688",
22
- "@teambit/lane-id": "0.0.205",
23
- "@teambit/merging": "0.0.340",
24
- "@teambit/export": "0.0.1025",
25
- "@teambit/importer": "0.0.454",
26
- "@teambit/lanes": "0.0.597",
27
- "@teambit/logger": "0.0.781",
28
- "@teambit/remove": "0.0.202",
29
- "@teambit/scope": "0.0.1025",
30
- "@teambit/workspace": "0.0.1025"
21
+ "@teambit/cli": "0.0.689",
22
+ "@teambit/lane-id": "0.0.206",
23
+ "@teambit/merging": "0.0.341",
24
+ "@teambit/export": "0.0.1026",
25
+ "@teambit/importer": "0.0.455",
26
+ "@teambit/lanes": "0.0.598",
27
+ "@teambit/logger": "0.0.782",
28
+ "@teambit/remove": "0.0.203",
29
+ "@teambit/scope": "0.0.1026",
30
+ "@teambit/snapping": "0.0.341",
31
+ "@teambit/workspace": "0.0.1026"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@types/lodash": "4.14.165",
@@ -39,7 +40,7 @@
39
40
  "@types/testing-library__jest-dom": "5.9.5"
40
41
  },
41
42
  "peerDependencies": {
42
- "@teambit/legacy": "1.0.468",
43
+ "@teambit/legacy": "1.0.469",
43
44
  "react": "^16.8.0 || ^17.0.0",
44
45
  "react-dom": "^16.8.0 || ^17.0.0"
45
46
  },