@teambit/merge-lanes 1.0.1094 → 1.0.1095

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.
@@ -75,6 +75,14 @@ export declare class MergeLanesMain {
75
75
  mergedSuccessfullyIds: ComponentID[];
76
76
  conflicts: ConflictPerId[];
77
77
  }>;
78
+ /**
79
+ * A merged component head may reference, via its flattened dependencies, a non-head snap of another
80
+ * component — e.g. a deleted component that keeps pinning an older snap of a dependency that has
81
+ * since advanced. On lean lanes those snaps live only on the lane scope and are not fetched by the
82
+ * merge, so the heads-only export (used by `bit _merge-lane --push`) would leave them out and the
83
+ * remote's dependency-integrity check would fail. Import any such missing snap from the lane scope.
84
+ */
85
+ private importMissingReferencedDeps;
78
86
  private validateMergeFlags;
79
87
  private resolveMergeContext;
80
88
  /**
@@ -81,6 +81,20 @@ function _componentId() {
81
81
  };
82
82
  return data;
83
83
  }
84
+ function _objects() {
85
+ const data = require("@teambit/objects");
86
+ _objects = function () {
87
+ return data;
88
+ };
89
+ return data;
90
+ }
91
+ function _componentVersion() {
92
+ const data = require("@teambit/component-version");
93
+ _componentVersion = function () {
94
+ return data;
95
+ };
96
+ return data;
97
+ }
84
98
  function _pMapSeries() {
85
99
  const data = _interopRequireDefault(require("p-map-series"));
86
100
  _pMapSeries = function () {
@@ -360,6 +374,16 @@ class MergeLanesMain {
360
374
  mergedSuccessfullyIds.push(snappedId || c.id);
361
375
  }
362
376
  });
377
+
378
+ // A merged head may reference — via its flattened dependencies — a non-head snap of another
379
+ // component. When merging to main the squash removes intermediate snaps from each component's own
380
+ // chain, and a bare-scope merge (`bit _merge-lane --push`) exports heads only; in both cases such a
381
+ // referenced snap wouldn't be exported, and on lean lanes it lives only on the lane scope. Import
382
+ // any missing one now so the export can ship it (otherwise the remote's dependency-integrity check
383
+ // would reject the push). Not needed for non-squash workspace merges, which export full history.
384
+ if (shouldSquash || !this.workspace) {
385
+ await this.importMissingReferencedDeps(mergedSuccessfullyIds, otherLane);
386
+ }
363
387
  await this.workspace?.consumer.onDestroy(`lane-merge (${otherLaneId.name})`);
364
388
  return {
365
389
  mergeResults,
@@ -369,6 +393,80 @@ class MergeLanesMain {
369
393
  conflicts
370
394
  };
371
395
  }
396
+
397
+ /**
398
+ * A merged component head may reference, via its flattened dependencies, a non-head snap of another
399
+ * component — e.g. a deleted component that keeps pinning an older snap of a dependency that has
400
+ * since advanced. On lean lanes those snaps live only on the lane scope and are not fetched by the
401
+ * merge, so the heads-only export (used by `bit _merge-lane --push`) would leave them out and the
402
+ * remote's dependency-integrity check would fail. Import any such missing snap from the lane scope.
403
+ */
404
+ async importMissingReferencedDeps(ids, otherLane) {
405
+ // the missing snaps live on the lane scope (lean lanes). without the source lane we don't know
406
+ // where to fetch them from, so there's nothing to do.
407
+ if (!otherLane) return;
408
+ const legacyScope = this.scope.legacyScope;
409
+ // one existence check per unique hash — the same snap appears in the flattened list of many heads
410
+ const checkedHashes = new Set();
411
+ const candidateRefs = [];
412
+ await (0, _pMapSeries().default)(ids, async id => {
413
+ // strip the version — a versioned lookup (sources.get) returns undefined when that Version
414
+ // object is missing locally, and only the model is needed here anyway (for its head).
415
+ const modelComponent = await legacyScope.getModelComponentIfExist(id.changeVersion(undefined));
416
+ const head = modelComponent?.head;
417
+ if (!modelComponent || !head) return;
418
+ const headVersion = await modelComponent.loadVersion(head.toString(), legacyScope.objects, false);
419
+ if (!headVersion) return;
420
+ // flattened (not only direct) to mirror the remote-side check, which validates the flattened
421
+ // dependencies of every exported head (see throwForMissingLocalDependencies). cheap: only the
422
+ // heads are loaded and each unique hash is stat-ed once.
423
+ headVersion.getAllFlattenedDependencies().forEach(depId => {
424
+ // the remote check validates only same-scope deps (it skips `depId.scope !== scope.name`,
425
+ // cross-scope deps are fetched later by the remote itself), so same-scope is all the export
426
+ // needs to ship. this also filters out the vast majority of the flattened list.
427
+ if (depId.scope !== id.scope) return;
428
+ // only snaps can go missing this way — tags live on the home scope and are never squashed
429
+ // off a lane. (a tag version is a semver string, not an object hash, so Ref.from would be
430
+ // bogus for it anyway.)
431
+ if (!depId.version || !(0, _componentVersion().isSnap)(depId.version)) return;
432
+ if (checkedHashes.has(depId.version)) return;
433
+ checkedHashes.add(depId.version);
434
+ candidateRefs.push(_objects().Ref.from(depId.version));
435
+ });
436
+ });
437
+ // hasMultiple bounds the I/O concurrency, unlike a Promise.all of has() calls
438
+ const existingRefs = await legacyScope.objects.hasMultiple(candidateRefs);
439
+ const existingHashes = new Set(existingRefs.map(ref => ref.toString()));
440
+ const missingHashes = candidateRefs.map(ref => ref.toString()).filter(hash => !existingHashes.has(hash));
441
+ if (!missingHashes.length) return;
442
+ this.logger.debug(`importMissingReferencedDeps, importing ${missingHashes.length} non-head dependency snaps referenced by the merged heads from ${otherLane.scope}`);
443
+ // fetch the raw objects only (by hash, from the lane scope). importManyObjects does not touch
444
+ // component models/heads, so it can't leave a component pointing at a version whose object is
445
+ // missing — unlike a component-level import.
446
+ await legacyScope.scopeImporter.importManyObjects({
447
+ [otherLane.scope]: missingHashes
448
+ });
449
+ // a Version object references other objects the export must ship along with it — the file
450
+ // sources and the flattened-edges/dependencies-graph. fetch the missing ones too. (parents are
451
+ // not needed — the export doesn't collect them for these versions. artifacts are not needed
452
+ // either — the export tolerates missing artifacts for such non-local versions.)
453
+ const subRefs = [];
454
+ await (0, _pMapSeries().default)(missingHashes, async hash => {
455
+ const versionObject = await legacyScope.objects.load(_objects().Ref.from(hash));
456
+ if (!versionObject) return; // the hash could not be fetched after all
457
+ versionObject.refsWithOptions(false, false).forEach(ref => {
458
+ if (checkedHashes.has(ref.toString())) return;
459
+ checkedHashes.add(ref.toString());
460
+ subRefs.push(ref);
461
+ });
462
+ });
463
+ const existingSubRefs = new Set((await legacyScope.objects.hasMultiple(subRefs)).map(ref => ref.toString()));
464
+ const missingSubRefs = subRefs.map(ref => ref.toString()).filter(hash => !existingSubRefs.has(hash));
465
+ if (!missingSubRefs.length) return;
466
+ await legacyScope.scopeImporter.importManyObjects({
467
+ [otherLane.scope]: missingSubRefs
468
+ });
469
+ }
372
470
  validateMergeFlags(otherLaneId, currentLaneId, options) {
373
471
  const {
374
472
  tag,
@@ -1 +1 @@
1
- {"version":3,"names":["_bitError","data","require","_path","_interopRequireDefault","_cli","_importer","_lanes","_merging","_componentModules","_workspace","_configStore","_harmonyModules","_componentId","_pMapSeries","_scope","_laneId","_logger","_checkout","_remove","_lodash","_export","_mergeLanes","_mergeLane","_missingCompsToMerge","_mergeAbort","_lastMerged","_mergeMove","_express","_lanesCheckConflicts","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MergeLanesMain","constructor","workspace","merging","lanes","logger","remove","scope","exporter","importer","checkout","mergeLaneByCLI","laneName","options","BitError","currentLaneId","consumer","getCurrentLaneId","otherLaneId","getParsedLaneId","shouldIncludeUpdateDependents","undefined","mergeLane","validateMergeFlags","currentLane","otherLane","laneToFetchArtifactsFrom","idsToMerge","resolveMergeContext","mergeStrategy","noAutoSnap","noSnap","tag","snapMessage","existingOnWorkspaceOnly","build","loose","keepReadme","squash","noSquash","pattern","includeDeps","skipDependencyInstallation","resolveUnrelated","ignoreConfigChanges","throwIfNotUpToDate","detachHead","legacyScope","debug","toString","shouldSquash","isDefault","allComponentsStatus","getMergeStatus","handleTargetAheadAsDiverged","shouldMergeAspectsData","componentIds","compIdsFromPattern","filterIdsFromPoolIdsByPattern","filterComponentsStatus","forEach","bitId","find","c","id","isEqualWithoutVersion","push","unchangedLegitimately","unchangedMessage","workspaceIds","listIds","filter","throwForFailures","succeededComponents","squashSnaps","messageTitle","ids","map","importHeadArtifactsFromLane","lastMerged","LastMerged","snapshot","takeSnapshot","mergeResults","mergeSnaps","persistSnapshot","mergedSuccessfully","failedComponents","length","every","failedComponent","deleteResults","readmeComponent","readmeComponentId","changeVersion","head","hash","removeLocallyByIds","reasonForRemoval","readmeResult","configMergeResults","compact","configMergeResult","mergedSnapIds","ComponentIdList","fromArray","mergeSnapResults","snappedComponents","componentsWithConfigConflicts","hasConflicts","compIdStr","conflicts","mergedSuccessfullyIds","components","files","keys","filesStatus","f","FileStatus","manual","binaryConflict","config","includes","toStringWithoutVersion","snappedId","searchWithoutVersion","onDestroy","name","isEqual","skipFetch","excludeNonLaneComps","fetchCurrent","fetchLaneWithItsComponents","loadLane","isDefaultLane","getMainIdsToMerge","compIdList","toVersionLatest","importObjectsFromMainIfExist","getOtherLane","lane","shouldFetch","isNew","getBitIds","modelComponents","Promise","all","getModelComponent","toComponentId","Error","toComponentIdsIncludeUpdateDependents","toComponentIds","checkLaneForConflicts","sourceLaneIdStr","targetLaneIdStr","parseLaneIdFromString","modifiedFiles","conflict","isBinaryConflict","configData","co","configConflict","generateMergeConflictFile","filePath","mergeMove","newLaneName","OutsideWorkspaceError","lastMerge","restoreLaneObjectFromLastMerged","newLaneResult","createLane","abortLaneMerge","checkoutProps","mergeAbortOpts","getCurrentLane","compDirsToRemove","restoreFromLastMerged","_reloadConsumer","objects","unmergedComponents","removeAllComponents","write","configMergeFile","getConflictMergeFile","delete","checkoutResults","checkoutError","restoreMissingComponents","err","error","restoredItems","path","basename","bitMap","mapPath","join","includeNonLaneComps","includeUpdateDependents","DEFAULT_LANE","laneIds","isExported","mainNotOnLane","laneId","fromLaneId","toLaneId","status","diffStatus","skipChanges","compsNotUpToDate","componentsStatus","s","upToDate","componentId","provider","cli","loggerMain","configStore","express","createLogger","MergeLanesAspect","lanesCommand","getCommand","mergeLanesMain","commands","MergeLaneCmd","MergeAbortLaneCmd","MergeMoveLaneCmd","register","LanesCheckConflictsRoute","exports","LanesAspect","CLIAspect","WorkspaceAspect","MergingAspect","LoggerAspect","RemoveAspect","ScopeAspect","ExportAspect","ImporterAspect","CheckoutAspect","ConfigStoreAspect","ExpressAspect","MainRuntime","compIdsToKeep","allBitIds","bitIdsFromPattern","bitIdsNotFromPattern","hasWithoutVersion","filteredComponentStatus","depsToAdd","missingDepsFromHead","missingDepsFromHistory","versionsToCheckPerId","pMapSeries","compId","fromStatus","divergeData","targetVersions","snapsOnTargetOnly","modelComponent","headOnTarget","getCompHeadIncludeUpdateDependents","toImport","v","flat","scopeImporter","importWithoutDeps","cache","includeVersionHistory","reason","remoteVersion","versionObj","loadVersion","flattenedDeps","getAllFlattenedDependencies","depsNotIncludeInPattern","depsOnLane","dep","isOnLane","isIdOnLane","depsOnLaneStr","MissingCompsToMerge","uniq","depsWithoutVersion","d","depsUniqWithoutVersion","uniqFromArray","opts","currentLaneName","log","getLogForSquash","componentFromModel","modifiedComp","squashOneComp","add","versionHistory","updateRebasedVersionHistory","isDiverged","isSourceAhead","isTargetAhead","remoteSnaps","getAllMessages","importManyObjects","versionObjects","load","message","getFinalMessage","allMessage","allMessageStr","m","currentParents","parents","commonSnapBeforeDiverge","doSquash","addAsOnlyParent","getModelComponentIfExist","ref","removeParent","finalMessage","setSquashed","previousParents","addRuntime","_default"],"sources":["merge-lanes.main.runtime.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport path from 'path';\nimport type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport type { ImporterMain } from '@teambit/importer';\nimport { ImporterAspect } from '@teambit/importer';\nimport type { LanesMain } from '@teambit/lanes';\nimport { LanesAspect } from '@teambit/lanes';\nimport type { MergingMain, ComponentMergeStatus } from '@teambit/merging';\nimport type { ApplyVersionResults, MergeStrategy } from '@teambit/component.modules.merge-helper';\nimport { MergingAspect } from '@teambit/merging';\nimport { FileStatus } from '@teambit/component.modules.merge-helper';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect, OutsideWorkspaceError } from '@teambit/workspace';\nimport type { ConfigStoreMain } from '@teambit/config-store';\nimport { ConfigStoreAspect } from '@teambit/config-store';\nimport { getLogForSquash } from '@teambit/harmony.modules.get-basic-log';\nimport type { ComponentID } from '@teambit/component-id';\nimport { ComponentIdList } from '@teambit/component-id';\nimport type { Ref, Lane, Version, Log } from '@teambit/objects';\nimport pMapSeries from 'p-map-series';\nimport type { Scope as LegacyScope } from '@teambit/legacy.scope';\nimport type { ScopeMain } from '@teambit/scope';\nimport { ScopeAspect } from '@teambit/scope';\nimport type { LaneId } from '@teambit/lane-id';\nimport { DEFAULT_LANE } from '@teambit/lane-id';\nimport type { ConfigMergeResult } from '@teambit/config-merger';\nimport type { Logger, LoggerMain } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport type { CheckoutMain, CheckoutProps } from '@teambit/checkout';\nimport { CheckoutAspect, throwForFailures } from '@teambit/checkout';\nimport type { SnapsDistance } from '@teambit/component.snap-distance';\nimport type { RemoveMain } from '@teambit/remove';\nimport { RemoveAspect } from '@teambit/remove';\nimport { compact, uniq } from 'lodash';\nimport type { ExportMain } from '@teambit/export';\nimport { ExportAspect } from '@teambit/export';\nimport { MergeLanesAspect } from './merge-lanes.aspect';\nimport { MergeLaneCmd } from './merge-lane.cmd';\nimport { MissingCompsToMerge } from './exceptions/missing-comps-to-merge';\nimport type { MergeAbortOpts } from './merge-abort.cmd';\nimport { MergeAbortLaneCmd } from './merge-abort.cmd';\nimport { LastMerged } from './last-merged';\nimport { MergeMoveLaneCmd } from './merge-move.cmd';\nimport type { ExpressMain } from '@teambit/express';\nimport { ExpressAspect } from '@teambit/express';\nimport { LanesCheckConflictsRoute } from './lanes-check-conflicts.route';\n\nexport type MergeLaneOptions = {\n mergeStrategy: MergeStrategy;\n ours?: boolean;\n theirs?: boolean;\n noAutoSnap?: boolean;\n noSnap?: boolean;\n snapMessage?: string;\n existingOnWorkspaceOnly?: boolean;\n build?: boolean;\n keepReadme?: boolean;\n squash?: 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 excludeNonLaneComps?: boolean;\n shouldIncludeUpdateDependents?: boolean;\n throwIfNotUpToDate?: boolean; // relevant when merging from a scope\n fetchCurrent?: boolean; // needed when merging from a bare-scope (because it's empty)\n detachHead?: boolean;\n loose?: boolean; // relevant for --build, to allow build to succeed even if tasks like tests or lint fail\n};\nexport type ConflictPerId = { id: ComponentID; files: string[]; config?: boolean; configConflict?: string };\n\nexport class MergeLanesMain {\n constructor(\n private workspace: Workspace | undefined,\n private merging: MergingMain,\n readonly lanes: LanesMain,\n readonly logger: Logger,\n private remove: RemoveMain,\n private scope: ScopeMain,\n private exporter: ExportMain,\n private importer: ImporterMain,\n private checkout: CheckoutMain\n ) {}\n\n async mergeLaneByCLI(laneName: string, options: MergeLaneOptions) {\n if (!this.workspace) {\n throw new BitError(`unable to merge a lane outside of Bit workspace`);\n }\n const currentLaneId = this.workspace.consumer.getCurrentLaneId();\n const otherLaneId = await this.workspace.consumer.getParsedLaneId(laneName);\n // Hidden lane updateDependents must participate in every merge — otherwise main→lane refresh\n // (`bit lane merge main`) leaves the lane's cascaded entries stuck on their old main-head\n // base, and lane→main merge would push a partially-consistent lane state. The bare-scope\n // counterpart (`bit _merge-lane`, used by Ripple / the UI's \"update lane\" button) already\n // sets this; the workspace path was the missing leg.\n if (options.shouldIncludeUpdateDependents === undefined) {\n options.shouldIncludeUpdateDependents = true;\n }\n return this.mergeLane(otherLaneId, currentLaneId, options);\n }\n\n /**\n * merge otherLaneId into currentLaneId\n */\n async mergeLane(\n otherLaneId: LaneId,\n currentLaneId: LaneId,\n options: MergeLaneOptions\n ): Promise<{\n mergeResults: ApplyVersionResults;\n deleteResults: any;\n configMergeResults: ConfigMergeResult[];\n mergedSuccessfullyIds: ComponentID[];\n conflicts: ConflictPerId[];\n }> {\n this.validateMergeFlags(otherLaneId, currentLaneId, options);\n const { currentLane, otherLane, laneToFetchArtifactsFrom, idsToMerge } = await this.resolveMergeContext(\n otherLaneId,\n currentLaneId,\n options\n );\n\n const {\n mergeStrategy,\n noAutoSnap,\n noSnap,\n tag,\n snapMessage,\n existingOnWorkspaceOnly,\n build,\n loose,\n keepReadme,\n squash,\n noSquash,\n pattern,\n includeDeps,\n skipDependencyInstallation,\n resolveUnrelated,\n ignoreConfigChanges,\n throwIfNotUpToDate,\n detachHead,\n } = options;\n const legacyScope = this.scope.legacyScope;\n const consumer = this.workspace?.consumer;\n\n if (throwIfNotUpToDate) await this.throwIfNotUpToDate(otherLaneId, currentLaneId);\n\n this.logger.debug(`merging the following ids: ${idsToMerge.toString()}`);\n\n const shouldSquash = squash || (currentLaneId.isDefault() && !noSquash);\n let allComponentsStatus = await this.merging.getMergeStatus(\n idsToMerge,\n {\n resolveUnrelated,\n ignoreConfigChanges,\n shouldSquash,\n mergeStrategy,\n handleTargetAheadAsDiverged: noSnap,\n detachHead,\n shouldMergeAspectsData: true,\n },\n currentLane,\n otherLane\n );\n\n if (pattern) {\n const componentIds = idsToMerge;\n const compIdsFromPattern = await (this.workspace || this.scope).filterIdsFromPoolIdsByPattern(\n pattern,\n componentIds\n );\n allComponentsStatus = await filterComponentsStatus(\n allComponentsStatus,\n compIdsFromPattern,\n idsToMerge,\n legacyScope,\n includeDeps,\n otherLane,\n shouldSquash\n );\n idsToMerge.forEach((bitId) => {\n if (!allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(bitId))) {\n allComponentsStatus.push({ id: bitId, unchangedLegitimately: true, unchangedMessage: `excluded by pattern` });\n }\n });\n }\n if (existingOnWorkspaceOnly && this.workspace) {\n const workspaceIds = this.workspace.listIds();\n const compIdsFromPattern = workspaceIds.filter((id) =>\n allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(id))\n );\n allComponentsStatus = await filterComponentsStatus(\n allComponentsStatus,\n compIdsFromPattern,\n idsToMerge,\n legacyScope,\n includeDeps,\n otherLane,\n shouldSquash\n );\n idsToMerge.forEach((bitId) => {\n if (!allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(bitId))) {\n allComponentsStatus.push({\n id: bitId,\n unchangedLegitimately: true,\n unchangedMessage: `not in the workspace`,\n });\n }\n });\n }\n\n throwForFailures(allComponentsStatus);\n\n const succeededComponents = allComponentsStatus.filter((c) => !c.unchangedMessage);\n if (shouldSquash) {\n await squashSnaps(succeededComponents, currentLaneId, otherLaneId, legacyScope, {\n messageTitle: options.snapMessage,\n detachHead,\n });\n }\n\n if (laneToFetchArtifactsFrom) {\n const ids = allComponentsStatus.map((c) => c.id);\n await this.importer.importHeadArtifactsFromLane(laneToFetchArtifactsFrom, ids, true);\n }\n\n const lastMerged = consumer ? new LastMerged(this.scope, consumer, this.logger) : undefined;\n const snapshot = await lastMerged?.takeSnapshot(currentLane);\n\n const mergeResults = await this.merging.mergeSnaps({\n mergeStrategy,\n allComponentsStatus,\n otherLaneId,\n currentLane,\n noAutoSnap,\n noSnap,\n tag,\n snapMessage,\n build,\n skipDependencyInstallation,\n detachHead,\n loose,\n shouldSquash,\n });\n\n if (snapshot) await lastMerged?.persistSnapshot(snapshot);\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.changeVersion(otherLane.readmeComponent?.head?.hash);\n deleteResults = await this.remove.removeLocallyByIds([readmeComponentId], { reasonForRemoval: 'lane-merge' });\n } else if (otherLane && !otherLane.readmeComponent) {\n deleteResults = { readmeResult: '' };\n }\n const configMergeResults = compact(allComponentsStatus.map((c) => c.configMergeResult));\n\n const mergedSnapIds = ComponentIdList.fromArray(\n mergeResults.mergeSnapResults?.snappedComponents.map((c) => c.id) || []\n );\n const componentsWithConfigConflicts = configMergeResults.filter((c) => c.hasConflicts()).map((c) => c.compIdStr);\n const conflicts: ConflictPerId[] = [];\n const mergedSuccessfullyIds: ComponentID[] = [];\n mergeResults.components?.forEach((c) => {\n const files = Object.keys(c.filesStatus).filter(\n (f) => c.filesStatus[f] === FileStatus.manual || c.filesStatus[f] === FileStatus.binaryConflict\n );\n const config = componentsWithConfigConflicts.includes(c.id.toStringWithoutVersion());\n if (files.length || config) {\n conflicts.push({ id: c.id, files, config });\n } else {\n const snappedId = mergedSnapIds.searchWithoutVersion(c.id);\n mergedSuccessfullyIds.push(snappedId || c.id);\n }\n });\n\n await this.workspace?.consumer.onDestroy(`lane-merge (${otherLaneId.name})`);\n\n return { mergeResults, deleteResults, configMergeResults, mergedSuccessfullyIds, conflicts };\n }\n\n private validateMergeFlags(otherLaneId: LaneId, currentLaneId: LaneId, options: MergeLaneOptions) {\n const { tag, resolveUnrelated, detachHead } = options;\n\n if (tag && !currentLaneId.isDefault()) {\n throw new BitError(`--tag only possible when on main. currently checked out to ${currentLaneId.toString()}`);\n }\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 if (detachHead && !currentLaneId.isDefault()) {\n throw new BitError(`unable to detach head. the current lane is not main`);\n }\n }\n\n private async resolveMergeContext(otherLaneId: LaneId, currentLaneId: LaneId, options: Partial<MergeLaneOptions>) {\n const { skipFetch, excludeNonLaneComps, shouldIncludeUpdateDependents, fetchCurrent } = options;\n const legacyScope = this.scope.legacyScope;\n if (fetchCurrent && !currentLaneId.isDefault()) {\n // if current is default, it'll be fetch later on\n await this.lanes.fetchLaneWithItsComponents(currentLaneId);\n }\n const currentLane = currentLaneId.isDefault() ? undefined : await legacyScope.loadLane(currentLaneId);\n const isDefaultLane = otherLaneId.isDefault();\n if (isDefaultLane) {\n if (!skipFetch) {\n // pass `shouldIncludeUpdateDependents` so the prefetch covers main objects for the\n // lane's hidden entries too — the per-component merge engine needs main-side Version\n // objects locally to compute divergence against the hidden cascade snaps.\n const ids = await this.getMainIdsToMerge(currentLane, !excludeNonLaneComps, shouldIncludeUpdateDependents);\n const compIdList = ComponentIdList.fromArray(ids).toVersionLatest();\n await this.importer.importObjectsFromMainIfExist(compIdList);\n }\n }\n let laneToFetchArtifactsFrom: Lane | undefined;\n const getOtherLane = async () => {\n let lane = await legacyScope.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 // note: fetching always includes the lane's hidden updateDependents (and routes them to the\n // lane's scope); `shouldIncludeUpdateDependents` still governs whether they take part in the\n // merge itself, via `idsToMerge` below.\n const otherLane = await this.lanes.fetchLaneWithItsComponents(otherLaneId);\n laneToFetchArtifactsFrom = otherLane;\n lane = await legacyScope.loadLane(otherLaneId);\n }\n return lane;\n };\n const otherLane = isDefaultLane ? undefined : await getOtherLane();\n if (fetchCurrent && otherLane && currentLaneId.isDefault()) {\n const ids = await this.getMainIdsToMerge(otherLane, false, shouldIncludeUpdateDependents);\n const compIdList = ComponentIdList.fromArray(ids).toVersionLatest();\n await this.importer.importObjectsFromMainIfExist(compIdList);\n }\n const getBitIds = async () => {\n if (isDefaultLane) {\n const ids = await this.getMainIdsToMerge(currentLane, !excludeNonLaneComps, shouldIncludeUpdateDependents);\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.toComponentId().changeVersion(c.head.toString());\n })\n );\n }\n if (!otherLane) throw new Error(`lane must be defined for non-default`);\n return shouldIncludeUpdateDependents\n ? otherLane.toComponentIdsIncludeUpdateDependents()\n : otherLane.toComponentIds();\n };\n const idsToMerge = await getBitIds();\n\n return {\n currentLane,\n otherLane,\n laneToFetchArtifactsFrom,\n idsToMerge,\n };\n }\n\n /**\n * check conflicts in case of merging sourceLaneId into targetLaneId\n */\n async checkLaneForConflicts(\n sourceLaneIdStr: string,\n targetLaneIdStr: string,\n options: Partial<MergeLaneOptions>\n ): Promise<{\n conflicts: ConflictPerId[];\n }> {\n const legacyScope = this.scope.legacyScope;\n const otherLaneId: LaneId = await legacyScope.lanes.parseLaneIdFromString(sourceLaneIdStr);\n const currentLaneId: LaneId = await legacyScope.lanes.parseLaneIdFromString(targetLaneIdStr);\n options.excludeNonLaneComps = true;\n const { currentLane, otherLane, idsToMerge } = await this.resolveMergeContext(otherLaneId, currentLaneId, options);\n\n const allComponentsStatus = await this.merging.getMergeStatus(\n idsToMerge,\n {\n mergeStrategy: 'manual',\n },\n currentLane,\n otherLane\n );\n\n throwForFailures(allComponentsStatus);\n\n const configMergeResults = compact(allComponentsStatus.map((c) => c.configMergeResult));\n const componentsWithConfigConflicts = configMergeResults.filter((c) => c.hasConflicts()).map((c) => c.compIdStr);\n const conflicts: ConflictPerId[] = [];\n allComponentsStatus.forEach((c) => {\n const files = c.mergeResults?.modifiedFiles.filter((f) => f.conflict || f.isBinaryConflict) || [];\n const config = componentsWithConfigConflicts.includes(c.id.toStringWithoutVersion());\n if (files.length || config) {\n const configData = configMergeResults.find((co) => co.compIdStr === c.id.toStringWithoutVersion());\n const configConflict = configData?.generateMergeConflictFile() || undefined;\n conflicts.push({ id: c.id, files: files.map((f) => f.filePath), config, configConflict });\n }\n });\n\n return { conflicts };\n }\n\n async mergeMove(newLaneName: string, options: { scope?: string }) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const lastMerge = new LastMerged(this.scope, this.workspace.consumer, this.logger);\n await lastMerge.restoreLaneObjectFromLastMerged();\n const newLaneResult = await this.lanes.createLane(newLaneName, { scope: options.scope });\n return newLaneResult;\n }\n\n async abortLaneMerge(checkoutProps: CheckoutProps, mergeAbortOpts: MergeAbortOpts) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const lastMerge = new LastMerged(this.scope, this.workspace.consumer, this.logger);\n const currentLane = await this.lanes.getCurrentLane();\n const { compDirsToRemove } = await lastMerge.restoreFromLastMerged(mergeAbortOpts, currentLane);\n\n await this.workspace._reloadConsumer();\n\n this.workspace.consumer.scope.objects.unmergedComponents.removeAllComponents();\n await this.workspace.consumer.scope.objects.unmergedComponents.write();\n\n const configMergeFile = this.workspace.getConflictMergeFile();\n await configMergeFile.delete();\n\n let checkoutResults: ApplyVersionResults | undefined;\n let checkoutError: Error | undefined;\n checkoutProps.ids = this.workspace.listIds();\n checkoutProps.restoreMissingComponents = true;\n try {\n checkoutResults = await this.checkout.checkout(checkoutProps);\n } catch (err: any) {\n this.logger.error(`merge-abort got an error during the checkout stage`, err);\n checkoutError = err;\n }\n\n const restoredItems = [\n `${path.basename(this.workspace.consumer.bitMap.mapPath)} file`,\n `${path.basename(this.workspace.consumer.config.path)} file`,\n ];\n if (compDirsToRemove.length) {\n restoredItems.push(`deleted components directories: ${compDirsToRemove.join(', ')}`);\n }\n if (currentLane) {\n restoredItems.push(`${currentLane.id()} lane object`);\n }\n\n return { checkoutResults, restoredItems, checkoutError };\n }\n\n private async getMainIdsToMerge(lane?: Lane | null, includeNonLaneComps = true, includeUpdateDependents = false) {\n if (!lane) throw new Error(`unable to merge ${DEFAULT_LANE}, the current lane was not found`);\n const laneIds = includeUpdateDependents ? lane.toComponentIdsIncludeUpdateDependents() : lane.toComponentIds();\n const ids = laneIds.filter((id) => this.scope.isExported(id));\n if (includeNonLaneComps) {\n if (!this.workspace) {\n throw new BitError(`getMainIdsToMerge needs workspace`);\n }\n const workspaceIds = this.workspace.listIds();\n const mainNotOnLane = workspaceIds.filter(\n (id) => !laneIds.find((laneId) => laneId.isEqualWithoutVersion(id)) && this.scope.isExported(id)\n );\n ids.push(...mainNotOnLane);\n }\n return ids;\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 CheckoutAspect,\n ConfigStoreAspect,\n ExpressAspect,\n ];\n static runtime = MainRuntime;\n\n static async provider([\n lanes,\n cli,\n workspace,\n merging,\n loggerMain,\n remove,\n scope,\n exporter,\n importer,\n checkout,\n configStore,\n express,\n ]: [\n LanesMain,\n CLIMain,\n Workspace,\n MergingMain,\n LoggerMain,\n RemoveMain,\n ScopeMain,\n ExportMain,\n ImporterMain,\n CheckoutMain,\n ConfigStoreMain,\n ExpressMain,\n ]) {\n const logger = loggerMain.createLogger(MergeLanesAspect.id);\n const lanesCommand = cli.getCommand('lane');\n const mergeLanesMain = new MergeLanesMain(\n workspace,\n merging,\n lanes,\n logger,\n remove,\n scope,\n exporter,\n importer,\n checkout\n );\n lanesCommand?.commands?.push(new MergeLaneCmd(mergeLanesMain, configStore));\n lanesCommand?.commands?.push(new MergeAbortLaneCmd(mergeLanesMain));\n lanesCommand?.commands?.push(new MergeMoveLaneCmd(mergeLanesMain));\n express.register([new LanesCheckConflictsRoute(mergeLanesMain, logger)]);\n return mergeLanesMain;\n }\n}\n\nasync function filterComponentsStatus(\n allComponentsStatus: ComponentMergeStatus[],\n compIdsToKeep: ComponentID[],\n allBitIds: ComponentID[],\n legacyScope: LegacyScope,\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 = ComponentIdList.fromArray(compIdsToKeep);\n const bitIdsNotFromPattern = allBitIds.filter((bitId) => !bitIdsFromPattern.hasWithoutVersion(bitId));\n const filteredComponentStatus: ComponentMergeStatus[] = [];\n const depsToAdd: ComponentID[] = [];\n const missingDepsFromHead = {};\n const missingDepsFromHistory: string[] = [];\n\n const versionsToCheckPerId = await pMapSeries(compIdsToKeep, async (compId) => {\n const fromStatus = allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(compId));\n if (!fromStatus) {\n throw new Error(`filterComponentsStatus: unable to find ${compId.toString()} in component-status`);\n }\n filteredComponentStatus.push(fromStatus);\n if (fromStatus.unchangedMessage) {\n return undefined;\n }\n if (!otherLane) {\n // if merging main, no need to check whether the deps are included in the pattern.\n return undefined;\n }\n const { divergeData } = fromStatus;\n if (!divergeData) {\n throw new Error(`filterComponentsStatus: unable to find divergeData for ${compId.toString()}`);\n }\n let targetVersions: Ref[] = divergeData.snapsOnTargetOnly;\n if (!targetVersions.length) {\n return undefined;\n }\n const modelComponent = await legacyScope.getModelComponent(compId);\n if (shouldSquash) {\n // no need to check all versions, we merge only the head\n const headOnTarget = otherLane ? otherLane.getCompHeadIncludeUpdateDependents(compId) : modelComponent.head;\n if (!headOnTarget) {\n throw new Error(`filterComponentsStatus: unable to find head for ${compId.toString()}`);\n }\n targetVersions = [headOnTarget];\n }\n\n return { compId, targetVersions, modelComponent };\n });\n\n // all these versions needs to be imported to load them later and check whether they have dependencies on the target lane\n const toImport = compact(versionsToCheckPerId)\n .map((c) => c.targetVersions.map((v) => c.compId.changeVersion(v.toString())))\n .flat();\n await legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(toImport), {\n lane: otherLane,\n cache: true,\n includeVersionHistory: false,\n reason: 'import all history of given patterns components to check whether they have dependencies on the lane',\n });\n\n await pMapSeries(compact(versionsToCheckPerId), async ({ compId, targetVersions, modelComponent }) => {\n await pMapSeries(targetVersions, async (remoteVersion) => {\n const versionObj = await modelComponent.loadVersion(remoteVersion.toString(), legacyScope.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: ComponentID[] = [];\n await Promise.all(\n depsNotIncludeInPattern.map(async (dep) => {\n const isOnLane = await legacyScope.isIdOnLane(dep, otherLane);\n if (isOnLane) {\n depsOnLane.push(dep);\n }\n })\n );\n if (!depsOnLane.length) {\n return;\n }\n if (includeDeps) {\n depsToAdd.push(...depsOnLane);\n } else {\n const headOnTarget = otherLane ? otherLane.getCompHeadIncludeUpdateDependents(compId) : modelComponent.head;\n const depsOnLaneStr = depsOnLane.map((dep) => dep.toStringWithoutVersion());\n if (headOnTarget?.isEqual(remoteVersion)) {\n depsOnLaneStr.forEach((dep) => {\n (missingDepsFromHead[dep] ||= []).push(compId.toStringWithoutVersion());\n });\n } else {\n missingDepsFromHistory.push(...depsOnLaneStr);\n }\n }\n });\n });\n if (Object.keys(missingDepsFromHead).length || missingDepsFromHistory.length) {\n throw new MissingCompsToMerge(missingDepsFromHead, uniq(missingDepsFromHistory));\n }\n\n if (depsToAdd.length) {\n // remove the version, otherwise, the uniq gives duplicate components with different versions.\n const depsWithoutVersion = depsToAdd.map((d) => d.changeVersion(undefined));\n const depsUniqWithoutVersion = ComponentIdList.uniqFromArray(depsWithoutVersion);\n depsUniqWithoutVersion.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(\n succeededComponents: ComponentMergeStatus[],\n currentLaneId: LaneId,\n otherLaneId: LaneId,\n scope: LegacyScope,\n opts: { messageTitle?: string; detachHead?: boolean } = {}\n) {\n const currentLaneName = currentLaneId.name;\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 = await squashOneComp(\n currentLaneName,\n otherLaneId,\n id,\n divergeData,\n log,\n scope,\n componentFromModel,\n opts\n );\n if (modifiedComp) {\n scope.objects.add(modifiedComp);\n const modelComponent = await scope.getModelComponent(id);\n const versionHistory = await modelComponent.updateRebasedVersionHistory(scope.objects, [modifiedComp]);\n if (versionHistory) scope.objects.add(versionHistory);\n }\n })\n );\n}\n\n/**\n * returns Version object if it was modified. otherwise, returns undefined\n */\nasync function squashOneComp(\n currentLaneName: string,\n otherLaneId: LaneId,\n id: ComponentID,\n divergeData: SnapsDistance,\n log: Log,\n scope: LegacyScope,\n componentFromModel?: Version,\n opts: { messageTitle?: string; detachHead?: boolean } = {}\n): Promise<Version | undefined> {\n const { messageTitle, detachHead } = opts;\n const shouldSquash = () => {\n if (divergeData.isDiverged()) {\n if (detachHead) {\n // for detach head, it's ok to have it as diverged. as long as the target is ahead, we want to squash.\n return true;\n }\n // diverged + --squash: skip the parent-rewrite path here. the merge snap will be created\n // by snapForMerge with a single parent (and squashed metadata) because the corresponding\n // UnmergedComponent entry has `shouldSquash: true`. see snapping.main.runtime.ts.\n return false;\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 false;\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 false;\n }\n return true;\n };\n\n if (!shouldSquash()) {\n return undefined;\n }\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 const getAllMessages = async () => {\n if (!messageTitle) return [];\n await scope.scopeImporter.importManyObjects({ [otherLaneId.scope]: remoteSnaps.map((s) => s.toString()) });\n const versionObjects = (await Promise.all(remoteSnaps.map((s) => scope.objects.load(s)))) as Version[];\n return compact(versionObjects).map((v) => v.log.message);\n };\n const getFinalMessage = async (): Promise<string | undefined> => {\n if (!messageTitle) return undefined;\n const allMessage = await getAllMessages();\n const allMessageStr = compact(allMessage)\n .map((m) => `[*] ${m}`)\n .join('\\n');\n return `${messageTitle}\\n${allMessageStr}`;\n };\n if (!componentFromModel) {\n throw new Error('unable to squash, the componentFromModel is missing');\n }\n const currentParents = componentFromModel.parents;\n\n // if the remote has only one snap, there is nothing to squash.\n // other checks here is to make sure `componentFromModel.addAsOnlyParent` call is not needed.\n if (remoteSnaps.length === 1 && divergeData.commonSnapBeforeDiverge && currentParents.length === 1) {\n return undefined;\n }\n\n const doSquash = async () => {\n if (divergeData.commonSnapBeforeDiverge) {\n componentFromModel.addAsOnlyParent(divergeData.commonSnapBeforeDiverge);\n return;\n }\n if (currentLaneName !== DEFAULT_LANE) {\n // when squashing into lane, we have to take main into account\n const modelComponent = await scope.getModelComponentIfExist(id);\n if (!modelComponent) throw new Error(`missing ModelComponent for ${id.toString()}`);\n if (modelComponent.head) {\n componentFromModel.addAsOnlyParent(modelComponent.head);\n return;\n }\n }\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\n await doSquash();\n\n const finalMessage = await getFinalMessage();\n componentFromModel.setSquashed({ previousParents: currentParents, laneId: otherLaneId }, log, finalMessage);\n return componentFromModel;\n}\n\nMergeLanesAspect.addRuntime(MergeLanesMain);\n\nexport default MergeLanesMain;\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAC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AC3B,IAAIzD,WAAW,CAACwD,uBAAuB,EAAE;MACvCrB,kBAAkB,CAACuB,eAAe,CAAC1D,WAAW,CAACwD,uBAAuB,CAAC;MACvE;IACF;IACA,IAAIxB,eAAe,KAAK1F,sBAAY,EAAE;MACpC;MACA,MAAM6D,cAAc,GAAG,MAAM5P,KAAK,CAACoT,wBAAwB,CAAC3P,EAAE,CAAC;MAC/D,IAAI,CAACmM,cAAc,EAAE,MAAM,IAAI9G,KAAK,CAAC,8BAA8BrF,EAAE,CAACf,QAAQ,CAAC,CAAC,EAAE,CAAC;MACnF,IAAIkN,cAAc,CAACpK,IAAI,EAAE;QACvBoM,kBAAkB,CAACuB,eAAe,CAACvD,cAAc,CAACpK,IAAI,CAAC;QACvD;MACF;IACF;IACA;IACAoM,kBAAkB,CAACoB,OAAO,CAAC3P,OAAO,CAAEgQ,GAAG,IAAKzB,kBAAkB,CAAC0B,YAAY,CAACD,GAAG,CAAC,CAAC;EACnF,CAAC;EAED,MAAMH,QAAQ,CAAC,CAAC;EAEhB,MAAMK,YAAY,GAAG,MAAMZ,eAAe,CAAC,CAAC;EAC5Cf,kBAAkB,CAAC4B,WAAW,CAAC;IAAEC,eAAe,EAAEV,cAAc;IAAE5G,MAAM,EAAExL;EAAY,CAAC,EAAE+Q,GAAG,EAAE6B,YAAY,CAAC;EAC3G,OAAO3B,kBAAkB;AAC3B;AAEAxE,8BAAgB,CAACsG,UAAU,CAACjU,cAAc,CAAC;AAAC,IAAAkU,QAAA,GAAA7F,OAAA,CAAAxP,OAAA,GAE7BmB,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["_bitError","data","require","_path","_interopRequireDefault","_cli","_importer","_lanes","_merging","_componentModules","_workspace","_configStore","_harmonyModules","_componentId","_objects","_componentVersion","_pMapSeries","_scope","_laneId","_logger","_checkout","_remove","_lodash","_export","_mergeLanes","_mergeLane","_missingCompsToMerge","_mergeAbort","_lastMerged","_mergeMove","_express","_lanesCheckConflicts","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MergeLanesMain","constructor","workspace","merging","lanes","logger","remove","scope","exporter","importer","checkout","mergeLaneByCLI","laneName","options","BitError","currentLaneId","consumer","getCurrentLaneId","otherLaneId","getParsedLaneId","shouldIncludeUpdateDependents","undefined","mergeLane","validateMergeFlags","currentLane","otherLane","laneToFetchArtifactsFrom","idsToMerge","resolveMergeContext","mergeStrategy","noAutoSnap","noSnap","tag","snapMessage","existingOnWorkspaceOnly","build","loose","keepReadme","squash","noSquash","pattern","includeDeps","skipDependencyInstallation","resolveUnrelated","ignoreConfigChanges","throwIfNotUpToDate","detachHead","legacyScope","debug","toString","shouldSquash","isDefault","allComponentsStatus","getMergeStatus","handleTargetAheadAsDiverged","shouldMergeAspectsData","componentIds","compIdsFromPattern","filterIdsFromPoolIdsByPattern","filterComponentsStatus","forEach","bitId","find","c","id","isEqualWithoutVersion","push","unchangedLegitimately","unchangedMessage","workspaceIds","listIds","filter","throwForFailures","succeededComponents","squashSnaps","messageTitle","ids","map","importHeadArtifactsFromLane","lastMerged","LastMerged","snapshot","takeSnapshot","mergeResults","mergeSnaps","persistSnapshot","mergedSuccessfully","failedComponents","length","every","failedComponent","deleteResults","readmeComponent","readmeComponentId","changeVersion","head","hash","removeLocallyByIds","reasonForRemoval","readmeResult","configMergeResults","compact","configMergeResult","mergedSnapIds","ComponentIdList","fromArray","mergeSnapResults","snappedComponents","componentsWithConfigConflicts","hasConflicts","compIdStr","conflicts","mergedSuccessfullyIds","components","files","keys","filesStatus","f","FileStatus","manual","binaryConflict","config","includes","toStringWithoutVersion","snappedId","searchWithoutVersion","importMissingReferencedDeps","onDestroy","name","checkedHashes","Set","candidateRefs","pMapSeries","modelComponent","getModelComponentIfExist","headVersion","loadVersion","objects","getAllFlattenedDependencies","depId","version","isSnap","has","add","Ref","from","existingRefs","hasMultiple","existingHashes","ref","missingHashes","scopeImporter","importManyObjects","subRefs","versionObject","load","refsWithOptions","existingSubRefs","missingSubRefs","isEqual","skipFetch","excludeNonLaneComps","fetchCurrent","fetchLaneWithItsComponents","loadLane","isDefaultLane","getMainIdsToMerge","compIdList","toVersionLatest","importObjectsFromMainIfExist","getOtherLane","lane","shouldFetch","isNew","getBitIds","modelComponents","Promise","all","getModelComponent","toComponentId","Error","toComponentIdsIncludeUpdateDependents","toComponentIds","checkLaneForConflicts","sourceLaneIdStr","targetLaneIdStr","parseLaneIdFromString","modifiedFiles","conflict","isBinaryConflict","configData","co","configConflict","generateMergeConflictFile","filePath","mergeMove","newLaneName","OutsideWorkspaceError","lastMerge","restoreLaneObjectFromLastMerged","newLaneResult","createLane","abortLaneMerge","checkoutProps","mergeAbortOpts","getCurrentLane","compDirsToRemove","restoreFromLastMerged","_reloadConsumer","unmergedComponents","removeAllComponents","write","configMergeFile","getConflictMergeFile","delete","checkoutResults","checkoutError","restoreMissingComponents","err","error","restoredItems","path","basename","bitMap","mapPath","join","includeNonLaneComps","includeUpdateDependents","DEFAULT_LANE","laneIds","isExported","mainNotOnLane","laneId","fromLaneId","toLaneId","status","diffStatus","skipChanges","compsNotUpToDate","componentsStatus","s","upToDate","componentId","provider","cli","loggerMain","configStore","express","createLogger","MergeLanesAspect","lanesCommand","getCommand","mergeLanesMain","commands","MergeLaneCmd","MergeAbortLaneCmd","MergeMoveLaneCmd","register","LanesCheckConflictsRoute","exports","LanesAspect","CLIAspect","WorkspaceAspect","MergingAspect","LoggerAspect","RemoveAspect","ScopeAspect","ExportAspect","ImporterAspect","CheckoutAspect","ConfigStoreAspect","ExpressAspect","MainRuntime","compIdsToKeep","allBitIds","bitIdsFromPattern","bitIdsNotFromPattern","hasWithoutVersion","filteredComponentStatus","depsToAdd","missingDepsFromHead","missingDepsFromHistory","versionsToCheckPerId","compId","fromStatus","divergeData","targetVersions","snapsOnTargetOnly","headOnTarget","getCompHeadIncludeUpdateDependents","toImport","v","flat","importWithoutDeps","cache","includeVersionHistory","reason","remoteVersion","versionObj","flattenedDeps","depsNotIncludeInPattern","depsOnLane","dep","isOnLane","isIdOnLane","depsOnLaneStr","MissingCompsToMerge","uniq","depsWithoutVersion","d","depsUniqWithoutVersion","uniqFromArray","opts","currentLaneName","log","getLogForSquash","componentFromModel","modifiedComp","squashOneComp","versionHistory","updateRebasedVersionHistory","isDiverged","isSourceAhead","isTargetAhead","remoteSnaps","getAllMessages","versionObjects","message","getFinalMessage","allMessage","allMessageStr","m","currentParents","parents","commonSnapBeforeDiverge","doSquash","addAsOnlyParent","removeParent","finalMessage","setSquashed","previousParents","addRuntime","_default"],"sources":["merge-lanes.main.runtime.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport path from 'path';\nimport type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport type { ImporterMain } from '@teambit/importer';\nimport { ImporterAspect } from '@teambit/importer';\nimport type { LanesMain } from '@teambit/lanes';\nimport { LanesAspect } from '@teambit/lanes';\nimport type { MergingMain, ComponentMergeStatus } from '@teambit/merging';\nimport type { ApplyVersionResults, MergeStrategy } from '@teambit/component.modules.merge-helper';\nimport { MergingAspect } from '@teambit/merging';\nimport { FileStatus } from '@teambit/component.modules.merge-helper';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect, OutsideWorkspaceError } from '@teambit/workspace';\nimport type { ConfigStoreMain } from '@teambit/config-store';\nimport { ConfigStoreAspect } from '@teambit/config-store';\nimport { getLogForSquash } from '@teambit/harmony.modules.get-basic-log';\nimport type { ComponentID } from '@teambit/component-id';\nimport { ComponentIdList } from '@teambit/component-id';\nimport type { Lane, Version, Log } from '@teambit/objects';\nimport { Ref } from '@teambit/objects';\nimport { isSnap } from '@teambit/component-version';\nimport pMapSeries from 'p-map-series';\nimport type { Scope as LegacyScope } from '@teambit/legacy.scope';\nimport type { ScopeMain } from '@teambit/scope';\nimport { ScopeAspect } from '@teambit/scope';\nimport type { LaneId } from '@teambit/lane-id';\nimport { DEFAULT_LANE } from '@teambit/lane-id';\nimport type { ConfigMergeResult } from '@teambit/config-merger';\nimport type { Logger, LoggerMain } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport type { CheckoutMain, CheckoutProps } from '@teambit/checkout';\nimport { CheckoutAspect, throwForFailures } from '@teambit/checkout';\nimport type { SnapsDistance } from '@teambit/component.snap-distance';\nimport type { RemoveMain } from '@teambit/remove';\nimport { RemoveAspect } from '@teambit/remove';\nimport { compact, uniq } from 'lodash';\nimport type { ExportMain } from '@teambit/export';\nimport { ExportAspect } from '@teambit/export';\nimport { MergeLanesAspect } from './merge-lanes.aspect';\nimport { MergeLaneCmd } from './merge-lane.cmd';\nimport { MissingCompsToMerge } from './exceptions/missing-comps-to-merge';\nimport type { MergeAbortOpts } from './merge-abort.cmd';\nimport { MergeAbortLaneCmd } from './merge-abort.cmd';\nimport { LastMerged } from './last-merged';\nimport { MergeMoveLaneCmd } from './merge-move.cmd';\nimport type { ExpressMain } from '@teambit/express';\nimport { ExpressAspect } from '@teambit/express';\nimport { LanesCheckConflictsRoute } from './lanes-check-conflicts.route';\n\nexport type MergeLaneOptions = {\n mergeStrategy: MergeStrategy;\n ours?: boolean;\n theirs?: boolean;\n noAutoSnap?: boolean;\n noSnap?: boolean;\n snapMessage?: string;\n existingOnWorkspaceOnly?: boolean;\n build?: boolean;\n keepReadme?: boolean;\n squash?: 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 excludeNonLaneComps?: boolean;\n shouldIncludeUpdateDependents?: boolean;\n throwIfNotUpToDate?: boolean; // relevant when merging from a scope\n fetchCurrent?: boolean; // needed when merging from a bare-scope (because it's empty)\n detachHead?: boolean;\n loose?: boolean; // relevant for --build, to allow build to succeed even if tasks like tests or lint fail\n};\nexport type ConflictPerId = { id: ComponentID; files: string[]; config?: boolean; configConflict?: string };\n\nexport class MergeLanesMain {\n constructor(\n private workspace: Workspace | undefined,\n private merging: MergingMain,\n readonly lanes: LanesMain,\n readonly logger: Logger,\n private remove: RemoveMain,\n private scope: ScopeMain,\n private exporter: ExportMain,\n private importer: ImporterMain,\n private checkout: CheckoutMain\n ) {}\n\n async mergeLaneByCLI(laneName: string, options: MergeLaneOptions) {\n if (!this.workspace) {\n throw new BitError(`unable to merge a lane outside of Bit workspace`);\n }\n const currentLaneId = this.workspace.consumer.getCurrentLaneId();\n const otherLaneId = await this.workspace.consumer.getParsedLaneId(laneName);\n // Hidden lane updateDependents must participate in every merge — otherwise main→lane refresh\n // (`bit lane merge main`) leaves the lane's cascaded entries stuck on their old main-head\n // base, and lane→main merge would push a partially-consistent lane state. The bare-scope\n // counterpart (`bit _merge-lane`, used by Ripple / the UI's \"update lane\" button) already\n // sets this; the workspace path was the missing leg.\n if (options.shouldIncludeUpdateDependents === undefined) {\n options.shouldIncludeUpdateDependents = true;\n }\n return this.mergeLane(otherLaneId, currentLaneId, options);\n }\n\n /**\n * merge otherLaneId into currentLaneId\n */\n async mergeLane(\n otherLaneId: LaneId,\n currentLaneId: LaneId,\n options: MergeLaneOptions\n ): Promise<{\n mergeResults: ApplyVersionResults;\n deleteResults: any;\n configMergeResults: ConfigMergeResult[];\n mergedSuccessfullyIds: ComponentID[];\n conflicts: ConflictPerId[];\n }> {\n this.validateMergeFlags(otherLaneId, currentLaneId, options);\n const { currentLane, otherLane, laneToFetchArtifactsFrom, idsToMerge } = await this.resolveMergeContext(\n otherLaneId,\n currentLaneId,\n options\n );\n\n const {\n mergeStrategy,\n noAutoSnap,\n noSnap,\n tag,\n snapMessage,\n existingOnWorkspaceOnly,\n build,\n loose,\n keepReadme,\n squash,\n noSquash,\n pattern,\n includeDeps,\n skipDependencyInstallation,\n resolveUnrelated,\n ignoreConfigChanges,\n throwIfNotUpToDate,\n detachHead,\n } = options;\n const legacyScope = this.scope.legacyScope;\n const consumer = this.workspace?.consumer;\n\n if (throwIfNotUpToDate) await this.throwIfNotUpToDate(otherLaneId, currentLaneId);\n\n this.logger.debug(`merging the following ids: ${idsToMerge.toString()}`);\n\n const shouldSquash = squash || (currentLaneId.isDefault() && !noSquash);\n let allComponentsStatus = await this.merging.getMergeStatus(\n idsToMerge,\n {\n resolveUnrelated,\n ignoreConfigChanges,\n shouldSquash,\n mergeStrategy,\n handleTargetAheadAsDiverged: noSnap,\n detachHead,\n shouldMergeAspectsData: true,\n },\n currentLane,\n otherLane\n );\n\n if (pattern) {\n const componentIds = idsToMerge;\n const compIdsFromPattern = await (this.workspace || this.scope).filterIdsFromPoolIdsByPattern(\n pattern,\n componentIds\n );\n allComponentsStatus = await filterComponentsStatus(\n allComponentsStatus,\n compIdsFromPattern,\n idsToMerge,\n legacyScope,\n includeDeps,\n otherLane,\n shouldSquash\n );\n idsToMerge.forEach((bitId) => {\n if (!allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(bitId))) {\n allComponentsStatus.push({ id: bitId, unchangedLegitimately: true, unchangedMessage: `excluded by pattern` });\n }\n });\n }\n if (existingOnWorkspaceOnly && this.workspace) {\n const workspaceIds = this.workspace.listIds();\n const compIdsFromPattern = workspaceIds.filter((id) =>\n allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(id))\n );\n allComponentsStatus = await filterComponentsStatus(\n allComponentsStatus,\n compIdsFromPattern,\n idsToMerge,\n legacyScope,\n includeDeps,\n otherLane,\n shouldSquash\n );\n idsToMerge.forEach((bitId) => {\n if (!allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(bitId))) {\n allComponentsStatus.push({\n id: bitId,\n unchangedLegitimately: true,\n unchangedMessage: `not in the workspace`,\n });\n }\n });\n }\n\n throwForFailures(allComponentsStatus);\n\n const succeededComponents = allComponentsStatus.filter((c) => !c.unchangedMessage);\n if (shouldSquash) {\n await squashSnaps(succeededComponents, currentLaneId, otherLaneId, legacyScope, {\n messageTitle: options.snapMessage,\n detachHead,\n });\n }\n\n if (laneToFetchArtifactsFrom) {\n const ids = allComponentsStatus.map((c) => c.id);\n await this.importer.importHeadArtifactsFromLane(laneToFetchArtifactsFrom, ids, true);\n }\n\n const lastMerged = consumer ? new LastMerged(this.scope, consumer, this.logger) : undefined;\n const snapshot = await lastMerged?.takeSnapshot(currentLane);\n\n const mergeResults = await this.merging.mergeSnaps({\n mergeStrategy,\n allComponentsStatus,\n otherLaneId,\n currentLane,\n noAutoSnap,\n noSnap,\n tag,\n snapMessage,\n build,\n skipDependencyInstallation,\n detachHead,\n loose,\n shouldSquash,\n });\n\n if (snapshot) await lastMerged?.persistSnapshot(snapshot);\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.changeVersion(otherLane.readmeComponent?.head?.hash);\n deleteResults = await this.remove.removeLocallyByIds([readmeComponentId], { reasonForRemoval: 'lane-merge' });\n } else if (otherLane && !otherLane.readmeComponent) {\n deleteResults = { readmeResult: '' };\n }\n const configMergeResults = compact(allComponentsStatus.map((c) => c.configMergeResult));\n\n const mergedSnapIds = ComponentIdList.fromArray(\n mergeResults.mergeSnapResults?.snappedComponents.map((c) => c.id) || []\n );\n const componentsWithConfigConflicts = configMergeResults.filter((c) => c.hasConflicts()).map((c) => c.compIdStr);\n const conflicts: ConflictPerId[] = [];\n const mergedSuccessfullyIds: ComponentID[] = [];\n mergeResults.components?.forEach((c) => {\n const files = Object.keys(c.filesStatus).filter(\n (f) => c.filesStatus[f] === FileStatus.manual || c.filesStatus[f] === FileStatus.binaryConflict\n );\n const config = componentsWithConfigConflicts.includes(c.id.toStringWithoutVersion());\n if (files.length || config) {\n conflicts.push({ id: c.id, files, config });\n } else {\n const snappedId = mergedSnapIds.searchWithoutVersion(c.id);\n mergedSuccessfullyIds.push(snappedId || c.id);\n }\n });\n\n // A merged head may reference — via its flattened dependencies — a non-head snap of another\n // component. When merging to main the squash removes intermediate snaps from each component's own\n // chain, and a bare-scope merge (`bit _merge-lane --push`) exports heads only; in both cases such a\n // referenced snap wouldn't be exported, and on lean lanes it lives only on the lane scope. Import\n // any missing one now so the export can ship it (otherwise the remote's dependency-integrity check\n // would reject the push). Not needed for non-squash workspace merges, which export full history.\n if (shouldSquash || !this.workspace) {\n await this.importMissingReferencedDeps(mergedSuccessfullyIds, otherLane);\n }\n\n await this.workspace?.consumer.onDestroy(`lane-merge (${otherLaneId.name})`);\n\n return { mergeResults, deleteResults, configMergeResults, mergedSuccessfullyIds, conflicts };\n }\n\n /**\n * A merged component head may reference, via its flattened dependencies, a non-head snap of another\n * component — e.g. a deleted component that keeps pinning an older snap of a dependency that has\n * since advanced. On lean lanes those snaps live only on the lane scope and are not fetched by the\n * merge, so the heads-only export (used by `bit _merge-lane --push`) would leave them out and the\n * remote's dependency-integrity check would fail. Import any such missing snap from the lane scope.\n */\n private async importMissingReferencedDeps(ids: ComponentID[], otherLane?: Lane) {\n // the missing snaps live on the lane scope (lean lanes). without the source lane we don't know\n // where to fetch them from, so there's nothing to do.\n if (!otherLane) return;\n const legacyScope = this.scope.legacyScope;\n // one existence check per unique hash — the same snap appears in the flattened list of many heads\n const checkedHashes = new Set<string>();\n const candidateRefs: Ref[] = [];\n await pMapSeries(ids, async (id) => {\n // strip the version — a versioned lookup (sources.get) returns undefined when that Version\n // object is missing locally, and only the model is needed here anyway (for its head).\n const modelComponent = await legacyScope.getModelComponentIfExist(id.changeVersion(undefined));\n const head = modelComponent?.head;\n if (!modelComponent || !head) return;\n const headVersion = await modelComponent.loadVersion(head.toString(), legacyScope.objects, false);\n if (!headVersion) return;\n // flattened (not only direct) to mirror the remote-side check, which validates the flattened\n // dependencies of every exported head (see throwForMissingLocalDependencies). cheap: only the\n // heads are loaded and each unique hash is stat-ed once.\n headVersion.getAllFlattenedDependencies().forEach((depId) => {\n // the remote check validates only same-scope deps (it skips `depId.scope !== scope.name`,\n // cross-scope deps are fetched later by the remote itself), so same-scope is all the export\n // needs to ship. this also filters out the vast majority of the flattened list.\n if (depId.scope !== id.scope) return;\n // only snaps can go missing this way — tags live on the home scope and are never squashed\n // off a lane. (a tag version is a semver string, not an object hash, so Ref.from would be\n // bogus for it anyway.)\n if (!depId.version || !isSnap(depId.version)) return;\n if (checkedHashes.has(depId.version)) return;\n checkedHashes.add(depId.version);\n candidateRefs.push(Ref.from(depId.version));\n });\n });\n // hasMultiple bounds the I/O concurrency, unlike a Promise.all of has() calls\n const existingRefs = await legacyScope.objects.hasMultiple(candidateRefs);\n const existingHashes = new Set(existingRefs.map((ref) => ref.toString()));\n const missingHashes = candidateRefs.map((ref) => ref.toString()).filter((hash) => !existingHashes.has(hash));\n if (!missingHashes.length) return;\n this.logger.debug(\n `importMissingReferencedDeps, importing ${missingHashes.length} non-head dependency snaps referenced by the merged heads from ${otherLane.scope}`\n );\n // fetch the raw objects only (by hash, from the lane scope). importManyObjects does not touch\n // component models/heads, so it can't leave a component pointing at a version whose object is\n // missing — unlike a component-level import.\n await legacyScope.scopeImporter.importManyObjects({ [otherLane.scope]: missingHashes });\n // a Version object references other objects the export must ship along with it — the file\n // sources and the flattened-edges/dependencies-graph. fetch the missing ones too. (parents are\n // not needed — the export doesn't collect them for these versions. artifacts are not needed\n // either — the export tolerates missing artifacts for such non-local versions.)\n const subRefs: Ref[] = [];\n await pMapSeries(missingHashes, async (hash) => {\n const versionObject = (await legacyScope.objects.load(Ref.from(hash))) as Version | null;\n if (!versionObject) return; // the hash could not be fetched after all\n versionObject.refsWithOptions(false, false).forEach((ref) => {\n if (checkedHashes.has(ref.toString())) return;\n checkedHashes.add(ref.toString());\n subRefs.push(ref);\n });\n });\n const existingSubRefs = new Set((await legacyScope.objects.hasMultiple(subRefs)).map((ref) => ref.toString()));\n const missingSubRefs = subRefs.map((ref) => ref.toString()).filter((hash) => !existingSubRefs.has(hash));\n if (!missingSubRefs.length) return;\n await legacyScope.scopeImporter.importManyObjects({ [otherLane.scope]: missingSubRefs });\n }\n\n private validateMergeFlags(otherLaneId: LaneId, currentLaneId: LaneId, options: MergeLaneOptions) {\n const { tag, resolveUnrelated, detachHead } = options;\n\n if (tag && !currentLaneId.isDefault()) {\n throw new BitError(`--tag only possible when on main. currently checked out to ${currentLaneId.toString()}`);\n }\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 if (detachHead && !currentLaneId.isDefault()) {\n throw new BitError(`unable to detach head. the current lane is not main`);\n }\n }\n\n private async resolveMergeContext(otherLaneId: LaneId, currentLaneId: LaneId, options: Partial<MergeLaneOptions>) {\n const { skipFetch, excludeNonLaneComps, shouldIncludeUpdateDependents, fetchCurrent } = options;\n const legacyScope = this.scope.legacyScope;\n if (fetchCurrent && !currentLaneId.isDefault()) {\n // if current is default, it'll be fetch later on\n await this.lanes.fetchLaneWithItsComponents(currentLaneId);\n }\n const currentLane = currentLaneId.isDefault() ? undefined : await legacyScope.loadLane(currentLaneId);\n const isDefaultLane = otherLaneId.isDefault();\n if (isDefaultLane) {\n if (!skipFetch) {\n // pass `shouldIncludeUpdateDependents` so the prefetch covers main objects for the\n // lane's hidden entries too — the per-component merge engine needs main-side Version\n // objects locally to compute divergence against the hidden cascade snaps.\n const ids = await this.getMainIdsToMerge(currentLane, !excludeNonLaneComps, shouldIncludeUpdateDependents);\n const compIdList = ComponentIdList.fromArray(ids).toVersionLatest();\n await this.importer.importObjectsFromMainIfExist(compIdList);\n }\n }\n let laneToFetchArtifactsFrom: Lane | undefined;\n const getOtherLane = async () => {\n let lane = await legacyScope.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 // note: fetching always includes the lane's hidden updateDependents (and routes them to the\n // lane's scope); `shouldIncludeUpdateDependents` still governs whether they take part in the\n // merge itself, via `idsToMerge` below.\n const otherLane = await this.lanes.fetchLaneWithItsComponents(otherLaneId);\n laneToFetchArtifactsFrom = otherLane;\n lane = await legacyScope.loadLane(otherLaneId);\n }\n return lane;\n };\n const otherLane = isDefaultLane ? undefined : await getOtherLane();\n if (fetchCurrent && otherLane && currentLaneId.isDefault()) {\n const ids = await this.getMainIdsToMerge(otherLane, false, shouldIncludeUpdateDependents);\n const compIdList = ComponentIdList.fromArray(ids).toVersionLatest();\n await this.importer.importObjectsFromMainIfExist(compIdList);\n }\n const getBitIds = async () => {\n if (isDefaultLane) {\n const ids = await this.getMainIdsToMerge(currentLane, !excludeNonLaneComps, shouldIncludeUpdateDependents);\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.toComponentId().changeVersion(c.head.toString());\n })\n );\n }\n if (!otherLane) throw new Error(`lane must be defined for non-default`);\n return shouldIncludeUpdateDependents\n ? otherLane.toComponentIdsIncludeUpdateDependents()\n : otherLane.toComponentIds();\n };\n const idsToMerge = await getBitIds();\n\n return {\n currentLane,\n otherLane,\n laneToFetchArtifactsFrom,\n idsToMerge,\n };\n }\n\n /**\n * check conflicts in case of merging sourceLaneId into targetLaneId\n */\n async checkLaneForConflicts(\n sourceLaneIdStr: string,\n targetLaneIdStr: string,\n options: Partial<MergeLaneOptions>\n ): Promise<{\n conflicts: ConflictPerId[];\n }> {\n const legacyScope = this.scope.legacyScope;\n const otherLaneId: LaneId = await legacyScope.lanes.parseLaneIdFromString(sourceLaneIdStr);\n const currentLaneId: LaneId = await legacyScope.lanes.parseLaneIdFromString(targetLaneIdStr);\n options.excludeNonLaneComps = true;\n const { currentLane, otherLane, idsToMerge } = await this.resolveMergeContext(otherLaneId, currentLaneId, options);\n\n const allComponentsStatus = await this.merging.getMergeStatus(\n idsToMerge,\n {\n mergeStrategy: 'manual',\n },\n currentLane,\n otherLane\n );\n\n throwForFailures(allComponentsStatus);\n\n const configMergeResults = compact(allComponentsStatus.map((c) => c.configMergeResult));\n const componentsWithConfigConflicts = configMergeResults.filter((c) => c.hasConflicts()).map((c) => c.compIdStr);\n const conflicts: ConflictPerId[] = [];\n allComponentsStatus.forEach((c) => {\n const files = c.mergeResults?.modifiedFiles.filter((f) => f.conflict || f.isBinaryConflict) || [];\n const config = componentsWithConfigConflicts.includes(c.id.toStringWithoutVersion());\n if (files.length || config) {\n const configData = configMergeResults.find((co) => co.compIdStr === c.id.toStringWithoutVersion());\n const configConflict = configData?.generateMergeConflictFile() || undefined;\n conflicts.push({ id: c.id, files: files.map((f) => f.filePath), config, configConflict });\n }\n });\n\n return { conflicts };\n }\n\n async mergeMove(newLaneName: string, options: { scope?: string }) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const lastMerge = new LastMerged(this.scope, this.workspace.consumer, this.logger);\n await lastMerge.restoreLaneObjectFromLastMerged();\n const newLaneResult = await this.lanes.createLane(newLaneName, { scope: options.scope });\n return newLaneResult;\n }\n\n async abortLaneMerge(checkoutProps: CheckoutProps, mergeAbortOpts: MergeAbortOpts) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const lastMerge = new LastMerged(this.scope, this.workspace.consumer, this.logger);\n const currentLane = await this.lanes.getCurrentLane();\n const { compDirsToRemove } = await lastMerge.restoreFromLastMerged(mergeAbortOpts, currentLane);\n\n await this.workspace._reloadConsumer();\n\n this.workspace.consumer.scope.objects.unmergedComponents.removeAllComponents();\n await this.workspace.consumer.scope.objects.unmergedComponents.write();\n\n const configMergeFile = this.workspace.getConflictMergeFile();\n await configMergeFile.delete();\n\n let checkoutResults: ApplyVersionResults | undefined;\n let checkoutError: Error | undefined;\n checkoutProps.ids = this.workspace.listIds();\n checkoutProps.restoreMissingComponents = true;\n try {\n checkoutResults = await this.checkout.checkout(checkoutProps);\n } catch (err: any) {\n this.logger.error(`merge-abort got an error during the checkout stage`, err);\n checkoutError = err;\n }\n\n const restoredItems = [\n `${path.basename(this.workspace.consumer.bitMap.mapPath)} file`,\n `${path.basename(this.workspace.consumer.config.path)} file`,\n ];\n if (compDirsToRemove.length) {\n restoredItems.push(`deleted components directories: ${compDirsToRemove.join(', ')}`);\n }\n if (currentLane) {\n restoredItems.push(`${currentLane.id()} lane object`);\n }\n\n return { checkoutResults, restoredItems, checkoutError };\n }\n\n private async getMainIdsToMerge(lane?: Lane | null, includeNonLaneComps = true, includeUpdateDependents = false) {\n if (!lane) throw new Error(`unable to merge ${DEFAULT_LANE}, the current lane was not found`);\n const laneIds = includeUpdateDependents ? lane.toComponentIdsIncludeUpdateDependents() : lane.toComponentIds();\n const ids = laneIds.filter((id) => this.scope.isExported(id));\n if (includeNonLaneComps) {\n if (!this.workspace) {\n throw new BitError(`getMainIdsToMerge needs workspace`);\n }\n const workspaceIds = this.workspace.listIds();\n const mainNotOnLane = workspaceIds.filter(\n (id) => !laneIds.find((laneId) => laneId.isEqualWithoutVersion(id)) && this.scope.isExported(id)\n );\n ids.push(...mainNotOnLane);\n }\n return ids;\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 CheckoutAspect,\n ConfigStoreAspect,\n ExpressAspect,\n ];\n static runtime = MainRuntime;\n\n static async provider([\n lanes,\n cli,\n workspace,\n merging,\n loggerMain,\n remove,\n scope,\n exporter,\n importer,\n checkout,\n configStore,\n express,\n ]: [\n LanesMain,\n CLIMain,\n Workspace,\n MergingMain,\n LoggerMain,\n RemoveMain,\n ScopeMain,\n ExportMain,\n ImporterMain,\n CheckoutMain,\n ConfigStoreMain,\n ExpressMain,\n ]) {\n const logger = loggerMain.createLogger(MergeLanesAspect.id);\n const lanesCommand = cli.getCommand('lane');\n const mergeLanesMain = new MergeLanesMain(\n workspace,\n merging,\n lanes,\n logger,\n remove,\n scope,\n exporter,\n importer,\n checkout\n );\n lanesCommand?.commands?.push(new MergeLaneCmd(mergeLanesMain, configStore));\n lanesCommand?.commands?.push(new MergeAbortLaneCmd(mergeLanesMain));\n lanesCommand?.commands?.push(new MergeMoveLaneCmd(mergeLanesMain));\n express.register([new LanesCheckConflictsRoute(mergeLanesMain, logger)]);\n return mergeLanesMain;\n }\n}\n\nasync function filterComponentsStatus(\n allComponentsStatus: ComponentMergeStatus[],\n compIdsToKeep: ComponentID[],\n allBitIds: ComponentID[],\n legacyScope: LegacyScope,\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 = ComponentIdList.fromArray(compIdsToKeep);\n const bitIdsNotFromPattern = allBitIds.filter((bitId) => !bitIdsFromPattern.hasWithoutVersion(bitId));\n const filteredComponentStatus: ComponentMergeStatus[] = [];\n const depsToAdd: ComponentID[] = [];\n const missingDepsFromHead = {};\n const missingDepsFromHistory: string[] = [];\n\n const versionsToCheckPerId = await pMapSeries(compIdsToKeep, async (compId) => {\n const fromStatus = allComponentsStatus.find((c) => c.id.isEqualWithoutVersion(compId));\n if (!fromStatus) {\n throw new Error(`filterComponentsStatus: unable to find ${compId.toString()} in component-status`);\n }\n filteredComponentStatus.push(fromStatus);\n if (fromStatus.unchangedMessage) {\n return undefined;\n }\n if (!otherLane) {\n // if merging main, no need to check whether the deps are included in the pattern.\n return undefined;\n }\n const { divergeData } = fromStatus;\n if (!divergeData) {\n throw new Error(`filterComponentsStatus: unable to find divergeData for ${compId.toString()}`);\n }\n let targetVersions: Ref[] = divergeData.snapsOnTargetOnly;\n if (!targetVersions.length) {\n return undefined;\n }\n const modelComponent = await legacyScope.getModelComponent(compId);\n if (shouldSquash) {\n // no need to check all versions, we merge only the head\n const headOnTarget = otherLane ? otherLane.getCompHeadIncludeUpdateDependents(compId) : modelComponent.head;\n if (!headOnTarget) {\n throw new Error(`filterComponentsStatus: unable to find head for ${compId.toString()}`);\n }\n targetVersions = [headOnTarget];\n }\n\n return { compId, targetVersions, modelComponent };\n });\n\n // all these versions needs to be imported to load them later and check whether they have dependencies on the target lane\n const toImport = compact(versionsToCheckPerId)\n .map((c) => c.targetVersions.map((v) => c.compId.changeVersion(v.toString())))\n .flat();\n await legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(toImport), {\n lane: otherLane,\n cache: true,\n includeVersionHistory: false,\n reason: 'import all history of given patterns components to check whether they have dependencies on the lane',\n });\n\n await pMapSeries(compact(versionsToCheckPerId), async ({ compId, targetVersions, modelComponent }) => {\n await pMapSeries(targetVersions, async (remoteVersion) => {\n const versionObj = await modelComponent.loadVersion(remoteVersion.toString(), legacyScope.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: ComponentID[] = [];\n await Promise.all(\n depsNotIncludeInPattern.map(async (dep) => {\n const isOnLane = await legacyScope.isIdOnLane(dep, otherLane);\n if (isOnLane) {\n depsOnLane.push(dep);\n }\n })\n );\n if (!depsOnLane.length) {\n return;\n }\n if (includeDeps) {\n depsToAdd.push(...depsOnLane);\n } else {\n const headOnTarget = otherLane ? otherLane.getCompHeadIncludeUpdateDependents(compId) : modelComponent.head;\n const depsOnLaneStr = depsOnLane.map((dep) => dep.toStringWithoutVersion());\n if (headOnTarget?.isEqual(remoteVersion)) {\n depsOnLaneStr.forEach((dep) => {\n (missingDepsFromHead[dep] ||= []).push(compId.toStringWithoutVersion());\n });\n } else {\n missingDepsFromHistory.push(...depsOnLaneStr);\n }\n }\n });\n });\n if (Object.keys(missingDepsFromHead).length || missingDepsFromHistory.length) {\n throw new MissingCompsToMerge(missingDepsFromHead, uniq(missingDepsFromHistory));\n }\n\n if (depsToAdd.length) {\n // remove the version, otherwise, the uniq gives duplicate components with different versions.\n const depsWithoutVersion = depsToAdd.map((d) => d.changeVersion(undefined));\n const depsUniqWithoutVersion = ComponentIdList.uniqFromArray(depsWithoutVersion);\n depsUniqWithoutVersion.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(\n succeededComponents: ComponentMergeStatus[],\n currentLaneId: LaneId,\n otherLaneId: LaneId,\n scope: LegacyScope,\n opts: { messageTitle?: string; detachHead?: boolean } = {}\n) {\n const currentLaneName = currentLaneId.name;\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 = await squashOneComp(\n currentLaneName,\n otherLaneId,\n id,\n divergeData,\n log,\n scope,\n componentFromModel,\n opts\n );\n if (modifiedComp) {\n scope.objects.add(modifiedComp);\n const modelComponent = await scope.getModelComponent(id);\n const versionHistory = await modelComponent.updateRebasedVersionHistory(scope.objects, [modifiedComp]);\n if (versionHistory) scope.objects.add(versionHistory);\n }\n })\n );\n}\n\n/**\n * returns Version object if it was modified. otherwise, returns undefined\n */\nasync function squashOneComp(\n currentLaneName: string,\n otherLaneId: LaneId,\n id: ComponentID,\n divergeData: SnapsDistance,\n log: Log,\n scope: LegacyScope,\n componentFromModel?: Version,\n opts: { messageTitle?: string; detachHead?: boolean } = {}\n): Promise<Version | undefined> {\n const { messageTitle, detachHead } = opts;\n const shouldSquash = () => {\n if (divergeData.isDiverged()) {\n if (detachHead) {\n // for detach head, it's ok to have it as diverged. as long as the target is ahead, we want to squash.\n return true;\n }\n // diverged + --squash: skip the parent-rewrite path here. the merge snap will be created\n // by snapForMerge with a single parent (and squashed metadata) because the corresponding\n // UnmergedComponent entry has `shouldSquash: true`. see snapping.main.runtime.ts.\n return false;\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 false;\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 false;\n }\n return true;\n };\n\n if (!shouldSquash()) {\n return undefined;\n }\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 const getAllMessages = async () => {\n if (!messageTitle) return [];\n await scope.scopeImporter.importManyObjects({ [otherLaneId.scope]: remoteSnaps.map((s) => s.toString()) });\n const versionObjects = (await Promise.all(remoteSnaps.map((s) => scope.objects.load(s)))) as Version[];\n return compact(versionObjects).map((v) => v.log.message);\n };\n const getFinalMessage = async (): Promise<string | undefined> => {\n if (!messageTitle) return undefined;\n const allMessage = await getAllMessages();\n const allMessageStr = compact(allMessage)\n .map((m) => `[*] ${m}`)\n .join('\\n');\n return `${messageTitle}\\n${allMessageStr}`;\n };\n if (!componentFromModel) {\n throw new Error('unable to squash, the componentFromModel is missing');\n }\n const currentParents = componentFromModel.parents;\n\n // if the remote has only one snap, there is nothing to squash.\n // other checks here is to make sure `componentFromModel.addAsOnlyParent` call is not needed.\n if (remoteSnaps.length === 1 && divergeData.commonSnapBeforeDiverge && currentParents.length === 1) {\n return undefined;\n }\n\n const doSquash = async () => {\n if (divergeData.commonSnapBeforeDiverge) {\n componentFromModel.addAsOnlyParent(divergeData.commonSnapBeforeDiverge);\n return;\n }\n if (currentLaneName !== DEFAULT_LANE) {\n // when squashing into lane, we have to take main into account\n const modelComponent = await scope.getModelComponentIfExist(id);\n if (!modelComponent) throw new Error(`missing ModelComponent for ${id.toString()}`);\n if (modelComponent.head) {\n componentFromModel.addAsOnlyParent(modelComponent.head);\n return;\n }\n }\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\n await doSquash();\n\n const finalMessage = await getFinalMessage();\n componentFromModel.setSquashed({ previousParents: currentParents, laneId: otherLaneId }, log, finalMessage);\n return componentFromModel;\n}\n\nMergeLanesAspect.addRuntime(MergeLanesMain);\n\nexport default MergeLanesMain;\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,IAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,OAAA;E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EAAE,CAACf,QAAQ,CAAC,CAAC,EAAE,CAAC;MACnF,IAAIoF,cAAc,CAACtC,IAAI,EAAE;QACvB6N,kBAAkB,CAACoB,eAAe,CAAC3M,cAAc,CAACtC,IAAI,CAAC;QACvD;MACF;IACF;IACA;IACA6N,kBAAkB,CAACiB,OAAO,CAACjR,OAAO,CAAEyF,GAAG,IAAKuK,kBAAkB,CAACqB,YAAY,CAAC5L,GAAG,CAAC,CAAC;EACnF,CAAC;EAED,MAAM0L,QAAQ,CAAC,CAAC;EAEhB,MAAMG,YAAY,GAAG,MAAMV,eAAe,CAAC,CAAC;EAC5CZ,kBAAkB,CAACuB,WAAW,CAAC;IAAEC,eAAe,EAAER,cAAc;IAAEpG,MAAM,EAAEtN;EAAY,CAAC,EAAEwS,GAAG,EAAEwB,YAAY,CAAC;EAC3G,OAAOtB,kBAAkB;AAC3B;AAEAnE,8BAAgB,CAAC4F,UAAU,CAACrV,cAAc,CAAC;AAAC,IAAAsV,QAAA,GAAAnF,OAAA,CAAAtR,OAAA,GAE7BmB,cAAc","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/merge-lanes",
3
- "version": "1.0.1094",
3
+ "version": "1.0.1095",
4
4
  "homepage": "https://bit.cloud/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": "1.0.1094"
9
+ "version": "1.0.1095"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "4.1.2",
@@ -15,31 +15,32 @@
15
15
  "yesno": "0.4.0",
16
16
  "lodash": "4.17.21",
17
17
  "p-map-series": "2.1.0",
18
- "@teambit/bit-error": "0.0.404",
19
- "@teambit/harmony": "0.4.12",
20
- "@teambit/component-id": "1.2.4",
21
- "@teambit/lane-id": "0.0.312",
22
18
  "@teambit/express": "0.0.1453",
23
19
  "@teambit/logger": "0.0.1447",
20
+ "@teambit/bit-error": "0.0.404",
24
21
  "@teambit/legacy.bit-map": "0.0.195",
25
22
  "@teambit/legacy.consumer": "0.0.138",
26
23
  "@teambit/legacy.scope": "0.0.138",
27
- "@teambit/objects": "0.0.581",
28
- "@teambit/scope": "1.0.1074",
29
- "@teambit/checkout": "1.0.1075",
30
24
  "@teambit/cli": "0.0.1354",
31
25
  "@teambit/component.modules.merge-helper": "0.0.81",
32
26
  "@teambit/config-store": "0.0.235",
33
27
  "@teambit/legacy.constants": "0.0.35",
34
- "@teambit/merging": "1.0.1077",
35
- "@teambit/remove": "1.0.1074",
28
+ "@teambit/harmony": "0.4.12",
29
+ "@teambit/component-id": "1.2.4",
30
+ "@teambit/component-version": "1.0.4",
36
31
  "@teambit/component.snap-distance": "0.0.139",
37
- "@teambit/config-merger": "0.0.941",
38
- "@teambit/export": "1.0.1074",
39
32
  "@teambit/harmony.modules.get-basic-log": "0.0.139",
40
- "@teambit/importer": "1.0.1074",
41
- "@teambit/lanes": "1.0.1094",
42
- "@teambit/workspace": "1.0.1074"
33
+ "@teambit/lane-id": "0.0.312",
34
+ "@teambit/objects": "0.0.582",
35
+ "@teambit/scope": "1.0.1075",
36
+ "@teambit/checkout": "1.0.1076",
37
+ "@teambit/merging": "1.0.1078",
38
+ "@teambit/remove": "1.0.1075",
39
+ "@teambit/config-merger": "0.0.942",
40
+ "@teambit/export": "1.0.1075",
41
+ "@teambit/importer": "1.0.1075",
42
+ "@teambit/lanes": "1.0.1095",
43
+ "@teambit/workspace": "1.0.1075"
43
44
  },
44
45
  "devDependencies": {
45
46
  "@types/fs-extra": "9.0.7",