@teambit/snapping 1.0.1220 → 1.0.1222
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.js +3 -2
- package/dist/snap-cmd.js.map +1 -1
- package/dist/snapping.main.runtime.d.ts +3 -1
- package/dist/snapping.main.runtime.js +4 -0
- package/dist/snapping.main.runtime.js.map +1 -1
- package/dist/tag-cmd.d.ts +2 -1
- package/dist/tag-cmd.js +11 -2
- package/dist/tag-cmd.js.map +1 -1
- package/dist/version-maker.d.ts +10 -0
- package/dist/version-maker.js +30 -4
- package/dist/version-maker.js.map +1 -1
- package/package.json +38 -38
- /package/dist/{preview-1791901820893.js → preview-1791920523113.js} +0 -0
package/dist/snap-cmd.js
CHANGED
|
@@ -160,6 +160,7 @@ function snapResultReport(results) {
|
|
|
160
160
|
};
|
|
161
161
|
};
|
|
162
162
|
const removedSection = (0, _tagCmd().outputIdsIfExists)('removed components', removedComponents);
|
|
163
|
+
const pinnedSection = (0, _tagCmd().dependentsWithPinnedDepsSection)(results.dependentsWithPinnedDeps, 'snapped');
|
|
163
164
|
const warningsSection = warnings && warnings.length ? warnings.map(w => `${_cli().warnSymbol} ${_chalk().default.yellow(w)}`).join('\n') : '';
|
|
164
165
|
const workspaceRootHint = results.autoAddedWorkspaceRoot ? (0, _cli().formatHint)(`(${(0, _tagCmd().compInBold)(results.autoAddedWorkspaceRoot)} is the workspace-root component. it was new or modified, so it was snapped along: the other components record the root version they were snapped with)`) : '';
|
|
165
166
|
const laneStr = laneName ? ` on "${laneName}" lane` : '';
|
|
@@ -185,7 +186,7 @@ function snapResultReport(results) {
|
|
|
185
186
|
return `${title}\n${scopes}\n${hint}`;
|
|
186
187
|
})();
|
|
187
188
|
const footerParts = [summary, snapExplanation].filter(Boolean).join('\n');
|
|
188
|
-
const data = (0, _cli().joinSections)([newSection, changedSection, workspaceRootHint, autoSnapSection, removedSection, warningsSection, footerParts]);
|
|
189
|
+
const data = (0, _cli().joinSections)([newSection, changedSection, workspaceRootHint, autoSnapSection, pinnedSection, removedSection, warningsSection, footerParts]);
|
|
189
190
|
if (!hasAutoSnapped) {
|
|
190
191
|
return data;
|
|
191
192
|
}
|
|
@@ -196,7 +197,7 @@ function snapResultReport(results) {
|
|
|
196
197
|
changedSection: changedDetailed
|
|
197
198
|
} = buildSections(formatCompDetailed);
|
|
198
199
|
const detailedFooter = [summary, snapExplanation].filter(Boolean).join('\n');
|
|
199
|
-
const details = (0, _cli().joinSections)([newDetailed, changedDetailed, workspaceRootHint, removedSection, warningsSection, detailedFooter]);
|
|
200
|
+
const details = (0, _cli().joinSections)([newDetailed, changedDetailed, workspaceRootHint, pinnedSection, removedSection, warningsSection, detailedFooter]);
|
|
200
201
|
return {
|
|
201
202
|
data,
|
|
202
203
|
code: 0,
|
package/dist/snap-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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","noLockDeps","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","workspaceRootHint","autoAddedWorkspaceRoot","formatHint","laneStr","summary","formatSuccessSummary","snapExplanation","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 ['', 'no-lock-deps', 'do not save the dependencies graph in the snap'],\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 noLockDeps = false,\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 noLockDeps,\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 workspaceRootHint = results.autoAddedWorkspaceRoot\n ? formatHint(\n `(${compInBold(results.autoAddedWorkspaceRoot)} is the workspace-root component. it was new or modified, so it was snapped along: the other components record the root version they were snapped with)`\n )\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 workspaceRootHint,\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([\n newDetailed,\n changedDetailed,\n workspaceRootHint,\n removedSection,\n warningsSection,\n detailedFooter,\n ]);\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,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,iBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,gBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,KAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,IAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK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U,EACVE,cAAc,EACdM,iBAAiB,EACjBO,eAAe,EACfZ,cAAc,EACdE,eAAe,EACf6B,WAAW,CACZ,CAAC;EAEF,IAAI,CAACrC,cAAc,EAAE;IACnB,OAAOpG,IAAI;EACb;;EAEA;EACA,MAAM;IAAEuG,UAAU,EAAEoC,WAAW;IAAElC,cAAc,EAAEmC;EAAgB,CAAC,GAAGvC,aAAa,CAACX,kBAAkB,CAAC;EACtG,MAAMmD,cAAc,GAAG,CAAC1B,OAAO,EAAEE,eAAe,CAAC,CAACtC,MAAM,CAACnB,OAAO,CAAC,CAACrB,IAAI,CAAC,IAAI,CAAC;EAC5E,MAAMuG,OAAO,GAAG,IAAAJ,mBAAY,EAAC,CAC3BC,WAAW,EACXC,eAAe,EACf7B,iBAAiB,EACjBL,cAAc,EACdE,eAAe,EACfiC,cAAc,CACf,CAAC;EAEF,OAAO;IAAE7I,IAAI;IAAE+I,IAAI,EAAE,CAAC;IAAED;EAAQ,CAAC;AACnC;;AAEA;AACO,SAASE,gBAAgBA,CAACjF,OAAoB,EAAU;EAC7D,MAAM8B,MAAM,GAAGxB,gBAAgB,CAACN,OAAO,CAAC;EACxC,OAAO,OAAO8B,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAGA,MAAM,CAACiD,OAAO,IAAIjD,MAAM,CAAC7F,IAAI;AAC5E","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","noLockDeps","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","pinnedSection","dependentsWithPinnedDepsSection","dependentsWithPinnedDeps","warningsSection","w","warnSymbol","workspaceRootHint","autoAddedWorkspaceRoot","formatHint","laneStr","summary","formatSuccessSummary","snapExplanation","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, dependentsWithPinnedDepsSection } 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 ['', 'no-lock-deps', 'do not save the dependencies graph in the snap'],\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 noLockDeps = false,\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 noLockDeps,\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 const pinnedSection = dependentsWithPinnedDepsSection(results.dependentsWithPinnedDeps, 'snapped');\n\n const warningsSection =\n warnings && warnings.length ? warnings.map((w) => `${warnSymbol} ${chalk.yellow(w)}`).join('\\n') : '';\n\n const workspaceRootHint = results.autoAddedWorkspaceRoot\n ? formatHint(\n `(${compInBold(results.autoAddedWorkspaceRoot)} is the workspace-root component. it was new or modified, so it was snapped along: the other components record the root version they were snapped with)`\n )\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 workspaceRootHint,\n autoSnapSection,\n pinnedSection,\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([\n newDetailed,\n changedDetailed,\n workspaceRootHint,\n pinnedSection,\n removedSection,\n warningsSection,\n detailedFooter,\n ]);\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,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,iBAAA;EA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gBAAgB,CAACN,OAAO,CAAC;EACxC,OAAO,OAAO8B,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAGA,MAAM,CAACoD,OAAO,IAAIpD,MAAM,CAAC7F,IAAI;AAC5E","ignoreList":[]}
|
|
@@ -18,7 +18,7 @@ import type { NewDependencies } from './generate-comp-from-scope';
|
|
|
18
18
|
import type { ResetResult } from './reset-component';
|
|
19
19
|
import type { ApplicationMain } from '@teambit/application';
|
|
20
20
|
import type { RemoveMain } from '@teambit/remove';
|
|
21
|
-
import type { BasicTagParams, BasicTagSnapParams, VersionMakerParams } from './version-maker';
|
|
21
|
+
import type { BasicTagParams, BasicTagSnapParams, DependentWithPinnedDeps, VersionMakerParams } from './version-maker';
|
|
22
22
|
import type { SlotRegistry } from '@teambit/harmony';
|
|
23
23
|
export type PackageIntegritiesByPublishedPackages = Map<string, {
|
|
24
24
|
integrity: string | undefined;
|
|
@@ -70,6 +70,7 @@ export type BasicTagResults = {
|
|
|
70
70
|
warnings: string[];
|
|
71
71
|
newComponents: ComponentIdList;
|
|
72
72
|
removedComponents?: ComponentIdList;
|
|
73
|
+
dependentsWithPinnedDeps?: DependentWithPinnedDeps[];
|
|
73
74
|
totalComponentsCount?: number;
|
|
74
75
|
/**
|
|
75
76
|
* the workspace-root component that joined the batch because it was new or modified, at its new
|
|
@@ -134,6 +135,7 @@ export declare class SnappingMain {
|
|
|
134
135
|
makeVersion(ids: ComponentID[], components: Component[], params: VersionMakerParams): Promise<{
|
|
135
136
|
taggedComponents: ConsumerComponent[];
|
|
136
137
|
autoTaggedResults: AutoTagResult[];
|
|
138
|
+
dependentsWithPinnedDeps: DependentWithPinnedDeps[];
|
|
137
139
|
publishedPackages: string[];
|
|
138
140
|
stagedConfig?: import("@teambit/scope").StagedConfig;
|
|
139
141
|
removedComponents?: ComponentIdList;
|
|
@@ -463,6 +463,7 @@ class SnappingMain {
|
|
|
463
463
|
const {
|
|
464
464
|
taggedComponents,
|
|
465
465
|
autoTaggedResults,
|
|
466
|
+
dependentsWithPinnedDeps,
|
|
466
467
|
publishedPackages,
|
|
467
468
|
stagedConfig,
|
|
468
469
|
removedComponents,
|
|
@@ -471,6 +472,7 @@ class SnappingMain {
|
|
|
471
472
|
const tagResults = {
|
|
472
473
|
taggedComponents,
|
|
473
474
|
autoTaggedResults,
|
|
475
|
+
dependentsWithPinnedDeps,
|
|
474
476
|
isSoftTag: soft,
|
|
475
477
|
publishedPackages,
|
|
476
478
|
warnings,
|
|
@@ -769,6 +771,7 @@ class SnappingMain {
|
|
|
769
771
|
const {
|
|
770
772
|
taggedComponents,
|
|
771
773
|
autoTaggedResults,
|
|
774
|
+
dependentsWithPinnedDeps,
|
|
772
775
|
stagedConfig,
|
|
773
776
|
removedComponents,
|
|
774
777
|
totalComponentsCount
|
|
@@ -776,6 +779,7 @@ class SnappingMain {
|
|
|
776
779
|
const snapResults = {
|
|
777
780
|
snappedComponents: taggedComponents,
|
|
778
781
|
autoSnappedResults: autoTaggedResults,
|
|
782
|
+
dependentsWithPinnedDeps,
|
|
779
783
|
newComponents,
|
|
780
784
|
removedComponents,
|
|
781
785
|
totalComponentsCount,
|