@teambit/lanes 0.0.683 → 0.0.684

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.
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.683/dist/lanes.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.683/dist/lanes.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.684/dist/lanes.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.684/dist/lanes.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -1,7 +1,7 @@
1
1
  import { BitId } from '@teambit/legacy-bit-id';
2
2
  import { ApplyVersionResults } from '@teambit/merging';
3
3
  import { Lane } from '@teambit/legacy/dist/scope/models';
4
- import { CheckoutProps } from '@teambit/checkout';
4
+ import { CheckoutPropsLegacy } from '@teambit/checkout';
5
5
  import { Workspace } from '@teambit/workspace';
6
6
  import { Logger } from '@teambit/logger';
7
7
  import { LanesMain } from './lanes.main.runtime';
@@ -23,7 +23,7 @@ export declare class LaneSwitcher {
23
23
  private consumer;
24
24
  private laneIdToSwitchTo;
25
25
  private laneToSwitchTo;
26
- constructor(workspace: Workspace, logger: Logger, switchProps: SwitchProps, checkoutProps: CheckoutProps, Lanes: LanesMain);
26
+ constructor(workspace: Workspace, logger: Logger, switchProps: SwitchProps, checkoutProps: CheckoutPropsLegacy, Lanes: LanesMain);
27
27
  switch(): Promise<ApplyVersionResults>;
28
28
  private populateSwitchProps;
29
29
  private populatePropsAccordingToRemoteLane;
@@ -242,7 +242,7 @@ async function getComponentStatus(consumer, id, switchProps) {
242
242
  }
243
243
  const unmerged = consumer.scope.objects.unmergedComponents.getEntry(id.name);
244
244
  if (unmerged) {
245
- return returnFailure(`component ${id.toStringWithoutVersion()} is in during-merge state, please snap/tag it first (or use bit merge --resolve/--abort)`);
245
+ return returnFailure(`component ${id.toStringWithoutVersion()} is in during-merge state, please snap/tag it first (or use "bit lane merge-abort"/"bit merge --resolve/--abort")`);
246
246
  }
247
247
  const version = id.version;
248
248
  if (!version) {
@@ -1 +1 @@
1
- {"version":3,"names":["LaneSwitcher","constructor","workspace","logger","switchProps","checkoutProps","Lanes","consumer","switch","setStatusLine","isOnMain","throwForStagedComponents","populateSwitchProps","allComponentsStatus","getAllComponentsStatus","componentWithConflict","find","component","mergeResults","hasConflicts","promptMergeOptions","mergeStrategy","GeneralError","id","toStringWithoutVersion","getMergeStrategyInteractive","failedComponents","filter","componentStatus","failureMessage","map","unchangedLegitimately","succeededComponents","componentsResults","mapSeries","currentComponent","componentFromFS","applyVersion","markFilesToBeRemovedIfNeeded","saveLanesData","components","c","manyComponentsWriterOpts","skipDependencyInstallation","skipNpmInstall","verbose","writeConfig","installationError","compilationError","componentWriter","writeMany","deleteFilesIfNeeded","appliedVersionComponents","applyVersionResult","onDestroy","laneId","scope","lanes","parseLaneIdFromString","laneName","localLane","loadLane","isDefault","populatePropsAccordingToDefaultLane","populatePropsAccordingToLocalLane","populatePropsAccordingToRemoteLane","pattern","bitMap","getAllBitIdsFromAllLanes","length","BitError","allIds","resolveMultipleComponentIds","ids","patternIds","filterIdsFromPoolIdsByPattern","_legacy","remoteLaneId","laneIdToSwitchTo","debug","toString","getCurrentLaneId","isEqual","remoteLane","fetchLaneWithItsComponents","name","l","changeVersion","head","localTrackedLane","getAliasByLaneId","undefined","laneToSwitchTo","isOnLane","getIdsOfDefaultLane","LaneId","from","DEFAULT_LANE","toLaneId","tmp","Tmp","componentsStatusP","getComponentStatus","componentsStatus","Promise","all","clear","err","localLaneName","alias","trackLane","remoteScope","setCurrentLane","isNew","syncWithLanes","returnFailure","msg","modelComponent","getModelComponentIfExist","unmerged","objects","unmergedComponents","getEntry","version","existingBitMapId","getBitIdIfExist","ignoreVersion","componentOnLane","loadVersion","isRemoved","existingOnWorkspaceOnly","componentFromModel","hasVersion","currentlyUsedVersion","baseComponent","loadComponent","isModified","isComponentSourceCodeModified","isHeadSameAsMain","getHead","tagVersion","getTagOfRefIfExists","headVersion","otherComponent","threeWayMerge","otherLabel","currentLabel"],"sources":["switch-lanes.ts"],"sourcesContent":["import mapSeries from 'p-map-series';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { ApplyVersionResults } from '@teambit/merging';\nimport { Version, Lane } from '@teambit/legacy/dist/scope/models';\nimport { Tmp } from '@teambit/legacy/dist/scope/repositories';\nimport {\n applyVersion,\n ComponentStatus,\n CheckoutProps,\n deleteFilesIfNeeded,\n markFilesToBeRemovedIfNeeded,\n} from '@teambit/checkout';\nimport {\n FailedComponents,\n getMergeStrategyInteractive,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport threeWayMerge, {\n MergeResultsThreeWay,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version/three-way-merge';\nimport { Workspace } from '@teambit/workspace';\nimport { Logger } from '@teambit/logger';\nimport { BitError } from '@teambit/bit-error';\nimport { LanesMain } from './lanes.main.runtime';\nimport { throwForStagedComponents } from './create-lane';\n\nexport type SwitchProps = {\n laneName: string;\n ids?: BitId[];\n pattern?: string;\n existingOnWorkspaceOnly: boolean;\n remoteLane?: Lane;\n localTrackedLane?: string;\n alias?: string;\n};\n\nexport class LaneSwitcher {\n private consumer: Consumer;\n private laneIdToSwitchTo: LaneId; // populated by `this.populateSwitchProps()`\n private laneToSwitchTo: Lane | undefined; // populated by `this.populateSwitchProps()`, if default-lane, it's undefined\n constructor(\n private workspace: Workspace,\n private logger: Logger,\n private switchProps: SwitchProps,\n private checkoutProps: CheckoutProps,\n private Lanes: LanesMain\n ) {\n this.consumer = this.workspace.consumer;\n }\n\n async switch(): Promise<ApplyVersionResults> {\n this.logger.setStatusLine(`switching lanes`);\n if (this.workspace.isOnMain()) {\n await throwForStagedComponents(this.consumer);\n }\n await this.populateSwitchProps();\n const allComponentsStatus: ComponentStatus[] = await this.getAllComponentsStatus();\n const componentWithConflict = allComponentsStatus.find(\n (component) => component.mergeResults && component.mergeResults.hasConflicts\n );\n if (componentWithConflict) {\n if (!this.checkoutProps.promptMergeOptions && !this.checkoutProps.mergeStrategy) {\n throw new GeneralError(\n `automatic merge has failed for component ${componentWithConflict.id.toStringWithoutVersion()}.\\nplease use \"--manual\" to manually merge changes or use \"--theirs / --ours\" to choose one of the conflicted versions`\n );\n }\n if (!this.checkoutProps.mergeStrategy) this.checkoutProps.mergeStrategy = await getMergeStrategyInteractive();\n }\n const failedComponents: FailedComponents[] = allComponentsStatus\n .filter((componentStatus) => componentStatus.failureMessage)\n .map((componentStatus) => ({\n id: componentStatus.id,\n failureMessage: componentStatus.failureMessage as string,\n unchangedLegitimately: componentStatus.unchangedLegitimately,\n }));\n\n const succeededComponents = allComponentsStatus.filter((componentStatus) => !componentStatus.failureMessage);\n // do not use Promise.all for applyVersion. otherwise, it'll write all components in parallel,\n // which can be an issue when some components are also dependencies of others\n const componentsResults = await mapSeries(\n succeededComponents,\n ({ id, currentComponent: componentFromFS, mergeResults }) => {\n return applyVersion(this.consumer, id, componentFromFS, mergeResults, this.checkoutProps);\n }\n );\n\n markFilesToBeRemovedIfNeeded(succeededComponents, componentsResults);\n\n await this.saveLanesData();\n\n const components = componentsResults.map((c) => c.component).filter((c) => c) as ConsumerComponent[];\n\n const manyComponentsWriterOpts = {\n components,\n skipDependencyInstallation: this.checkoutProps.skipNpmInstall,\n verbose: this.checkoutProps.verbose,\n writeConfig: this.checkoutProps.writeConfig,\n };\n const { installationError, compilationError } = await this.Lanes.componentWriter.writeMany(\n manyComponentsWriterOpts\n );\n await deleteFilesIfNeeded(componentsResults, this.workspace);\n\n const appliedVersionComponents = componentsResults.map((c) => c.applyVersionResult);\n\n await this.consumer.onDestroy();\n\n return { components: appliedVersionComponents, failedComponents, installationError, compilationError };\n }\n\n private async populateSwitchProps() {\n const laneId = await this.consumer.scope.lanes.parseLaneIdFromString(this.switchProps.laneName);\n\n const localLane = await this.consumer.scope.loadLane(laneId);\n if (laneId.isDefault()) {\n await this.populatePropsAccordingToDefaultLane();\n } else if (localLane) {\n this.populatePropsAccordingToLocalLane(localLane);\n } else {\n await this.populatePropsAccordingToRemoteLane(laneId);\n }\n\n if (this.switchProps.pattern) {\n if (this.consumer.bitMap.getAllBitIdsFromAllLanes().length) {\n // if the workspace is not empty, it's possible that it has components from lane-x, and is now switching\n // partially to lane-y, while lane-y has the same components as lane-x. in which case, the user ends up with\n // an invalid state of components from lane-x and lane-y together.\n throw new BitError('error: use --pattern only when the workspace is empty');\n }\n const allIds = await this.workspace.resolveMultipleComponentIds(this.switchProps.ids || []);\n const patternIds = this.workspace.scope.filterIdsFromPoolIdsByPattern(this.switchProps.pattern, allIds);\n this.switchProps.ids = patternIds.map((id) => id._legacy);\n }\n }\n\n private async populatePropsAccordingToRemoteLane(remoteLaneId: LaneId) {\n this.laneIdToSwitchTo = remoteLaneId;\n this.logger.debug(`populatePropsAccordingToRemoteLane, remoteLaneId: ${remoteLaneId.toString()}`);\n if (this.consumer.getCurrentLaneId().isEqual(remoteLaneId)) {\n throw new BitError(`already checked out to \"${remoteLaneId.toString()}\"`);\n }\n const remoteLane = await this.Lanes.fetchLaneWithItsComponents(remoteLaneId);\n this.switchProps.laneName = remoteLaneId.name;\n this.switchProps.ids = remoteLane.components.map((l) => l.id.changeVersion(l.head.toString()));\n this.switchProps.localTrackedLane = this.consumer.scope.lanes.getAliasByLaneId(remoteLaneId) || undefined;\n this.switchProps.remoteLane = remoteLane;\n this.laneToSwitchTo = remoteLane;\n this.logger.debug(`populatePropsAccordingToRemoteLane, completed`);\n }\n\n private async populatePropsAccordingToDefaultLane() {\n if (!this.consumer.isOnLane()) {\n throw new BitError(`already checked out to \"${this.switchProps.laneName}\"`);\n }\n this.switchProps.ids = await this.consumer.getIdsOfDefaultLane();\n this.laneIdToSwitchTo = LaneId.from(DEFAULT_LANE, this.consumer.scope.name);\n }\n\n private populatePropsAccordingToLocalLane(localLane: Lane) {\n if (this.consumer.getCurrentLaneId().name === this.switchProps.laneName) {\n throw new BitError(`already checked out to \"${this.switchProps.laneName}\"`);\n }\n this.switchProps.ids = localLane.components.map((c) => c.id.changeVersion(c.head.toString()));\n this.laneIdToSwitchTo = localLane.toLaneId();\n this.laneToSwitchTo = localLane;\n }\n\n private async getAllComponentsStatus(): Promise<ComponentStatus[]> {\n const { ids } = this.switchProps;\n const tmp = new Tmp(this.consumer.scope);\n try {\n const componentsStatusP = (ids as BitId[]).map((id) => getComponentStatus(this.consumer, id, this.switchProps));\n const componentsStatus = await Promise.all(componentsStatusP);\n await tmp.clear();\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n return componentsStatus;\n } catch (err: any) {\n await tmp.clear();\n throw err;\n }\n }\n\n private async saveLanesData() {\n const localLaneName = this.switchProps.alias || this.laneIdToSwitchTo.name;\n if (this.switchProps.remoteLane) {\n if (!this.switchProps.localTrackedLane) {\n this.consumer.scope.lanes.trackLane({\n localLane: localLaneName,\n remoteLane: this.laneIdToSwitchTo.name,\n remoteScope: this.laneIdToSwitchTo.scope,\n });\n }\n }\n\n this.consumer.setCurrentLane(this.laneIdToSwitchTo, !this.laneToSwitchTo?.isNew);\n this.consumer.bitMap.syncWithLanes(this.laneToSwitchTo);\n }\n}\n\nasync function getComponentStatus(consumer: Consumer, id: BitId, switchProps: SwitchProps): Promise<ComponentStatus> {\n const componentStatus: ComponentStatus = { id };\n const returnFailure = (msg: string, unchangedLegitimately = false) => {\n componentStatus.failureMessage = msg;\n componentStatus.unchangedLegitimately = unchangedLegitimately;\n return componentStatus;\n };\n const modelComponent = await consumer.scope.getModelComponentIfExist(id);\n if (!modelComponent) {\n return returnFailure(`component ${id.toString()} had never imported`, true);\n }\n const unmerged = consumer.scope.objects.unmergedComponents.getEntry(id.name);\n if (unmerged) {\n return returnFailure(\n `component ${id.toStringWithoutVersion()} is in during-merge state, please snap/tag it first (or use bit merge --resolve/--abort)`\n );\n }\n const version = id.version;\n if (!version) {\n return returnFailure(`component doesn't have any snaps on ${DEFAULT_LANE}`, true);\n }\n const existingBitMapId = consumer.bitMap.getBitIdIfExist(id, { ignoreVersion: true });\n const componentOnLane: Version = await modelComponent.loadVersion(version, consumer.scope.objects);\n if (componentOnLane.isRemoved()) {\n return returnFailure(`component has been removed`, true);\n }\n if (!existingBitMapId) {\n if (switchProps.existingOnWorkspaceOnly) {\n return returnFailure(`component ${id.toStringWithoutVersion()} is not in the workspace`, true);\n }\n return { componentFromModel: componentOnLane, id };\n }\n if (!existingBitMapId.hasVersion()) {\n // happens when switching from main to a lane and a component was snapped on the lane.\n // in the .bitmap file, the version is \"latest\" or empty. so we just need to write the component according to the\n // model. we don't care about the componentFromFS\n return { componentFromModel: componentOnLane, id };\n }\n const currentlyUsedVersion = existingBitMapId.version;\n if (currentlyUsedVersion === version) {\n return returnFailure(`component ${id.toStringWithoutVersion()} is already at version ${version}`, true);\n }\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const baseComponent: Version = await modelComponent.loadVersion(currentlyUsedVersion, consumer.scope.objects);\n const component = await consumer.loadComponent(existingBitMapId);\n // don't use `consumer.isModified` here. otherwise, if there are dependency changes, the user can't discard them\n // and won't be able to switch lanes.\n const isModified = await consumer.isComponentSourceCodeModified(baseComponent, component);\n let mergeResults: MergeResultsThreeWay | null | undefined;\n const isHeadSameAsMain = () => {\n const head = modelComponent.getHead();\n if (!head) return false;\n if (!existingBitMapId.version) return false;\n const tagVersion = modelComponent.getTagOfRefIfExists(head);\n const headVersion = tagVersion || head.toString();\n return existingBitMapId.version === headVersion;\n };\n if (isModified) {\n if (!isHeadSameAsMain()) {\n throw new GeneralError(\n `unable to checkout ${id.toStringWithoutVersion()}, the component is modified and belongs to another lane`\n );\n }\n\n const otherComponent: Version = await modelComponent.loadVersion(\n existingBitMapId.version as string, // we are here because the head is same as main. so, existingBitMapId.version must be set\n consumer.scope.objects\n );\n mergeResults = await threeWayMerge({\n consumer,\n otherComponent,\n otherLabel: version,\n currentComponent: component,\n currentLabel: `${currentlyUsedVersion} modified`,\n baseComponent,\n });\n }\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n return { currentComponent: component, componentFromModel: componentOnLane, id, mergeResults };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAOA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAYO,MAAMA,YAAY,CAAC;EAEU;EACQ;EAC1CC,WAAW,CACDC,SAAoB,EACpBC,MAAc,EACdC,WAAwB,EACxBC,aAA4B,EAC5BC,KAAgB,EACxB;IAAA,KALQJ,SAAoB,GAApBA,SAAoB;IAAA,KACpBC,MAAc,GAAdA,MAAc;IAAA,KACdC,WAAwB,GAAxBA,WAAwB;IAAA,KACxBC,aAA4B,GAA5BA,aAA4B;IAAA,KAC5BC,KAAgB,GA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AEnG,gBAAgB,EAAElB,SAAS;IAAEkH,kBAAkB,EAAEJ,eAAe;IAAExG,EAAE;IAAEL;EAAa,CAAC;AAC/F"}
1
+ {"version":3,"names":["LaneSwitcher","constructor","workspace","logger","switchProps","checkoutProps","Lanes","consumer","switch","setStatusLine","isOnMain","throwForStagedComponents","populateSwitchProps","allComponentsStatus","getAllComponentsStatus","componentWithConflict","find","component","mergeResults","hasConflicts","promptMergeOptions","mergeStrategy","GeneralError","id","toStringWithoutVersion","getMergeStrategyInteractive","failedComponents","filter","componentStatus","failureMessage","map","unchangedLegitimately","succeededComponents","componentsResults","mapSeries","currentComponent","componentFromFS","applyVersion","markFilesToBeRemovedIfNeeded","saveLanesData","components","c","manyComponentsWriterOpts","skipDependencyInstallation","skipNpmInstall","verbose","writeConfig","installationError","compilationError","componentWriter","writeMany","deleteFilesIfNeeded","appliedVersionComponents","applyVersionResult","onDestroy","laneId","scope","lanes","parseLaneIdFromString","laneName","localLane","loadLane","isDefault","populatePropsAccordingToDefaultLane","populatePropsAccordingToLocalLane","populatePropsAccordingToRemoteLane","pattern","bitMap","getAllBitIdsFromAllLanes","length","BitError","allIds","resolveMultipleComponentIds","ids","patternIds","filterIdsFromPoolIdsByPattern","_legacy","remoteLaneId","laneIdToSwitchTo","debug","toString","getCurrentLaneId","isEqual","remoteLane","fetchLaneWithItsComponents","name","l","changeVersion","head","localTrackedLane","getAliasByLaneId","undefined","laneToSwitchTo","isOnLane","getIdsOfDefaultLane","LaneId","from","DEFAULT_LANE","toLaneId","tmp","Tmp","componentsStatusP","getComponentStatus","componentsStatus","Promise","all","clear","err","localLaneName","alias","trackLane","remoteScope","setCurrentLane","isNew","syncWithLanes","returnFailure","msg","modelComponent","getModelComponentIfExist","unmerged","objects","unmergedComponents","getEntry","version","existingBitMapId","getBitIdIfExist","ignoreVersion","componentOnLane","loadVersion","isRemoved","existingOnWorkspaceOnly","componentFromModel","hasVersion","currentlyUsedVersion","baseComponent","loadComponent","isModified","isComponentSourceCodeModified","isHeadSameAsMain","getHead","tagVersion","getTagOfRefIfExists","headVersion","otherComponent","threeWayMerge","otherLabel","currentLabel"],"sources":["switch-lanes.ts"],"sourcesContent":["import mapSeries from 'p-map-series';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { ApplyVersionResults } from '@teambit/merging';\nimport { Version, Lane } from '@teambit/legacy/dist/scope/models';\nimport { Tmp } from '@teambit/legacy/dist/scope/repositories';\nimport {\n applyVersion,\n ComponentStatus,\n CheckoutPropsLegacy,\n deleteFilesIfNeeded,\n markFilesToBeRemovedIfNeeded,\n} from '@teambit/checkout';\nimport {\n FailedComponents,\n getMergeStrategyInteractive,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport threeWayMerge, {\n MergeResultsThreeWay,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version/three-way-merge';\nimport { Workspace } from '@teambit/workspace';\nimport { Logger } from '@teambit/logger';\nimport { BitError } from '@teambit/bit-error';\nimport { LanesMain } from './lanes.main.runtime';\nimport { throwForStagedComponents } from './create-lane';\n\nexport type SwitchProps = {\n laneName: string;\n ids?: BitId[];\n pattern?: string;\n existingOnWorkspaceOnly: boolean;\n remoteLane?: Lane;\n localTrackedLane?: string;\n alias?: string;\n};\n\nexport class LaneSwitcher {\n private consumer: Consumer;\n private laneIdToSwitchTo: LaneId; // populated by `this.populateSwitchProps()`\n private laneToSwitchTo: Lane | undefined; // populated by `this.populateSwitchProps()`, if default-lane, it's undefined\n constructor(\n private workspace: Workspace,\n private logger: Logger,\n private switchProps: SwitchProps,\n private checkoutProps: CheckoutPropsLegacy,\n private Lanes: LanesMain\n ) {\n this.consumer = this.workspace.consumer;\n }\n\n async switch(): Promise<ApplyVersionResults> {\n this.logger.setStatusLine(`switching lanes`);\n if (this.workspace.isOnMain()) {\n await throwForStagedComponents(this.consumer);\n }\n await this.populateSwitchProps();\n const allComponentsStatus: ComponentStatus[] = await this.getAllComponentsStatus();\n const componentWithConflict = allComponentsStatus.find(\n (component) => component.mergeResults && component.mergeResults.hasConflicts\n );\n if (componentWithConflict) {\n if (!this.checkoutProps.promptMergeOptions && !this.checkoutProps.mergeStrategy) {\n throw new GeneralError(\n `automatic merge has failed for component ${componentWithConflict.id.toStringWithoutVersion()}.\\nplease use \"--manual\" to manually merge changes or use \"--theirs / --ours\" to choose one of the conflicted versions`\n );\n }\n if (!this.checkoutProps.mergeStrategy) this.checkoutProps.mergeStrategy = await getMergeStrategyInteractive();\n }\n const failedComponents: FailedComponents[] = allComponentsStatus\n .filter((componentStatus) => componentStatus.failureMessage)\n .map((componentStatus) => ({\n id: componentStatus.id,\n failureMessage: componentStatus.failureMessage as string,\n unchangedLegitimately: componentStatus.unchangedLegitimately,\n }));\n\n const succeededComponents = allComponentsStatus.filter((componentStatus) => !componentStatus.failureMessage);\n // do not use Promise.all for applyVersion. otherwise, it'll write all components in parallel,\n // which can be an issue when some components are also dependencies of others\n const componentsResults = await mapSeries(\n succeededComponents,\n ({ id, currentComponent: componentFromFS, mergeResults }) => {\n return applyVersion(this.consumer, id, componentFromFS, mergeResults, this.checkoutProps);\n }\n );\n\n markFilesToBeRemovedIfNeeded(succeededComponents, componentsResults);\n\n await this.saveLanesData();\n\n const components = componentsResults.map((c) => c.component).filter((c) => c) as ConsumerComponent[];\n\n const manyComponentsWriterOpts = {\n components,\n skipDependencyInstallation: this.checkoutProps.skipNpmInstall,\n verbose: this.checkoutProps.verbose,\n writeConfig: this.checkoutProps.writeConfig,\n };\n const { installationError, compilationError } = await this.Lanes.componentWriter.writeMany(\n manyComponentsWriterOpts\n );\n await deleteFilesIfNeeded(componentsResults, this.workspace);\n\n const appliedVersionComponents = componentsResults.map((c) => c.applyVersionResult);\n\n await this.consumer.onDestroy();\n\n return { components: appliedVersionComponents, failedComponents, installationError, compilationError };\n }\n\n private async populateSwitchProps() {\n const laneId = await this.consumer.scope.lanes.parseLaneIdFromString(this.switchProps.laneName);\n\n const localLane = await this.consumer.scope.loadLane(laneId);\n if (laneId.isDefault()) {\n await this.populatePropsAccordingToDefaultLane();\n } else if (localLane) {\n this.populatePropsAccordingToLocalLane(localLane);\n } else {\n await this.populatePropsAccordingToRemoteLane(laneId);\n }\n\n if (this.switchProps.pattern) {\n if (this.consumer.bitMap.getAllBitIdsFromAllLanes().length) {\n // if the workspace is not empty, it's possible that it has components from lane-x, and is now switching\n // partially to lane-y, while lane-y has the same components as lane-x. in which case, the user ends up with\n // an invalid state of components from lane-x and lane-y together.\n throw new BitError('error: use --pattern only when the workspace is empty');\n }\n const allIds = await this.workspace.resolveMultipleComponentIds(this.switchProps.ids || []);\n const patternIds = this.workspace.scope.filterIdsFromPoolIdsByPattern(this.switchProps.pattern, allIds);\n this.switchProps.ids = patternIds.map((id) => id._legacy);\n }\n }\n\n private async populatePropsAccordingToRemoteLane(remoteLaneId: LaneId) {\n this.laneIdToSwitchTo = remoteLaneId;\n this.logger.debug(`populatePropsAccordingToRemoteLane, remoteLaneId: ${remoteLaneId.toString()}`);\n if (this.consumer.getCurrentLaneId().isEqual(remoteLaneId)) {\n throw new BitError(`already checked out to \"${remoteLaneId.toString()}\"`);\n }\n const remoteLane = await this.Lanes.fetchLaneWithItsComponents(remoteLaneId);\n this.switchProps.laneName = remoteLaneId.name;\n this.switchProps.ids = remoteLane.components.map((l) => l.id.changeVersion(l.head.toString()));\n this.switchProps.localTrackedLane = this.consumer.scope.lanes.getAliasByLaneId(remoteLaneId) || undefined;\n this.switchProps.remoteLane = remoteLane;\n this.laneToSwitchTo = remoteLane;\n this.logger.debug(`populatePropsAccordingToRemoteLane, completed`);\n }\n\n private async populatePropsAccordingToDefaultLane() {\n if (!this.consumer.isOnLane()) {\n throw new BitError(`already checked out to \"${this.switchProps.laneName}\"`);\n }\n this.switchProps.ids = await this.consumer.getIdsOfDefaultLane();\n this.laneIdToSwitchTo = LaneId.from(DEFAULT_LANE, this.consumer.scope.name);\n }\n\n private populatePropsAccordingToLocalLane(localLane: Lane) {\n if (this.consumer.getCurrentLaneId().name === this.switchProps.laneName) {\n throw new BitError(`already checked out to \"${this.switchProps.laneName}\"`);\n }\n this.switchProps.ids = localLane.components.map((c) => c.id.changeVersion(c.head.toString()));\n this.laneIdToSwitchTo = localLane.toLaneId();\n this.laneToSwitchTo = localLane;\n }\n\n private async getAllComponentsStatus(): Promise<ComponentStatus[]> {\n const { ids } = this.switchProps;\n const tmp = new Tmp(this.consumer.scope);\n try {\n const componentsStatusP = (ids as BitId[]).map((id) => getComponentStatus(this.consumer, id, this.switchProps));\n const componentsStatus = await Promise.all(componentsStatusP);\n await tmp.clear();\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n return componentsStatus;\n } catch (err: any) {\n await tmp.clear();\n throw err;\n }\n }\n\n private async saveLanesData() {\n const localLaneName = this.switchProps.alias || this.laneIdToSwitchTo.name;\n if (this.switchProps.remoteLane) {\n if (!this.switchProps.localTrackedLane) {\n this.consumer.scope.lanes.trackLane({\n localLane: localLaneName,\n remoteLane: this.laneIdToSwitchTo.name,\n remoteScope: this.laneIdToSwitchTo.scope,\n });\n }\n }\n\n this.consumer.setCurrentLane(this.laneIdToSwitchTo, !this.laneToSwitchTo?.isNew);\n this.consumer.bitMap.syncWithLanes(this.laneToSwitchTo);\n }\n}\n\nasync function getComponentStatus(consumer: Consumer, id: BitId, switchProps: SwitchProps): Promise<ComponentStatus> {\n const componentStatus: ComponentStatus = { id };\n const returnFailure = (msg: string, unchangedLegitimately = false) => {\n componentStatus.failureMessage = msg;\n componentStatus.unchangedLegitimately = unchangedLegitimately;\n return componentStatus;\n };\n const modelComponent = await consumer.scope.getModelComponentIfExist(id);\n if (!modelComponent) {\n return returnFailure(`component ${id.toString()} had never imported`, true);\n }\n const unmerged = consumer.scope.objects.unmergedComponents.getEntry(id.name);\n if (unmerged) {\n return returnFailure(\n `component ${id.toStringWithoutVersion()} is in during-merge state, please snap/tag it first (or use \"bit lane merge-abort\"/\"bit merge --resolve/--abort\")`\n );\n }\n const version = id.version;\n if (!version) {\n return returnFailure(`component doesn't have any snaps on ${DEFAULT_LANE}`, true);\n }\n const existingBitMapId = consumer.bitMap.getBitIdIfExist(id, { ignoreVersion: true });\n const componentOnLane: Version = await modelComponent.loadVersion(version, consumer.scope.objects);\n if (componentOnLane.isRemoved()) {\n return returnFailure(`component has been removed`, true);\n }\n if (!existingBitMapId) {\n if (switchProps.existingOnWorkspaceOnly) {\n return returnFailure(`component ${id.toStringWithoutVersion()} is not in the workspace`, true);\n }\n return { componentFromModel: componentOnLane, id };\n }\n if (!existingBitMapId.hasVersion()) {\n // happens when switching from main to a lane and a component was snapped on the lane.\n // in the .bitmap file, the version is \"latest\" or empty. so we just need to write the component according to the\n // model. we don't care about the componentFromFS\n return { componentFromModel: componentOnLane, id };\n }\n const currentlyUsedVersion = existingBitMapId.version;\n if (currentlyUsedVersion === version) {\n return returnFailure(`component ${id.toStringWithoutVersion()} is already at version ${version}`, true);\n }\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const baseComponent: Version = await modelComponent.loadVersion(currentlyUsedVersion, consumer.scope.objects);\n const component = await consumer.loadComponent(existingBitMapId);\n // don't use `consumer.isModified` here. otherwise, if there are dependency changes, the user can't discard them\n // and won't be able to switch lanes.\n const isModified = await consumer.isComponentSourceCodeModified(baseComponent, component);\n let mergeResults: MergeResultsThreeWay | null | undefined;\n const isHeadSameAsMain = () => {\n const head = modelComponent.getHead();\n if (!head) return false;\n if (!existingBitMapId.version) return false;\n const tagVersion = modelComponent.getTagOfRefIfExists(head);\n const headVersion = tagVersion || head.toString();\n return existingBitMapId.version === headVersion;\n };\n if (isModified) {\n if (!isHeadSameAsMain()) {\n throw new GeneralError(\n `unable to checkout ${id.toStringWithoutVersion()}, the component is modified and belongs to another lane`\n );\n }\n\n const otherComponent: Version = await modelComponent.loadVersion(\n existingBitMapId.version as string, // we are here because the head is same as main. so, existingBitMapId.version must be set\n consumer.scope.objects\n );\n mergeResults = await threeWayMerge({\n consumer,\n otherComponent,\n otherLabel: version,\n currentComponent: component,\n currentLabel: `${currentlyUsedVersion} modified`,\n baseComponent,\n });\n }\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n return { currentComponent: component, componentFromModel: componentOnLane, id, mergeResults };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAOA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAYO,MAAMA,YAAY,CAAC;EAEU;EACQ;EAC1CC,WAAW,CACDC,SAAoB,EACpBC,MAAc,EACdC,WAAwB,EACxBC,aAAkC,EAClCC,KAAgB,EACxB;IAAA,KALQJ,SAAoB,GAApBA,SAAoB;IAAA,KACpBC,MAAc,GAAdA,MAAc;IAAA,KACdC,WAAwB,GAAxBA,WAAwB;IAAA,KACxBC,aAAkC,GAAlCA,aAAkC;IAAA,KAClCC,KAAgB,GAAhBA,KAAgB;IAAA;IAAA;IAAA;IAExB,IAAI,CAACC,QAAQ,GAAG,IAAI,CAACL,SAAS,CAACK,QAAQ;EACzC;EAEA,MAAMC,MAAM,GAAiC;IAC3C,IAAI,CAACL,MAAM,CAACM,aAAa,CAAE,iBAAgB,CAAC;IAC5C,IAAI,IAAI,CAACP,SAAS,CAACQ,QAAQ,EAA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AAU,GAAG,MAAMjI,QAAQ,CAACkI,6BAA6B,CAACH,aAAa,EAAErH,SAAS,CAAC;EACzF,IAAIC,YAAqD;EACzD,MAAMwH,gBAAgB,GAAG,MAAM;IAC7B,MAAMlD,IAAI,GAAG6B,cAAc,CAACsB,OAAO,EAAE;IACrC,IAAI,CAACnD,IAAI,EAAE,OAAO,KAAK;IACvB,IAAI,CAACoC,gBAAgB,CAACD,OAAO,EAAE,OAAO,KAAK;IAC3C,MAAMiB,UAAU,GAAGvB,cAAc,CAACwB,mBAAmB,CAACrD,IAAI,CAAC;IAC3D,MAAMsD,WAAW,GAAGF,UAAU,IAAIpD,IAAI,CAACR,QAAQ,EAAE;IACjD,OAAO4C,gBAAgB,CAACD,OAAO,KAAKmB,WAAW;EACjD,CAAC;EACD,IAAIN,UAAU,EAAE;IACd,IAAI,CAACE,gBAAgB,EAAE,EAAE;MACvB,MAAM,KAAIpH,uBAAY,EACnB,sBAAqBC,EAAE,CAACC,sBAAsB,EAAG,yDAAwD,CAC3G;IACH;IAEA,MAAMuH,cAAuB,GAAG,MAAM1B,cAAc,CAACW,WAAW,CAC9DJ,gBAAgB,CAACD,OAAO;IAAY;IACpCpH,QAAQ,CAACiD,KAAK,CAACgE,OAAO,CACvB;IACDtG,YAAY,GAAG,MAAM,IAAA8H,wBAAa,EAAC;MACjCzI,QAAQ;MACRwI,cAAc;MACdE,UAAU,EAAEtB,OAAO;MACnBxF,gBAAgB,EAAElB,SAAS;MAC3BiI,YAAY,EAAG,GAAEb,oBAAqB,WAAU;MAChDC;IACF,CAAC,CAAC;EACJ;EACA;EACA,OAAO;IAAEnG,gBAAgB,EAAElB,SAAS;IAAEkH,kBAAkB,EAAEJ,eAAe;IAAExG,EAAE;IAAEL;EAAa,CAAC;AAC/F"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/lanes",
3
- "version": "0.0.683",
3
+ "version": "0.0.684",
4
4
  "homepage": "https://bit.cloud/teambit/lanes/lanes",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.lanes",
8
8
  "name": "lanes",
9
- "version": "0.0.683"
9
+ "version": "0.0.684"
10
10
  },
11
11
  "dependencies": {
12
12
  "lodash": "4.17.21",
@@ -23,37 +23,37 @@
23
23
  "@teambit/scope.ui.scope-icon": "0.0.91",
24
24
  "@teambit/bit-error": "0.0.402",
25
25
  "@teambit/component-version": "0.0.409",
26
- "@teambit/lane-id": "0.0.259",
27
- "@teambit/scope": "0.0.1111",
28
- "@teambit/snapping": "0.0.426",
29
- "@teambit/workspace": "0.0.1111",
30
- "@teambit/lanes.ui.models.lanes-model": "0.0.159",
31
- "@teambit/cli": "0.0.743",
32
- "@teambit/express": "0.0.841",
33
- "@teambit/logger": "0.0.836",
34
- "@teambit/graphql": "0.0.1111",
35
- "@teambit/component-compare": "0.0.359",
36
- "@teambit/component-writer": "0.0.147",
37
- "@teambit/component": "0.0.1111",
38
- "@teambit/export": "0.0.1111",
39
- "@teambit/importer": "0.0.540",
40
- "@teambit/lanes.entities.lane-diff": "0.0.104",
41
- "@teambit/lanes.modules.diff": "0.0.377",
42
- "@teambit/merging": "0.0.426",
43
- "@teambit/remove": "0.0.288",
44
- "@teambit/lanes.hooks.use-lanes": "0.0.206",
45
- "@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.168",
46
- "@teambit/lanes.ui.compare.lane-compare-page": "0.0.102",
47
- "@teambit/lanes.ui.compare.lane-compare": "0.0.119",
48
- "@teambit/lanes.ui.lane-overview": "0.0.161",
26
+ "@teambit/lane-id": "0.0.260",
27
+ "@teambit/scope": "0.0.1112",
28
+ "@teambit/snapping": "0.0.427",
29
+ "@teambit/workspace": "0.0.1112",
30
+ "@teambit/lanes.ui.models.lanes-model": "0.0.160",
31
+ "@teambit/cli": "0.0.744",
32
+ "@teambit/express": "0.0.842",
33
+ "@teambit/logger": "0.0.837",
34
+ "@teambit/graphql": "0.0.1112",
35
+ "@teambit/component-compare": "0.0.360",
36
+ "@teambit/component-writer": "0.0.148",
37
+ "@teambit/component": "0.0.1112",
38
+ "@teambit/export": "0.0.1112",
39
+ "@teambit/importer": "0.0.541",
40
+ "@teambit/lanes.entities.lane-diff": "0.0.105",
41
+ "@teambit/lanes.modules.diff": "0.0.378",
42
+ "@teambit/merging": "0.0.427",
43
+ "@teambit/remove": "0.0.289",
44
+ "@teambit/lanes.hooks.use-lanes": "0.0.207",
45
+ "@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.169",
46
+ "@teambit/lanes.ui.compare.lane-compare-page": "0.0.103",
47
+ "@teambit/lanes.ui.compare.lane-compare": "0.0.120",
48
+ "@teambit/lanes.ui.lane-overview": "0.0.162",
49
49
  "@teambit/lanes.ui.menus.lanes-overview-menu": "0.0.5",
50
- "@teambit/lanes.ui.menus.use-lanes-menu": "0.0.159",
51
- "@teambit/lanes.ui.navigation.lane-switcher": "0.0.163",
50
+ "@teambit/lanes.ui.menus.use-lanes-menu": "0.0.160",
51
+ "@teambit/lanes.ui.navigation.lane-switcher": "0.0.164",
52
52
  "@teambit/ui-foundation.ui.menu": "0.0.497",
53
53
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.501",
54
54
  "@teambit/ui-foundation.ui.react-router.use-query": "0.0.496",
55
- "@teambit/ui": "0.0.1111",
56
- "@teambit/checkout": "0.0.280"
55
+ "@teambit/ui": "0.0.1112",
56
+ "@teambit/checkout": "0.0.281"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/lodash": "4.14.165",
@@ -65,13 +65,13 @@
65
65
  "@types/react-dom": "^17.0.5",
66
66
  "@types/jest": "^26.0.0",
67
67
  "@types/testing-library__jest-dom": "5.9.5",
68
- "@teambit/component.testing.mock-components": "0.0.106",
69
- "@teambit/harmony.testing.load-aspect": "0.0.105",
68
+ "@teambit/component.testing.mock-components": "0.0.107",
69
+ "@teambit/harmony.testing.load-aspect": "0.0.106",
70
70
  "@teambit/workspace.testing.mock-workspace": "0.0.14"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "react-router-dom": "^6.0.0",
74
- "@teambit/legacy": "1.0.523",
74
+ "@teambit/legacy": "1.0.524",
75
75
  "react": "^16.8.0 || ^17.0.0",
76
76
  "react-dom": "^16.8.0 || ^17.0.0"
77
77
  },