@teambit/snapping 0.0.448 → 0.0.450
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/reset-cmd.js +2 -2
- package/dist/reset-cmd.js.map +1 -1
- package/dist/snap-cmd.js +8 -8
- package/dist/snap-cmd.js.map +1 -1
- package/dist/tag-cmd.js +10 -10
- package/dist/tag-cmd.js.map +1 -1
- package/package-tar/teambit-snapping-0.0.450.tgz +0 -0
- package/package.json +19 -19
- package/package-tar/teambit-snapping-0.0.448.tgz +0 -0
- /package/dist/{preview-1692155876143.js → preview-1692345627885.js} +0 -0
package/dist/reset-cmd.js
CHANGED
|
@@ -50,7 +50,7 @@ class ResetCmd {
|
|
|
50
50
|
(0, _defineProperty2().default)(this, "group", 'development');
|
|
51
51
|
(0, _defineProperty2().default)(this, "extendedDescription", `https://${_constants().BASE_DOCS_DOMAIN}/components/tags#undoing-a-tag`);
|
|
52
52
|
(0, _defineProperty2().default)(this, "alias", '');
|
|
53
|
-
(0, _defineProperty2().default)(this, "options", [['a', 'all', 'revert
|
|
53
|
+
(0, _defineProperty2().default)(this, "options", [['a', 'all', 'revert all unexported tags/snaps for all components'], ['', 'head', 'revert the head tag/snap only (by default, all local tags/snaps are reverted)'], ['', 'soft', 'revert only soft-tags (components tagged with --soft flag)'], ['f', 'force', "revert the tag even if it's used as a dependency. WARNING: components that depend on this tag will be corrupted"]]);
|
|
54
54
|
(0, _defineProperty2().default)(this, "loader", true);
|
|
55
55
|
(0, _defineProperty2().default)(this, "migration", true);
|
|
56
56
|
}
|
|
@@ -73,7 +73,7 @@ class ResetCmd {
|
|
|
73
73
|
results,
|
|
74
74
|
isSoftUntag
|
|
75
75
|
} = await this.snapping.reset(pattern, head, force, soft);
|
|
76
|
-
const titleSuffix = isSoftUntag ? 'soft-untagged (are not
|
|
76
|
+
const titleSuffix = isSoftUntag ? 'soft-untagged (are not candidates for tagging any more)' : 'untagged';
|
|
77
77
|
const title = _chalk().default.green(`${results.length} component(s) were ${titleSuffix}:\n`);
|
|
78
78
|
const components = results.map(result => {
|
|
79
79
|
return `${_chalk().default.cyan(result.id.toStringWithoutVersion())}. version(s): ${result.versions.join(', ')}`;
|
package/dist/reset-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_bitError","data","require","_chalk","_interopRequireDefault","_constants","ResetCmd","constructor","snapping","_defineProperty2","default","name","description","COMPONENT_PATTERN_HELP","BASE_DOCS_DOMAIN","report","pattern","all","head","force","soft","BitError","results","isSoftUntag","reset","titleSuffix","title","chalk","green","length","components","map","result","cyan","id","toStringWithoutVersion","versions","join","exports"],"sources":["reset-cmd.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BASE_DOCS_DOMAIN, COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { SnappingMain } from './snapping.main.runtime';\n\nexport default class ResetCmd implements Command {\n name = 'reset [component-pattern]';\n description = 'revert tagged or snapped versions for component(s)';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n {\n name: 'component-version',\n description: 'the version to untag (semver for tags. hash for snaps)',\n },\n ];\n group = 'development';\n extendedDescription = `https://${BASE_DOCS_DOMAIN}/components/tags#undoing-a-tag`;\n alias = '';\n options = [\n ['a', 'all', 'revert
|
|
1
|
+
{"version":3,"names":["_bitError","data","require","_chalk","_interopRequireDefault","_constants","ResetCmd","constructor","snapping","_defineProperty2","default","name","description","COMPONENT_PATTERN_HELP","BASE_DOCS_DOMAIN","report","pattern","all","head","force","soft","BitError","results","isSoftUntag","reset","titleSuffix","title","chalk","green","length","components","map","result","cyan","id","toStringWithoutVersion","versions","join","exports"],"sources":["reset-cmd.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BASE_DOCS_DOMAIN, COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { SnappingMain } from './snapping.main.runtime';\n\nexport default class ResetCmd implements Command {\n name = 'reset [component-pattern]';\n description = 'revert tagged or snapped versions for component(s)';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n {\n name: 'component-version',\n description: 'the version to untag (semver for tags. hash for snaps)',\n },\n ];\n group = 'development';\n extendedDescription = `https://${BASE_DOCS_DOMAIN}/components/tags#undoing-a-tag`;\n alias = '';\n options = [\n ['a', 'all', 'revert all unexported tags/snaps for all components'],\n ['', 'head', 'revert the head tag/snap only (by default, all local tags/snaps are reverted)'],\n ['', 'soft', 'revert only soft-tags (components tagged with --soft flag)'],\n [\n 'f',\n 'force',\n \"revert the tag even if it's used as a dependency. WARNING: components that depend on this tag will be corrupted\",\n ],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private snapping: SnappingMain) {}\n\n async report(\n [pattern]: [string],\n {\n all = false,\n head = false,\n force = false,\n soft = false,\n }: { all?: boolean; head?: boolean; force?: boolean; soft?: boolean }\n ) {\n if (!pattern && !all) {\n throw new BitError('please specify a component-pattern or use --all flag');\n }\n if (pattern && all) {\n throw new BitError('please specify either a component-pattern or --all flag, not both');\n }\n if (soft && head) {\n throw new BitError('please specify either --soft or --head flag, not both');\n }\n const { results, isSoftUntag } = await this.snapping.reset(pattern, head, force, soft);\n const titleSuffix = isSoftUntag ? 'soft-untagged (are not candidates for tagging any more)' : 'untagged';\n const title = chalk.green(`${results.length} component(s) were ${titleSuffix}:\\n`);\n const components = results.map((result) => {\n return `${chalk.cyan(result.id.toStringWithoutVersion())}. version(s): ${result.versions.join(', ')}`;\n });\n return title + components.join('\\n');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAA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C,IAAI,GAAG,KAAK;IACZC,KAAK,GAAG,KAAK;IACbC,IAAI,GAAG;EAC2D,CAAC,EACrE;IACA,IAAI,CAACJ,OAAO,IAAI,CAACC,GAAG,EAAE;MACpB,MAAM,KAAII,oBAAQ,EAAC,sDAAsD,CAAC;IAC5E;IACA,IAAIL,OAAO,IAAIC,GAAG,EAAE;MAClB,MAAM,KAAII,oBAAQ,EAAC,mEAAmE,CAAC;IACzF;IACA,IAAID,IAAI,IAAIF,IAAI,EAAE;MAChB,MAAM,KAAIG,oBAAQ,EAAC,uDAAuD,CAAC;IAC7E;IACA,MAAM;MAAEC,OAAO;MAAEC;IAAY,CAAC,GAAG,MAAM,IAAI,CAACf,QAAQ,CAACgB,KAAK,CAACR,OAAO,EAAEE,IAAI,EAAEC,KAAK,EAAEC,IAAI,CAAC;IACtF,MAAMK,WAAW,GAAGF,WAAW,GAAG,yDAAyD,GAAG,UAAU;IACxG,MAAMG,KAAK,GAAGC,gBAAK,CAACC,KAAK,CAAE,GAAEN,OAAO,CAACO,MAAO,sBAAqBJ,WAAY,KAAI,CAAC;IAClF,MAAMK,UAAU,GAAGR,OAAO,CAACS,GAAG,CAAEC,MAAM,IAAK;MACzC,OAAQ,GAAEL,gBAAK,CAACM,IAAI,CAACD,MAAM,CAACE,EAAE,CAACC,sBAAsB,CAAC,CAAC,CAAE,iBAAgBH,MAAM,CAACI,QAAQ,CAACC,IAAI,CAAC,IAAI,CAAE,EAAC;IACvG,CAAC,CAAC;IACF,OAAOX,KAAK,GAAGI,UAAU,CAACO,IAAI,CAAC,IAAI,CAAC;EACtC;AACF;AAACC,OAAA,CAAA5B,OAAA,GAAAJ,QAAA"}
|
package/dist/snap-cmd.js
CHANGED
|
@@ -54,18 +54,18 @@ class SnapCmd {
|
|
|
54
54
|
this.snapping = snapping;
|
|
55
55
|
this.logger = logger;
|
|
56
56
|
(0, _defineProperty2().default)(this, "name", 'snap [component-pattern]');
|
|
57
|
-
(0, _defineProperty2().default)(this, "description", 'create an immutable and exportable component snapshot (
|
|
57
|
+
(0, _defineProperty2().default)(this, "description", 'create an immutable and exportable component snapshot (non-release version)');
|
|
58
58
|
(0, _defineProperty2().default)(this, "extendedDescription", void 0);
|
|
59
59
|
(0, _defineProperty2().default)(this, "group", 'development');
|
|
60
60
|
(0, _defineProperty2().default)(this, "arguments", [{
|
|
61
61
|
name: 'component-pattern',
|
|
62
|
-
description: `${_constants().COMPONENT_PATTERN_HELP}. By default,
|
|
62
|
+
description: `${_constants().COMPONENT_PATTERN_HELP}. By default, only new and modified components are snapped (add --unmodified to snap all components in the workspace).`
|
|
63
63
|
}]);
|
|
64
64
|
(0, _defineProperty2().default)(this, "helpUrl", 'docs/components/snaps');
|
|
65
65
|
(0, _defineProperty2().default)(this, "alias", '');
|
|
66
|
-
(0, _defineProperty2().default)(this, "options", [['m', 'message <message>', '
|
|
66
|
+
(0, _defineProperty2().default)(this, "options", [['m', 'message <message>', 'snap message describing the latest changes - will appear in component history log'], ['', 'unmodified', 'include unmodified components (by default, only new and modified components are snapped)'], ['', 'unmerged', 'complete a merge process by snapping the unmerged components'], ['b', 'build', 'not needed for now. run the build pipeline locally in case the feature-flag build-on-ci is enabled'], ['', 'editor [editor]', 'open an editor to write a snap message per component. optionally specify the editor-name (defaults to vim).'], ['', 'skip-tests', 'skip running component tests during snap process'], ['', 'skip-auto-snap', 'skip auto snapping dependents'], ['', 'disable-snap-pipeline', 'skip the snap pipeline. this will for instance skip packing and publishing component version for install, and app deployment'], ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'], ['', 'ignore-build-errors', 'proceed to snap pipeline even when build pipeline fails'], ['i', 'ignore-issues [issues]', `ignore component issues (shown in "bit status" as "issues found"), issues to ignore:
|
|
67
67
|
[${Object.keys(_componentIssues().IssuesClasses).join(', ')}]
|
|
68
|
-
to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*".`], ['a', 'all', 'DEPRECATED (not needed anymore,
|
|
68
|
+
to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*".`], ['a', 'all', 'DEPRECATED (not needed anymore, now the default). snap all new and modified components'], ['', 'fail-fast', 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)'], ['f', 'force', 'DEPRECATED (use "--skip-tests" or "--unmodified" instead). force-snap even if tests are failing and even when component has not changed']]);
|
|
69
69
|
(0, _defineProperty2().default)(this, "loader", true);
|
|
70
70
|
(0, _defineProperty2().default)(this, "migration", true);
|
|
71
71
|
}
|
|
@@ -88,14 +88,14 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
88
88
|
build = (0, _featureToggle().isFeatureEnabled)(_featureToggle().BUILD_ON_CI) ? Boolean(build) : true;
|
|
89
89
|
const disableTagAndSnapPipelines = disableSnapPipeline;
|
|
90
90
|
if (all) {
|
|
91
|
-
this.logger.consoleWarning(`--all is deprecated, please omit it.
|
|
91
|
+
this.logger.consoleWarning(`--all is deprecated, please omit it. By default all new and modified components are snapped, to snap all components add --unmodified`);
|
|
92
92
|
}
|
|
93
93
|
if (force) {
|
|
94
|
-
this.logger.consoleWarning(`--force is deprecated, use either --skip-tests or --
|
|
94
|
+
this.logger.consoleWarning(`--force is deprecated, use either --skip-tests or --ignore-build-errors depending on the use case`);
|
|
95
95
|
if (pattern) unmodified = true;
|
|
96
96
|
}
|
|
97
97
|
if (!message && !editor) {
|
|
98
|
-
this.logger.consoleWarning(`--message will be mandatory in the next few releases. make sure to add a message with your snap`);
|
|
98
|
+
this.logger.consoleWarning(`--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`);
|
|
99
99
|
}
|
|
100
100
|
if (forceDeploy) {
|
|
101
101
|
this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);
|
|
@@ -129,7 +129,7 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
129
129
|
const autoTaggedCount = autoSnappedResults ? autoSnappedResults.length : 0;
|
|
130
130
|
const warningsOutput = warnings && warnings.length ? `${_chalk().default.yellow(warnings.join('\n'))}\n\n` : '';
|
|
131
131
|
const snapExplanation = `\n(use "bit export" to push these components to a remote")
|
|
132
|
-
(use "bit reset" to unstage versions)\n`;
|
|
132
|
+
(use "bit reset" to unstage all local versions, or "bit reset --head" to only unstage the latest local snap)\n`;
|
|
133
133
|
const compInBold = id => {
|
|
134
134
|
const version = id.hasVersion() ? `@${id.version}` : '';
|
|
135
135
|
return `${_chalk().default.bold(id.toStringWithoutVersion())}${version}`;
|
package/dist/snap-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_componentIssues","_featureToggle","_constants","_tagCmd","SnapCmd","constructor","snapping","logger","_defineProperty2","default","name","description","COMPONENT_PATTERN_HELP","Object","keys","IssuesClasses","join","report","pattern","message","all","force","unmerged","editor","ignoreIssues","build","skipTests","skipAutoSnap","disableSnapPipeline","forceDeploy","ignoreBuildErrors","unmodified","failFast","isFeatureEnabled","BUILD_ON_CI","Boolean","disableTagAndSnapPipelines","consoleWarning","results","snap","exitOnFirstFailedTask","chalk","yellow","NOTHING_TO_SNAP_MSG","snappedComponents","autoSnappedResults","warnings","newComponents","laneName","removedComponents","changedComponents","filter","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","length","warningsOutput","snapExplanation","compInBold","version","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_SNAPPED_MSG","outputIfExists","label","explanation","components","underline","laneStr","green","outputIdsIfExists","exports"],"sources":["snap-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { isFeatureEnabled, BUILD_ON_CI } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { NOTHING_TO_SNAP_MSG, AUTO_SNAPPED_MSG, COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { Logger } from '@teambit/logger';\nimport { SnappingMain, SnapResults } from './snapping.main.runtime';\nimport { outputIdsIfExists } from './tag-cmd';\nimport { BasicTagSnapParams } from './tag-model-component';\n\nexport class SnapCmd implements Command {\n name = 'snap [component-pattern]';\n description = 'create an immutable and exportable component snapshot (no release version)';\n extendedDescription: string;\n group = 'development';\n arguments = [\n {\n name: 'component-pattern',\n description: `${COMPONENT_PATTERN_HELP}. By default, all new and modified components are snapped.`,\n },\n ];\n helpUrl = 'docs/components/snaps';\n alias = '';\n options = [\n ['m', 'message <message>', 'log message describing the latest changes'],\n ['', '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', 'not needed for now. run the build pipeline in case the feature-flag build-on-ci is enabled'],\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 ['', 'skip-tests', 'skip running component tests during snap process'],\n ['', 'skip-auto-snap', 'skip auto snapping dependents'],\n ['', 'disable-snap-pipeline', 'skip the snap pipeline'],\n ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\n ['', 'ignore-build-errors', 'run the snap pipeline although the build pipeline failed'],\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 ['a', 'all', 'DEPRECATED (not needed anymore, it is the default now). snap all new and modified components'],\n [\n '',\n 'fail-fast',\n 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependent failed)',\n ],\n [\n 'f',\n 'force',\n 'DEPRECATED (use \"--skip-tests\" or \"--unmodified\" instead). force-snap even if tests are failing and even when component has not changed',\n ],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private snapping: SnappingMain, private logger: Logger) {}\n\n async report(\n [pattern]: string[],\n {\n message = '',\n all = false,\n force = false,\n unmerged = false,\n editor = '',\n ignoreIssues,\n build,\n skipTests = false,\n skipAutoSnap = false,\n disableSnapPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n unmodified = false,\n failFast = false,\n }: {\n all?: boolean;\n force?: boolean;\n unmerged?: boolean;\n editor?: string;\n ignoreIssues?: string;\n skipAutoSnap?: boolean;\n disableSnapPipeline?: boolean;\n forceDeploy?: boolean;\n unmodified?: boolean;\n failFast?: boolean;\n } & BasicTagSnapParams\n ) {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n const disableTagAndSnapPipelines = disableSnapPipeline;\n if (all) {\n this.logger.consoleWarning(\n `--all is deprecated, please omit it. \"bit snap\" by default will snap all new and modified components`\n );\n }\n if (force) {\n this.logger.consoleWarning(\n `--force is deprecated, use either --skip-tests or --unmodified depending on the use case`\n );\n if (pattern) unmodified = true;\n }\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`\n );\n }\n if (forceDeploy) {\n this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);\n ignoreBuildErrors = true;\n }\n\n const results = await this.snapping.snap({\n pattern,\n message,\n unmerged,\n editor,\n ignoreIssues,\n build,\n skipTests,\n skipAutoSnap,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n unmodified,\n exitOnFirstFailedTask: failFast,\n });\n\n if (!results) return chalk.yellow(NOTHING_TO_SNAP_MSG);\n const { snappedComponents, autoSnappedResults, warnings, newComponents, laneName, removedComponents }: SnapResults =\n results;\n const changedComponents = snappedComponents.filter(\n (component) => !newComponents.searchWithoutVersion(component.id)\n );\n const addedComponents = snappedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoSnappedResults ? autoSnappedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const snapExplanation = `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset\" to unstage versions)\\n`;\n\n const compInBold = (id: BitId) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoSnappedResults.filter((result) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_SNAPPED_MSG} (${autoTagComp.length} total):\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const outputIfExists = (label, explanation, components) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n const laneStr = laneName ? ` on \"${laneName}\" lane` : '';\n\n return (\n warningsOutput +\n chalk.green(`${snappedComponents.length + autoTaggedCount} component(s) snapped${laneStr}`) +\n snapExplanation +\n outputIfExists('new components', 'first version for components', addedComponents) +\n outputIfExists('changed components', 'components that got a version bump', changedComponents) +\n outputIdsIfExists('removed components', removedComponents)\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,iBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,gBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,eAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,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AAgB,CAACc,UAAU,CAAE,IAAG;IAC3F,CAAC;IACD,MAAME,OAAO,GAAGjC,QAAQ,GAAI,QAAOA,QAAS,QAAO,GAAG,EAAE;IAExD,OACEU,cAAc,GACdjB,gBAAK,CAACyC,KAAK,CAAE,GAAEtC,iBAAiB,CAACa,MAAM,GAAGD,eAAgB,wBAAuByB,OAAQ,EAAC,CAAC,GAC3FtB,eAAe,GACfiB,cAAc,CAAC,gBAAgB,EAAE,8BAA8B,EAAErB,eAAe,CAAC,GACjFqB,cAAc,CAAC,oBAAoB,EAAE,oCAAoC,EAAE1B,iBAAiB,CAAC,GAC7F,IAAAiC,2BAAiB,EAAC,oBAAoB,EAAElC,iBAAiB,CAAC;EAE9D;AACF;AAACmC,OAAA,CAAAhF,OAAA,GAAAA,OAAA"}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_componentIssues","_featureToggle","_constants","_tagCmd","SnapCmd","constructor","snapping","logger","_defineProperty2","default","name","description","COMPONENT_PATTERN_HELP","Object","keys","IssuesClasses","join","report","pattern","message","all","force","unmerged","editor","ignoreIssues","build","skipTests","skipAutoSnap","disableSnapPipeline","forceDeploy","ignoreBuildErrors","unmodified","failFast","isFeatureEnabled","BUILD_ON_CI","Boolean","disableTagAndSnapPipelines","consoleWarning","results","snap","exitOnFirstFailedTask","chalk","yellow","NOTHING_TO_SNAP_MSG","snappedComponents","autoSnappedResults","warnings","newComponents","laneName","removedComponents","changedComponents","filter","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","length","warningsOutput","snapExplanation","compInBold","version","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_SNAPPED_MSG","outputIfExists","label","explanation","components","underline","laneStr","green","outputIdsIfExists","exports"],"sources":["snap-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { isFeatureEnabled, BUILD_ON_CI } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { NOTHING_TO_SNAP_MSG, AUTO_SNAPPED_MSG, COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { Logger } from '@teambit/logger';\nimport { SnappingMain, SnapResults } from './snapping.main.runtime';\nimport { outputIdsIfExists } from './tag-cmd';\nimport { BasicTagSnapParams } from './tag-model-component';\n\nexport class SnapCmd implements Command {\n name = 'snap [component-pattern]';\n description = 'create an immutable and exportable component snapshot (non-release version)';\n extendedDescription: string;\n group = 'development';\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 = 'docs/components/snaps';\n alias = '';\n options = [\n ['m', 'message <message>', 'snap message describing the latest changes - will appear in component history log'],\n ['', '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 [\n 'b',\n 'build',\n 'not needed for now. run the build pipeline locally in case the feature-flag build-on-ci is enabled',\n ],\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 ['', '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 ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\n ['', 'ignore-build-errors', 'proceed to snap pipeline even when build pipeline fails'],\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 ['a', 'all', 'DEPRECATED (not needed anymore, now the default). snap all new and modified components'],\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 'f',\n 'force',\n 'DEPRECATED (use \"--skip-tests\" or \"--unmodified\" instead). force-snap even if tests are failing and even when component has not changed',\n ],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private snapping: SnappingMain, private logger: Logger) {}\n\n async report(\n [pattern]: string[],\n {\n message = '',\n all = false,\n force = false,\n unmerged = false,\n editor = '',\n ignoreIssues,\n build,\n skipTests = false,\n skipAutoSnap = false,\n disableSnapPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n unmodified = false,\n failFast = false,\n }: {\n all?: boolean;\n force?: boolean;\n unmerged?: boolean;\n editor?: string;\n ignoreIssues?: string;\n skipAutoSnap?: boolean;\n disableSnapPipeline?: boolean;\n forceDeploy?: boolean;\n unmodified?: boolean;\n failFast?: boolean;\n } & BasicTagSnapParams\n ) {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n const disableTagAndSnapPipelines = disableSnapPipeline;\n if (all) {\n this.logger.consoleWarning(\n `--all is deprecated, please omit it. By default all new and modified components are snapped, to snap all components add --unmodified`\n );\n }\n if (force) {\n this.logger.consoleWarning(\n `--force is deprecated, use either --skip-tests or --ignore-build-errors depending on the use case`\n );\n if (pattern) unmodified = true;\n }\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 if (forceDeploy) {\n this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);\n ignoreBuildErrors = true;\n }\n\n const results = await this.snapping.snap({\n pattern,\n message,\n unmerged,\n editor,\n ignoreIssues,\n build,\n skipTests,\n skipAutoSnap,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n unmodified,\n exitOnFirstFailedTask: failFast,\n });\n\n if (!results) return chalk.yellow(NOTHING_TO_SNAP_MSG);\n const { snappedComponents, autoSnappedResults, warnings, newComponents, laneName, removedComponents }: SnapResults =\n results;\n const changedComponents = snappedComponents.filter(\n (component) => !newComponents.searchWithoutVersion(component.id)\n );\n const addedComponents = snappedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoSnappedResults ? autoSnappedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const snapExplanation = `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset\" to unstage all local versions, or \"bit reset --head\" to only unstage the latest local snap)\\n`;\n\n const compInBold = (id: BitId) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoSnappedResults.filter((result) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_SNAPPED_MSG} (${autoTagComp.length} total):\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const outputIfExists = (label, explanation, components) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n const laneStr = laneName ? ` on \"${laneName}\" lane` : '';\n\n return (\n warningsOutput +\n chalk.green(`${snappedComponents.length + autoTaggedCount} component(s) snapped${laneStr}`) +\n snapExplanation +\n outputIfExists('new components', 'first version for components', addedComponents) +\n outputIfExists('changed components', 'components that got a version bump', changedComponents) +\n outputIdsIfExists('removed components', removedComponents)\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,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ACxB,CAAC,CAAC,CACDpD,IAAI,CAAC,IAAI,CAAC;IACf,CAAC;IAED,MAAM4D,cAAc,GAAGA,CAACC,KAAK,EAAEC,WAAW,EAAEC,UAAU,KAAK;MACzD,IAAI,CAACA,UAAU,CAACtB,MAAM,EAAE,OAAO,EAAE;MACjC,OAAQ,KAAIhB,gBAAK,CAACuC,SAAS,CAACH,KAAK,CAAE,MAAKC,WAAY,MAAKb,gBAAgB,CAACc,UAAU,CAAE,IAAG;IAC3F,CAAC;IACD,MAAME,OAAO,GAAGjC,QAAQ,GAAI,QAAOA,QAAS,QAAO,GAAG,EAAE;IAExD,OACEU,cAAc,GACdjB,gBAAK,CAACyC,KAAK,CAAE,GAAEtC,iBAAiB,CAACa,MAAM,GAAGD,eAAgB,wBAAuByB,OAAQ,EAAC,CAAC,GAC3FtB,eAAe,GACfiB,cAAc,CAAC,gBAAgB,EAAE,8BAA8B,EAAErB,eAAe,CAAC,GACjFqB,cAAc,CAAC,oBAAoB,EAAE,oCAAoC,EAAE1B,iBAAiB,CAAC,GAC7F,IAAAiC,2BAAiB,EAAC,oBAAoB,EAAElC,iBAAiB,CAAC;EAE9D;AACF;AAACmC,OAAA,CAAAhF,OAAA,GAAAA,OAAA"}
|
package/dist/tag-cmd.js
CHANGED
|
@@ -69,14 +69,14 @@ class TagCmd {
|
|
|
69
69
|
if patterns are entered, you can specify a version per pattern using "@" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major`);
|
|
70
70
|
(0, _defineProperty2().default)(this, "arguments", [{
|
|
71
71
|
name: 'component-patterns...',
|
|
72
|
-
description:
|
|
72
|
+
description: `${_constants().COMPONENT_PATTERN_HELP}. By default, all new and modified are tagged.`
|
|
73
73
|
}]);
|
|
74
|
-
(0, _defineProperty2().default)(this, "helpUrl", '
|
|
74
|
+
(0, _defineProperty2().default)(this, "helpUrl", 'https://bit.dev/reference/components/snaps#create-a-tag-(release-version)');
|
|
75
75
|
(0, _defineProperty2().default)(this, "alias", 't');
|
|
76
76
|
(0, _defineProperty2().default)(this, "loader", true);
|
|
77
|
-
(0, _defineProperty2().default)(this, "options", [['m', 'message <message>', 'a log message describing latest changes'], ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'], ['', 'editor [editor]', 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).'], ['v', 'ver <version>', 'tag with the given version'], ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`], ['', 'prerelease-id <id>', 'prerelease identifier (e.g. "dev" to get "1.0.0-dev.1")'], ['p', 'patch', 'syntactic sugar for "--increment patch"'], ['', 'minor', 'syntactic sugar for "--increment minor"'], ['', 'major', 'syntactic sugar for "--increment major"'], ['', 'pre-release [identifier]', 'syntactic sugar for "--increment prerelease" and `--prerelease-id <identifier>`'], ['', 'snapped', 'tag components
|
|
77
|
+
(0, _defineProperty2().default)(this, "options", [['m', 'message <message>', 'a log message describing latest changes'], ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'], ['', 'editor [editor]', 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).'], ['v', 'ver <version>', 'tag with the given version'], ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`], ['', 'prerelease-id <id>', 'prerelease identifier (e.g. "dev" to get "1.0.0-dev.1")'], ['p', 'patch', 'syntactic sugar for "--increment patch"'], ['', 'minor', 'syntactic sugar for "--increment minor"'], ['', 'major', 'syntactic sugar for "--increment major"'], ['', 'pre-release [identifier]', 'syntactic sugar for "--increment prerelease" and `--prerelease-id <identifier>`'], ['', 'snapped', 'tag only components whose head is a snap (not a tag)'], ['', 'unmerged', 'complete a merge process by tagging the unmerged components'], ['', 'skip-tests', 'skip running component tests during tag process'], ['', 'skip-auto-tag', 'skip auto tagging dependents'], ['', 'soft', 'do not persist. only keep note of the changes to be made'], ['', 'persist', 'persist the changes generated by --soft tag'], ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'], ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'], ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'], ['', 'increment-by <number>', '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.'], ['i', 'ignore-issues [issues]', `ignore component issues (shown in "bit status" as "issues found"), issues to ignore:
|
|
78
78
|
[${Object.keys(_componentIssues().IssuesClasses).join(', ')}]
|
|
79
|
-
to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*".`], ['I', 'ignore-newest-version', '
|
|
79
|
+
to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*".`], ['I', 'ignore-newest-version', 'allow tagging even when the component has newer versions e.g. for hotfixes (default = false)'], ['', 'fail-fast', 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)'], ['b', 'build', 'not needed for now. run the pipeline build and complete the tag'], ['a', 'all [version]', 'DEPRECATED (not needed anymore, it is the default now). tag all new and modified components'], ['s', 'scope [version]', 'DEPRECATED (use "--unmodified" instead). tag all components of the local scope'], ['f', 'force', 'DEPRECATED (use "--skip-tests", "--ignore-build-errors" or "--unmodified" instead). force-tag even if tests are failing and even when component has not changed'], ['', 'disable-deploy-pipeline', 'DEPRECATED. use --disable-tag-pipeline instead']]);
|
|
80
80
|
(0, _defineProperty2().default)(this, "migration", true);
|
|
81
81
|
(0, _defineProperty2().default)(this, "remoteOp", true);
|
|
82
82
|
// In case a compiler / tester is not installed
|
|
@@ -131,7 +131,7 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
131
131
|
this.logger.consoleWarning(`--message will be mandatory in the next few releases. make sure to add a message with your tag`);
|
|
132
132
|
}
|
|
133
133
|
if (all) {
|
|
134
|
-
this.logger.consoleWarning(`--all is deprecated, please omit it. "bit tag" by default
|
|
134
|
+
this.logger.consoleWarning(`--all is deprecated, please omit it. "bit tag" will by default tag all new and modified components`);
|
|
135
135
|
if (typeof all === 'string') {
|
|
136
136
|
ver = all;
|
|
137
137
|
}
|
|
@@ -144,7 +144,7 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
if (force) {
|
|
147
|
-
this.logger.consoleWarning(`--force is deprecated, use either --skip-tests or --unmodified depending on the use case`);
|
|
147
|
+
this.logger.consoleWarning(`--force is deprecated, use either --skip-tests, --ignore-build-errors or --unmodified depending on the use case`);
|
|
148
148
|
if (patterns.length) unmodified = true;
|
|
149
149
|
}
|
|
150
150
|
if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {
|
|
@@ -218,9 +218,9 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
218
218
|
const addedComponents = taggedComponents.filter(component => newComponents.searchWithoutVersion(component.id));
|
|
219
219
|
const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;
|
|
220
220
|
const warningsOutput = warnings && warnings.length ? `${_chalk().default.yellow(warnings.join('\n'))}\n\n` : '';
|
|
221
|
-
const tagExplanationPersist = `\n(use "bit export
|
|
221
|
+
const tagExplanationPersist = `\n(use "bit export" to push these components to a remote")
|
|
222
222
|
(use "bit reset" to unstage versions)\n`;
|
|
223
|
-
const tagExplanationSoft = `\n(use "bit tag --persist" to persist the changes")
|
|
223
|
+
const tagExplanationSoft = `\n(use "bit tag --persist" to persist the soft-tagged changes as a fully tagged version")
|
|
224
224
|
(use "bit reset --soft" to remove the soft-tags)\n`;
|
|
225
225
|
const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;
|
|
226
226
|
const compInBold = id => {
|
|
@@ -254,8 +254,8 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
254
254
|
if (!components.length) return '';
|
|
255
255
|
return `\n${_chalk().default.underline(softTagPrefix + label)}\n(${explanation})\n${outputComponents(components)}\n`;
|
|
256
256
|
};
|
|
257
|
-
const newDesc = results.isSoftTag ? 'set to be tagged first version for components' : 'first version for components';
|
|
258
|
-
const changedDesc = results.isSoftTag ? 'components that set to get a version bump' : 'components that got a version bump';
|
|
257
|
+
const newDesc = results.isSoftTag ? 'set to be tagged with first version for components when persisted' : 'first version for components';
|
|
258
|
+
const changedDesc = results.isSoftTag ? 'components that are set to get a version bump when persisted' : 'components that got a version bump';
|
|
259
259
|
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') : '';
|
|
260
260
|
return warningsOutput + _chalk().default.green(`${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`) + tagExplanation + outputIfExists('new components', newDesc, addedComponents) + outputIfExists('changed components', changedDesc, changedComponents) + outputIdsIfExists('removed components', removedComponents) + publishOutput() + softTagClarification;
|
|
261
261
|
}
|
package/dist/tag-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_featureToggle","_tag","_constants","_componentIssues","_bitError","RELEASE_TYPES","TagCmd","constructor","snapping","logger","_defineProperty2","default","name","description","join","Object","keys","IssuesClasses","cmd","report","patterns","message","ver","all","editor","snapped","unmerged","patch","minor","major","preRelease","increment","prereleaseId","force","ignoreUnresolvedDependencies","ignoreIssues","ignoreNewestVersion","skipTests","skipAutoTag","scope","unmodified","build","soft","persist","disableDeployPipeline","disableTagPipeline","forceDeploy","ignoreBuildErrors","failFast","incrementBy","BitError","consoleWarning","length","releaseFlags","filter","x","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","disableTagAndSnapPipelines","isFeatureEnabled","BUILD_ON_CI","Boolean","params","ids","releaseType","preReleaseId","version","results","tag","chalk","yellow","NOTHING_TO_TAG_MSG","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","compInBold","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_TAGGED_MSG","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","softTagPrefix","outputIfExists","label","explanation","components","underline","newDesc","changedDesc","softTagClarification","outputIdsIfExists","exports"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { isFeatureEnabled, BUILD_ON_CI } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { NOTHING_TO_TAG_MSG, AUTO_TAGGED_MSG } from '@teambit/legacy/dist/api/consumer/lib/tag';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { DEFAULT_BIT_RELEASE_TYPE } from '@teambit/legacy/dist/constants';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger } from '@teambit/logger';\nimport { TagResults, SnappingMain } from './snapping.main.runtime';\nimport { BasicTagParams } from './tag-model-component';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport class TagCmd implements Command {\n name = 'tag [component-patterns...]';\n group = 'development';\n description = 'create an immutable and exportable component snapshot, tagged with a release version.';\n extendedDescription = `if no patterns are provided, it will tag all new and modified components.\nif patterns are entered, you can specify a version per pattern using \"@\" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major`;\n arguments = [\n {\n name: 'component-patterns...',\n description:\n 'a list of component names, IDs or patterns (separated by space). run \"bit pattern --help\" to get more data about patterns. By default, all modified are tagged.',\n },\n ];\n helpUrl = 'docs/components/snaps';\n alias = 't';\n loader = true;\n options = [\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 ['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 components that their 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 ['', 'skip-auto-tag', 'skip auto tagging dependents'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n ['', 'persist', 'persist the changes generated by --soft tag'],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\n ['', 'ignore-build-errors', 'run the tag pipeline although the build pipeline failed'],\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', 'ignore existing of newer versions (default = false)'],\n [\n '',\n 'fail-fast',\n 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependent failed)',\n ],\n ['b', 'build', 'not needed for now. run the pipeline build and complete the tag'],\n [\n 'a',\n 'all [version]',\n 'DEPRECATED (not needed anymore, it is the default now). tag all new and modified components',\n ],\n ['s', 'scope [version]', 'DEPRECATED (use \"--unmodified\" instead). tag all components of the current scope'],\n [\n 'f',\n 'force',\n 'DEPRECATED (use \"--skip-tests\" or \"--unmodified\" instead). force-tag even if tests are failing and even when component has not changed',\n ],\n ['', 'disable-deploy-pipeline', 'DEPRECATED. use --disable-tag-pipeline instead'],\n ] as CommandOptions;\n migration = true;\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(private snapping: SnappingMain, private logger: Logger) {}\n\n // eslint-disable-next-line complexity\n async report(\n [patterns = []]: [string[]],\n {\n message = '',\n ver,\n all = false,\n editor = '',\n snapped = false,\n unmerged = false,\n patch,\n minor,\n major,\n preRelease,\n increment,\n prereleaseId,\n force = false,\n ignoreUnresolvedDependencies,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipAutoTag = false,\n scope,\n unmodified = false,\n build,\n soft = false,\n persist = false,\n disableDeployPipeline = false,\n disableTagPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n failFast = false,\n incrementBy = 1,\n }: {\n all?: boolean | string;\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n force?: boolean;\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 scope?: string | boolean;\n incrementBy?: number;\n disableDeployPipeline?: boolean;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n forceDeploy?: boolean;\n } & Partial<BasicTagParams>\n ): Promise<string> {\n if (typeof ignoreUnresolvedDependencies === 'boolean') {\n throw new BitError(`--ignore-unresolved-dependencies has been removed, please use --ignore-issues instead`);\n }\n if (ignoreIssues && typeof ignoreIssues === 'boolean') {\n throw new BitError(`--ignore-issues expects issues to be ignored, please run \"bit tag -h\" for the issues list`);\n }\n if (disableDeployPipeline) {\n this.logger.consoleWarning(`--disable-deploy-pipeline is deprecated, please use --disable-tag-pipeline instead`);\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 if (all) {\n this.logger.consoleWarning(\n `--all is deprecated, please omit it. \"bit tag\" by default will tag all new and modified components. to specify a version, use --ver flag`\n );\n if (typeof all === 'string') {\n ver = all;\n }\n }\n if (scope) {\n this.logger.consoleWarning(`--scope is deprecated, use --unmodified instead`);\n unmodified = true;\n if (typeof scope === 'string') {\n ver = scope;\n }\n }\n if (force) {\n this.logger.consoleWarning(\n `--force is deprecated, use either --skip-tests or --unmodified depending on the use case`\n );\n if (patterns.length) unmodified = true;\n }\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 if (forceDeploy) {\n this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);\n ignoreBuildErrors = true;\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}\".\n semver 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 const disableTagAndSnapPipelines = disableTagPipeline || disableDeployPipeline;\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n\n const params = {\n ids: patterns,\n snapped,\n unmerged,\n editor,\n message,\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n incrementBy,\n version: ver,\n failFast,\n };\n\n const results = await this.snapping.tag(params);\n if (!results) return chalk.yellow(NOTHING_TO_TAG_MSG);\n const { taggedComponents, autoTaggedResults, warnings, newComponents, removedComponents }: 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\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const tagExplanationPersist = `\\n(use \"bit export [collection]\" to push these components to a remote\")\n(use \"bit reset\" to unstage versions)\\n`;\n const tagExplanationSoft = `\\n(use \"bit tag --persist\" to persist the changes\")\n(use \"bit reset --soft\" to remove the soft-tags)\\n`;\n\n const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;\n\n const compInBold = (id: BitId) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoTaggedResults.filter((result) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_TAGGED_MSG}:\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const publishOutput = () => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const successTitle = `\\n\\n${chalk.green(\n `published the following ${publishedPackages.length} component(s) successfully\\n`\n )}`;\n const successCompsStr = publishedPackages.join('\\n');\n const successOutput = successCompsStr ? successTitle + successCompsStr : '';\n return successOutput;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label, explanation, components: ConsumerComponent[]) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(softTagPrefix + label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n\n const newDesc = results.isSoftTag\n ? 'set to be tagged first version for components'\n : 'first version for components';\n const changedDesc = results.isSoftTag\n ? 'components that set to get a version bump'\n : 'components that got a version bump';\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 return (\n warningsOutput +\n chalk.green(\n `${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`\n ) +\n tagExplanation +\n outputIfExists('new components', newDesc, addedComponents) +\n outputIfExists('changed components', changedDesc, changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n publishOutput() +\n softTagClarification\n );\n }\n}\n\nexport function outputIdsIfExists(label: string, ids?: BitIds) {\n if (!ids?.length) return '';\n return `\\n${chalk.underline(label)}\\n${ids.map((id) => id.toStringWithoutVersion()).join('\\n')}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,eAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,cAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,O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D,GAAG,CAAC+B,GAAG,CAAEd,EAAE,IAAKA,EAAE,CAACW,sBAAsB,CAAC,CAAC,CAAC,CAAChF,IAAI,CAAC,IAAI,CAAE,IAAG;AACpG"}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_featureToggle","_tag","_constants","_componentIssues","_bitError","RELEASE_TYPES","TagCmd","constructor","snapping","logger","_defineProperty2","default","name","description","COMPONENT_PATTERN_HELP","join","Object","keys","IssuesClasses","cmd","report","patterns","message","ver","all","editor","snapped","unmerged","patch","minor","major","preRelease","increment","prereleaseId","force","ignoreUnresolvedDependencies","ignoreIssues","ignoreNewestVersion","skipTests","skipAutoTag","scope","unmodified","build","soft","persist","disableDeployPipeline","disableTagPipeline","forceDeploy","ignoreBuildErrors","failFast","incrementBy","BitError","consoleWarning","length","releaseFlags","filter","x","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","disableTagAndSnapPipelines","isFeatureEnabled","BUILD_ON_CI","Boolean","params","ids","releaseType","preReleaseId","version","results","tag","chalk","yellow","NOTHING_TO_TAG_MSG","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","compInBold","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_TAGGED_MSG","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","softTagPrefix","outputIfExists","label","explanation","components","underline","newDesc","changedDesc","softTagClarification","outputIdsIfExists","exports"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { isFeatureEnabled, BUILD_ON_CI } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { NOTHING_TO_TAG_MSG, AUTO_TAGGED_MSG } from '@teambit/legacy/dist/api/consumer/lib/tag';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { DEFAULT_BIT_RELEASE_TYPE, COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger } from '@teambit/logger';\nimport { TagResults, SnappingMain } from './snapping.main.runtime';\nimport { BasicTagParams } from './tag-model-component';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport class TagCmd implements Command {\n name = 'tag [component-patterns...]';\n group = 'development';\n description = 'create an immutable and exportable component snapshot, tagged with a release version.';\n extendedDescription = `if no patterns are provided, it will tag all new and modified components.\nif patterns are entered, you can specify a version per pattern using \"@\" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major`;\n arguments = [\n {\n name: 'component-patterns...',\n description: `${COMPONENT_PATTERN_HELP}. By default, all new and modified are tagged.`,\n },\n ];\n helpUrl = 'https://bit.dev/reference/components/snaps#create-a-tag-(release-version)';\n alias = 't';\n loader = true;\n options = [\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 ['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 ['', 'skip-auto-tag', 'skip auto tagging dependents'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n ['', 'persist', 'persist the changes generated by --soft tag'],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\n ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'],\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 [\n 'I',\n 'ignore-newest-version',\n 'allow tagging even when the component has newer versions e.g. for hotfixes (default = false)',\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 ['b', 'build', 'not needed for now. run the pipeline build and complete the tag'],\n [\n 'a',\n 'all [version]',\n 'DEPRECATED (not needed anymore, it is the default now). tag all new and modified components',\n ],\n ['s', 'scope [version]', 'DEPRECATED (use \"--unmodified\" instead). tag all components of the local scope'],\n [\n 'f',\n 'force',\n 'DEPRECATED (use \"--skip-tests\", \"--ignore-build-errors\" or \"--unmodified\" instead). force-tag even if tests are failing and even when component has not changed',\n ],\n ['', 'disable-deploy-pipeline', 'DEPRECATED. use --disable-tag-pipeline instead'],\n ] as CommandOptions;\n migration = true;\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(private snapping: SnappingMain, private logger: Logger) {}\n\n // eslint-disable-next-line complexity\n async report(\n [patterns = []]: [string[]],\n {\n message = '',\n ver,\n all = false,\n editor = '',\n snapped = false,\n unmerged = false,\n patch,\n minor,\n major,\n preRelease,\n increment,\n prereleaseId,\n force = false,\n ignoreUnresolvedDependencies,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipAutoTag = false,\n scope,\n unmodified = false,\n build,\n soft = false,\n persist = false,\n disableDeployPipeline = false,\n disableTagPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n failFast = false,\n incrementBy = 1,\n }: {\n all?: boolean | string;\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n force?: boolean;\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 scope?: string | boolean;\n incrementBy?: number;\n disableDeployPipeline?: boolean;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n forceDeploy?: boolean;\n } & Partial<BasicTagParams>\n ): Promise<string> {\n if (typeof ignoreUnresolvedDependencies === 'boolean') {\n throw new BitError(`--ignore-unresolved-dependencies has been removed, please use --ignore-issues instead`);\n }\n if (ignoreIssues && typeof ignoreIssues === 'boolean') {\n throw new BitError(`--ignore-issues expects issues to be ignored, please run \"bit tag -h\" for the issues list`);\n }\n if (disableDeployPipeline) {\n this.logger.consoleWarning(`--disable-deploy-pipeline is deprecated, please use --disable-tag-pipeline instead`);\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 if (all) {\n this.logger.consoleWarning(\n `--all is deprecated, please omit it. \"bit tag\" will by default tag all new and modified components`\n );\n if (typeof all === 'string') {\n ver = all;\n }\n }\n if (scope) {\n this.logger.consoleWarning(`--scope is deprecated, use --unmodified instead`);\n unmodified = true;\n if (typeof scope === 'string') {\n ver = scope;\n }\n }\n if (force) {\n this.logger.consoleWarning(\n `--force is deprecated, use either --skip-tests, --ignore-build-errors or --unmodified depending on the use case`\n );\n if (patterns.length) unmodified = true;\n }\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 if (forceDeploy) {\n this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);\n ignoreBuildErrors = true;\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}\".\n semver 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 const disableTagAndSnapPipelines = disableTagPipeline || disableDeployPipeline;\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n\n const params = {\n ids: patterns,\n snapped,\n unmerged,\n editor,\n message,\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n incrementBy,\n version: ver,\n failFast,\n };\n\n const results = await this.snapping.tag(params);\n if (!results) return chalk.yellow(NOTHING_TO_TAG_MSG);\n const { taggedComponents, autoTaggedResults, warnings, newComponents, removedComponents }: 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\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const tagExplanationPersist = `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset\" to unstage versions)\\n`;\n const tagExplanationSoft = `\\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\n const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;\n\n const compInBold = (id: BitId) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoTaggedResults.filter((result) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_TAGGED_MSG}:\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const publishOutput = () => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const successTitle = `\\n\\n${chalk.green(\n `published the following ${publishedPackages.length} component(s) successfully\\n`\n )}`;\n const successCompsStr = publishedPackages.join('\\n');\n const successOutput = successCompsStr ? successTitle + successCompsStr : '';\n return successOutput;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label, explanation, components: ConsumerComponent[]) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(softTagPrefix + label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n\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 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 return (\n warningsOutput +\n chalk.green(\n `${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`\n ) +\n tagExplanation +\n outputIfExists('new components', newDesc, addedComponents) +\n outputIfExists('changed components', changedDesc, changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n publishOutput() +\n softTagClarification\n );\n }\n}\n\nexport function outputIdsIfExists(label: string, ids?: BitIds) {\n if (!ids?.length) return '';\n return `\\n${chalk.underline(label)}\\n${ids.map((id) => id.toStringWithoutVersion()).join('\\n')}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,eAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,cAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,iBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,gBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAA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AAG;IAC3G,CAAC;IAED,MAAME,OAAO,GAAGhD,OAAO,CAACoB,SAAS,GAC7B,mEAAmE,GACnE,8BAA8B;IAClC,MAAM6B,WAAW,GAAGjD,OAAO,CAACoB,SAAS,GACjC,8DAA8D,GAC9D,oCAAoC;IACxC,MAAM8B,oBAAoB,GAAGlD,OAAO,CAACoB,SAAS,GAC1ClB,gBAAK,CAACqB,IAAI,CACR,iHACF,CAAC,GACD,EAAE;IACN,OACEP,cAAc,GACdd,gBAAK,CAACqC,KAAK,CACR,GAAElC,gBAAgB,CAACvB,MAAM,GAAGiC,eAAgB,iBAAgBf,OAAO,CAACoB,SAAS,GAAG,OAAO,GAAG,EAAG,QAChG,CAAC,GACDD,cAAc,GACdwB,cAAc,CAAC,gBAAgB,EAAEK,OAAO,EAAElC,eAAe,CAAC,GAC1D6B,cAAc,CAAC,oBAAoB,EAAEM,WAAW,EAAEvC,iBAAiB,CAAC,GACpEyC,iBAAiB,CAAC,oBAAoB,EAAE1C,iBAAiB,CAAC,GAC1D2B,aAAa,CAAC,CAAC,GACfc,oBAAoB;EAExB;AACF;AAACE,OAAA,CAAArH,MAAA,GAAAA,MAAA;AAEM,SAASoH,iBAAiBA,CAACP,KAAa,EAAEhD,GAAY,EAAE;EAC7D,IAAI,EAACA,GAAG,aAAHA,GAAG,eAAHA,GAAG,CAAEd,MAAM,GAAE,OAAO,EAAE;EAC3B,OAAQ,KAAIoB,gBAAK,CAAC6C,SAAS,CAACH,KAAK,CAAE,KAAIhD,GAAG,CAAC+B,GAAG,CAAEd,EAAE,IAAKA,EAAE,CAACW,sBAAsB,CAAC,CAAC,CAAC,CAAChF,IAAI,CAAC,IAAI,CAAE,IAAG;AACpG"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/snapping",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.450",
|
|
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": "0.0.
|
|
9
|
+
"version": "0.0.450"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -24,21 +24,21 @@
|
|
|
24
24
|
"@teambit/component-id": "0.0.427",
|
|
25
25
|
"@teambit/graph.cleargraph": "0.0.1",
|
|
26
26
|
"@teambit/bit-error": "0.0.402",
|
|
27
|
-
"@teambit/issues": "0.0.
|
|
28
|
-
"@teambit/cli": "0.0.
|
|
27
|
+
"@teambit/issues": "0.0.443",
|
|
28
|
+
"@teambit/cli": "0.0.761",
|
|
29
29
|
"@teambit/component-issues": "0.0.95",
|
|
30
|
-
"@teambit/logger": "0.0.
|
|
31
|
-
"@teambit/builder": "0.0.
|
|
30
|
+
"@teambit/logger": "0.0.854",
|
|
31
|
+
"@teambit/builder": "0.0.1135",
|
|
32
32
|
"@teambit/component-version": "1.0.0",
|
|
33
|
-
"@teambit/component": "0.0.
|
|
34
|
-
"@teambit/dependency-resolver": "0.0.
|
|
35
|
-
"@teambit/export": "0.0.
|
|
36
|
-
"@teambit/importer": "0.0.
|
|
37
|
-
"@teambit/insights": "0.0.
|
|
38
|
-
"@teambit/lane-id": "0.0.
|
|
39
|
-
"@teambit/scope": "0.0.
|
|
40
|
-
"@teambit/workspace": "0.0.
|
|
41
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
|
33
|
+
"@teambit/component": "0.0.1135",
|
|
34
|
+
"@teambit/dependency-resolver": "0.0.1135",
|
|
35
|
+
"@teambit/export": "0.0.1135",
|
|
36
|
+
"@teambit/importer": "0.0.564",
|
|
37
|
+
"@teambit/insights": "0.0.1135",
|
|
38
|
+
"@teambit/lane-id": "0.0.276",
|
|
39
|
+
"@teambit/scope": "0.0.1135",
|
|
40
|
+
"@teambit/workspace": "0.0.1135",
|
|
41
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.103"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/lodash": "4.14.165",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"@types/react-dom": "^17.0.5",
|
|
54
54
|
"@types/jest": "^26.0.0",
|
|
55
55
|
"@types/testing-library__jest-dom": "5.9.5",
|
|
56
|
-
"@teambit/compiler": "0.0.
|
|
57
|
-
"@teambit/component.testing.mock-components": "0.0.
|
|
58
|
-
"@teambit/harmony.testing.load-aspect": "0.0.
|
|
56
|
+
"@teambit/compiler": "0.0.1135",
|
|
57
|
+
"@teambit/component.testing.mock-components": "0.0.123",
|
|
58
|
+
"@teambit/harmony.testing.load-aspect": "0.0.122",
|
|
59
59
|
"@teambit/workspace.testing.mock-workspace": "0.0.14"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@teambit/legacy": "1.0.
|
|
62
|
+
"@teambit/legacy": "1.0.545",
|
|
63
63
|
"react": "^16.8.0 || ^17.0.0",
|
|
64
64
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
65
65
|
},
|
|
Binary file
|
|
File without changes
|