@teambit/deprecation 1.0.556 → 1.0.558

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.
@@ -220,7 +220,7 @@ class DeprecationMain {
220
220
  issues.registerAddComponentsIssues(deprecation.addDeprecatedDependenciesIssues.bind(deprecation));
221
221
  cli.register(new (_deprecateCmd().DeprecateCmd)(deprecation), new (_undeprecateCmd().UndeprecateCmd)(deprecation));
222
222
  componentAspect.registerShowFragments([new (_deprecation3().DeprecationFragment)(deprecation)]);
223
- graphql.register((0, _deprecation2().deprecationSchema)(deprecation));
223
+ graphql.register(() => (0, _deprecation2().deprecationSchema)(deprecation));
224
224
  return deprecation;
225
225
  }
226
226
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_semver","_interopRequireDefault","_component","_scope","_workspace","_graphql","_deprecation","_deprecation2","_deprecation3","_deprecateCmd","_undeprecateCmd","_issues","_pMapSeries","_dependencyResolver","_lodash","_componentIssues","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DeprecationMain","constructor","scope","workspace","depsResolver","getDeprecationInfo","component","headComponent","getHeadComponent","config","extensions","findExtension","DeprecationAspect","id","deprecatedBackwardCompatibility","state","_consumer","deprecated","isDeprecate","Boolean","deprecate","currentTag","getTag","isDeprecateByRange","range","semver","satisfies","version","newId","ComponentID","fromObject","toString","undefined","head","hash","headTag","headComp","get","changeVersion","Error","componentId","results","bitMap","addComponentConfig","toObject","write","deprecateByCLIValues","resolveComponentId","newComponentId","unDeprecateByCLIValues","unDeprecate","addDeprecatedDependenciesIssues","components","pMapSeries","addDeprecatedDepIssue","dependencies","getComponentDependencies","removedWithUndefined","Promise","all","map","dep","isRemoved","isDeprecatedByIdWithoutLoadingComponent","removed","compact","length","issues","getOrCreate","IssuesClasses","DeprecatedDependencies","hasVersion","bitmapEntry","getBitmapEntryIfExist","isDeprecated","isUndeprecated","modelComp","getBitObjectModelComponent","legacyScope","objects","provider","graphql","componentAspect","cli","deprecation","registerAddComponentsIssues","bind","register","DeprecateCmd","UndeprecateCmd","registerShowFragments","DeprecationFragment","deprecationSchema","exports","MainRuntime","GraphqlAspect","ScopeAspect","ComponentAspect","WorkspaceAspect","CLIAspect","DependencyResolverAspect","IssuesAspect","addRuntime"],"sources":["deprecation.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport semver from 'semver';\nimport { ComponentMain, ComponentAspect, Component, ComponentID } from '@teambit/component';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { ComponentIdObj } from '@teambit/component-id';\nimport { DeprecationAspect } from './deprecation.aspect';\nimport { deprecationSchema } from './deprecation.graphql';\nimport { DeprecationFragment } from './deprecation.fragment';\nimport { DeprecateCmd } from './deprecate-cmd';\nimport { UndeprecateCmd } from './undeprecate-cmd';\nimport { IssuesAspect, IssuesMain } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { compact } from 'lodash';\nimport { IssuesClasses } from '@teambit/component-issues';\n\nexport type DeprecationInfo = {\n isDeprecate: boolean;\n newId?: string;\n range?: string;\n};\n\nexport type DeprecationMetadata = {\n /**\n * whether the head is deprecated\n */\n deprecate?: boolean;\n /**\n * the new id to use instead of the current one\n */\n newId?: ComponentIdObj;\n /**\n * Semver range to deprecate previous versions\n */\n range?: string;\n};\n\nexport class DeprecationMain {\n constructor(\n private scope: ScopeMain,\n private workspace: Workspace,\n private depsResolver: DependencyResolverMain\n ) {}\n\n async getDeprecationInfo(component: Component): Promise<DeprecationInfo> {\n const headComponent = await this.getHeadComponent(component);\n\n const data = headComponent.config.extensions.findExtension(DeprecationAspect.id)?.config as\n | DeprecationMetadata\n | undefined;\n const deprecatedBackwardCompatibility = component.state._consumer.deprecated;\n const isDeprecate = Boolean(data?.deprecate || deprecatedBackwardCompatibility);\n const currentTag = component.getTag();\n const isDeprecateByRange = Boolean(data?.range && currentTag && semver.satisfies(currentTag.version, data.range));\n const newId = data?.newId ? ComponentID.fromObject(data?.newId).toString() : undefined;\n return {\n isDeprecate: isDeprecate || isDeprecateByRange,\n newId,\n range: data?.range,\n };\n }\n\n private async getHeadComponent(component: Component): Promise<Component> {\n if (\n component.id.version &&\n component.head &&\n component.id.version !== component.head?.hash &&\n component.id.version !== component.headTag?.version.version\n ) {\n const headComp = this.workspace // if workspace exits, prefer using the workspace as it may be modified\n ? await this.workspace.get(component.id.changeVersion(undefined))\n : await this.scope.get(component.id.changeVersion(component.head.hash));\n if (!headComp) throw new Error(`unable to get the head of ${component.id.toString()}`);\n return headComp;\n }\n return component;\n }\n\n /**\n * mark a component as deprecated. after this change, the component will be modified.\n * tag and export the component to have it deprecated on the remote.\n *\n * @param componentId\n * @param newId\n * @returns boolean whether or not the component has been deprecated\n */\n async deprecate(componentId: ComponentID, newId?: ComponentID, range?: string): Promise<boolean> {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: !range,\n newId: newId?.toObject(),\n range,\n });\n await this.workspace.bitMap.write(`deprecate ${componentId.toString()}`);\n\n return results;\n }\n\n async deprecateByCLIValues(id: string, newId?: string, range?: string): Promise<boolean> {\n const componentId = await this.workspace.resolveComponentId(id);\n const newComponentId = newId ? await this.workspace.resolveComponentId(newId) : undefined;\n return this.deprecate(componentId, newComponentId, range);\n }\n\n async unDeprecateByCLIValues(id: string): Promise<boolean> {\n const componentId = await this.workspace.resolveComponentId(id);\n return this.unDeprecate(componentId);\n }\n\n async unDeprecate(componentId: ComponentID) {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: false,\n newId: '',\n });\n await this.workspace.bitMap.write(`undeprecate ${componentId.toString()}`);\n\n return results;\n }\n\n async addDeprecatedDependenciesIssues(components: Component[]) {\n await pMapSeries(components, async (component) => {\n await this.addDeprecatedDepIssue(component);\n });\n }\n\n private async addDeprecatedDepIssue(component: Component) {\n const dependencies = this.depsResolver.getComponentDependencies(component);\n const removedWithUndefined = await Promise.all(\n dependencies.map(async (dep) => {\n const isRemoved = await this.isDeprecatedByIdWithoutLoadingComponent(dep.componentId);\n if (isRemoved) return dep.componentId;\n return undefined;\n })\n );\n const removed = compact(removedWithUndefined).map((id) => id.toString());\n if (removed.length) {\n component.state.issues.getOrCreate(IssuesClasses.DeprecatedDependencies).data = removed;\n }\n }\n\n /**\n * performant version of isDeprecated() in case the component object is not available and loading it is expensive.\n */\n private async isDeprecatedByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean> {\n if (!componentId.hasVersion()) return false;\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId);\n if (bitmapEntry && bitmapEntry.isDeprecated()) return true;\n if (bitmapEntry && bitmapEntry.isUndeprecated()) return false;\n const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId);\n if (!modelComp) return false;\n const isDeprecated = await modelComp.isDeprecated(\n this.workspace.scope.legacyScope.objects,\n componentId.version as string\n );\n return Boolean(isDeprecated);\n }\n\n static runtime = MainRuntime;\n static dependencies = [\n GraphqlAspect,\n ScopeAspect,\n ComponentAspect,\n WorkspaceAspect,\n CLIAspect,\n DependencyResolverAspect,\n IssuesAspect,\n ];\n static async provider([graphql, scope, componentAspect, workspace, cli, depsResolver, issues]: [\n GraphqlMain,\n ScopeMain,\n ComponentMain,\n Workspace,\n CLIMain,\n DependencyResolverMain,\n IssuesMain,\n ]) {\n const deprecation = new DeprecationMain(scope, workspace, depsResolver);\n issues.registerAddComponentsIssues(deprecation.addDeprecatedDependenciesIssues.bind(deprecation));\n cli.register(new DeprecateCmd(deprecation), new UndeprecateCmd(deprecation));\n componentAspect.registerShowFragments([new DeprecationFragment(deprecation)]);\n graphql.register(deprecationS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XC,4BAAe,EACfC,4BAAe,EACfC,gBAAS,EACTC,8CAAwB,EACxBC,sBAAY,CACb;AAoBHzF,gCAAiB,CAAC0F,UAAU,CAACtG,eAAe,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_semver","_interopRequireDefault","_component","_scope","_workspace","_graphql","_deprecation","_deprecation2","_deprecation3","_deprecateCmd","_undeprecateCmd","_issues","_pMapSeries","_dependencyResolver","_lodash","_componentIssues","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DeprecationMain","constructor","scope","workspace","depsResolver","getDeprecationInfo","component","headComponent","getHeadComponent","config","extensions","findExtension","DeprecationAspect","id","deprecatedBackwardCompatibility","state","_consumer","deprecated","isDeprecate","Boolean","deprecate","currentTag","getTag","isDeprecateByRange","range","semver","satisfies","version","newId","ComponentID","fromObject","toString","undefined","head","hash","headTag","headComp","get","changeVersion","Error","componentId","results","bitMap","addComponentConfig","toObject","write","deprecateByCLIValues","resolveComponentId","newComponentId","unDeprecateByCLIValues","unDeprecate","addDeprecatedDependenciesIssues","components","pMapSeries","addDeprecatedDepIssue","dependencies","getComponentDependencies","removedWithUndefined","Promise","all","map","dep","isRemoved","isDeprecatedByIdWithoutLoadingComponent","removed","compact","length","issues","getOrCreate","IssuesClasses","DeprecatedDependencies","hasVersion","bitmapEntry","getBitmapEntryIfExist","isDeprecated","isUndeprecated","modelComp","getBitObjectModelComponent","legacyScope","objects","provider","graphql","componentAspect","cli","deprecation","registerAddComponentsIssues","bind","register","DeprecateCmd","UndeprecateCmd","registerShowFragments","DeprecationFragment","deprecationSchema","exports","MainRuntime","GraphqlAspect","ScopeAspect","ComponentAspect","WorkspaceAspect","CLIAspect","DependencyResolverAspect","IssuesAspect","addRuntime"],"sources":["deprecation.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport semver from 'semver';\nimport { ComponentMain, ComponentAspect, Component, ComponentID } from '@teambit/component';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { ComponentIdObj } from '@teambit/component-id';\nimport { DeprecationAspect } from './deprecation.aspect';\nimport { deprecationSchema } from './deprecation.graphql';\nimport { DeprecationFragment } from './deprecation.fragment';\nimport { DeprecateCmd } from './deprecate-cmd';\nimport { UndeprecateCmd } from './undeprecate-cmd';\nimport { IssuesAspect, IssuesMain } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { compact } from 'lodash';\nimport { IssuesClasses } from '@teambit/component-issues';\n\nexport type DeprecationInfo = {\n isDeprecate: boolean;\n newId?: string;\n range?: string;\n};\n\nexport type DeprecationMetadata = {\n /**\n * whether the head is deprecated\n */\n deprecate?: boolean;\n /**\n * the new id to use instead of the current one\n */\n newId?: ComponentIdObj;\n /**\n * Semver range to deprecate previous versions\n */\n range?: string;\n};\n\nexport class DeprecationMain {\n constructor(\n private scope: ScopeMain,\n private workspace: Workspace,\n private depsResolver: DependencyResolverMain\n ) {}\n\n async getDeprecationInfo(component: Component): Promise<DeprecationInfo> {\n const headComponent = await this.getHeadComponent(component);\n\n const data = headComponent.config.extensions.findExtension(DeprecationAspect.id)?.config as\n | DeprecationMetadata\n | undefined;\n const deprecatedBackwardCompatibility = component.state._consumer.deprecated;\n const isDeprecate = Boolean(data?.deprecate || deprecatedBackwardCompatibility);\n const currentTag = component.getTag();\n const isDeprecateByRange = Boolean(data?.range && currentTag && semver.satisfies(currentTag.version, data.range));\n const newId = data?.newId ? ComponentID.fromObject(data?.newId).toString() : undefined;\n return {\n isDeprecate: isDeprecate || isDeprecateByRange,\n newId,\n range: data?.range,\n };\n }\n\n private async getHeadComponent(component: Component): Promise<Component> {\n if (\n component.id.version &&\n component.head &&\n component.id.version !== component.head?.hash &&\n component.id.version !== component.headTag?.version.version\n ) {\n const headComp = this.workspace // if workspace exits, prefer using the workspace as it may be modified\n ? await this.workspace.get(component.id.changeVersion(undefined))\n : await this.scope.get(component.id.changeVersion(component.head.hash));\n if (!headComp) throw new Error(`unable to get the head of ${component.id.toString()}`);\n return headComp;\n }\n return component;\n }\n\n /**\n * mark a component as deprecated. after this change, the component will be modified.\n * tag and export the component to have it deprecated on the remote.\n *\n * @param componentId\n * @param newId\n * @returns boolean whether or not the component has been deprecated\n */\n async deprecate(componentId: ComponentID, newId?: ComponentID, range?: string): Promise<boolean> {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: !range,\n newId: newId?.toObject(),\n range,\n });\n await this.workspace.bitMap.write(`deprecate ${componentId.toString()}`);\n\n return results;\n }\n\n async deprecateByCLIValues(id: string, newId?: string, range?: string): Promise<boolean> {\n const componentId = await this.workspace.resolveComponentId(id);\n const newComponentId = newId ? await this.workspace.resolveComponentId(newId) : undefined;\n return this.deprecate(componentId, newComponentId, range);\n }\n\n async unDeprecateByCLIValues(id: string): Promise<boolean> {\n const componentId = await this.workspace.resolveComponentId(id);\n return this.unDeprecate(componentId);\n }\n\n async unDeprecate(componentId: ComponentID) {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: false,\n newId: '',\n });\n await this.workspace.bitMap.write(`undeprecate ${componentId.toString()}`);\n\n return results;\n }\n\n async addDeprecatedDependenciesIssues(components: Component[]) {\n await pMapSeries(components, async (component) => {\n await this.addDeprecatedDepIssue(component);\n });\n }\n\n private async addDeprecatedDepIssue(component: Component) {\n const dependencies = this.depsResolver.getComponentDependencies(component);\n const removedWithUndefined = await Promise.all(\n dependencies.map(async (dep) => {\n const isRemoved = await this.isDeprecatedByIdWithoutLoadingComponent(dep.componentId);\n if (isRemoved) return dep.componentId;\n return undefined;\n })\n );\n const removed = compact(removedWithUndefined).map((id) => id.toString());\n if (removed.length) {\n component.state.issues.getOrCreate(IssuesClasses.DeprecatedDependencies).data = removed;\n }\n }\n\n /**\n * performant version of isDeprecated() in case the component object is not available and loading it is expensive.\n */\n private async isDeprecatedByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean> {\n if (!componentId.hasVersion()) return false;\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId);\n if (bitmapEntry && bitmapEntry.isDeprecated()) return true;\n if (bitmapEntry && bitmapEntry.isUndeprecated()) return false;\n const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId);\n if (!modelComp) return false;\n const isDeprecated = await modelComp.isDeprecated(\n this.workspace.scope.legacyScope.objects,\n componentId.version as string\n );\n return Boolean(isDeprecated);\n }\n\n static runtime = MainRuntime;\n static dependencies = [\n GraphqlAspect,\n ScopeAspect,\n ComponentAspect,\n WorkspaceAspect,\n CLIAspect,\n DependencyResolverAspect,\n IssuesAspect,\n ];\n static async provider([graphql, scope, componentAspect, workspace, cli, depsResolver, issues]: [\n GraphqlMain,\n ScopeMain,\n ComponentMain,\n Workspace,\n CLIMain,\n DependencyResolverMain,\n IssuesMain,\n ]) {\n const deprecation = new DeprecationMain(scope, workspace, depsResolver);\n issues.registerAddComponentsIssues(deprecation.addDeprecatedDependenciesIssues.bind(deprecation));\n cli.register(new DeprecateCmd(deprecation), new UndeprecateCmd(deprecation));\n componentAspect.registerShowFragments([new DeprecationFragment(deprecation)]);\n graphql.register(() => deprecationSchema(deprecation));\n\n return deprecation;\n }\n}\n\nDeprecationAspect.addRuntime(DeprecationMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAA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E,SAAS,CAACD,KAAK,CAAC4E,WAAW,CAACC,OAAO,EACxCvC,WAAW,CAACb,OACd,CAAC;IACD,OAAOR,OAAO,CAACuD,YAAY,CAAC;EAC9B;EAYA,aAAaM,QAAQA,CAAC,CAACC,OAAO,EAAE/E,KAAK,EAAEgF,eAAe,EAAE/E,SAAS,EAAEgF,GAAG,EAAE/E,YAAY,EAAE+D,MAAM,CAQ3F,EAAE;IACD,MAAMiB,WAAW,GAAG,IAAIpF,eAAe,CAACE,KAAK,EAAEC,SAAS,EAAEC,YAAY,CAAC;IACvE+D,MAAM,CAACkB,2BAA2B,CAACD,WAAW,CAACjC,+BAA+B,CAACmC,IAAI,CAACF,WAAW,CAAC,CAAC;IACjGD,GAAG,CAACI,QAAQ,CAAC,KAAIC,4BAAY,EAACJ,WAAW,CAAC,EAAE,KAAIK,gCAAc,EAACL,WAAW,CAAC,CAAC;IAC5EF,eAAe,CAACQ,qBAAqB,CAAC,CAAC,KAAIC,mCAAmB,EAACP,WAAW,CAAC,CAAC,CAAC;IAC7EH,OAAO,CAACM,QAAQ,CAAC,MAAM,IAAAK,iCAAiB,EAACR,WAAW,CAAC,CAAC;IAEtD,OAAOA,WAAW;EACpB;AACF;AAACS,OAAA,CAAA7F,eAAA,GAAAA,eAAA;AAAAlB,eAAA,CAlJYkB,eAAe,aAuHT8F,kBAAW;AAAAhH,eAAA,CAvHjBkB,eAAe,kBAwHJ,CACpB+F,wBAAa,EACbC,oBAAW,EACXC,4BAAe,EACfC,4BAAe,EACfC,gBAAS,EACTC,8CAAwB,EACxBC,sBAAY,CACb;AAoBHzF,gCAAiB,CAAC0F,UAAU,CAACtG,eAAe,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.556/dist/deprecation.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.556/dist/deprecation.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.558/dist/deprecation.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.558/dist/deprecation.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,36 +1,36 @@
1
1
  {
2
2
  "name": "@teambit/deprecation",
3
- "version": "1.0.556",
3
+ "version": "1.0.558",
4
4
  "homepage": "https://bit.cloud/teambit/component/deprecation",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "deprecation",
9
- "version": "1.0.556"
9
+ "version": "1.0.558"
10
10
  },
11
11
  "dependencies": {
12
- "chalk": "2.4.2",
12
+ "chalk": "4.1.2",
13
13
  "graphql-tag": "2.12.1",
14
14
  "lodash": "4.17.21",
15
15
  "p-map-series": "2.1.0",
16
- "semver": "7.5.4",
16
+ "semver": "7.7.1",
17
17
  "@teambit/harmony": "0.4.6",
18
18
  "@teambit/component-id": "1.2.2",
19
19
  "@teambit/component.ui.component-deprecated": "0.0.40",
20
- "@teambit/cli": "0.0.1133",
21
- "@teambit/component": "1.0.556",
22
- "@teambit/graphql": "1.0.556",
23
- "@teambit/component-issues": "0.0.155",
24
- "@teambit/dependency-resolver": "1.0.556",
25
- "@teambit/issues": "1.0.556",
26
- "@teambit/scope": "1.0.556",
27
- "@teambit/workspace": "1.0.556",
28
- "@teambit/docs": "1.0.556",
29
- "@teambit/ui": "1.0.556"
20
+ "@teambit/cli": "0.0.1135",
21
+ "@teambit/component": "1.0.558",
22
+ "@teambit/graphql": "1.0.558",
23
+ "@teambit/component-issues": "0.0.156",
24
+ "@teambit/dependency-resolver": "1.0.558",
25
+ "@teambit/issues": "1.0.558",
26
+ "@teambit/scope": "1.0.558",
27
+ "@teambit/workspace": "1.0.558",
28
+ "@teambit/docs": "1.0.558",
29
+ "@teambit/ui": "1.0.558"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/lodash": "4.14.165",
33
- "@types/semver": "7.3.4",
33
+ "@types/semver": "7.5.8",
34
34
  "@types/mocha": "9.1.0",
35
35
  "@teambit/harmony.envs.core-aspect-env": "0.0.69"
36
36
  },