@teambit/merge-lanes 0.0.310 → 0.0.311

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.
@@ -32,10 +32,10 @@ class MergeAbortLaneCmd {
32
32
  this.mergeLanes = mergeLanes;
33
33
  (0, _defineProperty2().default)(this, "name", 'merge-abort');
34
34
  (0, _defineProperty2().default)(this, "description", `abort the recent lane-merge. revert the lane object and checkout accordingly`);
35
- (0, _defineProperty2().default)(this, "extendedDescription", `restore the lane-object same as it was before the last "bit lane merge" command.
36
- also, checkout the workspace components according to the restored lane`);
35
+ (0, _defineProperty2().default)(this, "extendedDescription", `restore the lane-object to its state before the last "bit lane merge" command.
36
+ also, checkout the workspace components according to the restored lane state`);
37
37
  (0, _defineProperty2().default)(this, "alias", '');
38
- (0, _defineProperty2().default)(this, "options", [['', 'verbose', 'show details of components that were not merged legitimately'], ['s', 'silent', 'skip confirmation'], ['x', 'skip-dependency-installation', 'do not install packages of the imported components']]);
38
+ (0, _defineProperty2().default)(this, "options", [['', 'verbose', "show details of components that didn't need to be merged"], ['s', 'silent', 'skip confirmation'], ['x', 'skip-dependency-installation', 'do not install packages of the imported components']]);
39
39
  (0, _defineProperty2().default)(this, "loader", true);
40
40
  (0, _defineProperty2().default)(this, "private", true);
41
41
  (0, _defineProperty2().default)(this, "migration", true);
@@ -62,7 +62,7 @@ also, checkout the workspace components according to the restored lane`);
62
62
  } = await this.mergeLanes.abortLaneMerge(checkoutProps, mergeAbortOpts);
63
63
  const getCheckoutErrorStr = () => {
64
64
  if (!checkoutError) return '';
65
- const errMsg = `\n\nFailed changing the component files to the pre-merge due to an error:
65
+ const errMsg = `\n\nFailed to change component files to the pre-merge state due to an error:
66
66
  ${checkoutError.message}
67
67
  please fix the error and then run "bit checkout reset --all" to revert the components to the pre-merge state`;
68
68
  return _chalk().default.red(errMsg);
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_checkout","MergeAbortLaneCmd","constructor","mergeLanes","_defineProperty2","default","report","_","skipDependencyInstallation","verbose","silent","checkoutProps","reset","all","skipNpmInstall","mergeAbortOpts","checkoutResults","restoredItems","checkoutError","abortLaneMerge","getCheckoutErrorStr","errMsg","message","chalk","red","checkoutOutputStr","checkoutOutput","restoredItemsTitle","green","restoredItemsOutput","map","item","join","exports"],"sources":["merge-abort.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { CheckoutProps, checkoutOutput } from '@teambit/checkout';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { MergeLanesMain } from './merge-lanes.main.runtime';\n\nexport type MergeAbortOpts = {\n silent?: boolean; // don't show prompt before aborting\n};\n\nexport class MergeAbortLaneCmd implements Command {\n name = 'merge-abort';\n description = `abort the recent lane-merge. revert the lane object and checkout accordingly`;\n extendedDescription = `restore the lane-object same as it was before the last \"bit lane merge\" command.\nalso, checkout the workspace components according to the restored lane`;\n alias = '';\n options = [\n ['', 'verbose', 'show details of components that were not merged legitimately'],\n ['s', 'silent', 'skip confirmation'],\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n ] as CommandOptions;\n loader = true;\n private = true;\n migration = true;\n remoteOp = true;\n\n constructor(private mergeLanes: MergeLanesMain) {}\n\n async report(\n _,\n {\n skipDependencyInstallation = false,\n verbose = false,\n silent = false,\n }: {\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n silent?: boolean;\n }\n ): Promise<string> {\n const checkoutProps: CheckoutProps = {\n reset: true,\n all: true,\n verbose,\n skipNpmInstall: skipDependencyInstallation,\n };\n const mergeAbortOpts = { silent };\n const { checkoutResults, restoredItems, checkoutError } = await this.mergeLanes.abortLaneMerge(\n checkoutProps,\n mergeAbortOpts\n );\n\n const getCheckoutErrorStr = () => {\n if (!checkoutError) return '';\n const errMsg = `\\n\\nFailed changing the component files to the pre-merge due to an error:\n${checkoutError.message}\nplease fix the error and then run \"bit checkout reset --all\" to revert the components to the pre-merge state`;\n return chalk.red(errMsg);\n };\n\n const checkoutOutputStr = checkoutResults ? checkoutOutput(checkoutResults, checkoutProps) : '';\n const restoredItemsTitle = chalk.green('The following have been restored successfully:');\n const restoredItemsOutput = restoredItems.map((item) => `[√] ${item}`).join('\\n');\n\n return `${checkoutOutputStr}\\n\\n${restoredItemsTitle}\\n${restoredItemsOutput}${getCheckoutErrorStr()}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQO,MAAMI,iBAAiB,CAAoB;EAgBhDC,WAAWA,CAASC,UAA0B,EAAE;IAAA,KAA5BA,UAA0B,GAA1BA,UAA0B;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBAfvC,aAAa;IAAA,IAAAD,gBAAA,GAAAC,OAAA,uBACL,8EAA6E;IAAA,IAAAD,gBAAA,GAAAC,OAAA,+BACrE;AACzB,uEAAuE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBAC7D,EAAE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACA,CACR,CAAC,EAAE,EAAE,SAAS,EAAE,8DAA8D,CAAC,EAC/E,CAAC,GAAG,EAAE,QAAQ,EAAE,mBAAmB,CAAC,EACpC,CAAC,GAAG,EAAE,8BAA8B,EAAE,oDAAoD,CAAC,CAC5F;IAAA,IAAAD,gBAAA,GAAAC,OAAA,kBACQ,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACH,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBACF,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,oBACL,IAAI;EAEkC;EAEjD,MAAMC,MAAMA,CACVC,CAAC,EACD;IACEC,0BAA0B,GAAG,KAAK;IAClCC,OAAO,GAAG,KAAK;IACfC,MAAM,GAAG;EAKX,CAAC,EACgB;IACjB,MAAMC,aAA4B,GAAG;MACnCC,KAAK,EAAE,IAAI;MACXC,GAAG,EAAE,IAAI;MACTJ,OAAO;MACPK,cAAc,EAAEN;IAClB,CAAC;IACD,MAAMO,cAAc,GAAG;MAAEL;IAAO,CAAC;IACjC,MAAM;MAAEM,eAAe;MAAEC,aAAa;MAAEC;IAAc,CAAC,GAAG,MAAM,IAAI,CAACf,UAAU,CAACgB,cAAc,CAC5FR,aAAa,EACbI,cACF,CAAC;IAED,MAAMK,mBAAmB,GAAGA,CAAA,KAAM;MAChC,IAAI,CAACF,aAAa,EAAE,OAAO,EAAE;MAC7B,MAAMG,MAAM,GAAI;AACtB,EAAEH,aAAa,CAACI,OAAQ;AACxB,6GAA6G;MACvG,OAAOC,gBAAK,CAACC,GAAG,CAACH,MAAM,CAAC;IAC1B,CAAC;IAED,MAAMI,iBAAiB,GAAGT,eAAe,GAAG,IAAAU,0BAAc,EAACV,eAAe,EAAEL,aAAa,CAAC,GAAG,EAAE;IAC/F,MAAMgB,kBAAkB,GAAGJ,gBAAK,CAACK,KAAK,CAAC,gDAAgD,CAAC;IACxF,MAAMC,mBAAmB,GAAGZ,aAAa,CAACa,GAAG,CAAEC,IAAI,IAAM,OAAMA,IAAK,EAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAEjF,OAAQ,GAAEP,iBAAkB,OAAME,kBAAmB,KAAIE,mBAAoB,GAAET,mBAAmB,CAAC,CAAE,EAAC;EACxG;AACF;AAACa,OAAA,CAAAhC,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_checkout","MergeAbortLaneCmd","constructor","mergeLanes","_defineProperty2","default","report","_","skipDependencyInstallation","verbose","silent","checkoutProps","reset","all","skipNpmInstall","mergeAbortOpts","checkoutResults","restoredItems","checkoutError","abortLaneMerge","getCheckoutErrorStr","errMsg","message","chalk","red","checkoutOutputStr","checkoutOutput","restoredItemsTitle","green","restoredItemsOutput","map","item","join","exports"],"sources":["merge-abort.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { CheckoutProps, checkoutOutput } from '@teambit/checkout';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { MergeLanesMain } from './merge-lanes.main.runtime';\n\nexport type MergeAbortOpts = {\n silent?: boolean; // don't show prompt before aborting\n};\n\nexport class MergeAbortLaneCmd implements Command {\n name = 'merge-abort';\n description = `abort the recent lane-merge. revert the lane object and checkout accordingly`;\n extendedDescription = `restore the lane-object to its state before the last \"bit lane merge\" command.\nalso, checkout the workspace components according to the restored lane state`;\n alias = '';\n options = [\n ['', 'verbose', \"show details of components that didn't need to be merged\"],\n ['s', 'silent', 'skip confirmation'],\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n ] as CommandOptions;\n loader = true;\n private = true;\n migration = true;\n remoteOp = true;\n\n constructor(private mergeLanes: MergeLanesMain) {}\n\n async report(\n _,\n {\n skipDependencyInstallation = false,\n verbose = false,\n silent = false,\n }: {\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n silent?: boolean;\n }\n ): Promise<string> {\n const checkoutProps: CheckoutProps = {\n reset: true,\n all: true,\n verbose,\n skipNpmInstall: skipDependencyInstallation,\n };\n const mergeAbortOpts = { silent };\n const { checkoutResults, restoredItems, checkoutError } = await this.mergeLanes.abortLaneMerge(\n checkoutProps,\n mergeAbortOpts\n );\n\n const getCheckoutErrorStr = () => {\n if (!checkoutError) return '';\n const errMsg = `\\n\\nFailed to change component files to the pre-merge state due to an error:\n${checkoutError.message}\nplease fix the error and then run \"bit checkout reset --all\" to revert the components to the pre-merge state`;\n return chalk.red(errMsg);\n };\n\n const checkoutOutputStr = checkoutResults ? checkoutOutput(checkoutResults, checkoutProps) : '';\n const restoredItemsTitle = chalk.green('The following have been restored successfully:');\n const restoredItemsOutput = restoredIt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IACjB,MAAMC,aAA4B,GAAG;MACnCC,KAAK,EAAE,IAAI;MACXC,GAAG,EAAE,IAAI;MACTJ,OAAO;MACPK,cAAc,EAAEN;IAClB,CAAC;IACD,MAAMO,cAAc,GAAG;MAAEL;IAAO,CAAC;IACjC,MAAM;MAAEM,eAAe;MAAEC,aAAa;MAAEC;IAAc,CAAC,GAAG,MAAM,IAAI,CAACf,UAAU,CAACgB,cAAc,CAC5FR,aAAa,EACbI,cACF,CAAC;IAED,MAAMK,mBAAmB,GAAGA,CAAA,KAAM;MAChC,IAAI,CAACF,aAAa,EAAE,OAAO,EAAE;MAC7B,MAAMG,MAAM,GAAI;AACtB,EAAEH,aAAa,CAACI,OAAQ;AACxB,6GAA6G;MACvG,OAAOC,gBAAK,CAACC,GAAG,CAACH,MAAM,CAAC;IAC1B,CAAC;IAED,MAAMI,iBAAiB,GAAGT,eAAe,GAAG,IAAAU,0BAAc,EAACV,eAAe,EAAEL,aAAa,CAAC,GAAG,EAAE;IAC/F,MAAMgB,kBAAkB,GAAGJ,gBAAK,CAACK,KAAK,CAAC,gDAAgD,CAAC;IACxF,MAAMC,mBAAmB,GAAGZ,aAAa,CAACa,GAAG,CAAEC,IAAI,IAAM,OAAMA,IAAK,EAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAEjF,OAAQ,GAAEP,iBAAkB,OAAME,kBAAmB,KAAIE,mBAAoB,GAAET,mBAAmB,CAAC,CAAE,EAAC;EACxG;AACF;AAACa,OAAA,CAAAhC,iBAAA,GAAAA,iBAAA"}
@@ -35,6 +35,13 @@ function _featureToggle() {
35
35
  };
36
36
  return data;
37
37
  }
38
+ function _constants() {
39
+ const data = require("@teambit/legacy/dist/constants");
40
+ _constants = function () {
41
+ return data;
42
+ };
43
+ return data;
44
+ }
38
45
  function _bitError() {
39
46
  const data = require("@teambit/bit-error");
40
47
  _bitError = function () {
@@ -55,21 +62,22 @@ class MergeLaneCmd {
55
62
  constructor(mergeLanes) {
56
63
  this.mergeLanes = mergeLanes;
57
64
  (0, _defineProperty2().default)(this, "name", 'merge <lane> [pattern]');
58
- (0, _defineProperty2().default)(this, "description", `merge a local or a remote lane`);
65
+ (0, _defineProperty2().default)(this, "description", `merge a local or a remote lane to the current lane`);
59
66
  (0, _defineProperty2().default)(this, "extendedDescription", `by default, the provided lane will be fetched from the remote before merging.
60
67
  to merge the lane from the local scope without updating it first, use "--skip-fetch" flag.
61
68
 
62
- when the current and the other lanes are diverged in history and the files could be merged with no conflicts,
63
- it will snap-merge these components to complete the merge. use "no-snap" to opt-out, or "tag" to tag instead`);
69
+ when the current and merge candidate lanes are diverged in history and the files could be merged with no conflicts,
70
+ these components will be snap-merged to complete the merge. use "no-snap" to opt-out, or "tag" to tag instead`);
64
71
  (0, _defineProperty2().default)(this, "arguments", [{
65
72
  name: 'lane',
66
- description: 'lane-name or lane-id (if not exists locally) to merge to the current lane'
73
+ description: 'lane-name or full lane-id (if remote) to merge to the current lane'
67
74
  }, {
68
75
  name: 'pattern',
69
- description: 'partially merge the lane with the specified component-pattern'
76
+ description: `partially merge the lane - only components that match the specified component-pattern
77
+ Component pattern format: ${_constants().COMPONENT_PATTERN_HELP}`
70
78
  }]);
71
79
  (0, _defineProperty2().default)(this, "alias", '');
72
- (0, _defineProperty2().default)(this, "options", [['', 'ours', 'DEPRECATED. use --auto-merge-resolve. In the future, this flag will leave the current code intact'], ['', 'theirs', 'DEPRECATED. use --auto-merge-resolve. In the future, this flag will override the current code with the incoming code'], ['', 'manual', 'DEPRECATED. use --auto-merge-resolve'], ['', 'auto-merge-resolve <merge-strategy>', 'in case of a conflict, resolve according to the strategy: [ours, theirs, manual]'], ['', 'workspace', 'merge only components in a lane that exist in the workspace'], ['', 'no-snap', 'do not auto snap in case the merge completed without conflicts'], ['', 'tag', 'tag all lane components after merging into main (also tag-merge in case of snap-merge)'], ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'], ['m', 'message <message>', 'override the default message for the auto snap'], ['', 'keep-readme', 'skip deleting the lane readme component after merging'], ['', 'no-squash', 'relevant for merging lanes into main, which by default squash'], ['', 'squash', 'EXPERIMENTAL. relevant for merging a lane into another lane, which by default does not squash'], ['', 'ignore-config-changes', 'allow merging when component are modified due to config changes (such as dependencies) only and not files'], ['', 'verbose', 'show details of components that were not merged legitimately'], ['x', 'skip-dependency-installation', 'do not install packages of the imported components'], ['', 'skip-fetch', 'use the current target-lane if exits locally without updating it from the remote'], ['', 'include-deps', 'relevant for "--pattern" and "--workspace". merge also dependencies of the given components'], ['', 'resolve-unrelated [merge-strategy]', 'relevant when a component on a lane and the component on main has nothing in common. merge-strategy can be "ours" (default) or "theirs"'], ['', 'include-non-lane-comps', 'when merging main, include workspace components that are not on the lane (by default only lane components are merged)']]);
80
+ (0, _defineProperty2().default)(this, "options", [['', 'ours', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep local modifications'], ['', 'theirs', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, override local with incoming changes'], ['', 'manual', 'DEPRECATED. use --auto-merge-resolve'], ['', 'auto-merge-resolve <merge-strategy>', 'in case of a merge conflict, resolve according to the provided strategy: [ours, theirs, manual]'], ['', 'workspace', 'merge only lane components that are in the current workspace'], ['', 'no-snap', 'do not auto snap after merge completed without conflicts'], ['', 'tag', 'auto-tag all lane components after merging into main (or tag-merge in case of snap-merge)'], ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'], ['m', 'message <message>', 'override the default message for the auto snap'], ['', 'keep-readme', 'skip deleting the lane readme component after merging'], ['', 'no-squash', 'relevant for merging lanes into main, which by default squashes all lane snaps'], ['', 'squash', 'EXPERIMENTAL. relevant for merging a lane into another non-main lane, which by default does not squash'], ['', 'ignore-config-changes', 'allow merging when components are modified due to config changes (such as dependencies) only and not files'], ['', 'verbose', 'show details of components that were not merged successfully'], ['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'], ['', 'skip-fetch', 'use the local state of target-lane if exits locally, without updating it from the remote'], ['', 'include-deps', 'relevant for "--pattern" and "--workspace". merge also dependencies of the specified components'], ['', 'resolve-unrelated [merge-strategy]', 'relevant when a component on a lane and the component on main have nothing in common. merge-strategy can be "ours" (default) or "theirs"'], ['', 'include-non-lane-comps', 'when merging main, include workspace components that are not on the lane (by default only lane components are merged)']]);
73
81
  (0, _defineProperty2().default)(this, "loader", true);
74
82
  (0, _defineProperty2().default)(this, "private", true);
75
83
  (0, _defineProperty2().default)(this, "migration", true);
@@ -104,7 +112,7 @@ it will snap-merge these components to complete the merge. use "no-snap" to opt-
104
112
  throw new (_bitError().BitError)('--auto-merge-resolve must be one of the following: [ours, theirs, manual]');
105
113
  }
106
114
  const mergeStrategy = autoMergeResolve;
107
- if (noSnap && snapMessage) throw new (_bitError().BitError)('unable to use "noSnap" and "message" flags together');
115
+ if (noSnap && snapMessage) throw new (_bitError().BitError)('unable to use "no-snap" and "message" flags together');
108
116
  if (includeDeps && !pattern && !existingOnWorkspaceOnly) {
109
117
  throw new (_bitError().BitError)(`"--include-deps" flag is relevant only for --workspace and --pattern flags`);
110
118
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_merging","_featureToggle","_bitError","_removeTemplate","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","MergeLaneCmd","constructor","mergeLanes","name","description","report","pattern","ours","theirs","manual","autoMergeResolve","build","workspace","existingOnWorkspaceOnly","squash","noSnap","tag","message","snapMessage","keepReadme","noSquash","skipDependencyInstallation","skipFetch","includeDeps","resolveUnrelated","ignoreConfigChanges","verbose","includeNonLaneComps","isFeatureEnabled","BUILD_ON_CI","Boolean","BitError","mergeStrategy","getResolveUnrelated","undefined","Error","mergeResults","deleteResults","configMergeResults","mergeLane","mergeResult","mergeReport","deleteResult","localResult","paintRemoved","remoteResult","map","item","readmeResult","chalk","yellow","exports"],"sources":["merge-lane.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { mergeReport } from '@teambit/merging';\nimport { BUILD_ON_CI, isFeatureEnabled } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { BitError } from '@teambit/bit-error';\nimport paintRemoved from '@teambit/legacy/dist/cli/templates/remove-template';\nimport { MergeLanesMain } from './merge-lanes.main.runtime';\n\nexport class MergeLaneCmd implements Command {\n name = 'merge <lane> [pattern]';\n description = `merge a local or a remote lane`;\n extendedDescription = `by default, the provided lane will be fetched from the remote before merging.\nto merge the lane from the local scope without updating it first, use \"--skip-fetch\" flag.\n\nwhen the current and the other lanes are diverged in history and the files could be merged with no conflicts,\nit will snap-merge these components to complete the merge. use \"no-snap\" to opt-out, or \"tag\" to tag instead`;\n arguments = [\n {\n name: 'lane',\n description: 'lane-name or lane-id (if not exists locally) to merge to the current lane',\n },\n {\n name: 'pattern',\n description: 'partially merge the lane with the specified component-pattern',\n },\n ];\n alias = '';\n options = [\n ['', 'ours', 'DEPRECATED. use --auto-merge-resolve. In the future, this flag will leave the current code intact'],\n [\n '',\n 'theirs',\n 'DEPRECATED. use --auto-merge-resolve. In the future, this flag will override the current code with the incoming code',\n ],\n ['', 'manual', 'DEPRECATED. use --auto-merge-resolve'],\n [\n '',\n 'auto-merge-resolve <merge-strategy>',\n 'in case of a conflict, resolve according to the strategy: [ours, theirs, manual]',\n ],\n ['', 'workspace', 'merge only components in a lane that exist in the workspace'],\n ['', 'no-snap', 'do not auto snap in case the merge completed without conflicts'],\n ['', 'tag', 'tag all lane components after merging into main (also tag-merge in case of snap-merge)'],\n ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'],\n ['m', 'message <message>', 'override the default message for the auto snap'],\n ['', 'keep-readme', 'skip deleting the lane readme component after merging'],\n ['', 'no-squash', 'relevant for merging lanes into main, which by default squash'],\n ['', 'squash', 'EXPERIMENTAL. relevant for merging a lane into another lane, which by default does not squash'],\n [\n '',\n 'ignore-config-changes',\n 'allow merging when component are modified due to config changes (such as dependencies) only and not files',\n ],\n ['', 'verbose', 'show details of components that were not merged legitimately'],\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n ['', 'skip-fetch', 'use the current target-lane if exits locally without updating it from the remote'],\n ['', 'include-deps', 'relevant for \"--pattern\" and \"--workspace\". merge also dependencies of the given components'],\n [\n '',\n 'resolve-unrelated [merge-strategy]',\n 'relevant when a component on a lane and the component on main has nothing in common. merge-strategy can be \"ours\" (default) or \"theirs\"',\n ],\n [\n '',\n 'include-non-lane-comps',\n 'when merging main, include workspace components that are not on the lane (by default only lane components are merged)',\n ],\n ] as CommandOptions;\n loader = true;\n private = true;\n migration = true;\n remoteOp = true;\n\n constructor(private mergeLanes: MergeLanesMain) {}\n\n async report(\n [name, pattern]: [string, string],\n {\n ours,\n theirs,\n manual,\n autoMergeResolve,\n build,\n workspace: existingOnWorkspaceOnly = false,\n squash = false,\n noSnap = false,\n tag = false,\n message: snapMessage = '',\n keepReadme = false,\n noSquash = false,\n skipDependencyInstallation = false,\n skipFetch = false,\n includeDeps = false,\n resolveUnrelated,\n ignoreConfigChanges,\n verbose = false,\n includeNonLaneComps = false,\n }: {\n ours?: boolean;\n theirs?: boolean;\n manual?: boolean;\n autoMergeResolve?: string;\n workspace?: boolean;\n build?: boolean;\n noSnap: boolean;\n tag: boolean;\n message: string;\n keepReadme?: boolean;\n squash?: boolean;\n noSquash: boolean;\n skipDependencyInstallation?: boolean;\n skipFetch: boolean;\n includeDeps?: boolean;\n resolveUnrelated?: string | boolean;\n ignoreConfigChanges?: boolean;\n verbose?: boolean;\n includeNonLaneComps?: boolean;\n }\n ): Promise<string> {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n if (ours || theirs || manual) {\n throw new BitError(\n 'the \"--ours\", \"--theirs\" and \"--manual\" flags are deprecated. use \"--auto-merge-resolve\" instead. see \"bit lane merge --help\" for more information'\n );\n }\n if (\n autoMergeResolve &&\n autoMergeResolve !== 'ours' &&\n autoMergeResolve !== 'theirs' &&\n autoMergeResolve !== 'manual'\n ) {\n throw new BitError('--auto-merge-resolve must be one of the following: [ours, theirs, manual]');\n }\n const mergeStrategy = autoMergeResolve;\n if (noSnap && snapMessage) throw new BitError('unable to use \"noSnap\" and \"message\" flags together');\n if (includeDeps && !pattern && !existingOnWorkspaceOnly) {\n throw new BitError(`\"--include-deps\" flag is relevant only for --workspace and --pattern flags`);\n }\n const getResolveUnrelated = (): MergeStrategy | undefined => {\n if (!resolveUnrelated) return undefined;\n if (typeof resolveUnrelated === 'boolean') return 'ours';\n if (resolveUnrelated !== 'ours' && resolveUnrelated !== 'theirs' && resolveUnrelated !== 'manual') {\n throw new Error('--resolve-unrelated must be one of the following: [ours, theirs, manual]');\n }\n return resolveUnrelated;\n };\n if (resolveUnrelated && typeof resolveUnrelated === 'boolean') {\n resolveUnrelated = 'ours';\n }\n const { mergeResults, deleteResults, configMergeResults } = await this.mergeLanes.mergeLane(name, {\n build,\n // @ts-ignore\n mergeStrategy,\n ours,\n theirs,\n existingOnWorkspaceOnly,\n noSnap,\n snapMessage,\n keepReadme,\n squash,\n noSquash,\n tag,\n pattern,\n skipDependencyInstallation,\n skipFetch,\n resolveUnrelated: getResolveUnrelated(),\n ignoreConfigChanges,\n includeDeps,\n includeNonLaneComps,\n });\n\n const mergeResult = mergeReport({ ...mergeResults, configMergeResults, verbose });\n const deleteResult = `${deleteResults.localResult ? paintRemoved(deleteResults.localResult, false) : ''}${(\n deleteResults.remoteResult || []\n ).map((item) => paintRemoved(item, true))}${\n (deleteResults.readmeResult && chalk.yellow(deleteResults.readmeResult)) || ''\n }\\n`;\n return mergeResult + deleteResult;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA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,MAAM,IAAI,CAACpC,UAAU,CAACqC,SAAS,CAACpC,IAAI,EAAE;MAChGQ,KAAK;MACL;MACAqB,aAAa;MACbzB,IAAI;MACJC,MAAM;MACNK,uBAAuB;MACvBE,MAAM;MACNG,WAAW;MACXC,UAAU;MACVL,MAAM;MACNM,QAAQ;MACRJ,GAAG;MACHV,OAAO;MACPe,0BAA0B;MAC1BC,SAAS;MACTE,gBAAgB,EAAES,mBAAmB,CAAC,CAAC;MACvCR,mBAAmB;MACnBF,WAAW;MACXI;IACF,CAAC,CAAC;IAEF,MAAMa,WAAW,GAAG,IAAAC,sBAAW,EAAAtD,aAAA,CAAAA,aAAA,KAAMiD,YAAY;MAAEE,kBAAkB;MAAEZ;IAAO,EAAE,CAAC;IACjF,MAAMgB,YAAY,GAAI,GAAEL,aAAa,CAACM,WAAW,GAAG,IAAAC,yBAAY,EAACP,aAAa,CAACM,WAAW,EAAE,KAAK,CAAC,GAAG,EAAG,GAAE,CACxGN,aAAa,CAACQ,YAAY,IAAI,EAAE,EAChCC,GAAG,CAAEC,IAAI,IAAK,IAAAH,yBAAY,EAACG,IAAI,EAAE,IAAI,CAAC,CAAE,GACvCV,aAAa,CAACW,YAAY,IAAIC,gBAAK,CAACC,MAAM,CAACb,aAAa,CAACW,YAAY,CAAC,IAAK,EAC7E,IAAG;IACJ,OAAOR,WAAW,GAAGE,YAAY;EACnC;AACF;AAACS,OAAA,CAAAnD,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_merging","_featureToggle","_constants","_bitError","_removeTemplate","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","MergeLaneCmd","constructor","mergeLanes","name","description","COMPONENT_PATTERN_HELP","report","pattern","ours","theirs","manual","autoMergeResolve","build","workspace","existingOnWorkspaceOnly","squash","noSnap","tag","message","snapMessage","keepReadme","noSquash","skipDependencyInstallation","skipFetch","includeDeps","resolveUnrelated","ignoreConfigChanges","verbose","includeNonLaneComps","isFeatureEnabled","BUILD_ON_CI","Boolean","BitError","mergeStrategy","getResolveUnrelated","undefined","Error","mergeResults","deleteResults","configMergeResults","mergeLane","mergeResult","mergeReport","deleteResult","localResult","paintRemoved","remoteResult","map","item","readmeResult","chalk","yellow","exports"],"sources":["merge-lane.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { mergeReport } from '@teambit/merging';\nimport { BUILD_ON_CI, isFeatureEnabled } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { BitError } from '@teambit/bit-error';\nimport paintRemoved from '@teambit/legacy/dist/cli/templates/remove-template';\nimport { MergeLanesMain } from './merge-lanes.main.runtime';\n\nexport class MergeLaneCmd implements Command {\n name = 'merge <lane> [pattern]';\n description = `merge a local or a remote lane to the current lane`;\n extendedDescription = `by default, the provided lane will be fetched from the remote before merging.\nto merge the lane from the local scope without updating it first, use \"--skip-fetch\" flag.\n\nwhen the current and merge candidate lanes are diverged in history and the files could be merged with no conflicts,\nthese components will be snap-merged to complete the merge. use \"no-snap\" to opt-out, or \"tag\" to tag instead`;\n arguments = [\n {\n name: 'lane',\n description: 'lane-name or full lane-id (if remote) to merge to the current lane',\n },\n {\n name: 'pattern',\n description: `partially merge the lane - only components that match the specified component-pattern\nComponent pattern format: ${COMPONENT_PATTERN_HELP}`,\n },\n ];\n alias = '';\n options = [\n ['', 'ours', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep local modifications'],\n ['', 'theirs', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, override local with incoming changes'],\n ['', 'manual', 'DEPRECATED. use --auto-merge-resolve'],\n [\n '',\n 'auto-merge-resolve <merge-strategy>',\n 'in case of a merge conflict, resolve according to the provided strategy: [ours, theirs, manual]',\n ],\n ['', 'workspace', 'merge only lane components that are in the current workspace'],\n ['', 'no-snap', 'do not auto snap after merge completed without conflicts'],\n ['', 'tag', 'auto-tag all lane components after merging into main (or tag-merge in case of snap-merge)'],\n ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'],\n ['m', 'message <message>', 'override the default message for the auto snap'],\n ['', 'keep-readme', 'skip deleting the lane readme component after merging'],\n ['', 'no-squash', 'relevant for merging lanes into main, which by default squashes all lane snaps'],\n [\n '',\n 'squash',\n 'EXPERIMENTAL. relevant for merging a lane into another non-main lane, which by default does not squash',\n ],\n [\n '',\n 'ignore-config-changes',\n 'allow merging when components are modified due to config changes (such as dependencies) only and not files',\n ],\n ['', 'verbose', 'show details of components that were not merged successfully'],\n ['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'],\n ['', 'skip-fetch', 'use the local state of target-lane if exits locally, without updating it from the remote'],\n [\n '',\n 'include-deps',\n 'relevant for \"--pattern\" and \"--workspace\". merge also dependencies of the specified components',\n ],\n [\n '',\n 'resolve-unrelated [merge-strategy]',\n 'relevant when a component on a lane and the component on main have nothing in common. merge-strategy can be \"ours\" (default) or \"theirs\"',\n ],\n [\n '',\n 'include-non-lane-comps',\n 'when merging main, include workspace components that are not on the lane (by default only lane components are merged)',\n ],\n ] as CommandOptions;\n loader = true;\n private = true;\n migration = true;\n remoteOp = true;\n\n constructor(private mergeLanes: MergeLanesMain) {}\n\n async report(\n [name, pattern]: [string, string],\n {\n ours,\n theirs,\n manual,\n autoMergeResolve,\n build,\n workspace: existingOnWorkspaceOnly = false,\n squash = false,\n noSnap = false,\n tag = false,\n message: snapMessage = '',\n keepReadme = false,\n noSquash = false,\n skipDependencyInstallation = false,\n skipFetch = false,\n includeDeps = false,\n resolveUnrelated,\n ignoreConfigChanges,\n verbose = false,\n includeNonLaneComps = false,\n }: {\n ours?: boolean;\n theirs?: boolean;\n manual?: boolean;\n autoMergeResolve?: string;\n workspace?: boolean;\n build?: boolean;\n noSnap: boolean;\n tag: boolean;\n message: string;\n keepReadme?: boolean;\n squash?: boolean;\n noSquash: boolean;\n skipDependencyInstallation?: boolean;\n skipFetch: boolean;\n includeDeps?: boolean;\n resolveUnrelated?: string | boolean;\n ignoreConfigChanges?: boolean;\n verbose?: boolean;\n includeNonLaneComps?: boolean;\n }\n ): Promise<string> {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n if (ours || theirs || manual) {\n throw new BitError(\n 'the \"--ours\", \"--theirs\" and \"--manual\" flags are deprecated. use \"--auto-merge-resolve\" instead. see \"bit lane merge --help\" for more information'\n );\n }\n if (\n autoMergeResolve &&\n autoMergeResolve !== 'ours' &&\n autoMergeResolve !== 'theirs' &&\n autoMergeResolve !== 'manual'\n ) {\n throw new BitError('--auto-merge-resolve must be one of the following: [ours, theirs, manual]');\n }\n const mergeStrategy = autoMergeResolve;\n if (noSnap && snapMessage) throw new BitError('unable to use \"no-snap\" and \"message\" flags together');\n if (includeDeps && !pattern && !existingOnWorkspaceOnly) {\n throw new BitError(`\"--include-deps\" flag is relevant only for --workspace and --pattern flags`);\n }\n const getResolveUnrelated = (): MergeStrategy | undefined => {\n if (!resolveUnrelated) return undefined;\n if (typeof resolveUnrelated === 'boolean') return 'ours';\n if (resolveUnrelated !== 'ours' && resolveUnrelated !== 'theirs' && resolveUnrelated !== 'manual') {\n throw new Error('--resolve-unrelated must be one of the following: [ours, theirs, manual]');\n }\n return resolveUnrelated;\n };\n if (resolveUnrelated && typeof resolveUnrelated === 'boolean') {\n resolveUnrelated = 'ours';\n }\n const { mergeResults, deleteResults, configMergeResults } = await this.mergeLanes.mergeLane(name, {\n build,\n // @ts-ignore\n mergeStrategy,\n ours,\n theirs,\n existingOnWorkspaceOnly,\n noSnap,\n snapMessage,\n keepReadme,\n squash,\n noSquash,\n tag,\n pattern,\n skipDependencyInstallation,\n skipFetch,\n resolveUnrelated: getResolveUnrelated(),\n ignoreConfigChanges,\n includeDeps,\n includeNonLaneComps,\n });\n\n const mergeResult = mergeReport({ ...mergeResults, configMergeResults, verbose });\n const deleteResult = `${deleteResults.localResult ? paintRemoved(deleteResults.localResult, false) : ''}${(\n deleteResults.remoteResult || []\n ).map((item) => paintRemoved(item, true))}${\n (deleteResults.readmeResult && chalk.yellow(deleteResults.readmeResult)) || ''\n }\\n`;\n return mergeResult + deleteResult;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,eAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,cAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,gBAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,eAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8E,SAAAQ,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MA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I,CAAC,CAAE,GACvCV,aAAa,CAACW,YAAY,IAAIC,gBAAK,CAACC,MAAM,CAACb,aAAa,CAACW,YAAY,CAAC,IAAK,EAC7E,IAAG;IACJ,OAAOR,WAAW,GAAGE,YAAY;EACnC;AACF;AAACS,OAAA,CAAApD,YAAA,GAAAA,YAAA"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/merge-lanes",
3
- "version": "0.0.310",
3
+ "version": "0.0.311",
4
4
  "homepage": "https://bit.cloud/teambit/lanes/merge-lanes",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.lanes",
8
8
  "name": "merge-lanes",
9
- "version": "0.0.310"
9
+ "version": "0.0.311"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -20,19 +20,19 @@
20
20
  "@teambit/harmony": "0.4.6",
21
21
  "@teambit/component-id": "0.0.427",
22
22
  "@teambit/legacy-bit-id": "1.0.0",
23
- "@teambit/checkout": "0.0.302",
24
- "@teambit/cli": "0.0.759",
23
+ "@teambit/checkout": "0.0.303",
24
+ "@teambit/cli": "0.0.760",
25
25
  "@teambit/bit-error": "0.0.402",
26
- "@teambit/lane-id": "0.0.274",
27
- "@teambit/merging": "0.0.448",
28
- "@teambit/export": "0.0.1133",
29
- "@teambit/importer": "0.0.562",
30
- "@teambit/lanes": "0.0.705",
31
- "@teambit/logger": "0.0.852",
32
- "@teambit/remove": "0.0.310",
33
- "@teambit/scope": "0.0.1133",
34
- "@teambit/snapping": "0.0.448",
35
- "@teambit/workspace": "0.0.1133"
26
+ "@teambit/lane-id": "0.0.275",
27
+ "@teambit/merging": "0.0.449",
28
+ "@teambit/export": "0.0.1134",
29
+ "@teambit/importer": "0.0.563",
30
+ "@teambit/lanes": "0.0.706",
31
+ "@teambit/logger": "0.0.853",
32
+ "@teambit/remove": "0.0.311",
33
+ "@teambit/scope": "0.0.1134",
34
+ "@teambit/snapping": "0.0.449",
35
+ "@teambit/workspace": "0.0.1134"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/fs-extra": "9.0.7",
@@ -45,7 +45,7 @@
45
45
  "@types/testing-library__jest-dom": "5.9.5"
46
46
  },
47
47
  "peerDependencies": {
48
- "@teambit/legacy": "1.0.542",
48
+ "@teambit/legacy": "1.0.544",
49
49
  "react": "^16.8.0 || ^17.0.0",
50
50
  "react-dom": "^16.8.0 || ^17.0.0"
51
51
  },