@teambit/workspace 1.0.295 → 1.0.297

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.
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.295/dist/workspace.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.295/dist/workspace.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.297/dist/workspace.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.297/dist/workspace.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -283,7 +283,15 @@ export declare class Workspace implements ComponentFactory {
283
283
  */
284
284
  get(componentId: ComponentID, legacyComponent?: ConsumerComponent, useCache?: boolean, storeInCache?: boolean, loadOpts?: ComponentLoadOptions): Promise<Component>;
285
285
  getConfiguredUserAspectsPackages(options: GetConfiguredUserAspectsPackagesOptions): Promise<AspectPackage[]>;
286
+ /**
287
+ * clears workspace, scope and all components caches.
288
+ * doesn't clear the dependencies-data from the filesystem-cache.
289
+ */
286
290
  clearCache(options?: ClearCacheOptions): Promise<void>;
291
+ /**
292
+ * clear the cache of all components in the workspace.
293
+ * doesn't clear the dependencies-data from the filesystem-cache.
294
+ */
287
295
  clearAllComponentsCache(): void;
288
296
  clearComponentCache(id: ComponentID): void;
289
297
  warmCache(): Promise<void>;
package/dist/workspace.js CHANGED
@@ -851,16 +851,24 @@ it's possible that the version ${component.id.version} belong to ${idStr.split('
851
851
  const workspaceAspectsLoader = this.getWorkspaceAspectsLoader();
852
852
  return workspaceAspectsLoader.getConfiguredUserAspectsPackages(options);
853
853
  }
854
+
855
+ /**
856
+ * clears workspace, scope and all components caches.
857
+ * doesn't clear the dependencies-data from the filesystem-cache.
858
+ */
854
859
  async clearCache(options = {}) {
860
+ this.logger.debug('clearing the workspace and scope caches');
855
861
  this.aspectLoader.resetFailedLoadAspects();
856
862
  if (!options.skipClearFailedToLoadEnvs) this.envs.resetFailedToLoadEnvs();
857
- this.logger.debug('clearing the workspace and scope caches');
858
- this.componentLoader.clearCache();
859
- this.componentStatusLoader.clearCache();
860
863
  await this.scope.clearCache();
861
- this.componentList = new (_componentsList().default)(this.consumer);
862
864
  this.componentDefaultScopeFromComponentDirAndNameWithoutConfigFileMemoized.clear();
865
+ this.clearAllComponentsCache();
863
866
  }
867
+
868
+ /**
869
+ * clear the cache of all components in the workspace.
870
+ * doesn't clear the dependencies-data from the filesystem-cache.
871
+ */
864
872
  clearAllComponentsCache() {
865
873
  this.logger.debug('clearing all components caches');
866
874
  this.componentLoader.clearCache();