@teambit/deprecation 1.0.1194 → 1.0.1196
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.
|
@@ -10,7 +10,7 @@ export declare class DeprecationFragment implements ShowFragment {
|
|
|
10
10
|
}>;
|
|
11
11
|
json(component: Component): Promise<{
|
|
12
12
|
title: string;
|
|
13
|
-
json: import("
|
|
13
|
+
json: import("@teambit/component").DeprecationInfo;
|
|
14
14
|
}>;
|
|
15
15
|
weight: number;
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CLIMain } from '@teambit/cli';
|
|
2
|
-
import type { ComponentMain, Component } from '@teambit/component';
|
|
2
|
+
import type { ComponentMain, Component, DeprecationInfo } from '@teambit/component';
|
|
3
3
|
import { ComponentID } from '@teambit/component';
|
|
4
4
|
import type { ScopeMain } from '@teambit/scope';
|
|
5
5
|
import type { Workspace } from '@teambit/workspace';
|
|
@@ -7,11 +7,7 @@ import type { GraphqlMain } from '@teambit/graphql';
|
|
|
7
7
|
import type { ComponentIdObj } from '@teambit/component-id';
|
|
8
8
|
import type { IssuesMain } from '@teambit/issues';
|
|
9
9
|
import type { DependencyResolverMain } from '@teambit/dependency-resolver';
|
|
10
|
-
export type DeprecationInfo
|
|
11
|
-
isDeprecate: boolean;
|
|
12
|
-
newId?: string;
|
|
13
|
-
range?: string;
|
|
14
|
-
};
|
|
10
|
+
export type { DeprecationInfo };
|
|
15
11
|
export type DeprecateByPatternResult = {
|
|
16
12
|
/**
|
|
17
13
|
* components that were deprecated as a result of this operation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_harmonyModules","data","require","_cli","_semver","_interopRequireDefault","_bitError","_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","setDeprecateConfig","bitMap","write","deprecateByCLIValues","resolveComponentId","newComponentId","deprecateByPattern","pattern","componentIds","idsByPattern","length","BitError","alreadyDeprecated","pMapSeries","isDeprecated","push","unDeprecateByCLIValues","unDeprecate","setUnDeprecateConfig","unDeprecateByPattern","undeprecated","notDeprecated","hasDeprecationToClear","bitmapEntry","getBitmapEntryIfExist","ignoreVersion","isUndeprecated","isDeprecatedByIdWithoutLoadingComponent","isDeprecatedByRange","validRange","addComponentConfig","toObject","addDeprecatedDependenciesIssues","components","addDeprecatedDepIssue","isSelfDeprecated","isComponentDeprecated","dependencies","getComponentDependencies","removedWithUndefined","Promise","all","map","dep","isRemoved","removed","compact","issues","getOrCreate","IssuesClasses","DeprecatedDependencies","hasVersion","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 { MainRuntime } from '@teambit/harmony.modules.runtimes';\nimport { CLIAspect } from '@teambit/cli';\nimport semver from 'semver';\nimport { BitError } from '@teambit/bit-error';\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 DeprecateByPatternResult = {\n /**\n * components that were deprecated as a result of this operation.\n */\n deprecated: ComponentID[];\n /**\n * components that matched the pattern but were already deprecated (no changes made).\n */\n alreadyDeprecated: ComponentID[];\n};\n\nexport type UnDeprecateByPatternResult = {\n /**\n * components whose deprecation status was removed as a result of this operation.\n */\n undeprecated: ComponentID[];\n /**\n * components that matched the pattern but were not deprecated (no changes made).\n */\n notDeprecated: ComponentID[];\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.setDeprecateConfig(componentId, newId, range);\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 /**\n * deprecate all components matching the given pattern. the pattern can match multiple components.\n * see `COMPONENT_PATTERN_HELP` for the supported pattern syntax.\n */\n async deprecateByPattern(pattern: string, newId?: string, range?: string): Promise<DeprecateByPatternResult> {\n const componentIds = await this.workspace.idsByPattern(pattern);\n // reject the invalid multi-match + --new-id combination before resolving newId, so we don't\n // trigger registry/package-name resolution (which can fail) for a command that's already invalid.\n if (newId && componentIds.length > 1) {\n throw new BitError(\n `--new-id sets a single replacement component, but the pattern \"${pattern}\" matched ${componentIds.length} components.\nrun the command per-component to use --new-id, or remove it to deprecate them all`\n );\n }\n const newComponentId = newId ? await this.workspace.resolveComponentId(newId) : undefined;\n const deprecated: ComponentID[] = [];\n const alreadyDeprecated: ComponentID[] = [];\n await pMapSeries(componentIds, async (componentId) => {\n // when the component is already deprecated and there's no replacement/range to (re)set, there's\n // nothing to change. bucketing by the actual deprecated-state (bitmap + model) rather than by the\n // bitmap config-diff avoids re-writing redundant config (e.g. for \"$deprecated\" matches) and\n // reporting already-deprecated components as newly deprecated.\n if (!newComponentId && !range && (await this.isDeprecated(componentId))) {\n alreadyDeprecated.push(componentId);\n return;\n }\n this.setDeprecateConfig(componentId, newComponentId, range);\n deprecated.push(componentId);\n });\n if (deprecated.length) {\n await this.workspace.bitMap.write(`deprecate ${pattern}`);\n }\n\n return { deprecated, alreadyDeprecated };\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.setUnDeprecateConfig(componentId);\n await this.workspace.bitMap.write(`undeprecate ${componentId.toString()}`);\n\n return results;\n }\n\n /**\n * remove the deprecation status from all components matching the given pattern.\n * the pattern can match multiple components. see `COMPONENT_PATTERN_HELP` for the supported pattern syntax.\n */\n async unDeprecateByPattern(pattern: string): Promise<UnDeprecateByPatternResult> {\n const componentIds = await this.workspace.idsByPattern(pattern);\n const undeprecated: ComponentID[] = [];\n const notDeprecated: ComponentID[] = [];\n await pMapSeries(componentIds, async (componentId) => {\n // only undeprecate components that actually have a deprecation to clear (incl. range-deprecations,\n // which are stored with deprecate:false). bucketing by the real state rather than the bitmap\n // config-diff avoids writing a redundant \"deprecate: false\" config (and marking the component as\n // modified) for components that were never deprecated.\n if (!(await this.hasDeprecationToClear(componentId))) {\n notDeprecated.push(componentId);\n return;\n }\n this.setUnDeprecateConfig(componentId);\n undeprecated.push(componentId);\n });\n if (undeprecated.length) {\n await this.workspace.bitMap.write(`undeprecate ${pattern}`);\n }\n\n return { undeprecated, notDeprecated };\n }\n\n /**\n * whether the component is currently deprecated, considering both the pending local .bitmap config\n * (authoritative when present) and the persisted model/scope state.\n */\n private async isDeprecated(componentId: ComponentID): Promise<boolean> {\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId, { ignoreVersion: true });\n if (bitmapEntry?.isDeprecated()) return true;\n if (bitmapEntry?.isUndeprecated()) return false;\n return this.isDeprecatedByIdWithoutLoadingComponent(componentId);\n }\n\n /**\n * whether the component has any deprecation that an undeprecate should clear. unlike isDeprecated(),\n * this also treats a range-deprecation as clearable (whether it lives in the local .bitmap or is\n * already baked into the model), so \"bit undeprecate\" can revert a prior \"bit deprecate --range\" even\n * when the head version is outside the range and thus not \"currently\" deprecated.\n */\n private async hasDeprecationToClear(componentId: ComponentID): Promise<boolean> {\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId, { ignoreVersion: true });\n if (bitmapEntry?.isDeprecated() || bitmapEntry?.isDeprecatedByRange()) return true;\n if (bitmapEntry?.isUndeprecated()) return false;\n // no decisive local config — consult the model. use getDeprecationInfo (which reports the configured\n // range regardless of the head version) rather than the version-specific isDeprecated() check.\n const component = await this.workspace.get(componentId);\n const { isDeprecate, range } = await this.getDeprecationInfo(component);\n return isDeprecate || Boolean(range);\n }\n\n private setDeprecateConfig(componentId: ComponentID, newId?: ComponentID, range?: string): boolean {\n if (range && !semver.validRange(range)) {\n throw new BitError(\n `the range \"${range}\" is invalid. see https://www.npmjs.com/package/semver#ranges for the range syntax`\n );\n }\n return this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: !range,\n newId: newId?.toObject(),\n range,\n });\n }\n\n private setUnDeprecateConfig(componentId: ComponentID): boolean {\n return this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: false,\n newId: '',\n });\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,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,OAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,MAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,WAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,UAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAS,SAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAA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BAA+B,CAAC8B,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,CAAA/G,eAAA,GAAAA,eAAA;AAAAlB,eAAA,CApQYkB,eAAe,aAyOTgH,6BAAW;AAAAlI,eAAA,CAzOjBkB,eAAe,kBA0OJ,CACpBiH,wBAAa,EACbC,oBAAW,EACXC,4BAAe,EACfC,4BAAe,EACfC,gBAAS,EACTC,8CAAwB,EACxBC,sBAAY,CACb;AAoBH3G,gCAAiB,CAAC4G,UAAU,CAACxH,eAAe,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_harmonyModules","data","require","_cli","_semver","_interopRequireDefault","_bitError","_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","setDeprecateConfig","bitMap","write","deprecateByCLIValues","resolveComponentId","newComponentId","deprecateByPattern","pattern","componentIds","idsByPattern","length","BitError","alreadyDeprecated","pMapSeries","isDeprecated","push","unDeprecateByCLIValues","unDeprecate","setUnDeprecateConfig","unDeprecateByPattern","undeprecated","notDeprecated","hasDeprecationToClear","bitmapEntry","getBitmapEntryIfExist","ignoreVersion","isUndeprecated","isDeprecatedByIdWithoutLoadingComponent","isDeprecatedByRange","validRange","addComponentConfig","toObject","addDeprecatedDependenciesIssues","components","addDeprecatedDepIssue","isSelfDeprecated","isComponentDeprecated","dependencies","getComponentDependencies","removedWithUndefined","Promise","all","map","dep","isRemoved","removed","compact","issues","getOrCreate","IssuesClasses","DeprecatedDependencies","hasVersion","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 { MainRuntime } from '@teambit/harmony.modules.runtimes';\nimport { CLIAspect } from '@teambit/cli';\nimport semver from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport type { ComponentMain, Component, DeprecationInfo } 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\nexport type DeprecateByPatternResult = {\n /**\n * components that were deprecated as a result of this operation.\n */\n deprecated: ComponentID[];\n /**\n * components that matched the pattern but were already deprecated (no changes made).\n */\n alreadyDeprecated: ComponentID[];\n};\n\nexport type UnDeprecateByPatternResult = {\n /**\n * components whose deprecation status was removed as a result of this operation.\n */\n undeprecated: ComponentID[];\n /**\n * components that matched the pattern but were not deprecated (no changes made).\n */\n notDeprecated: ComponentID[];\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.setDeprecateConfig(componentId, newId, range);\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 /**\n * deprecate all components matching the given pattern. the pattern can match multiple components.\n * see `COMPONENT_PATTERN_HELP` for the supported pattern syntax.\n */\n async deprecateByPattern(pattern: string, newId?: string, range?: string): Promise<DeprecateByPatternResult> {\n const componentIds = await this.workspace.idsByPattern(pattern);\n // reject the invalid multi-match + --new-id combination before resolving newId, so we don't\n // trigger registry/package-name resolution (which can fail) for a command that's already invalid.\n if (newId && componentIds.length > 1) {\n throw new BitError(\n `--new-id sets a single replacement component, but the pattern \"${pattern}\" matched ${componentIds.length} components.\nrun the command per-component to use --new-id, or remove it to deprecate them all`\n );\n }\n const newComponentId = newId ? await this.workspace.resolveComponentId(newId) : undefined;\n const deprecated: ComponentID[] = [];\n const alreadyDeprecated: ComponentID[] = [];\n await pMapSeries(componentIds, async (componentId) => {\n // when the component is already deprecated and there's no replacement/range to (re)set, there's\n // nothing to change. bucketing by the actual deprecated-state (bitmap + model) rather than by the\n // bitmap config-diff avoids re-writing redundant config (e.g. for \"$deprecated\" matches) and\n // reporting already-deprecated components as newly deprecated.\n if (!newComponentId && !range && (await this.isDeprecated(componentId))) {\n alreadyDeprecated.push(componentId);\n return;\n }\n this.setDeprecateConfig(componentId, newComponentId, range);\n deprecated.push(componentId);\n });\n if (deprecated.length) {\n await this.workspace.bitMap.write(`deprecate ${pattern}`);\n }\n\n return { deprecated, alreadyDeprecated };\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.setUnDeprecateConfig(componentId);\n await this.workspace.bitMap.write(`undeprecate ${componentId.toString()}`);\n\n return results;\n }\n\n /**\n * remove the deprecation status from all components matching the given pattern.\n * the pattern can match multiple components. see `COMPONENT_PATTERN_HELP` for the supported pattern syntax.\n */\n async unDeprecateByPattern(pattern: string): Promise<UnDeprecateByPatternResult> {\n const componentIds = await this.workspace.idsByPattern(pattern);\n const undeprecated: ComponentID[] = [];\n const notDeprecated: ComponentID[] = [];\n await pMapSeries(componentIds, async (componentId) => {\n // only undeprecate components that actually have a deprecation to clear (incl. range-deprecations,\n // which are stored with deprecate:false). bucketing by the real state rather than the bitmap\n // config-diff avoids writing a redundant \"deprecate: false\" config (and marking the component as\n // modified) for components that were never deprecated.\n if (!(await this.hasDeprecationToClear(componentId))) {\n notDeprecated.push(componentId);\n return;\n }\n this.setUnDeprecateConfig(componentId);\n undeprecated.push(componentId);\n });\n if (undeprecated.length) {\n await this.workspace.bitMap.write(`undeprecate ${pattern}`);\n }\n\n return { undeprecated, notDeprecated };\n }\n\n /**\n * whether the component is currently deprecated, considering both the pending local .bitmap config\n * (authoritative when present) and the persisted model/scope state.\n */\n private async isDeprecated(componentId: ComponentID): Promise<boolean> {\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId, { ignoreVersion: true });\n if (bitmapEntry?.isDeprecated()) return true;\n if (bitmapEntry?.isUndeprecated()) return false;\n return this.isDeprecatedByIdWithoutLoadingComponent(componentId);\n }\n\n /**\n * whether the component has any deprecation that an undeprecate should clear. unlike isDeprecated(),\n * this also treats a range-deprecation as clearable (whether it lives in the local .bitmap or is\n * already baked into the model), so \"bit undeprecate\" can revert a prior \"bit deprecate --range\" even\n * when the head version is outside the range and thus not \"currently\" deprecated.\n */\n private async hasDeprecationToClear(componentId: ComponentID): Promise<boolean> {\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId, { ignoreVersion: true });\n if (bitmapEntry?.isDeprecated() || bitmapEntry?.isDeprecatedByRange()) return true;\n if (bitmapEntry?.isUndeprecated()) return false;\n // no decisive local config — consult the model. use getDeprecationInfo (which reports the configured\n // range regardless of the head version) rather than the version-specific isDeprecated() check.\n const component = await this.workspace.get(componentId);\n const { isDeprecate, range } = await this.getDeprecationInfo(component);\n return isDeprecate || Boolean(range);\n }\n\n private setDeprecateConfig(componentId: ComponentID, newId?: ComponentID, range?: string): boolean {\n if (range && !semver.validRange(range)) {\n throw new BitError(\n `the range \"${range}\" is invalid. see https://www.npmjs.com/package/semver#ranges for the range syntax`\n );\n }\n return this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: !range,\n newId: newId?.toObject(),\n range,\n });\n }\n\n private setUnDeprecateConfig(componentId: ComponentID): boolean {\n return this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: false,\n newId: '',\n });\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,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;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A,eAAA;AAAAlB,eAAA,CApQYkB,eAAe,aAyOTgH,6BAAW;AAAAlI,eAAA,CAzOjBkB,eAAe,kBA0OJ,CACpBiH,wBAAa,EACbC,oBAAW,EACXC,4BAAe,EACfC,4BAAe,EACfC,gBAAS,EACTC,8CAAwB,EACxBC,sBAAY,CACb;AAoBH3G,gCAAiB,CAAC4G,UAAU,CAACxH,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.1196/dist/deprecation.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.1196/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.1196",
|
|
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.1196"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"graphql-tag": "2.12.1",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"@teambit/component-issues": "0.0.188",
|
|
22
22
|
"@teambit/harmony.modules.runtimes": "0.0.1",
|
|
23
23
|
"@teambit/component.ui.component-deprecated": "0.0.41",
|
|
24
|
-
"@teambit/component": "1.0.
|
|
25
|
-
"@teambit/graphql": "1.0.
|
|
26
|
-
"@teambit/dependency-resolver": "1.0.
|
|
27
|
-
"@teambit/issues": "1.0.
|
|
28
|
-
"@teambit/scope": "1.0.
|
|
29
|
-
"@teambit/workspace": "1.0.
|
|
30
|
-
"@teambit/docs": "1.0.
|
|
24
|
+
"@teambit/component": "1.0.1196",
|
|
25
|
+
"@teambit/graphql": "1.0.1196",
|
|
26
|
+
"@teambit/dependency-resolver": "1.0.1196",
|
|
27
|
+
"@teambit/issues": "1.0.1196",
|
|
28
|
+
"@teambit/scope": "1.0.1196",
|
|
29
|
+
"@teambit/workspace": "1.0.1196",
|
|
30
|
+
"@teambit/docs": "1.0.1196"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/lodash": "4.14.165",
|