@teambit/lanes 1.0.506 → 1.0.507

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,27 +1,27 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="18" failures="0" errors="0" skipped="2">
3
- <testsuite name="teambit.lanes/lanes@1.0.506" tests="18" failures="0" errors="0" skipped="2">
3
+ <testsuite name="teambit.lanes/lanes@1.0.507" tests="18" failures="0" errors="0" skipped="2">
4
4
  <testcase classname="dist/lanes.spec.js" name="should list all lanes" time="0.002"/>
5
- <testcase classname="dist/lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.013"/>
6
- <testcase classname="dist/lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="1.831"/>
7
- <testcase classname="dist/lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.596"/>
8
- <testcase classname="dist/lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="1.293"/>
9
- <testcase classname="dist/lanes.spec.js" name="should restore the deleted lane"/>
5
+ <testcase classname="dist/lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.018"/>
6
+ <testcase classname="dist/lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="2.163"/>
7
+ <testcase classname="dist/lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.61"/>
8
+ <testcase classname="dist/lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="1.344"/>
9
+ <testcase classname="dist/lanes.spec.js" name="should restore the deleted lane" time="0.001"/>
10
10
  <testcase classname="dist/lanes.spec.js" name="should not throw"/>
11
- <testcase classname="dist/lanes.spec.js" name="should throw when restoring the lane" time="0.002"/>
12
- <testcase classname="dist/lanes.spec.js" name="should create lane history object when creating a new lane" time="0.001"/>
13
- <testcase classname="dist/lanes.spec.js" name="should add a record to LaneHistory when snapping" time="0.001"/>
14
- <testcase classname="dist/lanes.spec.js" name="should export successfully" time="0.005"/>
11
+ <testcase classname="dist/lanes.spec.js" name="should throw when restoring the lane" time="0.001"/>
12
+ <testcase classname="dist/lanes.spec.js" name="should create lane history object when creating a new lane" time="0.002"/>
13
+ <testcase classname="dist/lanes.spec.js" name="should add a record to LaneHistory when snapping" time="0.002"/>
14
+ <testcase classname="dist/lanes.spec.js" name="should export successfully"/>
15
15
  <testcase classname="dist/lanes.spec.js" name="should not add a record to the lane-history"/>
16
- <testcase classname="dist/lanes.spec.js" name="should be able to checkout to a previous state of the lane" time="1.333"/>
17
- <testcase classname="dist/lanes.spec.js" name="should be able to revert to a previous history id" time="6.746"/>
18
- <testcase classname="dist/lanes.spec.js" name="should not throw when creating the second lane" time="0.147"/>
16
+ <testcase classname="dist/lanes.spec.js" name="should be able to checkout to a previous state of the lane" time="1.352"/>
17
+ <testcase classname="dist/lanes.spec.js" name="should be able to revert to a previous history id" time="6.696"/>
18
+ <testcase classname="dist/lanes.spec.js" name="should not throw when creating the second lane" time="0.14"/>
19
19
  <testcase classname="dist/lanes.spec.js" name="should save the deleted data into the lane object">
20
20
  <skipped/>
21
21
  </testcase>
22
22
  <testcase classname="dist/lanes.spec.js" name="should save the deleted data into lane history">
23
23
  <skipped/>
24
24
  </testcase>
25
- <testcase classname="dist/lanes.spec.js" name="the components should be available on main" time="0.001"/>
25
+ <testcase classname="dist/lanes.spec.js" name="the components should be available on main"/>
26
26
  </testsuite>
