@teambit/lanes 0.0.647 → 0.0.649
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.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.649/dist/lanes.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.649/dist/lanes.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/dist/switch-lanes.js
CHANGED
@@ -115,7 +115,7 @@ class LaneSwitcher {
|
|
115
115
|
// which can be an issue when some components are also dependencies of others
|
116
116
|
const componentsResults = await (0, _pMapSeries().default)(succeededComponents, ({
|
117
117
|
id,
|
118
|
-
componentFromFS,
|
118
|
+
currentComponent: componentFromFS,
|
119
119
|
mergeResults
|
120
120
|
}) => {
|
121
121
|
return (0, _checkout().applyVersion)(this.consumer, id, componentFromFS, mergeResults, this.checkoutProps);
|
@@ -133,7 +133,7 @@ class LaneSwitcher {
|
|
133
133
|
installationError,
|
134
134
|
compilationError
|
135
135
|
} = await this.Lanes.componentWriter.writeMany(manyComponentsWriterOpts);
|
136
|
-
await (0, _checkout().deleteFilesIfNeeded)(componentsResults, this.
|
136
|
+
await (0, _checkout().deleteFilesIfNeeded)(componentsResults, this.workspace);
|
137
137
|
const appliedVersionComponents = componentsResults.map(c => c.applyVersionResult);
|
138
138
|
await this.consumer.onDestroy();
|
139
139
|
return {
|
@@ -260,10 +260,8 @@ async function getComponentStatus(consumer, id, switchProps) {
|
|
260
260
|
return returnFailure(`component ${id.toStringWithoutVersion()} is not in the workspace`, true);
|
261
261
|
}
|
262
262
|
return {
|
263
|
-
componentFromFS: undefined,
|
264
263
|
componentFromModel: componentOnLane,
|
265
|
-
id
|
266
|
-
mergeResults: null
|
264
|
+
id
|
267
265
|
};
|
268
266
|
}
|
269
267
|
if (!existingBitMapId.hasVersion()) {
|
@@ -271,10 +269,8 @@ async function getComponentStatus(consumer, id, switchProps) {
|
|
271
269
|
// in the .bitmap file, the version is "latest" or empty. so we just need to write the component according to the
|
272
270
|
// model. we don't care about the componentFromFS
|
273
271
|
return {
|
274
|
-
componentFromFS: undefined,
|
275
272
|
componentFromModel: componentOnLane,
|
276
|
-
id
|
277
|
-
mergeResults: null
|
273
|
+
id
|
278
274
|
};
|
279
275
|
}
|
280
276
|
const currentlyUsedVersion = existingBitMapId.version;
|
@@ -314,7 +310,7 @@ async function getComponentStatus(consumer, id, switchProps) {
|
|
314
310
|
}
|
315
311
|
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
316
312
|
return {
|
317
|
-
|
313
|
+
currentComponent: component,
|
318
314
|
componentFromModel: componentOnLane,
|
319
315
|
id,
|
320
316
|
mergeResults
|
package/dist/switch-lanes.js.map
CHANGED
@@ -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","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","currentComponent","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(succeededComponents, ({ id, componentFromFS, mergeResults }) => {\n return applyVersion(this.consumer, id, componentFromFS, mergeResults, this.checkoutProps);\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.consumer);\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 { componentFromFS: undefined, componentFromModel: componentOnLane, id, mergeResults: null };\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 { componentFromFS: undefined, componentFromModel: componentOnLane, id, mergeResults: null };\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 { componentFromFS: 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;EA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I,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,KAAInH,uBAAY,EACnB,sBAAqBC,EAAE,CAACC,sBAAsB,EAAG,yDAAwD,CAC3G;IACH;IAEA,MAAMsH,cAAuB,GAAG,MAAM1B,cAAc,CAACW,WAAW,CAC9DJ,gBAAgB,CAACD,OAAO;IAAY;IACpCnH,QAAQ,CAACgD,KAAK,CAACgE,OAAO,CACvB;IACDrG,YAAY,GAAG,MAAM,IAAA6H,wBAAa,EAAC;MACjCxI,QAAQ;MACRuI,cAAc;MACdE,UAAU,EAAEtB,OAAO;MACnBuB,gBAAgB,EAAEhI,SAAS;MAC3BiI,YAAY,EAAG,GAAEd,oBAAqB,WAAU;MAChDC;IACF,CAAC,CAAC;EACJ;EACA;EACA,OAAO;IAAElG,eAAe,EAAElB,SAAS;IAAEiH,kBAAkB,EAAEJ,eAAe;IAAEvG,EAAE;IAAEL;EAAa,CAAC;AAC9F"}
|
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;E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B,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"}
|
Binary file
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/lanes",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.649",
|
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.
|
9
|
+
"version": "0.0.649"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -22,35 +22,35 @@
|
|
22
22
|
"@teambit/scope.ui.scope-icon": "0.0.91",
|
23
23
|
"@teambit/bit-error": "0.0.402",
|
24
24
|
"@teambit/component-version": "0.0.408",
|
25
|
-
"@teambit/lane-id": "0.0.
|
26
|
-
"@teambit/scope": "0.0.
|
27
|
-
"@teambit/snapping": "0.0.
|
28
|
-
"@teambit/lanes.ui.models.lanes-model": "0.0.
|
29
|
-
"@teambit/cli": "0.0.
|
30
|
-
"@teambit/workspace": "0.0.
|
31
|
-
"@teambit/express": "0.0.
|
32
|
-
"@teambit/logger": "0.0.
|
33
|
-
"@teambit/graphql": "0.0.
|
34
|
-
"@teambit/component-compare": "0.0.
|
35
|
-
"@teambit/component-writer": "0.0.
|
36
|
-
"@teambit/component": "0.0.
|
37
|
-
"@teambit/export": "0.0.
|
38
|
-
"@teambit/importer": "0.0.
|
39
|
-
"@teambit/lanes.entities.lane-diff": "0.0.
|
40
|
-
"@teambit/lanes.modules.diff": "0.0.
|
41
|
-
"@teambit/merging": "0.0.
|
42
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.
|
43
|
-
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.
|
44
|
-
"@teambit/lanes.ui.compare.lane-compare-page": "0.0.
|
45
|
-
"@teambit/lanes.ui.compare.lane-compare": "0.0.
|
46
|
-
"@teambit/lanes.ui.lane-overview": "0.0.
|
25
|
+
"@teambit/lane-id": "0.0.242",
|
26
|
+
"@teambit/scope": "0.0.1077",
|
27
|
+
"@teambit/snapping": "0.0.392",
|
28
|
+
"@teambit/lanes.ui.models.lanes-model": "0.0.142",
|
29
|
+
"@teambit/cli": "0.0.725",
|
30
|
+
"@teambit/workspace": "0.0.1077",
|
31
|
+
"@teambit/express": "0.0.823",
|
32
|
+
"@teambit/logger": "0.0.818",
|
33
|
+
"@teambit/graphql": "0.0.1077",
|
34
|
+
"@teambit/component-compare": "0.0.325",
|
35
|
+
"@teambit/component-writer": "0.0.113",
|
36
|
+
"@teambit/component": "0.0.1077",
|
37
|
+
"@teambit/export": "0.0.1077",
|
38
|
+
"@teambit/importer": "0.0.506",
|
39
|
+
"@teambit/lanes.entities.lane-diff": "0.0.87",
|
40
|
+
"@teambit/lanes.modules.diff": "0.0.360",
|
41
|
+
"@teambit/merging": "0.0.392",
|
42
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.189",
|
43
|
+
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.151",
|
44
|
+
"@teambit/lanes.ui.compare.lane-compare-page": "0.0.83",
|
45
|
+
"@teambit/lanes.ui.compare.lane-compare": "0.0.99",
|
46
|
+
"@teambit/lanes.ui.lane-overview": "0.0.143",
|
47
47
|
"@teambit/lanes.ui.menus.lanes-overview-menu": "0.0.5",
|
48
|
-
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.
|
49
|
-
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.
|
48
|
+
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.142",
|
49
|
+
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.144",
|
50
50
|
"@teambit/ui-foundation.ui.menu": "0.0.497",
|
51
51
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.501",
|
52
|
-
"@teambit/ui": "0.0.
|
53
|
-
"@teambit/checkout": "0.0.
|
52
|
+
"@teambit/ui": "0.0.1077",
|
53
|
+
"@teambit/checkout": "0.0.246"
|
54
54
|
},
|
55
55
|
"devDependencies": {
|
56
56
|
"@types/react": "^17.0.8",
|
@@ -62,13 +62,13 @@
|
|
62
62
|
"@types/react-dom": "^17.0.5",
|
63
63
|
"@types/jest": "^26.0.0",
|
64
64
|
"@types/testing-library__jest-dom": "5.9.5",
|
65
|
-
"@teambit/component.testing.mock-components": "0.0.
|
66
|
-
"@teambit/harmony.testing.load-aspect": "0.0.
|
65
|
+
"@teambit/component.testing.mock-components": "0.0.89",
|
66
|
+
"@teambit/harmony.testing.load-aspect": "0.0.88",
|
67
67
|
"@teambit/workspace.testing.mock-workspace": "0.0.14"
|
68
68
|
},
|
69
69
|
"peerDependencies": {
|
70
70
|
"react-router-dom": "^6.0.0",
|
71
|
-
"@teambit/legacy": "1.0.
|
71
|
+
"@teambit/legacy": "1.0.505",
|
72
72
|
"react": "^16.8.0 || ^17.0.0",
|
73
73
|
"react-dom": "^16.8.0 || ^17.0.0"
|
74
74
|
},
|
Binary file
|