@teambit/snapping 1.0.347 → 1.0.348

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.
@@ -88,7 +88,7 @@ export declare class SnappingMain {
88
88
  * with a valid semver to that version.
89
89
  * tag can be done only on main, not on a lane.
90
90
  */
91
- tag({ ids, message, version, editor, snapped, unmerged, releaseType, preReleaseId, ignoreIssues, ignoreNewestVersion, skipTests, skipTasks, skipAutoTag, build, unmodified, soft, persist, ignoreBuildErrors, rebuildDepsGraph, incrementBy, disableTagAndSnapPipelines, failFast, includeLocalOnly, }: {
91
+ tag({ ids, message, version, editor, snapped, unmerged, releaseType, preReleaseId, ignoreIssues, ignoreNewestVersion, skipTests, skipTasks, skipAutoTag, build, unmodified, soft, persist, ignoreBuildErrors, rebuildDepsGraph, incrementBy, disableTagAndSnapPipelines, failFast, }: {
92
92
  ids?: string[];
93
93
  all?: boolean | string;
94
94
  snapped?: boolean;
@@ -119,7 +119,7 @@ export declare class SnappingMain {
119
119
  * once a component is snapped on a lane, it becomes part of it.
120
120
  */
121
121
  snap({ pattern, legacyBitIds, // @todo: change to ComponentID[]. pass only if have the ids already parsed.
122
- unmerged, editor, message, ignoreIssues, skipTests, skipTasks, skipAutoSnap, build, disableTagAndSnapPipelines, ignoreBuildErrors, rebuildDepsGraph, unmodified, exitOnFirstFailedTask, includeLocalOnly, }: Partial<BasicTagSnapParams> & {
122
+ unmerged, editor, message, ignoreIssues, skipTests, skipTasks, skipAutoSnap, build, disableTagAndSnapPipelines, ignoreBuildErrors, rebuildDepsGraph, unmodified, exitOnFirstFailedTask, }: Partial<BasicTagSnapParams> & {
123
123
  pattern?: string;
124
124
  legacyBitIds?: ComponentIdList;
125
125
  unmerged?: boolean;
@@ -371,8 +371,7 @@ class SnappingMain {
371
371
  rebuildDepsGraph,
372
372
  incrementBy = 1,
373
373
  disableTagAndSnapPipelines = false,
374
- failFast = false,
375
- includeLocalOnly
374
+ failFast = false
376
375
  }) {
377
376
  if (soft) build = false;
378
377
  if (editor && persist) {
@@ -391,7 +390,7 @@ class SnappingMain {
391
390
  const {
392
391
  bitIds,
393
392
  warnings
394
- } = await this.getComponentsToTag(unmodified, exactVersion, persist, ids, snapped, unmerged, includeLocalOnly);
393
+ } = await this.getComponentsToTag(unmodified, exactVersion, persist, ids, snapped, unmerged);
395
394
  if (!bitIds.length) return null;
396
395
  const compIds = _componentId().ComponentIdList.fromArray(bitIds);
397
396
  this.logger.debug(`tagging the following components: ${compIds.toString()}`);
@@ -708,8 +707,7 @@ if you're willing to lose the history from the head to the specified version, us
708
707
  ignoreBuildErrors = false,
709
708
  rebuildDepsGraph,
710
709
  unmodified = false,
711
- exitOnFirstFailedTask = false,
712
- includeLocalOnly
710
+ exitOnFirstFailedTask = false
713
711
  }) {
714
712
  if (!this.workspace) throw new (_workspace().OutsideWorkspaceError)();
715
713
  if (pattern && legacyBitIds) throw new Error(`please pass either pattern or legacyBitIds, not both`);
@@ -769,7 +767,7 @@ if you're willing to lose the history from the head to the specified version, us
769
767
  if (unmerged) {
770
768
  return componentsList.listDuringMergeStateComponents();
771
769
  }
772
- const tagPendingComponentsIds = await self.getTagPendingComponentsIds(unmodified, includeLocalOnly);
770
+ const tagPendingComponentsIds = await self.getTagPendingComponentsIds(unmodified);
773
771
  if (!tagPendingComponentsIds.length) return null;
774
772
  // when unmodified, we ask for all components, throw if no matching. if not unmodified and no matching, see error
775
773
  // below, suggesting to use --unmodified flag.
@@ -1273,11 +1271,8 @@ another option, in case this dependency is not in main yet is to remove all refe
1273
1271
  const extension = new (_config().ExtensionDataEntry)(undefined, undefined, extId, undefined, data);
1274
1272
  component.config.extensions.push(extension);
1275
1273
  }
1276
- async getTagPendingComponentsIds(includeUnmodified = false, includeLocalOnly = false) {
1274
+ async getTagPendingComponentsIds(includeUnmodified = false) {
1277
1275
  const ids = includeUnmodified ? await this.workspace.listPotentialTagIds() : await this.workspace.listTagPendingIds();
1278
- if (includeLocalOnly) {
1279
- return ids;
1280
- }
1281
1276
  const localOnlyIds = this.workspace.filter.byLocalOnly(ids);
1282
1277
  if (!localOnlyIds.length) {
1283
1278
  return ids;
@@ -1285,7 +1280,7 @@ another option, in case this dependency is not in main yet is to remove all refe
1285
1280
  const localOnlyListIds = _componentId().ComponentIdList.fromArray(localOnlyIds);
1286
1281
  return ids.filter(id => !localOnlyListIds.hasWithoutVersion(id));
1287
1282
  }
1288
- async getComponentsToTag(includeUnmodified, exactVersion, persist, ids, snapped, unmerged, includeLocalOnly = false) {
1283
+ async getComponentsToTag(includeUnmodified, exactVersion, persist, ids, snapped, unmerged) {
1289
1284
  const warnings = [];
1290
1285
  const componentsList = new (_legacy().ComponentsList)(this.workspace.consumer);
1291
1286
  if (persist) {
@@ -1295,9 +1290,9 @@ another option, in case this dependency is not in main yet is to remove all refe
1295
1290
  warnings: []
1296
1291
  };
1297
1292
  }
1298
- const tagPendingComponentsIds = await this.getTagPendingComponentsIds(includeUnmodified, includeLocalOnly);
1293
+ const tagPendingComponentsIds = await this.getTagPendingComponentsIds(includeUnmodified);
1299
1294
  const snappedComponentsIds = (await this.workspace.filter.bySnappedOnMain()).map(id => id.changeVersion(undefined));
1300
- if (snappedComponentsIds.length && !includeLocalOnly) {
1295
+ if (snappedComponentsIds.length) {
1301
1296
  const localOnlyIds = this.workspace.filter.byLocalOnly(snappedComponentsIds);
1302
1297
  const localOnlyListIds = _componentId().ComponentIdList.fromArray(localOnlyIds);
1303
1298
  snappedComponentsIds.forEach(id => {