27
27
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.lanes/lanes-preview"]=t():e["teambit.lanes/lanes-preview"]=t()}(self,(()=>(()=>{"use strict";var e={33392:(e,t,n)=>{var a={id:"teambit.lanes/lanes@1.0.506",homepage:"https://bit.cloud/teambit/lanes/lanes",exported:!0};function o(){const e=i(n(41594));return o=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,o.__bit_component=a,i.__bit_component=a;const r=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/lanes.svg"}));r.__bit_component=a,t.Logo=r},41594:e=>{e.exports=React}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};n.r(a),n.d(a,{compositions:()=>c,compositions_metadata:()=>f,overview:()=>u});var o={};n.r(o),n.d(o,{default:()=>h});var i=n(33392);n(41594);const r=MdxJsReact,l=TeambitMdxUiMdxScopeContext;var s=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},m.apply(null,arguments)}var d={},p="wrapper";function h(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,s);return(0,r.mdx)(p,m({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(l.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("p",null,"See more details about these two features here: ",(0,r.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1986"},"Lanes"),". ",(0,r.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1985"},"Snaps"),"."),(0,r.mdx)("p",null,"The following describes the final implementation, which differs from the specification above."),(0,r.mdx)("h2",null,"Synopsis"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"- create a snap: `bit snap` (synopsis similar to the `bit tag`)\n- create a new lane: `bit lane create <name>`\n- list lanes: `bit lane list`\n- switch between lanes: `bit switch <name>`\n- merge lanes: `bit lane merge`\n- show lane details: `bit lane show <name>`\n- diff between lanes: `bit lane diff <values>`\n- track local lane to a remote lane: `bit switch --as`\n- remove a lane: `bit lane remove <name>`.\n- fetch lane objects (without the components): `bit fetch --lanes`\n- import a lane: `bit lane import`\n- export current lane: `bit export`\n- (internal) cat lane object: `bit cat-lane <name>`\n")),(0,r.mdx)("h2",null,"Important points"),(0,r.mdx)("h3",null,"Lane ID"),(0,r.mdx)("p",null,"The Lane id consists of the lane name and the scope. If this is a new lane, the scope is the defaultScope.\nThe ",(0,r.mdx)("inlineCode",{parentName:"p"},"LaneId")," ",(0,r.mdx)("em",{parentName:"p"},"always")," has these two props."),(0,r.mdx)("h3",null,"Performance consideration"),(0,r.mdx)("p",null,"Currently, if it imports with no-deps, it doesn't ask for parents, if it imports with deps it imports with all parents. It is originated from src/api/scope/lib/fetch.ts: ",(0,r.mdx)("inlineCode",{parentName:"p"},"const collectParents = !noDependencies;"),". We need to make a decision here."),(0,r.mdx)("h3",null,"Hash"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Snap's hash is generated by a UUID and then converted into sha1. ",(0,r.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,r.mdx)("li",{parentName:"ul"},"Lane's hash is generated by a UUID and then converted into sha1. ",(0,r.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,r.mdx)("li",{parentName:"ul"},"Tag's hash stays the same. Generated by the ",(0,r.mdx)("inlineCode",{parentName:"li"},"Version.id()"),"."),(0,r.mdx)("li",{parentName:"ul"},"Lane's hash doesn't get changed even if the lane has been renamed or its scope changed.")),(0,r.mdx)("h3",null,"Lane Data"),(0,r.mdx)("p",null,"Lane data, for the most cases is a map of component-id:snap-head, in other words, it saves per component the head snap. There are 3 different places where we store such data for different purposes."),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"lane-object"),' "Lane" is saved in the scope ',(0,r.mdx)("inlineCode",{parentName:"li"},".bit/objects")," (.bit can be .git/bit locally), it has a unique hash and contains a map of components and their heads. This object exists on both local and remote scopes. Its main purpose is to sync lane-data between scopes. See ",(0,r.mdx)("inlineCode",{parentName:"li"},"Lane")," class (in scope/model) for the implementation details."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"remote-lane")," (component and their heads) is saved in ",(0,r.mdx)("inlineCode",{parentName:"li"},".bit/refs/remote/remote-name/lane-name"),". These refs files are saved in both, local and remote scopes. Its main purpose is to keep track where the remote-heads are per lane. See ",(0,r.mdx)("inlineCode",{parentName:"li"},"RemoteLanes")," class for the implementation details.")),(0,r.mdx)("p",null,"More places that stores lanes related data:"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"the currently checked out lane is saved in the scope.json file. (e.g. ",(0,r.mdx)("inlineCode",{parentName:"li"},'{ lanes: { current: "lane-a", tracking: "remote/lane-a" } }'),")."),(0,r.mdx)("li",{parentName:"ul"},"When switching to a remote lane, the .bitmap is updated as well with the remote-name, so then, when cloning the project, it's possible to fetch the remote lane data.")),(0,r.mdx)("p",null,"Summary of when/what lanes data is saved per command:"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane create"),": creates a new lane-object and creates a new lane record in scope.json and .bitmap."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit snap"),": adds an entry to the lane-object."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit export"),": pushes the lane-object to the remote. On the remote, the lane-object is created or updated/merged."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit switch --remote"),": 1) creates/updates lane-object in the scope. 2) creates/updates remote-lane. the remote-lane is updated also for main."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit fetch")," or ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import --objects"),": creates/updates remote-lane. the remote-lane is updated also for main. It doesn't update/merge the lane object.")),(0,r.mdx)("h3",null,"Merge during import"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"When the remote is ahead, it's easy, just update the head to the remote-head."),(0,r.mdx)("li",{parentName:"ul"},"When the local and remote have diverged, it's more complex. We need to create a snap-merge that has two parents, one point to the local head and one point to the remote head."),(0,r.mdx)("li",{parentName:"ul"},"On ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import --objects")," (or ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit fetch"),") we don't merge. The remote head is saved in the .bit/refs/remote dir. Then, ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit status")," shows that these components are merge-pending."),(0,r.mdx)("li",{parentName:"ul"},"On ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import <id>")," we do the merge."),(0,r.mdx)("li",{parentName:"ul"},"in case the merge wasn't done and the user is trying to export, the remote blocks is as it finds out that its head doesn't exist on the incoming component."),(0,r.mdx)("li",{parentName:"ul"},"in case the snap-merge failed due to a conflict, it saves the conflict and heads data into ",(0,r.mdx)("inlineCode",{parentName:"li"},".bit/unmerged.json")," file.")),(0,r.mdx)("h3",null,"Merge components"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"to merge an entire lane, use ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane merge"),"."),(0,r.mdx)("li",{parentName:"ul"},"to get updates from a remote lane, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import"),", and then ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit checkout head"),". alternatively, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit merge <component-id>")," in one command."),(0,r.mdx)("li",{parentName:"ul"},"to merge an individual component from a lane to main, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane merge <lane> --pattern <component-id>")," when on main.")),(0,r.mdx)("h3",null,"Useful APIs"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"bit-map ",(0,r.mdx)("inlineCode",{parentName:"li"},"getAllIdsAvailableOnLane()")," filters the currently checked out lane.")),(0,r.mdx)("h3",null,"Remove component from a lane"),(0,r.mdx)("p",null,"Locally, to remove a component from a lane, use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit remove")," command. It will remove the component from the local lane-object.\nThis change won't affect the remote scope, even after exporting the lane.\nThis is becuase on the remote, the merge-lane process doesn't remove anything, only adds/changes components to the lane object.\nRemember that by default when importing a lane, only the components on the workspace are part of the lane, so the same lane-object, locally can have less components than the remote and obviously in this case we don't want to remove them from the remote on export."),(0,r.mdx)("p",null,"To mark a component as removed on the lane, use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit remove --delete"),", which will modify the component, mark it as removed, then, on the next snap+export, the remote will be updated.\nOnce a component is marked as removed, it won't be merged during ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit lane merge"),", and won't be imported during ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit lane import"),"."),(0,r.mdx)("h3",null,"Debug issues during merge"),(0,r.mdx)("p",null,"The merge operation performs 3-way merge to minimize the number of conflicts.\nIt searches the common parent of the current-snap and the other-snap. This parent-snap or base-snap is common to these two lanes.\nFor most case, it works as follows:\nIf the base and current has the same data but the other has different data, it means, the other made a change.\nIn which case, no need for conflicts, just bring the data from the other to the local.\nOn the other hand, if the base the other has the same data but the current has different data, then, the current made a change. No need to do anything.\nOnly when the current and the other, both are different, and both are different than the base, there is a conflict."),(0,r.mdx)("p",null,'In case of merging lanes, and it\'s unclear why/how some changes were introduced or marked conflicted, go to the log to find out what is the base-snap and the other-snap.\nThe log message starts with "merging snaps details", and it lists per component-id the base-snap, current-snap and other-snap.\nFrom here, you can investigate the data of each one of the snaps by running ',(0,r.mdx)("inlineCode",{parentName:"p"},"bit cat-object -p <snap>"),".\nTo make this process easier, there are some tools that can help. keep reading."),(0,r.mdx)("h4",null,"source code merges/conflicts"),(0,r.mdx)("p",null,"To find out when a change was introduced to a file or when a file was added/removed, run ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit log-file <file-path>"),".\nIt might be helpful to create a new temporary workspace, import the other lane and run the same there.\nThis way, you get the full picture from both lanes when a change was introduced, and you can see whether it happened before and after the split from the base-snap.\nObviously, ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit log <comp-id> --one-line")," is helpful here to see the distance from each lane from the base-snap."),(0,r.mdx)("h4",null,"dependencies merges/conflicts"),(0,r.mdx)("p",null,"Similar to file-changes, you can run ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit deps blame"),' to understhand when a dependency was introduced/deleted/changed from a component.\nHere again, it\'ll be helpful to import to a new workspace the other lane and run the same there.\nAlso, becuase the dependencies merge is pretty complex, during the merge lots of valuable info is printed to the log.\nHowever, to avoid the extra noise it is not logged as "debug" but as "trace". Before you run the merge, you can add ',(0,r.mdx)("inlineCode",{parentName:"p"},"--log=trace")," to see these messages on the screen.")))}h.isMDXComponent=!0;const c=[i],u=[o],f={compositions:[{displayName:"Logo",identifier:"Logo"}]};return a})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.lanes/lanes-preview"]=t():e["teambit.lanes/lanes-preview"]=t()}(self,(()=>(()=>{"use strict";var e={8829:(e,t,n)=>{var a={id:"teambit.lanes/lanes@1.0.507",homepage:"https://bit.cloud/teambit/lanes/lanes",exported:!0};function o(){const e=i(n(1594));return o=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,o.__bit_component=a,i.__bit_component=a;const r=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/lanes.svg"}));r.__bit_component=a,t.Logo=r},1594:e=>{e.exports=React}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};n.r(a),n.d(a,{compositions:()=>c,compositions_metadata:()=>f,overview:()=>u});var o={};n.r(o),n.d(o,{default:()=>h});var i=n(8829);n(1594);const r=MdxJsReact,l=TeambitMdxUiMdxScopeContext;var s=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},m.apply(null,arguments)}var d={},p="wrapper";function h(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,s);return(0,r.mdx)(p,m({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(l.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("p",null,"See more details about these two features here: ",(0,r.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1986"},"Lanes"),". ",(0,r.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1985"},"Snaps"),"."),(0,r.mdx)("p",null,"The following describes the final implementation, which differs from the specification above."),(0,r.mdx)("h2",null,"Synopsis"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"- create a snap: `bit snap` (synopsis similar to the `bit tag`)\n- create a new lane: `bit lane create <name>`\n- list lanes: `bit lane list`\n- switch between lanes: `bit switch <name>`\n- merge lanes: `bit lane merge`\n- show lane details: `bit lane show <name>`\n- diff between lanes: `bit lane diff <values>`\n- track local lane to a remote lane: `bit switch --as`\n- remove a lane: `bit lane remove <name>`.\n- fetch lane objects (without the components): `bit fetch --lanes`\n- import a lane: `bit lane import`\n- export current lane: `bit export`\n- (internal) cat lane object: `bit cat-lane <name>`\n")),(0,r.mdx)("h2",null,"Important points"),(0,r.mdx)("h3",null,"Lane ID"),(0,r.mdx)("p",null,"The Lane id consists of the lane name and the scope. If this is a new lane, the scope is the defaultScope.\nThe ",(0,r.mdx)("inlineCode",{parentName:"p"},"LaneId")," ",(0,r.mdx)("em",{parentName:"p"},"always")," has these two props."),(0,r.mdx)("h3",null,"Performance consideration"),(0,r.mdx)("p",null,"Currently, if it imports with no-deps, it doesn't ask for parents, if it imports with deps it imports with all parents. It is originated from src/api/scope/lib/fetch.ts: ",(0,r.mdx)("inlineCode",{parentName:"p"},"const collectParents = !noDependencies;"),". We need to make a decision here."),(0,r.mdx)("h3",null,"Hash"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Snap's hash is generated by a UUID and then converted into sha1. ",(0,r.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,r.mdx)("li",{parentName:"ul"},"Lane's hash is generated by a UUID and then converted into sha1. ",(0,r.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,r.mdx)("li",{parentName:"ul"},"Tag's hash stays the same. Generated by the ",(0,r.mdx)("inlineCode",{parentName:"li"},"Version.id()"),"."),(0,r.mdx)("li",{parentName:"ul"},"Lane's hash doesn't get changed even if the lane has been renamed or its scope changed.")),(0,r.mdx)("h3",null,"Lane Data"),(0,r.mdx)("p",null,"Lane data, for the most cases is a map of component-id:snap-head, in other words, it saves per component the head snap. There are 3 different places where we store such data for different purposes."),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"lane-object"),' "Lane" is saved in the scope ',(0,r.mdx)("inlineCode",{parentName:"li"},".bit/objects")," (.bit can be .git/bit locally), it has a unique hash and contains a map of components and their heads. This object exists on both local and remote scopes. Its main purpose is to sync lane-data between scopes. See ",(0,r.mdx)("inlineCode",{parentName:"li"},"Lane")," class (in scope/model) for the implementation details."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"remote-lane")," (component and their heads) is saved in ",(0,r.mdx)("inlineCode",{parentName:"li"},".bit/refs/remote/remote-name/lane-name"),". These refs files are saved in both, local and remote scopes. Its main purpose is to keep track where the remote-heads are per lane. See ",(0,r.mdx)("inlineCode",{parentName:"li"},"RemoteLanes")," class for the implementation details.")),(0,r.mdx)("p",null,"More places that stores lanes related data:"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"the currently checked out lane is saved in the scope.json file. (e.g. ",(0,r.mdx)("inlineCode",{parentName:"li"},'{ lanes: { current: "lane-a", tracking: "remote/lane-a" } }'),")."),(0,r.mdx)("li",{parentName:"ul"},"When switching to a remote lane, the .bitmap is updated as well with the remote-name, so then, when cloning the project, it's possible to fetch the remote lane data.")),(0,r.mdx)("p",null,"Summary of when/what lanes data is saved per command:"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane create"),": creates a new lane-object and creates a new lane record in scope.json and .bitmap."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit snap"),": adds an entry to the lane-object."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit export"),": pushes the lane-object to the remote. On the remote, the lane-object is created or updated/merged."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit switch --remote"),": 1) creates/updates lane-object in the scope. 2) creates/updates remote-lane. the remote-lane is updated also for main."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit fetch")," or ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import --objects"),": creates/updates remote-lane. the remote-lane is updated also for main. It doesn't update/merge the lane object.")),(0,r.mdx)("h3",null,"Merge during import"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"When the remote is ahead, it's easy, just update the head to the remote-head."),(0,r.mdx)("li",{parentName:"ul"},"When the local and remote have diverged, it's more complex. We need to create a snap-merge that has two parents, one point to the local head and one point to the remote head."),(0,r.mdx)("li",{parentName:"ul"},"On ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import --objects")," (or ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit fetch"),") we don't merge. The remote head is saved in the .bit/refs/remote dir. Then, ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit status")," shows that these components are merge-pending."),(0,r.mdx)("li",{parentName:"ul"},"On ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import <id>")," we do the merge."),(0,r.mdx)("li",{parentName:"ul"},"in case the merge wasn't done and the user is trying to export, the remote blocks is as it finds out that its head doesn't exist on the incoming component."),(0,r.mdx)("li",{parentName:"ul"},"in case the snap-merge failed due to a conflict, it saves the conflict and heads data into ",(0,r.mdx)("inlineCode",{parentName:"li"},".bit/unmerged.json")," file.")),(0,r.mdx)("h3",null,"Merge components"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"to merge an entire lane, use ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane merge"),"."),(0,r.mdx)("li",{parentName:"ul"},"to get updates from a remote lane, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import"),", and then ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit checkout head"),". alternatively, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit merge <component-id>")," in one command."),(0,r.mdx)("li",{parentName:"ul"},"to merge an individual component from a lane to main, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane merge <lane> --pattern <component-id>")," when on main.")),(0,r.mdx)("h3",null,"Useful APIs"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"bit-map ",(0,r.mdx)("inlineCode",{parentName:"li"},"getAllIdsAvailableOnLane()")," filters the currently checked out lane.")),(0,r.mdx)("h3",null,"Remove component from a lane"),(0,r.mdx)("p",null,"Locally, to remove a component from a lane, use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit remove")," command. It will remove the component from the local lane-object.\nThis change won't affect the remote scope, even after exporting the lane.\nThis is becuase on the remote, the merge-lane process doesn't remove anything, only adds/changes components to the lane object.\nRemember that by default when importing a lane, only the components on the workspace are part of the lane, so the same lane-object, locally can have less components than the remote and obviously in this case we don't want to remove them from the remote on export."),(0,r.mdx)("p",null,"To mark a component as removed on the lane, use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit remove --delete"),", which will modify the component, mark it as removed, then, on the next snap+export, the remote will be updated.\nOnce a component is marked as removed, it won't be merged during ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit lane merge"),", and won't be imported during ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit lane import"),"."),(0,r.mdx)("h3",null,"Debug issues during merge"),(0,r.mdx)("p",null,"The merge operation performs 3-way merge to minimize the number of conflicts.\nIt searches the common parent of the current-snap and the other-snap. This parent-snap or base-snap is common to these two lanes.\nFor most case, it works as follows:\nIf the base and current has the same data but the other has different data, it means, the other made a change.\nIn which case, no need for conflicts, just bring the data from the other to the local.\nOn the other hand, if the base the other has the same data but the current has different data, then, the current made a change. No need to do anything.\nOnly when the current and the other, both are different, and both are different than the base, there is a conflict."),(0,r.mdx)("p",null,'In case of merging lanes, and it\'s unclear why/how some changes were introduced or marked conflicted, go to the log to find out what is the base-snap and the other-snap.\nThe log message starts with "merging snaps details", and it lists per component-id the base-snap, current-snap and other-snap.\nFrom here, you can investigate the data of each one of the snaps by running ',(0,r.mdx)("inlineCode",{parentName:"p"},"bit cat-object -p <snap>"),".\nTo make this process easier, there are some tools that can help. keep reading."),(0,r.mdx)("h4",null,"source code merges/conflicts"),(0,r.mdx)("p",null,"To find out when a change was introduced to a file or when a file was added/removed, run ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit log-file <file-path>"),".\nIt might be helpful to create a new temporary workspace, import the other lane and run the same there.\nThis way, you get the full picture from both lanes when a change was introduced, and you can see whether it happened before and after the split from the base-snap.\nObviously, ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit log <comp-id> --one-line")," is helpful here to see the distance from each lane from the base-snap."),(0,r.mdx)("h4",null,"dependencies merges/conflicts"),(0,r.mdx)("p",null,"Similar to file-changes, you can run ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit deps blame"),' to understhand when a dependency was introduced/deleted/changed from a component.\nHere again, it\'ll be helpful to import to a new workspace the other lane and run the same there.\nAlso, becuase the dependencies merge is pretty complex, during the merge lots of valuable info is printed to the log.\nHowever, to avoid the extra noise it is not logged as "debug" but as "trace". Before you run the merge, you can add ',(0,r.mdx)("inlineCode",{parentName:"p"},"--log=trace")," to see these messages on the screen.")))}h.isMDXComponent=!0;const c=[i],u=[o],f={compositions:[{displayName:"Logo",identifier:"Logo"}]};return a})()));
@@ -1647,7 +1647,7 @@
1647
1647
  "componentId": {
1648
1648
  "scope": "teambit.legacy",
1649
1649
  "name": "scope",
1650
- "version": "0.0.13"
1650
+ "version": "0.0.14"
1651
1651
  }
