@teambit/component 1.0.487 → 1.0.489

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/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component",
3
- "version": "1.0.487",
3
+ "version": "1.0.489",
4
4
  "homepage": "https://bit.cloud/teambit/component/component",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "component",
9
- "version": "1.0.487"
9
+ "version": "1.0.489"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/any-fs": "0.0.5",
@@ -14,14 +14,14 @@
14
14
  "graphql-type-json": "0.3.2",
15
15
  "strip-ansi": "6.0.0",
16
16
  "lodash": "4.17.21",
17
- "semver": "7.5.2",
17
+ "semver": "7.5.4",
18
18
  "copy-to-clipboard": "3.3.1",
19
19
  "lodash.flatten": "4.4.0",
20
20
  "open": "7.4.2",
21
21
  "chalk": "2.4.2",
22
22
  "cli-table": "0.3.6",
23
23
  "pad-right": "0.2.2",
24
- "table": "5.4.6",
24
+ "table": "6.7.3",
25
25
  "classnames": "2.2.6",
26
26
  "lodash.compact": "3.0.1",
27
27
  "@teambit/component-id": "1.2.2",
@@ -47,45 +47,51 @@
47
47
  "@teambit/base-ui.layout.breakpoints": "1.0.0",
48
48
  "@teambit/lanes.ui.models.lanes-model": "0.0.221",
49
49
  "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.143",
50
- "@teambit/legacy.extension-data": "0.0.2",
51
- "@teambit/aspect-loader": "1.0.487",
52
- "@teambit/dependency-resolver": "1.0.487",
53
- "@teambit/graph": "1.0.487",
54
- "@teambit/component.sources": "0.0.52",
55
- "@teambit/toolbox.path.match-patterns": "0.0.15",
56
- "@teambit/toolbox.string.eol": "0.0.1",
57
- "@teambit/toolbox.string.capitalize": "0.0.496",
58
- "@teambit/graphql": "1.0.487",
59
- "@teambit/toolbox.path.path": "0.0.4",
60
- "@teambit/cli": "0.0.1064",
61
- "@teambit/express": "0.0.1163",
62
- "@teambit/logger": "0.0.1157",
63
- "@teambit/command-bar": "1.0.487",
50
+ "@teambit/legacy.extension-data": "0.0.4",
51
+ "@teambit/aspect-loader": "1.0.489",
52
+ "@teambit/dependency-resolver": "1.0.489",
53
+ "@teambit/graph": "1.0.489",
54
+ "@teambit/legacy.consumer-component": "0.0.3",
55
+ "@teambit/scope.objects": "0.0.2",
56
+ "@teambit/component.sources": "0.0.54",
57
+ "@teambit/toolbox.path.match-patterns": "0.0.16",
58
+ "@teambit/toolbox.string.eol": "0.0.2",
59
+ "@teambit/toolbox.string.capitalize": "0.0.497",
60
+ "@teambit/graphql": "1.0.489",
61
+ "@teambit/toolbox.path.path": "0.0.5",
62
+ "@teambit/cli": "0.0.1066",
63
+ "@teambit/express": "0.0.1165",
64
+ "@teambit/logger": "0.0.1159",
65
+ "@teambit/legacy.constants": "0.0.2",
66
+ "@teambit/command-bar": "1.0.489",
64
67
  "@teambit/component-package-version": "0.0.434",
65
- "@teambit/preview": "1.0.487",
66
- "@teambit/pubsub": "1.0.487",
67
- "@teambit/react-router": "1.0.487",
68
- "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.512",
69
- "@teambit/ui": "1.0.487",
70
- "@teambit/legacy.utils": "0.0.7",
68
+ "@teambit/preview": "1.0.489",
69
+ "@teambit/pubsub": "1.0.489",
70
+ "@teambit/react-router": "1.0.489",
71
+ "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.513",
72
+ "@teambit/ui": "1.0.489",
73
+ "@teambit/legacy.utils": "0.0.9",
71
74
  "@teambit/component-issues": "0.0.151",
72
- "@teambit/pkg.modules.semver-helper": "0.0.1",
75
+ "@teambit/pkg.modules.semver-helper": "0.0.3",
73
76
  "@teambit/cli-table": "0.0.49",
74
- "@teambit/legacy.bit-map": "0.0.57",
77
+ "@teambit/legacy.bit-map": "0.0.59",
75
78
  "@teambit/legacy-component-log": "0.0.404",
76
79
  "@teambit/component-descriptor": "0.0.428",
77
- "@teambit/semantics.doc-parser": "0.0.8",
78
- "@teambit/legacy.dependency-graph": "0.0.3",
79
- "@teambit/legacy.loader": "0.0.3",
80
- "@teambit/legacy.component-diff": "0.0.53",
81
- "@teambit/harmony.ui.aspect-box": "0.0.507",
82
- "@teambit/compositions": "1.0.487",
83
- "@teambit/deprecation": "1.0.487",
84
- "@teambit/envs": "1.0.487",
85
- "@teambit/envs.ui.env-icon": "0.0.505",
86
- "@teambit/workspace.ui.use-workspace-mode": "0.0.1",
87
- "@teambit/component.ui.version-dropdown": "0.0.871",
88
- "@teambit/lanes.hooks.use-lanes": "0.0.275"
80
+ "@teambit/semantics.doc-parser": "0.0.10",
81
+ "@teambit/legacy.consumer": "0.0.2",
82
+ "@teambit/legacy.dependency-graph": "0.0.5",
83
+ "@teambit/legacy.loader": "0.0.4",
84
+ "@teambit/legacy.scope": "0.0.2",
85
+ "@teambit/scope.remotes": "0.0.2",
86
+ "@teambit/legacy.component-diff": "0.0.55",
87
+ "@teambit/harmony.ui.aspect-box": "0.0.508",
88
+ "@teambit/compositions": "1.0.489",
89
+ "@teambit/deprecation": "1.0.489",
90
+ "@teambit/envs": "1.0.489",
91
+ "@teambit/envs.ui.env-icon": "0.0.506",
92
+ "@teambit/workspace.ui.use-workspace-mode": "0.0.2",
93
+ "@teambit/component.ui.version-dropdown": "0.0.873",
94
+ "@teambit/lanes.hooks.use-lanes": "0.0.276"
89
95
  },
