@teambit/snapping 1.0.638 → 1.0.640
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/dist/snap-cmd.d.ts +1 -1
- package/dist/snap-cmd.js +5 -3
- package/dist/snap-cmd.js.map +1 -1
- package/dist/snapping.main.runtime.d.ts +2 -2
- package/dist/snapping.main.runtime.js +8 -4
- package/dist/snapping.main.runtime.js.map +1 -1
- package/dist/tag-cmd.d.ts +1 -0
- package/dist/tag-cmd.js +5 -3
- package/dist/tag-cmd.js.map +1 -1
- package/dist/version-maker.d.ts +1 -0
- package/dist/version-maker.js +6 -13
- package/dist/version-maker.js.map +1 -1
- package/package.json +34 -35
- /package/dist/{preview-1750821706704.js → preview-1750994319833.js} +0 -0
package/dist/snap-cmd.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class SnapCmd implements Command {
|
|
|
20
20
|
options: CommandOptions;
|
|
21
21
|
loader: boolean;
|
|
22
22
|
constructor(snapping: SnappingMain, logger: Logger, configStore: ConfigStoreMain);
|
|
23
|
-
report([pattern]: string[], { message, unmerged, editor, ignoreIssues, build, skipTests, skipTasks, skipAutoSnap, disableSnapPipeline, ignoreBuildErrors, rebuildDepsGraph, unmodified, failFast, detachHead, }: {
|
|
23
|
+
report([pattern]: string[], { message, unmerged, editor, ignoreIssues, build, skipTests, skipTasks, skipAutoSnap, disableSnapPipeline, ignoreBuildErrors, rebuildDepsGraph, unmodified, failFast, detachHead, loose, }: {
|
|
24
24
|
unmerged?: boolean;
|
|
25
25
|
editor?: string;
|
|
26
26
|
ignoreIssues?: string;
|
package/dist/snap-cmd.js
CHANGED
|
@@ -52,7 +52,7 @@ class SnapCmd {
|
|
|
52
52
|
_defineProperty(this, "helpUrl", 'reference/components/snaps');
|
|
53
53
|
_defineProperty(this, "alias", '');
|
|
54
54
|
_defineProperty(this, "options", [['m', 'message <message>', 'snap message describing the latest changes - will appear in component history log'], ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are snapped)'], ['', 'unmerged', 'complete a merge process by snapping the unmerged components'], ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the snap'], ['', 'editor [editor]', 'open an editor to write a snap message per component. optionally specify the editor-name (defaults to vim).'], ['', 'skip-tests', 'skip running component tests during snap process'], ['', 'skip-tasks <string>', `skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.
|
|
55
|
-
specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler)`], ['', 'skip-auto-snap', 'skip auto snapping dependents'], ['', 'disable-snap-pipeline', 'skip the snap pipeline. this will for instance skip packing and publishing component version for install, and app deployment'], ['', 'ignore-build-errors', 'proceed to snap pipeline even when build pipeline fails'], ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'], ['i', 'ignore-issues <issues>', `ignore component issues (shown in "bit status" as "issues found"), issues to ignore:
|
|
55
|
+
specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler)`], ['', 'skip-auto-snap', 'skip auto snapping dependents'], ['', 'disable-snap-pipeline', 'skip the snap pipeline. this will for instance skip packing and publishing component version for install, and app deployment'], ['', 'ignore-build-errors', 'proceed to snap pipeline even when build pipeline fails'], ['', 'loose', 'allow snap --build to succeed even if tasks like tests or lint fail'], ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'], ['i', 'ignore-issues <issues>', `ignore component issues (shown in "bit status" as "issues found"), issues to ignore:
|
|
56
56
|
[${Object.keys(_componentIssues().IssuesClasses).join(', ')}]
|
|
57
57
|
to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*".`], ['', 'fail-fast', 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)'], ['', 'detach-head', 'UNSUPPORTED YET. in case a component is checked out to an older version, snap it without changing the head']]);
|
|
58
58
|
_defineProperty(this, "loader", true);
|
|
@@ -71,7 +71,8 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
71
71
|
rebuildDepsGraph,
|
|
72
72
|
unmodified = false,
|
|
73
73
|
failFast = false,
|
|
74
|
-
detachHead
|
|
74
|
+
detachHead,
|
|
75
|
+
loose = false
|
|
75
76
|
}) {
|
|
76
77
|
build = this.configStore.getConfigBoolean(_legacy().CFG_FORCE_LOCAL_BUILD) || Boolean(build);
|
|
77
78
|
const disableTagAndSnapPipelines = disableSnapPipeline;
|
|
@@ -93,7 +94,8 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
93
94
|
rebuildDepsGraph,
|
|
94
95
|
unmodified,
|
|
95
96
|
exitOnFirstFailedTask: failFast,
|
|
96
|
-
detachHead
|
|
97
|
+
detachHead,
|
|
98
|
+
loose
|
|
97
99
|
});
|
|
98
100
|
if (!results) return _chalk().default.yellow(_legacy().NOTHING_TO_SNAP_MSG);
|
|
99
101
|
const {
|
package/dist/snap-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_componentIssues","_legacy","_tagCmd","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","SnapCmd","constructor","snapping","logger","configStore","name","description","COMPONENT_PATTERN_HELP","keys","IssuesClasses","join","report","pattern","message","unmerged","editor","ignoreIssues","build","skipTests","skipTasks","skipAutoSnap","disableSnapPipeline","ignoreBuildErrors","rebuildDepsGraph","unmodified","failFast","detachHead","getConfigBoolean","CFG_FORCE_LOCAL_BUILD","Boolean","disableTagAndSnapPipelines","consoleWarning","results","snap","exitOnFirstFailedTask","chalk","yellow","NOTHING_TO_SNAP_MSG","snappedComponents","autoSnappedResults","warnings","newComponents","laneName","removedComponents","changedComponents","filter","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","length","warningsOutput","snapExplanation","compInBold","version","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","autoTagComp","a","AUTO_SNAPPED_MSG","outputIfExists","label","explanation","components","underline","laneStr","outputIdsIfExists","green","exports"],"sources":["snap-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { ComponentID } from '@teambit/component-id';\nimport { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport {\n NOTHING_TO_SNAP_MSG,\n AUTO_SNAPPED_MSG,\n COMPONENT_PATTERN_HELP,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy.constants';\nimport { Logger } from '@teambit/logger';\nimport { SnappingMain, SnapResults } from './snapping.main.runtime';\nimport { outputIdsIfExists } from './tag-cmd';\nimport { BasicTagSnapParams } from './version-maker';\nimport { ConfigStoreMain } from '@teambit/config-store';\n\nexport class SnapCmd implements Command {\n name = 'snap [component-pattern]';\n description = 'create an immutable and exportable component snapshot (non-release version)';\n extendedDescription: string;\n group = 'version-control';\n arguments = [\n {\n name: 'component-pattern',\n description: `${COMPONENT_PATTERN_HELP}. By default, only new and modified components are snapped (add --unmodified to snap all components in the workspace).`,\n },\n ];\n helpUrl = 'reference/components/snaps';\n alias = '';\n options = [\n ['m', 'message <message>', 'snap message describing the latest changes - will appear in component history log'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are snapped)'],\n ['', 'unmerged', 'complete a merge process by snapping the unmerged components'],\n ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the snap'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a snap message per component. optionally specify the editor-name (defaults to vim).',\n ],\n ['', 'skip-tests', 'skip running component tests during snap process'],\n [\n '',\n 'skip-tasks <string>',\n `skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.\nspecify the task-name (e.g. \"TypescriptCompiler\") or the task-aspect-id (e.g. teambit.compilation/compiler)`,\n ],\n ['', 'skip-auto-snap', 'skip auto snapping dependents'],\n [\n '',\n 'disable-snap-pipeline',\n 'skip the snap pipeline. this will for instance skip packing and publishing component version for install, and app deployment',\n ],\n ['', 'ignore-build-errors', 'proceed to snap pipeline even when build pipeline fails'],\n ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'],\n [\n 'i',\n 'ignore-issues <issues>',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n [\n '',\n 'fail-fast',\n 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)',\n ],\n [\n '',\n 'detach-head',\n 'UNSUPPORTED YET. in case a component is checked out to an older version, snap it without changing the head',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(\n private snapping: SnappingMain,\n private logger: Logger,\n private configStore: ConfigStoreMain\n ) {}\n\n async report(\n [pattern]: string[],\n {\n message = '',\n unmerged = false,\n editor = '',\n ignoreIssues,\n build,\n skipTests = false,\n skipTasks,\n skipAutoSnap = false,\n disableSnapPipeline = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n unmodified = false,\n failFast = false,\n detachHead,\n }: {\n unmerged?: boolean;\n editor?: string;\n ignoreIssues?: string;\n skipAutoSnap?: boolean;\n disableSnapPipeline?: boolean;\n unmodified?: boolean;\n failFast?: boolean;\n } & BasicTagSnapParams\n ) {\n build = this.configStore.getConfigBoolean(CFG_FORCE_LOCAL_BUILD) || Boolean(build);\n const disableTagAndSnapPipelines = disableSnapPipeline;\n if (!message && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your snap, will be displayed in the version history`\n );\n }\n\n const results = await this.snapping.snap({\n pattern,\n message,\n unmerged,\n editor,\n ignoreIssues,\n build,\n skipTests,\n skipTasks,\n skipAutoSnap,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n unmodified,\n exitOnFirstFailedTask: failFast,\n detachHead,\n });\n\n if (!results) return chalk.yellow(NOTHING_TO_SNAP_MSG);\n const { snappedComponents, autoSnappedResults, warnings, newComponents, laneName, removedComponents }: SnapResults =\n results;\n const changedComponents = snappedComponents.filter((component) => {\n return (\n !newComponents.searchWithoutVersion(component.id) && !removedComponents?.searchWithoutVersion(component.id)\n );\n });\n const addedComponents = snappedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoSnappedResults ? autoSnappedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const snapExplanation = `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset --all\" to unstage all local versions, or \"bit reset --head\" to only unstage the latest local snap)`;\n\n const compInBold = (id: ComponentID) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoSnappedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_SNAPPED_MSG} (${autoTagComp.length} total):\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const outputIfExists = (label, explanation, components) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n const laneStr = laneName ? ` on \"${laneName}\" lane` : '';\n\n return (\n outputIfExists('new components', 'first version for components', addedComponents) +\n outputIfExists('changed components', 'components that got a version bump', changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n warningsOutput +\n chalk.green(`\\n${snappedComponents.length + autoTaggedCount} component(s) snapped${laneStr}`) +\n snapExplanation\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OA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,CAACE,EAAE,CAAC,CAAC;QAC5G,IAAIe,OAAO,CAACZ,MAAM,EAAE;UAClB,MAAMe,WAAW,GAAGH,OAAO,CAACF,GAAG,CAAEM,CAAC,IAAKb,UAAU,CAACa,CAAC,CAACrB,SAAS,CAACE,EAAE,CAAC,CAAC;UAClEc,eAAe,IAAI,YAAYM,0BAAgB,KAAKF,WAAW,CAACf,MAAM;AAClF,cAAce,WAAW,CAACxD,IAAI,CAAC,gBAAgB,CAAC,EAAE;QACxC;QACA,OAAOoD,eAAe;MACxB,CAAC,CAAC,CACDpD,IAAI,CAAC,IAAI,CAAC;IACf,CAAC;IAED,MAAM2D,cAAc,GAAGA,CAACC,KAAK,EAAEC,WAAW,EAAEC,UAAU,KAAK;MACzD,IAAI,CAACA,UAAU,CAACrB,MAAM,EAAE,OAAO,EAAE;MACjC,OAAO,KAAKhB,gBAAK,CAACsC,SAAS,CAACH,KAAK,CAAC,MAAMC,WAAW,MAAMZ,gBAAgB,CAACa,UAAU,CAAC,IAAI;IAC3F,CAAC;IACD,MAAME,OAAO,GAAGhC,QAAQ,GAAG,QAAQA,QAAQ,QAAQ,GAAG,EAAE;IAExD,OACE2B,cAAc,CAAC,gBAAgB,EAAE,8BAA8B,EAAEpB,eAAe,CAAC,GACjFoB,cAAc,CAAC,oBAAoB,EAAE,oCAAoC,EAAEzB,iBAAiB,CAAC,GAC7F,IAAA+B,2BAAiB,EAAC,oBAAoB,EAAEhC,iBAAiB,CAAC,GAC1DS,cAAc,GACdjB,gBAAK,CAACyC,KAAK,CAAC,KAAKtC,iBAAiB,CAACa,MAAM,GAAGD,eAAe,wBAAwBwB,OAAO,EAAE,CAAC,GAC7FrB,eAAe;EAEnB;AACF;AAACwB,OAAA,CAAA7E,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_componentIssues","_legacy","_tagCmd","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","SnapCmd","constructor","snapping","logger","configStore","name","description","COMPONENT_PATTERN_HELP","keys","IssuesClasses","join","report","pattern","message","unmerged","editor","ignoreIssues","build","skipTests","skipTasks","skipAutoSnap","disableSnapPipeline","ignoreBuildErrors","rebuildDepsGraph","unmodified","failFast","detachHead","loose","getConfigBoolean","CFG_FORCE_LOCAL_BUILD","Boolean","disableTagAndSnapPipelines","consoleWarning","results","snap","exitOnFirstFailedTask","chalk","yellow","NOTHING_TO_SNAP_MSG","snappedComponents","autoSnappedResults","warnings","newComponents","laneName","removedComponents","changedComponents","filter","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","length","warningsOutput","snapExplanation","compInBold","version","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","autoTagComp","a","AUTO_SNAPPED_MSG","outputIfExists","label","explanation","components","underline","laneStr","outputIdsIfExists","green","exports"],"sources":["snap-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { ComponentID } from '@teambit/component-id';\nimport { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport {\n NOTHING_TO_SNAP_MSG,\n AUTO_SNAPPED_MSG,\n COMPONENT_PATTERN_HELP,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy.constants';\nimport { Logger } from '@teambit/logger';\nimport { SnappingMain, SnapResults } from './snapping.main.runtime';\nimport { outputIdsIfExists } from './tag-cmd';\nimport { BasicTagSnapParams } from './version-maker';\nimport { ConfigStoreMain } from '@teambit/config-store';\n\nexport class SnapCmd implements Command {\n name = 'snap [component-pattern]';\n description = 'create an immutable and exportable component snapshot (non-release version)';\n extendedDescription: string;\n group = 'version-control';\n arguments = [\n {\n name: 'component-pattern',\n description: `${COMPONENT_PATTERN_HELP}. By default, only new and modified components are snapped (add --unmodified to snap all components in the workspace).`,\n },\n ];\n helpUrl = 'reference/components/snaps';\n alias = '';\n options = [\n ['m', 'message <message>', 'snap message describing the latest changes - will appear in component history log'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are snapped)'],\n ['', 'unmerged', 'complete a merge process by snapping the unmerged components'],\n ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the snap'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a snap message per component. optionally specify the editor-name (defaults to vim).',\n ],\n ['', 'skip-tests', 'skip running component tests during snap process'],\n [\n '',\n 'skip-tasks <string>',\n `skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.\nspecify the task-name (e.g. \"TypescriptCompiler\") or the task-aspect-id (e.g. teambit.compilation/compiler)`,\n ],\n ['', 'skip-auto-snap', 'skip auto snapping dependents'],\n [\n '',\n 'disable-snap-pipeline',\n 'skip the snap pipeline. this will for instance skip packing and publishing component version for install, and app deployment',\n ],\n ['', 'ignore-build-errors', 'proceed to snap pipeline even when build pipeline fails'],\n ['', 'loose', 'allow snap --build to succeed even if tasks like tests or lint fail'],\n ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'],\n [\n 'i',\n 'ignore-issues <issues>',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n [\n '',\n 'fail-fast',\n 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)',\n ],\n [\n '',\n 'detach-head',\n 'UNSUPPORTED YET. in case a component is checked out to an older version, snap it without changing the head',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(\n private snapping: SnappingMain,\n private logger: Logger,\n private configStore: ConfigStoreMain\n ) {}\n\n async report(\n [pattern]: string[],\n {\n message = '',\n unmerged = false,\n editor = '',\n ignoreIssues,\n build,\n skipTests = false,\n skipTasks,\n skipAutoSnap = false,\n disableSnapPipeline = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n unmodified = false,\n failFast = false,\n detachHead,\n loose = false,\n }: {\n unmerged?: boolean;\n editor?: string;\n ignoreIssues?: string;\n skipAutoSnap?: boolean;\n disableSnapPipeline?: boolean;\n unmodified?: boolean;\n failFast?: boolean;\n } & BasicTagSnapParams\n ) {\n build = this.configStore.getConfigBoolean(CFG_FORCE_LOCAL_BUILD) || Boolean(build);\n const disableTagAndSnapPipelines = disableSnapPipeline;\n if (!message && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your snap, will be displayed in the version history`\n );\n }\n\n const results = await this.snapping.snap({\n pattern,\n message,\n unmerged,\n editor,\n ignoreIssues,\n build,\n skipTests,\n skipTasks,\n skipAutoSnap,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n unmodified,\n exitOnFirstFailedTask: failFast,\n detachHead,\n loose,\n });\n\n if (!results) return chalk.yellow(NOTHING_TO_SNAP_MSG);\n const { snappedComponents, autoSnappedResults, warnings, newComponents, laneName, removedComponents }: SnapResults =\n results;\n const changedComponents = snappedComponents.filter((component) => {\n return (\n !newComponents.searchWithoutVersion(component.id) && !removedComponents?.searchWithoutVersion(component.id)\n );\n });\n const addedComponents = snappedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoSnappedResults ? autoSnappedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const snapExplanation = `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset --all\" to unstage all local versions, or \"bit reset --head\" to only unstage the latest local snap)`;\n\n const compInBold = (id: ComponentID) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoSnappedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_SNAPPED_MSG} (${autoTagComp.length} total):\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const outputIfExists = (label, explanation, components) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n const laneStr = laneName ? ` on \"${laneName}\" lane` : '';\n\n return (\n outputIfExists('new components', 'first version for components', addedComponents) +\n outputIfExists('changed components', 'components that got a version bump', changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n warningsOutput +\n chalk.green(`\\n${snappedComponents.length + autoTaggedCount} component(s) snapped${laneStr}`) +\n snapExplanation\n );\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,iBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,gBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8C,SAAAC,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,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MZ,gBAAgB,CAACa,UAAU,CAAC,IAAI;IAC3F,CAAC;IACD,MAAME,OAAO,GAAGhC,QAAQ,GAAG,QAAQA,QAAQ,QAAQ,GAAG,EAAE;IAExD,OACE2B,cAAc,CAAC,gBAAgB,EAAE,8BAA8B,EAAEpB,eAAe,CAAC,GACjFoB,cAAc,CAAC,oBAAoB,EAAE,oCAAoC,EAAEzB,iBAAiB,CAAC,GAC7F,IAAA+B,2BAAiB,EAAC,oBAAoB,EAAEhC,iBAAiB,CAAC,GAC1DS,cAAc,GACdjB,gBAAK,CAACyC,KAAK,CAAC,KAAKtC,iBAAiB,CAACa,MAAM,GAAGD,eAAe,wBAAwBwB,OAAO,EAAE,CAAC,GAC7FrB,eAAe;EAEnB;AACF;AAACwB,OAAA,CAAA9E,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -112,7 +112,7 @@ export declare class SnappingMain {
|
|
|
112
112
|
* with a valid semver to that version.
|
|
113
113
|
* tag can be done only on main, not on a lane.
|
|
114
114
|
*/
|
|
115
|
-
tag({ ids, message, version, editor, snapped, unmerged, releaseType, preReleaseId, ignoreIssues, ignoreNewestVersion, skipTests, skipTasks, skipAutoTag, build, unmodified, soft, persist, ignoreBuildErrors, rebuildDepsGraph, incrementBy, disableTagAndSnapPipelines, failFast, detachHead, overrideHead, }: {
|
|
115
|
+
tag({ ids, message, version, editor, snapped, unmerged, releaseType, preReleaseId, ignoreIssues, ignoreNewestVersion, skipTests, skipTasks, skipAutoTag, build, unmodified, soft, persist, ignoreBuildErrors, rebuildDepsGraph, incrementBy, disableTagAndSnapPipelines, failFast, detachHead, overrideHead, loose, }: {
|
|
116
116
|
ids?: string[];
|
|
117
117
|
all?: boolean | string;
|
|
118
118
|
snapped?: boolean;
|
|
@@ -146,7 +146,7 @@ export declare class SnappingMain {
|
|
|
146
146
|
* once a component is snapped on a lane, it becomes part of it.
|
|
147
147
|
*/
|
|
148
148
|
snap({ pattern, legacyBitIds, // @todo: change to ComponentID[]. pass only if have the ids already parsed.
|
|
149
|
-
unmerged, editor, message, ignoreIssues, skipTests, skipTasks, skipAutoSnap, build, disableTagAndSnapPipelines, ignoreBuildErrors, rebuildDepsGraph, unmodified, exitOnFirstFailedTask, detachHead, }: Partial<BasicTagSnapParams> & {
|
|
149
|
+
unmerged, editor, message, ignoreIssues, skipTests, skipTasks, skipAutoSnap, build, disableTagAndSnapPipelines, ignoreBuildErrors, rebuildDepsGraph, unmodified, exitOnFirstFailedTask, detachHead, loose, }: Partial<BasicTagSnapParams> & {
|
|
150
150
|
pattern?: string;
|
|
151
151
|
legacyBitIds?: ComponentIdList;
|
|
152
152
|
unmerged?: boolean;
|
|
@@ -369,7 +369,8 @@ class SnappingMain {
|
|
|
369
369
|
disableTagAndSnapPipelines = false,
|
|
370
370
|
failFast = false,
|
|
371
371
|
detachHead,
|
|
372
|
-
overrideHead
|
|
372
|
+
overrideHead,
|
|
373
|
+
loose = false
|
|
373
374
|
}) {
|
|
374
375
|
if (soft) build = false;
|
|
375
376
|
if (editor && persist) {
|
|
@@ -415,7 +416,8 @@ class SnappingMain {
|
|
|
415
416
|
packageManagerConfigRootDir: this.workspace.path,
|
|
416
417
|
exitOnFirstFailedTask: failFast,
|
|
417
418
|
detachHead,
|
|
418
|
-
overrideHead
|
|
419
|
+
overrideHead,
|
|
420
|
+
loose
|
|
419
421
|
};
|
|
420
422
|
const {
|
|
421
423
|
taggedComponents,
|
|
@@ -639,7 +641,8 @@ class SnappingMain {
|
|
|
639
641
|
rebuildDepsGraph,
|
|
640
642
|
unmodified = false,
|
|
641
643
|
exitOnFirstFailedTask = false,
|
|
642
|
-
detachHead
|
|
644
|
+
detachHead,
|
|
645
|
+
loose = false
|
|
643
646
|
}) {
|
|
644
647
|
if (!this.workspace) throw new (_workspace().OutsideWorkspaceError)();
|
|
645
648
|
if (pattern && legacyBitIds) throw new Error(`please pass either pattern or legacyBitIds, not both`);
|
|
@@ -669,7 +672,8 @@ class SnappingMain {
|
|
|
669
672
|
rebuildDepsGraph,
|
|
670
673
|
packageManagerConfigRootDir: this.workspace.path,
|
|
671
674
|
exitOnFirstFailedTask,
|
|
672
|
-
detachHead
|
|
675
|
+
detachHead,
|
|
676
|
+
loose
|
|
673
677
|
};
|
|
674
678
|
const {
|
|
675
679
|
taggedComponents,
|