1652
1652
  },
1653
1653
  "isOptional": false
@@ -2626,7 +2626,7 @@
2626
2626
  "character": 7
2627
2627
  },
2628
2628
  "name": "merge",
2629
- "type": "\"manual\" | \"theirs\" | \"ours\" | undefined",
2629
+ "type": "\"theirs\" | \"ours\" | \"manual\" | undefined",
2630
2630
  "isSpread": false
2631
2631
  },
2632
2632
  {
@@ -4018,7 +4018,7 @@
4018
4018
  "line": 98,
4019
4019
  "character": 3
4020
4020
  },
4021
- "signature": "(property) LanesUI.slots: (((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<NavigationSlot>) | ((registerFn: () => string) => SlotRegistry<...>) | ((registerFn: () => string) => SlotRegistry<...>))[]",
4021
+ "signature": "(property) LanesUI.slots: (((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<MenuWidgetSlot>) | ((registerFn: () => string) => SlotRegistry<...>) | ((registerFn: () => string) => SlotRegistry<...>))[]",
4022
4022
  "name": "slots",
4023
4023
  "type": {
4024
4024
  "__schema": "InferenceTypeSchema",
@@ -4027,7 +4027,7 @@
4027
4027
  "line": 98,
4028
4028
  "character": 3
4029
4029
  },
