@teambit/lanes 1.0.139 → 1.0.140
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.
- package/artifacts/__bit_junit.xml +11 -10
- package/artifacts/preview/teambit_lanes_lanes-preview.js +1 -1
- package/dist/create-lane.js +2 -2
- package/dist/create-lane.js.map +1 -1
- package/dist/lanes.spec.js +29 -1
- package/dist/lanes.spec.js.map +1 -1
- package/dist/{preview-1705577037962.js → preview-1705634165230.js} +2 -2
- package/package.json +15 -15
@@ -1,17 +1,18 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites>
|
3
|
-
<testsuite name="teambit.lanes/lanes@1.0.
|
4
|
-
<testcase classname="lanes.spec.js" name="should list all lanes" time="0.
|
5
|
-
<testcase classname="lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.
|
6
|
-
<testcase classname="lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="0.
|
7
|
-
<testcase classname="lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.
|
8
|
-
<testcase classname="lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="0.
|
3
|
+
<testsuite name="teambit.lanes/lanes@1.0.140" timestamp="2024-01-19T03:40:54.506Z" tests="13" failures="0" errors="0" skipped="0">
|
4
|
+
<testcase classname="lanes.spec.js" name="should list all lanes" time="0.121"/>
|
5
|
+
<testcase classname="lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.399"/>
|
6
|
+
<testcase classname="lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="0.253"/>
|
7
|
+
<testcase classname="lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.142"/>
|
8
|
+
<testcase classname="lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="0.085"/>
|
9
9
|
<testcase classname="lanes.spec.js" name="should restore the deleted lane" time="0.001"/>
|
10
|
-
<testcase classname="lanes.spec.js" name="should not throw"
|
10
|
+
<testcase classname="lanes.spec.js" name="should not throw"/>
|
11
11
|
<testcase classname="lanes.spec.js" name="should throw when restoring the lane" time="0.002"/>
|
12
12
|
<testcase classname="lanes.spec.js" name="should create lane history object when creating a new lane" time="0.002"/>
|
13
|
-
<testcase classname="lanes.spec.js" name="should add a record to LaneHistory when snapping" time="0.
|
14
|
-
<testcase classname="lanes.spec.js" name="should not add a record to the lane-history"/>
|
15
|
-
<testcase classname="lanes.spec.js" name="should be able to checkout to a previous state of the lane" time="0.
|
13
|
+
<testcase classname="lanes.spec.js" name="should add a record to LaneHistory when snapping" time="0.058"/>
|
14
|
+
<testcase classname="lanes.spec.js" name="should not add a record to the lane-history" time="0.001"/>
|
15
|
+
<testcase classname="lanes.spec.js" name="should be able to checkout to a previous state of the lane" time="0.038"/>
|
16
|
+
<testcase classname="lanes.spec.js" name="should not throw when creating the second lane" time="0.022"/>
|
16
17
|
</testsuite>
|
17
18
|
</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={23731:(e,t,n)=>{var a={id:"teambit.lanes/lanes@1.0.139",homepage:"https://bit.cloud/teambit/lanes/lanes",exported:!0};function o(){const e=i(n(87363));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},87363: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={};return(()=>{n.r(a),n.d(a,{compositions:()=>p,compositions_metadata:()=>c,overview:()=>h});var e={};n.r(e),n.d(e,{default:()=>d});var t=n(23731);n(87363);const o=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(this,arguments)}var s={},m="wrapper";function d(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,a,o={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,r);return(0,o.mdx)(m,l({},s,n,{components:t,mdxType:"MDXLayout"}),(0,o.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,o.mdx)("p",null,"See more details about these two features here: ",(0,o.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1986"},"Lanes"),". ",(0,o.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1985"},"Snaps"),"."),(0,o.mdx)("p",null,"The following describes the final implementation, which differs from the specification above."),(0,o.mdx)("h2",null,"Synopsis"),(0,o.mdx)("pre",null,(0,o.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,o.mdx)("h2",null,"Important points"),(0,o.mdx)("h3",null,"Lane ID"),(0,o.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,o.mdx)("inlineCode",{parentName:"p"},"LaneId")," ",(0,o.mdx)("em",{parentName:"p"},"always")," has these two props."),(0,o.mdx)("h3",null,"Performance consideration"),(0,o.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,o.mdx)("inlineCode",{parentName:"p"},"const collectParents = !noDependencies;"),". We need to make a decision here."),(0,o.mdx)("h3",null,"Hash"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"Snap's hash is generated by a UUID and then converted into sha1. ",(0,o.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,o.mdx)("li",{parentName:"ul"},"Lane's hash is generated by a UUID and then converted into sha1. ",(0,o.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,o.mdx)("li",{parentName:"ul"},"Tag's hash stays the same. Generated by the ",(0,o.mdx)("inlineCode",{parentName:"li"},"Version.id()"),"."),(0,o.mdx)("li",{parentName:"ul"},"Lane's hash doesn't get changed even if the lane has been renamed or its scope changed.")),(0,o.mdx)("h3",null,"Lane Data"),(0,o.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,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"lane-object"),' "Lane" is saved in the scope ',(0,o.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,o.mdx)("inlineCode",{parentName:"li"},"Lane")," class (in scope/model) for the implementation details."),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"remote-lane")," (component and their heads) is saved in ",(0,o.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,o.mdx)("inlineCode",{parentName:"li"},"RemoteLanes")," class for the implementation details.")),(0,o.mdx)("p",null,"More places that stores lanes related data:"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"the currently checked out lane is saved in the scope.json file. (e.g. ",(0,o.mdx)("inlineCode",{parentName:"li"},'{ lanes: { current: "lane-a", tracking: "remote/lane-a" } }'),")."),(0,o.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,o.mdx)("p",null,"Summary of when/what lanes data is saved per command:"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"bit lane create"),": creates a new lane-object and creates a new lane record in scope.json and .bitmap."),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"bit snap"),": adds an entry to the lane-object."),(0,o.mdx)("li",{parentName:"ul"},(0,o.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,o.mdx)("li",{parentName:"ul"},(0,o.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,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"bit fetch")," or ",(0,o.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,o.mdx)("h3",null,"Merge during import"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"When the remote is ahead, it's easy, just update the head to the remote-head."),(0,o.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,o.mdx)("li",{parentName:"ul"},"On ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit import --objects")," (or ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit fetch"),") we don't merge. The remote head is saved in the .bit/refs/remote dir. Then, ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit status")," shows that these components are merge-pending."),(0,o.mdx)("li",{parentName:"ul"},"On ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit import <id>")," we do the merge."),(0,o.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,o.mdx)("li",{parentName:"ul"},"in case the snap-merge failed due to a conflict, it saves the conflict and heads data into ",(0,o.mdx)("inlineCode",{parentName:"li"},".bit/unmerged.json")," file.")),(0,o.mdx)("h3",null,"Merge components"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"to merge an entire lane, use ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit lane merge"),"."),(0,o.mdx)("li",{parentName:"ul"},"to get updates from a remote lane, run ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit import"),", and then ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit checkout head"),". alternatively, run ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit merge <component-id>")," in one command."),(0,o.mdx)("li",{parentName:"ul"},"to merge an individual component from a lane to main, run ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit lane merge <lane> --pattern <component-id>")," when on main.")),(0,o.mdx)("h3",null,"Useful APIs"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"bit-map ",(0,o.mdx)("inlineCode",{parentName:"li"},"getAllIdsAvailableOnLane()")," filters the currently checked out lane.")),(0,o.mdx)("h3",null,"Remove component from a lane"),(0,o.mdx)("p",null,"Locally, to remove a component from a lane, use ",(0,o.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,o.mdx)("p",null,"To mark a component as removed on the lane, use ",(0,o.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,o.mdx)("inlineCode",{parentName:"p"},"bit lane merge"),", and won't be imported during ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit lane import"),"."),(0,o.mdx)("h3",null,"Debug issues during merge"),(0,o.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,o.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,o.mdx)("inlineCode",{parentName:"p"},"bit cat-object -p <snap>"),".\nTo make this process easier, there are some tools that can help. keep reading."),(0,o.mdx)("h4",null,"source code merges/conflicts"),(0,o.mdx)("p",null,"To find out when a change was introduced to a file or when a file was added/removed, run ",(0,o.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,o.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,o.mdx)("h4",null,"dependencies merges/conflicts"),(0,o.mdx)("p",null,"Similar to file-changes, you can run ",(0,o.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,o.mdx)("inlineCode",{parentName:"p"},"--log=trace")," to see these messages on the screen.")))}d.isMDXComponent=!0;const p=[t],h=[e],c={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),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={5708:(e,t,n)=>{var a={id:"teambit.lanes/lanes@1.0.140",homepage:"https://bit.cloud/teambit/lanes/lanes",exported:!0};function o(){const e=i(n(87363));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},87363: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={};return(()=>{n.r(a),n.d(a,{compositions:()=>p,compositions_metadata:()=>c,overview:()=>h});var e={};n.r(e),n.d(e,{default:()=>d});var t=n(5708);n(87363);const o=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(this,arguments)}var s={},m="wrapper";function d(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,a,o={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,r);return(0,o.mdx)(m,l({},s,n,{components:t,mdxType:"MDXLayout"}),(0,o.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,o.mdx)("p",null,"See more details about these two features here: ",(0,o.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1986"},"Lanes"),". ",(0,o.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1985"},"Snaps"),"."),(0,o.mdx)("p",null,"The following describes the final implementation, which differs from the specification above."),(0,o.mdx)("h2",null,"Synopsis"),(0,o.mdx)("pre",null,(0,o.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,o.mdx)("h2",null,"Important points"),(0,o.mdx)("h3",null,"Lane ID"),(0,o.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,o.mdx)("inlineCode",{parentName:"p"},"LaneId")," ",(0,o.mdx)("em",{parentName:"p"},"always")," has these two props."),(0,o.mdx)("h3",null,"Performance consideration"),(0,o.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,o.mdx)("inlineCode",{parentName:"p"},"const collectParents = !noDependencies;"),". We need to make a decision here."),(0,o.mdx)("h3",null,"Hash"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"Snap's hash is generated by a UUID and then converted into sha1. ",(0,o.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,o.mdx)("li",{parentName:"ul"},"Lane's hash is generated by a UUID and then converted into sha1. ",(0,o.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,o.mdx)("li",{parentName:"ul"},"Tag's hash stays the same. Generated by the ",(0,o.mdx)("inlineCode",{parentName:"li"},"Version.id()"),"."),(0,o.mdx)("li",{parentName:"ul"},"Lane's hash doesn't get changed even if the lane has been renamed or its scope changed.")),(0,o.mdx)("h3",null,"Lane Data"),(0,o.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,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"lane-object"),' "Lane" is saved in the scope ',(0,o.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,o.mdx)("inlineCode",{parentName:"li"},"Lane")," class (in scope/model) for the implementation details."),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"remote-lane")," (component and their heads) is saved in ",(0,o.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,o.mdx)("inlineCode",{parentName:"li"},"RemoteLanes")," class for the implementation details.")),(0,o.mdx)("p",null,"More places that stores lanes related data:"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"the currently checked out lane is saved in the scope.json file. (e.g. ",(0,o.mdx)("inlineCode",{parentName:"li"},'{ lanes: { current: "lane-a", tracking: "remote/lane-a" } }'),")."),(0,o.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,o.mdx)("p",null,"Summary of when/what lanes data is saved per command:"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"bit lane create"),": creates a new lane-object and creates a new lane record in scope.json and .bitmap."),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"bit snap"),": adds an entry to the lane-object."),(0,o.mdx)("li",{parentName:"ul"},(0,o.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,o.mdx)("li",{parentName:"ul"},(0,o.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,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"bit fetch")," or ",(0,o.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,o.mdx)("h3",null,"Merge during import"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"When the remote is ahead, it's easy, just update the head to the remote-head."),(0,o.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,o.mdx)("li",{parentName:"ul"},"On ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit import --objects")," (or ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit fetch"),") we don't merge. The remote head is saved in the .bit/refs/remote dir. Then, ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit status")," shows that these components are merge-pending."),(0,o.mdx)("li",{parentName:"ul"},"On ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit import <id>")," we do the merge."),(0,o.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,o.mdx)("li",{parentName:"ul"},"in case the snap-merge failed due to a conflict, it saves the conflict and heads data into ",(0,o.mdx)("inlineCode",{parentName:"li"},".bit/unmerged.json")," file.")),(0,o.mdx)("h3",null,"Merge components"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"to merge an entire lane, use ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit lane merge"),"."),(0,o.mdx)("li",{parentName:"ul"},"to get updates from a remote lane, run ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit import"),", and then ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit checkout head"),". alternatively, run ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit merge <component-id>")," in one command."),(0,o.mdx)("li",{parentName:"ul"},"to merge an individual component from a lane to main, run ",(0,o.mdx)("inlineCode",{parentName:"li"},"bit lane merge <lane> --pattern <component-id>")," when on main.")),(0,o.mdx)("h3",null,"Useful APIs"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"bit-map ",(0,o.mdx)("inlineCode",{parentName:"li"},"getAllIdsAvailableOnLane()")," filters the currently checked out lane.")),(0,o.mdx)("h3",null,"Remove component from a lane"),(0,o.mdx)("p",null,"Locally, to remove a component from a lane, use ",(0,o.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,o.mdx)("p",null,"To mark a component as removed on the lane, use ",(0,o.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,o.mdx)("inlineCode",{parentName:"p"},"bit lane merge"),", and won't be imported during ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit lane import"),"."),(0,o.mdx)("h3",null,"Debug issues during merge"),(0,o.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,o.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,o.mdx)("inlineCode",{parentName:"p"},"bit cat-object -p <snap>"),".\nTo make this process easier, there are some tools that can help. keep reading."),(0,o.mdx)("h4",null,"source code merges/conflicts"),(0,o.mdx)("p",null,"To find out when a change was introduced to a file or when a file was added/removed, run ",(0,o.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,o.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,o.mdx)("h4",null,"dependencies merges/conflicts"),(0,o.mdx)("p",null,"Similar to file-changes, you can run ",(0,o.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,o.mdx)("inlineCode",{parentName:"p"},"--log=trace")," to see these messages on the screen.")))}d.isMDXComponent=!0;const p=[t],h=[e],c={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),a})()));
|
package/dist/create-lane.js
CHANGED
@@ -63,8 +63,8 @@ const MAX_LANE_NAME_LENGTH = 800;
|
|
63
63
|
async function createLane(workspace, laneName, scopeName, remoteLane) {
|
64
64
|
const consumer = workspace.consumer;
|
65
65
|
const lanes = await consumer.scope.listLanes();
|
66
|
-
if (lanes.find(lane => lane.name === laneName)) {
|
67
|
-
throw new (_bitError().BitError)(`lane "${laneName}" already exists, to switch to this lane, please use "bit switch" command`);
|
66
|
+
if (lanes.find(lane => lane.name === laneName && lane.scope === scopeName)) {
|
67
|
+
throw new (_bitError().BitError)(`lane "${scopeName}/${laneName}" already exists, to switch to this lane, please use "bit switch" command`);
|
68
68
|
}
|
69
69
|
const bitCloudUser = await (0, _getCloudUser().getBitCloudUser)();
|
70
70
|
throwForInvalidLaneName(laneName);
|
package/dist/create-lane.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_bitError","data","require","_lane","_interopRequireDefault","_componentVersion","_componentsList","_objects","_lodash","_getCloudUser","obj","__esModule","default","MAX_LANE_NAME_LENGTH","createLane","workspace","laneName","scopeName","remoteLane","consumer","lanes","scope","listLanes","find","lane","name","BitError","bitCloudUser","getBitCloudUser","throwForInvalidLaneName","throwForStagedComponents","getDataToPopulateLaneObjectIfNeeded","components","currentLaneObject","getCurrentLaneObject","laneComponents","workspaceIds","bitMap","getAllBitIds","laneComponentWithBitmapHead","Promise","all","map","id","head","compId","changeVersion","toString","isRemoved","isComponentRemoved","bitmapHead","searchWithoutVersion","isSnap","version","Ref","from","compact","forkedFrom","getLaneOrigin","newLane","Lane","hash","log","create","dataToPopulate","setLaneComponents","laneHistoryMsg","saveLane","createLaneInScope","legacyScope","currentLaneId","laneId","undefined","isLaneExported","currentLane","isValidLaneName","componentList","ComponentsList","stagedComponents","listExportPendingComponentsIds","length","join","val","test"],"sources":["create-lane.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ScopeMain } from '@teambit/scope';\n// import { ComponentIdList } from '@teambit/component-id';\nimport Lane, { LaneComponent } from '@teambit/legacy/dist/scope/models/lane';\nimport { isSnap } from '@teambit/component-version';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport { Workspace } from '@teambit/workspace';\nimport { compact } from 'lodash';\nimport { getBitCloudUser } from '@teambit/legacy/dist/utils/bit/get-cloud-user';\n\nconst MAX_LANE_NAME_LENGTH = 800;\n\nexport async function createLane(\n workspace: Workspace,\n laneName: string,\n scopeName: string,\n remoteLane?: Lane\n): Promise<Lane> {\n const consumer = workspace.consumer;\n const lanes = await consumer.scope.listLanes();\n if (lanes.find((lane) => lane.name === laneName)) {\n throw new BitError(`lane \"${laneName}\" already exists, to switch to this lane, please use \"bit switch\" command`);\n }\n const bitCloudUser = await getBitCloudUser();\n throwForInvalidLaneName(laneName);\n await throwForStagedComponents(consumer);\n const getDataToPopulateLaneObjectIfNeeded = async (): Promise<LaneComponent[]> => {\n if (remoteLane) return remoteLane.components;\n // when branching from one lane to another, copy components from the origin lane\n // when branching from main, no need to copy anything\n const currentLaneObject = await consumer.getCurrentLaneObject();\n if (!currentLaneObject) return [];\n const laneComponents = currentLaneObject.components;\n const workspaceIds = consumer.bitMap.getAllBitIds();\n const laneComponentWithBitmapHead = await Promise.all(\n laneComponents.map(async ({ id, head }) => {\n const compId = id.changeVersion(head.toString());\n const isRemoved = await workspace.scope.isComponentRemoved(compId);\n if (isRemoved) return null;\n const bitmapHead = workspaceIds.searchWithoutVersion(id);\n if (bitmapHead && isSnap(bitmapHead.version)) {\n return { id, head: Ref.from(bitmapHead.version as string) };\n }\n return { id, head };\n })\n );\n return compact(laneComponentWithBitmapHead);\n };\n\n const forkedFrom = await getLaneOrigin(consumer);\n const newLane = remoteLane\n ? Lane.from({\n name: laneName,\n hash: remoteLane.hash().toString(),\n log: remoteLane.log,\n scope: remoteLane.scope,\n forkedFrom,\n })\n : Lane.create(laneName, scopeName, forkedFrom, bitCloudUser);\n const dataToPopulate = await getDataToPopulateLaneObjectIfNeeded();\n newLane.setLaneComponents(dataToPopulate);\n\n const laneHistoryMsg = remoteLane ? `fork lane \"${remoteLane.name}\"` : 'new lane';\n await consumer.scope.lanes.saveLane(newLane, { laneHistoryMsg });\n\n return newLane;\n}\n\nexport async function createLaneInScope(laneName: string, scope: ScopeMain): Promise<Lane> {\n const lanes = await scope.legacyScope.listLanes();\n if (lanes.find((lane) => lane.name === laneName)) {\n throw new BitError(`lane \"${laneName}\" already exists`);\n }\n throwForInvalidLaneName(laneName);\n const newLane = Lane.create(laneName, scope.name);\n await scope.legacyScope.lanes.saveLane(newLane, { laneHistoryMsg: 'new lane (created from scope)' });\n return newLane;\n}\n\nasync function getLaneOrigin(consumer: Consumer): Promise<LaneId | undefined> {\n const currentLaneId = consumer.bitMap.laneId;\n if (!currentLaneId) return undefined;\n if (consumer.bitMap.isLaneExported) {\n return currentLaneId;\n }\n // current lane is new.\n const currentLane = await consumer.getCurrentLaneObject();\n return currentLane?.forkedFrom;\n}\n\nexport function throwForInvalidLaneName(laneName: string) {\n if (!isValidLaneName(laneName)) {\n throw new BitError(\n `lane \"${laneName}\" has invalid characters. lane name can only contain alphanumeric, lowercase characters, and the following [\"-\", \"_\", \"$\", \"!\"]`\n );\n }\n}\n\nexport async function throwForStagedComponents(consumer: Consumer) {\n const componentList = new ComponentsList(consumer);\n const stagedComponents = await componentList.listExportPendingComponentsIds();\n if (stagedComponents.length) {\n throw new BitError(\n `unable to switch/create a new lane, please export or reset the following components first: ${stagedComponents.join(\n ', '\n )}`\n );\n }\n}\n\nfunction isValidLaneName(val: unknown): boolean {\n if (typeof val !== 'string') return false;\n if (val.length > MAX_LANE_NAME_LENGTH) return false;\n // @todo: should we allow slash? if so, we should probably replace the lane-delimiter with something else. (maybe \":\")\n return /^[$\\-_!a-z0-9]+$/.test(val);\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAA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AI,CAACD,aAAa,EAAE,OAAOE,SAAS;EACpC,IAAIrD,QAAQ,CAACkB,MAAM,CAACoC,cAAc,EAAE;IAClC,OAAOH,aAAa;EACtB;EACA;EACA,MAAMI,WAAW,GAAG,MAAMvD,QAAQ,CAACe,oBAAoB,CAAC,CAAC;EACzD,OAAOwC,WAAW,EAAEjB,UAAU;AAChC;AAEO,SAAS5B,uBAAuBA,CAACb,QAAgB,EAAE;EACxD,IAAI,CAAC2D,eAAe,CAAC3D,QAAQ,CAAC,EAAE;IAC9B,MAAM,KAAIU,oBAAQ,EACf,SAAQV,QAAS,iIACpB,CAAC;EACH;AACF;AAEO,eAAec,wBAAwBA,CAACX,QAAkB,EAAE;EACjE,MAAMyD,aAAa,GAAG,KAAIC,yBAAc,EAAC1D,QAAQ,CAAC;EAClD,MAAM2D,gBAAgB,GAAG,MAAMF,aAAa,CAACG,8BAA8B,CAAC,CAAC;EAC7E,IAAID,gBAAgB,CAACE,MAAM,EAAE;IAC3B,MAAM,KAAItD,oBAAQ,EACf,8FAA6FoD,gBAAgB,CAACG,IAAI,CACjH,IACF,CAAE,EACJ,CAAC;EACH;AACF;AAEA,SAASN,eAAeA,CAACO,GAAY,EAAW;EAC9C,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE,OAAO,KAAK;EACzC,IAAIA,GAAG,CAACF,MAAM,GAAGnE,oBAAoB,EAAE,OAAO,KAAK;EACnD;EACA,OAAO,kBAAkB,CAACsE,IAAI,CAACD,GAAG,CAAC;AACrC"}
|
1
|
+
{"version":3,"names":["_bitError","data","require","_lane","_interopRequireDefault","_componentVersion","_componentsList","_objects","_lodash","_getCloudUser","obj","__esModule","default","MAX_LANE_NAME_LENGTH","createLane","workspace","laneName","scopeName","remoteLane","consumer","lanes","scope","listLanes","find","lane","name","BitError","bitCloudUser","getBitCloudUser","throwForInvalidLaneName","throwForStagedComponents","getDataToPopulateLaneObjectIfNeeded","components","currentLaneObject","getCurrentLaneObject","laneComponents","workspaceIds","bitMap","getAllBitIds","laneComponentWithBitmapHead","Promise","all","map","id","head","compId","changeVersion","toString","isRemoved","isComponentRemoved","bitmapHead","searchWithoutVersion","isSnap","version","Ref","from","compact","forkedFrom","getLaneOrigin","newLane","Lane","hash","log","create","dataToPopulate","setLaneComponents","laneHistoryMsg","saveLane","createLaneInScope","legacyScope","currentLaneId","laneId","undefined","isLaneExported","currentLane","isValidLaneName","componentList","ComponentsList","stagedComponents","listExportPendingComponentsIds","length","join","val","test"],"sources":["create-lane.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ScopeMain } from '@teambit/scope';\n// import { ComponentIdList } from '@teambit/component-id';\nimport Lane, { LaneComponent } from '@teambit/legacy/dist/scope/models/lane';\nimport { isSnap } from '@teambit/component-version';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport { Workspace } from '@teambit/workspace';\nimport { compact } from 'lodash';\nimport { getBitCloudUser } from '@teambit/legacy/dist/utils/bit/get-cloud-user';\n\nconst MAX_LANE_NAME_LENGTH = 800;\n\nexport async function createLane(\n workspace: Workspace,\n laneName: string,\n scopeName: string,\n remoteLane?: Lane\n): Promise<Lane> {\n const consumer = workspace.consumer;\n const lanes = await consumer.scope.listLanes();\n if (lanes.find((lane) => lane.name === laneName && lane.scope === scopeName)) {\n throw new BitError(\n `lane \"${scopeName}/${laneName}\" already exists, to switch to this lane, please use \"bit switch\" command`\n );\n }\n const bitCloudUser = await getBitCloudUser();\n throwForInvalidLaneName(laneName);\n await throwForStagedComponents(consumer);\n const getDataToPopulateLaneObjectIfNeeded = async (): Promise<LaneComponent[]> => {\n if (remoteLane) return remoteLane.components;\n // when branching from one lane to another, copy components from the origin lane\n // when branching from main, no need to copy anything\n const currentLaneObject = await consumer.getCurrentLaneObject();\n if (!currentLaneObject) return [];\n const laneComponents = currentLaneObject.components;\n const workspaceIds = consumer.bitMap.getAllBitIds();\n const laneComponentWithBitmapHead = await Promise.all(\n laneComponents.map(async ({ id, head }) => {\n const compId = id.changeVersion(head.toString());\n const isRemoved = await workspace.scope.isComponentRemoved(compId);\n if (isRemoved) return null;\n const bitmapHead = workspaceIds.searchWithoutVersion(id);\n if (bitmapHead && isSnap(bitmapHead.version)) {\n return { id, head: Ref.from(bitmapHead.version as string) };\n }\n return { id, head };\n })\n );\n return compact(laneComponentWithBitmapHead);\n };\n\n const forkedFrom = await getLaneOrigin(consumer);\n const newLane = remoteLane\n ? Lane.from({\n name: laneName,\n hash: remoteLane.hash().toString(),\n log: remoteLane.log,\n scope: remoteLane.scope,\n forkedFrom,\n })\n : Lane.create(laneName, scopeName, forkedFrom, bitCloudUser);\n const dataToPopulate = await getDataToPopulateLaneObjectIfNeeded();\n newLane.setLaneComponents(dataToPopulate);\n\n const laneHistoryMsg = remoteLane ? `fork lane \"${remoteLane.name}\"` : 'new lane';\n await consumer.scope.lanes.saveLane(newLane, { laneHistoryMsg });\n\n return newLane;\n}\n\nexport async function createLaneInScope(laneName: string, scope: ScopeMain): Promise<Lane> {\n const lanes = await scope.legacyScope.listLanes();\n if (lanes.find((lane) => lane.name === laneName)) {\n throw new BitError(`lane \"${laneName}\" already exists`);\n }\n throwForInvalidLaneName(laneName);\n const newLane = Lane.create(laneName, scope.name);\n await scope.legacyScope.lanes.saveLane(newLane, { laneHistoryMsg: 'new lane (created from scope)' });\n return newLane;\n}\n\nasync function getLaneOrigin(consumer: Consumer): Promise<LaneId | undefined> {\n const currentLaneId = consumer.bitMap.laneId;\n if (!currentLaneId) return undefined;\n if (consumer.bitMap.isLaneExported) {\n return currentLaneId;\n }\n // current lane is new.\n const currentLane = await consumer.getCurrentLaneObject();\n return currentLane?.forkedFrom;\n}\n\nexport function throwForInvalidLaneName(laneName: string) {\n if (!isValidLaneName(laneName)) {\n throw new BitError(\n `lane \"${laneName}\" has invalid characters. lane name can only contain alphanumeric, lowercase characters, and the following [\"-\", \"_\", \"$\", \"!\"]`\n );\n }\n}\n\nexport async function throwForStagedComponents(consumer: Consumer) {\n const componentList = new ComponentsList(consumer);\n const stagedComponents = await componentList.listExportPendingComponentsIds();\n if (stagedComponents.length) {\n throw new BitError(\n `unable to switch/create a new lane, please export or reset the following components first: ${stagedComponents.join(\n ', '\n )}`\n );\n }\n}\n\nfunction isValidLaneName(val: unknown): boolean {\n if (typeof val !== 'string') return false;\n if (val.length > MAX_LANE_NAME_LENGTH) return false;\n // @todo: should we allow slash? if so, we should probably replace the lane-delimiter with something else. (maybe \":\")\n return /^[$\\-_!a-z0-9]+$/.test(val);\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,gBAAA;EAAA,MAAAL,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAI,eAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SA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,CAAC;EACH;AACF;AAEO,eAAec,wBAAwBA,CAACX,QAAkB,EAAE;EACjE,MAAMyD,aAAa,GAAG,KAAIC,yBAAc,EAAC1D,QAAQ,CAAC;EAClD,MAAM2D,gBAAgB,GAAG,MAAMF,aAAa,CAACG,8BAA8B,CAAC,CAAC;EAC7E,IAAID,gBAAgB,CAACE,MAAM,EAAE;IAC3B,MAAM,KAAItD,oBAAQ,EACf,8FAA6FoD,gBAAgB,CAACG,IAAI,CACjH,IACF,CAAE,EACJ,CAAC;EACH;AACF;AAEA,SAASN,eAAeA,CAACO,GAAY,EAAW;EAC9C,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE,OAAO,KAAK;EACzC,IAAIA,GAAG,CAACF,MAAM,GAAGnE,oBAAoB,EAAE,OAAO,KAAK;EACnD;EACA,OAAO,kBAAkB,CAACsE,IAAI,CAACD,GAAG,CAAC;AACrC"}
|
package/dist/lanes.spec.js
CHANGED
@@ -76,7 +76,7 @@ describe('LanesAspect', function () {
|
|
76
76
|
it('should list all lanes', async () => {
|
77
77
|
const currentLanes = await lanes.getLanes({});
|
78
78
|
expect(currentLanes.length).toEqual(1);
|
79
|
-
expect(currentLanes[0].name).toEqual('stage');
|
79
|
+
expect(currentLanes[0].id.name).toEqual('stage');
|
80
80
|
});
|
81
81
|
});
|
82
82
|
describe('isLaneUpToDate', () => {
|
@@ -359,6 +359,34 @@ describe('LanesAspect', function () {
|
|
359
359
|
});
|
360
360
|
});
|
361
361
|
});
|
362
|
+
describe('create lanes with the same name different scope', () => {
|
363
|
+
let lanes;
|
364
|
+
let workspaceData;
|
365
|
+
beforeAll(async () => {
|
366
|
+
workspaceData = (0, _workspaceTesting().mockWorkspace)();
|
367
|
+
const {
|
368
|
+
workspacePath
|
369
|
+
} = workspaceData;
|
370
|
+
await (0, _componentTesting().mockComponents)(workspacePath);
|
371
|
+
lanes = await (0, _harmonyTesting().loadAspect)(_lanes().LanesAspect, workspacePath);
|
372
|
+
await lanes.createLane('stage');
|
373
|
+
await lanes.switchLanes('main', {
|
374
|
+
skipDependencyInstallation: true
|
375
|
+
});
|
376
|
+
}, 30000);
|
377
|
+
afterAll(async () => {
|
378
|
+
await (0, _workspaceTesting().destroyWorkspace)(workspaceData);
|
379
|
+
});
|
380
|
+
it('should not throw when creating the second lane', async () => {
|
381
|
+
await lanes.createLane('stage', {
|
382
|
+
scope: 'new-scope'
|
383
|
+
});
|
384
|
+
const currentLanes = await lanes.getLanes({});
|
385
|
+
expect(currentLanes.length).toEqual(2);
|
386
|
+
expect(currentLanes[0].id.name).toEqual('stage');
|
387
|
+
expect(currentLanes[1].id.name).toEqual('stage');
|
388
|
+
});
|
389
|
+
});
|
362
390
|
});
|
363
391
|
|
364
392
|
//# sourceMappingURL=lanes.spec.js.map
|
package/dist/lanes.spec.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_harmonyTesting","data","require","_snapping","_interopRequireDefault","_export","_featureToggle","_workspaceTesting","_componentTesting","_lanesEntities","_lanes","obj","__esModule","default","describe","lanes","workspaceData","beforeAll","mockWorkspace","workspacePath","mockComponents","loadAspect","LanesAspect","createLane","afterAll","destroyWorkspace","it","currentLanes","getLanes","expect","length","toEqual","name","snapping","SnappingAspect","tag","ids","build","ignoreIssues","exporter","ExportAspect","export","modifyMockedComponents","result","snap","pattern","snappedComponents","currentLane","getCurrentLane","Error","isUpToDate","diffStatus","toLaneId","undefined","skipChanges","componentsStatus","every","c","upToDate","switchLanes","skipDependencyInstallation","unmodified","laneDiffResults","changeType","ChangeType","NONE","removeLanes","lanesAfterDelete","restoreLane","hash","id","output","laneHash","error","err","toBeInstanceOf","message","toMatch","laneId","addFeature","SUPPORT_LANE_HISTORY","currentLaneId","getCurrentLaneId","removeFeature","laneHistory","getLaneHistory","history","getHistory","Object","keys","results","snapHistory","log","components","toString","newWorkspace","exportResults","componentsIds","exportedLanes","bareScopeName","remoteScopeName","getAll","importLaneObject","snapHistoryId","find","key","includes","checkoutHistory","failedComponents"],"sources":["lanes.spec.ts"],"sourcesContent":["import { loadAspect } from '@teambit/harmony.testing.load-aspect';\nimport SnappingAspect, { SnappingMain } from '@teambit/snapping';\nimport { ExportAspect, ExportMain } from '@teambit/export';\nimport { LaneId } from '@teambit/lane-id';\nimport { SUPPORT_LANE_HISTORY, addFeature, removeFeature } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { mockWorkspace, destroyWorkspace, WorkspaceData } from '@teambit/workspace.testing.mock-workspace';\nimport { mockComponents, modifyMockedComponents } from '@teambit/component.testing.mock-components';\nimport { ChangeType } from '@teambit/lanes.entities.lane-diff';\nimport { LanesAspect } from './lanes.aspect';\nimport { LanesMain } from './lanes.main.runtime';\n\ndescribe('LanesAspect', function () {\n describe('getLanes()', () => {\n let lanes: LanesMain;\n let workspaceData: WorkspaceData;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should list all lanes', async () => {\n const currentLanes = await lanes.getLanes({});\n expect(currentLanes.length).toEqual(1);\n expect(currentLanes[0].name).toEqual('stage');\n });\n });\n\n describe('isLaneUpToDate', () => {\n let lanes: LanesMain;\n let snapping: SnappingMain;\n let workspaceData: WorkspaceData;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n snapping = await loadAspect(SnappingAspect, workspacePath);\n await snapping.tag({ ids: ['comp1'], build: false, ignoreIssues: 'MissingManuallyConfiguredPackages' });\n const exporter: ExportMain = await loadAspect(ExportAspect, workspacePath);\n await exporter.export();\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n await modifyMockedComponents(workspacePath, 'v2');\n const result = await snapping.snap({\n pattern: 'comp1',\n build: false,\n ignoreIssues: 'MissingManuallyConfiguredPackages',\n });\n // intermediate step, make sure it is snapped\n expect(result?.snappedComponents.length).toEqual(1);\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should return that the lane is up to date when the lane is ahead of main', async () => {\n const currentLane = await lanes.getCurrentLane();\n if (!currentLane) throw new Error('unable to get the current lane');\n const isUpToDate = (\n await lanes.diffStatus(currentLane.toLaneId(), undefined, { skipChanges: true })\n ).componentsStatus.every((c) => c.upToDate);\n\n expect(isUpToDate).toEqual(true);\n });\n it('should return that the lane is not up to date when main is ahead', async () => {\n const currentLane = await lanes.getCurrentLane();\n if (!currentLane) throw new Error('unable to get the current lane');\n await lanes.switchLanes('main', { skipDependencyInstallation: true });\n await snapping.snap({\n pattern: 'comp1',\n build: false,\n unmodified: true,\n ignoreIssues: 'MissingManuallyConfiguredPackages',\n });\n const isUpToDate = (\n await lanes.diffStatus(currentLane.toLaneId(), undefined, { skipChanges: true })\n ).componentsStatus.every((c) => c.upToDate);\n\n expect(isUpToDate).toEqual(false);\n });\n });\n\n describe('laneDiff', () => {\n let lanes: LanesMain;\n let snapping: SnappingMain;\n let workspaceData: WorkspaceData;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n snapping = await loadAspect(SnappingAspect, workspacePath);\n await snapping.tag({ ids: ['comp1'], build: false });\n const exporter: ExportMain = await loadAspect(ExportAspect, workspacePath);\n await exporter.export();\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n const result = await snapping.snap({ pattern: 'comp1', build: false, unmodified: true });\n // intermediate step, make sure it is snapped\n expect(result?.snappedComponents.length).toEqual(1);\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should return that the lane is up to date when the lane is ahead of main', async () => {\n const currentLane = await lanes.getCurrentLane();\n if (!currentLane) throw new Error('unable to get the current lane');\n const laneDiffResults = await lanes.diffStatus(currentLane.toLaneId());\n expect(laneDiffResults.componentsStatus[0].upToDate).toEqual;\n expect(laneDiffResults.componentsStatus[0].changeType).toEqual(ChangeType.NONE);\n });\n it('should return that the lane is not up to date when main is ahead', async () => {\n const currentLane = await lanes.getCurrentLane();\n if (!currentLane) throw new Error('unable to get the current lane');\n await lanes.switchLanes('main', { skipDependencyInstallation: true });\n await snapping.snap({ pattern: 'comp1', build: false, unmodified: true });\n\n const laneDiffResults = await lanes.diffStatus(currentLane.toLaneId());\n expect(laneDiffResults.componentsStatus[0].upToDate).toEqual(false);\n expect(laneDiffResults.componentsStatus[0].changeType).toEqual(ChangeType.NONE);\n });\n });\n\n describe('restoreLane()', () => {\n let lanes: LanesMain;\n let workspaceData: WorkspaceData;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n\n // as an intermediate step, make sure the lane was created\n const currentLanes = await lanes.getLanes({});\n expect(currentLanes.length).toEqual(1);\n\n await lanes.switchLanes('main', { skipDependencyInstallation: true });\n await lanes.removeLanes(['stage']);\n\n // as an intermediate step, make sure the lane was removed\n const lanesAfterDelete = await lanes.getLanes({});\n expect(lanesAfterDelete.length).toEqual(0);\n\n await lanes.restoreLane(currentLanes[0].hash);\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should restore the deleted lane', async () => {\n const currentLanes = await lanes.getLanes({});\n expect(currentLanes.length).toEqual(1);\n expect(currentLanes[0].id.name).toEqual('stage');\n });\n describe('delete restored lane', () => {\n let output: string[];\n beforeAll(async () => {\n output = await lanes.removeLanes(['stage']);\n });\n it('should not throw', () => {\n expect(output.length).toEqual(1);\n });\n });\n });\n\n describe('restore lane when an existing lane has the same id', () => {\n let lanes: LanesMain;\n let workspaceData: WorkspaceData;\n let laneHash: string;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n\n // as an intermediate step, make sure the lane was created\n const currentLanes = await lanes.getLanes({});\n expect(currentLanes.length).toEqual(1);\n\n await lanes.switchLanes('main', { skipDependencyInstallation: true });\n await lanes.removeLanes(['stage']);\n\n await lanes.createLane('stage');\n laneHash = currentLanes[0].hash;\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should throw when restoring the lane', async () => {\n let error: Error | undefined;\n try {\n await lanes.restoreLane(laneHash);\n } catch (err: any) {\n error = err;\n }\n expect(error).toBeInstanceOf(Error);\n expect(error?.message).toMatch(/unable to restore lane/);\n });\n });\n\n describe('lane history', () => {\n let lanes: LanesMain;\n let workspaceData: WorkspaceData;\n let snapping: SnappingMain;\n let laneId: LaneId;\n beforeAll(async () => {\n addFeature(SUPPORT_LANE_HISTORY);\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n snapping = await loadAspect(SnappingAspect, workspacePath);\n const currentLaneId = lanes.getCurrentLaneId();\n if (!currentLaneId) throw new Error('unable to get the current lane-id');\n laneId = currentLaneId;\n }, 30000);\n afterAll(async () => {\n removeFeature(SUPPORT_LANE_HISTORY);\n await destroyWorkspace(workspaceData);\n });\n it('should create lane history object when creating a new lane', async () => {\n const laneHistory = await lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n expect(Object.keys(history).length).toEqual(1);\n });\n it('should add a record to LaneHistory when snapping', async () => {\n const results = await snapping.snap({ pattern: 'comp1', build: false, message: 'first snap' });\n const laneHistory = await lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n expect(Object.keys(history).length).toEqual(2);\n const snapHistory = history[Object.keys(history)[1]];\n expect(snapHistory.log.message).toEqual('snap (first snap)');\n expect(snapHistory.components.length).toEqual(1);\n expect(snapHistory.components[0]).toEqual(results?.snappedComponents[0].id.toString() as string);\n });\n describe('import to another workspace', () => {\n let newWorkspace: WorkspaceData;\n beforeAll(async () => {\n // make another snap to check to test the checkout later.\n await snapping.snap({ pattern: 'comp1', build: false, message: 'second snap' });\n const laneHistory = await lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n expect(Object.keys(history).length).toEqual(3);\n\n const exporter: ExportMain = await loadAspect(ExportAspect, workspaceData.workspacePath);\n const exportResults = await exporter.export();\n expect(exportResults.componentsIds.length).toEqual(1);\n expect(exportResults.exportedLanes.length).toEqual(1);\n\n newWorkspace = mockWorkspace({ bareScopeName: workspaceData.remoteScopeName });\n\n lanes = await loadAspect(LanesAspect, newWorkspace.workspacePath);\n await lanes.switchLanes(laneId.toString(), { skipDependencyInstallation: true, getAll: true });\n await lanes.importLaneObject(laneId, true, true);\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(newWorkspace);\n });\n it('should not add a record to the lane-history', async () => {\n const laneHistory = await lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n expect(Object.keys(history).length).toEqual(3);\n });\n it('should be able to checkout to a previous state of the lane', async () => {\n const laneHistory = await lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n const snapHistoryId = Object.keys(history).find((key) => history[key].log.message?.includes('first snap'));\n if (!snapHistoryId) throw new Error('unable to find snap history of the first snap');\n const results = await lanes.checkoutHistory(snapHistoryId, { skipDependencyInstallation: true });\n expect(results.components?.length).toEqual(1);\n expect(results.failedComponents?.length).toEqual(0);\n });\n });\n });\n});\n"],"mappings":";;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,OAA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,EAAE,MAAM,IAAItD,KAAK,CAAC,+CAA+C,CAAC;QACpF,MAAMyC,OAAO,GAAG,MAAM3E,KAAK,CAAC4F,eAAe,CAACJ,aAAa,EAAE;UAAE3C,0BAA0B,EAAE;QAAK,CAAC,CAAC;QAChG/B,MAAM,CAAC6D,OAAO,CAACG,UAAU,EAAE/D,MAAM,CAAC,CAACC,OAAO,CAAC,CAAC,CAAC;QAC7CF,MAAM,CAAC6D,OAAO,CAACkB,gBAAgB,EAAE9E,MAAM,CAAC,CAACC,OAAO,CAAC,CAAC,CAAC;MACrD,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
1
|
+
{"version":3,"names":["_harmonyTesting","data","require","_snapping","_interopRequireDefault","_export","_featureToggle","_workspaceTesting","_componentTesting","_lanesEntities","_lanes","obj","__esModule","default","describe","lanes","workspaceData","beforeAll","mockWorkspace","workspacePath","mockComponents","loadAspect","LanesAspect","createLane","afterAll","destroyWorkspace","it","currentLanes","getLanes","expect","length","toEqual","id","name","snapping","SnappingAspect","tag","ids","build","ignoreIssues","exporter","ExportAspect","export","modifyMockedComponents","result","snap","pattern","snappedComponents","currentLane","getCurrentLane","Error","isUpToDate","diffStatus","toLaneId","undefined","skipChanges","componentsStatus","every","c","upToDate","switchLanes","skipDependencyInstallation","unmodified","laneDiffResults","changeType","ChangeType","NONE","removeLanes","lanesAfterDelete","restoreLane","hash","output","laneHash","error","err","toBeInstanceOf","message","toMatch","laneId","addFeature","SUPPORT_LANE_HISTORY","currentLaneId","getCurrentLaneId","removeFeature","laneHistory","getLaneHistory","history","getHistory","Object","keys","results","snapHistory","log","components","toString","newWorkspace","exportResults","componentsIds","exportedLanes","bareScopeName","remoteScopeName","getAll","importLaneObject","snapHistoryId","find","key","includes","checkoutHistory","failedComponents","scope"],"sources":["lanes.spec.ts"],"sourcesContent":["import { loadAspect } from '@teambit/harmony.testing.load-aspect';\nimport SnappingAspect, { SnappingMain } from '@teambit/snapping';\nimport { ExportAspect, ExportMain } from '@teambit/export';\nimport { LaneId } from '@teambit/lane-id';\nimport { SUPPORT_LANE_HISTORY, addFeature, removeFeature } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { mockWorkspace, destroyWorkspace, WorkspaceData } from '@teambit/workspace.testing.mock-workspace';\nimport { mockComponents, modifyMockedComponents } from '@teambit/component.testing.mock-components';\nimport { ChangeType } from '@teambit/lanes.entities.lane-diff';\nimport { LanesAspect } from './lanes.aspect';\nimport { LanesMain } from './lanes.main.runtime';\n\ndescribe('LanesAspect', function () {\n describe('getLanes()', () => {\n let lanes: LanesMain;\n let workspaceData: WorkspaceData;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should list all lanes', async () => {\n const currentLanes = await lanes.getLanes({});\n expect(currentLanes.length).toEqual(1);\n expect(currentLanes[0].id.name).toEqual('stage');\n });\n });\n\n describe('isLaneUpToDate', () => {\n let lanes: LanesMain;\n let snapping: SnappingMain;\n let workspaceData: WorkspaceData;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n snapping = await loadAspect(SnappingAspect, workspacePath);\n await snapping.tag({ ids: ['comp1'], build: false, ignoreIssues: 'MissingManuallyConfiguredPackages' });\n const exporter: ExportMain = await loadAspect(ExportAspect, workspacePath);\n await exporter.export();\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n await modifyMockedComponents(workspacePath, 'v2');\n const result = await snapping.snap({\n pattern: 'comp1',\n build: false,\n ignoreIssues: 'MissingManuallyConfiguredPackages',\n });\n // intermediate step, make sure it is snapped\n expect(result?.snappedComponents.length).toEqual(1);\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should return that the lane is up to date when the lane is ahead of main', async () => {\n const currentLane = await lanes.getCurrentLane();\n if (!currentLane) throw new Error('unable to get the current lane');\n const isUpToDate = (\n await lanes.diffStatus(currentLane.toLaneId(), undefined, { skipChanges: true })\n ).componentsStatus.every((c) => c.upToDate);\n\n expect(isUpToDate).toEqual(true);\n });\n it('should return that the lane is not up to date when main is ahead', async () => {\n const currentLane = await lanes.getCurrentLane();\n if (!currentLane) throw new Error('unable to get the current lane');\n await lanes.switchLanes('main', { skipDependencyInstallation: true });\n await snapping.snap({\n pattern: 'comp1',\n build: false,\n unmodified: true,\n ignoreIssues: 'MissingManuallyConfiguredPackages',\n });\n const isUpToDate = (\n await lanes.diffStatus(currentLane.toLaneId(), undefined, { skipChanges: true })\n ).componentsStatus.every((c) => c.upToDate);\n\n expect(isUpToDate).toEqual(false);\n });\n });\n\n describe('laneDiff', () => {\n let lanes: LanesMain;\n let snapping: SnappingMain;\n let workspaceData: WorkspaceData;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n snapping = await loadAspect(SnappingAspect, workspacePath);\n await snapping.tag({ ids: ['comp1'], build: false });\n const exporter: ExportMain = await loadAspect(ExportAspect, workspacePath);\n await exporter.export();\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n const result = await snapping.snap({ pattern: 'comp1', build: false, unmodified: true });\n // intermediate step, make sure it is snapped\n expect(result?.snappedComponents.length).toEqual(1);\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should return that the lane is up to date when the lane is ahead of main', async () => {\n const currentLane = await lanes.getCurrentLane();\n if (!currentLane) throw new Error('unable to get the current lane');\n const laneDiffResults = await lanes.diffStatus(currentLane.toLaneId());\n expect(laneDiffResults.componentsStatus[0].upToDate).toEqual;\n expect(laneDiffResults.componentsStatus[0].changeType).toEqual(ChangeType.NONE);\n });\n it('should return that the lane is not up to date when main is ahead', async () => {\n const currentLane = await lanes.getCurrentLane();\n if (!currentLane) throw new Error('unable to get the current lane');\n await lanes.switchLanes('main', { skipDependencyInstallation: true });\n await snapping.snap({ pattern: 'comp1', build: false, unmodified: true });\n\n const laneDiffResults = await lanes.diffStatus(currentLane.toLaneId());\n expect(laneDiffResults.componentsStatus[0].upToDate).toEqual(false);\n expect(laneDiffResults.componentsStatus[0].changeType).toEqual(ChangeType.NONE);\n });\n });\n\n describe('restoreLane()', () => {\n let lanes: LanesMain;\n let workspaceData: WorkspaceData;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n\n // as an intermediate step, make sure the lane was created\n const currentLanes = await lanes.getLanes({});\n expect(currentLanes.length).toEqual(1);\n\n await lanes.switchLanes('main', { skipDependencyInstallation: true });\n await lanes.removeLanes(['stage']);\n\n // as an intermediate step, make sure the lane was removed\n const lanesAfterDelete = await lanes.getLanes({});\n expect(lanesAfterDelete.length).toEqual(0);\n\n await lanes.restoreLane(currentLanes[0].hash);\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should restore the deleted lane', async () => {\n const currentLanes = await lanes.getLanes({});\n expect(currentLanes.length).toEqual(1);\n expect(currentLanes[0].id.name).toEqual('stage');\n });\n describe('delete restored lane', () => {\n let output: string[];\n beforeAll(async () => {\n output = await lanes.removeLanes(['stage']);\n });\n it('should not throw', () => {\n expect(output.length).toEqual(1);\n });\n });\n });\n\n describe('restore lane when an existing lane has the same id', () => {\n let lanes: LanesMain;\n let workspaceData: WorkspaceData;\n let laneHash: string;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n\n // as an intermediate step, make sure the lane was created\n const currentLanes = await lanes.getLanes({});\n expect(currentLanes.length).toEqual(1);\n\n await lanes.switchLanes('main', { skipDependencyInstallation: true });\n await lanes.removeLanes(['stage']);\n\n await lanes.createLane('stage');\n laneHash = currentLanes[0].hash;\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should throw when restoring the lane', async () => {\n let error: Error | undefined;\n try {\n await lanes.restoreLane(laneHash);\n } catch (err: any) {\n error = err;\n }\n expect(error).toBeInstanceOf(Error);\n expect(error?.message).toMatch(/unable to restore lane/);\n });\n });\n\n describe('lane history', () => {\n let lanes: LanesMain;\n let workspaceData: WorkspaceData;\n let snapping: SnappingMain;\n let laneId: LaneId;\n beforeAll(async () => {\n addFeature(SUPPORT_LANE_HISTORY);\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n snapping = await loadAspect(SnappingAspect, workspacePath);\n const currentLaneId = lanes.getCurrentLaneId();\n if (!currentLaneId) throw new Error('unable to get the current lane-id');\n laneId = currentLaneId;\n }, 30000);\n afterAll(async () => {\n removeFeature(SUPPORT_LANE_HISTORY);\n await destroyWorkspace(workspaceData);\n });\n it('should create lane history object when creating a new lane', async () => {\n const laneHistory = await lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n expect(Object.keys(history).length).toEqual(1);\n });\n it('should add a record to LaneHistory when snapping', async () => {\n const results = await snapping.snap({ pattern: 'comp1', build: false, message: 'first snap' });\n const laneHistory = await lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n expect(Object.keys(history).length).toEqual(2);\n const snapHistory = history[Object.keys(history)[1]];\n expect(snapHistory.log.message).toEqual('snap (first snap)');\n expect(snapHistory.components.length).toEqual(1);\n expect(snapHistory.components[0]).toEqual(results?.snappedComponents[0].id.toString() as string);\n });\n describe('import to another workspace', () => {\n let newWorkspace: WorkspaceData;\n beforeAll(async () => {\n // make another snap to check to test the checkout later.\n await snapping.snap({ pattern: 'comp1', build: false, message: 'second snap' });\n const laneHistory = await lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n expect(Object.keys(history).length).toEqual(3);\n\n const exporter: ExportMain = await loadAspect(ExportAspect, workspaceData.workspacePath);\n const exportResults = await exporter.export();\n expect(exportResults.componentsIds.length).toEqual(1);\n expect(exportResults.exportedLanes.length).toEqual(1);\n\n newWorkspace = mockWorkspace({ bareScopeName: workspaceData.remoteScopeName });\n\n lanes = await loadAspect(LanesAspect, newWorkspace.workspacePath);\n await lanes.switchLanes(laneId.toString(), { skipDependencyInstallation: true, getAll: true });\n await lanes.importLaneObject(laneId, true, true);\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(newWorkspace);\n });\n it('should not add a record to the lane-history', async () => {\n const laneHistory = await lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n expect(Object.keys(history).length).toEqual(3);\n });\n it('should be able to checkout to a previous state of the lane', async () => {\n const laneHistory = await lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n const snapHistoryId = Object.keys(history).find((key) => history[key].log.message?.includes('first snap'));\n if (!snapHistoryId) throw new Error('unable to find snap history of the first snap');\n const results = await lanes.checkoutHistory(snapHistoryId, { skipDependencyInstallation: true });\n expect(results.components?.length).toEqual(1);\n expect(results.failedComponents?.length).toEqual(0);\n });\n });\n });\n\n describe('create lanes with the same name different scope', () => {\n let lanes: LanesMain;\n let workspaceData: WorkspaceData;\n beforeAll(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n await lanes.switchLanes('main', { skipDependencyInstallation: true });\n }, 30000);\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should not throw when creating the second lane', async () => {\n await lanes.createLane('stage', { scope: 'new-scope' });\n const currentLanes = await lanes.getLanes({});\n expect(currentLanes.length).toEqual(2);\n expect(currentLanes[0].id.name).toEqual('stage');\n expect(currentLanes[1].id.name).toEqual('stage');\n });\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AAK,CAAC;IACTrC,QAAQ,CAAC,YAAY;MACnB,MAAM,IAAAC,oCAAgB,EAACT,aAAa,CAAC;IACvC,CAAC,CAAC;IACFU,EAAE,CAAC,gDAAgD,EAAE,YAAY;MAC/D,MAAMX,KAAK,CAACQ,UAAU,CAAC,OAAO,EAAE;QAAEsF,KAAK,EAAE;MAAY,CAAC,CAAC;MACvD,MAAMlF,YAAY,GAAG,MAAMZ,KAAK,CAACa,QAAQ,CAAC,CAAC,CAAC,CAAC;MAC7CC,MAAM,CAACF,YAAY,CAACG,MAAM,CAAC,CAACC,OAAO,CAAC,CAAC,CAAC;MACtCF,MAAM,CAACF,YAAY,CAAC,CAAC,CAAC,CAACK,EAAE,CAACC,IAAI,CAAC,CAACF,OAAO,CAAC,OAAO,CAAC;MAChDF,MAAM,CAACF,YAAY,CAAC,CAAC,CAAC,CAACK,EAAE,CAACC,IAAI,CAAC,CAACF,OAAO,CAAC,OAAO,CAAC;IAClD,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@1.0.140/dist/lanes.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@1.0.140/dist/lanes.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/lanes",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.140",
|
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.140"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"lodash": "4.17.21",
|
@@ -28,23 +28,23 @@
|
|
28
28
|
"@teambit/ui-foundation.ui.menu": "0.0.502",
|
29
29
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.506",
|
30
30
|
"@teambit/ui-foundation.ui.react-router.use-query": "0.0.501",
|
31
|
-
"@teambit/scope": "1.0.
|
32
|
-
"@teambit/workspace": "1.0.
|
31
|
+
"@teambit/scope": "1.0.140",
|
32
|
+
"@teambit/workspace": "1.0.140",
|
33
33
|
"@teambit/lanes.ui.models.lanes-model": "0.0.212",
|
34
|
-
"@teambit/checkout": "1.0.
|
34
|
+
"@teambit/checkout": "1.0.140",
|
35
35
|
"@teambit/cli": "0.0.848",
|
36
36
|
"@teambit/express": "0.0.947",
|
37
37
|
"@teambit/logger": "0.0.941",
|
38
|
-
"@teambit/graphql": "1.0.
|
39
|
-
"@teambit/component-compare": "1.0.
|
40
|
-
"@teambit/component-writer": "1.0.
|
41
|
-
"@teambit/component": "1.0.
|
42
|
-
"@teambit/export": "1.0.
|
43
|
-
"@teambit/importer": "1.0.
|
38
|
+
"@teambit/graphql": "1.0.140",
|
39
|
+
"@teambit/component-compare": "1.0.140",
|
40
|
+
"@teambit/component-writer": "1.0.140",
|
41
|
+
"@teambit/component": "1.0.140",
|
42
|
+
"@teambit/export": "1.0.140",
|
43
|
+
"@teambit/importer": "1.0.140",
|
44
44
|
"@teambit/lanes.entities.lane-diff": "0.0.166",
|
45
45
|
"@teambit/lanes.modules.diff": "0.0.442",
|
46
|
-
"@teambit/merging": "1.0.
|
47
|
-
"@teambit/remove": "1.0.
|
46
|
+
"@teambit/merging": "1.0.140",
|
47
|
+
"@teambit/remove": "1.0.140",
|
48
48
|
"@teambit/lanes.hooks.use-lanes": "0.0.258",
|
49
49
|
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.218",
|
50
50
|
"@teambit/lanes.ui.compare.lane-compare-page": "0.0.153",
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"@teambit/lanes.ui.lane-overview": "0.0.214",
|
53
53
|
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.209",
|
54
54
|
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.216",
|
55
|
-
"@teambit/ui": "1.0.
|
55
|
+
"@teambit/ui": "1.0.140"
|
56
56
|
},
|
57
57
|
"devDependencies": {
|
58
58
|
"@types/lodash": "4.14.165",
|
@@ -62,7 +62,7 @@
|
|
62
62
|
"@teambit/harmony.envs.core-aspect-env": "0.0.19",
|
63
63
|
"@teambit/component.testing.mock-components": "0.0.184",
|
64
64
|
"@teambit/harmony.testing.load-aspect": "0.0.183",
|
65
|
-
"@teambit/snapping": "1.0.
|
65
|
+
"@teambit/snapping": "1.0.140",
|
66
66
|
"@teambit/workspace.testing.mock-workspace": "0.0.23"
|
67
67
|
},
|
68
68
|
"peerDependencies": {
|