@teambit/snapping 1.0.395 → 1.0.397
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/artifacts/__bit_junit.xml +8 -8
- package/artifacts/schema.json +734 -694
- package/dist/snap-from-scope.cmd.d.ts +1 -2
- package/dist/snap-from-scope.cmd.js +1 -5
- package/dist/snap-from-scope.cmd.js.map +1 -1
- package/dist/snapping.main.runtime.d.ts +1 -0
- package/dist/snapping.main.runtime.js +9 -5
- package/dist/snapping.main.runtime.js.map +1 -1
- package/dist/tag-cmd.d.ts +24 -18
- package/dist/tag-cmd.js +142 -119
- package/dist/tag-cmd.js.map +1 -1
- package/dist/tag-from-scope.cmd.d.ts +3 -14
- package/dist/tag-from-scope.cmd.js +25 -125
- package/dist/tag-from-scope.cmd.js.map +1 -1
- package/package.json +26 -26
- /package/dist/{preview-1725160825823.js → preview-1725333555400.js} +0 -0
package/dist/tag-cmd.d.ts
CHANGED
|
@@ -3,10 +3,27 @@ import { Command, CommandOptions } from '@teambit/cli';
|
|
|
3
3
|
import { GlobalConfigMain } from '@teambit/global-config';
|
|
4
4
|
import { ReleaseType } from 'semver';
|
|
5
5
|
import { Logger } from '@teambit/logger';
|
|
6
|
-
import { SnappingMain } from './snapping.main.runtime';
|
|
6
|
+
import { TagResults, SnappingMain } from './snapping.main.runtime';
|
|
7
7
|
import { BasicTagParams } from './tag-model-component';
|
|
8
8
|
export declare const NOTHING_TO_TAG_MSG = "nothing to tag";
|
|
9
9
|
export declare const AUTO_TAGGED_MSG = "auto-tagged dependents";
|
|
10
|
+
export declare const tagCmdOptions: CommandOptions;
|
|
11
|
+
export type TagParams = {
|
|
12
|
+
snapped?: boolean;
|
|
13
|
+
unmerged?: boolean;
|
|
14
|
+
ver?: string;
|
|
15
|
+
patch?: boolean;
|
|
16
|
+
minor?: boolean;
|
|
17
|
+
major?: boolean;
|
|
18
|
+
increment?: ReleaseType;
|
|
19
|
+
preRelease?: string;
|
|
20
|
+
prereleaseId?: string;
|
|
21
|
+
ignoreUnresolvedDependencies?: boolean;
|
|
22
|
+
ignoreIssues?: string;
|
|
23
|
+
incrementBy?: number;
|
|
24
|
+
failFast?: boolean;
|
|
25
|
+
disableTagPipeline?: boolean;
|
|
26
|
+
} & Partial<BasicTagParams>;
|
|
10
27
|
export declare class TagCmd implements Command {
|
|
11
28
|
private snapping;
|
|
12
29
|
private logger;
|
|
@@ -29,22 +46,11 @@ export declare class TagCmd implements Command {
|
|
|
29
46
|
description: string;
|
|
30
47
|
}[];
|
|
31
48
|
constructor(snapping: SnappingMain, logger: Logger, globalConfig: GlobalConfigMain);
|
|
32
|
-
report([patterns]: [string[]],
|
|
33
|
-
snapped?: boolean;
|
|
34
|
-
unmerged?: boolean;
|
|
35
|
-
ver?: string;
|
|
36
|
-
patch?: boolean;
|
|
37
|
-
minor?: boolean;
|
|
38
|
-
major?: boolean;
|
|
39
|
-
increment?: ReleaseType;
|
|
40
|
-
preRelease?: string;
|
|
41
|
-
prereleaseId?: string;
|
|
42
|
-
ignoreUnresolvedDependencies?: boolean;
|
|
43
|
-
ignoreIssues?: string;
|
|
44
|
-
incrementBy?: number;
|
|
45
|
-
failFast?: boolean;
|
|
46
|
-
disableTagPipeline?: boolean;
|
|
47
|
-
forceDeploy?: boolean;
|
|
48
|
-
} & Partial<BasicTagParams>): Promise<string>;
|
|
49
|
+
report([patterns]: [string[]], options: TagParams): Promise<string>;
|
|
49
50
|
}
|
|
51
|
+
export declare function validateOptions(options: TagParams): {
|
|
52
|
+
releaseType: ReleaseType;
|
|
53
|
+
preReleaseId: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
export declare function tagResultOutput(results: TagResults): string;
|
|
50
56
|
export declare function outputIdsIfExists(label: string, ids?: ComponentIdList): string;
|
package/dist/tag-cmd.js
CHANGED
|
@@ -5,6 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.TagCmd = exports.NOTHING_TO_TAG_MSG = exports.AUTO_TAGGED_MSG = void 0;
|
|
7
7
|
exports.outputIdsIfExists = outputIdsIfExists;
|
|
8
|
+
exports.tagCmdOptions = void 0;
|
|
9
|
+
exports.tagResultOutput = tagResultOutput;
|
|
10
|
+
exports.validateOptions = validateOptions;
|
|
8
11
|
function _chalk() {
|
|
9
12
|
const data = _interopRequireDefault(require("chalk"));
|
|
10
13
|
_chalk = function () {
|
|
@@ -40,6 +43,10 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
40
43
|
const NOTHING_TO_TAG_MSG = exports.NOTHING_TO_TAG_MSG = 'nothing to tag';
|
|
41
44
|
const AUTO_TAGGED_MSG = exports.AUTO_TAGGED_MSG = 'auto-tagged dependents';
|
|
42
45
|
const RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];
|
|
46
|
+
const tagCmdOptions = exports.tagCmdOptions = [['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-tasks <string>', `skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.
|
|
47
|
+
specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler)`], ['', 'skip-auto-tag', 'skip auto tagging dependents'], ['', 'soft', 'do not persist. only keep note of the changes to be made'], ['', 'persist [skip-build]', 'persist the changes generated by --soft tag. by default, run the build pipeline, unless "skip-build" is provided'], ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'], ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'], ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'], ['', '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:
|
|
48
|
+
[${Object.keys(_componentIssues().IssuesClasses).join(', ')}]
|
|
49
|
+
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', 'locally run the build pipeline (i.e. not via rippleCI) and complete the tag']];
|
|
43
50
|
class TagCmd {
|
|
44
51
|
constructor(snapping, logger, globalConfig) {
|
|
45
52
|
this.snapping = snapping;
|
|
@@ -57,10 +64,7 @@ if patterns are entered, you can specify a version per pattern using "@" sign, e
|
|
|
57
64
|
_defineProperty(this, "helpUrl", 'reference/components/snaps#create-a-tag-(release-version)');
|
|
58
65
|
_defineProperty(this, "alias", 't');
|
|
59
66
|
_defineProperty(this, "loader", true);
|
|
60
|
-
_defineProperty(this, "options",
|
|
61
|
-
specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler)`], ['', 'skip-auto-tag', 'skip auto tagging dependents'], ['', 'soft', 'do not persist. only keep note of the changes to be made'], ['', 'persist [skip-build]', 'persist the changes generated by --soft tag. by default, run the build pipeline, unless "skip-build" is provided'], ['', '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'], ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'], ['', '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:
|
|
62
|
-
[${Object.keys(_componentIssues().IssuesClasses).join(', ')}]
|
|
63
|
-
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', 'locally run the build pipeline (i.e. not via rippleCI) and complete the tag']]);
|
|
67
|
+
_defineProperty(this, "options", tagCmdOptions);
|
|
64
68
|
_defineProperty(this, "remoteOp", true);
|
|
65
69
|
// In case a compiler / tester is not installed
|
|
66
70
|
_defineProperty(this, "examples", [{
|
|
@@ -70,72 +74,36 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
// eslint-disable-next-line complexity
|
|
73
|
-
async report([patterns = []], {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
disableTagPipeline = false,
|
|
95
|
-
forceDeploy = false,
|
|
96
|
-
ignoreBuildErrors = false,
|
|
97
|
-
rebuildDepsGraph,
|
|
98
|
-
failFast = false,
|
|
99
|
-
incrementBy = 1
|
|
100
|
-
}) {
|
|
77
|
+
async report([patterns = []], options) {
|
|
78
|
+
const {
|
|
79
|
+
message = '',
|
|
80
|
+
ver,
|
|
81
|
+
editor = '',
|
|
82
|
+
snapped = false,
|
|
83
|
+
unmerged = false,
|
|
84
|
+
ignoreIssues,
|
|
85
|
+
ignoreNewestVersion = false,
|
|
86
|
+
skipTests = false,
|
|
87
|
+
skipTasks,
|
|
88
|
+
skipAutoTag = false,
|
|
89
|
+
unmodified = false,
|
|
90
|
+
soft = false,
|
|
91
|
+
persist = false,
|
|
92
|
+
disableTagPipeline = false,
|
|
93
|
+
ignoreBuildErrors = false,
|
|
94
|
+
rebuildDepsGraph,
|
|
95
|
+
failFast = false,
|
|
96
|
+
incrementBy = 1
|
|
97
|
+
} = options;
|
|
101
98
|
if (!message && !persist && !editor) {
|
|
102
99
|
this.logger.consoleWarning(`--message will be mandatory in the next few releases. make sure to add a message with your tag`);
|
|
103
100
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);
|
|
109
|
-
ignoreBuildErrors = true;
|
|
110
|
-
}
|
|
111
|
-
const releaseFlags = [patch, minor, major, preRelease].filter(x => x);
|
|
112
|
-
if (releaseFlags.length > 1) {
|
|
113
|
-
throw new (_bitError().BitError)('you can use only one of the following - patch, minor, major, pre-release');
|
|
114
|
-
}
|
|
115
|
-
const getReleaseType = () => {
|
|
116
|
-
if (increment) {
|
|
117
|
-
if (!RELEASE_TYPES.includes(increment)) {
|
|
118
|
-
throw new (_bitError().BitError)(`invalid increment-level "${increment}".
|
|
119
|
-
semver allows the following options only: ${RELEASE_TYPES.join(', ')}`);
|
|
120
|
-
}
|
|
121
|
-
return increment;
|
|
122
|
-
}
|
|
123
|
-
if (major) return 'major';
|
|
124
|
-
if (minor) return 'minor';
|
|
125
|
-
if (patch) return 'patch';
|
|
126
|
-
if (preRelease) return 'prerelease';
|
|
127
|
-
return _constants().DEFAULT_BIT_RELEASE_TYPE;
|
|
128
|
-
};
|
|
129
|
-
const getPreReleaseId = () => {
|
|
130
|
-
if (prereleaseId) {
|
|
131
|
-
return prereleaseId;
|
|
132
|
-
}
|
|
133
|
-
if (preRelease && typeof preRelease === 'string') {
|
|
134
|
-
return preRelease;
|
|
135
|
-
}
|
|
136
|
-
return undefined;
|
|
137
|
-
};
|
|
101
|
+
const {
|
|
102
|
+
releaseType,
|
|
103
|
+
preReleaseId
|
|
104
|
+
} = validateOptions(options);
|
|
138
105
|
const disableTagAndSnapPipelines = disableTagPipeline;
|
|
106
|
+
let build = options.build;
|
|
139
107
|
build = (await this.globalConfig.getBool(_constants().CFG_FORCE_LOCAL_BUILD)) || Boolean(build);
|
|
140
108
|
if (persist) {
|
|
141
109
|
if (persist === true) build = true;else if (persist === 'skip-build') build = false;else throw new (_bitError().BitError)(`unknown value for --persist, use either --persist or --persist=skip-build`);
|
|
@@ -154,8 +122,8 @@ To undo local tag use the "bit reset" command.`);
|
|
|
154
122
|
unmerged,
|
|
155
123
|
editor,
|
|
156
124
|
message,
|
|
157
|
-
releaseType
|
|
158
|
-
preReleaseId
|
|
125
|
+
releaseType,
|
|
126
|
+
preReleaseId,
|
|
159
127
|
ignoreIssues,
|
|
160
128
|
ignoreNewestVersion,
|
|
161
129
|
skipTests,
|
|
@@ -174,60 +142,115 @@ To undo local tag use the "bit reset" command.`);
|
|
|
174
142
|
};
|
|
175
143
|
const results = await this.snapping.tag(params);
|
|
176
144
|
if (!results) return _chalk().default.yellow(persist ? 'no soft-tag found' : NOTHING_TO_TAG_MSG);
|
|
177
|
-
|
|
178
|
-
taggedComponents,
|
|
179
|
-
autoTaggedResults,
|
|
180
|
-
warnings,
|
|
181
|
-
newComponents,
|
|
182
|
-
removedComponents
|
|
183
|
-
} = results;
|
|
184
|
-
const changedComponents = taggedComponents.filter(component => !newComponents.searchWithoutVersion(component.id));
|
|
185
|
-
const addedComponents = taggedComponents.filter(component => newComponents.searchWithoutVersion(component.id));
|
|
186
|
-
const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;
|
|
187
|
-
const warningsOutput = warnings && warnings.length ? `${_chalk().default.yellow(warnings.join('\n'))}\n\n` : '';
|
|
188
|
-
const tagExplanationPersist = `\n(use "bit export" to push these components to a remote")
|
|
189
|
-
(use "bit reset" to unstage versions)`;
|
|
190
|
-
const tagExplanationSoft = `\n(use "bit tag --persist" to persist the soft-tagged changes as a fully tagged version")
|
|
191
|
-
(use "bit reset --soft" to remove the soft-tags)`;
|
|
192
|
-
const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;
|
|
193
|
-
const compInBold = id => {
|
|
194
|
-
const version = id.hasVersion() ? `@${id.version}` : '';
|
|
195
|
-
return `${_chalk().default.bold(id.toStringWithoutVersion())}${version}`;
|
|
196
|
-
};
|
|
197
|
-
const outputComponents = comps => {
|
|
198
|
-
return comps.map(component => {
|
|
199
|
-
let componentOutput = ` > ${compInBold(component.id)}`;
|
|
200
|
-
const autoTag = autoTaggedResults.filter(result => result.triggeredBy.searchWithoutVersion(component.id));
|
|
201
|
-
if (autoTag.length) {
|
|
202
|
-
const autoTagComp = autoTag.map(a => compInBold(a.component.id));
|
|
203
|
-
componentOutput += `\n ${AUTO_TAGGED_MSG}:
|
|
204
|
-
${autoTagComp.join('\n ')}`;
|
|
205
|
-
}
|
|
206
|
-
return componentOutput;
|
|
207
|
-
}).join('\n');
|
|
208
|
-
};
|
|
209
|
-
const publishOutput = () => {
|
|
210
|
-
const {
|
|
211
|
-
publishedPackages
|
|
212
|
-
} = results;
|
|
213
|
-
if (!publishedPackages || !publishedPackages.length) return '';
|
|
214
|
-
const successTitle = `\n\n${_chalk().default.green(`published the following ${publishedPackages.length} component(s) successfully\n`)}`;
|
|
215
|
-
const successCompsStr = publishedPackages.join('\n');
|
|
216
|
-
const successOutput = successCompsStr ? successTitle + successCompsStr : '';
|
|
217
|
-
return successOutput;
|
|
218
|
-
};
|
|
219
|
-
const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';
|
|
220
|
-
const outputIfExists = (label, explanation, components) => {
|
|
221
|
-
if (!components.length) return '';
|
|
222
|
-
return `\n${_chalk().default.underline(softTagPrefix + label)}\n(${explanation})\n${outputComponents(components)}\n`;
|
|
223
|
-
};
|
|
224
|
-
const newDesc = results.isSoftTag ? 'set to be tagged with first version for components when persisted' : 'first version for components';
|
|
225
|
-
const changedDesc = results.isSoftTag ? 'components that are set to get a version bump when persisted' : 'components that got a version bump';
|
|
226
|
-
const softTagClarification = results.isSoftTag ? _chalk().default.bold('\nkeep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag') : '';
|
|
227
|
-
return outputIfExists('new components', newDesc, addedComponents) + outputIfExists('changed components', changedDesc, changedComponents) + outputIdsIfExists('removed components', removedComponents) + publishOutput() + warningsOutput + _chalk().default.green(`\n${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`) + tagExplanation + softTagClarification;
|
|
145
|
+
return tagResultOutput(results);
|
|
228
146
|
}
|
|
229
147
|
}
|
|
230
148
|
exports.TagCmd = TagCmd;
|
|
149
|
+
function validateOptions(options) {
|
|
150
|
+
const {
|
|
151
|
+
patch,
|
|
152
|
+
minor,
|
|
153
|
+
major,
|
|
154
|
+
preRelease,
|
|
155
|
+
increment,
|
|
156
|
+
prereleaseId
|
|
157
|
+
} = options;
|
|
158
|
+
if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {
|
|
159
|
+
throw new (_bitError().BitError)(`--prerelease-id should be entered along with --increment flag, while --increment must be one of the following: [prepatch, prerelease, preminor, premajor]`);
|
|
160
|
+
}
|
|
161
|
+
const releaseFlags = [patch, minor, major, preRelease].filter(x => x);
|
|
162
|
+
if (releaseFlags.length > 1) {
|
|
163
|
+
throw new (_bitError().BitError)('you can use only one of the following - patch, minor, major, pre-release');
|
|
164
|
+
}
|
|
165
|
+
const getReleaseType = () => {
|
|
166
|
+
if (increment) {
|
|
167
|
+
if (!RELEASE_TYPES.includes(increment)) {
|
|
168
|
+
throw new (_bitError().BitError)(`invalid increment-level "${increment}".
|
|
169
|
+
semver allows the following options only: ${RELEASE_TYPES.join(', ')}`);
|
|
170
|
+
}
|
|
171
|
+
return increment;
|
|
172
|
+
}
|
|
173
|
+
if (major) return 'major';
|
|
174
|
+
if (minor) return 'minor';
|
|
175
|
+
if (patch) return 'patch';
|
|
176
|
+
if (preRelease) return 'prerelease';
|
|
177
|
+
return _constants().DEFAULT_BIT_RELEASE_TYPE;
|
|
178
|
+
};
|
|
179
|
+
const getPreReleaseId = () => {
|
|
180
|
+
if (prereleaseId) {
|
|
181
|
+
return prereleaseId;
|
|
182
|
+
}
|
|
183
|
+
if (preRelease && typeof preRelease === 'string') {
|
|
184
|
+
return preRelease;
|
|
185
|
+
}
|
|
186
|
+
return undefined;
|
|
187
|
+
};
|
|
188
|
+
return {
|
|
189
|
+
releaseType: getReleaseType(),
|
|
190
|
+
preReleaseId: getPreReleaseId()
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
function tagResultOutput(results) {
|
|
194
|
+
const {
|
|
195
|
+
taggedComponents,
|
|
196
|
+
autoTaggedResults,
|
|
197
|
+
warnings,
|
|
198
|
+
newComponents,
|
|
199
|
+
removedComponents,
|
|
200
|
+
exportedIds
|
|
201
|
+
} = results;
|
|
202
|
+
const changedComponents = taggedComponents.filter(component => !newComponents.searchWithoutVersion(component.id));
|
|
203
|
+
const addedComponents = taggedComponents.filter(component => newComponents.searchWithoutVersion(component.id));
|
|
204
|
+
const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;
|
|
205
|
+
const warningsOutput = warnings && warnings.length ? `${_chalk().default.yellow(warnings.join('\n'))}\n\n` : '';
|
|
206
|
+
const tagExplanationPersist = exportedIds ? '' : `\n(use "bit export" to push these components to a remote")
|
|
207
|
+
(use "bit reset" to unstage versions)`;
|
|
208
|
+
const tagExplanationSoft = `\n(use "bit tag --persist" to persist the soft-tagged changes as a fully tagged version")
|
|
209
|
+
(use "bit reset --soft" to remove the soft-tags)`;
|
|
210
|
+
const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;
|
|
211
|
+
const compInBold = id => {
|
|
212
|
+
const version = id.hasVersion() ? `@${id.version}` : '';
|
|
213
|
+
return `${_chalk().default.bold(id.toStringWithoutVersion())}${version}`;
|
|
214
|
+
};
|
|
215
|
+
const outputComponents = comps => {
|
|
216
|
+
return comps.map(component => {
|
|
217
|
+
let componentOutput = ` > ${compInBold(component.id)}`;
|
|
218
|
+
const autoTag = autoTaggedResults.filter(result => result.triggeredBy.searchWithoutVersion(component.id));
|
|
219
|
+
if (autoTag.length) {
|
|
220
|
+
const autoTagComp = autoTag.map(a => compInBold(a.component.id));
|
|
221
|
+
componentOutput += `\n ${AUTO_TAGGED_MSG}:
|
|
222
|
+
${autoTagComp.join('\n ')}`;
|
|
223
|
+
}
|
|
224
|
+
return componentOutput;
|
|
225
|
+
}).join('\n');
|
|
226
|
+
};
|
|
227
|
+
const publishOutput = () => {
|
|
228
|
+
const {
|
|
229
|
+
publishedPackages
|
|
230
|
+
} = results;
|
|
231
|
+
if (!publishedPackages || !publishedPackages.length) return '';
|
|
232
|
+
const successTitle = `\n\n${_chalk().default.green(`published the following ${publishedPackages.length} component(s) successfully\n`)}`;
|
|
233
|
+
const successCompsStr = publishedPackages.join('\n');
|
|
234
|
+
const successOutput = successCompsStr ? successTitle + successCompsStr : '';
|
|
235
|
+
return successOutput;
|
|
236
|
+
};
|
|
237
|
+
const exportedOutput = () => {
|
|
238
|
+
if (!exportedIds) return '';
|
|
239
|
+
if (!exportedIds.length) return `\n${_chalk().default.yellow('no component has been exported')}\n`;
|
|
240
|
+
const title = `\n${_chalk().default.underline('exported components')}\n`;
|
|
241
|
+
const ids = exportedIds.map(id => ` > ${compInBold(id)}`).join('\n');
|
|
242
|
+
return `${title}${ids}\n`;
|
|
243
|
+
};
|
|
244
|
+
const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';
|
|
245
|
+
const outputIfExists = (label, explanation, components) => {
|
|
246
|
+
if (!components.length) return '';
|
|
247
|
+
return `\n${_chalk().default.underline(softTagPrefix + label)}\n(${explanation})\n${outputComponents(components)}\n`;
|
|
248
|
+
};
|
|
249
|
+
const newDesc = results.isSoftTag ? 'set to be tagged with first version for components when persisted' : 'first version for components';
|
|
250
|
+
const changedDesc = results.isSoftTag ? 'components that are set to get a version bump when persisted' : 'components that got a version bump';
|
|
251
|
+
const softTagClarification = results.isSoftTag ? _chalk().default.bold('\nkeep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag') : '';
|
|
252
|
+
return outputIfExists('new components', newDesc, addedComponents) + outputIfExists('changed components', changedDesc, changedComponents) + outputIdsIfExists('removed components', removedComponents) + publishOutput() + exportedOutput() + warningsOutput + _chalk().default.green(`\n${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged${exportedIds ? ' and exported' : ''}`) + tagExplanation + softTagClarification;
|
|
253
|
+
}
|
|
231
254
|
function outputIdsIfExists(label, ids) {
|
|
232
255
|
if (!ids?.length) return '';
|
|
233
256
|
return `\n${_chalk().default.underline(label)}\n${ids.map(id => id.toStringWithoutVersion()).join('\n')}\n`;
|
package/dist/tag-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_constants","_componentIssues","_bitError","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","NOTHING_TO_TAG_MSG","exports","AUTO_TAGGED_MSG","RELEASE_TYPES","TagCmd","constructor","snapping","logger","globalConfig","name","description","COMPONENT_PATTERN_HELP","join","keys","IssuesClasses","cmd","report","patterns","message","ver","editor","snapped","unmerged","patch","minor","major","preRelease","increment","prereleaseId","ignoreIssues","ignoreNewestVersion","skipTests","skipTasks","skipAutoTag","unmodified","build","soft","persist","disableTagPipeline","forceDeploy","ignoreBuildErrors","rebuildDepsGraph","failFast","incrementBy","consoleWarning","BitError","releaseFlags","filter","x","length","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","disableTagAndSnapPipelines","getBool","CFG_FORCE_LOCAL_BUILD","Boolean","params","ids","releaseType","preReleaseId","version","results","tag","chalk","yellow","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","autoTagComp","a","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","softTagPrefix","outputIfExists","label","explanation","components","underline","newDesc","changedDesc","softTagClarification","outputIdsIfExists"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport {\n DEFAULT_BIT_RELEASE_TYPE,\n COMPONENT_PATTERN_HELP,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy/dist/constants';\nimport { GlobalConfigMain } from '@teambit/global-config';\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\nexport const NOTHING_TO_TAG_MSG = 'nothing to tag';\nexport const AUTO_TAGGED_MSG = 'auto-tagged dependents';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport 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 = '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 [\n '',\n 'skip-tasks <string>',\n `skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.\nspecify the task-name (e.g. \"TypescriptCompiler\") or the task-aspect-id (e.g. teambit.compilation/compiler)`,\n ],\n ['', 'skip-auto-tag', 'skip auto tagging dependents'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n [\n '',\n 'persist [skip-build]',\n 'persist the changes generated by --soft tag. by default, run the build pipeline, unless \"skip-build\" is provided',\n ],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\n ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'],\n ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\n [\n 'i',\n 'ignore-issues <issues>',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n [\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', 'locally run the build pipeline (i.e. not via rippleCI) and complete the tag'],\n ] as CommandOptions;\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, private globalConfig: GlobalConfigMain) {}\n\n // eslint-disable-next-line complexity\n async report(\n [patterns = []]: [string[]],\n {\n message = '',\n ver,\n editor = '',\n snapped = false,\n unmerged = false,\n patch,\n minor,\n major,\n preRelease,\n increment,\n prereleaseId,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipTasks,\n skipAutoTag = false,\n unmodified = false,\n build,\n soft = false,\n persist = false,\n disableTagPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n failFast = false,\n incrementBy = 1,\n }: {\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n increment?: ReleaseType;\n preRelease?: string;\n prereleaseId?: string;\n ignoreUnresolvedDependencies?: boolean;\n ignoreIssues?: string;\n incrementBy?: number;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n forceDeploy?: boolean;\n } & Partial<BasicTagParams>\n ): Promise<string> {\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 (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;\n build = (await this.globalConfig.getBool(CFG_FORCE_LOCAL_BUILD)) || Boolean(build);\n if (persist) {\n if (persist === true) build = true;\n else if (persist === 'skip-build') build = false;\n else throw new BitError(`unknown value for --persist, use either --persist or --persist=skip-build`);\n }\n if (!build && !soft) {\n this.logger.consoleWarning(\n `tagging components on \"main\" lane when using remote build is not recommended. To avoid SemVer versions of your component with failing builds, please refer to:\n- Snap changes in a different lane and merge to \"main\" on your remote (learn more on lanes - https://bit.dev/reference/lanes/getting-started-with-lanes)\n- Use \\`bit tag --build\\` to build your components locally.\n- Use \\`snap\\` or \\`build\\` first to validate your build passing, and then version and export safely.\n\nTo undo local tag use the \"bit reset\" command.`\n );\n }\n\n const params = {\n ids: patterns,\n snapped,\n unmerged,\n editor,\n message,\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipTasks,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n incrementBy,\n version: ver,\n failFast,\n };\n\n const results = await this.snapping.tag(params);\n if (!results) return chalk.yellow(persist ? 'no soft-tag found' : NOTHING_TO_TAG_MSG);\n 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 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 const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;\n\n const compInBold = (id: ComponentID) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoTaggedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_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 '\\nkeep 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 outputIfExists('new components', newDesc, addedComponents) +\n outputIfExists('changed components', changedDesc, changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n publishOutput() +\n warningsOutput +\n chalk.green(\n `\\n${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`\n ) +\n tagExplanation +\n softTagClarification\n );\n }\n}\n\nexport function outputIdsIfExists(label: string, ids?: ComponentIdList) {\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;AAIA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,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,GAAG,CAAC8B,GAAG,CAAEd,EAAE,IAAKA,EAAE,CAACW,sBAAsB,CAAC,CAAC,CAAC,CAAC3E,IAAI,CAAC,IAAI,CAAC,IAAI;AACpG","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_constants","_componentIssues","_bitError","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","NOTHING_TO_TAG_MSG","exports","AUTO_TAGGED_MSG","RELEASE_TYPES","tagCmdOptions","join","keys","IssuesClasses","TagCmd","constructor","snapping","logger","globalConfig","name","description","COMPONENT_PATTERN_HELP","cmd","report","patterns","options","message","ver","editor","snapped","unmerged","ignoreIssues","ignoreNewestVersion","skipTests","skipTasks","skipAutoTag","unmodified","soft","persist","disableTagPipeline","ignoreBuildErrors","rebuildDepsGraph","failFast","incrementBy","consoleWarning","releaseType","preReleaseId","validateOptions","disableTagAndSnapPipelines","build","getBool","CFG_FORCE_LOCAL_BUILD","Boolean","BitError","params","ids","version","results","tag","chalk","yellow","tagResultOutput","patch","minor","major","preRelease","increment","prereleaseId","releaseFlags","filter","x","length","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","exportedIds","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","compInBold","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","autoTagComp","a","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","exportedOutput","title","underline","softTagPrefix","outputIfExists","label","explanation","components","newDesc","changedDesc","softTagClarification","outputIdsIfExists"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport {\n DEFAULT_BIT_RELEASE_TYPE,\n COMPONENT_PATTERN_HELP,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy/dist/constants';\nimport { GlobalConfigMain } from '@teambit/global-config';\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\nexport const NOTHING_TO_TAG_MSG = 'nothing to tag';\nexport const AUTO_TAGGED_MSG = 'auto-tagged dependents';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport const tagCmdOptions = [\n ['m', 'message <message>', 'a log message describing latest changes'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).',\n ],\n ['v', 'ver <version>', 'tag with the given version'],\n ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`],\n ['', 'prerelease-id <id>', 'prerelease identifier (e.g. \"dev\" to get \"1.0.0-dev.1\")'],\n ['p', 'patch', 'syntactic sugar for \"--increment patch\"'],\n ['', 'minor', 'syntactic sugar for \"--increment minor\"'],\n ['', 'major', 'syntactic sugar for \"--increment major\"'],\n ['', 'pre-release [identifier]', 'syntactic sugar for \"--increment prerelease\" and `--prerelease-id <identifier>`'],\n ['', 'snapped', 'tag only components whose head is a snap (not a tag)'],\n ['', 'unmerged', 'complete a merge process by tagging the unmerged components'],\n ['', 'skip-tests', 'skip running component tests during tag process'],\n [\n '',\n 'skip-tasks <string>',\n `skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.\nspecify the task-name (e.g. \"TypescriptCompiler\") or the task-aspect-id (e.g. teambit.compilation/compiler)`,\n ],\n ['', 'skip-auto-tag', 'skip auto tagging dependents'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n [\n '',\n 'persist [skip-build]',\n 'persist the changes generated by --soft tag. by default, run the build pipeline, unless \"skip-build\" is provided',\n ],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'],\n ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\n [\n 'i',\n 'ignore-issues <issues>',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n [\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', 'locally run the build pipeline (i.e. not via rippleCI) and complete the tag'],\n] as CommandOptions;\n\nexport type TagParams = {\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n increment?: ReleaseType;\n preRelease?: string;\n prereleaseId?: string;\n ignoreUnresolvedDependencies?: boolean;\n ignoreIssues?: string;\n incrementBy?: number;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n} & Partial<BasicTagParams>;\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 = 'reference/components/snaps#create-a-tag-(release-version)';\n alias = 't';\n loader = true;\n options = tagCmdOptions;\n remoteOp = true; // In case a compiler / tester is not installed\n examples = [{ cmd: 'tag --ver 1.0.0', description: 'tag all components to version 1.0.0' }];\n\n constructor(private snapping: SnappingMain, private logger: Logger, private globalConfig: GlobalConfigMain) {}\n\n // eslint-disable-next-line complexity\n async report([patterns = []]: [string[]], options: TagParams): Promise<string> {\n const {\n message = '',\n ver,\n editor = '',\n snapped = false,\n unmerged = false,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipTasks,\n skipAutoTag = false,\n unmodified = false,\n soft = false,\n persist = false,\n disableTagPipeline = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n failFast = false,\n incrementBy = 1,\n } = options;\n\n if (!message && !persist && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your tag`\n );\n }\n const { releaseType, preReleaseId } = validateOptions(options);\n\n const disableTagAndSnapPipelines = disableTagPipeline;\n let build = options.build;\n build = (await this.globalConfig.getBool(CFG_FORCE_LOCAL_BUILD)) || Boolean(build);\n if (persist) {\n if (persist === true) build = true;\n else if (persist === 'skip-build') build = false;\n else throw new BitError(`unknown value for --persist, use either --persist or --persist=skip-build`);\n }\n if (!build && !soft) {\n this.logger.consoleWarning(\n `tagging components on \"main\" lane when using remote build is not recommended. To avoid SemVer versions of your component with failing builds, please refer to:\n- Snap changes in a different lane and merge to \"main\" on your remote (learn more on lanes - https://bit.dev/reference/lanes/getting-started-with-lanes)\n- Use \\`bit tag --build\\` to build your components locally.\n- Use \\`snap\\` or \\`build\\` first to validate your build passing, and then version and export safely.\n\nTo undo local tag use the \"bit reset\" command.`\n );\n }\n\n const params = {\n ids: patterns,\n snapped,\n unmerged,\n editor,\n message,\n releaseType,\n preReleaseId,\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipTasks,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n incrementBy,\n version: ver,\n failFast,\n };\n\n const results = await this.snapping.tag(params);\n if (!results) return chalk.yellow(persist ? 'no soft-tag found' : NOTHING_TO_TAG_MSG);\n return tagResultOutput(results);\n }\n}\n\nexport function validateOptions(options: TagParams) {\n const { patch, minor, major, preRelease, increment, prereleaseId } = options;\n if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {\n throw new BitError(\n `--prerelease-id should be entered along with --increment flag, while --increment must be one of the following: [prepatch, prerelease, preminor, premajor]`\n );\n }\n\n const releaseFlags = [patch, minor, major, preRelease].filter((x) => x);\n if (releaseFlags.length > 1) {\n throw new BitError('you can use only one of the following - patch, minor, major, pre-release');\n }\n\n const getReleaseType = (): ReleaseType => {\n if (increment) {\n if (!RELEASE_TYPES.includes(increment)) {\n throw new BitError(`invalid increment-level \"${increment}\".\nsemver allows the following options only: ${RELEASE_TYPES.join(', ')}`);\n }\n return increment;\n }\n if (major) return 'major';\n if (minor) return 'minor';\n if (patch) return 'patch';\n if (preRelease) return 'prerelease';\n return DEFAULT_BIT_RELEASE_TYPE;\n };\n const getPreReleaseId = (): string | undefined => {\n if (prereleaseId) {\n return prereleaseId;\n }\n if (preRelease && typeof preRelease === 'string') {\n return preRelease;\n }\n return undefined;\n };\n\n return {\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n };\n}\n\nexport function tagResultOutput(results: TagResults): string {\n const { taggedComponents, autoTaggedResults, warnings, newComponents, removedComponents, exportedIds }: TagResults =\n 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 = exportedIds\n ? ''\n : `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset\" to unstage versions)`;\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 const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;\n\n const compInBold = (id: ComponentID) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoTaggedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_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 exportedOutput = () => {\n if (!exportedIds) return '';\n if (!exportedIds.length) return `\\n${chalk.yellow('no component has been exported')}\\n`;\n const title = `\\n${chalk.underline('exported components')}\\n`;\n const ids = exportedIds.map((id) => ` > ${compInBold(id)}`).join('\\n');\n return `${title}${ids}\\n`;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label: string, explanation: string, 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 '\\nkeep 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 outputIfExists('new components', newDesc, addedComponents) +\n outputIfExists('changed components', changedDesc, changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n publishOutput() +\n exportedOutput() +\n warningsOutput +\n chalk.green(\n `\\n${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged${\n exportedIds ? ' and exported' : ''\n }`\n ) +\n tagExplanation +\n softTagClarification\n );\n}\n\nexport function outputIdsIfExists(label: string, ids?: ComponentIdList) {\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;AAIA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAI,iBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,gBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8C,SAAAC,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAA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C,CAAC,GAChBxB,cAAc,GACd9B,gBAAK,CAACmD,KAAK,CACT,KAAKjC,gBAAgB,CAACN,MAAM,GAAGiB,eAAe,iBAAiB/B,OAAO,CAACoC,SAAS,GAAG,OAAO,GAAG,EAAE,SAC7FX,WAAW,GAAG,eAAe,GAAG,EAAE,EAEtC,CAAC,GACDU,cAAc,GACd+B,oBAAoB;AAExB;AAEO,SAASC,iBAAiBA,CAACN,KAAa,EAAE/D,GAAqB,EAAE;EACtE,IAAI,CAACA,GAAG,EAAEgB,MAAM,EAAE,OAAO,EAAE;EAC3B,OAAO,KAAKZ,gBAAK,CAACwD,SAAS,CAACG,KAAK,CAAC,KAAK/D,GAAG,CAAC6C,GAAG,CAAEd,EAAE,IAAKA,EAAE,CAACW,sBAAsB,CAAC,CAAC,CAAC,CAACtF,IAAI,CAAC,IAAI,CAAC,IAAI;AACpG","ignoreList":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import {
|
|
2
|
+
import { TagParams } from './tag-cmd';
|
|
3
3
|
import { Logger } from '@teambit/logger';
|
|
4
4
|
import { SnappingMain } from './snapping.main.runtime';
|
|
5
|
-
import { BasicTagParams } from './tag-model-component';
|
|
6
5
|
export type TagDataPerCompRaw = {
|
|
7
6
|
componentId: string;
|
|
8
7
|
dependencies?: string[];
|
|
@@ -23,19 +22,9 @@ export declare class TagFromScopeCmd implements Command {
|
|
|
23
22
|
options: CommandOptions;
|
|
24
23
|
remoteOp: boolean;
|
|
25
24
|
constructor(snapping: SnappingMain, logger: Logger);
|
|
26
|
-
report([data]: [string],
|
|
25
|
+
report([data]: [string], options: {
|
|
27
26
|
push?: boolean;
|
|
28
|
-
ver?: string;
|
|
29
|
-
patch?: boolean;
|
|
30
|
-
minor?: boolean;
|
|
31
|
-
major?: boolean;
|
|
32
|
-
increment?: ReleaseType;
|
|
33
|
-
preRelease?: string;
|
|
34
|
-
prereleaseId?: string;
|
|
35
|
-
ignoreIssues?: string;
|
|
36
|
-
incrementBy?: number;
|
|
37
27
|
rebuildArtifacts?: boolean;
|
|
38
|
-
|
|
39
|
-
} & Partial<BasicTagParams>): Promise<string>;
|
|
28
|
+
} & Partial<TagParams>): Promise<string>;
|
|
40
29
|
private parseData;
|
|
41
30
|
}
|