4030
- "type": "(((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<NavigationSlot>) | ((registerFn: () => string) => SlotRegistry<...>) | ((registerFn: () => string) => SlotRegistry<...>))[]"
4030
+ "type": "(((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<MenuWidgetSlot>) | ((registerFn: () => string) => SlotRegistry<...>) | ((registerFn: () => string) => SlotRegistry<...>))[]"
4031
4031
  },
4032
4032
  "isOptional": true,
4033
4033
  "defaultValue": "[\n Slot.withType<RouteProps>(),\n Slot.withType<LaneOverviewLineSlot>(),\n Slot.withType<NavigationSlot>(),\n Slot.withType<MenuWidgetSlot>(),\n Slot.withType<LaneProviderIgnoreSlot>(),\n ]"
@@ -5661,7 +5661,7 @@
5661
5661
  "line": 81,
5662
5662
  "character": 1
5663
5663
  },
5664
- "signature": "type SwitchLaneOptions = {\n head?: boolean | undefined;\n alias?: string | undefined;\n merge?: \"manual\" | \"theirs\" | \"ours\" | undefined;\n forceOurs?: boolean | undefined;\n forceTheirs?: boolean | undefined;\n workspaceOnly?: boolean | undefined;\n pattern?: string | undefined;\n skipDependencyInstallation?: boolean | undefined;\n verbose?: boolean | undefined;\n override?: boolean | undefined;\n}",
5664
+ "signature": "type SwitchLaneOptions = {\n head?: boolean | undefined;\n alias?: string | undefined;\n merge?: \"theirs\" | \"ours\" | \"manual\" | undefined;\n forceOurs?: boolean | undefined;\n forceTheirs?: boolean | undefined;\n workspaceOnly?: boolean | undefined;\n pattern?: string | undefined;\n skipDependencyInstallation?: boolean | undefined;\n verbose?: boolean | undefined;\n override?: boolean | undefined;\n}",
5665
5665
  "name": "SwitchLaneOptions",
