@teambit/component-compare 1.0.424 → 1.0.426
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/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_component_component_compare-preview.js +1 -1
- package/artifacts/schema.json +9 -9
- package/dist/component-compare.main.runtime.js.map +1 -1
- package/dist/{preview-1728098619529.js → preview-1728236174539.js} +2 -2
- package/package.json +16 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.component/component-compare@1.0.
|
|
3
|
+
<testsuite name="teambit.component/component-compare@1.0.426" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["teambit.component/component-compare-preview"]=o():e["teambit.component/component-compare-preview"]=o()}(self,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["teambit.component/component-compare-preview"]=o():e["teambit.component/component-compare-preview"]=o()}(self,(()=>(()=>{"use strict";var e={2985:(e,o,t)=>{var n={id:"teambit.component/component-compare@1.0.426",homepage:"https://bit.cloud/teambit/component/component-compare",exported:!0};function r(){const e=a(t(1594));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.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,o.Logo=i},1594:e=>{e.exports=React}},o={};function t(n){var r=o[n];if(void 0!==r)return r.exports;var a=o[n]={exports:{}};return e[n](a,a.exports,t),a.exports}t.d=(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};t.r(n),t.d(n,{compositions:()=>u,compositions_metadata:()=>v,overview:()=>f});var r={};t.r(r),t.d(r,{default:()=>d});var a=t(2985);t(1594);const i=MdxJsReact,p=TeambitMdxUiMdxScopeContext;var c=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},m.apply(null,arguments)}var s={},l="wrapper";function d(e){var o=e.components,t=function(e,o){if(null==e)return{};var t,n,r=function(e,o){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(o.includes(n))continue;t[n]=e[n]}return t}(e,o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],o.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,c);return(0,i.mdx)(l,m({},s,t,{components:o,mdxType:"MDXLayout"}),(0,i.mdx)(p.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,i.mdx)("p",null,(0,i.mdx)("a",{parentName:"p",href:"https://bit.cloud/blog/introducing-a-new-feature-component-compare-l4qyxtoo?baseVersion=0.0.5"},"Introducing Component Compare")),(0,i.mdx)("p",null,"Component Compare allows users to compare two component versions. It provides a unified view of all the following differences,"),(0,i.mdx)("ul",null,(0,i.mdx)("li",{parentName:"ul"},"Code: Modifications made to the source code of the component."),(0,i.mdx)("li",{parentName:"ul"},"Composition: Changes made to how the component looks visually."),(0,i.mdx)("li",{parentName:"ul"},"Tests: Changes made to how the component is tested."),(0,i.mdx)("li",{parentName:"ul"},"Dependencies: Changes made to the component's dependency graph."),(0,i.mdx)("li",{parentName:"ul"},"Overview: Changes to the auto-generated documentation for the component."),(0,i.mdx)("li",{parentName:"ul"},"Aspects: Changes made to the extensions for the component."),(0,i.mdx)("li",{parentName:"ul"},"Changelog: Changes exported between the two selected versions"))))}d.isMDXComponent=!0;const u=[a],f=[r],v={compositions:[{displayName:"Logo",identifier:"Logo"}]};return n})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -766,7 +766,7 @@
|
|
|
766
766
|
"componentId": {
|
|
767
767
|
"scope": "teambit.legacy",
|
|
768
768
|
"name": "component-diff",
|
|
769
|
-
"version": "0.0.
|
|
769
|
+
"version": "0.0.35"
|
|
770
770
|
}
|
|
771
771
|
},
|
|
772
772
|
"isOptional": false,
|
|
@@ -1784,7 +1784,7 @@
|
|
|
1784
1784
|
"componentId": {
|
|
1785
1785
|
"scope": "teambit.legacy",
|
|
1786
1786
|
"name": "component-diff",
|
|
1787
|
-
"version": "0.0.
|
|
1787
|
+
"version": "0.0.35"
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
},
|
|
@@ -1817,7 +1817,7 @@
|
|
|
1817
1817
|
"componentId": {
|
|
1818
1818
|
"scope": "teambit.legacy",
|
|
1819
1819
|
"name": "component-diff",
|
|
1820
|
-
"version": "0.0.
|
|
1820
|
+
"version": "0.0.35"
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
1823
|
},
|
|
@@ -1850,7 +1850,7 @@
|
|
|
1850
1850
|
"componentId": {
|
|
1851
1851
|
"scope": "teambit.legacy",
|
|
1852
1852
|
"name": "component-diff",
|
|
1853
|
-
"version": "0.0.
|
|
1853
|
+
"version": "0.0.35"
|
|
1854
1854
|
}
|
|
1855
1855
|
}
|
|
1856
1856
|
},
|
|
@@ -2603,7 +2603,7 @@
|
|
|
2603
2603
|
"componentId": {
|
|
2604
2604
|
"scope": "teambit.legacy",
|
|
2605
2605
|
"name": "component-diff",
|
|
2606
|
-
"version": "0.0.
|
|
2606
|
+
"version": "0.0.35"
|
|
2607
2607
|
}
|
|
2608
2608
|
},
|
|
2609
2609
|
"isOptional": false,
|
|
@@ -3002,7 +3002,7 @@
|
|
|
3002
3002
|
"componentId": {
|
|
3003
3003
|
"scope": "teambit.legacy",
|
|
3004
3004
|
"name": "component-diff",
|
|
3005
|
-
"version": "0.0.
|
|
3005
|
+
"version": "0.0.35"
|
|
3006
3006
|
}
|
|
3007
3007
|
},
|
|
3008
3008
|
"isOptional": false,
|
|
@@ -3091,7 +3091,7 @@
|
|
|
3091
3091
|
"componentId": {
|
|
3092
3092
|
"scope": "teambit.legacy",
|
|
3093
3093
|
"name": "component-diff",
|
|
3094
|
-
"version": "0.0.
|
|
3094
|
+
"version": "0.0.35"
|
|
3095
3095
|
}
|
|
3096
3096
|
},
|
|
3097
3097
|
"isOptional": false,
|
|
@@ -3116,7 +3116,7 @@
|
|
|
3116
3116
|
"componentId": {
|
|
3117
3117
|
"scope": "teambit.legacy",
|
|
3118
3118
|
"name": "component-diff",
|
|
3119
|
-
"version": "0.0.
|
|
3119
|
+
"version": "0.0.35"
|
|
3120
3120
|
}
|
|
3121
3121
|
},
|
|
3122
3122
|
"isOptional": false,
|
|
@@ -3881,7 +3881,7 @@
|
|
|
3881
3881
|
"componentId": {
|
|
3882
3882
|
"scope": "teambit.component",
|
|
3883
3883
|
"name": "component-compare",
|
|
3884
|
-
"version": "1.0.
|
|
3884
|
+
"version": "1.0.426"
|
|
3885
3885
|
},
|
|
3886
3886
|
"taggedModuleExports": []
|
|
3887
3887
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_bitError","_workspace","_componentId","_scope","_graphql","_builder","_dependencyResolver","_logger","_legacy","_tester","_component","_componentCompare","_componentCompare2","_diffCmd","_importer","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ComponentCompareMain","constructor","componentAspect","scope","logger","tester","depResolver","importer","workspace","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","BitError","toString","importObjectsFromMainIfExist","cache","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","pattern","toVersion","verbose","table","OutsideWorkspaceError","ids","idsByPattern","listTagPendingIds","consumer","length","diffResults","componentsDiff","formatDepsAsTable","onDestroy","getConfigForDiffById","componentId","resolveComponentId","component","Error","getConfigForDiffByCompObject","modifiedIds","depData","getDependencies","modifiedIdsStr","toStringWithoutVersion","serializedToString","dep","idWithoutVersion","__type","split","lifecycle","source","serializeAndSort","deps","serialized","serialize","sort","serializeAspect","comp","aspects","state","withoutEntries","BuilderAspect","DependencyResolverAspect","toLegacy","sortById","toConfigObject","dependencies","diffOpts","components","getMany","getResults","Promise","all","getComponentDiffBetweenVersions","getComponentDiffOfVersion","getComponentDiff","componentsDiffResults","consumerComponent","_consumer","diffResult","hasDiff","idList","ComponentIdList","fromArray","changeVersion","scopeImporter","importWithoutDeps","reason","fromVersionObject","versionFiles","modelFilesToSourceFiles","fsFiles","files","versionB","getFilesDiff","fromVersionComponent","toConsumerComponent","name","updateFieldsDiff","toVersionObject","fromVersionFiles","toVersionFiles","toVersionComponent","componentFromModel","isDeleted","modelFiles","fromVersion","toComponentId","color","undefined","hash","provider","graphql","loggerMain","cli","createLogger","ComponentCompareAspect","componentCompareMain","register","DiffCmd","componentCompareSchema","exports","GraphqlAspect","ComponentAspect","ScopeAspect","LoggerAspect","CLIAspect","WorkspaceAspect","TesterAspect","ImporterAspect","MainRuntime","find","diffOutput","componentA","componentB","diffBetweenComponentsObjects","addRuntime","_default","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, ComponentIdList } from '@teambit/component-id';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { BuilderAspect } from '@teambit/builder';\nimport { ModelComponent, Version } from '@teambit/legacy/dist/scope/models';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport {\n 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 diffBetweenComponentsObjects,\n} from '@teambit/legacy.component-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';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\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 importer: ImporterMain,\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 BitError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n // import missing components that might be on main\n await this.importer.importObjectsFromMainIfExist([baseCompId, compareCompId], {\n cache: true,\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(\n pattern?: string,\n version?: string,\n toVersion?: string,\n { verbose, table }: { verbose?: boolean; table?: boolean } = {}\n ): Promise<any> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const ids = pattern ? await this.workspace.idsByPattern(pattern) : await this.workspace.listTagPendingIds();\n const consumer = this.workspace.consumer;\n if (!ids.length) {\n return [];\n }\n const diffResults = await this.componentsDiff(ids, 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, modifiedIds?: ComponentID[]) {\n const depData = this.depResolver.getDependencies(component);\n const modifiedIdsStr = modifiedIds?.map((id) => id.toStringWithoutVersion());\n const serializedToString = (dep: SerializedDependency) => {\n const idWithoutVersion = dep.__type === 'package' ? dep.id : dep.id.split('@')[0];\n const version = modifiedIdsStr?.includes(idWithoutVersion) ? `<modified>` : dep.version;\n return `${idWithoutVersion}@${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 BitError(`component ${component.id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n const idList = ComponentIdList.fromArray([component.id.changeVersion(version)]);\n await consumer.scope.scopeImporter.importWithoutDeps(idList, { cache: true, reason: 'to show diff' });\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 BitError(`component ${id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n const idList = ComponentIdList.fromArray([id.changeVersion(version), id.changeVersion(toVersion)]);\n await consumer.scope.scopeImporter.importWithoutDeps(idList, { cache: true, reason: 'to show diff' });\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: DiffResults = { id: component.id, hasDiff: false };\n const consumerComponent = component.state._consumer as ConsumerComponent;\n if (!consumerComponent.componentFromModel) {\n if (component.isDeleted()) {\n // component exists in the model but not in the filesystem, show all files as deleted\n // the reason it is loaded without componentFromModel is because it was loaded from the scope, not workspace.\n // as a proof, consumerComponent.loadedFromFileSystem is false.\n const modelFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff(modelFiles, [], component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n // it's a new component. not modified. show all files as new.\n const fsFiles = consumerComponent.files;\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 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 static slots = [];\n static dependencies = [\n GraphqlAspect,\n ComponentAspect,\n ScopeAspect,\n LoggerAspect,\n CLIAspect,\n WorkspaceAspect,\n TesterAspect,\n DependencyResolverAspect,\n ImporterAspect,\n ];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain,\n ImporterMain\n ]) {\n const logger = loggerMain.createLogger(ComponentCompareAspect.id);\n const componentCompareMain = new ComponentCompareMain(\n component,\n scope,\n logger,\n tester,\n depResolver,\n importer,\n workspace\n );\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;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,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AC/CL,OAAO,CAACM,QAAQ,CAAC,IAAAE,0CAAsB,EAACH,oBAAoB,CAAC,CAAC;IAC9D,OAAOA,oBAAoB;EAC7B;AACF;AAACI,OAAA,CAAAhK,oBAAA,GAAAA,oBAAA;AAAAnB,eAAA,CAlSYmB,oBAAoB,WA4PhB,EAAE;AAAAnB,eAAA,CA5PNmB,oBAAoB,kBA6PT,CACpBiK,wBAAa,EACbC,4BAAe,EACfC,oBAAW,EACXC,sBAAY,EACZC,gBAAS,EACTC,4BAAe,EACfC,sBAAY,EACZlE,8CAAwB,EACxBmE,0BAAc,CACf;AAAA3L,eAAA,CAvQUmB,oBAAoB,aAwQdyK,kBAAW;AA4B9B,SAASlD,OAAOA,CAACD,UAAuB,EAAW;EACjD,OAAO,CAAC,EAAGA,UAAU,CAACzE,SAAS,IAAIyE,UAAU,CAACzE,SAAS,CAAC6H,IAAI,CAAElI,IAAI,IAAKA,IAAI,CAACmI,UAAU,CAAC,IAAKrD,UAAU,CAAC/D,UAAU,CAAC;AACpH;AAEA,eAAekF,gBAAgBA,CAC7BmC,UAA6B,EAC7BC,UAA6B,EAC7BvD,UAAuB,EACvBZ,QAAqB,EACrB;EACAY,UAAU,CAAC/D,UAAU,GAAG,MAAM,IAAAuH,sCAA4B,EAACF,UAAU,EAAEC,UAAU,EAAEnE,QAAQ,CAAC;EAC5FY,UAAU,CAACC,OAAO,GAAGA,OAAO,CAACD,UAAU,CAAC;AAC1C;AAEAqC,2CAAsB,CAACoB,UAAU,CAAC/K,oBAAoB,CAAC;AAAC,IAAAgL,QAAA,GAAAhB,OAAA,CAAAiB,OAAA,GAEzCjL,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_bitError","_workspace","_componentId","_scope","_graphql","_builder","_dependencyResolver","_logger","_legacy","_tester","_component","_componentCompare","_componentCompare2","_diffCmd","_importer","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ComponentCompareMain","constructor","componentAspect","scope","logger","tester","depResolver","importer","workspace","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","BitError","toString","importObjectsFromMainIfExist","cache","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","pattern","toVersion","verbose","table","OutsideWorkspaceError","ids","idsByPattern","listTagPendingIds","consumer","length","diffResults","componentsDiff","formatDepsAsTable","onDestroy","getConfigForDiffById","componentId","resolveComponentId","component","Error","getConfigForDiffByCompObject","modifiedIds","depData","getDependencies","modifiedIdsStr","toStringWithoutVersion","serializedToString","dep","idWithoutVersion","__type","split","lifecycle","source","serializeAndSort","deps","serialized","serialize","sort","serializeAspect","comp","aspects","state","withoutEntries","BuilderAspect","DependencyResolverAspect","toLegacy","sortById","toConfigObject","dependencies","diffOpts","components","getMany","getResults","Promise","all","getComponentDiffBetweenVersions","getComponentDiffOfVersion","getComponentDiff","componentsDiffResults","consumerComponent","_consumer","diffResult","hasDiff","idList","ComponentIdList","fromArray","changeVersion","scopeImporter","importWithoutDeps","reason","fromVersionObject","versionFiles","modelFilesToSourceFiles","fsFiles","files","versionB","getFilesDiff","fromVersionComponent","toConsumerComponent","name","updateFieldsDiff","toVersionObject","fromVersionFiles","toVersionFiles","toVersionComponent","componentFromModel","isDeleted","modelFiles","fromVersion","toComponentId","color","undefined","hash","provider","graphql","loggerMain","cli","createLogger","ComponentCompareAspect","componentCompareMain","register","DiffCmd","componentCompareSchema","exports","GraphqlAspect","ComponentAspect","ScopeAspect","LoggerAspect","CLIAspect","WorkspaceAspect","TesterAspect","ImporterAspect","MainRuntime","find","diffOutput","componentA","componentB","diffBetweenComponentsObjects","addRuntime","_default","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, ComponentIdList } from '@teambit/component-id';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { BuilderAspect } from '@teambit/builder';\nimport { ModelComponent, Version } from '@teambit/legacy/dist/scope/models';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport {\n 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 diffBetweenComponentsObjects,\n} from '@teambit/legacy.component-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';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\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 importer: ImporterMain,\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 BitError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n // import missing components that might be on main\n await this.importer.importObjectsFromMainIfExist([baseCompId, compareCompId], {\n cache: true,\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(\n pattern?: string,\n version?: string,\n toVersion?: string,\n { verbose, table }: { verbose?: boolean; table?: boolean } = {}\n ): Promise<any> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const ids = pattern ? await this.workspace.idsByPattern(pattern) : await this.workspace.listTagPendingIds();\n const consumer = this.workspace.consumer;\n if (!ids.length) {\n return [];\n }\n const diffResults = await this.componentsDiff(ids, 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, modifiedIds?: ComponentID[]) {\n const depData = this.depResolver.getDependencies(component);\n const modifiedIdsStr = modifiedIds?.map((id) => id.toStringWithoutVersion());\n const serializedToString = (dep: SerializedDependency) => {\n const idWithoutVersion = dep.__type === 'package' ? dep.id : dep.id.split('@')[0];\n const version = modifiedIdsStr?.includes(idWithoutVersion) ? `<modified>` : dep.version;\n return `${idWithoutVersion}@${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 BitError(`component ${component.id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n const idList = ComponentIdList.fromArray([component.id.changeVersion(version)]);\n await consumer.scope.scopeImporter.importWithoutDeps(idList, { cache: true, reason: 'to show diff' });\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 BitError(`component ${id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n const idList = ComponentIdList.fromArray([id.changeVersion(version), id.changeVersion(toVersion)]);\n await consumer.scope.scopeImporter.importWithoutDeps(idList, { cache: true, reason: 'to show diff' });\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: DiffResults = { id: component.id, hasDiff: false };\n const consumerComponent = component.state._consumer as ConsumerComponent;\n if (!consumerComponent.componentFromModel) {\n if (component.isDeleted()) {\n // component exists in the model but not in the filesystem, show all files as deleted\n // the reason it is loaded without componentFromModel is because it was loaded from the scope, not workspace.\n // as a proof, consumerComponent.loadedFromFileSystem is false.\n const modelFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff(modelFiles, [], component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n // it's a new component. not modified. show all files as new.\n const fsFiles = consumerComponent.files;\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 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 static slots = [];\n static dependencies = [\n GraphqlAspect,\n ComponentAspect,\n ScopeAspect,\n LoggerAspect,\n CLIAspect,\n WorkspaceAspect,\n TesterAspect,\n DependencyResolverAspect,\n ImporterAspect,\n ];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain,\n ImporterMain,\n ]) {\n const logger = loggerMain.createLogger(ComponentCompareAspect.id);\n const componentCompareMain = new ComponentCompareMain(\n component,\n scope,\n logger,\n tester,\n depResolver,\n importer,\n workspace\n );\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;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,Y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,oBAAoB,CAAC,CAAC;IAC9D,OAAOA,oBAAoB;EAC7B;AACF;AAACI,OAAA,CAAAhK,oBAAA,GAAAA,oBAAA;AAAAnB,eAAA,CAlSYmB,oBAAoB,WA4PhB,EAAE;AAAAnB,eAAA,CA5PNmB,oBAAoB,kBA6PT,CACpBiK,wBAAa,EACbC,4BAAe,EACfC,oBAAW,EACXC,sBAAY,EACZC,gBAAS,EACTC,4BAAe,EACfC,sBAAY,EACZlE,8CAAwB,EACxBmE,0BAAc,CACf;AAAA3L,eAAA,CAvQUmB,oBAAoB,aAwQdyK,kBAAW;AA4B9B,SAASlD,OAAOA,CAACD,UAAuB,EAAW;EACjD,OAAO,CAAC,EAAGA,UAAU,CAACzE,SAAS,IAAIyE,UAAU,CAACzE,SAAS,CAAC6H,IAAI,CAAElI,IAAI,IAAKA,IAAI,CAACmI,UAAU,CAAC,IAAKrD,UAAU,CAAC/D,UAAU,CAAC;AACpH;AAEA,eAAekF,gBAAgBA,CAC7BmC,UAA6B,EAC7BC,UAA6B,EAC7BvD,UAAuB,EACvBZ,QAAqB,EACrB;EACAY,UAAU,CAAC/D,UAAU,GAAG,MAAM,IAAAuH,sCAA4B,EAACF,UAAU,EAAEC,UAAU,EAAEnE,QAAQ,CAAC;EAC5FY,UAAU,CAACC,OAAO,GAAGA,OAAO,CAACD,UAAU,CAAC;AAC1C;AAEAqC,2CAAsB,CAACoB,UAAU,CAAC/K,oBAAoB,CAAC;AAAC,IAAAgL,QAAA,GAAAhB,OAAA,CAAAiB,OAAA,GAEzCjL,oBAAoB","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.426/dist/component-compare.compositions.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.426/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.426",
|
|
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.426"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"graphql-tag": "2.12.1",
|
|
@@ -19,21 +19,21 @@
|
|
|
19
19
|
"@teambit/component-id": "1.2.2",
|
|
20
20
|
"@teambit/component.ui.component-compare.compare-aspects.compare-aspects": "0.0.146",
|
|
21
21
|
"@teambit/component.ui.component-compare.models.component-compare-props": "0.0.111",
|
|
22
|
-
"@teambit/component": "1.0.
|
|
23
|
-
"@teambit/builder": "1.0.
|
|
24
|
-
"@teambit/cli": "0.0.
|
|
25
|
-
"@teambit/dependency-resolver": "1.0.
|
|
26
|
-
"@teambit/graphql": "1.0.
|
|
27
|
-
"@teambit/importer": "1.0.
|
|
28
|
-
"@teambit/legacy.component-diff": "0.0.
|
|
29
|
-
"@teambit/logger": "0.0.
|
|
30
|
-
"@teambit/scope": "1.0.
|
|
31
|
-
"@teambit/tester": "1.0.
|
|
32
|
-
"@teambit/workspace": "1.0.
|
|
33
|
-
"@teambit/component.ui.component-compare.changelog": "0.0.
|
|
34
|
-
"@teambit/component.ui.component-compare.component-compare": "0.0.
|
|
22
|
+
"@teambit/component": "1.0.426",
|
|
23
|
+
"@teambit/builder": "1.0.426",
|
|
24
|
+
"@teambit/cli": "0.0.1003",
|
|
25
|
+
"@teambit/dependency-resolver": "1.0.426",
|
|
26
|
+
"@teambit/graphql": "1.0.426",
|
|
27
|
+
"@teambit/importer": "1.0.426",
|
|
28
|
+
"@teambit/legacy.component-diff": "0.0.35",
|
|
29
|
+
"@teambit/logger": "0.0.1096",
|
|
30
|
+
"@teambit/scope": "1.0.426",
|
|
31
|
+
"@teambit/tester": "1.0.426",
|
|
32
|
+
"@teambit/workspace": "1.0.426",
|
|
33
|
+
"@teambit/component.ui.component-compare.changelog": "0.0.191",
|
|
34
|
+
"@teambit/component.ui.component-compare.component-compare": "0.0.194",
|
|
35
35
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.511",
|
|
36
|
-
"@teambit/ui": "1.0.
|
|
36
|
+
"@teambit/ui": "1.0.426"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/lodash.flatten": "4.4.6",
|