@teambit/snapping 1.0.933 → 1.0.935
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/index.d.ts +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/snap-cmd.d.ts +4 -2
- package/dist/snap-cmd.js +67 -11
- package/dist/snap-cmd.js.map +1 -1
- package/dist/tag-cmd.d.ts +6 -3
- package/dist/tag-cmd.js +71 -10
- package/dist/tag-cmd.js.map +1 -1
- package/package.json +19 -19
- /package/dist/{preview-1775496301353.js → preview-1775570658295.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export type { SnappingMain, TagResults, SnapResults, SnapFromScopeResults, SnapD
|
|
|
4
4
|
export default SnappingAspect;
|
|
5
5
|
export { SnappingAspect };
|
|
6
6
|
export { VersionMaker, BasicTagParams, VersionMakerParams, BasicTagSnapParams } from './version-maker';
|
|
7
|
-
export { AUTO_TAGGED_MSG, NOTHING_TO_TAG_MSG, tagCmdOptions, TagParams, validateOptions, tagResultOutput, outputIdsIfExists, } from './tag-cmd';
|
|
7
|
+
export { AUTO_TAGGED_MSG, NOTHING_TO_TAG_MSG, tagCmdOptions, TagParams, validateOptions, tagResultOutput, compInBold, outputIdsIfExists, } from './tag-cmd';
|
|
8
8
|
export { snapResultOutput } from './snap-cmd';
|
package/dist/index.js
CHANGED
|
@@ -51,6 +51,12 @@ Object.defineProperty(exports, "VersionMakerParams", {
|
|
|
51
51
|
return _versionMaker().VersionMakerParams;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
Object.defineProperty(exports, "compInBold", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _tagCmd().compInBold;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
54
60
|
exports.default = void 0;
|
|
55
61
|
Object.defineProperty(exports, "outputIdsIfExists", {
|
|
56
62
|
enumerable: true,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_snapping","data","require","_versionMaker","_tagCmd","_snapCmd","_default","exports","default","SnappingAspect"],"sources":["index.ts"],"sourcesContent":["import { SnappingAspect } from './snapping.aspect';\n\nexport type { BitCloudUser } from './version-maker';\nexport type {\n SnappingMain,\n TagResults,\n SnapResults,\n SnapFromScopeResults,\n SnapDataParsed,\n SnapDataPerCompRaw,\n} from './snapping.main.runtime';\nexport default SnappingAspect;\nexport { SnappingAspect };\nexport { VersionMaker, BasicTagParams, VersionMakerParams, BasicTagSnapParams } from './version-maker';\nexport {\n AUTO_TAGGED_MSG,\n NOTHING_TO_TAG_MSG,\n tagCmdOptions,\n TagParams,\n validateOptions,\n tagResultOutput,\n outputIdsIfExists,\n} from './tag-cmd';\n\nexport { snapResultOutput } from './snap-cmd';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_snapping","data","require","_versionMaker","_tagCmd","_snapCmd","_default","exports","default","SnappingAspect"],"sources":["index.ts"],"sourcesContent":["import { SnappingAspect } from './snapping.aspect';\n\nexport type { BitCloudUser } from './version-maker';\nexport type {\n SnappingMain,\n TagResults,\n SnapResults,\n SnapFromScopeResults,\n SnapDataParsed,\n SnapDataPerCompRaw,\n} from './snapping.main.runtime';\nexport default SnappingAspect;\nexport { SnappingAspect };\nexport { VersionMaker, BasicTagParams, VersionMakerParams, BasicTagSnapParams } from './version-maker';\nexport {\n AUTO_TAGGED_MSG,\n NOTHING_TO_TAG_MSG,\n tagCmdOptions,\n TagParams,\n validateOptions,\n tagResultOutput,\n compInBold,\n outputIdsIfExists,\n} from './tag-cmd';\n\nexport { snapResultOutput } from './snap-cmd';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAaA,SAAAE,cAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAWA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8C,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAd/BC,0BAAc","ignoreList":[]}
|
package/dist/snap-cmd.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Command, CommandOptions } from '@teambit/cli';
|
|
1
|
+
import type { Command, CommandOptions, Report } from '@teambit/cli';
|
|
2
2
|
import type { Logger } from '@teambit/logger';
|
|
3
3
|
import type { SnappingMain, SnapResults } from './snapping.main.runtime';
|
|
4
4
|
import type { BasicTagSnapParams } from './version-maker';
|
|
@@ -28,6 +28,8 @@ export declare class SnapCmd implements Command {
|
|
|
28
28
|
disableSnapPipeline?: boolean;
|
|
29
29
|
unmodified?: boolean;
|
|
30
30
|
failFast?: boolean;
|
|
31
|
-
} & BasicTagSnapParams): Promise<string>;
|
|
31
|
+
} & BasicTagSnapParams): Promise<string | Report>;
|
|
32
32
|
}
|
|
33
|
+
export declare function snapResultReport(results: SnapResults): string | Report;
|
|
34
|
+
/** @deprecated use snapResultReport instead */
|
|
33
35
|
export declare function snapResultOutput(results: SnapResults): string;
|
package/dist/snap-cmd.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SnapCmd = void 0;
|
|
7
7
|
exports.snapResultOutput = snapResultOutput;
|
|
8
|
+
exports.snapResultReport = snapResultReport;
|
|
8
9
|
function _chalk() {
|
|
9
10
|
const data = _interopRequireDefault(require("chalk"));
|
|
10
11
|
_chalk = function () {
|
|
@@ -12,6 +13,13 @@ function _chalk() {
|
|
|
12
13
|
};
|
|
13
14
|
return data;
|
|
14
15
|
}
|
|
16
|
+
function _lodash() {
|
|
17
|
+
const data = require("lodash");
|
|
18
|
+
_lodash = function () {
|
|
19
|
+
return data;
|
|
20
|
+
};
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
15
23
|
function _componentIssues() {
|
|
16
24
|
const data = require("@teambit/component-issues");
|
|
17
25
|
_componentIssues = function () {
|
|
@@ -108,11 +116,11 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
108
116
|
loose
|
|
109
117
|
});
|
|
110
118
|
if (!results) return _chalk().default.yellow(_legacy().NOTHING_TO_SNAP_MSG);
|
|
111
|
-
return
|
|
119
|
+
return snapResultReport(results);
|
|
112
120
|
}
|
|
113
121
|
}
|
|
114
122
|
exports.SnapCmd = SnapCmd;
|
|
115
|
-
function
|
|
123
|
+
function snapResultReport(results) {
|
|
116
124
|
const {
|
|
117
125
|
snappedComponents,
|
|
118
126
|
autoSnappedResults,
|
|
@@ -128,27 +136,75 @@ function snapResultOutput(results) {
|
|
|
128
136
|
const addedComponents = snappedComponents.filter(component => newComponents.searchWithoutVersion(component.id));
|
|
129
137
|
const autoSnappedCount = autoSnappedResults ? autoSnappedResults.length : 0;
|
|
130
138
|
const totalCount = totalComponentsCount ?? snappedComponents.length + autoSnappedCount;
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
return `${_chalk().default.bold(id.toStringWithoutVersion())}${version}`;
|
|
139
|
+
const formatCompMinimal = component => {
|
|
140
|
+
return (0, _cli().formatItem)((0, _tagCmd().compInBold)(component.id));
|
|
134
141
|
};
|
|
135
|
-
const
|
|
136
|
-
let output = (0, _cli().formatItem)(compInBold(component.id));
|
|
137
|
-
const autoSnap = autoSnappedResults.filter(result => result.triggeredBy.searchWithoutVersion(component.id));
|
|
142
|
+
const formatCompDetailed = component => {
|
|
143
|
+
let output = (0, _cli().formatItem)((0, _tagCmd().compInBold)(component.id));
|
|
144
|
+
const autoSnap = (autoSnappedResults ?? []).filter(result => result.triggeredBy.searchWithoutVersion(component.id));
|
|
138
145
|
if (autoSnap.length) {
|
|
139
146
|
const autoSnapComp = autoSnap.map(a => a.component.id.toString());
|
|
140
147
|
output += `\n ${_legacy().AUTO_SNAPPED_MSG} (${autoSnapComp.length} total):\n ${autoSnapComp.join('\n ')}`;
|
|
141
148
|
}
|
|
142
149
|
return output;
|
|
143
150
|
};
|
|
144
|
-
const
|
|
145
|
-
const
|
|
151
|
+
const hasAutoSnapped = autoSnappedCount > 0;
|
|
152
|
+
const buildSections = formatComp => {
|
|
153
|
+
const newSection = (0, _cli().formatSection)('new components', 'first version for components', addedComponents.map(formatComp));
|
|
154
|
+
const changedSection = (0, _cli().formatSection)('changed components', 'components that got a version bump', changedComponents.map(formatComp));
|
|
155
|
+
return {
|
|
156
|
+
newSection,
|
|
157
|
+
changedSection
|
|
158
|
+
};
|
|
159
|
+
};
|
|
146
160
|
const removedSection = (0, _tagCmd().outputIdsIfExists)('removed components', removedComponents);
|
|
147
161
|
const warningsSection = warnings && warnings.length ? warnings.map(w => `${_cli().warnSymbol} ${_chalk().default.yellow(w)}`).join('\n') : '';
|
|
148
162
|
const laneStr = laneName ? ` on "${laneName}" lane` : '';
|
|
149
163
|
const summary = (0, _cli().formatSuccessSummary)(`${totalCount} component(s) snapped${laneStr}`);
|
|
150
164
|
const snapExplanation = (0, _cli().formatHint)('(use "bit export" to push these components to a remote)\n(use "bit reset" to unstage all local versions, or "bit reset --head" to only unstage the latest local snap)');
|
|
151
|
-
|
|
165
|
+
|
|
166
|
+
// Build minimal output (no auto-snapped listing, just counts grouped by scope)
|
|
167
|
+
const {
|
|
168
|
+
newSection,
|
|
169
|
+
changedSection
|
|
170
|
+
} = buildSections(hasAutoSnapped ? formatCompMinimal : formatCompDetailed);
|
|
171
|
+
const autoSnapSection = (() => {
|
|
172
|
+
if (!hasAutoSnapped) return '';
|
|
173
|
+
const scopeCounts = (0, _lodash().countBy)(autoSnappedResults, r => r.component.id.scope);
|
|
174
|
+
const sorted = Object.entries(scopeCounts).sort(([, a], [, b]) => b - a);
|
|
175
|
+
const MAX_SHOWN = 4;
|
|
176
|
+
const shown = sorted.slice(0, MAX_SHOWN).map(([scope, n]) => `${scope} (${n})`);
|
|
177
|
+
const remaining = sorted.length - MAX_SHOWN;
|
|
178
|
+
const scopeLine = remaining > 0 ? [...shown, `+ ${remaining} more scopes`].join(' · ') : shown.join(' · ');
|
|
179
|
+
const title = (0, _cli().formatTitle)(`auto-snapped dependents (${autoSnappedCount})`);
|
|
180
|
+
const scopes = ` ${scopeLine}`;
|
|
181
|
+
const hint = (0, _cli().formatDetailsHint)('full list of auto-snapped dependents');
|
|
182
|
+
return `${title}\n${scopes}\n${hint}`;
|
|
183
|
+
})();
|
|
184
|
+
const footerParts = [summary, snapExplanation].filter(Boolean).join('\n');
|
|
185
|
+
const data = (0, _cli().joinSections)([newSection, changedSection, autoSnapSection, removedSection, warningsSection, footerParts]);
|
|
186
|
+
if (!hasAutoSnapped) {
|
|
187
|
+
return data;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Build detailed output (with full auto-snapped listing)
|
|
191
|
+
const {
|
|
192
|
+
newSection: newDetailed,
|
|
193
|
+
changedSection: changedDetailed
|
|
194
|
+
} = buildSections(formatCompDetailed);
|
|
195
|
+
const detailedFooter = [summary, snapExplanation].filter(Boolean).join('\n');
|
|
196
|
+
const details = (0, _cli().joinSections)([newDetailed, changedDetailed, removedSection, warningsSection, detailedFooter]);
|
|
197
|
+
return {
|
|
198
|
+
data,
|
|
199
|
+
code: 0,
|
|
200
|
+
details
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** @deprecated use snapResultReport instead */
|
|
205
|
+
function snapResultOutput(results) {
|
|
206
|
+
const result = snapResultReport(results);
|
|
207
|
+
return typeof result === 'string' ? result : result.details || result.data;
|
|
152
208
|
}
|
|
153
209
|
|
|
154
210
|
//# sourceMappingURL=snap-cmd.js.map
|
package/dist/snap-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_componentIssues","_cli","_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","snapResultOutput","exports","snappedComponents","autoSnappedResults","warnings","newComponents","laneName","removedComponents","totalComponentsCount","changedComponents","filter","component","searchWithoutVersion","id","addedComponents","autoSnappedCount","length","totalCount","compInBold","version","hasVersion","bold","toStringWithoutVersion","formatComp","output","formatItem","autoSnap","result","triggeredBy","autoSnapComp","map","a","toString","AUTO_SNAPPED_MSG","newSection","formatSection","changedSection","removedSection","outputIdsIfExists","warningsSection","w","warnSymbol","laneStr","summary","formatSuccessSummary","snapExplanation","formatHint","joinSections"],"sources":["snap-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { ComponentID } from '@teambit/component-id';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport type { Command, CommandOptions } from '@teambit/cli';\nimport { formatItem, formatSection, formatHint, formatSuccessSummary, warnSymbol, joinSections } 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 type { Logger } from '@teambit/logger';\nimport type { SnappingMain, SnapResults } from './snapping.main.runtime';\nimport { outputIdsIfExists } from './tag-cmd';\nimport type { BasicTagSnapParams } from './version-maker';\nimport type { ConfigStoreMain } from '@teambit/config-store';\n\nexport class SnapCmd implements Command {\n name = 'snap [component-pattern]';\n description = 'create immutable component snapshots for development versions';\n extendedDescription = `creates snapshots with hash-based versions for development and testing. snapshots are immutable and exportable.\nby default snaps only new and modified components. use for development iterations before creating semantic version tags.\nsnapshots maintain component history and enable collaboration without formal releases.`;\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 return snapResultOutput(results);\n }\n}\n\nexport function snapResultOutput(results: SnapResults): string {\n const {\n snappedComponents,\n autoSnappedResults,\n warnings,\n newComponents,\n laneName,\n removedComponents,\n totalComponentsCount,\n }: SnapResults = results;\n const changedComponents = snappedComponents.filter((component) => {\n return !newComponents.searchWithoutVersion(component.id) && !removedComponents?.searchWithoutVersion(component.id);\n });\n const addedComponents = snappedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoSnappedCount = autoSnappedResults ? autoSnappedResults.length : 0;\n const totalCount = totalComponentsCount ?? snappedComponents.length + autoSnappedCount;\n\n const compInBold = (id: ComponentID) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const formatComp = (component: ConsumerComponent): string => {\n let output = formatItem(compInBold(component.id));\n const autoSnap = autoSnappedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoSnap.length) {\n const autoSnapComp = autoSnap.map((a) => a.component.id.toString());\n output += `\\n ${AUTO_SNAPPED_MSG} (${autoSnapComp.length} total):\\n ${autoSnapComp.join('\\n ')}`;\n }\n return output;\n };\n\n const newSection = formatSection('new components', 'first version for components', addedComponents.map(formatComp));\n const changedSection = formatSection(\n 'changed components',\n 'components that got a version bump',\n changedComponents.map(formatComp)\n );\n const removedSection = outputIdsIfExists('removed components', removedComponents);\n\n const warningsSection =\n warnings && warnings.length ? warnings.map((w) => `${warnSymbol} ${chalk.yellow(w)}`).join('\\n') : '';\n\n const laneStr = laneName ? ` on \"${laneName}\" lane` : '';\n const summary = formatSuccessSummary(`${totalCount} component(s) snapped${laneStr}`);\n const snapExplanation = formatHint(\n '(use \"bit export\" to push these components to a remote)\\n(use \"bit reset\" to unstage all local versions, or \"bit reset --head\" to only unstage the latest local snap)'\n );\n\n return joinSections([newSection, changedSection, removedSection, warningsSection, `${summary}\\n${snapExplanation}`]);\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sB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OAAO,EAAE,CAAC;EACpF,MAAMG,eAAe,GAAG,IAAAC,iBAAU,EAChC,uKACF,CAAC;EAED,OAAO,IAAAC,mBAAY,EAAC,CAACb,UAAU,EAAEE,cAAc,EAAEC,cAAc,EAAEE,eAAe,EAAE,GAAGI,OAAO,KAAKE,eAAe,EAAE,CAAC,CAAC;AACtH","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_componentIssues","_cli","_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","snapResultReport","exports","snappedComponents","autoSnappedResults","warnings","newComponents","laneName","removedComponents","totalComponentsCount","changedComponents","filter","component","searchWithoutVersion","id","addedComponents","autoSnappedCount","length","totalCount","formatCompMinimal","formatItem","compInBold","formatCompDetailed","output","autoSnap","result","triggeredBy","autoSnapComp","map","a","toString","AUTO_SNAPPED_MSG","hasAutoSnapped","buildSections","formatComp","newSection","formatSection","changedSection","removedSection","outputIdsIfExists","warningsSection","w","warnSymbol","laneStr","summary","formatSuccessSummary","snapExplanation","formatHint","autoSnapSection","scopeCounts","countBy","scope","sorted","entries","sort","b","MAX_SHOWN","shown","slice","n","remaining","scopeLine","title","formatTitle","scopes","hint","formatDetailsHint","footerParts","joinSections","newDetailed","changedDetailed","detailedFooter","details","code","snapResultOutput"],"sources":["snap-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { countBy } from 'lodash';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport type { Command, CommandOptions, Report } from '@teambit/cli';\nimport {\n formatItem,\n formatSection,\n formatTitle,\n formatHint,\n formatDetailsHint,\n formatSuccessSummary,\n warnSymbol,\n joinSections,\n} 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 type { Logger } from '@teambit/logger';\nimport type { SnappingMain, SnapResults } from './snapping.main.runtime';\nimport { outputIdsIfExists, compInBold } from './tag-cmd';\nimport type { BasicTagSnapParams } from './version-maker';\nimport type { ConfigStoreMain } from '@teambit/config-store';\n\nexport class SnapCmd implements Command {\n name = 'snap [component-pattern]';\n description = 'create immutable component snapshots for development versions';\n extendedDescription = `creates snapshots with hash-based versions for development and testing. snapshots are immutable and exportable.\nby default snaps only new and modified components. use for development iterations before creating semantic version tags.\nsnapshots maintain component history and enable collaboration without formal releases.`;\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 return snapResultReport(results);\n }\n}\n\nexport function snapResultReport(results: SnapResults): string | Report {\n const {\n snappedComponents,\n autoSnappedResults,\n warnings,\n newComponents,\n laneName,\n removedComponents,\n totalComponentsCount,\n }: SnapResults = results;\n const changedComponents = snappedComponents.filter((component) => {\n return !newComponents.searchWithoutVersion(component.id) && !removedComponents?.searchWithoutVersion(component.id);\n });\n const addedComponents = snappedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoSnappedCount = autoSnappedResults ? autoSnappedResults.length : 0;\n const totalCount = totalComponentsCount ?? snappedComponents.length + autoSnappedCount;\n\n const formatCompMinimal = (component: ConsumerComponent): string => {\n return formatItem(compInBold(component.id));\n };\n\n const formatCompDetailed = (component: ConsumerComponent): string => {\n let output = formatItem(compInBold(component.id));\n const autoSnap = (autoSnappedResults ?? []).filter((result) =>\n result.triggeredBy.searchWithoutVersion(component.id)\n );\n if (autoSnap.length) {\n const autoSnapComp = autoSnap.map((a) => a.component.id.toString());\n output += `\\n ${AUTO_SNAPPED_MSG} (${autoSnapComp.length} total):\\n ${autoSnapComp.join('\\n ')}`;\n }\n return output;\n };\n\n const hasAutoSnapped = autoSnappedCount > 0;\n\n const buildSections = (formatComp: (c: ConsumerComponent) => string) => {\n const newSection = formatSection('new components', 'first version for components', addedComponents.map(formatComp));\n const changedSection = formatSection(\n 'changed components',\n 'components that got a version bump',\n changedComponents.map(formatComp)\n );\n return { newSection, changedSection };\n };\n\n const removedSection = outputIdsIfExists('removed components', removedComponents);\n\n const warningsSection =\n warnings && warnings.length ? warnings.map((w) => `${warnSymbol} ${chalk.yellow(w)}`).join('\\n') : '';\n\n const laneStr = laneName ? ` on \"${laneName}\" lane` : '';\n const summary = formatSuccessSummary(`${totalCount} component(s) snapped${laneStr}`);\n const snapExplanation = formatHint(\n '(use \"bit export\" to push these components to a remote)\\n(use \"bit reset\" to unstage all local versions, or \"bit reset --head\" to only unstage the latest local snap)'\n );\n\n // Build minimal output (no auto-snapped listing, just counts grouped by scope)\n const { newSection, changedSection } = buildSections(hasAutoSnapped ? formatCompMinimal : formatCompDetailed);\n\n const autoSnapSection = (() => {\n if (!hasAutoSnapped) return '';\n const scopeCounts = countBy(autoSnappedResults, (r) => r.component.id.scope);\n const sorted = Object.entries(scopeCounts).sort(([, a], [, b]) => b - a);\n const MAX_SHOWN = 4;\n const shown = sorted.slice(0, MAX_SHOWN).map(([scope, n]) => `${scope} (${n})`);\n const remaining = sorted.length - MAX_SHOWN;\n const scopeLine = remaining > 0 ? [...shown, `+ ${remaining} more scopes`].join(' · ') : shown.join(' · ');\n const title = formatTitle(`auto-snapped dependents (${autoSnappedCount})`);\n const scopes = ` ${scopeLine}`;\n const hint = formatDetailsHint('full list of auto-snapped dependents');\n return `${title}\\n${scopes}\\n${hint}`;\n })();\n\n const footerParts = [summary, snapExplanation].filter(Boolean).join('\\n');\n const data = joinSections([\n newSection,\n changedSection,\n autoSnapSection,\n removedSection,\n warningsSection,\n footerParts,\n ]);\n\n if (!hasAutoSnapped) {\n return data;\n }\n\n // Build detailed output (with full auto-snapped listing)\n const { newSection: newDetailed, changedSection: changedDetailed } = buildSections(formatCompDetailed);\n const detailedFooter = [summary, snapExplanation].filter(Boolean).join('\\n');\n const details = joinSections([newDetailed, changedDetailed, removedSection, warningsSection, detailedFooter]);\n\n return { data, code: 0, details };\n}\n\n/** @deprecated use snapResultReport instead */\nexport function snapResultOutput(results: SnapResults): string {\n const result = snapResultReport(results);\n return typeof result === 'string' ? result : result.details || result.data;\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,O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+1,5 @@
|
|
|
1
|
-
import type { ComponentIdList } from '@teambit/component-id';
|
|
2
|
-
import type { Command, CommandOptions } from '@teambit/cli';
|
|
1
|
+
import type { ComponentIdList, ComponentID } from '@teambit/component-id';
|
|
2
|
+
import type { Command, CommandOptions, Report } from '@teambit/cli';
|
|
3
3
|
import type { ReleaseType } from 'semver';
|
|
4
4
|
import type { Logger } from '@teambit/logger';
|
|
5
5
|
import type { TagResults, SnappingMain } from './snapping.main.runtime';
|
|
@@ -48,11 +48,14 @@ export declare class TagCmd implements Command {
|
|
|
48
48
|
description: string;
|
|
49
49
|
}[];
|
|
50
50
|
constructor(snapping: SnappingMain, logger: Logger, configStore: ConfigStoreMain);
|
|
51
|
-
report([patterns]: [string[]], options: TagParams): Promise<string>;
|
|
51
|
+
report([patterns]: [string[]], options: TagParams): Promise<string | Report>;
|
|
52
52
|
}
|
|
53
53
|
export declare function validateOptions(options: TagParams): {
|
|
54
54
|
releaseType: ReleaseType;
|
|
55
55
|
preReleaseId: string | undefined;
|
|
56
56
|
};
|
|
57
|
+
export declare function tagResultReport(results: TagResults): string | Report;
|
|
58
|
+
/** @deprecated use tagResultReport instead */
|
|
57
59
|
export declare function tagResultOutput(results: TagResults): string;
|
|
60
|
+
export declare function compInBold(id: ComponentID): string;
|
|
58
61
|
export declare function outputIdsIfExists(label: string, ids?: ComponentIdList): string;
|
package/dist/tag-cmd.js
CHANGED
|
@@ -4,9 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TagCmd = exports.NOTHING_TO_TAG_MSG = exports.AUTO_TAGGED_MSG = void 0;
|
|
7
|
+
exports.compInBold = compInBold;
|
|
7
8
|
exports.outputIdsIfExists = outputIdsIfExists;
|
|
8
9
|
exports.tagCmdOptions = void 0;
|
|
9
10
|
exports.tagResultOutput = tagResultOutput;
|
|
11
|
+
exports.tagResultReport = tagResultReport;
|
|
10
12
|
exports.validateOptions = validateOptions;
|
|
11
13
|
function _chalk() {
|
|
12
14
|
const data = _interopRequireDefault(require("chalk"));
|
|
@@ -15,6 +17,13 @@ function _chalk() {
|
|
|
15
17
|
};
|
|
16
18
|
return data;
|
|
17
19
|
}
|
|
20
|
+
function _lodash() {
|
|
21
|
+
const data = require("lodash");
|
|
22
|
+
_lodash = function () {
|
|
23
|
+
return data;
|
|
24
|
+
};
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
18
27
|
function _cli() {
|
|
19
28
|
const data = require("@teambit/cli");
|
|
20
29
|
_cli = function () {
|
|
@@ -156,7 +165,7 @@ To undo local tag use the "bit reset" command.`);
|
|
|
156
165
|
};
|
|
157
166
|
const results = await this.snapping.tag(params);
|
|
158
167
|
if (!results) return _chalk().default.yellow(persist ? 'no soft-tag found' : NOTHING_TO_TAG_MSG);
|
|
159
|
-
return
|
|
168
|
+
return tagResultReport(results);
|
|
160
169
|
}
|
|
161
170
|
}
|
|
162
171
|
exports.TagCmd = TagCmd;
|
|
@@ -204,7 +213,7 @@ semver allows the following options only: ${RELEASE_TYPES.join(', ')}`);
|
|
|
204
213
|
preReleaseId: getPreReleaseId()
|
|
205
214
|
};
|
|
206
215
|
}
|
|
207
|
-
function
|
|
216
|
+
function tagResultReport(results) {
|
|
208
217
|
const {
|
|
209
218
|
taggedComponents,
|
|
210
219
|
autoTaggedResults,
|
|
@@ -218,13 +227,12 @@ function tagResultOutput(results) {
|
|
|
218
227
|
const addedComponents = taggedComponents.filter(component => newComponents.searchWithoutVersion(component.id));
|
|
219
228
|
const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;
|
|
220
229
|
const totalCount = totalComponentsCount ?? taggedComponents.length + autoTaggedCount;
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
return `${_chalk().default.bold(id.toStringWithoutVersion())}${version}`;
|
|
230
|
+
const formatCompMinimal = component => {
|
|
231
|
+
return (0, _cli().formatItem)(compInBold(component.id));
|
|
224
232
|
};
|
|
225
|
-
const
|
|
233
|
+
const formatCompDetailed = component => {
|
|
226
234
|
let output = (0, _cli().formatItem)(compInBold(component.id));
|
|
227
|
-
const autoTag = autoTaggedResults.filter(result => result.triggeredBy.searchWithoutVersion(component.id));
|
|
235
|
+
const autoTag = (autoTaggedResults ?? []).filter(result => result.triggeredBy.searchWithoutVersion(component.id));
|
|
228
236
|
if (autoTag.length) {
|
|
229
237
|
const autoTagComp = autoTag.map(a => a.component.id.toString());
|
|
230
238
|
output += `\n ${AUTO_TAGGED_MSG}:\n ${autoTagComp.join('\n ')}`;
|
|
@@ -234,8 +242,14 @@ function tagResultOutput(results) {
|
|
|
234
242
|
const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';
|
|
235
243
|
const newDesc = results.isSoftTag ? 'set to be tagged with first version for components when persisted' : 'first version for components';
|
|
236
244
|
const changedDesc = results.isSoftTag ? 'components that are set to get a version bump when persisted' : 'components that got a version bump';
|
|
237
|
-
const
|
|
238
|
-
|
|
245
|
+
const buildSections = formatComp => {
|
|
246
|
+
const newSection = (0, _cli().formatSection)(softTagPrefix + 'new components', newDesc, addedComponents.map(formatComp));
|
|
247
|
+
const changedSection = (0, _cli().formatSection)(softTagPrefix + 'changed components', changedDesc, changedComponents.map(formatComp));
|
|
248
|
+
return {
|
|
249
|
+
newSection,
|
|
250
|
+
changedSection
|
|
251
|
+
};
|
|
252
|
+
};
|
|
239
253
|
const removedSection = outputIdsIfExists('removed components', removedComponents);
|
|
240
254
|
const publishSection = (() => {
|
|
241
255
|
const {
|
|
@@ -256,7 +270,54 @@ function tagResultOutput(results) {
|
|
|
256
270
|
const summary = (0, _cli().formatSuccessSummary)(summaryMsg);
|
|
257
271
|
const tagExplanation = results.isSoftTag ? (0, _cli().formatHint)('(use "bit tag --persist" to persist the soft-tagged changes as a fully tagged version)\n(use "bit reset --soft" to remove the soft-tags)') : exportedIds ? '' : (0, _cli().formatHint)('(use "bit export" to push these components to a remote)\n(use "bit reset" to unstage versions)');
|
|
258
272
|
const softTagClarification = results.isSoftTag ? _chalk().default.bold('keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag') : '';
|
|
259
|
-
|
|
273
|
+
const hasAutoTagged = autoTaggedCount > 0;
|
|
274
|
+
|
|
275
|
+
// Build minimal output (no auto-tagged listing, just counts grouped by scope)
|
|
276
|
+
const {
|
|
277
|
+
newSection,
|
|
278
|
+
changedSection
|
|
279
|
+
} = buildSections(hasAutoTagged ? formatCompMinimal : formatCompDetailed);
|
|
280
|
+
const autoTagSection = (() => {
|
|
281
|
+
if (!hasAutoTagged) return '';
|
|
282
|
+
const scopeCounts = (0, _lodash().countBy)(autoTaggedResults, r => r.component.id.scope);
|
|
283
|
+
const sorted = Object.entries(scopeCounts).sort(([, a], [, b]) => b - a);
|
|
284
|
+
const MAX_SHOWN = 4;
|
|
285
|
+
const shown = sorted.slice(0, MAX_SHOWN).map(([scope, n]) => `${scope} (${n})`);
|
|
286
|
+
const remaining = sorted.length - MAX_SHOWN;
|
|
287
|
+
const scopeLine = remaining > 0 ? [...shown, `+ ${remaining} more scopes`].join(' · ') : shown.join(' · ');
|
|
288
|
+
const title = (0, _cli().formatTitle)(`auto-tagged dependents (${autoTaggedCount})`);
|
|
289
|
+
const scopes = ` ${scopeLine}`;
|
|
290
|
+
const hint = (0, _cli().formatDetailsHint)('full list of auto-tagged dependents');
|
|
291
|
+
return `${title}\n${scopes}\n${hint}`;
|
|
292
|
+
})();
|
|
293
|
+
const footerParts = [summary, tagExplanation, softTagClarification].filter(Boolean).join('\n');
|
|
294
|
+
const data = (0, _cli().joinSections)([newSection, changedSection, autoTagSection, removedSection, publishSection, exportedSection, warningsSection, footerParts]);
|
|
295
|
+
if (!hasAutoTagged) {
|
|
296
|
+
return data;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// Build detailed output (with full auto-tagged listing)
|
|
300
|
+
const {
|
|
301
|
+
newSection: newDetailed,
|
|
302
|
+
changedSection: changedDetailed
|
|
303
|
+
} = buildSections(formatCompDetailed);
|
|
304
|
+
const detailedFooter = [summary, tagExplanation, softTagClarification].filter(Boolean).join('\n');
|
|
305
|
+
const details = (0, _cli().joinSections)([newDetailed, changedDetailed, removedSection, publishSection, exportedSection, warningsSection, detailedFooter]);
|
|
306
|
+
return {
|
|
307
|
+
data,
|
|
308
|
+
code: 0,
|
|
309
|
+
details
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/** @deprecated use tagResultReport instead */
|
|
314
|
+
function tagResultOutput(results) {
|
|
315
|
+
const result = tagResultReport(results);
|
|
316
|
+
return typeof result === 'string' ? result : result.details || result.data;
|
|
317
|
+
}
|
|
318
|
+
function compInBold(id) {
|
|
319
|
+
const version = id.hasVersion() ? `@${id.version}` : '';
|
|
320
|
+
return `${_chalk().default.bold(id.toStringWithoutVersion())}${version}`;
|
|
260
321
|
}
|
|
261
322
|
function outputIdsIfExists(label, ids) {
|
|
262
323
|
if (!ids?.length) return '';
|
package/dist/tag-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_cli","_legacy","_componentIssues","_bitError","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","NOTHING_TO_TAG_MSG","exports","AUTO_TAGGED_MSG","RELEASE_TYPES","tagCmdOptions","join","keys","IssuesClasses","TagCmd","constructor","snapping","logger","configStore","name","description","COMPONENT_PATTERN_HELP","cmd","report","patterns","options","message","ver","editor","versionsFile","snapped","unmerged","ignoreIssues","ignoreNewestVersion","skipTests","skipTasks","skipAutoTag","unmodified","soft","persist","disableTagPipeline","ignoreBuildErrors","rebuildDepsGraph","failFast","incrementBy","detachHead","loose","consoleWarning","releaseType","preReleaseId","validateOptions","disableTagAndSnapPipelines","build","getConfigBoolean","CFG_FORCE_LOCAL_BUILD","Boolean","BitError","params","ids","version","results","tag","chalk","yellow","tagResultOutput","patch","minor","major","preRelease","increment","prereleaseId","releaseFlags","filter","x","length","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","exportedIds","totalComponentsCount","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","totalCount","compInBold","hasVersion","bold","toStringWithoutVersion","formatComp","output","formatItem","autoTag","result","triggeredBy","autoTagComp","map","a","toString","softTagPrefix","isSoftTag","newDesc","changedDesc","newSection","formatSection","changedSection","removedSection","outputIdsIfExists","publishSection","publishedPackages","items","pkg","exportedSection","warnSymbol","warningsSection","w","summaryMsg","summary","formatSuccessSummary","tagExplanation","formatHint","softTagClarification","joinSections","label"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport type { Command, CommandOptions } from '@teambit/cli';\nimport { formatItem, formatSection, formatHint, formatSuccessSummary, warnSymbol, joinSections } from '@teambit/cli';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { DEFAULT_BIT_RELEASE_TYPE, COMPONENT_PATTERN_HELP, CFG_FORCE_LOCAL_BUILD } from '@teambit/legacy.constants';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport type { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport type { Logger } from '@teambit/logger';\nimport type { TagResults, SnappingMain } from './snapping.main.runtime';\nimport type { BasicTagParams } from './version-maker';\nimport type { ConfigStoreMain } from '@teambit/config-store';\n\nexport const NOTHING_TO_TAG_MSG = 'nothing to tag';\nexport const AUTO_TAGGED_MSG = 'auto-tagged dependents';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport const tagCmdOptions = [\n ['m', 'message <message>', 'a log message describing latest changes'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).',\n ],\n ['', 'versions-file <path>', 'path to a file containing component versions. format: \"component-id: version\"'],\n ['v', 'ver <version>', 'tag with the given version'],\n ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`],\n ['', 'prerelease-id <id>', 'prerelease identifier (e.g. \"dev\" to get \"1.0.0-dev.1\")'],\n ['p', 'patch', 'syntactic sugar for \"--increment patch\"'],\n ['', 'minor', 'syntactic sugar for \"--increment minor\"'],\n ['', 'major', 'syntactic sugar for \"--increment major\"'],\n ['', 'pre-release [identifier]', 'syntactic sugar for \"--increment prerelease\" and `--prerelease-id <identifier>`'],\n ['', 'snapped', 'tag only components whose head is a snap (not a tag)'],\n ['', 'unmerged', 'complete a merge process by tagging the unmerged components'],\n ['', 'skip-tests', 'skip running component tests during tag 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-tag', 'skip auto tagging dependents'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n [\n '',\n 'persist [skip-build]',\n 'persist the changes generated by --soft tag. by default, run the build pipeline, unless \"skip-build\" is provided',\n ],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'],\n ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\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 ['I', 'ignore-newest-version', 'allow tagging even when the component has newer versions e.g. for hotfixes.'],\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 ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the tag'],\n ['', 'loose', 'allow tag --build to succeed even if tasks like tests or lint fail'],\n [\n '',\n 'detach-head',\n 'UNSUPPORTED YET. in case a component is checked out to an older version, tag it without changing the head',\n ],\n] as CommandOptions;\n\nexport type TagParams = {\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n increment?: ReleaseType;\n preRelease?: string;\n prereleaseId?: string;\n ignoreUnresolvedDependencies?: boolean;\n ignoreIssues?: string;\n incrementBy?: number;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n loose?: boolean;\n versionsFile?: string;\n} & Partial<BasicTagParams>;\n\nexport class TagCmd implements Command {\n name = 'tag [component-patterns...]';\n group = 'version-control';\n description = 'create immutable component snapshots with semantic version tags';\n extendedDescription = `creates tagged versions using semantic versioning (semver) for component releases. tags are immutable and exportable.\nby default tags all new and modified components. supports version specification per pattern using \"@\" (e.g. foo@1.0.0, bar@minor).\nuse for official releases. for development versions, use 'bit snap' instead.`;\n arguments = [\n {\n name: 'component-patterns...',\n description: `${COMPONENT_PATTERN_HELP}. By default, all new and modified are tagged.`,\n },\n ];\n helpUrl = 'reference/components/snaps#create-a-tag-(release-version)';\n alias = 't';\n loader = true;\n options = tagCmdOptions;\n remoteOp = true; // In case a compiler / tester is not installed\n examples = [{ cmd: 'tag --ver 1.0.0', description: 'tag all components to version 1.0.0' }];\n\n constructor(\n private snapping: SnappingMain,\n private logger: Logger,\n private configStore: ConfigStoreMain\n ) {}\n\n // eslint-disable-next-line complexity\n async report([patterns = []]: [string[]], options: TagParams): Promise<string> {\n const {\n message = '',\n ver,\n editor = '',\n versionsFile,\n snapped = false,\n unmerged = false,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipTasks,\n skipAutoTag = false,\n unmodified = false,\n soft = false,\n persist = false,\n disableTagPipeline = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n failFast = false,\n incrementBy = 1,\n detachHead,\n loose = false,\n } = options;\n\n if (!message && !persist && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your tag`\n );\n }\n const { releaseType, preReleaseId } = validateOptions(options);\n\n const disableTagAndSnapPipelines = disableTagPipeline;\n let build = options.build;\n build = this.configStore.getConfigBoolean(CFG_FORCE_LOCAL_BUILD) || Boolean(build);\n if (persist) {\n if (persist === true) build = true;\n else if (persist === 'skip-build') build = false;\n else throw new BitError(`unknown value for --persist, use either --persist or --persist=skip-build`);\n }\n if (!build && !soft) {\n this.logger.consoleWarning(\n `tagging components on \"main\" lane when using remote build is not recommended. To avoid SemVer versions of your component with failing builds, please refer to:\n- Snap changes in a different lane and merge to \"main\" on your remote (learn more on lanes - https://bit.dev/reference/lanes/getting-started-with-lanes)\n- Use \\`bit tag --build\\` to build your components locally.\n- Use \\`snap\\` or \\`build\\` first to validate your build passing, and then version and export safely.\n\nTo undo local tag use the \"bit reset\" command.`\n );\n }\n\n const params = {\n ids: patterns,\n snapped,\n unmerged,\n editor,\n versionsFile,\n message,\n releaseType,\n preReleaseId,\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipTasks,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n incrementBy,\n version: ver,\n failFast,\n detachHead,\n loose,\n };\n\n const results = await this.snapping.tag(params);\n if (!results) return chalk.yellow(persist ? 'no soft-tag found' : NOTHING_TO_TAG_MSG);\n return tagResultOutput(results);\n }\n}\n\nexport function validateOptions(options: TagParams) {\n const { patch, minor, major, preRelease, increment, prereleaseId } = options;\n if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {\n throw new BitError(\n `--prerelease-id should be entered along with --increment flag, while --increment must be one of the following: [prepatch, prerelease, preminor, premajor]`\n );\n }\n\n const releaseFlags = [patch, minor, major, preRelease].filter((x) => x);\n if (releaseFlags.length > 1) {\n throw new BitError('you can use only one of the following - patch, minor, major, pre-release');\n }\n\n const getReleaseType = (): ReleaseType => {\n if (increment) {\n if (!RELEASE_TYPES.includes(increment)) {\n throw new BitError(`invalid increment-level \"${increment}\".\nsemver allows the following options only: ${RELEASE_TYPES.join(', ')}`);\n }\n return increment;\n }\n if (major) return 'major';\n if (minor) return 'minor';\n if (patch) return 'patch';\n if (preRelease) return 'prerelease';\n return DEFAULT_BIT_RELEASE_TYPE;\n };\n const getPreReleaseId = (): string | undefined => {\n if (prereleaseId) {\n return prereleaseId;\n }\n if (preRelease && typeof preRelease === 'string') {\n return preRelease;\n }\n return undefined;\n };\n\n return {\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n };\n}\n\nexport function tagResultOutput(results: TagResults): string {\n const {\n taggedComponents,\n autoTaggedResults,\n warnings,\n newComponents,\n removedComponents,\n exportedIds,\n totalComponentsCount,\n }: TagResults = results;\n const changedComponents = taggedComponents.filter((component) => !newComponents.searchWithoutVersion(component.id));\n const addedComponents = taggedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;\n const totalCount = totalComponentsCount ?? taggedComponents.length + autoTaggedCount;\n\n const compInBold = (id: ComponentID) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const formatComp = (component: ConsumerComponent): string => {\n let output = formatItem(compInBold(component.id));\n const autoTag = autoTaggedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => a.component.id.toString());\n output += `\\n ${AUTO_TAGGED_MSG}:\\n ${autoTagComp.join('\\n ')}`;\n }\n return output;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const newDesc = results.isSoftTag\n ? 'set to be tagged with first version for components when persisted'\n : 'first version for components';\n const changedDesc = results.isSoftTag\n ? 'components that are set to get a version bump when persisted'\n : 'components that got a version bump';\n\n const newSection = formatSection(softTagPrefix + 'new components', newDesc, addedComponents.map(formatComp));\n const changedSection = formatSection(\n softTagPrefix + 'changed components',\n changedDesc,\n changedComponents.map(formatComp)\n );\n const removedSection = outputIdsIfExists('removed components', removedComponents);\n\n const publishSection = (() => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const items = publishedPackages.map((pkg) => formatItem(pkg));\n return formatSection('published components', '', items);\n })();\n\n const exportedSection = (() => {\n if (!exportedIds) return '';\n if (!exportedIds.length) return `${warnSymbol} ${chalk.yellow('no component has been exported')}`;\n const items = exportedIds.map((id) => formatItem(compInBold(id)));\n return formatSection('exported components', '', items);\n })();\n\n const warningsSection =\n warnings && warnings.length ? warnings.map((w) => `${warnSymbol} ${chalk.yellow(w)}`).join('\\n') : '';\n\n const summaryMsg = `${totalCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged${exportedIds ? ' and exported' : ''}`;\n const summary = formatSuccessSummary(summaryMsg);\n\n const tagExplanation = results.isSoftTag\n ? formatHint(\n '(use \"bit tag --persist\" to persist the soft-tagged changes as a fully tagged version)\\n(use \"bit reset --soft\" to remove the soft-tags)'\n )\n : exportedIds\n ? ''\n : formatHint('(use \"bit export\" to push these components to a remote)\\n(use \"bit reset\" to unstage versions)');\n\n const softTagClarification = results.isSoftTag\n ? chalk.bold(\n 'keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag'\n )\n : '';\n\n return joinSections([\n newSection,\n changedSection,\n removedSection,\n publishSection,\n exportedSection,\n warningsSection,\n [summary, tagExplanation, softTagClarification].filter(Boolean).join('\\n'),\n ]);\n}\n\nexport function outputIdsIfExists(label: string, ids?: ComponentIdList) {\n if (!ids?.length) return '';\n const items = ids.map((id) => formatItem(id.toStringWithoutVersion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AAEO,SAASyG,iBAAiBA,CAACgB,KAAa,EAAE1E,GAAqB,EAAE;EACtE,IAAI,CAACA,GAAG,EAAEgB,MAAM,EAAE,OAAO,EAAE;EAC3B,MAAM6C,KAAK,GAAG7D,GAAG,CAAC+C,GAAG,CAAEf,EAAE,IAAK,IAAAU,iBAAU,EAACV,EAAE,CAACO,sBAAsB,CAAC,CAAC,EAAEyB,iBAAU,CAAC,CAAC;EAClF,OAAO,IAAAT,oBAAa,EAACmB,KAAK,EAAE,EAAE,EAAEb,KAAK,CAAC;AACxC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_cli","_legacy","_componentIssues","_bitError","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","NOTHING_TO_TAG_MSG","exports","AUTO_TAGGED_MSG","RELEASE_TYPES","tagCmdOptions","join","keys","IssuesClasses","TagCmd","constructor","snapping","logger","configStore","name","description","COMPONENT_PATTERN_HELP","cmd","report","patterns","options","message","ver","editor","versionsFile","snapped","unmerged","ignoreIssues","ignoreNewestVersion","skipTests","skipTasks","skipAutoTag","unmodified","soft","persist","disableTagPipeline","ignoreBuildErrors","rebuildDepsGraph","failFast","incrementBy","detachHead","loose","consoleWarning","releaseType","preReleaseId","validateOptions","disableTagAndSnapPipelines","build","getConfigBoolean","CFG_FORCE_LOCAL_BUILD","Boolean","BitError","params","ids","version","results","tag","chalk","yellow","tagResultReport","patch","minor","major","preRelease","increment","prereleaseId","releaseFlags","filter","x","length","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","exportedIds","totalComponentsCount","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","totalCount","formatCompMinimal","formatItem","compInBold","formatCompDetailed","output","autoTag","result","triggeredBy","autoTagComp","map","a","toString","softTagPrefix","isSoftTag","newDesc","changedDesc","buildSections","formatComp","newSection","formatSection","changedSection","removedSection","outputIdsIfExists","publishSection","publishedPackages","items","pkg","exportedSection","warnSymbol","warningsSection","w","summaryMsg","summary","formatSuccessSummary","tagExplanation","formatHint","softTagClarification","bold","hasAutoTagged","autoTagSection","scopeCounts","countBy","scope","sorted","entries","sort","b","MAX_SHOWN","shown","slice","n","remaining","scopeLine","title","formatTitle","scopes","hint","formatDetailsHint","footerParts","joinSections","newDetailed","changedDetailed","detailedFooter","details","code","tagResultOutput","hasVersion","toStringWithoutVersion","label"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { countBy } from 'lodash';\nimport type { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport type { Command, CommandOptions, Report } from '@teambit/cli';\nimport {\n formatItem,\n formatSection,\n formatTitle,\n formatHint,\n formatDetailsHint,\n formatSuccessSummary,\n warnSymbol,\n joinSections,\n} from '@teambit/cli';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { DEFAULT_BIT_RELEASE_TYPE, COMPONENT_PATTERN_HELP, CFG_FORCE_LOCAL_BUILD } from '@teambit/legacy.constants';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport type { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport type { Logger } from '@teambit/logger';\nimport type { TagResults, SnappingMain } from './snapping.main.runtime';\nimport type { BasicTagParams } from './version-maker';\nimport type { ConfigStoreMain } from '@teambit/config-store';\n\nexport const NOTHING_TO_TAG_MSG = 'nothing to tag';\nexport const AUTO_TAGGED_MSG = 'auto-tagged dependents';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport const tagCmdOptions = [\n ['m', 'message <message>', 'a log message describing latest changes'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).',\n ],\n ['', 'versions-file <path>', 'path to a file containing component versions. format: \"component-id: version\"'],\n ['v', 'ver <version>', 'tag with the given version'],\n ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`],\n ['', 'prerelease-id <id>', 'prerelease identifier (e.g. \"dev\" to get \"1.0.0-dev.1\")'],\n ['p', 'patch', 'syntactic sugar for \"--increment patch\"'],\n ['', 'minor', 'syntactic sugar for \"--increment minor\"'],\n ['', 'major', 'syntactic sugar for \"--increment major\"'],\n ['', 'pre-release [identifier]', 'syntactic sugar for \"--increment prerelease\" and `--prerelease-id <identifier>`'],\n ['', 'snapped', 'tag only components whose head is a snap (not a tag)'],\n ['', 'unmerged', 'complete a merge process by tagging the unmerged components'],\n ['', 'skip-tests', 'skip running component tests during tag 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-tag', 'skip auto tagging dependents'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n [\n '',\n 'persist [skip-build]',\n 'persist the changes generated by --soft tag. by default, run the build pipeline, unless \"skip-build\" is provided',\n ],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'],\n ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\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 ['I', 'ignore-newest-version', 'allow tagging even when the component has newer versions e.g. for hotfixes.'],\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 ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the tag'],\n ['', 'loose', 'allow tag --build to succeed even if tasks like tests or lint fail'],\n [\n '',\n 'detach-head',\n 'UNSUPPORTED YET. in case a component is checked out to an older version, tag it without changing the head',\n ],\n] as CommandOptions;\n\nexport type TagParams = {\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n increment?: ReleaseType;\n preRelease?: string;\n prereleaseId?: string;\n ignoreUnresolvedDependencies?: boolean;\n ignoreIssues?: string;\n incrementBy?: number;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n loose?: boolean;\n versionsFile?: string;\n} & Partial<BasicTagParams>;\n\nexport class TagCmd implements Command {\n name = 'tag [component-patterns...]';\n group = 'version-control';\n description = 'create immutable component snapshots with semantic version tags';\n extendedDescription = `creates tagged versions using semantic versioning (semver) for component releases. tags are immutable and exportable.\nby default tags all new and modified components. supports version specification per pattern using \"@\" (e.g. foo@1.0.0, bar@minor).\nuse for official releases. for development versions, use 'bit snap' instead.`;\n arguments = [\n {\n name: 'component-patterns...',\n description: `${COMPONENT_PATTERN_HELP}. By default, all new and modified are tagged.`,\n },\n ];\n helpUrl = 'reference/components/snaps#create-a-tag-(release-version)';\n alias = 't';\n loader = true;\n options = tagCmdOptions;\n remoteOp = true; // In case a compiler / tester is not installed\n examples = [{ cmd: 'tag --ver 1.0.0', description: 'tag all components to version 1.0.0' }];\n\n constructor(\n private snapping: SnappingMain,\n private logger: Logger,\n private configStore: ConfigStoreMain\n ) {}\n\n // eslint-disable-next-line complexity\n async report([patterns = []]: [string[]], options: TagParams): Promise<string | Report> {\n const {\n message = '',\n ver,\n editor = '',\n versionsFile,\n snapped = false,\n unmerged = false,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipTasks,\n skipAutoTag = false,\n unmodified = false,\n soft = false,\n persist = false,\n disableTagPipeline = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n failFast = false,\n incrementBy = 1,\n detachHead,\n loose = false,\n } = options;\n\n if (!message && !persist && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your tag`\n );\n }\n const { releaseType, preReleaseId } = validateOptions(options);\n\n const disableTagAndSnapPipelines = disableTagPipeline;\n let build = options.build;\n build = this.configStore.getConfigBoolean(CFG_FORCE_LOCAL_BUILD) || Boolean(build);\n if (persist) {\n if (persist === true) build = true;\n else if (persist === 'skip-build') build = false;\n else throw new BitError(`unknown value for --persist, use either --persist or --persist=skip-build`);\n }\n if (!build && !soft) {\n this.logger.consoleWarning(\n `tagging components on \"main\" lane when using remote build is not recommended. To avoid SemVer versions of your component with failing builds, please refer to:\n- Snap changes in a different lane and merge to \"main\" on your remote (learn more on lanes - https://bit.dev/reference/lanes/getting-started-with-lanes)\n- Use \\`bit tag --build\\` to build your components locally.\n- Use \\`snap\\` or \\`build\\` first to validate your build passing, and then version and export safely.\n\nTo undo local tag use the \"bit reset\" command.`\n );\n }\n\n const params = {\n ids: patterns,\n snapped,\n unmerged,\n editor,\n versionsFile,\n message,\n releaseType,\n preReleaseId,\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipTasks,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n incrementBy,\n version: ver,\n failFast,\n detachHead,\n loose,\n };\n\n const results = await this.snapping.tag(params);\n if (!results) return chalk.yellow(persist ? 'no soft-tag found' : NOTHING_TO_TAG_MSG);\n return tagResultReport(results);\n }\n}\n\nexport function validateOptions(options: TagParams) {\n const { patch, minor, major, preRelease, increment, prereleaseId } = options;\n if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {\n throw new BitError(\n `--prerelease-id should be entered along with --increment flag, while --increment must be one of the following: [prepatch, prerelease, preminor, premajor]`\n );\n }\n\n const releaseFlags = [patch, minor, major, preRelease].filter((x) => x);\n if (releaseFlags.length > 1) {\n throw new BitError('you can use only one of the following - patch, minor, major, pre-release');\n }\n\n const getReleaseType = (): ReleaseType => {\n if (increment) {\n if (!RELEASE_TYPES.includes(increment)) {\n throw new BitError(`invalid increment-level \"${increment}\".\nsemver allows the following options only: ${RELEASE_TYPES.join(', ')}`);\n }\n return increment;\n }\n if (major) return 'major';\n if (minor) return 'minor';\n if (patch) return 'patch';\n if (preRelease) return 'prerelease';\n return DEFAULT_BIT_RELEASE_TYPE;\n };\n const getPreReleaseId = (): string | undefined => {\n if (prereleaseId) {\n return prereleaseId;\n }\n if (preRelease && typeof preRelease === 'string') {\n return preRelease;\n }\n return undefined;\n };\n\n return {\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n };\n}\n\nexport function tagResultReport(results: TagResults): string | Report {\n const {\n taggedComponents,\n autoTaggedResults,\n warnings,\n newComponents,\n removedComponents,\n exportedIds,\n totalComponentsCount,\n }: TagResults = results;\n const changedComponents = taggedComponents.filter((component) => !newComponents.searchWithoutVersion(component.id));\n const addedComponents = taggedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;\n const totalCount = totalComponentsCount ?? taggedComponents.length + autoTaggedCount;\n\n const formatCompMinimal = (component: ConsumerComponent): string => {\n return formatItem(compInBold(component.id));\n };\n\n const formatCompDetailed = (component: ConsumerComponent): string => {\n let output = formatItem(compInBold(component.id));\n const autoTag = (autoTaggedResults ?? []).filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => a.component.id.toString());\n output += `\\n ${AUTO_TAGGED_MSG}:\\n ${autoTagComp.join('\\n ')}`;\n }\n return output;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const newDesc = results.isSoftTag\n ? 'set to be tagged with first version for components when persisted'\n : 'first version for components';\n const changedDesc = results.isSoftTag\n ? 'components that are set to get a version bump when persisted'\n : 'components that got a version bump';\n\n const buildSections = (formatComp: (c: ConsumerComponent) => string) => {\n const newSection = formatSection(softTagPrefix + 'new components', newDesc, addedComponents.map(formatComp));\n const changedSection = formatSection(\n softTagPrefix + 'changed components',\n changedDesc,\n changedComponents.map(formatComp)\n );\n return { newSection, changedSection };\n };\n\n const removedSection = outputIdsIfExists('removed components', removedComponents);\n\n const publishSection = (() => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const items = publishedPackages.map((pkg) => formatItem(pkg));\n return formatSection('published components', '', items);\n })();\n\n const exportedSection = (() => {\n if (!exportedIds) return '';\n if (!exportedIds.length) return `${warnSymbol} ${chalk.yellow('no component has been exported')}`;\n const items = exportedIds.map((id) => formatItem(compInBold(id)));\n return formatSection('exported components', '', items);\n })();\n\n const warningsSection =\n warnings && warnings.length ? warnings.map((w) => `${warnSymbol} ${chalk.yellow(w)}`).join('\\n') : '';\n\n const summaryMsg = `${totalCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged${exportedIds ? ' and exported' : ''}`;\n const summary = formatSuccessSummary(summaryMsg);\n\n const tagExplanation = results.isSoftTag\n ? formatHint(\n '(use \"bit tag --persist\" to persist the soft-tagged changes as a fully tagged version)\\n(use \"bit reset --soft\" to remove the soft-tags)'\n )\n : exportedIds\n ? ''\n : formatHint('(use \"bit export\" to push these components to a remote)\\n(use \"bit reset\" to unstage versions)');\n\n const softTagClarification = results.isSoftTag\n ? chalk.bold(\n 'keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag'\n )\n : '';\n\n const hasAutoTagged = autoTaggedCount > 0;\n\n // Build minimal output (no auto-tagged listing, just counts grouped by scope)\n const { newSection, changedSection } = buildSections(hasAutoTagged ? formatCompMinimal : formatCompDetailed);\n\n const autoTagSection = (() => {\n if (!hasAutoTagged) return '';\n const scopeCounts = countBy(autoTaggedResults, (r) => r.component.id.scope);\n const sorted = Object.entries(scopeCounts).sort(([, a], [, b]) => b - a);\n const MAX_SHOWN = 4;\n const shown = sorted.slice(0, MAX_SHOWN).map(([scope, n]) => `${scope} (${n})`);\n const remaining = sorted.length - MAX_SHOWN;\n const scopeLine = remaining > 0 ? [...shown, `+ ${remaining} more scopes`].join(' · ') : shown.join(' · ');\n const title = formatTitle(`auto-tagged dependents (${autoTaggedCount})`);\n const scopes = ` ${scopeLine}`;\n const hint = formatDetailsHint('full list of auto-tagged dependents');\n return `${title}\\n${scopes}\\n${hint}`;\n })();\n\n const footerParts = [summary, tagExplanation, softTagClarification].filter(Boolean).join('\\n');\n const data = joinSections([\n newSection,\n changedSection,\n autoTagSection,\n removedSection,\n publishSection,\n exportedSection,\n warningsSection,\n footerParts,\n ]);\n\n if (!hasAutoTagged) {\n return data;\n }\n\n // Build detailed output (with full auto-tagged listing)\n const { newSection: newDetailed, changedSection: changedDetailed } = buildSections(formatCompDetailed);\n const detailedFooter = [summary, tagExplanation, softTagClarification].filter(Boolean).join('\\n');\n const details = joinSections([\n newDetailed,\n changedDetailed,\n removedSection,\n publishSection,\n exportedSection,\n warningsSection,\n detailedFooter,\n ]);\n\n return { data, code: 0, details };\n}\n\n/** @deprecated use tagResultReport instead */\nexport function tagResultOutput(results: TagResults): string {\n const result = tagResultReport(results);\n return typeof result === 'string' ? result : result.details || result.data;\n}\n\nexport function compInBold(id: ComponentID): string {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n}\n\nexport function outputIdsIfExists(label: string, ids?: ComponentIdList) {\n if (!ids?.length) return '';\n const items = ids.map((id) => formatItem(id.toStringWithoutVersion(), warnSymbol));\n return formatSection(label, '', items);\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA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E,IAAK,IAAAK,iBAAU,EAACL,EAAE,CAACuE,sBAAsB,CAAC,CAAC,EAAEvC,iBAAU,CAAC,CAAC;EAClF,OAAO,IAAAT,oBAAa,EAACiD,KAAK,EAAE,EAAE,EAAE3C,KAAK,CAAC;AACxC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/snapping",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.935",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/snapping",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "snapping",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.935"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"graphlib": "2.1.8",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"@teambit/component-id": "1.2.4",
|
|
24
24
|
"@teambit/graph.cleargraph": "0.0.11",
|
|
25
25
|
"@teambit/legacy.consumer-component": "0.0.105",
|
|
26
|
-
"@teambit/logger": "0.0.1403",
|
|
27
26
|
"@teambit/toolbox.promise.map-pool": "0.0.14",
|
|
28
27
|
"@teambit/component.sources": "0.0.156",
|
|
29
28
|
"@teambit/legacy.consumer-config": "0.0.104",
|
|
@@ -32,13 +31,11 @@
|
|
|
32
31
|
"@teambit/legacy.logger": "0.0.36",
|
|
33
32
|
"@teambit/legacy.scope": "0.0.104",
|
|
34
33
|
"@teambit/legacy.loader": "0.0.18",
|
|
35
|
-
"@teambit/cli": "0.0.1310",
|
|
36
34
|
"@teambit/legacy.constants": "0.0.24",
|
|
37
35
|
"@teambit/legacy.component-list": "0.0.158",
|
|
38
36
|
"@teambit/legacy.consumer": "0.0.104",
|
|
39
37
|
"@teambit/legacy.dependency-graph": "0.0.107",
|
|
40
38
|
"@teambit/component-issues": "0.0.171",
|
|
41
|
-
"@teambit/config-store": "0.0.190",
|
|
42
39
|
"@teambit/harmony": "0.4.7",
|
|
43
40
|
"@teambit/component-version": "1.0.4",
|
|
44
41
|
"@teambit/harmony.modules.concurrency": "0.0.25",
|
|
@@ -49,18 +46,21 @@
|
|
|
49
46
|
"@teambit/harmony.modules.get-basic-log": "0.0.105",
|
|
50
47
|
"@teambit/toolbox.crypto.sha1": "0.0.15",
|
|
51
48
|
"@teambit/workspace.modules.node-modules-linker": "0.0.334",
|
|
52
|
-
"@teambit/graph": "1.0.
|
|
53
|
-
"@teambit/
|
|
54
|
-
"@teambit/
|
|
55
|
-
"@teambit/
|
|
56
|
-
"@teambit/
|
|
57
|
-
"@teambit/
|
|
58
|
-
"@teambit/
|
|
59
|
-
"@teambit/
|
|
60
|
-
"@teambit/
|
|
61
|
-
"@teambit/
|
|
62
|
-
"@teambit/
|
|
63
|
-
"@teambit/
|
|
49
|
+
"@teambit/graph": "1.0.935",
|
|
50
|
+
"@teambit/logger": "0.0.1404",
|
|
51
|
+
"@teambit/objects": "0.0.442",
|
|
52
|
+
"@teambit/scope": "1.0.935",
|
|
53
|
+
"@teambit/component": "1.0.935",
|
|
54
|
+
"@teambit/dependencies": "1.0.935",
|
|
55
|
+
"@teambit/dependency-resolver": "1.0.935",
|
|
56
|
+
"@teambit/cli": "0.0.1311",
|
|
57
|
+
"@teambit/remove": "1.0.935",
|
|
58
|
+
"@teambit/workspace": "1.0.935",
|
|
59
|
+
"@teambit/config-store": "0.0.191",
|
|
60
|
+
"@teambit/application": "1.0.935",
|
|
61
|
+
"@teambit/builder": "1.0.935",
|
|
62
|
+
"@teambit/export": "1.0.935",
|
|
63
|
+
"@teambit/importer": "1.0.935"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@types/graphlib": "2.1.7",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"@teambit/harmony.testing.load-aspect": "0.0.368",
|
|
74
74
|
"@teambit/workspace.testing.mock-workspace": "0.0.170",
|
|
75
75
|
"@teambit/harmony.envs.core-aspect-env": "0.1.4",
|
|
76
|
-
"@teambit/compiler": "1.0.
|
|
77
|
-
"@teambit/issues": "1.0.
|
|
76
|
+
"@teambit/compiler": "1.0.935",
|
|
77
|
+
"@teambit/issues": "1.0.935"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"chai": "5.2.1",
|
|
File without changes
|