5666
5666
  "type": {
5667
5667
  "__schema": "TypeLiteralSchema",
@@ -5718,7 +5718,7 @@
5718
5718
  "line": 84,
5719
5719
  "character": 3
5720
5720
  },
5721
- "signature": "(property) merge?: \"manual\" | \"theirs\" | \"ours\" | undefined",
5721
+ "signature": "(property) merge?: \"theirs\" | \"ours\" | \"manual\" | undefined",
5722
5722
  "name": "merge",
5723
5723
  "type": {
5724
5724
  "__schema": "TypeRefSchema",
@@ -6191,7 +6191,7 @@
6191
6191
  "componentId": {
6192
6192
  "scope": "teambit.component",
6193
6193
  "name": "snap-distance",
6194
- "version": "0.0.14"
6194
+ "version": "0.0.15"
6195
6195
  }
6196
6196
  },
6197
6197
  "isOptional": false
@@ -7988,7 +7988,7 @@
7988
7988
  "componentId": {
7989
7989
  "scope": "teambit.legacy",
7990
7990
  "name": "scope",
7991
- "version": "0.0.13"
7991
+ "version": "0.0.14"
7992
7992
  }
7993
7993
  },
7994
7994
  "isOptional": false
@@ -8967,7 +8967,7 @@
8967
8967
  "character": 7
