@teambit/remove 0.0.304 → 0.0.305

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.
@@ -4,6 +4,8 @@ import { Workspace } from '@teambit/workspace';
4
4
  import { BitId } from '@teambit/legacy-bit-id';
5
5
  import { ImporterMain } from '@teambit/importer';
6
6
  import { ComponentID } from '@teambit/component-id';
7
+ import { DependencyResolverMain } from '@teambit/dependency-resolver';
8
+ import { IssuesMain } from '@teambit/issues';
7
9
  import { Component, ComponentMain } from '@teambit/component';
8
10
  import { RecoverOptions } from './recover-cmd';
9
11
  export declare type RemoveInfo = {
@@ -13,7 +15,8 @@ export declare class RemoveMain {
13
15
  private workspace;
14
16
  logger: Logger;
15
17
  private importer;
16
- constructor(workspace: Workspace, logger: Logger, importer: ImporterMain);
18
+ private depResolver;
19
+ constructor(workspace: Workspace, logger: Logger, importer: ImporterMain, depResolver: DependencyResolverMain);
17
20
  remove({ componentsPattern, force, remote, track, deleteFiles, fromLane, }: {
18
21
  componentsPattern: string;
19
22
  force?: boolean;
@@ -47,10 +50,16 @@ export declare class RemoveMain {
47
50
  private throwForMainComponentWhenOnLane;
48
51
  getRemoveInfo(component: Component): RemoveInfo;
49
52
  isRemoved(component: Component): boolean;
53
+ /**
54
+ * performant version of isRemoved() in case the component object is not available and loading it is expensive.
55
+ */
56
+ isRemovedByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean>;
50
57
  /**
51
58
  * get components that were soft-removed and tagged/snapped/merged but not exported yet.
52
59
  */
53
60
  getRemovedStaged(): Promise<ComponentID[]>;
61
+ addRemovedDependenciesIssues(components: Component[]): Promise<void>;
62
+ private addRemovedDepIssue;
54
63
  private getRemovedStagedFromMain;
55
64
  private getRemovedStagedFromLane;
56
65
  private getLocalBitIdsToRemove;
@@ -58,12 +67,14 @@ export declare class RemoveMain {
58
67
  static slots: never[];
59
68
  static dependencies: import("@teambit/harmony").Aspect[];
60
69
  static runtime: import("@teambit/harmony").RuntimeDefinition;
61
- static provider([workspace, cli, loggerMain, componentAspect, importerMain]: [
70
+ static provider([workspace, cli, loggerMain, componentAspect, importerMain, depResolver, issues]: [
62
71
  Workspace,
63
72
  CLIMain,
64
73
  LoggerMain,
65
74
  ComponentMain,
66
- ImporterMain
75
+ ImporterMain,
76
+ DependencyResolverMain,
77
+ IssuesMain
67
78
  ]): Promise<RemoveMain>;
68
79
  }
69
80
  export default RemoveMain;
@@ -98,6 +98,34 @@ function _deleteComponentFiles() {
98
98
  };
99
99
  return data;
100
100
  }
101
+ function _dependencyResolver() {
102
+ const data = require("@teambit/dependency-resolver");
103
+ _dependencyResolver = function () {
104
+ return data;
105
+ };
106
+ return data;
107
+ }
108
+ function _componentIssues() {
109
+ const data = require("@teambit/component-issues");
110
+ _componentIssues = function () {
111
+ return data;
112
+ };
113
+ return data;
114
+ }
115
+ function _issues() {
116
+ const data = _interopRequireDefault(require("@teambit/issues"));
117
+ _issues = function () {
118
+ return data;
119
+ };
120
+ return data;
121
+ }
122
+ function _pMapSeries() {
123
+ const data = _interopRequireDefault(require("p-map-series"));
124
+ _pMapSeries = function () {
125
+ return data;
126
+ };
127
+ return data;
128
+ }
101
129
  function _component() {
102
130
  const data = _interopRequireDefault(require("@teambit/component"));
103
131
  _component = function () {
@@ -105,6 +133,13 @@ function _component() {
105
133
  };
106
134
  return data;
107
135
  }
136
+ function _exceptions2() {
137
+ const data = require("@teambit/legacy/dist/scope/exceptions");
138
+ _exceptions2 = function () {
139
+ return data;
140
+ };
141
+ return data;
142
+ }
108
143
  function _packageJsonUtils() {
109
144
  const data = require("@teambit/legacy/dist/consumer/component/package-json-utils");
110
145
  _packageJsonUtils = function () {
@@ -151,10 +186,11 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
151
186
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
152
187
  const BEFORE_REMOVE = 'removing components';
153
188
  class RemoveMain {
154
- constructor(workspace, logger, importer) {
189
+ constructor(workspace, logger, importer, depResolver) {
155
190
  this.workspace = workspace;
156
191
  this.logger = logger;
157
192
  this.importer = importer;
193
+ this.depResolver = depResolver;
158
194
  }
159
195
  async remove({
160
196
  componentsPattern,
@@ -274,11 +310,22 @@ class RemoveMain {
274
310
  return true;
275
311
  }
276
312
  const compId = await this.workspace.scope.resolveComponentId(compIdStr);
277
- const compFromScope = await this.workspace.scope.get(compId);
313
+ const currentLane = await this.workspace.getCurrentLaneObject();
314
+ const idOnLane = currentLane === null || currentLane === void 0 ? void 0 : currentLane.getComponent(compId._legacy);
315
+ const compIdWithPossibleVer = idOnLane ? compId.changeVersion(idOnLane.head.toString()) : compId;
316
+ let compFromScope;
317
+ try {
318
+ compFromScope = await this.workspace.scope.get(compIdWithPossibleVer);
319
+ } catch (err) {
320
+ if (err instanceof _exceptions2().VersionNotFound && err.version === '0.0.0') {
321
+ throw new (_bitError().BitError)(`unable to find the component ${compIdWithPossibleVer.toString()} in the current lane or main`);
322
+ }
323
+ throw err;
324
+ }
278
325
  if (compFromScope && this.isRemoved(compFromScope)) {
279
326
  // case #2 and #3
280
- await importComp(compId._legacy.toString());
281
- await setAsRemovedFalse(compId);
327
+ await importComp(compIdWithPossibleVer._legacy.toString());
328
+ await setAsRemovedFalse(compIdWithPossibleVer);
282
329
  return true;
283
330
  }
284
331
  // case #5
@@ -311,12 +358,43 @@ ${mainComps.map(c => c.id.toString()).join('\n')}`);
311
358
  return this.getRemoveInfo(component).removed;
312
359
  }
313
360
 
361
+ /**
362
+ * performant version of isRemoved() in case the component object is not available and loading it is expensive.
363
+ */
364
+ async isRemovedByIdWithoutLoadingComponent(componentId) {
365
+ if (!componentId.hasVersion()) return false;
366
+ const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId);
367
+ if (bitmapEntry && bitmapEntry.isRemoved()) return true;
368
+ const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId);
369
+ if (!modelComp) return false;
370
+ const versionObj = await this.workspace.scope.getBitObjectVersion(modelComp, componentId.version);
371
+ if (!versionObj) return false;
372
+ return versionObj.isRemoved();
373
+ }
374
+
314
375
  /**
315
376
  * get components that were soft-removed and tagged/snapped/merged but not exported yet.
316
377
  */
317
378
  async getRemovedStaged() {
318
379
  return this.workspace.isOnMain() ? this.getRemovedStagedFromMain() : this.getRemovedStagedFromLane();
319
380
  }
381
+ async addRemovedDependenciesIssues(components) {
382
+ await (0, _pMapSeries().default)(components, async component => {
383
+ await this.addRemovedDepIssue(component);
384
+ });
385
+ }
386
+ async addRemovedDepIssue(component) {
387
+ const dependencies = await this.depResolver.getComponentDependencies(component);
388
+ const removedWithUndefined = await Promise.all(dependencies.map(async dep => {
389
+ const isRemoved = await this.isRemovedByIdWithoutLoadingComponent(dep.componentId);
390
+ if (isRemoved) return dep.componentId;
391
+ return undefined;
392
+ }));
393
+ const removed = (0, _lodash().compact)(removedWithUndefined).map(id => id.toString());
394
+ if (removed.length) {
395
+ component.state.issues.getOrCreate(_componentIssues().IssuesClasses.RemovedDependencies).data = removed;
396
+ }
397
+ }
320
398
  async getRemovedStagedFromMain() {
321
399
  const stagedConfig = await this.workspace.scope.getStagedConfig();
322
400
  return stagedConfig.getAll().filter(compConfig => {
@@ -357,9 +435,10 @@ ${mainComps.map(c => c.id.toString()).join('\n')}`);
357
435
  }
358
436
  return [_legacyBitId().BitId.parse(componentsPattern, true)];
359
437
  }
360
- static async provider([workspace, cli, loggerMain, componentAspect, importerMain]) {
438
+ static async provider([workspace, cli, loggerMain, componentAspect, importerMain, depResolver, issues]) {
361
439
  const logger = loggerMain.createLogger(_remove().RemoveAspect.id);
362
- const removeMain = new RemoveMain(workspace, logger, importerMain);
440
+ const removeMain = new RemoveMain(workspace, logger, importerMain, depResolver);
441
+ issues.registerAddComponentsIssues(removeMain.addRemovedDependenciesIssues.bind(removeMain));
363
442
  componentAspect.registerShowFragments([new (_remove2().RemoveFragment)(removeMain)]);
364
443
  cli.register(new (_removeCmd().RemoveCmd)(removeMain, workspace), new (_recoverCmd().RecoverCmd)(removeMain));
365
444
  return removeMain;
@@ -367,7 +446,7 @@ ${mainComps.map(c => c.id.toString()).join('\n')}`);
367
446
  }
368
447
  exports.RemoveMain = RemoveMain;
369
448
  (0, _defineProperty2().default)(RemoveMain, "slots", []);
370
- (0, _defineProperty2().default)(RemoveMain, "dependencies", [_workspace().default, _cli().CLIAspect, _logger().LoggerAspect, _component().default, _importer().default]);
449
+ (0, _defineProperty2().default)(RemoveMain, "dependencies", [_workspace().default, _cli().CLIAspect, _logger().LoggerAspect, _component().default, _importer().default, _dependencyResolver().DependencyResolverAspect, _issues().default]);
371
450
  (0, _defineProperty2().default)(RemoveMain, "runtime", _cli().MainRuntime);
372
451
  _remove().RemoveAspect.addRuntime(RemoveMain);
373
452
  var _default = RemoveMain;
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_logger","_workspace","_interopRequireWildcard","_legacyBitId","_bitId","_exceptions","_importer","_interopRequireDefault","_lodash","_hasWildcard","_listScope","_bitError","_deleteComponentFiles","_component","_packageJsonUtils","_removeCmd","_removeComponents","_remove","_remove2","_recoverCmd","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","importer","remove","componentsPattern","force","remote","track","deleteFiles","fromLane","_this$workspace","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","BitIds","fromArray","onDestroy","removeLocallyByIds","OutsideWorkspaceError","results","bitMap","write","markRemoveComps","componentIds","components","getMany","removeComponentsFromNodeModules","map","c","state","_consumer","compId","addComponentConfig","RemoveAspect","id","removed","_legacy","deleteComponentsFiles","markRemoveOnMain","ConsumerNotFound","isOnMain","Error","idsByPattern","newComps","filter","hasVersion","length","BitError","toString","join","recover","compIdStr","options","bitMapEntry","find","compMap","name","toStringWithoutVersion","importComp","idStr","import","installNpmPackages","skipDependencyInstallation","override","setAsRemovedFalse","addSpecificComponentConfig","_bitMapEntry$config","config","_bitMapEntry$config2","resolveComponentId","comp","isRemoved","scope","compFromScope","getRemoteComponent","throwForMainComponentWhenOnLane","currentLane","getCurrentLaneObject","laneComps","toBitIds","mainComps","hasWithoutVersion","getRemoveInfo","component","_component$config$ext","extensions","findExtension","getRemovedStaged","getRemovedStagedFromMain","getRemovedStagedFromLane","stagedConfig","getStagedConfig","getAll","compConfig","_compConfig$config","_compConfig$config$Re","laneIds","workspaceIds","listIds","laneIdsNotInWorkspace","wId","isEqualWithoutVersion","laneCompIdsNotInWorkspace","resolveMultipleComponentIds","comps","staged","Promise","all","snapDistance","getSnapDistance","err","warn","isSourceAhead","undefined","compact","hasWildcard","getRemoteBitIdsByWildcards","BitId","parse","provider","cli","loggerMain","componentAspect","importerMain","createLogger","removeMain","registerShowFragments","RemoveFragment","register","RemoveCmd","RecoverCmd","exports","_defineProperty2","WorkspaceAspect","CLIAspect","LoggerAspect","ComponentAspect","ImporterAspect","MainRuntime","addRuntime","_default"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WorkspaceAspect, { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport ImporterAspect, { ImporterMain } from '@teambit/importer';\nimport { compact } from 'lodash';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport { getRemoteBitIdsByWildcards } from '@teambit/legacy/dist/api/consumer/lib/list-scope';\nimport { ComponentID } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport ComponentAspect, { Component, ComponentMain } from '@teambit/component';\nimport { removeComponentsFromNodeModules } from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport { RemoveCmd } from './remove-cmd';\nimport { removeComponents } from './remove-components';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\nimport { RecoverCmd, RecoverOptions } from './recover-cmd';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n};\n\nexport class RemoveMain {\n constructor(private workspace: Workspace, public logger: Logger, private importer: ImporterMain) {}\n\n async remove({\n componentsPattern,\n force = false,\n remote = false,\n track = false,\n deleteFiles = true,\n fromLane = false,\n }: {\n componentsPattern: string;\n force?: boolean;\n remote?: boolean;\n track?: boolean;\n deleteFiles?: boolean;\n fromLane?: boolean;\n }): Promise<any> {\n this.logger.setStatusLine(BEFORE_REMOVE);\n const bitIds = remote\n ? await this.getRemoteBitIdsToRemove(componentsPattern)\n : await this.getLocalBitIdsToRemove(componentsPattern);\n this.logger.setStatusLine(BEFORE_REMOVE); // again because the loader might changed when talking to the remote\n const consumer = this.workspace?.consumer;\n const removeResults = await removeComponents({\n consumer,\n ids: BitIds.fromArray(bitIds),\n force,\n remote,\n track,\n deleteFiles,\n fromLane,\n });\n if (consumer) await consumer.onDestroy();\n return removeResults;\n }\n\n /**\n * remove components from the workspace.\n */\n async removeLocallyByIds(ids: BitId[], { force = false }: { force?: boolean } = {}) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const results = await removeComponents({\n consumer: this.workspace.consumer,\n ids: BitIds.fromArray(ids),\n force,\n remote: false,\n track: false,\n deleteFiles: true,\n fromLane: false,\n });\n await this.workspace.bitMap.write();\n\n return results;\n }\n\n async markRemoveComps(componentIds: ComponentID[]) {\n const components = await this.workspace.getMany(componentIds);\n await removeComponentsFromNodeModules(\n this.workspace.consumer,\n components.map((c) => c.state._consumer)\n );\n // don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted\n // during this removal along with the entire component dir.\n componentIds.map((compId) =>\n this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, {\n removed: true,\n })\n );\n await this.workspace.bitMap.write();\n const bitIds = BitIds.fromArray(componentIds.map((id) => id._legacy));\n await deleteComponentsFiles(this.workspace.consumer, bitIds);\n\n return componentIds;\n }\n\n async markRemoveOnMain(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n if (!this.workspace.isOnMain()) {\n throw new Error(`markRemoveOnMain expects to get called when on main`);\n }\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n\n const newComps = componentIds.filter((id) => !id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `unable to mark-remove the following new component(s), please remove them without --delete\\n${newComps\n .map((id) => id.toString())\n .join('\\n')}`\n );\n }\n\n return this.markRemoveComps(componentIds);\n }\n\n /**\n * recover a soft-removed component.\n * there are 4 different scenarios.\n * 1. a component was just soft-removed, it wasn't snapped yet. so it's now in .bitmap with the \"removed\" aspect entry.\n * 2. soft-removed and then snapped. It's not in .bitmap now.\n * 3. soft-removed, snapped, exported. it's not in .bitmap now.\n * 4. a soft-removed components was imported, so it's now in .bitmap without the \"removed\" aspect entry.\n * 5. workspace is empty. the soft-removed component is on the remote.\n * returns `true` if it was recovered. `false` if the component wasn't soft-removed, so nothing to recover from.\n */\n async recover(compIdStr: string, options: RecoverOptions): Promise<boolean> {\n if (!this.workspace) throw new ConsumerNotFound();\n const bitMapEntry = this.workspace.consumer.bitMap.components.find((compMap) => {\n return compMap.id.name === compIdStr || compMap.id.toStringWithoutVersion() === compIdStr;\n });\n const importComp = async (idStr: string) => {\n await this.importer.import({\n ids: [idStr],\n installNpmPackages: !options.skipDependencyInstallation,\n override: true,\n });\n };\n const setAsRemovedFalse = async (compId: ComponentID) => {\n await this.workspace.addSpecificComponentConfig(compId, RemoveAspect.id, { removed: false });\n await this.workspace.bitMap.write();\n };\n if (bitMapEntry) {\n if (bitMapEntry.config?.[RemoveAspect.id]) {\n // case #1\n delete bitMapEntry.config?.[RemoveAspect.id];\n await importComp(bitMapEntry.id.toString());\n return true;\n }\n // case #4\n const compId = await this.workspace.resolveComponentId(bitMapEntry.id);\n const comp = await this.workspace.get(compId);\n if (!this.isRemoved(comp)) {\n return false;\n }\n await setAsRemovedFalse(compId);\n return true;\n }\n const compId = await this.workspace.scope.resolveComponentId(compIdStr);\n const compFromScope = await this.workspace.scope.get(compId);\n if (compFromScope && this.isRemoved(compFromScope)) {\n // case #2 and #3\n await importComp(compId._legacy.toString());\n await setAsRemovedFalse(compId);\n return true;\n }\n // case #5\n const comp = await this.workspace.scope.getRemoteComponent(compId);\n if (!this.isRemoved(comp)) {\n return false;\n }\n await importComp(compId._legacy.toString());\n await setAsRemovedFalse(compId);\n\n return true;\n }\n\n private async throwForMainComponentWhenOnLane(components: Component[]) {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return; // user on main\n const laneComps = currentLane.toBitIds();\n const mainComps = components.filter((comp) => !laneComps.hasWithoutVersion(comp.id._legacy));\n if (mainComps.length) {\n throw new BitError(`the following components belong to main, they cannot be soft-removed when on a lane. consider removing them without --soft.\n${mainComps.map((c) => c.id.toString()).join('\\n')}`);\n }\n }\n\n getRemoveInfo(component: Component): RemoveInfo {\n const data = component.config.extensions.findExtension(RemoveAspect.id)?.config as RemoveInfo | undefined;\n return {\n removed: data?.removed || false,\n };\n }\n\n isRemoved(component: Component): boolean {\n return this.getRemoveInfo(component).removed;\n }\n\n /**\n * get components that were soft-removed and tagged/snapped/merged but not exported yet.\n */\n async getRemovedStaged(): Promise<ComponentID[]> {\n return this.workspace.isOnMain() ? this.getRemovedStagedFromMain() : this.getRemovedStagedFromLane();\n }\n\n private async getRemovedStagedFromMain(): Promise<ComponentID[]> {\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n return stagedConfig\n .getAll()\n .filter((compConfig) => compConfig.config?.[RemoveAspect.id]?.removed)\n .map((compConfig) => compConfig.id);\n }\n\n private async getRemovedStagedFromLane(): Promise<ComponentID[]> {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return [];\n const laneIds = currentLane.toBitIds();\n const workspaceIds = await this.workspace.listIds();\n const laneIdsNotInWorkspace = laneIds.filter(\n (id) => !workspaceIds.find((wId) => wId._legacy.isEqualWithoutVersion(id))\n );\n if (!laneIdsNotInWorkspace.length) return [];\n const laneCompIdsNotInWorkspace = await this.workspace.scope.resolveMultipleComponentIds(laneIdsNotInWorkspace);\n const comps = await this.workspace.scope.getMany(laneCompIdsNotInWorkspace);\n const removed = comps.filter((c) => this.isRemoved(c));\n const staged = await Promise.all(\n removed.map(async (c) => {\n const snapDistance = await this.workspace.scope.getSnapDistance(c.id, false);\n if (snapDistance.err) {\n this.logger.warn(\n `getRemovedStagedFromLane unable to get snapDistance for ${c.id.toString()} due to ${snapDistance.err.name}`\n );\n // todo: not clear what should be done here. should we consider it as removed-staged or not.\n }\n if (snapDistance.isSourceAhead()) return c.id;\n return undefined;\n })\n );\n return compact(staged);\n }\n\n private async getLocalBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n return componentIds.map((id) => id._legacy);\n }\n\n private async getRemoteBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (hasWildcard(componentsPattern)) {\n return getRemoteBitIdsByWildcards(componentsPattern);\n }\n return [BitId.parse(componentsPattern, true)];\n }\n\n static slots = [];\n static dependencies = [WorkspaceAspect, CLIAspect, LoggerAspect, ComponentAspect, ImporterAspect];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain, componentAspect, importerMain]: [\n Workspace,\n CLIMain,\n LoggerMain,\n ComponentMain,\n ImporterMain\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger, importerMain);\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(new RemoveCmd(removeMain, workspace), new RecoverCmd(removeMain));\n return removeMain;\n }\n}\n\nRemoveAspect.addRuntime(RemoveMain);\n\nexport default RemoveMain;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAI,uBAAA,CAAAH,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,OAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,MAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,WAAA,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Y,CAM/E,EAAE;IACD,MAAM/H,MAAM,GAAG6H,UAAU,CAACG,YAAY,CAAC3F,sBAAY,CAACC,EAAE,CAAC;IACvD,MAAM2F,UAAU,GAAG,IAAIpI,UAAU,CAACE,SAAS,EAAEC,MAAM,EAAE+H,YAAY,CAAC;IAClED,eAAe,CAACI,qBAAqB,CAAC,CAAC,KAAIC,yBAAc,EAACF,UAAU,CAAC,CAAC,CAAC;IACvEL,GAAG,CAACQ,QAAQ,CAAC,KAAIC,sBAAS,EAACJ,UAAU,EAAElI,SAAS,CAAC,EAAE,KAAIuI,wBAAU,EAACL,UAAU,CAAC,CAAC;IAC9E,OAAOA,UAAU;EACnB;AACF;AAACM,OAAA,CAAA1I,UAAA,GAAAA,UAAA;AAAA,IAAA2I,gBAAA,GAAA3J,OAAA,EA3PYgB,UAAU,WA0ON,EAAE;AAAA,IAAA2I,gBAAA,GAAA3J,OAAA,EA1ONgB,UAAU,kBA2OC,CAAC4I,oBAAe,EAAEC,gBAAS,EAAEC,sBAAY,EAAEC,oBAAe,EAAEC,mBAAc,CAAC;AAAA,IAAAL,gBAAA,GAAA3J,OAAA,EA3OtFgB,UAAU,aA4OJiJ,kBAAW;AAiB9BzG,sBAAY,CAAC0G,UAAU,CAAClJ,UAAU,CAAC;AAAC,IAAAmJ,QAAA,GAErBnJ,UAAU;AAAA0I,OAAA,CAAA1J,OAAA,GAAAmK,QAAA"}
1
+ {"version":3,"names":["_cli","data","require","_logger","_workspace","_interopRequireWildcard","_legacyBitId","_bitId","_exceptions","_importer","_interopRequireDefault","_lodash","_hasWildcard","_listScope","_bitError","_deleteComponentFiles","_dependencyResolver","_componentIssues","_issues","_pMapSeries","_component","_exceptions2","_packageJsonUtils","_removeCmd","_removeComponents","_remove","_remove2","_recoverCmd","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","importer","depResolver","remove","componentsPattern","force","remote","track","deleteFiles","fromLane","_this$workspace","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","BitIds","fromArray","onDestroy","removeLocallyByIds","OutsideWorkspaceError","results","bitMap","write","markRemoveComps","componentIds","components","getMany","removeComponentsFromNodeModules","map","c","state","_consumer","compId","addComponentConfig","RemoveAspect","id","removed","_legacy","deleteComponentsFiles","markRemoveOnMain","ConsumerNotFound","isOnMain","Error","idsByPattern","newComps","filter","hasVersion","length","BitError","toString","join","recover","compIdStr","options","bitMapEntry","find","compMap","name","toStringWithoutVersion","importComp","idStr","import","installNpmPackages","skipDependencyInstallation","override","setAsRemovedFalse","addSpecificComponentConfig","_bitMapEntry$config","config","_bitMapEntry$config2","resolveComponentId","comp","isRemoved","scope","currentLane","getCurrentLaneObject","idOnLane","getComponent","compIdWithPossibleVer","changeVersion","head","compFromScope","err","VersionNotFound","version","getRemoteComponent","throwForMainComponentWhenOnLane","laneComps","toBitIds","mainComps","hasWithoutVersion","getRemoveInfo","component","_component$config$ext","extensions","findExtension","isRemovedByIdWithoutLoadingComponent","componentId","bitmapEntry","getBitmapEntryIfExist","modelComp","getBitObjectModelComponent","versionObj","getBitObjectVersion","getRemovedStaged","getRemovedStagedFromMain","getRemovedStagedFromLane","addRemovedDependenciesIssues","pMapSeries","addRemovedDepIssue","dependencies","getComponentDependencies","removedWithUndefined","Promise","all","dep","undefined","compact","issues","getOrCreate","IssuesClasses","RemovedDependencies","stagedConfig","getStagedConfig","getAll","compConfig","_compConfig$config","_compConfig$config$Re","laneIds","workspaceIds","listIds","laneIdsNotInWorkspace","wId","isEqualWithoutVersion","laneCompIdsNotInWorkspace","resolveMultipleComponentIds","comps","staged","snapDistance","getSnapDistance","warn","isSourceAhead","hasWildcard","getRemoteBitIdsByWildcards","BitId","parse","provider","cli","loggerMain","componentAspect","importerMain","createLogger","removeMain","registerAddComponentsIssues","bind","registerShowFragments","RemoveFragment","register","RemoveCmd","RecoverCmd","exports","_defineProperty2","WorkspaceAspect","CLIAspect","LoggerAspect","ComponentAspect","ImporterAspect","DependencyResolverAspect","IssuesAspect","MainRuntime","addRuntime","_default"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WorkspaceAspect, { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport ImporterAspect, { ImporterMain } from '@teambit/importer';\nimport { compact } from 'lodash';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport { getRemoteBitIdsByWildcards } from '@teambit/legacy/dist/api/consumer/lib/list-scope';\nimport { ComponentID } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport IssuesAspect, { IssuesMain } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport ComponentAspect, { Component, ComponentMain } from '@teambit/component';\nimport { VersionNotFound } from '@teambit/legacy/dist/scope/exceptions';\nimport { removeComponentsFromNodeModules } from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport { RemoveCmd } from './remove-cmd';\nimport { removeComponents } from './remove-components';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\nimport { RecoverCmd, RecoverOptions } from './recover-cmd';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n};\n\nexport class RemoveMain {\n constructor(\n private workspace: Workspace,\n public logger: Logger,\n private importer: ImporterMain,\n private depResolver: DependencyResolverMain\n ) {}\n\n async remove({\n componentsPattern,\n force = false,\n remote = false,\n track = false,\n deleteFiles = true,\n fromLane = false,\n }: {\n componentsPattern: string;\n force?: boolean;\n remote?: boolean;\n track?: boolean;\n deleteFiles?: boolean;\n fromLane?: boolean;\n }): Promise<any> {\n this.logger.setStatusLine(BEFORE_REMOVE);\n const bitIds = remote\n ? await this.getRemoteBitIdsToRemove(componentsPattern)\n : await this.getLocalBitIdsToRemove(componentsPattern);\n this.logger.setStatusLine(BEFORE_REMOVE); // again because the loader might changed when talking to the remote\n const consumer = this.workspace?.consumer;\n const removeResults = await removeComponents({\n consumer,\n ids: BitIds.fromArray(bitIds),\n force,\n remote,\n track,\n deleteFiles,\n fromLane,\n });\n if (consumer) await consumer.onDestroy();\n return removeResults;\n }\n\n /**\n * remove components from the workspace.\n */\n async removeLocallyByIds(ids: BitId[], { force = false }: { force?: boolean } = {}) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const results = await removeComponents({\n consumer: this.workspace.consumer,\n ids: BitIds.fromArray(ids),\n force,\n remote: false,\n track: false,\n deleteFiles: true,\n fromLane: false,\n });\n await this.workspace.bitMap.write();\n\n return results;\n }\n\n async markRemoveComps(componentIds: ComponentID[]) {\n const components = await this.workspace.getMany(componentIds);\n await removeComponentsFromNodeModules(\n this.workspace.consumer,\n components.map((c) => c.state._consumer)\n );\n // don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted\n // during this removal along with the entire component dir.\n componentIds.map((compId) =>\n this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, {\n removed: true,\n })\n );\n await this.workspace.bitMap.write();\n const bitIds = BitIds.fromArray(componentIds.map((id) => id._legacy));\n await deleteComponentsFiles(this.workspace.consumer, bitIds);\n\n return componentIds;\n }\n\n async markRemoveOnMain(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n if (!this.workspace.isOnMain()) {\n throw new Error(`markRemoveOnMain expects to get called when on main`);\n }\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n\n const newComps = componentIds.filter((id) => !id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `unable to mark-remove the following new component(s), please remove them without --delete\\n${newComps\n .map((id) => id.toString())\n .join('\\n')}`\n );\n }\n\n return this.markRemoveComps(componentIds);\n }\n\n /**\n * recover a soft-removed component.\n * there are 4 different scenarios.\n * 1. a component was just soft-removed, it wasn't snapped yet. so it's now in .bitmap with the \"removed\" aspect entry.\n * 2. soft-removed and then snapped. It's not in .bitmap now.\n * 3. soft-removed, snapped, exported. it's not in .bitmap now.\n * 4. a soft-removed components was imported, so it's now in .bitmap without the \"removed\" aspect entry.\n * 5. workspace is empty. the soft-removed component is on the remote.\n * returns `true` if it was recovered. `false` if the component wasn't soft-removed, so nothing to recover from.\n */\n async recover(compIdStr: string, options: RecoverOptions): Promise<boolean> {\n if (!this.workspace) throw new ConsumerNotFound();\n const bitMapEntry = this.workspace.consumer.bitMap.components.find((compMap) => {\n return compMap.id.name === compIdStr || compMap.id.toStringWithoutVersion() === compIdStr;\n });\n const importComp = async (idStr: string) => {\n await this.importer.import({\n ids: [idStr],\n installNpmPackages: !options.skipDependencyInstallation,\n override: true,\n });\n };\n const setAsRemovedFalse = async (compId: ComponentID) => {\n await this.workspace.addSpecificComponentConfig(compId, RemoveAspect.id, { removed: false });\n await this.workspace.bitMap.write();\n };\n if (bitMapEntry) {\n if (bitMapEntry.config?.[RemoveAspect.id]) {\n // case #1\n delete bitMapEntry.config?.[RemoveAspect.id];\n await importComp(bitMapEntry.id.toString());\n return true;\n }\n // case #4\n const compId = await this.workspace.resolveComponentId(bitMapEntry.id);\n const comp = await this.workspace.get(compId);\n if (!this.isRemoved(comp)) {\n return false;\n }\n await setAsRemovedFalse(compId);\n return true;\n }\n const compId = await this.workspace.scope.resolveComponentId(compIdStr);\n const currentLane = await this.workspace.getCurrentLaneObject();\n const idOnLane = currentLane?.getComponent(compId._legacy);\n const compIdWithPossibleVer = idOnLane ? compId.changeVersion(idOnLane.head.toString()) : compId;\n let compFromScope: Component | undefined;\n try {\n compFromScope = await this.workspace.scope.get(compIdWithPossibleVer);\n } catch (err: any) {\n if (err instanceof VersionNotFound && err.version === '0.0.0') {\n throw new BitError(\n `unable to find the component ${compIdWithPossibleVer.toString()} in the current lane or main`\n );\n }\n throw err;\n }\n if (compFromScope && this.isRemoved(compFromScope)) {\n // case #2 and #3\n await importComp(compIdWithPossibleVer._legacy.toString());\n await setAsRemovedFalse(compIdWithPossibleVer);\n return true;\n }\n // case #5\n const comp = await this.workspace.scope.getRemoteComponent(compId);\n if (!this.isRemoved(comp)) {\n return false;\n }\n await importComp(compId._legacy.toString());\n await setAsRemovedFalse(compId);\n\n return true;\n }\n\n private async throwForMainComponentWhenOnLane(components: Component[]) {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return; // user on main\n const laneComps = currentLane.toBitIds();\n const mainComps = components.filter((comp) => !laneComps.hasWithoutVersion(comp.id._legacy));\n if (mainComps.length) {\n throw new BitError(`the following components belong to main, they cannot be soft-removed when on a lane. consider removing them without --soft.\n${mainComps.map((c) => c.id.toString()).join('\\n')}`);\n }\n }\n\n getRemoveInfo(component: Component): RemoveInfo {\n const data = component.config.extensions.findExtension(RemoveAspect.id)?.config as RemoveInfo | undefined;\n return {\n removed: data?.removed || false,\n };\n }\n\n isRemoved(component: Component): boolean {\n return this.getRemoveInfo(component).removed;\n }\n\n /**\n * performant version of isRemoved() in case the component object is not available and loading it is expensive.\n */\n async isRemovedByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean> {\n if (!componentId.hasVersion()) return false;\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId);\n if (bitmapEntry && bitmapEntry.isRemoved()) return true;\n const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId);\n if (!modelComp) return false;\n const versionObj = await this.workspace.scope.getBitObjectVersion(modelComp, componentId.version);\n if (!versionObj) return false;\n return versionObj.isRemoved();\n }\n\n /**\n * get components that were soft-removed and tagged/snapped/merged but not exported yet.\n */\n async getRemovedStaged(): Promise<ComponentID[]> {\n return this.workspace.isOnMain() ? this.getRemovedStagedFromMain() : this.getRemovedStagedFromLane();\n }\n\n async addRemovedDependenciesIssues(components: Component[]) {\n await pMapSeries(components, async (component) => {\n await this.addRemovedDepIssue(component);\n });\n }\n\n private async addRemovedDepIssue(component: Component) {\n const dependencies = await this.depResolver.getComponentDependencies(component);\n const removedWithUndefined = await Promise.all(\n dependencies.map(async (dep) => {\n const isRemoved = await this.isRemovedByIdWithoutLoadingComponent(dep.componentId);\n if (isRemoved) return dep.componentId;\n return undefined;\n })\n );\n const removed = compact(removedWithUndefined).map((id) => id.toString());\n if (removed.length) {\n component.state.issues.getOrCreate(IssuesClasses.RemovedDependencies).data = removed;\n }\n }\n\n private async getRemovedStagedFromMain(): Promise<ComponentID[]> {\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n return stagedConfig\n .getAll()\n .filter((compConfig) => compConfig.config?.[RemoveAspect.id]?.removed)\n .map((compConfig) => compConfig.id);\n }\n\n private async getRemovedStagedFromLane(): Promise<ComponentID[]> {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return [];\n const laneIds = currentLane.toBitIds();\n const workspaceIds = await this.workspace.listIds();\n const laneIdsNotInWorkspace = laneIds.filter(\n (id) => !workspaceIds.find((wId) => wId._legacy.isEqualWithoutVersion(id))\n );\n if (!laneIdsNotInWorkspace.length) return [];\n const laneCompIdsNotInWorkspace = await this.workspace.scope.resolveMultipleComponentIds(laneIdsNotInWorkspace);\n const comps = await this.workspace.scope.getMany(laneCompIdsNotInWorkspace);\n const removed = comps.filter((c) => this.isRemoved(c));\n const staged = await Promise.all(\n removed.map(async (c) => {\n const snapDistance = await this.workspace.scope.getSnapDistance(c.id, false);\n if (snapDistance.err) {\n this.logger.warn(\n `getRemovedStagedFromLane unable to get snapDistance for ${c.id.toString()} due to ${snapDistance.err.name}`\n );\n // todo: not clear what should be done here. should we consider it as removed-staged or not.\n }\n if (snapDistance.isSourceAhead()) return c.id;\n return undefined;\n })\n );\n return compact(staged);\n }\n\n private async getLocalBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n return componentIds.map((id) => id._legacy);\n }\n\n private async getRemoteBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (hasWildcard(componentsPattern)) {\n return getRemoteBitIdsByWildcards(componentsPattern);\n }\n return [BitId.parse(componentsPattern, true)];\n }\n\n static slots = [];\n static dependencies = [\n WorkspaceAspect,\n CLIAspect,\n LoggerAspect,\n ComponentAspect,\n ImporterAspect,\n DependencyResolverAspect,\n IssuesAspect,\n ];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain, componentAspect, importerMain, depResolver, issues]: [\n Workspace,\n CLIMain,\n LoggerMain,\n ComponentMain,\n ImporterMain,\n DependencyResolverMain,\n IssuesMain\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger, importerMain, depResolver);\n issues.registerAddComponentsIssues(removeMain.addRemovedDependenciesIssues.bind(removeMain));\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(new RemoveCmd(removeMain, workspace), new RecoverCmd(removeMain));\n return removeMain;\n }\n}\n\nRemoveAspect.addRuntime(RemoveMain);\n\nexport default RemoveMain;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAA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AAC+C,IAAI,CAACF,UAAU,CAAC,CAAC;IAC5FH,eAAe,CAACM,qBAAqB,CAAC,CAAC,KAAIC,yBAAc,EAACJ,UAAU,CAAC,CAAC,CAAC;IACvEL,GAAG,CAACU,QAAQ,CAAC,KAAIC,sBAAS,EAACN,UAAU,EAAE7J,SAAS,CAAC,EAAE,KAAIoK,wBAAU,EAACP,UAAU,CAAC,CAAC;IAC9E,OAAOA,UAAU;EACnB;AACF;AAACQ,OAAA,CAAAvK,UAAA,GAAAA,UAAA;AAAA,IAAAwK,gBAAA,GAAAxL,OAAA,EA3TYgB,UAAU,WA+RN,EAAE;AAAA,IAAAwK,gBAAA,GAAAxL,OAAA,EA/RNgB,UAAU,kBAgSC,CACpByK,oBAAe,EACfC,gBAAS,EACTC,sBAAY,EACZC,oBAAe,EACfC,mBAAc,EACdC,8CAAwB,EACxBC,iBAAY,CACb;AAAA,IAAAP,gBAAA,GAAAxL,OAAA,EAxSUgB,UAAU,aAySJgL,kBAAW;AAoB9BvI,sBAAY,CAACwI,UAAU,CAACjL,UAAU,CAAC;AAAC,IAAAkL,QAAA,GAErBlL,UAAU;AAAAuK,OAAA,CAAAvL,OAAA,GAAAkM,QAAA"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/remove",
3
- "version": "0.0.304",
3
+ "version": "0.0.305",
4
4
  "homepage": "https://bit.cloud/teambit/component/remove",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "remove",
9
- "version": "0.0.304"
9
+ "version": "0.0.305"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -22,11 +22,14 @@
22
22
  "@teambit/component-id": "0.0.427",
23
23
  "@teambit/legacy-bit-id": "0.0.423",
24
24
  "@teambit/bit-error": "0.0.402",
25
- "@teambit/cli": "0.0.753",
26
- "@teambit/workspace": "0.0.1127",
27
- "@teambit/component": "0.0.1127",
28
- "@teambit/importer": "0.0.556",
29
- "@teambit/logger": "0.0.846"
25
+ "@teambit/cli": "0.0.754",
26
+ "@teambit/workspace": "0.0.1128",
27
+ "@teambit/component": "0.0.1128",
28
+ "@teambit/component-issues": "0.0.94",
29
+ "@teambit/dependency-resolver": "0.0.1128",
30
+ "@teambit/importer": "0.0.557",
31
+ "@teambit/issues": "0.0.436",
32
+ "@teambit/logger": "0.0.847"
30
33
  },
31
34
  "devDependencies": {
32
35
  "@types/lodash": "4.14.165",
@@ -38,7 +41,7 @@
38
41
  "@types/testing-library__jest-dom": "5.9.5"
39
42
  },
40
43
  "peerDependencies": {
41
- "@teambit/legacy": "1.0.535",
44
+ "@teambit/legacy": "1.0.536",
42
45
  "react": "^16.8.0 || ^17.0.0",
43
46
  "react-dom": "^16.8.0 || ^17.0.0"
44
47
  },