@teambit/lanes 0.0.712 → 0.0.714
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.714/dist/lanes.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.714/dist/lanes.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/dist/switch-lanes.d.ts
CHANGED
package/dist/switch-lanes.js
CHANGED
@@ -111,9 +111,7 @@ class LaneSwitcher {
|
|
111
111
|
async populatePropsAccordingToRemoteLane(remoteLaneId) {
|
112
112
|
this.laneIdToSwitchTo = remoteLaneId;
|
113
113
|
this.logger.debug(`populatePropsAccordingToRemoteLane, remoteLaneId: ${remoteLaneId.toString()}`);
|
114
|
-
|
115
|
-
throw new (_bitError().BitError)(`already checked out to "${remoteLaneId.toString()}"`);
|
116
|
-
}
|
114
|
+
this.throwForSwitchingToCurrentLane();
|
117
115
|
const remoteLane = await this.Lanes.fetchLaneWithItsComponents(remoteLaneId);
|
118
116
|
this.switchProps.laneName = remoteLaneId.name;
|
119
117
|
this.switchProps.localTrackedLane = this.consumer.scope.lanes.getAliasByLaneId(remoteLaneId) || undefined;
|
@@ -123,19 +121,22 @@ class LaneSwitcher {
|
|
123
121
|
return remoteLane.components.map(l => l.id.changeVersion(l.head.toString()));
|
124
122
|
}
|
125
123
|
async populatePropsAccordingToDefaultLane() {
|
126
|
-
if (this.consumer.isOnMain()) {
|
127
|
-
throw new (_bitError().BitError)(`already checked out to "${this.switchProps.laneName}"`);
|
128
|
-
}
|
129
124
|
this.laneIdToSwitchTo = _laneId().LaneId.from(_laneId().DEFAULT_LANE, this.consumer.scope.name);
|
125
|
+
this.throwForSwitchingToCurrentLane();
|
130
126
|
}
|
131
127
|
populatePropsAccordingToLocalLane(localLane) {
|
132
|
-
if (this.consumer.getCurrentLaneId().name === this.switchProps.laneName) {
|
133
|
-
throw new (_bitError().BitError)(`already checked out to "${this.switchProps.laneName}"`);
|
134
|
-
}
|
135
128
|
this.laneIdToSwitchTo = localLane.toLaneId();
|
136
129
|
this.laneToSwitchTo = localLane;
|
130
|
+
this.throwForSwitchingToCurrentLane();
|
137
131
|
return localLane.components.map(c => c.id.changeVersion(c.head.toString()));
|
138
132
|
}
|
133
|
+
throwForSwitchingToCurrentLane() {
|
134
|
+
if (this.consumer.getCurrentLaneId().isEqual(this.laneIdToSwitchTo)) {
|
135
|
+
const laneIdStr = this.laneIdToSwitchTo.isDefault() ? this.laneIdToSwitchTo.name : this.laneIdToSwitchTo.toString();
|
136
|
+
throw new (_bitError().BitError)(`already checked out to "${laneIdStr}".
|
137
|
+
to be up to date with the remote lane, please run "bit checkout head""`);
|
138
|
+
}
|
139
|
+
}
|
139
140
|
async saveLanesData() {
|
140
141
|
var _this$laneToSwitchTo;
|
141
142
|
const localLaneName = this.switchProps.alias || this.laneIdToSwitchTo.name;
|
package/dist/switch-lanes.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_laneId","data","require","_bitId","_bitError","_createLane","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","LaneSwitcher","constructor","workspace","logger","switchProps","checkoutProps","Lanes","consumer","switch","setStatusLine","isOnMain","throwForStagedComponents","populateSwitchProps","bitMapIds","bitmapIdsFromCurrentLaneIncludeRemoved","idsToSwitch","ids","idsWithVersion","map","id","bitMapId","searchWithoutVersion","resolveMultipleComponentIds","allowAddingComponentsFromScope","versionPerId","lane","laneToSwitchTo","results","checkout","saveLanesData","onDestroy","laneId","scope","lanes","parseLaneIdFromString","laneName","localLane","loadLane","mainIds","getIdsOfDefaultLane","isDefault","populatePropsAccordingToDefaultLane","laneIds","populatePropsAccordingToLocalLane","populatePropsAccordingToRemoteLane","idsOnLaneOnly","find","isEqualWithoutVersion","idsOnMainOnly","laneBitIds","pattern","bitMap","getAllBitIdsFromAllLanes","BitError","allIds","patternIds","filterIdsFromPoolIdsByPattern","_legacy","remoteLaneId","laneIdToSwitchTo","debug","toString","getCurrentLaneId","isEqual","remoteLane","fetchLaneWithItsComponents","name","localTrackedLane","getAliasByLaneId","undefined","components","l","changeVersion","head","LaneId","from","DEFAULT_LANE","toLaneId","c","_this$laneToSwitchTo","localLaneName","alias","trackLane","remoteScope","setCurrentLane","isNew","syncWithIds","BitIds","fromArray","exports"],"sources":["switch-lanes.ts"],"sourcesContent":["import { Consumer } from '@teambit/legacy/dist/consumer';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { ApplyVersionResults } from '@teambit/merging';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { Lane } from '@teambit/legacy/dist/scope/models';\nimport { CheckoutPropsLegacy, CheckoutProps } from '@teambit/checkout';\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 laneBitIds?: BitId[]; // only needed for the deprecated onLanesOnly prop. once this prop is removed, this prop can be removed as well.\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 bitMapIds = this.workspace.consumer.bitmapIdsFromCurrentLaneIncludeRemoved;\n const idsToSwitch = this.switchProps.ids || [];\n const idsWithVersion = idsToSwitch.map((id) => {\n const bitMapId = bitMapIds.searchWithoutVersion(id);\n return bitMapId || id;\n });\n const ids = await this.workspace.resolveMultipleComponentIds(idsWithVersion);\n\n const checkoutProps: CheckoutProps = {\n ...this.checkoutProps,\n ids,\n allowAddingComponentsFromScope: true,\n versionPerId: await this.workspace.resolveMultipleComponentIds(idsToSwitch),\n lane: this.laneToSwitchTo,\n };\n\n const results = await this.Lanes.checkout.checkout(checkoutProps);\n\n await this.saveLanesData();\n await this.consumer.onDestroy();\n\n return results;\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 const mainIds = await this.consumer.getIdsOfDefaultLane();\n if (laneId.isDefault()) {\n await this.populatePropsAccordingToDefaultLane();\n this.switchProps.ids = mainIds;\n } else {\n const laneIds = localLane\n ? this.populatePropsAccordingToLocalLane(localLane)\n : await this.populatePropsAccordingToRemoteLane(laneId);\n const idsOnLaneOnly = laneIds.filter((id) => !mainIds.find((i) => i.isEqualWithoutVersion(id)));\n const idsOnMainOnly = mainIds.filter((id) => !laneIds.find((i) => i.isEqualWithoutVersion(id)));\n this.switchProps.ids = [...idsOnMainOnly, ...laneIds];\n this.switchProps.laneBitIds = idsOnLaneOnly;\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): Promise<BitId[]> {\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.localTrackedLane = this.consumer.scope.lanes.getAliasByLaneId(remoteLaneId) || undefined;\n this.switchProps.remoteLane = remoteLane;\n this.laneToSwitchTo = remoteLane;\n this.logger.debug(`populatePropsAccordingToRemoteLane, completed`);\n return remoteLane.components.map((l) => l.id.changeVersion(l.head.toString()));\n }\n\n private async populatePropsAccordingToDefaultLane() {\n if (this.consumer.isOnMain()) {\n throw new BitError(`already checked out to \"${this.switchProps.laneName}\"`);\n }\n this.laneIdToSwitchTo = LaneId.from(DEFAULT_LANE, this.consumer.scope.name);\n }\n\n private populatePropsAccordingToLocalLane(localLane: Lane): BitId[] {\n if (this.consumer.getCurrentLaneId().name === this.switchProps.laneName) {\n throw new BitError(`already checked out to \"${this.switchProps.laneName}\"`);\n }\n this.laneIdToSwitchTo = localLane.toLaneId();\n this.laneToSwitchTo = localLane;\n return localLane.components.map((c) => c.id.changeVersion(c.head.toString()));\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.syncWithIds(\n BitIds.fromArray(this.switchProps.ids || []),\n BitIds.fromArray(this.switchProps.laneBitIds || [])\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyD,SAAAK,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,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W,CAAC6E,KAAK,IAAI,IAAI,CAACtB,gBAAgB,CAACO,IAAI;IAC1E,IAAI,IAAI,CAAC9D,WAAW,CAAC4D,UAAU,EAAE;MAC/B,IAAI,CAAC,IAAI,CAAC5D,WAAW,CAAC+D,gBAAgB,EAAE;QACtC,IAAI,CAAC5D,QAAQ,CAACyB,KAAK,CAACC,KAAK,CAACiD,SAAS,CAAC;UAClC9C,SAAS,EAAE4C,aAAa;UACxBhB,UAAU,EAAE,IAAI,CAACL,gBAAgB,CAACO,IAAI;UACtCiB,WAAW,EAAE,IAAI,CAACxB,gBAAgB,CAAC3B;QACrC,CAAC,CAAC;MACJ;IACF;IAEA,IAAI,CAACzB,QAAQ,CAAC6E,cAAc,CAAC,IAAI,CAACzB,gBAAgB,EAAE,GAAAoB,oBAAA,GAAC,IAAI,CAACrD,cAAc,cAAAqD,oBAAA,eAAnBA,oBAAA,CAAqBM,KAAK,EAAC;IAChF,IAAI,CAAC9E,QAAQ,CAAC4C,MAAM,CAACmC,WAAW,CAC9BC,eAAM,CAACC,SAAS,CAAC,IAAI,CAACpF,WAAW,CAACY,GAAG,IAAI,EAAE,CAAC,EAC5CuE,eAAM,CAACC,SAAS,CAAC,IAAI,CAACpF,WAAW,CAAC6C,UAAU,IAAI,EAAE,CACpD,CAAC;EACH;AACF;AAACwC,OAAA,CAAAzF,YAAA,GAAAA,YAAA"}
|
1
|
+
{"version":3,"names":["_laneId","data","require","_bitId","_bitError","_createLane","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","LaneSwitcher","constructor","workspace","logger","switchProps","checkoutProps","Lanes","consumer","switch","setStatusLine","isOnMain","throwForStagedComponents","populateSwitchProps","bitMapIds","bitmapIdsFromCurrentLaneIncludeRemoved","idsToSwitch","ids","idsWithVersion","map","id","bitMapId","searchWithoutVersion","resolveMultipleComponentIds","allowAddingComponentsFromScope","versionPerId","lane","laneToSwitchTo","results","checkout","saveLanesData","onDestroy","laneId","scope","lanes","parseLaneIdFromString","laneName","localLane","loadLane","mainIds","getIdsOfDefaultLane","isDefault","populatePropsAccordingToDefaultLane","laneIds","populatePropsAccordingToLocalLane","populatePropsAccordingToRemoteLane","idsOnLaneOnly","find","isEqualWithoutVersion","idsOnMainOnly","laneBitIds","pattern","bitMap","getAllBitIdsFromAllLanes","BitError","allIds","patternIds","filterIdsFromPoolIdsByPattern","_legacy","remoteLaneId","laneIdToSwitchTo","debug","toString","throwForSwitchingToCurrentLane","remoteLane","fetchLaneWithItsComponents","name","localTrackedLane","getAliasByLaneId","undefined","components","l","changeVersion","head","LaneId","from","DEFAULT_LANE","toLaneId","c","getCurrentLaneId","isEqual","laneIdStr","_this$laneToSwitchTo","localLaneName","alias","trackLane","remoteScope","setCurrentLane","isNew","syncWithIds","BitIds","fromArray","exports"],"sources":["switch-lanes.ts"],"sourcesContent":["import { Consumer } from '@teambit/legacy/dist/consumer';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { ApplyVersionResults } from '@teambit/merging';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { Lane } from '@teambit/legacy/dist/scope/models';\nimport { CheckoutPropsLegacy, CheckoutProps } from '@teambit/checkout';\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 laneBitIds?: BitId[]; // only needed for the deprecated onLanesOnly prop. once this prop is removed, this prop can be removed as well.\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 bitMapIds = this.workspace.consumer.bitmapIdsFromCurrentLaneIncludeRemoved;\n const idsToSwitch = this.switchProps.ids || [];\n const idsWithVersion = idsToSwitch.map((id) => {\n const bitMapId = bitMapIds.searchWithoutVersion(id);\n return bitMapId || id;\n });\n const ids = await this.workspace.resolveMultipleComponentIds(idsWithVersion);\n\n const checkoutProps: CheckoutProps = {\n ...this.checkoutProps,\n ids,\n allowAddingComponentsFromScope: true,\n versionPerId: await this.workspace.resolveMultipleComponentIds(idsToSwitch),\n lane: this.laneToSwitchTo,\n };\n\n const results = await this.Lanes.checkout.checkout(checkoutProps);\n\n await this.saveLanesData();\n await this.consumer.onDestroy();\n\n return results;\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 const mainIds = await this.consumer.getIdsOfDefaultLane();\n if (laneId.isDefault()) {\n await this.populatePropsAccordingToDefaultLane();\n this.switchProps.ids = mainIds;\n } else {\n const laneIds = localLane\n ? this.populatePropsAccordingToLocalLane(localLane)\n : await this.populatePropsAccordingToRemoteLane(laneId);\n const idsOnLaneOnly = laneIds.filter((id) => !mainIds.find((i) => i.isEqualWithoutVersion(id)));\n const idsOnMainOnly = mainIds.filter((id) => !laneIds.find((i) => i.isEqualWithoutVersion(id)));\n this.switchProps.ids = [...idsOnMainOnly, ...laneIds];\n this.switchProps.laneBitIds = idsOnLaneOnly;\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): Promise<BitId[]> {\n this.laneIdToSwitchTo = remoteLaneId;\n this.logger.debug(`populatePropsAccordingToRemoteLane, remoteLaneId: ${remoteLaneId.toString()}`);\n this.throwForSwitchingToCurrentLane();\n const remoteLane = await this.Lanes.fetchLaneWithItsComponents(remoteLaneId);\n this.switchProps.laneName = remoteLaneId.name;\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 return remoteLane.components.map((l) => l.id.changeVersion(l.head.toString()));\n }\n\n private async populatePropsAccordingToDefaultLane() {\n this.laneIdToSwitchTo = LaneId.from(DEFAULT_LANE, this.consumer.scope.name);\n this.throwForSwitchingToCurrentLane();\n }\n\n private populatePropsAccordingToLocalLane(localLane: Lane): BitId[] {\n this.laneIdToSwitchTo = localLane.toLaneId();\n this.laneToSwitchTo = localLane;\n this.throwForSwitchingToCurrentLane();\n return localLane.components.map((c) => c.id.changeVersion(c.head.toString()));\n }\n\n private throwForSwitchingToCurrentLane() {\n if (this.consumer.getCurrentLaneId().isEqual(this.laneIdToSwitchTo)) {\n const laneIdStr = this.laneIdToSwitchTo.isDefault()\n ? this.laneIdToSwitchTo.name\n : this.laneIdToSwitchTo.toString();\n throw new BitError(`already checked out to \"${laneIdStr}\".\nto be up to date with the remote lane, please run \"bit checkout head\"\"`);\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.syncWithIds(\n BitIds.fromArray(this.switchProps.ids || []),\n BitIds.fromArray(this.switchProps.laneBitIds || [])\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyD,SAAAK,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,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C,IAAI,CAAC3D,WAAW,CAAC8D,gBAAgB,EAAE;QACtC,IAAI,CAAC3D,QAAQ,CAACyB,KAAK,CAACC,KAAK,CAACmD,SAAS,CAAC;UAClChD,SAAS,EAAE8C,aAAa;UACxBnB,UAAU,EAAE,IAAI,CAACJ,gBAAgB,CAACM,IAAI;UACtCoB,WAAW,EAAE,IAAI,CAAC1B,gBAAgB,CAAC3B;QACrC,CAAC,CAAC;MACJ;IACF;IAEA,IAAI,CAACzB,QAAQ,CAAC+E,cAAc,CAAC,IAAI,CAAC3B,gBAAgB,EAAE,GAAAsB,oBAAA,GAAC,IAAI,CAACvD,cAAc,cAAAuD,oBAAA,eAAnBA,oBAAA,CAAqBM,KAAK,EAAC;IAChF,IAAI,CAAChF,QAAQ,CAAC4C,MAAM,CAACqC,WAAW,CAC9BC,eAAM,CAACC,SAAS,CAAC,IAAI,CAACtF,WAAW,CAACY,GAAG,IAAI,EAAE,CAAC,EAC5CyE,eAAM,CAACC,SAAS,CAAC,IAAI,CAACtF,WAAW,CAAC6C,UAAU,IAAI,EAAE,CACpD,CAAC;EACH;AACF;AAAC0C,OAAA,CAAA3F,YAAA,GAAAA,YAAA"}
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/lanes",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.714",
|
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.714"
|
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": "1.0.0",
|
26
|
-
"@teambit/lane-id": "0.0.
|
27
|
-
"@teambit/scope": "0.0.
|
28
|
-
"@teambit/snapping": "0.0.
|
29
|
-
"@teambit/workspace": "0.0.
|
30
|
-
"@teambit/lanes.ui.models.lanes-model": "0.0.
|
31
|
-
"@teambit/cli": "0.0.
|
32
|
-
"@teambit/express": "0.0.
|
33
|
-
"@teambit/logger": "0.0.
|
34
|
-
"@teambit/graphql": "0.0.
|
35
|
-
"@teambit/checkout": "0.0.
|
36
|
-
"@teambit/component-compare": "0.0.
|
37
|
-
"@teambit/component-writer": "0.0.
|
38
|
-
"@teambit/component": "0.0.
|
39
|
-
"@teambit/export": "0.0.
|
40
|
-
"@teambit/importer": "0.0.
|
41
|
-
"@teambit/lanes.entities.lane-diff": "0.0.
|
42
|
-
"@teambit/lanes.modules.diff": "0.0.
|
43
|
-
"@teambit/merging": "0.0.
|
44
|
-
"@teambit/remove": "0.0.
|
45
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.
|
46
|
-
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.
|
47
|
-
"@teambit/lanes.ui.compare.lane-compare-page": "0.0.
|
48
|
-
"@teambit/lanes.ui.compare.lane-compare": "0.0.
|
49
|
-
"@teambit/lanes.ui.lane-overview": "0.0.
|
26
|
+
"@teambit/lane-id": "0.0.280",
|
27
|
+
"@teambit/scope": "0.0.1142",
|
28
|
+
"@teambit/snapping": "0.0.457",
|
29
|
+
"@teambit/workspace": "0.0.1142",
|
30
|
+
"@teambit/lanes.ui.models.lanes-model": "0.0.180",
|
31
|
+
"@teambit/cli": "0.0.765",
|
32
|
+
"@teambit/express": "0.0.863",
|
33
|
+
"@teambit/logger": "0.0.858",
|
34
|
+
"@teambit/graphql": "0.0.1142",
|
35
|
+
"@teambit/checkout": "0.0.311",
|
36
|
+
"@teambit/component-compare": "0.0.390",
|
37
|
+
"@teambit/component-writer": "0.0.178",
|
38
|
+
"@teambit/component": "0.0.1142",
|
39
|
+
"@teambit/export": "0.0.1142",
|
40
|
+
"@teambit/importer": "0.0.571",
|
41
|
+
"@teambit/lanes.entities.lane-diff": "0.0.125",
|
42
|
+
"@teambit/lanes.modules.diff": "0.0.398",
|
43
|
+
"@teambit/merging": "0.0.457",
|
44
|
+
"@teambit/remove": "0.0.319",
|
45
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.227",
|
46
|
+
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.189",
|
47
|
+
"@teambit/lanes.ui.compare.lane-compare-page": "0.0.123",
|
48
|
+
"@teambit/lanes.ui.compare.lane-compare": "0.0.141",
|
49
|
+
"@teambit/lanes.ui.lane-overview": "0.0.182",
|
50
50
|
"@teambit/lanes.ui.menus.lanes-overview-menu": "0.0.5",
|
51
|
-
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.
|
52
|
-
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.
|
51
|
+
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.180",
|
52
|
+
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.184",
|
53
53
|
"@teambit/ui-foundation.ui.menu": "0.0.497",
|
54
54
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.501",
|
55
55
|
"@teambit/ui-foundation.ui.react-router.use-query": "0.0.496",
|
56
|
-
"@teambit/ui": "0.0.
|
56
|
+
"@teambit/ui": "0.0.1142"
|
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.
|
69
|
-
"@teambit/harmony.testing.load-aspect": "0.0.
|
68
|
+
"@teambit/component.testing.mock-components": "0.0.127",
|
69
|
+
"@teambit/harmony.testing.load-aspect": "0.0.126",
|
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.
|
74
|
+
"@teambit/legacy": "1.0.549",
|
75
75
|
"react": "^16.8.0 || ^17.0.0",
|
76
76
|
"react-dom": "^16.8.0 || ^17.0.0"
|
77
77
|
},
|