8968
8968
  },
8969
8969
  "name": "merge",
8970
- "type": "\"manual\" | \"theirs\" | \"ours\" | undefined",
8970
+ "type": "\"theirs\" | \"ours\" | \"manual\" | undefined",
8971
8971
  "isSpread": false
8972
8972
  },
8973
8973
  {
@@ -10471,7 +10471,7 @@
10471
10471
  "line": 98,
10472
10472
  "character": 3
10473
10473
  },
10474
- "signature": "(property) LanesUI.slots: (((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<NavigationSlot>) | ((registerFn: () => string) => SlotRegistry<...>) | ((registerFn: () => string) => SlotRegistry<...>))[]",
10474
+ "signature": "(property) LanesUI.slots: (((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<MenuWidgetSlot>) | ((registerFn: () => string) => SlotRegistry<...>) | ((registerFn: () => string) => SlotRegistry<...>))[]",
10475
10475
  "name": "slots",
10476
10476
  "type": {
10477
10477
  "__schema": "InferenceTypeSchema",
@@ -10480,7 +10480,7 @@
10480
10480
  "line": 98,
10481
10481
  "character": 3
10482
10482
  },
10483
- "type": "(((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<NavigationSlot>) | ((registerFn: () => string) => SlotRegistry<...>) | ((registerFn: () => string) => SlotRegistry<...>))[]"
10483
+ "type": "(((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<MenuWidgetSlot>) | ((registerFn: () => string) => SlotRegistry<...>) | ((registerFn: () => string) => SlotRegistry<...>))[]"
10484
10484
  },
