@teambit/workspace 0.0.844 → 0.0.847
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/index.d.ts +1 -0
- package/dist/index.js.map +1 -1
- package/dist/ui/workspace/use-workspace.js +3 -0
- package/dist/ui/workspace/use-workspace.js.map +1 -1
- package/dist/workspace-component/workspace-component-loader.js +6 -0
- package/dist/workspace-component/workspace-component-loader.js.map +1 -1
- package/dist/workspace.d.ts +9 -60
- package/dist/workspace.js +29 -411
- package/dist/workspace.js.map +1 -1
- package/dist/workspace.main.runtime.js +1 -11
- package/dist/workspace.main.runtime.js.map +1 -1
- package/dist/workspace.provider.d.ts +2 -4
- package/dist/workspace.provider.js +3 -66
- package/dist/workspace.provider.js.map +1 -1
- package/dist/workspace.ui.runtime.d.ts +2 -1
- package/dist/workspace.ui.runtime.js +27 -6
- package/dist/workspace.ui.runtime.js.map +1 -1
- package/package-tar/teambit-workspace-0.0.847.tgz +0 -0
- package/package.json +33 -42
- package/{preview-1662281577904.js → preview-1662694416892.js} +2 -2
- package/ui/workspace/use-workspace.ts +3 -0
- package/workspace-component/workspace-component-loader.ts +5 -0
- package/workspace.ui.runtime.tsx +16 -6
- package/__snapshots__/pick-outdated-pkgs.spec.ts.snap +0 -171
- package/dist/__snapshots__/pick-outdated-pkgs.spec.js.snap +0 -171
- package/dist/__snapshots__/pick-outdated-pkgs.spec.ts.snap +0 -171
- package/dist/exceptions/dependency-type-not-supported-in-policy.d.ts +0 -4
- package/dist/exceptions/dependency-type-not-supported-in-policy.js +0 -27
- package/dist/exceptions/dependency-type-not-supported-in-policy.js.map +0 -1
- package/dist/exceptions/index.d.ts +0 -1
- package/dist/exceptions/index.js +0 -23
- package/dist/exceptions/index.js.map +0 -1
- package/dist/install.cmd.d.ts +0 -44
- package/dist/install.cmd.js +0 -85
- package/dist/install.cmd.js.map +0 -1
- package/dist/link/component-list-links.d.ts +0 -7
- package/dist/link/component-list-links.js +0 -98
- package/dist/link/component-list-links.js.map +0 -1
- package/dist/link/core-aspects-links.d.ts +0 -7
- package/dist/link/core-aspects-links.js +0 -95
- package/dist/link/core-aspects-links.js.map +0 -1
- package/dist/link/get-package-name-from-target.d.ts +0 -1
- package/dist/link/get-package-name-from-target.js +0 -16
- package/dist/link/get-package-name-from-target.js.map +0 -1
- package/dist/link/index.d.ts +0 -1
- package/dist/link/index.js +0 -23
- package/dist/link/index.js.map +0 -1
- package/dist/link/link-row.d.ts +0 -12
- package/dist/link/link-row.js +0 -38
- package/dist/link/link-row.js.map +0 -1
- package/dist/link/link-to-dir.d.ts +0 -2
- package/dist/link/link-to-dir.js +0 -45
- package/dist/link/link-to-dir.js.map +0 -1
- package/dist/link/link.cmd.d.ts +0 -44
- package/dist/link/link.cmd.js +0 -176
- package/dist/link/link.cmd.js.map +0 -1
- package/dist/link/nested-deps-in-nm-links.d.ts +0 -7
- package/dist/link/nested-deps-in-nm-links.js +0 -74
- package/dist/link/nested-deps-in-nm-links.js.map +0 -1
- package/dist/link/rewire-row.d.ts +0 -6
- package/dist/link/rewire-row.js +0 -31
- package/dist/link/rewire-row.js.map +0 -1
- package/dist/pick-outdated-pkgs.d.ts +0 -16
- package/dist/pick-outdated-pkgs.js +0 -308
- package/dist/pick-outdated-pkgs.js.map +0 -1
- package/dist/pick-outdated-pkgs.spec.d.ts +0 -1
- package/dist/pick-outdated-pkgs.spec.js +0 -121
- package/dist/pick-outdated-pkgs.spec.js.map +0 -1
- package/dist/uninstall.cmd.d.ts +0 -19
- package/dist/uninstall.cmd.js +0 -47
- package/dist/uninstall.cmd.js.map +0 -1
- package/dist/update.cmd.d.ts +0 -23
- package/dist/update.cmd.js +0 -47
- package/dist/update.cmd.js.map +0 -1
- package/exceptions/dependency-type-not-supported-in-policy.ts +0 -7
- package/exceptions/index.ts +0 -1
- package/install.cmd.tsx +0 -72
- package/link/component-list-links.ts +0 -50
- package/link/core-aspects-links.ts +0 -50
- package/link/get-package-name-from-target.ts +0 -5
- package/link/index.ts +0 -1
- package/link/link-row.ts +0 -20
- package/link/link-to-dir.ts +0 -13
- package/link/link.cmd.ts +0 -100
- package/link/nested-deps-in-nm-links.ts +0 -47
- package/link/rewire-row.ts +0 -17
- package/package-tar/teambit-workspace-0.0.844.tgz +0 -0
- package/uninstall.cmd.tsx +0 -23
- package/update.cmd.tsx +0 -29
package/workspace.ui.runtime.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentAspect, ComponentUI, ComponentModel } from '@teambit/component';
|
|
2
|
+
import { compact, flatten } from 'lodash';
|
|
2
3
|
import { ComponentTreeAspect, ComponentTreeUI, ComponentTreeNode } from '@teambit/component-tree';
|
|
3
4
|
import { Slot, SlotRegistry } from '@teambit/harmony';
|
|
4
5
|
import { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';
|
|
@@ -137,7 +138,7 @@ export class WorkspaceUI {
|
|
|
137
138
|
<Workspace
|
|
138
139
|
menuSlot={this.menuSlot}
|
|
139
140
|
routeSlot={this.routeSlot}
|
|
140
|
-
sidebar={<this.sidebar.render
|
|
141
|
+
sidebar={<this.sidebar.render items={this.listSidebarItems()} />}
|
|
141
142
|
workspaceUI={this}
|
|
142
143
|
onSidebarTogglerChange={this.setKeyBindHandler}
|
|
143
144
|
/>
|
|
@@ -147,6 +148,13 @@ export class WorkspaceUI {
|
|
|
147
148
|
};
|
|
148
149
|
}
|
|
149
150
|
|
|
151
|
+
listSidebarItems() {
|
|
152
|
+
const items = flatten(this.sidebarItemSlot.values());
|
|
153
|
+
return compact(items.map((item) => {
|
|
154
|
+
return item.component;
|
|
155
|
+
}));
|
|
156
|
+
}
|
|
157
|
+
|
|
150
158
|
private menuItems: MenuItem[] = [
|
|
151
159
|
{
|
|
152
160
|
category: 'general',
|
|
@@ -221,11 +229,13 @@ export class WorkspaceUI {
|
|
|
221
229
|
ui.registerRoot(workspaceUI.uiRoot.bind(workspaceUI));
|
|
222
230
|
workspaceUI.registerMenuItem(workspaceUI.menuItems);
|
|
223
231
|
|
|
224
|
-
workspaceUI.registerSidebarLink(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
232
|
+
workspaceUI.registerSidebarLink({
|
|
233
|
+
component: function Gallery() {
|
|
234
|
+
return <MenuLinkItem exact href="/" icon="comps">
|
|
235
|
+
Gallery
|
|
236
|
+
</MenuLinkItem>;
|
|
237
|
+
},
|
|
238
|
+
});
|
|
229
239
|
|
|
230
240
|
workspaceUI.registerMenuRoutes([
|
|
231
241
|
{
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`makeOutdatedPkgChoices should group component model updates of the same dependency 1`] = `
|
|
4
|
-
Array [
|
|
5
|
-
Object {
|
|
6
|
-
"choices": Array [
|
|
7
|
-
Object {
|
|
8
|
-
"message": "foo [90m(runtime)[39m * ❯ [91m[1m2.0.0[22m[39m because of comp1 and 1 other components ",
|
|
9
|
-
"name": "foo",
|
|
10
|
-
"value": Object {
|
|
11
|
-
"currentRange": "1.0.0",
|
|
12
|
-
"dependentComponents": Array [
|
|
13
|
-
"comp1",
|
|
14
|
-
"comp2",
|
|
15
|
-
],
|
|
16
|
-
"hasDifferentRanges": true,
|
|
17
|
-
"latestRange": "2.0.0",
|
|
18
|
-
"name": "foo",
|
|
19
|
-
"source": "rootPolicy",
|
|
20
|
-
"targetField": "dependencies",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
"message": "[36mRoot policies[39m",
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
exports[`makeOutdatedPkgChoices should group component model updates of the same dependency and display the current range when all components use the same range 1`] = `
|
|
30
|
-
Array [
|
|
31
|
-
Object {
|
|
32
|
-
"choices": Array [
|
|
33
|
-
Object {
|
|
34
|
-
"message": "foo [90m(runtime)[39m ^1.2.3 ❯ [91m[1m2.0.0[22m[39m because of comp1 and 1 other components ",
|
|
35
|
-
"name": "foo",
|
|
36
|
-
"value": Object {
|
|
37
|
-
"currentRange": "^1.2.3",
|
|
38
|
-
"dependentComponents": Array [
|
|
39
|
-
"comp1",
|
|
40
|
-
"comp2",
|
|
41
|
-
],
|
|
42
|
-
"latestRange": "2.0.0",
|
|
43
|
-
"name": "foo",
|
|
44
|
-
"source": "rootPolicy",
|
|
45
|
-
"targetField": "dependencies",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
"message": "[36mRoot policies[39m",
|
|
50
|
-
},
|
|
51
|
-
]
|
|
52
|
-
`;
|
|
53
|
-
|
|
54
|
-
exports[`makeOutdatedPkgChoices should group component model updates of the same dependency and use * as current range when can't compare ranges 1`] = `
|
|
55
|
-
Array [
|
|
56
|
-
Object {
|
|
57
|
-
"choices": Array [
|
|
58
|
-
Object {
|
|
59
|
-
"message": "foo [90m(runtime)[39m * ❯ [91m[1m2.0.0[22m[39m because of comp1 and 1 other components ",
|
|
60
|
-
"name": "foo",
|
|
61
|
-
"value": Object {
|
|
62
|
-
"currentRange": "*",
|
|
63
|
-
"dependentComponents": Array [
|
|
64
|
-
"comp1",
|
|
65
|
-
"comp2",
|
|
66
|
-
],
|
|
67
|
-
"hasDifferentRanges": true,
|
|
68
|
-
"latestRange": "2.0.0",
|
|
69
|
-
"name": "foo",
|
|
70
|
-
"source": "rootPolicy",
|
|
71
|
-
"targetField": "dependencies",
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
"message": "[36mRoot policies[39m",
|
|
76
|
-
},
|
|
77
|
-
]
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
exports[`makeOutdatedPkgChoices should render choices in correct order 1`] = `
|
|
81
|
-
Array [
|
|
82
|
-
Object {
|
|
83
|
-
"choices": Array [
|
|
84
|
-
Object {
|
|
85
|
-
"message": "foo [90m(runtime)[39m 1.0.0 ❯ [91m[1m2.0.0[22m[39m ",
|
|
86
|
-
"name": "foo",
|
|
87
|
-
"value": Object {
|
|
88
|
-
"currentRange": "1.0.0",
|
|
89
|
-
"latestRange": "2.0.0",
|
|
90
|
-
"name": "foo",
|
|
91
|
-
"source": "rootPolicy",
|
|
92
|
-
"targetField": "dependencies",
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
Object {
|
|
96
|
-
"message": "qar [90m(runtime)[39m 1.0.0 ❯ 1.[92m[1m1.0[22m[39m ",
|
|
97
|
-
"name": "qar",
|
|
98
|
-
"value": Object {
|
|
99
|
-
"currentRange": "1.0.0",
|
|
100
|
-
"latestRange": "1.1.0",
|
|
101
|
-
"name": "qar",
|
|
102
|
-
"source": "rootPolicy",
|
|
103
|
-
"targetField": "dependencies",
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
Object {
|
|
107
|
-
"message": "zoo [90m(dev)[39m 1.0.0 ❯ 1.[92m[1m1.0[22m[39m ",
|
|
108
|
-
"name": "zoo",
|
|
109
|
-
"value": Object {
|
|
110
|
-
"currentRange": "1.0.0",
|
|
111
|
-
"latestRange": "1.1.0",
|
|
112
|
-
"name": "zoo",
|
|
113
|
-
"source": "rootPolicy",
|
|
114
|
-
"targetField": "devDependencies",
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
Object {
|
|
118
|
-
"message": "bar [90m(peer)[39m 1.0.0 ❯ 1.[92m[1m1.0[22m[39m ",
|
|
119
|
-
"name": "bar",
|
|
120
|
-
"value": Object {
|
|
121
|
-
"currentRange": "1.0.0",
|
|
122
|
-
"latestRange": "1.1.0",
|
|
123
|
-
"name": "bar",
|
|
124
|
-
"source": "rootPolicy",
|
|
125
|
-
"targetField": "peerDependencies",
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
"message": "[36mRoot policies[39m",
|
|
130
|
-
},
|
|
131
|
-
]
|
|
132
|
-
`;
|
|
133
|
-
|
|
134
|
-
exports[`makeOutdatedPkgChoices should render choices with context information 1`] = `
|
|
135
|
-
Array [
|
|
136
|
-
Object {
|
|
137
|
-
"choices": Array [
|
|
138
|
-
Object {
|
|
139
|
-
"message": "foo [90m(runtime)[39m 1.0.0 ❯ [91m[1m2.0.0[22m[39m ",
|
|
140
|
-
"name": "foo",
|
|
141
|
-
"value": Object {
|
|
142
|
-
"componentId": "comp1",
|
|
143
|
-
"currentRange": "1.0.0",
|
|
144
|
-
"latestRange": "2.0.0",
|
|
145
|
-
"name": "foo",
|
|
146
|
-
"source": "component",
|
|
147
|
-
"targetField": "dependencies",
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
],
|
|
151
|
-
"message": "[36mcomp1 (component)[39m",
|
|
152
|
-
},
|
|
153
|
-
Object {
|
|
154
|
-
"choices": Array [
|
|
155
|
-
Object {
|
|
156
|
-
"message": "bar [90m(peer)[39m 1.0.0 ❯ 1.[92m[1m1.0[22m[39m ",
|
|
157
|
-
"name": "bar",
|
|
158
|
-
"value": Object {
|
|
159
|
-
"currentRange": "1.0.0",
|
|
160
|
-
"latestRange": "1.1.0",
|
|
161
|
-
"name": "bar",
|
|
162
|
-
"source": "variants",
|
|
163
|
-
"targetField": "peerDependencies",
|
|
164
|
-
"variantPattern": "{comp2}",
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
],
|
|
168
|
-
"message": "[36m{comp2} (variant)[39m",
|
|
169
|
-
},
|
|
170
|
-
]
|
|
171
|
-
`;
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`makeOutdatedPkgChoices should group component model updates of the same dependency 1`] = `
|
|
4
|
-
Array [
|
|
5
|
-
Object {
|
|
6
|
-
"choices": Array [
|
|
7
|
-
Object {
|
|
8
|
-
"message": "foo [90m(runtime)[39m * ❯ 2.0.0 because of comp1 and 1 other components ",
|
|
9
|
-
"name": "foo",
|
|
10
|
-
"value": Object {
|
|
11
|
-
"currentRange": "1.0.0",
|
|
12
|
-
"dependentComponents": Array [
|
|
13
|
-
"comp1",
|
|
14
|
-
"comp2",
|
|
15
|
-
],
|
|
16
|
-
"hasDifferentRanges": true,
|
|
17
|
-
"latestRange": "2.0.0",
|
|
18
|
-
"name": "foo",
|
|
19
|
-
"source": "rootPolicy",
|
|
20
|
-
"targetField": "dependencies",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
"message": "[36mRoot policies[39m",
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
exports[`makeOutdatedPkgChoices should group component model updates of the same dependency and display the current range when all components use the same range 1`] = `
|
|
30
|
-
Array [
|
|
31
|
-
Object {
|
|
32
|
-
"choices": Array [
|
|
33
|
-
Object {
|
|
34
|
-
"message": "foo [90m(runtime)[39m ^1.2.3 ❯ 2.0.0 because of comp1 and 1 other components ",
|
|
35
|
-
"name": "foo",
|
|
36
|
-
"value": Object {
|
|
37
|
-
"currentRange": "^1.2.3",
|
|
38
|
-
"dependentComponents": Array [
|
|
39
|
-
"comp1",
|
|
40
|
-
"comp2",
|
|
41
|
-
],
|
|
42
|
-
"latestRange": "2.0.0",
|
|
43
|
-
"name": "foo",
|
|
44
|
-
"source": "rootPolicy",
|
|
45
|
-
"targetField": "dependencies",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
"message": "[36mRoot policies[39m",
|
|
50
|
-
},
|
|
51
|
-
]
|
|
52
|
-
`;
|
|
53
|
-
|
|
54
|
-
exports[`makeOutdatedPkgChoices should group component model updates of the same dependency and use * as current range when can't compare ranges 1`] = `
|
|
55
|
-
Array [
|
|
56
|
-
Object {
|
|
57
|
-
"choices": Array [
|
|
58
|
-
Object {
|
|
59
|
-
"message": "foo [90m(runtime)[39m * ❯ 2.0.0 because of comp1 and 1 other components ",
|
|
60
|
-
"name": "foo",
|
|
61
|
-
"value": Object {
|
|
62
|
-
"currentRange": "*",
|
|
63
|
-
"dependentComponents": Array [
|
|
64
|
-
"comp1",
|
|
65
|
-
"comp2",
|
|
66
|
-
],
|
|
67
|
-
"hasDifferentRanges": true,
|
|
68
|
-
"latestRange": "2.0.0",
|
|
69
|
-
"name": "foo",
|
|
70
|
-
"source": "rootPolicy",
|
|
71
|
-
"targetField": "dependencies",
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
"message": "[36mRoot policies[39m",
|
|
76
|
-
},
|
|
77
|
-
]
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
exports[`makeOutdatedPkgChoices should render choices in correct order 1`] = `
|
|
81
|
-
Array [
|
|
82
|
-
Object {
|
|
83
|
-
"choices": Array [
|
|
84
|
-
Object {
|
|
85
|
-
"message": "foo [90m(runtime)[39m 1.0.0 ❯ 2.0.0 ",
|
|
86
|
-
"name": "foo",
|
|
87
|
-
"value": Object {
|
|
88
|
-
"currentRange": "1.0.0",
|
|
89
|
-
"latestRange": "2.0.0",
|
|
90
|
-
"name": "foo",
|
|
91
|
-
"source": "rootPolicy",
|
|
92
|
-
"targetField": "dependencies",
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
Object {
|
|
96
|
-
"message": "qar [90m(runtime)[39m 1.0.0 ❯ 1.1.0 ",
|
|
97
|
-
"name": "qar",
|
|
98
|
-
"value": Object {
|
|
99
|
-
"currentRange": "1.0.0",
|
|
100
|
-
"latestRange": "1.1.0",
|
|
101
|
-
"name": "qar",
|
|
102
|
-
"source": "rootPolicy",
|
|
103
|
-
"targetField": "dependencies",
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
Object {
|
|
107
|
-
"message": "zoo [90m(dev)[39m 1.0.0 ❯ 1.1.0 ",
|
|
108
|
-
"name": "zoo",
|
|
109
|
-
"value": Object {
|
|
110
|
-
"currentRange": "1.0.0",
|
|
111
|
-
"latestRange": "1.1.0",
|
|
112
|
-
"name": "zoo",
|
|
113
|
-
"source": "rootPolicy",
|
|
114
|
-
"targetField": "devDependencies",
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
Object {
|
|
118
|
-
"message": "bar [90m(peer)[39m 1.0.0 ❯ 1.1.0 ",
|
|
119
|
-
"name": "bar",
|
|
120
|
-
"value": Object {
|
|
121
|
-
"currentRange": "1.0.0",
|
|
122
|
-
"latestRange": "1.1.0",
|
|
123
|
-
"name": "bar",
|
|
124
|
-
"source": "rootPolicy",
|
|
125
|
-
"targetField": "peerDependencies",
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
"message": "[36mRoot policies[39m",
|
|
130
|
-
},
|
|
131
|
-
]
|
|
132
|
-
`;
|
|
133
|
-
|
|
134
|
-
exports[`makeOutdatedPkgChoices should render choices with context information 1`] = `
|
|
135
|
-
Array [
|
|
136
|
-
Object {
|
|
137
|
-
"choices": Array [
|
|
138
|
-
Object {
|
|
139
|
-
"message": "foo [90m(runtime)[39m 1.0.0 ❯ 2.0.0 ",
|
|
140
|
-
"name": "foo",
|
|
141
|
-
"value": Object {
|
|
142
|
-
"componentId": "comp1",
|
|
143
|
-
"currentRange": "1.0.0",
|
|
144
|
-
"latestRange": "2.0.0",
|
|
145
|
-
"name": "foo",
|
|
146
|
-
"source": "component",
|
|
147
|
-
"targetField": "dependencies",
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
],
|
|
151
|
-
"message": "[36mcomp1 (component)[39m",
|
|
152
|
-
},
|
|
153
|
-
Object {
|
|
154
|
-
"choices": Array [
|
|
155
|
-
Object {
|
|
156
|
-
"message": "bar [90m(peer)[39m 1.0.0 ❯ 1.1.0 ",
|
|
157
|
-
"name": "bar",
|
|
158
|
-
"value": Object {
|
|
159
|
-
"currentRange": "1.0.0",
|
|
160
|
-
"latestRange": "1.1.0",
|
|
161
|
-
"name": "bar",
|
|
162
|
-
"source": "variants",
|
|
163
|
-
"targetField": "peerDependencies",
|
|
164
|
-
"variantPattern": "{comp2}",
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
],
|
|
168
|
-
"message": "[36m{comp2} (variant)[39m",
|
|
169
|
-
},
|
|
170
|
-
]
|
|
171
|
-
`;
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`makeOutdatedPkgChoices should group component model updates of the same dependency 1`] = `
|
|
4
|
-
Array [
|
|
5
|
-
Object {
|
|
6
|
-
"choices": Array [
|
|
7
|
-
Object {
|
|
8
|
-
"message": "foo [90m(runtime)[39m * ❯ [91m[1m2.0.0[22m[39m because of comp1 and 1 other components ",
|
|
9
|
-
"name": "foo",
|
|
10
|
-
"value": Object {
|
|
11
|
-
"currentRange": "1.0.0",
|
|
12
|
-
"dependentComponents": Array [
|
|
13
|
-
"comp1",
|
|
14
|
-
"comp2",
|
|
15
|
-
],
|
|
16
|
-
"hasDifferentRanges": true,
|
|
17
|
-
"latestRange": "2.0.0",
|
|
18
|
-
"name": "foo",
|
|
19
|
-
"source": "rootPolicy",
|
|
20
|
-
"targetField": "dependencies",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
"message": "[36mRoot policies[39m",
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
exports[`makeOutdatedPkgChoices should group component model updates of the same dependency and display the current range when all components use the same range 1`] = `
|
|
30
|
-
Array [
|
|
31
|
-
Object {
|
|
32
|
-
"choices": Array [
|
|
33
|
-
Object {
|
|
34
|
-
"message": "foo [90m(runtime)[39m ^1.2.3 ❯ [91m[1m2.0.0[22m[39m because of comp1 and 1 other components ",
|
|
35
|
-
"name": "foo",
|
|
36
|
-
"value": Object {
|
|
37
|
-
"currentRange": "^1.2.3",
|
|
38
|
-
"dependentComponents": Array [
|
|
39
|
-
"comp1",
|
|
40
|
-
"comp2",
|
|
41
|
-
],
|
|
42
|
-
"latestRange": "2.0.0",
|
|
43
|
-
"name": "foo",
|
|
44
|
-
"source": "rootPolicy",
|
|
45
|
-
"targetField": "dependencies",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
"message": "[36mRoot policies[39m",
|
|
50
|
-
},
|
|
51
|
-
]
|
|
52
|
-
`;
|
|
53
|
-
|
|
54
|
-
exports[`makeOutdatedPkgChoices should group component model updates of the same dependency and use * as current range when can't compare ranges 1`] = `
|
|
55
|
-
Array [
|
|
56
|
-
Object {
|
|
57
|
-
"choices": Array [
|
|
58
|
-
Object {
|
|
59
|
-
"message": "foo [90m(runtime)[39m * ❯ [91m[1m2.0.0[22m[39m because of comp1 and 1 other components ",
|
|
60
|
-
"name": "foo",
|
|
61
|
-
"value": Object {
|
|
62
|
-
"currentRange": "*",
|
|
63
|
-
"dependentComponents": Array [
|
|
64
|
-
"comp1",
|
|
65
|
-
"comp2",
|
|
66
|
-
],
|
|
67
|
-
"hasDifferentRanges": true,
|
|
68
|
-
"latestRange": "2.0.0",
|
|
69
|
-
"name": "foo",
|
|
70
|
-
"source": "rootPolicy",
|
|
71
|
-
"targetField": "dependencies",
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
"message": "[36mRoot policies[39m",
|
|
76
|
-
},
|
|
77
|
-
]
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
exports[`makeOutdatedPkgChoices should render choices in correct order 1`] = `
|
|
81
|
-
Array [
|
|
82
|
-
Object {
|
|
83
|
-
"choices": Array [
|
|
84
|
-
Object {
|
|
85
|
-
"message": "foo [90m(runtime)[39m 1.0.0 ❯ [91m[1m2.0.0[22m[39m ",
|
|
86
|
-
"name": "foo",
|
|
87
|
-
"value": Object {
|
|
88
|
-
"currentRange": "1.0.0",
|
|
89
|
-
"latestRange": "2.0.0",
|
|
90
|
-
"name": "foo",
|
|
91
|
-
"source": "rootPolicy",
|
|
92
|
-
"targetField": "dependencies",
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
Object {
|
|
96
|
-
"message": "qar [90m(runtime)[39m 1.0.0 ❯ 1.[92m[1m1.0[22m[39m ",
|
|
97
|
-
"name": "qar",
|
|
98
|
-
"value": Object {
|
|
99
|
-
"currentRange": "1.0.0",
|
|
100
|
-
"latestRange": "1.1.0",
|
|
101
|
-
"name": "qar",
|
|
102
|
-
"source": "rootPolicy",
|
|
103
|
-
"targetField": "dependencies",
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
Object {
|
|
107
|
-
"message": "zoo [90m(dev)[39m 1.0.0 ❯ 1.[92m[1m1.0[22m[39m ",
|
|
108
|
-
"name": "zoo",
|
|
109
|
-
"value": Object {
|
|
110
|
-
"currentRange": "1.0.0",
|
|
111
|
-
"latestRange": "1.1.0",
|
|
112
|
-
"name": "zoo",
|
|
113
|
-
"source": "rootPolicy",
|
|
114
|
-
"targetField": "devDependencies",
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
Object {
|
|
118
|
-
"message": "bar [90m(peer)[39m 1.0.0 ❯ 1.[92m[1m1.0[22m[39m ",
|
|
119
|
-
"name": "bar",
|
|
120
|
-
"value": Object {
|
|
121
|
-
"currentRange": "1.0.0",
|
|
122
|
-
"latestRange": "1.1.0",
|
|
123
|
-
"name": "bar",
|
|
124
|
-
"source": "rootPolicy",
|
|
125
|
-
"targetField": "peerDependencies",
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
"message": "[36mRoot policies[39m",
|
|
130
|
-
},
|
|
131
|
-
]
|
|
132
|
-
`;
|
|
133
|
-
|
|
134
|
-
exports[`makeOutdatedPkgChoices should render choices with context information 1`] = `
|
|
135
|
-
Array [
|
|
136
|
-
Object {
|
|
137
|
-
"choices": Array [
|
|
138
|
-
Object {
|
|
139
|
-
"message": "foo [90m(runtime)[39m 1.0.0 ❯ [91m[1m2.0.0[22m[39m ",
|
|
140
|
-
"name": "foo",
|
|
141
|
-
"value": Object {
|
|
142
|
-
"componentId": "comp1",
|
|
143
|
-
"currentRange": "1.0.0",
|
|
144
|
-
"latestRange": "2.0.0",
|
|
145
|
-
"name": "foo",
|
|
146
|
-
"source": "component",
|
|
147
|
-
"targetField": "dependencies",
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
],
|
|
151
|
-
"message": "[36mcomp1 (component)[39m",
|
|
152
|
-
},
|
|
153
|
-
Object {
|
|
154
|
-
"choices": Array [
|
|
155
|
-
Object {
|
|
156
|
-
"message": "bar [90m(peer)[39m 1.0.0 ❯ 1.[92m[1m1.0[22m[39m ",
|
|
157
|
-
"name": "bar",
|
|
158
|
-
"value": Object {
|
|
159
|
-
"currentRange": "1.0.0",
|
|
160
|
-
"latestRange": "1.1.0",
|
|
161
|
-
"name": "bar",
|
|
162
|
-
"source": "variants",
|
|
163
|
-
"targetField": "peerDependencies",
|
|
164
|
-
"variantPattern": "{comp2}",
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
],
|
|
168
|
-
"message": "[36m{comp2} (variant)[39m",
|
|
169
|
-
},
|
|
170
|
-
]
|
|
171
|
-
`;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.DependencyTypeNotSupportedInPolicy = void 0;
|
|
7
|
-
|
|
8
|
-
function _bitError() {
|
|
9
|
-
const data = require("@teambit/bit-error");
|
|
10
|
-
|
|
11
|
-
_bitError = function () {
|
|
12
|
-
return data;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
return data;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
class DependencyTypeNotSupportedInPolicy extends _bitError().BitError {
|
|
19
|
-
constructor(type) {
|
|
20
|
-
super(`the workspace policy does not support ${type} dependencies`);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
exports.DependencyTypeNotSupportedInPolicy = DependencyTypeNotSupportedInPolicy;
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=dependency-type-not-supported-in-policy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["DependencyTypeNotSupportedInPolicy","BitError","constructor","type"],"sources":["dependency-type-not-supported-in-policy.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\n\nexport class DependencyTypeNotSupportedInPolicy extends BitError {\n constructor(type: string) {\n super(`the workspace policy does not support ${type} dependencies`);\n }\n}\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,kCAAN,SAAiDC,oBAAjD,CAA0D;EAC/DC,WAAW,CAACC,IAAD,EAAe;IACxB,MAAO,yCAAwCA,IAAK,eAApD;EACD;;AAH8D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DependencyTypeNotSupportedInPolicy } from './dependency-type-not-supported-in-policy';
|
package/dist/exceptions/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "DependencyTypeNotSupportedInPolicy", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _dependencyTypeNotSupportedInPolicy().DependencyTypeNotSupportedInPolicy;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
function _dependencyTypeNotSupportedInPolicy() {
|
|
14
|
-
const data = require("./dependency-type-not-supported-in-policy");
|
|
15
|
-
|
|
16
|
-
_dependencyTypeNotSupportedInPolicy = function () {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { DependencyTypeNotSupportedInPolicy } from './dependency-type-not-supported-in-policy';\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
|
package/dist/install.cmd.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import { WorkspaceDependencyLifecycleType } from '@teambit/dependency-resolver';
|
|
3
|
-
import { Logger } from '@teambit/logger';
|
|
4
|
-
import { Workspace } from './workspace';
|
|
5
|
-
declare type InstallCmdOptions = {
|
|
6
|
-
variants: string;
|
|
7
|
-
type: WorkspaceDependencyLifecycleType;
|
|
8
|
-
skipDedupe: boolean;
|
|
9
|
-
skipImport: boolean;
|
|
10
|
-
updateExisting: boolean;
|
|
11
|
-
savePrefix: string;
|
|
12
|
-
addMissingPeers: boolean;
|
|
13
|
-
};
|
|
14
|
-
export default class InstallCmd implements Command {
|
|
15
|
-
/**
|
|
16
|
-
* workspace extension.
|
|
17
|
-
*/
|
|
18
|
-
private workspace;
|
|
19
|
-
/**
|
|
20
|
-
* logger extension.
|
|
21
|
-
*/
|
|
22
|
-
private logger;
|
|
23
|
-
name: string;
|
|
24
|
-
description: string;
|
|
25
|
-
extendedDescription: string;
|
|
26
|
-
arguments: {
|
|
27
|
-
name: string;
|
|
28
|
-
description: string;
|
|
29
|
-
}[];
|
|
30
|
-
alias: string;
|
|
31
|
-
group: string;
|
|
32
|
-
options: CommandOptions;
|
|
33
|
-
constructor(
|
|
34
|
-
/**
|
|
35
|
-
* workspace extension.
|
|
36
|
-
*/
|
|
37
|
-
workspace: Workspace,
|
|
38
|
-
/**
|
|
39
|
-
* logger extension.
|
|
40
|
-
*/
|
|
41
|
-
logger: Logger);
|
|
42
|
-
report([packages]: [string[]], options: InstallCmdOptions): Promise<string>;
|
|
43
|
-
}
|
|
44
|
-
export {};
|