@teambit/workspace 1.0.1110 → 1.0.1112
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/dist/{preview-1787065925513.js → preview-1787147173446.js} +2 -2
- package/dist/workspace-component/workspace-component-loader.d.ts +5 -0
- package/dist/workspace-component/workspace-component-loader.js +12 -2
- package/dist/workspace-component/workspace-component-loader.js.map +1 -1
- package/dist/workspace.js +9 -5
- package/dist/workspace.js.map +1 -1
- package/package.json +25 -25
- package/workspace-component/workspace-component-loader.ts +12 -2
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1112",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/workspace/workspace",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "workspace",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.1112"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -94,29 +94,29 @@
|
|
|
94
94
|
"@teambit/workspace.hooks.use-url-change-broadcaster": "0.0.2",
|
|
95
95
|
"@teambit/workspace.ui.preserve-workspace-mode": "0.0.3",
|
|
96
96
|
"@teambit/evangelist.elements.icon": "1.0.5",
|
|
97
|
-
"@teambit/component": "1.0.
|
|
98
|
-
"@teambit/dependency-resolver": "1.0.
|
|
99
|
-
"@teambit/envs": "1.0.
|
|
100
|
-
"@teambit/logger": "0.0.
|
|
101
|
-
"@teambit/objects": "0.0.
|
|
102
|
-
"@teambit/scope": "1.0.
|
|
103
|
-
"@teambit/graph": "1.0.
|
|
104
|
-
"@teambit/cli": "0.0.
|
|
105
|
-
"@teambit/config-store": "0.0.
|
|
106
|
-
"@teambit/isolator": "1.0.
|
|
107
|
-
"@teambit/component-tree": "1.0.
|
|
108
|
-
"@teambit/watcher": "1.0.
|
|
109
|
-
"@teambit/aspect-loader": "1.0.
|
|
110
|
-
"@teambit/config": "0.0.
|
|
111
|
-
"@teambit/graphql": "1.0.
|
|
112
|
-
"@teambit/bundler": "1.0.
|
|
113
|
-
"@teambit/global-config": "0.0.
|
|
114
|
-
"@teambit/ui": "1.0.
|
|
115
|
-
"@teambit/variants": "0.0.
|
|
116
|
-
"@teambit/command-bar": "1.0.
|
|
117
|
-
"@teambit/sidebar": "1.0.
|
|
118
|
-
"@teambit/pubsub": "1.0.
|
|
119
|
-
"@teambit/deprecation": "1.0.
|
|
97
|
+
"@teambit/component": "1.0.1112",
|
|
98
|
+
"@teambit/dependency-resolver": "1.0.1112",
|
|
99
|
+
"@teambit/envs": "1.0.1112",
|
|
100
|
+
"@teambit/logger": "0.0.1463",
|
|
101
|
+
"@teambit/objects": "0.0.619",
|
|
102
|
+
"@teambit/scope": "1.0.1112",
|
|
103
|
+
"@teambit/graph": "1.0.1112",
|
|
104
|
+
"@teambit/cli": "0.0.1370",
|
|
105
|
+
"@teambit/config-store": "0.0.251",
|
|
106
|
+
"@teambit/isolator": "1.0.1112",
|
|
107
|
+
"@teambit/component-tree": "1.0.1112",
|
|
108
|
+
"@teambit/watcher": "1.0.1112",
|
|
109
|
+
"@teambit/aspect-loader": "1.0.1112",
|
|
110
|
+
"@teambit/config": "0.0.1545",
|
|
111
|
+
"@teambit/graphql": "1.0.1112",
|
|
112
|
+
"@teambit/bundler": "1.0.1112",
|
|
113
|
+
"@teambit/global-config": "0.0.1374",
|
|
114
|
+
"@teambit/ui": "1.0.1112",
|
|
115
|
+
"@teambit/variants": "0.0.1638",
|
|
116
|
+
"@teambit/command-bar": "1.0.1112",
|
|
117
|
+
"@teambit/sidebar": "1.0.1112",
|
|
118
|
+
"@teambit/pubsub": "1.0.1112",
|
|
119
|
+
"@teambit/deprecation": "1.0.1112"
|
|
120
120
|
},
|
|
121
121
|
"devDependencies": {
|
|
122
122
|
"@types/lodash": "4.14.165",
|
|
@@ -905,7 +905,15 @@ export class WorkspaceComponentLoader {
|
|
|
905
905
|
}
|
|
906
906
|
|
|
907
907
|
clearComponentCache(id: ComponentID) {
|
|
908
|
-
|
|
908
|
+
this.clearComponentsCache([id]);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* bulk version of clearComponentCache. scans each cache once for all the given ids, rather
|
|
913
|
+
* than once per id, so clearing many components stays cheap.
|
|
914
|
+
*/
|
|
915
|
+
clearComponentsCache(ids: ComponentID[]) {
|
|
916
|
+
const idsStr = new Set(ids.map((id) => id.toString()));
|
|
909
917
|
const cachesToClear = [
|
|
910
918
|
this.componentsCache,
|
|
911
919
|
this.scopeComponentsCache,
|
|
@@ -914,7 +922,9 @@ export class WorkspaceComponentLoader {
|
|
|
914
922
|
];
|
|
915
923
|
cachesToClear.forEach((cache) => {
|
|
916
924
|
for (const cacheKey of cache.keys()) {
|
|
917
|
-
|
|
925
|
+
// the cache key is either the id-str alone or `${idStr}:${loadOptsStr}`
|
|
926
|
+
const cacheKeyIdStr = cacheKey.split(':')[0];
|
|
927
|
+
if (idsStr.has(cacheKeyIdStr)) {
|
|
918
928
|
cache.delete(cacheKey);
|
|
919
929
|
}
|
|
920
930
|
}
|