10485
10485
  "isOptional": true,
10486
10486
  "defaultValue": "[\n Slot.withType<RouteProps>(),\n Slot.withType<LaneOverviewLineSlot>(),\n Slot.withType<NavigationSlot>(),\n Slot.withType<MenuWidgetSlot>(),\n Slot.withType<LaneProviderIgnoreSlot>(),\n ]"
@@ -11761,7 +11761,7 @@
11761
11761
  "componentId": {
11762
11762
  "scope": "teambit.lanes",
11763
11763
  "name": "lanes",
11764
- "version": "1.0.506"
11764
+ "version": "1.0.507"
11765
11765
  },
11766
11766
  "taggedModuleExports": []
11767
11767
  }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.506/dist/lanes.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.506/dist/lanes.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.507/dist/lanes.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.507/dist/lanes.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -54,7 +54,7 @@ class LaneSwitcher {
54
54
  async switch() {
55
55
  this.logger.setStatusLine(`switching lanes`);
56
56
  if (this.workspace.isOnMain()) {
57
- await (0, _lanesModules().throwForStagedComponents)(this.consumer);
57
+ await (0, _lanesModules().throwForStagedComponents)(this.workspace);
58
58
  }
59
59
  await this.populateSwitchProps();
60
60
  const bitMapIds = this.workspace.consumer.bitmapIdsFromCurrentLaneIncludeRemoved;
@@ -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 { Consumer } from '@teambit/legacy.consumer';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { ApplyVersionResults } from '@teambit/merging';\nimport { Lane } from '@teambit/scope.objects';\nimport { CheckoutProps } from '@teambit/checkout';\nimport { Workspace } from '@teambit/workspace';\nimport { Logger } from '@teambit/logger';\nimport { BitError } from '@teambit/bit-error';\nimport { throwForStagedComponents } from '@teambit/lanes.modules.create-lane';\nimport { 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.consumer);\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;AACA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8E,SAAAK,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,C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ACJ,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","exports"],"sources":["switch-lanes.ts"],"sourcesContent":["import { Consumer } from '@teambit/legacy.consumer';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { ApplyVersionResults } from '@teambit/merging';\nimport { Lane } from '@teambit/scope.objects';\nimport { CheckoutProps } from '@teambit/checkout';\nimport { Workspace } from '@teambit/workspace';\nimport { Logger } from '@teambit/logger';\nimport { BitError } from '@teambit/bit-error';\nimport { throwForStagedComponents } from '@teambit/lanes.modules.create-lane';\nimport { 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;AACA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8E,SAAAK,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,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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":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/lanes",
3
- "version": "1.0.506",
3
+ "version": "1.0.507",
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.506"
9
+ "version": "1.0.507"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -31,42 +31,42 @@
31
31
  "@teambit/lanes.ui.compare.lane-compare-page": "0.0.162",
32
32
  "@teambit/lanes.ui.compare.lane-compare": "0.0.193",
33
33
  "@teambit/lanes.ui.navigation.lane-switcher": "0.0.225",
34
- "@teambit/checkout": "1.0.506",
35
- "@teambit/cli": "0.0.1083",
36
- "@teambit/importer": "1.0.506",
34
+ "@teambit/checkout": "1.0.507",
35
+ "@teambit/cli": "0.0.1084",
36
+ "@teambit/importer": "1.0.507",
37
37
  "@teambit/legacy.cli.prompts": "0.0.9",
38
38
  "@teambit/legacy.constants": "0.0.4",
39
- "@teambit/legacy.scope": "0.0.13",
40
- "@teambit/scope": "1.0.506",
41
- "@teambit/workspace": "1.0.506",
42
- "@teambit/express": "0.0.1182",
43
- "@teambit/logger": "0.0.1176",
44
- "@teambit/graphql": "1.0.506",
45
- "@teambit/component-compare": "1.0.506",
46
- "@teambit/component-writer": "1.0.506",
47
- "@teambit/component.snap-distance": "0.0.14",
48
- "@teambit/component": "1.0.506",
49
- "@teambit/export": "1.0.506",
39
+ "@teambit/legacy.scope": "0.0.14",
40
+ "@teambit/scope": "1.0.507",
41
+ "@teambit/workspace": "1.0.507",
42
+ "@teambit/express": "0.0.1183",
43
+ "@teambit/logger": "0.0.1177",
44
+ "@teambit/graphql": "1.0.507",
45
+ "@teambit/component-compare": "1.0.507",
46
+ "@teambit/component-writer": "1.0.507",
47
+ "@teambit/component.snap-distance": "0.0.15",
48
+ "@teambit/component": "1.0.507",
49
+ "@teambit/export": "1.0.507",
50
50
  "@teambit/harmony.modules.concurrency": "0.0.5",
51
- "@teambit/install": "1.0.506",
51
+ "@teambit/install": "1.0.507",
52
52
  "@teambit/lanes.entities.lane-diff": "0.0.169",
53
- "@teambit/lanes.modules.create-lane": "0.0.47",
54
- "@teambit/lanes.modules.diff": "0.0.510",
55
- "@teambit/legacy.component-diff": "0.0.66",
56
- "@teambit/legacy.component-list": "0.0.67",
57
- "@teambit/merging": "1.0.506",
58
- "@teambit/remove": "1.0.506",
59
- "@teambit/scope.objects": "0.0.13",
60
- "@teambit/scope.remotes": "0.0.13",
61
- "@teambit/command-bar": "1.0.506",
53
+ "@teambit/lanes.modules.create-lane": "0.0.48",
54
+ "@teambit/lanes.modules.diff": "0.0.511",
55
+ "@teambit/legacy.component-diff": "0.0.67",
56
+ "@teambit/legacy.component-list": "0.0.68",
57
+ "@teambit/merging": "1.0.507",
58
+ "@teambit/remove": "1.0.507",
59
+ "@teambit/scope.objects": "0.0.14",
60
+ "@teambit/scope.remotes": "0.0.14",
61
+ "@teambit/command-bar": "1.0.507",
62
62
  "@teambit/lanes.hooks.use-lanes": "0.0.276",
63
63
  "@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.229",
64
64
  "@teambit/lanes.ui.lane-overview": "0.0.252",
65
65
  "@teambit/lanes.ui.menus.use-lanes-menu": "0.0.224",
66
66
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.513",
67
- "@teambit/ui": "1.0.506",
68
- "@teambit/legacy.consumer": "0.0.13",
69
- "@teambit/scope.network": "0.0.13"
67
+ "@teambit/ui": "1.0.507",
68
+ "@teambit/legacy.consumer": "0.0.14",
69
+ "@teambit/scope.network": "0.0.14"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/lodash": "4.14.165",
@@ -75,11 +75,11 @@
75
75
  "fs-extra": "10.0.0",
76
76
  "@types/mocha": "9.1.0",
77
77
  "@teambit/harmony.envs.core-aspect-env": "0.0.63",
78
- "@teambit/component.testing.mock-components": "0.0.273",
79
- "@teambit/harmony.testing.load-aspect": "0.0.268",
80
- "@teambit/merge-lanes": "1.0.506",
81
- "@teambit/snapping": "1.0.506",
82
- "@teambit/workspace.testing.mock-workspace": "0.0.40"
78
+ "@teambit/component.testing.mock-components": "0.0.274",
79
+ "@teambit/harmony.testing.load-aspect": "0.0.269",
80
+ "@teambit/merge-lanes": "1.0.507",
81
+ "@teambit/snapping": "1.0.507",
82
+ "@teambit/workspace.testing.mock-workspace": "0.0.41"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "react": "^17.0.0 || ^18.0.0",