@teambit/workspace 1.0.157 → 1.0.159
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 +2 -2
- package/artifacts/preview/teambit_workspace_workspace-preview.js +1 -1
- package/artifacts/schema.json +31526 -0
- package/dist/{preview-1707102996254.js → preview-1707239008585.js} +2 -2
- package/dist/workspace.d.ts +3 -2
- package/dist/workspace.js +9 -16
- package/dist/workspace.js.map +1 -1
- package/package.json +29 -29
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.159/dist/workspace.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.159/dist/workspace.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/dist/workspace.d.ts
CHANGED
|
@@ -214,8 +214,9 @@ export declare class Workspace implements ComponentFactory {
|
|
|
214
214
|
listInvalid(): Promise<InvalidComponent[]>;
|
|
215
215
|
/**
|
|
216
216
|
* get ids of all workspace components.
|
|
217
|
+
* @todo: remove the "async", it's not a promise anymore.
|
|
217
218
|
*/
|
|
218
|
-
listIds(): Promise<
|
|
219
|
+
listIds(): Promise<ComponentIdList>;
|
|
219
220
|
listIdsIncludeRemoved(): ComponentIdList;
|
|
220
221
|
/**
|
|
221
222
|
* Check if a specific id exist in the workspace
|
|
@@ -267,7 +268,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
267
268
|
/**
|
|
268
269
|
* given component ids, find their dependents in the workspace
|
|
269
270
|
*/
|
|
270
|
-
getDependentsIds(ids: ComponentID[]): Promise<ComponentID[]>;
|
|
271
|
+
getDependentsIds(ids: ComponentID[], filterOutNowWorkspaceIds?: boolean): Promise<ComponentID[]>;
|
|
271
272
|
createAspectList(extensionDataList: ExtensionDataList): Promise<import("@teambit/component").AspectList>;
|
|
272
273
|
private extensionDataEntryToAspectEntry;
|
|
273
274
|
/**
|
package/dist/workspace.js
CHANGED
|
@@ -32,13 +32,6 @@ function _graph() {
|
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
|
-
function _scopeGraph() {
|
|
36
|
-
const data = _interopRequireDefault(require("@teambit/legacy/dist/scope/graph/scope-graph"));
|
|
37
|
-
_scopeGraph = function () {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
35
|
function _dependenciesModules() {
|
|
43
36
|
const data = require("@teambit/dependencies.modules.packages-excluder");
|
|
44
37
|
_dependenciesModules = function () {
|
|
@@ -570,13 +563,14 @@ class Workspace {
|
|
|
570
563
|
|
|
571
564
|
/**
|
|
572
565
|
* get ids of all workspace components.
|
|
566
|
+
* @todo: remove the "async", it's not a promise anymore.
|
|
573
567
|
*/
|
|
574
568
|
async listIds() {
|
|
575
569
|
if (this._cachedListIds && this.bitMap.hasChanged()) {
|
|
576
570
|
delete this._cachedListIds;
|
|
577
571
|
}
|
|
578
572
|
if (!this._cachedListIds) {
|
|
579
|
-
this._cachedListIds =
|
|
573
|
+
this._cachedListIds = this.consumer.bitmapIdsFromCurrentLane;
|
|
580
574
|
}
|
|
581
575
|
return this._cachedListIds;
|
|
582
576
|
}
|
|
@@ -772,14 +766,13 @@ it's possible that the version ${component.id.version} belong to ${idStr.split('
|
|
|
772
766
|
/**
|
|
773
767
|
* given component ids, find their dependents in the workspace
|
|
774
768
|
*/
|
|
775
|
-
async getDependentsIds(ids) {
|
|
776
|
-
const
|
|
777
|
-
const
|
|
778
|
-
const
|
|
779
|
-
|
|
780
|
-
const
|
|
781
|
-
|
|
782
|
-
return dependentsIds;
|
|
769
|
+
async getDependentsIds(ids, filterOutNowWorkspaceIds = true) {
|
|
770
|
+
const graph = await this.getGraphIds();
|
|
771
|
+
const dependents = ids.map(id => graph.predecessors(id.toString())).flat().map(node => node.attr);
|
|
772
|
+
const uniq = _componentId().ComponentIdList.uniqFromArray(dependents);
|
|
773
|
+
if (!filterOutNowWorkspaceIds) return uniq;
|
|
774
|
+
const workspaceIds = await this.listIds();
|
|
775
|
+
return uniq.filter(id => workspaceIds.has(id));
|
|
783
776
|
}
|
|
784
777
|
async createAspectList(extensionDataList) {
|
|
785
778
|
const entiresP = extensionDataList.map(entry => this.extensionDataEntryToAspectEntry(entry));
|