@teambit/lanes 1.0.699 → 1.0.701
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/8891be5ad/teambit.lanes_lanes@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.701/dist/lanes.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.701/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
@@ -157,6 +157,12 @@ to be up to date with the remote lane, please run "bit checkout head"`);
|
|
157
157
|
}
|
158
158
|
this.consumer.setCurrentLane(this.laneIdToSwitchTo, !this.laneToSwitchTo?.isNew);
|
159
159
|
this.consumer.bitMap.syncWithIds(_componentId().ComponentIdList.fromArray(this.switchProps.ids || []), _componentId().ComponentIdList.fromArray(this.switchProps.laneBitIds || []));
|
160
|
+
|
161
|
+
// If this cache isn't cleared, here's what can happen:
|
162
|
+
// Switching from "lane-dev" to "main": while on "lane-dev", ModelComponent keeps in-memory props
|
163
|
+
// `laneHeadLocal` and `laneHeadRemote`. Methods like `headIncludeRemote()` use them and may return
|
164
|
+
// the lane-dev head instead of the head on main.
|
165
|
+
this.consumer.scope.objects.clearObjectsFromCache();
|
160
166
|
}
|
161
167
|
}
|
162
168
|
exports.LaneSwitcher = LaneSwitcher;
|
package/dist/switch-lanes.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_laneId","data","require","_componentId","_bitError","_lanesModules","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LaneSwitcher","constructor","workspace","logger","switchProps","checkoutProps","lanes","consumer","switch","setStatusLine","isOnMain","throwForStagedComponents","populateSwitchProps","bitMapIds","bitmapIdsFromCurrentLaneIncludeRemoved","idsToSwitch","ids","map","id","bitMapId","searchWithoutVersion","allowAddingComponentsFromScope","versionPerId","resolveMultipleComponentIds","lane","laneToSwitchTo","results","checkout","saveLanesData","onDestroy","laneId","scope","parseLaneIdFromString","laneName","localLane","loadLane","getMainIds","head","allIds","listIds","legacyScope","scopeImporter","importWithoutDeps","cache","ignoreMissingHead","getIdsOfDefaultLane","mainIds","isDefault","populatePropsAccordingToDefaultLane","laneIds","populatePropsAccordingToLocalLane","populatePropsAccordingToRemoteLane","idsOnLaneOnly","find","isEqualWithoutVersion","idsOnMainOnly","laneBitIds","populateIdsAccordingToPattern","pattern","bitMap","getAllBitIdsFromAllLanes","BitError","filterIdsFromPoolIdsByPattern","remoteLaneId","laneIdToSwitchTo","debug","toString","throwForSwitchingToCurrentLane","remoteLane","fetchLaneWithItsComponents","name","localTrackedLane","getAliasByLaneId","undefined","components","l","changeVersion","LaneId","from","DEFAULT_LANE","toLaneId","c","getCurrentLaneId","isEqual","laneIdStr","localLaneName","alias","trackLane","remoteScope","setCurrentLane","isNew","syncWithIds","ComponentIdList","fromArray","exports"],"sources":["switch-lanes.ts"],"sourcesContent":["import type { Consumer } from '@teambit/legacy.consumer';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport type { ComponentID } from '@teambit/component-id';\nimport { ComponentIdList } from '@teambit/component-id';\nimport type { ApplyVersionResults } from '@teambit/component.modules.merge-helper';\nimport type { Lane } from '@teambit/objects';\nimport type { CheckoutProps } from '@teambit/checkout';\nimport type { Workspace } from '@teambit/workspace';\nimport type { Logger } from '@teambit/logger';\nimport { BitError } from '@teambit/bit-error';\nimport { throwForStagedComponents } from '@teambit/lanes.modules.create-lane';\nimport type { LanesMain } from './lanes.main.runtime';\n\nexport type SwitchProps = {\n laneName: string;\n ids?: ComponentID[];\n laneBitIds?: ComponentID[]; // only needed for the deprecated onLanesOnly prop. once this prop is removed, this prop can be removed as well.\n pattern?: string;\n head?: boolean;\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.workspace);\n }\n await this.populateSwitchProps();\n const bitMapIds = this.workspace.consumer.bitmapIdsFromCurrentLaneIncludeRemoved;\n const idsToSwitch = this.switchProps.ids || [];\n const ids = idsToSwitch.map((id) => {\n const bitMapId = bitMapIds.searchWithoutVersion(id);\n return bitMapId || id;\n });\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('lane-switch');\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 getMainIds = async () => {\n if (this.switchProps.head) {\n const allIds = this.workspace.listIds();\n await this.workspace.scope.legacyScope.scopeImporter.importWithoutDeps(allIds, {\n cache: false,\n ignoreMissingHead: true,\n });\n return this.consumer.getIdsOfDefaultLane();\n }\n const mainIds = await this.consumer.getIdsOfDefaultLane();\n return mainIds;\n };\n const mainIds = await getMainIds();\n if (laneId.isDefault()) {\n await this.populatePropsAccordingToDefaultLane();\n this.switchProps.ids = mainIds;\n } else {\n const laneIds =\n localLane && !this.switchProps.head\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 await this.populateIdsAccordingToPattern();\n }\n\n private async populateIdsAccordingToPattern() {\n if (!this.switchProps.pattern) {\n return;\n }\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 = this.switchProps.ids || [];\n this.switchProps.ids = await this.workspace.filterIdsFromPoolIdsByPattern(this.switchProps.pattern, allIds);\n }\n\n private async populatePropsAccordingToRemoteLane(remoteLaneId: LaneId): Promise<ComponentID[]> {\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): ComponentID[] {\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 ComponentIdList.fromArray(this.switchProps.ids || []),\n ComponentIdList.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;AAEA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAF,IAA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I,CAACN,gBAAgB,CAACE,QAAQ,CAAC,CAAC;MACpC,MAAM,KAAIL,oBAAQ,EAAC,2BAA2BuB,SAAS;AAC7D,sEAAsE,CAAC;IACnE;EACF;EAEA,MAAcxD,aAAaA,CAAA,EAAG;IAC5B,MAAMyD,aAAa,GAAG,IAAI,CAACjF,WAAW,CAACkF,KAAK,IAAI,IAAI,CAACtB,gBAAgB,CAACM,IAAI;IAC1E,IAAI,IAAI,CAAClE,WAAW,CAACgE,UAAU,EAAE;MAC/B,IAAI,CAAC,IAAI,CAAChE,WAAW,CAACmE,gBAAgB,EAAE;QACtC,IAAI,CAAChE,QAAQ,CAACwB,KAAK,CAACzB,KAAK,CAACiF,SAAS,CAAC;UAClCrD,SAAS,EAAEmD,aAAa;UACxBjB,UAAU,EAAE,IAAI,CAACJ,gBAAgB,CAACM,IAAI;UACtCkB,WAAW,EAAE,IAAI,CAACxB,gBAAgB,CAACjC;QACrC,CAAC,CAAC;MACJ;IACF;IAEA,IAAI,CAACxB,QAAQ,CAACkF,cAAc,CAAC,IAAI,CAACzB,gBAAgB,EAAE,CAAC,IAAI,CAACvC,cAAc,EAAEiE,KAAK,CAAC;IAChF,IAAI,CAACnF,QAAQ,CAACoD,MAAM,CAACgC,WAAW,CAC9BC,8BAAe,CAACC,SAAS,CAAC,IAAI,CAACzF,WAAW,CAACY,GAAG,IAAI,EAAE,CAAC,EACrD4E,8BAAe,CAACC,SAAS,CAAC,IAAI,CAACzF,WAAW,CAACoD,UAAU,IAAI,EAAE,CAC7D,CAAC;EACH;AACF;AAACsC,OAAA,CAAA9F,YAAA,GAAAA,YAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_laneId","data","require","_componentId","_bitError","_lanesModules","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LaneSwitcher","constructor","workspace","logger","switchProps","checkoutProps","lanes","consumer","switch","setStatusLine","isOnMain","throwForStagedComponents","populateSwitchProps","bitMapIds","bitmapIdsFromCurrentLaneIncludeRemoved","idsToSwitch","ids","map","id","bitMapId","searchWithoutVersion","allowAddingComponentsFromScope","versionPerId","resolveMultipleComponentIds","lane","laneToSwitchTo","results","checkout","saveLanesData","onDestroy","laneId","scope","parseLaneIdFromString","laneName","localLane","loadLane","getMainIds","head","allIds","listIds","legacyScope","scopeImporter","importWithoutDeps","cache","ignoreMissingHead","getIdsOfDefaultLane","mainIds","isDefault","populatePropsAccordingToDefaultLane","laneIds","populatePropsAccordingToLocalLane","populatePropsAccordingToRemoteLane","idsOnLaneOnly","find","isEqualWithoutVersion","idsOnMainOnly","laneBitIds","populateIdsAccordingToPattern","pattern","bitMap","getAllBitIdsFromAllLanes","BitError","filterIdsFromPoolIdsByPattern","remoteLaneId","laneIdToSwitchTo","debug","toString","throwForSwitchingToCurrentLane","remoteLane","fetchLaneWithItsComponents","name","localTrackedLane","getAliasByLaneId","undefined","components","l","changeVersion","LaneId","from","DEFAULT_LANE","toLaneId","c","getCurrentLaneId","isEqual","laneIdStr","localLaneName","alias","trackLane","remoteScope","setCurrentLane","isNew","syncWithIds","ComponentIdList","fromArray","objects","clearObjectsFromCache","exports"],"sources":["switch-lanes.ts"],"sourcesContent":["import type { Consumer } from '@teambit/legacy.consumer';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport type { ComponentID } from '@teambit/component-id';\nimport { ComponentIdList } from '@teambit/component-id';\nimport type { ApplyVersionResults } from '@teambit/component.modules.merge-helper';\nimport type { Lane } from '@teambit/objects';\nimport type { CheckoutProps } from '@teambit/checkout';\nimport type { Workspace } from '@teambit/workspace';\nimport type { Logger } from '@teambit/logger';\nimport { BitError } from '@teambit/bit-error';\nimport { throwForStagedComponents } from '@teambit/lanes.modules.create-lane';\nimport type { LanesMain } from './lanes.main.runtime';\n\nexport type SwitchProps = {\n laneName: string;\n ids?: ComponentID[];\n laneBitIds?: ComponentID[]; // only needed for the deprecated onLanesOnly prop. once this prop is removed, this prop can be removed as well.\n pattern?: string;\n head?: boolean;\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.workspace);\n }\n await this.populateSwitchProps();\n const bitMapIds = this.workspace.consumer.bitmapIdsFromCurrentLaneIncludeRemoved;\n const idsToSwitch = this.switchProps.ids || [];\n const ids = idsToSwitch.map((id) => {\n const bitMapId = bitMapIds.searchWithoutVersion(id);\n return bitMapId || id;\n });\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('lane-switch');\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 getMainIds = async () => {\n if (this.switchProps.head) {\n const allIds = this.workspace.listIds();\n await this.workspace.scope.legacyScope.scopeImporter.importWithoutDeps(allIds, {\n cache: false,\n ignoreMissingHead: true,\n });\n return this.consumer.getIdsOfDefaultLane();\n }\n const mainIds = await this.consumer.getIdsOfDefaultLane();\n return mainIds;\n };\n const mainIds = await getMainIds();\n if (laneId.isDefault()) {\n await this.populatePropsAccordingToDefaultLane();\n this.switchProps.ids = mainIds;\n } else {\n const laneIds =\n localLane && !this.switchProps.head\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 await this.populateIdsAccordingToPattern();\n }\n\n private async populateIdsAccordingToPattern() {\n if (!this.switchProps.pattern) {\n return;\n }\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 = this.switchProps.ids || [];\n this.switchProps.ids = await this.workspace.filterIdsFromPoolIdsByPattern(this.switchProps.pattern, allIds);\n }\n\n private async populatePropsAccordingToRemoteLane(remoteLaneId: LaneId): Promise<ComponentID[]> {\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): ComponentID[] {\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 ComponentIdList.fromArray(this.switchProps.ids || []),\n ComponentIdList.fromArray(this.switchProps.laneBitIds || [])\n );\n\n // If this cache isn't cleared, here's what can happen:\n // Switching from \"lane-dev\" to \"main\": while on \"lane-dev\", ModelComponent keeps in-memory props\n // `laneHeadLocal` and `laneHeadRemote`. Methods like `headIncludeRemote()` use them and may return\n // the lane-dev head instead of the head on main.\n this.consumer.scope.objects.clearObjectsFromCache();\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,aAAA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
1
|
{
|
2
2
|
"name": "@teambit/lanes",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.701",
|
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": "1.0.
|
9
|
+
"version": "1.0.701"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "4.1.2",
|
@@ -21,26 +21,15 @@
|
|
21
21
|
"group-array": "1.0.0",
|
22
22
|
"@teambit/lanes.ui.models.lanes-model": "0.0.229",
|
23
23
|
"@teambit/bit-error": "0.0.404",
|
24
|
-
"@teambit/cli": "0.0.1258",
|
25
24
|
"@teambit/lane-id": "0.0.312",
|
26
25
|
"@teambit/legacy.cli.prompts": "0.0.21",
|
27
26
|
"@teambit/legacy.constants": "0.0.14",
|
28
|
-
"@teambit/legacy.scope": "0.0.65",
|
29
27
|
"@teambit/harmony": "0.4.7",
|
30
|
-
"@teambit/express": "0.0.1357",
|
31
|
-
"@teambit/logger": "0.0.1351",
|
32
28
|
"@teambit/component-id": "1.2.4",
|
33
|
-
"@teambit/component.modules.merge-helper": "0.0.5",
|
34
|
-
"@teambit/component.snap-distance": "0.0.66",
|
35
29
|
"@teambit/git.modules.git-executable": "0.0.15",
|
36
30
|
"@teambit/harmony.modules.concurrency": "0.0.15",
|
37
31
|
"@teambit/lanes.entities.lane-diff": "0.0.178",
|
38
|
-
"@teambit/lanes.modules.create-lane": "0.0.99",
|
39
|
-
"@teambit/lanes.modules.diff": "0.0.563",
|
40
32
|
"@teambit/legacy-bit-id": "1.1.3",
|
41
|
-
"@teambit/legacy.component-diff": "0.0.119",
|
42
|
-
"@teambit/legacy.component-list": "0.0.119",
|
43
|
-
"@teambit/scope.remotes": "0.0.65",
|
44
33
|
"@teambit/design.ui.pages.not-found": "0.0.371",
|
45
34
|
"@teambit/lanes.hooks.use-lanes": "0.0.290",
|
46
35
|
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.243",
|
@@ -54,34 +43,45 @@
|
|
54
43
|
"@teambit/lanes.ui.compare.lane-compare-page": "0.0.172",
|
55
44
|
"@teambit/lanes.ui.compare.lane-compare": "0.0.205",
|
56
45
|
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.235",
|
57
|
-
"@teambit/
|
58
|
-
"@teambit/
|
59
|
-
"@teambit/
|
60
|
-
"@teambit/
|
61
|
-
"@teambit/scope": "1.0.
|
62
|
-
"@teambit/workspace": "1.0.
|
63
|
-
"@teambit/
|
64
|
-
"@teambit/
|
65
|
-
"@teambit/
|
66
|
-
"@teambit/component": "1.0.
|
67
|
-
"@teambit/
|
68
|
-
"@teambit/
|
69
|
-
"@teambit/
|
70
|
-
"@teambit/
|
71
|
-
"@teambit/
|
72
|
-
"@teambit/
|
73
|
-
"@teambit/
|
46
|
+
"@teambit/checkout": "1.0.700",
|
47
|
+
"@teambit/cli": "0.0.1259",
|
48
|
+
"@teambit/importer": "1.0.700",
|
49
|
+
"@teambit/legacy.scope": "0.0.66",
|
50
|
+
"@teambit/scope": "1.0.700",
|
51
|
+
"@teambit/workspace": "1.0.700",
|
52
|
+
"@teambit/express": "0.0.1358",
|
53
|
+
"@teambit/logger": "0.0.1352",
|
54
|
+
"@teambit/graphql": "1.0.700",
|
55
|
+
"@teambit/component-compare": "1.0.700",
|
56
|
+
"@teambit/component-writer": "1.0.700",
|
57
|
+
"@teambit/component.modules.merge-helper": "0.0.6",
|
58
|
+
"@teambit/component.snap-distance": "0.0.67",
|
59
|
+
"@teambit/component": "1.0.700",
|
60
|
+
"@teambit/export": "1.0.700",
|
61
|
+
"@teambit/install": "1.0.700",
|
62
|
+
"@teambit/lanes.modules.create-lane": "0.0.100",
|
63
|
+
"@teambit/lanes.modules.diff": "0.0.564",
|
64
|
+
"@teambit/legacy.component-diff": "0.0.120",
|
65
|
+
"@teambit/legacy.component-list": "0.0.120",
|
66
|
+
"@teambit/merging": "1.0.700",
|
67
|
+
"@teambit/objects": "0.0.207",
|
68
|
+
"@teambit/remove": "1.0.700",
|
69
|
+
"@teambit/scope.remotes": "0.0.66",
|
70
|
+
"@teambit/command-bar": "1.0.700",
|
71
|
+
"@teambit/ui": "1.0.700",
|
72
|
+
"@teambit/legacy.consumer": "0.0.66",
|
73
|
+
"@teambit/scope.network": "0.0.66"
|
74
74
|
},
|
75
75
|
"devDependencies": {
|
76
76
|
"@types/lodash": "4.14.165",
|
77
77
|
"@types/fs-extra": "9.0.7",
|
78
78
|
"@types/mocha": "9.1.0",
|
79
|
-
"@teambit/component.testing.mock-components": "0.0.329",
|
80
|
-
"@teambit/harmony.testing.load-aspect": "0.0.324",
|
81
|
-
"@teambit/workspace.testing.mock-workspace": "0.0.111",
|
82
79
|
"@teambit/harmony.envs.core-aspect-env": "0.0.75",
|
83
|
-
"@teambit/
|
84
|
-
"@teambit/
|
80
|
+
"@teambit/component.testing.mock-components": "0.0.330",
|
81
|
+
"@teambit/harmony.testing.load-aspect": "0.0.325",
|
82
|
+
"@teambit/merge-lanes": "1.0.701",
|
83
|
+
"@teambit/snapping": "1.0.700",
|
84
|
+
"@teambit/workspace.testing.mock-workspace": "0.0.112"
|
85
85
|
},
|
86
86
|
"peerDependencies": {
|
87
87
|
"react": "^17.0.0 || ^18.0.0",
|