@teambit/harmony.testing.load-aspect 0.0.184 → 0.0.186
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/load-aspect.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Harmony, Aspect } from '@teambit/harmony';
|
|
2
2
|
import { Config } from '@teambit/harmony/dist/harmony-config';
|
|
3
3
|
/**
|
|
4
|
+
* ! important ! prefer using `loadManyAspects` instead of this function. otherwise, you may end up with
|
|
5
|
+
* different instances of "Workspace" aspect for example for each one of the aspects you load.
|
|
6
|
+
*
|
|
4
7
|
* to make this work, export the main also as default (e.g. `export default LanesMain;`).
|
|
5
8
|
* otherwise, it'll show an error "TypeError: Cannot read property 'runtime' of undefined".
|
|
6
9
|
*/
|
package/dist/load-aspect.js
CHANGED
|
@@ -27,7 +27,6 @@ const component_loader_1 = __importDefault(require("@teambit/legacy/dist/consume
|
|
|
27
27
|
const component_config_1 = __importDefault(require("@teambit/legacy/dist/consumer/config/component-config"));
|
|
28
28
|
const component_overrides_1 = __importDefault(require("@teambit/legacy/dist/consumer/config/component-overrides"));
|
|
29
29
|
const workspace_modules_node_modules_linker_1 = require("@teambit/workspace.modules.node-modules-linker");
|
|
30
|
-
const config_1 = require("@teambit/legacy/dist/consumer/config");
|
|
31
30
|
const workspace_config_1 = __importDefault(require("@teambit/legacy/dist/consumer/config/workspace-config"));
|
|
32
31
|
const dependencies_1 = __importDefault(require("@teambit/dependencies"));
|
|
33
32
|
function getPackageName(aspect, id) {
|
|
@@ -36,6 +35,9 @@ function getPackageName(aspect, id) {
|
|
|
36
35
|
// return `@${owner}/${replaceAll(name, '/', '.')}`;
|
|
37
36
|
}
|
|
38
37
|
/**
|
|
38
|
+
* ! important ! prefer using `loadManyAspects` instead of this function. otherwise, you may end up with
|
|
39
|
+
* different instances of "Workspace" aspect for example for each one of the aspects you load.
|
|
40
|
+
*
|
|
39
41
|
* to make this work, export the main also as default (e.g. `export default LanesMain;`).
|
|
40
42
|
* otherwise, it'll show an error "TypeError: Cannot read property 'runtime' of undefined".
|
|
41
43
|
*/
|
|
@@ -132,7 +134,9 @@ function clearGlobalsIfNeeded() {
|
|
|
132
134
|
workspace_modules_node_modules_linker_1.PackageJsonTransformer.packageJsonTransformersRegistry = [];
|
|
133
135
|
// @ts-ignore
|
|
134
136
|
component_loader_1.default.loadDeps = undefined;
|
|
135
|
-
|
|
137
|
+
// don't clear this one. it's a static list of core-ids. if you delete it, you'll have to call
|
|
138
|
+
// registerCoreExtensions() from @teambit/bit, which as far as I remember should not be a dependency of this aspect.
|
|
139
|
+
// ExtensionDataList.coreExtensionsNames = new Map();
|
|
136
140
|
// @ts-ignore
|
|
137
141
|
workspace_config_1.default.workspaceConfigEnsuringRegistry = undefined;
|
|
138
142
|
// @ts-ignore
|
package/dist/load-aspect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-aspect.js","sourceRoot":"","sources":["../load-aspect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+BAAqC;AACrC,4DAA8E;AAC9E,sDAA2D;AAC3D,2BAAiC;AACjC,8CAAmD;AACnD,uFAAuF;AACvF,yEAA6E;AAC7E,kDAAiD;AACjD,sCAAyC;AACzC,wCAA2C;AAC3C,gHAAuF;AACvF,6GAAoF;AACpF,mHAA0F;AAC1F,0GAAwF;AACxF,
|
|
1
|
+
{"version":3,"file":"load-aspect.js","sourceRoot":"","sources":["../load-aspect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+BAAqC;AACrC,4DAA8E;AAC9E,sDAA2D;AAC3D,2BAAiC;AACjC,8CAAmD;AACnD,uFAAuF;AACvF,yEAA6E;AAC7E,kDAAiD;AACjD,sCAAyC;AACzC,wCAA2C;AAC3C,gHAAuF;AACvF,6GAAoF;AACpF,mHAA0F;AAC1F,0GAAwF;AACxF,6GAAoF;AACpF,yEAAuD;AAEvD,SAAS,cAAc,CAAC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C;IACpD,8DAAsB,CAAC,+BAA+B,GAAG,EAAE,CAAC;IAC5D,aAAa;IACb,0BAAe,CAAC,QAAQ,GAAG,SAAS,CAAC;IACrC,8FAA8F;IAC9F,oHAAoH;IACpH,qDAAqD;IACrD,aAAa;IACb,0BAAe,CAAC,+BAA+B,GAAG,SAAS,CAAC;IAC5D,aAAa;IACb,0BAAe,CAAC,8BAA8B,GAAG,SAAS,CAAC;IAC3D,aAAa;IACb,0BAAe,CAAC,8BAA8B,GAAG,SAAS,CAAC;AAC7D,CAAC"}
|
package/load-aspect.ts
CHANGED
|
@@ -12,7 +12,6 @@ import ComponentLoader from '@teambit/legacy/dist/consumer/component/component-l
|
|
|
12
12
|
import ComponentConfig from '@teambit/legacy/dist/consumer/config/component-config';
|
|
13
13
|
import ComponentOverrides from '@teambit/legacy/dist/consumer/config/component-overrides';
|
|
14
14
|
import { PackageJsonTransformer } from '@teambit/workspace.modules.node-modules-linker';
|
|
15
|
-
import { ExtensionDataList } from '@teambit/legacy/dist/consumer/config';
|
|
16
15
|
import WorkspaceConfig from '@teambit/legacy/dist/consumer/config/workspace-config';
|
|
17
16
|
import DependenciesAspect from '@teambit/dependencies';
|
|
18
17
|
|
|
@@ -23,6 +22,9 @@ function getPackageName(aspect: any, id: ComponentID) {
|
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
/**
|
|
25
|
+
* ! important ! prefer using `loadManyAspects` instead of this function. otherwise, you may end up with
|
|
26
|
+
* different instances of "Workspace" aspect for example for each one of the aspects you load.
|
|
27
|
+
*
|
|
26
28
|
* to make this work, export the main also as default (e.g. `export default LanesMain;`).
|
|
27
29
|
* otherwise, it'll show an error "TypeError: Cannot read property 'runtime' of undefined".
|
|
28
30
|
*/
|
|
@@ -122,7 +124,9 @@ function clearGlobalsIfNeeded() {
|
|
|
122
124
|
PackageJsonTransformer.packageJsonTransformersRegistry = [];
|
|
123
125
|
// @ts-ignore
|
|
124
126
|
ComponentLoader.loadDeps = undefined;
|
|
125
|
-
|
|
127
|
+
// don't clear this one. it's a static list of core-ids. if you delete it, you'll have to call
|
|
128
|
+
// registerCoreExtensions() from @teambit/bit, which as far as I remember should not be a dependency of this aspect.
|
|
129
|
+
// ExtensionDataList.coreExtensionsNames = new Map();
|
|
126
130
|
// @ts-ignore
|
|
127
131
|
WorkspaceConfig.workspaceConfigEnsuringRegistry = undefined;
|
|
128
132
|
// @ts-ignore
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/harmony.testing.load-aspect",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.186",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/testing/load-aspect",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "testing/load-aspect",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.186"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/harmony": "0.4.6",
|
|
13
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
|
13
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.164"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/mocha": "9.1.0",
|
|
File without changes
|