@teambit/deprecation 1.0.932 → 1.0.934
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.
|
@@ -47,6 +47,7 @@ export declare class DeprecationMain {
|
|
|
47
47
|
unDeprecate(componentId: ComponentID): Promise<boolean>;
|
|
48
48
|
addDeprecatedDependenciesIssues(components: Component[]): Promise<void>;
|
|
49
49
|
private addDeprecatedDepIssue;
|
|
50
|
+
private isComponentDeprecated;
|
|
50
51
|
/**
|
|
51
52
|
* performant version of isDeprecated() in case the component object is not available and loading it is expensive.
|
|
52
53
|
*/
|
|
@@ -190,6 +190,8 @@ class DeprecationMain {
|
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
async addDeprecatedDepIssue(component) {
|
|
193
|
+
const isSelfDeprecated = await this.isComponentDeprecated(component);
|
|
194
|
+
if (isSelfDeprecated) return;
|
|
193
195
|
const dependencies = this.depsResolver.getComponentDependencies(component);
|
|
194
196
|
const removedWithUndefined = await Promise.all(dependencies.map(async dep => {
|
|
195
197
|
const isRemoved = await this.isDeprecatedByIdWithoutLoadingComponent(dep.componentId);
|
|
@@ -201,6 +203,13 @@ class DeprecationMain {
|
|
|
201
203
|
component.state.issues.getOrCreate(_componentIssues().IssuesClasses.DeprecatedDependencies).data = removed;
|
|
202
204
|
}
|
|
203
205
|
}
|
|
206
|
+
async isComponentDeprecated(component) {
|
|
207
|
+
if (!component.id.hasVersion()) {
|
|
208
|
+
const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(component.id);
|
|
209
|
+
return Boolean(bitmapEntry && bitmapEntry.isDeprecated());
|
|
210
|
+
}
|
|
211
|
+
return this.isDeprecatedByIdWithoutLoadingComponent(component.id);
|
|
212
|
+
}
|
|
204
213
|
|
|
205
214
|
/**
|
|
206
215
|
* performant version of isDeprecated() in case the component object is not available and loading it is expensive.
|
|
@@ -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 type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport semver from 'semver';\nimport type { ComponentMain, Component } from '@teambit/component';\nimport { ComponentAspect, ComponentID } from '@teambit/component';\nimport type { ScopeMain } from '@teambit/scope';\nimport { ScopeAspect } from '@teambit/scope';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect } from '@teambit/workspace';\nimport type { GraphqlMain } from '@teambit/graphql';\nimport { GraphqlAspect } from '@teambit/graphql';\nimport type { 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 type { IssuesMain } from '@teambit/issues';\nimport { IssuesAspect } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport type { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { DependencyResolverAspect } 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":";;;;;;AACA,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;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAA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4E,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
|
+
{"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","isSelfDeprecated","isComponentDeprecated","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 type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport semver from 'semver';\nimport type { ComponentMain, Component } from '@teambit/component';\nimport { ComponentAspect, ComponentID } from '@teambit/component';\nimport type { ScopeMain } from '@teambit/scope';\nimport { ScopeAspect } from '@teambit/scope';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect } from '@teambit/workspace';\nimport type { GraphqlMain } from '@teambit/graphql';\nimport { GraphqlAspect } from '@teambit/graphql';\nimport type { 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 type { IssuesMain } from '@teambit/issues';\nimport { IssuesAspect } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport type { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { DependencyResolverAspect } 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 isSelfDeprecated = await this.isComponentDeprecated(component);\n if (isSelfDeprecated) return;\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 private async isComponentDeprecated(component: Component): Promise<boolean> {\n if (!component.id.hasVersion()) {\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(component.id);\n return Boolean(bitmapEntry && bitmapEntry.isDeprecated());\n }\n return this.isDeprecatedByIdWithoutLoadingComponent(component.id);\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":";;;;;;AACA,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,CAAA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CAAiB,EAACR,WAAW,CAAC,CAAC;IAEtD,OAAOA,WAAW;EACpB;AACF;AAACS,OAAA,CAAA/F,eAAA,GAAAA,eAAA;AAAAlB,eAAA,CA5JYkB,eAAe,aAiITgG,kBAAW;AAAAlH,eAAA,CAjIjBkB,eAAe,kBAkIJ,CACpBiG,wBAAa,EACbC,oBAAW,EACXC,4BAAe,EACfC,4BAAe,EACfC,gBAAS,EACTC,8CAAwB,EACxBC,sBAAY,CACb;AAoBH3F,gCAAiB,CAAC4F,UAAU,CAACxG,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.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.934/dist/deprecation.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.934/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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/deprecation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.934",
|
|
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.
|
|
9
|
+
"version": "1.0.934"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"@teambit/component-id": "1.2.4",
|
|
20
20
|
"@teambit/component-issues": "0.0.171",
|
|
21
21
|
"@teambit/component.ui.component-deprecated": "0.0.41",
|
|
22
|
-
"@teambit/component": "1.0.
|
|
23
|
-
"@teambit/graphql": "1.0.
|
|
24
|
-
"@teambit/dependency-resolver": "1.0.
|
|
25
|
-
"@teambit/issues": "1.0.
|
|
26
|
-
"@teambit/scope": "1.0.
|
|
27
|
-
"@teambit/workspace": "1.0.
|
|
28
|
-
"@teambit/docs": "1.0.
|
|
29
|
-
"@teambit/ui": "1.0.
|
|
22
|
+
"@teambit/component": "1.0.934",
|
|
23
|
+
"@teambit/graphql": "1.0.934",
|
|
24
|
+
"@teambit/dependency-resolver": "1.0.934",
|
|
25
|
+
"@teambit/issues": "1.0.934",
|
|
26
|
+
"@teambit/scope": "1.0.934",
|
|
27
|
+
"@teambit/workspace": "1.0.934",
|
|
28
|
+
"@teambit/docs": "1.0.934",
|
|
29
|
+
"@teambit/ui": "1.0.934"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/lodash": "4.14.165",
|