@teambit/component-compare 1.0.109 → 1.0.110
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/preview/teambit_component_component_compare-preview.js +1 -1
- package/dist/component-compare.main.runtime.d.ts +4 -1
- package/dist/component-compare.main.runtime.js +115 -5
- package/dist/component-compare.main.runtime.js.map +1 -1
- package/dist/{preview-1703698405864.js → preview-1703733956734.js} +2 -2
- package/package.json +21 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/component-compare-preview"]=t():e["teambit.component/component-compare-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/component-compare-preview"]=t():e["teambit.component/component-compare-preview"]=t()}(self,(()=>(()=>{"use strict";var e={63498:(e,t,o)=>{var n={id:"teambit.component/component-compare@1.0.110",homepage:"https://bit.cloud/teambit/component/component-compare",exported:!0};function r(){const e=a(o(87363));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,a.__bit_component=n;const i=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/bit-icons/compare.svg"}));i.__bit_component=n,t.Logo=i},87363:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>d,compositions_metadata:()=>u,overview:()=>l});var e={};o.r(e),o.d(e,{default:()=>s});var t=o(63498);o(87363);const r=MdxJsReact,a=TeambitMdxUiMdxScopeContext;var i=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var c={},m="wrapper";function s(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)o=a[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,i);return(0,r.mdx)(m,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(a.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("p",null,(0,r.mdx)("a",{parentName:"p",href:"https://bit.cloud/blog/introducing-a-new-feature-component-compare-l4qyxtoo?baseVersion=0.0.5"},"Introducing Component Compare")),(0,r.mdx)("p",null,"Component Compare allows users to compare two component versions. It provides a unified view of all the following differences,"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Code: Modifications made to the source code of the component."),(0,r.mdx)("li",{parentName:"ul"},"Composition: Changes made to how the component looks visually."),(0,r.mdx)("li",{parentName:"ul"},"Tests: Changes made to how the component is tested."),(0,r.mdx)("li",{parentName:"ul"},"Dependencies: Changes made to the component's dependency graph."),(0,r.mdx)("li",{parentName:"ul"},"Overview: Changes to the auto-generated documentation for the component."),(0,r.mdx)("li",{parentName:"ul"},"Aspects: Changes made to the extensions for the component."),(0,r.mdx)("li",{parentName:"ul"},"Changelog: Changes exported between the two selected versions"))))}s.isMDXComponent=!0;const d=[t],l=[e],u={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
|
|
@@ -2,9 +2,10 @@ import { CLIMain } from '@teambit/cli';
|
|
|
2
2
|
import { Workspace } from '@teambit/workspace';
|
|
3
3
|
import { ScopeMain } from '@teambit/scope';
|
|
4
4
|
import { GraphqlMain } from '@teambit/graphql';
|
|
5
|
+
import { ModelComponent, Version } from '@teambit/legacy/dist/scope/models';
|
|
5
6
|
import { DependencyResolverMain } from '@teambit/dependency-resolver';
|
|
6
7
|
import { LoggerMain, Logger } from '@teambit/logger';
|
|
7
|
-
import { FieldsDiff, FileDiff } from '@teambit/legacy/dist/consumer/component-ops/components-diff';
|
|
8
|
+
import { DiffOptions, DiffResults, FieldsDiff, FileDiff } from '@teambit/legacy/dist/consumer/component-ops/components-diff';
|
|
8
9
|
import { TesterMain } from '@teambit/tester';
|
|
9
10
|
import { Component, ComponentMain } from '@teambit/component';
|
|
10
11
|
export type ComponentCompareResult = {
|
|
@@ -34,6 +35,8 @@ export declare class ComponentCompareMain {
|
|
|
34
35
|
dependencies: string[];
|
|
35
36
|
aspects: {};
|
|
36
37
|
}>;
|
|
38
|
+
private componentsDiff;
|
|
39
|
+
diffBetweenVersionsObjects(modelComponent: ModelComponent, fromVersionObject: Version, toVersionObject: Version, fromVersion: string, toVersion: string, diffOpts: DiffOptions): Promise<DiffResults>;
|
|
37
40
|
private parseValues;
|
|
38
41
|
private getBitIdsForDiff;
|
|
39
42
|
static slots: any[];
|
|
@@ -89,12 +89,19 @@ function _logger() {
|
|
|
89
89
|
return data;
|
|
90
90
|
}
|
|
91
91
|
function _componentsDiff() {
|
|
92
|
-
const data =
|
|
92
|
+
const data = require("@teambit/legacy/dist/consumer/component-ops/components-diff");
|
|
93
93
|
_componentsDiff = function () {
|
|
94
94
|
return data;
|
|
95
95
|
};
|
|
96
96
|
return data;
|
|
97
97
|
}
|
|
98
|
+
function _componentsObjectDiff() {
|
|
99
|
+
const data = require("@teambit/legacy/dist/consumer/component-ops/components-object-diff");
|
|
100
|
+
_componentsObjectDiff = function () {
|
|
101
|
+
return data;
|
|
102
|
+
};
|
|
103
|
+
return data;
|
|
104
|
+
}
|
|
98
105
|
function _tester() {
|
|
99
106
|
const data = require("@teambit/tester");
|
|
100
107
|
_tester = function () {
|
|
@@ -130,8 +137,6 @@ function _diffCmd() {
|
|
|
130
137
|
};
|
|
131
138
|
return data;
|
|
132
139
|
}
|
|
133
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
134
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
135
140
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
136
141
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
137
142
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
@@ -157,7 +162,7 @@ class ComponentCompareMain {
|
|
|
157
162
|
const repository = this.scope.legacyScope.objects;
|
|
158
163
|
const baseVersionObject = await modelComponent.loadVersion(baseVersion, repository);
|
|
159
164
|
const compareVersionObject = await modelComponent.loadVersion(compareVersion, repository);
|
|
160
|
-
const diff = await
|
|
165
|
+
const diff = await this.diffBetweenVersionsObjects(modelComponent, baseVersionObject, compareVersionObject, baseVersion, compareVersion, {});
|
|
161
166
|
const baseComponent = await host.get(baseCompId);
|
|
162
167
|
const compareComponent = await host.get(compareCompId);
|
|
163
168
|
const baseTestFiles = baseComponent && (await this.tester.getTestFiles(baseComponent).map(file => file.relative)) || [];
|
|
@@ -183,7 +188,7 @@ class ComponentCompareMain {
|
|
|
183
188
|
if (!bitIds || !bitIds.length) {
|
|
184
189
|
throw new (_bitError().BitError)('there are no modified components to diff');
|
|
185
190
|
}
|
|
186
|
-
const diffResults = await
|
|
191
|
+
const diffResults = await this.componentsDiff(bitIds, version, toVersion, {
|
|
187
192
|
verbose,
|
|
188
193
|
formatDepsAsTable: table
|
|
189
194
|
});
|
|
@@ -219,6 +224,104 @@ class ComponentCompareMain {
|
|
|
219
224
|
aspects: serializeAspect(component)
|
|
220
225
|
};
|
|
221
226
|
}
|
|
227
|
+
async componentsDiff(ids, version, toVersion, diffOpts) {
|
|
228
|
+
if (!this.workspace) throw new (_workspace().OutsideWorkspaceError)();
|
|
229
|
+
const consumer = this.workspace?.consumer;
|
|
230
|
+
const components = await this.workspace.getMany(ids);
|
|
231
|
+
if (!components.length) throw new (_bitError().BitError)('failed loading the components');
|
|
232
|
+
const getResults = () => {
|
|
233
|
+
if (version && toVersion) {
|
|
234
|
+
return Promise.all(ids.map(id => getComponentDiffBetweenVersions(id)));
|
|
235
|
+
}
|
|
236
|
+
if (version) {
|
|
237
|
+
return Promise.all(components.map(component => getComponentDiffOfVersion(component)));
|
|
238
|
+
}
|
|
239
|
+
return Promise.all(components.map(component => getComponentDiff(component)));
|
|
240
|
+
};
|
|
241
|
+
const componentsDiffResults = await getResults();
|
|
242
|
+
return componentsDiffResults;
|
|
243
|
+
async function getComponentDiffOfVersion(component) {
|
|
244
|
+
if (!version) throw new Error('getComponentDiffOfVersion expects to get version');
|
|
245
|
+
const consumerComponent = component.state._consumer;
|
|
246
|
+
const diffResult = {
|
|
247
|
+
id: component.id,
|
|
248
|
+
hasDiff: false
|
|
249
|
+
};
|
|
250
|
+
const modelComponent = await consumer.scope.getModelComponentIfExist(component.id);
|
|
251
|
+
if (!modelComponent) {
|
|
252
|
+
throw new (_generalError().default)(`component ${component.id.toString()} doesn't have any version yet`);
|
|
253
|
+
}
|
|
254
|
+
const repository = consumer.scope.objects;
|
|
255
|
+
const fromVersionObject = await modelComponent.loadVersion(version, repository);
|
|
256
|
+
const versionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);
|
|
257
|
+
const fsFiles = consumerComponent.files;
|
|
258
|
+
// version must be defined as the component.componentFromModel do exist
|
|
259
|
+
const versionB = component.id.version;
|
|
260
|
+
// this function gets called only when version is set
|
|
261
|
+
diffResult.filesDiff = await (0, _componentsDiff().getFilesDiff)(versionFiles, fsFiles, version, versionB);
|
|
262
|
+
const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);
|
|
263
|
+
await updateFieldsDiff(fromVersionComponent, consumerComponent, diffResult, diffOpts);
|
|
264
|
+
return diffResult;
|
|
265
|
+
}
|
|
266
|
+
async function getComponentDiffBetweenVersions(id) {
|
|
267
|
+
if (!version || !toVersion) throw new Error('getComponentDiffBetweenVersions expects to get version and toVersion');
|
|
268
|
+
const diffResult = {
|
|
269
|
+
id,
|
|
270
|
+
hasDiff: false
|
|
271
|
+
};
|
|
272
|
+
const modelComponent = await consumer.scope.getModelComponentIfExist(id);
|
|
273
|
+
if (!modelComponent) {
|
|
274
|
+
throw new (_generalError().default)(`component ${id.toString()} doesn't have any version yet`);
|
|
275
|
+
}
|
|
276
|
+
const repository = consumer.scope.objects;
|
|
277
|
+
const fromVersionObject = await modelComponent.loadVersion(version, repository);
|
|
278
|
+
const toVersionObject = await modelComponent.loadVersion(toVersion, repository);
|
|
279
|
+
const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);
|
|
280
|
+
const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);
|
|
281
|
+
diffResult.filesDiff = await (0, _componentsDiff().getFilesDiff)(fromVersionFiles, toVersionFiles, version, toVersion);
|
|
282
|
+
const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);
|
|
283
|
+
const toVersionComponent = await modelComponent.toConsumerComponent(toVersion, consumer.scope.name, repository);
|
|
284
|
+
await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);
|
|
285
|
+
return diffResult;
|
|
286
|
+
}
|
|
287
|
+
async function getComponentDiff(component) {
|
|
288
|
+
const diffResult = {
|
|
289
|
+
id: component.id,
|
|
290
|
+
hasDiff: false
|
|
291
|
+
};
|
|
292
|
+
const consumerComponent = component.state._consumer;
|
|
293
|
+
if (!consumerComponent.componentFromModel) {
|
|
294
|
+
// it's a new component. not modified. show all files as new.
|
|
295
|
+
const fsFiles = consumerComponent.files;
|
|
296
|
+
// @ts-ignore version must be defined as the component.componentFromModel do exist
|
|
297
|
+
diffResult.filesDiff = await (0, _componentsDiff().getFilesDiff)([], fsFiles, component.id.version, component.id.version);
|
|
298
|
+
if (hasDiff(diffResult)) diffResult.hasDiff = true;
|
|
299
|
+
return diffResult;
|
|
300
|
+
}
|
|
301
|
+
const modelFiles = consumerComponent.componentFromModel.files;
|
|
302
|
+
const fsFiles = consumerComponent.files;
|
|
303
|
+
// @ts-ignore version must be defined as the component.componentFromModel do exist
|
|
304
|
+
diffResult.filesDiff = await (0, _componentsDiff().getFilesDiff)(modelFiles, fsFiles, component.id.version, component.id.version);
|
|
305
|
+
await updateFieldsDiff(consumerComponent.componentFromModel, consumerComponent, diffResult, diffOpts);
|
|
306
|
+
return diffResult;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
async diffBetweenVersionsObjects(modelComponent, fromVersionObject, toVersionObject, fromVersion, toVersion, diffOpts) {
|
|
310
|
+
const diffResult = {
|
|
311
|
+
id: modelComponent.toComponentId(),
|
|
312
|
+
hasDiff: false
|
|
313
|
+
};
|
|
314
|
+
const scope = this.scope.legacyScope;
|
|
315
|
+
const repository = scope.objects;
|
|
316
|
+
const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);
|
|
317
|
+
const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);
|
|
318
|
+
const color = diffOpts.color ?? true;
|
|
319
|
+
diffResult.filesDiff = await (0, _componentsDiff().getFilesDiff)(fromVersionFiles, toVersionFiles, fromVersion, toVersion, undefined, color);
|
|
320
|
+
const fromVersionComponent = await modelComponent.toConsumerComponent(fromVersionObject.hash().toString(), scope.name, repository);
|
|
321
|
+
const toVersionComponent = await modelComponent.toConsumerComponent(toVersionObject.hash().toString(), scope.name, repository);
|
|
322
|
+
await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);
|
|
323
|
+
return diffResult;
|
|
324
|
+
}
|
|
222
325
|
async parseValues(values) {
|
|
223
326
|
if (!this.workspace) throw new (_workspace().OutsideWorkspaceError)();
|
|
224
327
|
// option #1: bit diff
|
|
@@ -284,6 +387,13 @@ exports.ComponentCompareMain = ComponentCompareMain;
|
|
|
284
387
|
_defineProperty(ComponentCompareMain, "slots", []);
|
|
285
388
|
_defineProperty(ComponentCompareMain, "dependencies", [_graphql().GraphqlAspect, _component().default, _scope().ScopeAspect, _logger().LoggerAspect, _cli().CLIAspect, _workspace().WorkspaceAspect, _tester().TesterAspect, _dependencyResolver().default]);
|
|
286
389
|
_defineProperty(ComponentCompareMain, "runtime", _cli().MainRuntime);
|
|
390
|
+
function hasDiff(diffResult) {
|
|
391
|
+
return !!(diffResult.filesDiff && diffResult.filesDiff.find(file => file.diffOutput) || diffResult.fieldsDiff);
|
|
392
|
+
}
|
|
393
|
+
async function updateFieldsDiff(componentA, componentB, diffResult, diffOpts) {
|
|
394
|
+
diffResult.fieldsDiff = await (0, _componentsObjectDiff().diffBetweenComponentsObjects)(componentA, componentB, diffOpts);
|
|
395
|
+
diffResult.hasDiff = hasDiff(diffResult);
|
|
396
|
+
}
|
|
287
397
|
_componentCompare2().ComponentCompareAspect.addRuntime(ComponentCompareMain);
|
|
288
398
|
var _default = exports.default = ComponentCompareMain;
|
|
289
399
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_bitError","_workspace","_componentId","_componentsList","_interopRequireDefault","_hasWildcard","_scope","_graphql","_builder","_generalError","_dependencyResolver","_logger","_componentsDiff","_interopRequireWildcard","_tester","_component","_componentCompare","_componentCompare2","_diffCmd","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_defineProperty","key","value","_toPropertyKey","enumerable","configurable","writable","_toPrimitive","String","Symbol","toPrimitive","TypeError","Number","ComponentCompareMain","constructor","componentAspect","scope","logger","tester","depResolver","workspace","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","GeneralError","toString","baseVersion","version","compareVersion","repository","objects","baseVersionObject","loadVersion","compareVersionObject","diff","diffBetweenVersionsObjects","baseComponent","compareComponent","baseTestFiles","getTestFiles","map","file","relative","compareTestFiles","allTestFiles","testFilesDiff","filesDiff","filter","fileDiff","includes","filePath","status","compareResult","id","code","fields","fieldsDiff","tests","diffByCLIValues","values","verbose","table","OutsideWorkspaceError","consumer","bitIds","toVersion","parseValues","length","BitError","diffResults","componentsDiff","formatDepsAsTable","onDestroy","getConfigForDiffById","componentId","resolveComponentId","component","Error","getConfigForDiffByCompObject","depData","getDependencies","serializedToString","dep","idWithoutVersion","__type","split","lifecycle","source","serializeAndSort","deps","serialized","serialize","sort","serializeAspect","comp","aspects","state","withoutEntries","BuilderAspect","DependencyResolverAspect","toLegacy","sortById","toConfigObject","dependencies","componentIds","listTagPendingIds","firstValue","lastValue","oneBeforeLastValue","isLastItemVersion","ComponentID","isValidVersion","isOneBeforeLastItemVersion","getBitIdsForDiff","ids","hasWildcard","componentsList","ComponentsList","listComponentsByIdsWithWildcard","getParsedId","provider","graphql","loggerMain","cli","createLogger","ComponentCompareAspect","componentCompareMain","register","DiffCmd","componentCompareSchema","exports","GraphqlAspect","ComponentAspect","ScopeAspect","LoggerAspect","CLIAspect","WorkspaceAspect","TesterAspect","MainRuntime","addRuntime","_default"],"sources":["component-compare.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { BitError } from '@teambit/bit-error';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { ComponentID } from '@teambit/component-id';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport BuilderAspect from '@teambit/builder';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport DependencyResolverAspect, {\n DependencyList,\n DependencyResolverMain,\n SerializedDependency,\n} from '@teambit/dependency-resolver';\nimport { LoggerAspect, LoggerMain, Logger } from '@teambit/logger';\nimport componentsDiff, {\n diffBetweenVersionsObjects,\n DiffResults,\n FieldsDiff,\n FileDiff,\n} from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport { TesterMain, TesterAspect } from '@teambit/tester';\nimport ComponentAspect, { Component, ComponentMain } from '@teambit/component';\nimport { componentCompareSchema } from './component-compare.graphql';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { DiffCmd } from './diff-cmd';\n\nexport type ComponentCompareResult = {\n id: string;\n code: FileDiff[];\n fields: FieldsDiff[];\n tests: FileDiff[];\n};\n\ntype ConfigDiff = {\n version?: string;\n dependencies?: string[];\n aspects?: Record<string, any>;\n};\n\nexport class ComponentCompareMain {\n constructor(\n private componentAspect: ComponentMain,\n private scope: ScopeMain,\n private logger: Logger,\n private tester: TesterMain,\n private depResolver: DependencyResolverMain,\n private workspace?: Workspace\n ) {}\n\n async compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId);\n\n if (!modelComponent) {\n throw new GeneralError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n const baseVersion = baseCompId.version as string;\n const compareVersion = compareCompId.version as string;\n\n const repository = this.scope.legacyScope.objects;\n const baseVersionObject = await modelComponent.loadVersion(baseVersion, repository);\n const compareVersionObject = await modelComponent.loadVersion(compareVersion, repository);\n\n const diff: DiffResults = await diffBetweenVersionsObjects(\n modelComponent,\n baseVersionObject,\n compareVersionObject,\n baseVersion,\n compareVersion,\n this.scope.legacyScope,\n {}\n );\n\n const baseComponent = await host.get(baseCompId);\n const compareComponent = await host.get(compareCompId);\n\n const baseTestFiles =\n (baseComponent && (await this.tester.getTestFiles(baseComponent).map((file) => file.relative))) || [];\n const compareTestFiles =\n (compareComponent && (await this.tester.getTestFiles(compareComponent).map((file) => file.relative))) || [];\n\n const allTestFiles = [...baseTestFiles, ...compareTestFiles];\n\n const testFilesDiff = (diff.filesDiff || []).filter(\n (fileDiff: FileDiff) => allTestFiles.includes(fileDiff.filePath) && fileDiff.status !== 'UNCHANGED'\n );\n\n const compareResult = {\n id: `${baseCompId}-${compareCompId}`,\n code: diff.filesDiff || [],\n fields: diff.fieldsDiff || [],\n tests: testFilesDiff,\n };\n\n return compareResult;\n }\n\n async diffByCLIValues(values: string[], verbose: boolean, table: boolean): Promise<any> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace.consumer;\n const { bitIds, version, toVersion } = await this.parseValues(values);\n if (!bitIds || !bitIds.length) {\n throw new BitError('there are no modified components to diff');\n }\n const diffResults = await componentsDiff(consumer, bitIds, version, toVersion, {\n verbose,\n formatDepsAsTable: table,\n });\n await consumer.onDestroy('diff');\n return diffResults;\n }\n\n async getConfigForDiffById(id: string): Promise<ConfigDiff> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.resolveComponentId(id);\n const component = await workspace.scope.get(componentId, false);\n if (!component) throw new Error(`getConfigForDiff: unable to find component ${id} in local scope`);\n return this.getConfigForDiffByCompObject(component);\n }\n\n async getConfigForDiffByCompObject(component: Component) {\n const depData = await this.depResolver.getDependencies(component);\n const serializedToString = (dep: SerializedDependency) => {\n const idWithoutVersion = dep.__type === 'package' ? dep.id : dep.id.split('@')[0];\n return `${idWithoutVersion}@${dep.version} (${dep.lifecycle}) ${dep.source ? `(${dep.source})` : ''}`;\n };\n const serializeAndSort = (deps: DependencyList) => {\n const serialized = deps.serialize().map(serializedToString);\n return serialized.sort();\n };\n const serializeAspect = (comp: Component) => {\n const aspects = comp.state.aspects.withoutEntries([BuilderAspect.id, DependencyResolverAspect.id]);\n // return aspects.serialize();\n return aspects.toLegacy().sortById().toConfigObject();\n };\n return {\n version: component.id.version,\n dependencies: serializeAndSort(depData),\n aspects: serializeAspect(component),\n };\n }\n\n private async parseValues(\n values: string[]\n ): Promise<{ bitIds: ComponentID[]; version?: string; toVersion?: string }> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n // option #1: bit diff\n // no arguments\n if (!values.length) {\n const componentIds = await this.workspace.listTagPendingIds();\n return { bitIds: componentIds.map((id) => id) };\n }\n const firstValue = values[0];\n const lastValue = values[values.length - 1];\n const oneBeforeLastValue = values[values.length - 2];\n const isLastItemVersion = ComponentID.isValidVersion(lastValue);\n const isOneBeforeLastItemVersion = ComponentID.isValidVersion(oneBeforeLastValue);\n // option #2: bit diff [ids...]\n // all arguments are ids\n if (!isLastItemVersion) {\n return { bitIds: this.getBitIdsForDiff(values) };\n }\n // option #3: bit diff [id] [version]\n // last argument is a version, first argument is id\n if (!isOneBeforeLastItemVersion) {\n if (values.length !== 2) {\n throw new BitError(\n `bit diff [id] [version] syntax was used, however, ${values.length} arguments were given instead of 2`\n );\n }\n return { bitIds: this.getBitIdsForDiff([firstValue]), version: lastValue };\n }\n // option #4: bit diff [id] [version] [to_version]\n // last argument and one before the last are versions, first argument is id\n if (values.length !== 3) {\n throw new BitError(\n `bit diff [id] [version] [to_version] syntax was used, however, ${values.length} arguments were given instead of 3`\n );\n }\n return { bitIds: this.getBitIdsForDiff([firstValue]), version: oneBeforeLastValue, toVersion: lastValue };\n }\n\n private getBitIdsForDiff(ids: string[]): ComponentID[] {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace.consumer;\n if (hasWildcard(ids)) {\n const componentsList = new ComponentsList(consumer);\n return componentsList.listComponentsByIdsWithWildcard(ids);\n }\n return ids.map((id) => consumer.getParsedId(id));\n }\n\n static slots = [];\n static dependencies = [\n GraphqlAspect,\n ComponentAspect,\n ScopeAspect,\n LoggerAspect,\n CLIAspect,\n WorkspaceAspect,\n TesterAspect,\n DependencyResolverAspect,\n ];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain\n ]) {\n const logger = loggerMain.createLogger(ComponentCompareAspect.id);\n const componentCompareMain = new ComponentCompareMain(component, scope, logger, tester, depResolver, workspace);\n cli.register(new DiffCmd(componentCompareMain));\n graphql.register(componentCompareSchema(componentCompareMain));\n return componentCompareMain;\n }\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareMain);\n\nexport default ComponentCompareMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAA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AC,KAAIC,kBAAO,EAACF,oBAAoB,CAAC,CAAC;IAC/CL,OAAO,CAACM,QAAQ,CAAC,IAAAE,0CAAsB,EAACH,oBAAoB,CAAC,CAAC;IAC9D,OAAOA,oBAAoB;EAC7B;AACF;AAACI,OAAA,CAAA7H,oBAAA,GAAAA,oBAAA;AAAAb,eAAA,CAxLYa,oBAAoB,WA4JhB,EAAE;AAAAb,eAAA,CA5JNa,oBAAoB,kBA6JT,CACpB8H,wBAAa,EACbC,oBAAe,EACfC,oBAAW,EACXC,sBAAY,EACZC,gBAAS,EACTC,4BAAe,EACfC,sBAAY,EACZtC,6BAAwB,CACzB;AAAA3G,eAAA,CAtKUa,oBAAoB,aAuKdqI,kBAAW;AAmB9Bb,2CAAsB,CAACc,UAAU,CAACtI,oBAAoB,CAAC;AAAC,IAAAuI,QAAA,GAAAV,OAAA,CAAA1J,OAAA,GAEzC6B,oBAAoB"}
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_bitError","_workspace","_componentId","_componentsList","_interopRequireDefault","_hasWildcard","_scope","_graphql","_builder","_generalError","_dependencyResolver","_logger","_componentsDiff","_componentsObjectDiff","_tester","_component","_componentCompare","_componentCompare2","_diffCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","ComponentCompareMain","constructor","componentAspect","scope","logger","tester","depResolver","workspace","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","GeneralError","toString","baseVersion","version","compareVersion","repository","objects","baseVersionObject","loadVersion","compareVersionObject","diff","diffBetweenVersionsObjects","baseComponent","get","compareComponent","baseTestFiles","getTestFiles","map","file","relative","compareTestFiles","allTestFiles","testFilesDiff","filesDiff","filter","fileDiff","includes","filePath","status","compareResult","id","code","fields","fieldsDiff","tests","diffByCLIValues","values","verbose","table","OutsideWorkspaceError","consumer","bitIds","toVersion","parseValues","length","BitError","diffResults","componentsDiff","formatDepsAsTable","onDestroy","getConfigForDiffById","componentId","resolveComponentId","component","Error","getConfigForDiffByCompObject","depData","getDependencies","serializedToString","dep","idWithoutVersion","__type","split","lifecycle","source","serializeAndSort","deps","serialized","serialize","sort","serializeAspect","comp","aspects","state","withoutEntries","BuilderAspect","DependencyResolverAspect","toLegacy","sortById","toConfigObject","dependencies","ids","diffOpts","components","getMany","getResults","Promise","all","getComponentDiffBetweenVersions","getComponentDiffOfVersion","getComponentDiff","componentsDiffResults","consumerComponent","_consumer","diffResult","hasDiff","fromVersionObject","versionFiles","modelFilesToSourceFiles","fsFiles","files","versionB","getFilesDiff","fromVersionComponent","toConsumerComponent","name","updateFieldsDiff","toVersionObject","fromVersionFiles","toVersionFiles","toVersionComponent","componentFromModel","modelFiles","fromVersion","toComponentId","color","undefined","hash","componentIds","listTagPendingIds","firstValue","lastValue","oneBeforeLastValue","isLastItemVersion","ComponentID","isValidVersion","isOneBeforeLastItemVersion","getBitIdsForDiff","hasWildcard","componentsList","ComponentsList","listComponentsByIdsWithWildcard","getParsedId","provider","graphql","loggerMain","cli","createLogger","ComponentCompareAspect","componentCompareMain","register","DiffCmd","componentCompareSchema","exports","GraphqlAspect","ComponentAspect","ScopeAspect","LoggerAspect","CLIAspect","WorkspaceAspect","TesterAspect","MainRuntime","find","diffOutput","componentA","componentB","diffBetweenComponentsObjects","addRuntime","_default"],"sources":["component-compare.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { BitError } from '@teambit/bit-error';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { ComponentID } from '@teambit/component-id';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport BuilderAspect from '@teambit/builder';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport { ModelComponent, Version } from '@teambit/legacy/dist/scope/models';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport DependencyResolverAspect, {\n DependencyList,\n DependencyResolverMain,\n SerializedDependency,\n} from '@teambit/dependency-resolver';\nimport { LoggerAspect, LoggerMain, Logger } from '@teambit/logger';\nimport {\n DiffOptions,\n DiffResults,\n FieldsDiff,\n FileDiff,\n getFilesDiff,\n} from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport { diffBetweenComponentsObjects } from '@teambit/legacy/dist/consumer/component-ops/components-object-diff';\nimport { TesterMain, TesterAspect } from '@teambit/tester';\nimport ComponentAspect, { Component, ComponentMain } from '@teambit/component';\nimport { componentCompareSchema } from './component-compare.graphql';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { DiffCmd } from './diff-cmd';\n\nexport type ComponentCompareResult = {\n id: string;\n code: FileDiff[];\n fields: FieldsDiff[];\n tests: FileDiff[];\n};\n\ntype ConfigDiff = {\n version?: string;\n dependencies?: string[];\n aspects?: Record<string, any>;\n};\n\nexport class ComponentCompareMain {\n constructor(\n private componentAspect: ComponentMain,\n private scope: ScopeMain,\n private logger: Logger,\n private tester: TesterMain,\n private depResolver: DependencyResolverMain,\n private workspace?: Workspace\n ) {}\n\n async compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId);\n\n if (!modelComponent) {\n throw new GeneralError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n const baseVersion = baseCompId.version as string;\n const compareVersion = compareCompId.version as string;\n\n const repository = this.scope.legacyScope.objects;\n const baseVersionObject = await modelComponent.loadVersion(baseVersion, repository);\n const compareVersionObject = await modelComponent.loadVersion(compareVersion, repository);\n\n const diff: DiffResults = await this.diffBetweenVersionsObjects(\n modelComponent,\n baseVersionObject,\n compareVersionObject,\n baseVersion,\n compareVersion,\n {}\n );\n\n const baseComponent = await host.get(baseCompId);\n const compareComponent = await host.get(compareCompId);\n\n const baseTestFiles =\n (baseComponent && (await this.tester.getTestFiles(baseComponent).map((file) => file.relative))) || [];\n const compareTestFiles =\n (compareComponent && (await this.tester.getTestFiles(compareComponent).map((file) => file.relative))) || [];\n\n const allTestFiles = [...baseTestFiles, ...compareTestFiles];\n\n const testFilesDiff = (diff.filesDiff || []).filter(\n (fileDiff: FileDiff) => allTestFiles.includes(fileDiff.filePath) && fileDiff.status !== 'UNCHANGED'\n );\n\n const compareResult = {\n id: `${baseCompId}-${compareCompId}`,\n code: diff.filesDiff || [],\n fields: diff.fieldsDiff || [],\n tests: testFilesDiff,\n };\n\n return compareResult;\n }\n\n async diffByCLIValues(values: string[], verbose: boolean, table: boolean): Promise<any> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace.consumer;\n const { bitIds, version, toVersion } = await this.parseValues(values);\n if (!bitIds || !bitIds.length) {\n throw new BitError('there are no modified components to diff');\n }\n const diffResults = await this.componentsDiff(bitIds, version, toVersion, {\n verbose,\n formatDepsAsTable: table,\n });\n await consumer.onDestroy('diff');\n return diffResults;\n }\n\n async getConfigForDiffById(id: string): Promise<ConfigDiff> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.resolveComponentId(id);\n const component = await workspace.scope.get(componentId, false);\n if (!component) throw new Error(`getConfigForDiff: unable to find component ${id} in local scope`);\n return this.getConfigForDiffByCompObject(component);\n }\n\n async getConfigForDiffByCompObject(component: Component) {\n const depData = await this.depResolver.getDependencies(component);\n const serializedToString = (dep: SerializedDependency) => {\n const idWithoutVersion = dep.__type === 'package' ? dep.id : dep.id.split('@')[0];\n return `${idWithoutVersion}@${dep.version} (${dep.lifecycle}) ${dep.source ? `(${dep.source})` : ''}`;\n };\n const serializeAndSort = (deps: DependencyList) => {\n const serialized = deps.serialize().map(serializedToString);\n return serialized.sort();\n };\n const serializeAspect = (comp: Component) => {\n const aspects = comp.state.aspects.withoutEntries([BuilderAspect.id, DependencyResolverAspect.id]);\n // return aspects.serialize();\n return aspects.toLegacy().sortById().toConfigObject();\n };\n return {\n version: component.id.version,\n dependencies: serializeAndSort(depData),\n aspects: serializeAspect(component),\n };\n }\n\n private async componentsDiff(\n ids: ComponentID[],\n version: string | null | undefined,\n toVersion: string | null | undefined,\n diffOpts: DiffOptions\n ): Promise<DiffResults[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace?.consumer;\n const components = await this.workspace.getMany(ids);\n if (!components.length) throw new BitError('failed loading the components');\n\n const getResults = (): Promise<DiffResults[]> => {\n if (version && toVersion) {\n return Promise.all(ids.map((id) => getComponentDiffBetweenVersions(id)));\n }\n if (version) {\n return Promise.all(components.map((component) => getComponentDiffOfVersion(component)));\n }\n return Promise.all(components.map((component) => getComponentDiff(component)));\n };\n const componentsDiffResults = await getResults();\n return componentsDiffResults;\n\n async function getComponentDiffOfVersion(component: Component): Promise<DiffResults> {\n if (!version) throw new Error('getComponentDiffOfVersion expects to get version');\n const consumerComponent = component.state._consumer as ConsumerComponent;\n const diffResult: DiffResults = { id: component.id, hasDiff: false };\n const modelComponent = await consumer.scope.getModelComponentIfExist(component.id);\n if (!modelComponent) {\n throw new GeneralError(`component ${component.id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n const fromVersionObject: Version = await modelComponent.loadVersion(version, repository);\n const versionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const fsFiles = consumerComponent.files;\n // version must be defined as the component.componentFromModel do exist\n const versionB: string = component.id.version;\n // this function gets called only when version is set\n diffResult.filesDiff = await getFilesDiff(versionFiles, fsFiles, version, versionB);\n const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);\n await updateFieldsDiff(fromVersionComponent, consumerComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async function getComponentDiffBetweenVersions(id: ComponentID): Promise<DiffResults> {\n if (!version || !toVersion)\n throw new Error('getComponentDiffBetweenVersions expects to get version and toVersion');\n const diffResult: DiffResults = { id, hasDiff: false };\n const modelComponent = await consumer.scope.getModelComponentIfExist(id);\n if (!modelComponent) {\n throw new GeneralError(`component ${id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n\n const fromVersionObject: Version = await modelComponent.loadVersion(version, repository);\n const toVersionObject: Version = await modelComponent.loadVersion(toVersion, repository);\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n diffResult.filesDiff = await getFilesDiff(fromVersionFiles, toVersionFiles, version, toVersion);\n const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);\n const toVersionComponent = await modelComponent.toConsumerComponent(toVersion, consumer.scope.name, repository);\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async function getComponentDiff(component: Component): Promise<DiffResults> {\n const diffResult = { id: component.id, hasDiff: false };\n const consumerComponent = component.state._consumer as ConsumerComponent;\n if (!consumerComponent.componentFromModel) {\n // it's a new component. not modified. show all files as new.\n const fsFiles = consumerComponent.files;\n // @ts-ignore version must be defined as the component.componentFromModel do exist\n diffResult.filesDiff = await getFilesDiff([], fsFiles, component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n const modelFiles = consumerComponent.componentFromModel.files;\n const fsFiles = consumerComponent.files;\n // @ts-ignore version must be defined as the component.componentFromModel do exist\n diffResult.filesDiff = await getFilesDiff(modelFiles, fsFiles, component.id.version, component.id.version);\n await updateFieldsDiff(consumerComponent.componentFromModel, consumerComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n }\n\n async diffBetweenVersionsObjects(\n modelComponent: ModelComponent,\n fromVersionObject: Version,\n toVersionObject: Version,\n fromVersion: string,\n toVersion: string,\n diffOpts: DiffOptions\n ) {\n const diffResult: DiffResults = { id: modelComponent.toComponentId(), hasDiff: false };\n const scope = this.scope.legacyScope;\n const repository = scope.objects;\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n const color = diffOpts.color ?? true;\n diffResult.filesDiff = await getFilesDiff(\n fromVersionFiles,\n toVersionFiles,\n fromVersion,\n toVersion,\n undefined,\n color\n );\n const fromVersionComponent = await modelComponent.toConsumerComponent(\n fromVersionObject.hash().toString(),\n scope.name,\n repository\n );\n const toVersionComponent = await modelComponent.toConsumerComponent(\n toVersionObject.hash().toString(),\n scope.name,\n repository\n );\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n return diffResult;\n }\n\n private async parseValues(\n values: string[]\n ): Promise<{ bitIds: ComponentID[]; version?: string; toVersion?: string }> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n // option #1: bit diff\n // no arguments\n if (!values.length) {\n const componentIds = await this.workspace.listTagPendingIds();\n return { bitIds: componentIds.map((id) => id) };\n }\n const firstValue = values[0];\n const lastValue = values[values.length - 1];\n const oneBeforeLastValue = values[values.length - 2];\n const isLastItemVersion = ComponentID.isValidVersion(lastValue);\n const isOneBeforeLastItemVersion = ComponentID.isValidVersion(oneBeforeLastValue);\n // option #2: bit diff [ids...]\n // all arguments are ids\n if (!isLastItemVersion) {\n return { bitIds: this.getBitIdsForDiff(values) };\n }\n // option #3: bit diff [id] [version]\n // last argument is a version, first argument is id\n if (!isOneBeforeLastItemVersion) {\n if (values.length !== 2) {\n throw new BitError(\n `bit diff [id] [version] syntax was used, however, ${values.length} arguments were given instead of 2`\n );\n }\n return { bitIds: this.getBitIdsForDiff([firstValue]), version: lastValue };\n }\n // option #4: bit diff [id] [version] [to_version]\n // last argument and one before the last are versions, first argument is id\n if (values.length !== 3) {\n throw new BitError(\n `bit diff [id] [version] [to_version] syntax was used, however, ${values.length} arguments were given instead of 3`\n );\n }\n return { bitIds: this.getBitIdsForDiff([firstValue]), version: oneBeforeLastValue, toVersion: lastValue };\n }\n\n private getBitIdsForDiff(ids: string[]): ComponentID[] {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace.consumer;\n if (hasWildcard(ids)) {\n const componentsList = new ComponentsList(consumer);\n return componentsList.listComponentsByIdsWithWildcard(ids);\n }\n return ids.map((id) => consumer.getParsedId(id));\n }\n\n static slots = [];\n static dependencies = [\n GraphqlAspect,\n ComponentAspect,\n ScopeAspect,\n LoggerAspect,\n CLIAspect,\n WorkspaceAspect,\n TesterAspect,\n DependencyResolverAspect,\n ];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain\n ]) {\n const logger = loggerMain.createLogger(ComponentCompareAspect.id);\n const componentCompareMain = new ComponentCompareMain(component, scope, logger, tester, depResolver, workspace);\n cli.register(new DiffCmd(componentCompareMain));\n graphql.register(componentCompareSchema(componentCompareMain));\n return componentCompareMain;\n }\n}\n\nfunction hasDiff(diffResult: DiffResults): boolean {\n return !!((diffResult.filesDiff && diffResult.filesDiff.find((file) => file.diffOutput)) || diffResult.fieldsDiff);\n}\n\nasync function updateFieldsDiff(\n componentA: ConsumerComponent,\n componentB: ConsumerComponent,\n diffResult: DiffResults,\n diffOpts: DiffOptions\n) {\n diffResult.fieldsDiff = await diffBetweenComponentsObjects(componentA, componentB, diffOpts);\n diffResult.hasDiff = hasDiff(diffResult);\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareMain);\n\nexport default ComponentCompareMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAA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,OAAA,CAAAlK,oBAAA,GAAAA,oBAAA;AAAApB,eAAA,CAnTYoB,oBAAoB,WAuRhB,EAAE;AAAApB,eAAA,CAvRNoB,oBAAoB,kBAwRT,CACpBmK,wBAAa,EACbC,oBAAe,EACfC,oBAAW,EACXC,sBAAY,EACZC,gBAAS,EACTC,4BAAe,EACfC,sBAAY,EACZ1E,6BAAwB,CACzB;AAAAnH,eAAA,CAjSUoB,oBAAoB,aAkSd0K,kBAAW;AAmB9B,SAASxD,OAAOA,CAACD,UAAuB,EAAW;EACjD,OAAO,CAAC,EAAGA,UAAU,CAACvE,SAAS,IAAIuE,UAAU,CAACvE,SAAS,CAACiI,IAAI,CAAEtI,IAAI,IAAKA,IAAI,CAACuI,UAAU,CAAC,IAAK3D,UAAU,CAAC7D,UAAU,CAAC;AACpH;AAEA,eAAeyE,gBAAgBA,CAC7BgD,UAA6B,EAC7BC,UAA6B,EAC7B7D,UAAuB,EACvBZ,QAAqB,EACrB;EACAY,UAAU,CAAC7D,UAAU,GAAG,MAAM,IAAA2H,oDAA4B,EAACF,UAAU,EAAEC,UAAU,EAAEzE,QAAQ,CAAC;EAC5FY,UAAU,CAACC,OAAO,GAAGA,OAAO,CAACD,UAAU,CAAC;AAC1C;AAEA4C,2CAAsB,CAACmB,UAAU,CAAChL,oBAAoB,CAAC;AAAC,IAAAiL,QAAA,GAAAf,OAAA,CAAAvL,OAAA,GAEzCqB,oBAAoB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@1.0.110/dist/component-compare.compositions.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@1.0.110/dist/component-compare.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component-compare",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.110",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/component-compare",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "component-compare",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.110"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"graphql-tag": "2.12.1",
|
|
@@ -21,23 +21,23 @@
|
|
|
21
21
|
"@teambit/component.ui.component-compare.compare-aspects.compare-aspects": "0.0.145",
|
|
22
22
|
"@teambit/component.ui.component-compare.component-compare": "0.0.171",
|
|
23
23
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.506",
|
|
24
|
-
"@teambit/component": "1.0.
|
|
25
|
-
"@teambit/builder": "1.0.
|
|
26
|
-
"@teambit/cli": "0.0.
|
|
27
|
-
"@teambit/dependency-resolver": "1.0.
|
|
28
|
-
"@teambit/graphql": "1.0.
|
|
29
|
-
"@teambit/logger": "0.0.
|
|
30
|
-
"@teambit/scope": "1.0.
|
|
31
|
-
"@teambit/tester": "1.0.
|
|
32
|
-
"@teambit/workspace": "1.0.
|
|
33
|
-
"@teambit/ui": "1.0.
|
|
24
|
+
"@teambit/component": "1.0.110",
|
|
25
|
+
"@teambit/builder": "1.0.110",
|
|
26
|
+
"@teambit/cli": "0.0.842",
|
|
27
|
+
"@teambit/dependency-resolver": "1.0.110",
|
|
28
|
+
"@teambit/graphql": "1.0.110",
|
|
29
|
+
"@teambit/logger": "0.0.935",
|
|
30
|
+
"@teambit/scope": "1.0.110",
|
|
31
|
+
"@teambit/tester": "1.0.110",
|
|
32
|
+
"@teambit/workspace": "1.0.110",
|
|
33
|
+
"@teambit/ui": "1.0.110"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/lodash.flatten": "4.4.6",
|
|
37
37
|
"@types/mocha": "9.1.0",
|
|
38
38
|
"@types/jest": "^29.2.2",
|
|
39
39
|
"@types/testing-library__jest-dom": "^5.9.5",
|
|
40
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
40
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.15"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -49,11 +49,15 @@
|
|
|
49
49
|
"optionalDependencies": {},
|
|
50
50
|
"peerDependenciesMeta": {},
|
|
51
51
|
"exports": {
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
52
|
+
".": {
|
|
53
|
+
"node": {
|
|
54
|
+
"require": "./dist/index.js",
|
|
55
|
+
"import": "./dist/esm.mjs"
|
|
56
|
+
},
|
|
57
|
+
"default": "./dist/index.js"
|
|
55
58
|
},
|
|
56
|
-
"
|
|
59
|
+
"./dist/*": "./dist/*",
|
|
60
|
+
"./artifacts/*": "./artifacts/*"
|
|
57
61
|
},
|
|
58
62
|
"private": false,
|
|
59
63
|
"engines": {
|