90
96
  "devDependencies": {
91
97
  "@types/lodash": "4.14.165",
@@ -1,4 +1,4 @@
1
- import { Consumer, loadConsumer } from '@teambit/legacy/dist/consumer';
1
+ import { Consumer, loadConsumer } from '@teambit/legacy.consumer';
2
2
  import { NothingToCompareTo } from './nothing-to-compare-to';
3
3
 
4
4
  export async function getConsumerComponent({
@@ -1,9 +1,9 @@
1
1
  import { ComponentID } from '@teambit/component-id';
2
2
  import { loader } from '@teambit/legacy.loader';
3
- import { Consumer, loadConsumerIfExist } from '@teambit/legacy/dist/consumer';
4
- import Component from '@teambit/legacy/dist/consumer/component';
5
- import getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';
6
- import { loadScope, Scope } from '@teambit/legacy/dist/scope';
3
+ import { Consumer, loadConsumerIfExist } from '@teambit/legacy.consumer';
4
+ import { ConsumerComponent as Component } from '@teambit/legacy.consumer-component';
5
+ import { getRemoteByName } from '@teambit/scope.remotes';
6
+ import { loadScope, Scope } from '@teambit/legacy.scope';
7
7
  import { DependenciesInfo } from '@teambit/legacy.dependency-graph';
8
8
 
9
9
  export async function getScopeComponent({
@@ -1,10 +1,12 @@
1
1
  import c from 'chalk';
2
2
  import rightpad from 'pad-right';
3
3
  import { table } from 'table';
4
+ import type { Alignment } from 'table';
4
5
  import { componentToPrintableForDiff, getDiffBetweenObjects, prettifyFieldName } from '@teambit/legacy.component-diff';
5
- import ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';
6
+ import { ConsumerComponent } from '@teambit/legacy.consumer-component';
6
7
  import { show } from './legacy-show';
7
8
  import paintDocumentation from './docs-template';
9
+ import { compact } from 'lodash';
8
10
 
9
11
  export function actionLegacy(
10
12
  [id]: [string],
@@ -67,11 +69,11 @@ const COLUMN_WIDTH = 50;
67
69
  const tableColumnConfig = {
68
70
  columns: {
69
71
  1: {
70
- alignment: 'left',
72
+ alignment: 'left' as Alignment,
71
73
  width: COLUMN_WIDTH,
72
74
  },
73
75
  2: {
74
- alignment: 'left',
76
+ alignment: 'left' as Alignment,
75
77
  width: COLUMN_WIDTH,
76
78
  },
77
79
  },
@@ -84,9 +86,10 @@ function paintComponent(component: ConsumerComponent, componentModel: ConsumerCo
84
86
  const printableComponent = componentToPrintableForDiff(component);
85
87
  // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
86
88
  printableComponent.scopesList = (component.scopesList || []).map((s) => s.name).join('\n');
87
- const rows = getFields()
88
- .map((field) => {
89
- const arr = [];
89
+ const fields = getFields();
90
+ const rows = compact(
91
+ fields.map((field) => {
92
+ const arr: string[] = [];
90
93
 
91
94
  const title = prettifyFieldName(field);
92
95
  if (!printableComponent[field]) return null;
@@ -109,7 +112,7 @@ function paintComponent(component: ConsumerComponent, componentModel: ConsumerCo
109
112
  }
110
113
  return arr;
111
114
  })
112
- .filter((x) => x);
115
+ );
113
116
 
114
117
  const componentTable = table(rows, tableColumnConfig);
115
118
  return componentTable + paintDocumentation(component.docs);
@@ -123,9 +126,9 @@ function paintComponent(component: ConsumerComponent, componentModel: ConsumerCo
123
126
  const printableComponentToCompare = componentToPrintableForDiff(componentModel);
124
127
 
125
128
  const componentsDiffs = getDiffBetweenObjects(printableOriginalComponent, printableComponentToCompare);
126
-
127
- const rows = getFields()
128
- .map((field) => {
129
+ const fields = getFields();
130
+ const rows = compact(
131
+ fields.map((field) => {
129
132
  const arr = [];
130
133
  if (!printableOriginalComponent[field] && !printableComponentToCompare[field]) return null;
131
134
  const title = `${field[0].toUpperCase()}${field.slice(1)}`.replace(/([A-Z])/g, ' $1').trim();
@@ -157,7 +160,7 @@ function paintComponent(component: ConsumerComponent, componentModel: ConsumerCo
157
160
  }
158
161
  return arr;
159
162
  })
160
- .filter((x) => x);
163
+ );
161
164
 
162
165
  const componentTable = table(rows, tableColumnConfig);
163
166
  const dependenciesTableStr = generateDependenciesTable();