@teambit/deprecation 1.0.268 → 1.0.270

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.
@@ -4,6 +4,8 @@ import { ScopeMain } from '@teambit/scope';
4
4
  import { Workspace } from '@teambit/workspace';
5
5
  import { GraphqlMain } from '@teambit/graphql';
6
6
  import { ComponentIdObj } from '@teambit/component-id';
7
+ import { IssuesMain } from '@teambit/issues';
8
+ import { DependencyResolverMain } from '@teambit/dependency-resolver';
7
9
  export type DeprecationInfo = {
8
10
  isDeprecate: boolean;
9
11
  newId?: string;
@@ -26,9 +28,8 @@ export type DeprecationMetadata = {
26
28
  export declare class DeprecationMain {
27
29
  private scope;
28
30
  private workspace;
29
- constructor(scope: ScopeMain, workspace: Workspace);
30
- static runtime: import("@teambit/harmony").RuntimeDefinition;
31
- static dependencies: import("@teambit/harmony").Aspect[];
31
+ private depsResolver;
32
+ constructor(scope: ScopeMain, workspace: Workspace, depsResolver: DependencyResolverMain);
32
33
  getDeprecationInfo(component: Component): Promise<DeprecationInfo>;
33
34
  private getHeadComponent;
34
35
  /**
@@ -41,11 +42,21 @@ export declare class DeprecationMain {
41
42
  */
42
43
  deprecate(componentId: ComponentID, newId?: ComponentID, range?: string): Promise<boolean>;
43
44
  unDeprecate(componentId: ComponentID): Promise<boolean>;
44
- static provider([graphql, scope, componentAspect, workspace, cli]: [
45
+ addDeprecatedDependenciesIssues(components: Component[]): Promise<void>;
46
+ private addDeprecatedDepIssue;
47
+ /**
48
+ * performant version of isDeprecated() in case the component object is not available and loading it is expensive.
49
+ */
50
+ private isDeprecatedByIdWithoutLoadingComponent;
51
+ static runtime: import("@teambit/harmony").RuntimeDefinition;
52
+ static dependencies: import("@teambit/harmony").Aspect[];
53
+ static provider([graphql, scope, componentAspect, workspace, cli, depsResolver, issues]: [
45
54
  GraphqlMain,
46
55
  ScopeMain,
47
56
  ComponentMain,
48
57
  Workspace,
49
- CLIMain
58
+ CLIMain,
59
+ DependencyResolverMain,
60
+ IssuesMain
50
61
  ]): Promise<DeprecationMain>;
51
62
  }
@@ -81,14 +81,50 @@ function _undeprecateCmd() {
81
81
  };
82
82
  return data;
83
83
  }
84
+ function _issues() {
85
+ const data = _interopRequireDefault(require("@teambit/issues"));
86
+ _issues = function () {
87
+ return data;
88
+ };
89
+ return data;
90
+ }
91
+ function _pMapSeries() {
92
+ const data = _interopRequireDefault(require("p-map-series"));
93
+ _pMapSeries = function () {
94
+ return data;
95
+ };
96
+ return data;
97
+ }
98
+ function _dependencyResolver() {
99
+ const data = _interopRequireDefault(require("@teambit/dependency-resolver"));
100
+ _dependencyResolver = function () {
101
+ return data;
102
+ };
103
+ return data;
104
+ }
105
+ function _lodash() {
106
+ const data = require("lodash");
107
+ _lodash = function () {
108
+ return data;
109
+ };
110
+ return data;
111
+ }
112
+ function _componentIssues() {
113
+ const data = require("@teambit/component-issues");
114
+ _componentIssues = function () {
115
+ return data;
116
+ };
117
+ return data;
118
+ }
84
119
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
85
120
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
86
121
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
87
122
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
88
123
  class DeprecationMain {
89
- constructor(scope, workspace) {
124
+ constructor(scope, workspace, depsResolver) {
90
125
  this.scope = scope;
91
126
  this.workspace = workspace;
127
+ this.depsResolver = depsResolver;
92
128
  }
93
129
  async getDeprecationInfo(component) {
94
130
  const headComponent = await this.getHeadComponent(component);
@@ -139,8 +175,37 @@ class DeprecationMain {
139
175
  await this.workspace.bitMap.write(`undeprecate ${componentId.toString()}`);
140
176
  return results;
141
177
  }
142
- static async provider([graphql, scope, componentAspect, workspace, cli]) {
143
- const deprecation = new DeprecationMain(scope, workspace);
178
+ async addDeprecatedDependenciesIssues(components) {
179
+ await (0, _pMapSeries().default)(components, async component => {
180
+ await this.addDeprecatedDepIssue(component);
181
+ });
182
+ }
183
+ async addDeprecatedDepIssue(component) {
184
+ const dependencies = this.depsResolver.getComponentDependencies(component);
185
+ const removedWithUndefined = await Promise.all(dependencies.map(async dep => {
186
+ const isRemoved = await this.isDeprecatedByIdWithoutLoadingComponent(dep.componentId);
187
+ if (isRemoved) return dep.componentId;
188
+ return undefined;
189
+ }));
190
+ const removed = (0, _lodash().compact)(removedWithUndefined).map(id => id.toString());
191
+ if (removed.length) {
192
+ component.state.issues.getOrCreate(_componentIssues().IssuesClasses.DeprecatedDependencies).data = removed;
193
+ }
194
+ }
195
+
196
+ /**
197
+ * performant version of isDeprecated() in case the component object is not available and loading it is expensive.
198
+ */
199
+ async isDeprecatedByIdWithoutLoadingComponent(componentId) {
200
+ if (!componentId.hasVersion()) return false;
201
+ const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId);
202
+ if (!modelComp) return false;
203
+ const isDeprecated = await modelComp.isDeprecated(this.workspace.scope.legacyScope.objects, componentId.version);
204
+ return Boolean(isDeprecated);
205
+ }
206
+ static async provider([graphql, scope, componentAspect, workspace, cli, depsResolver, issues]) {
207
+ const deprecation = new DeprecationMain(scope, workspace, depsResolver);
208
+ issues.registerAddComponentsIssues(deprecation.addDeprecatedDependenciesIssues.bind(deprecation));
144
209
  cli.register(new (_deprecateCmd().DeprecateCmd)(deprecation, workspace), new (_undeprecateCmd().UndeprecateCmd)(deprecation, workspace));
145
210
  componentAspect.registerShowFragments([new (_deprecation3().DeprecationFragment)(deprecation)]);
146
211
  graphql.register((0, _deprecation2().deprecationSchema)(deprecation));
@@ -149,7 +214,7 @@ class DeprecationMain {
149
214
  }
150
215
  exports.DeprecationMain = DeprecationMain;
151
216
  _defineProperty(DeprecationMain, "runtime", _cli().MainRuntime);
152
- _defineProperty(DeprecationMain, "dependencies", [_graphql().GraphqlAspect, _scope().ScopeAspect, _component().ComponentAspect, _workspace().WorkspaceAspect, _cli().CLIAspect]);
217
+ _defineProperty(DeprecationMain, "dependencies", [_graphql().GraphqlAspect, _scope().ScopeAspect, _component().ComponentAspect, _workspace().WorkspaceAspect, _cli().CLIAspect, _dependencyResolver().default, _issues().default]);
153
218
  _deprecation().DeprecationAspect.addRuntime(DeprecationMain);
154
219
 
155
220
  //# sourceMappingURL=deprecation.main.runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_semver","_interopRequireDefault","_component","_scope","_workspace","_graphql","_deprecation","_deprecation2","_deprecation3","_deprecateCmd","_undeprecateCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","DeprecationMain","constructor","scope","workspace","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","unDeprecate","provider","graphql","componentAspect","cli","deprecation","register","DeprecateCmd","UndeprecateCmd","registerShowFragments","DeprecationFragment","deprecationSchema","exports","MainRuntime","GraphqlAspect","ScopeAspect","ComponentAspect","WorkspaceAspect","CLIAspect","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';\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(private scope: ScopeMain, private workspace: Workspace) {}\n static runtime = MainRuntime;\n static dependencies = [GraphqlAspect, ScopeAspect, ComponentAspect, WorkspaceAspect, CLIAspect];\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 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 static async provider([graphql, scope, componentAspect, workspace, cli]: [\n GraphqlMain,\n ScopeMain,\n ComponentMain,\n Workspace,\n CLIMain\n ]) {\n const deprecation = new DeprecationMain(scope, workspace);\n cli.register(new DeprecateCmd(deprecation, workspace), new UndeprecateCmd(deprecation, workspace));\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;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,OA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C;IAEhD,OAAOA,WAAW;EACpB;AACF;AAACO,OAAA,CAAAzD,eAAA,GAAAA,eAAA;AAAApB,eAAA,CAlFYoB,eAAe,aAET0D,kBAAW;AAAA9E,eAAA,CAFjBoB,eAAe,kBAGJ,CAAC2D,wBAAa,EAAEC,oBAAW,EAAEC,4BAAe,EAAEC,4BAAe,EAAEC,gBAAS,CAAC;AAiFjGpD,gCAAiB,CAACqD,UAAU,CAAChE,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","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","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","unDeprecate","addDeprecatedDependenciesIssues","components","pMapSeries","addDeprecatedDepIssue","dependencies","getComponentDependencies","removedWithUndefined","Promise","all","map","dep","isRemoved","isDeprecatedByIdWithoutLoadingComponent","removed","compact","length","issues","getOrCreate","IssuesClasses","DeprecatedDependencies","hasVersion","modelComp","getBitObjectModelComponent","isDeprecated","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(private scope: ScopeMain, private workspace: Workspace, private depsResolver: DependencyResolverMain) {}\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 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 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, workspace), new UndeprecateCmd(deprecation, workspace));\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;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA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,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.268/dist/deprecation.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.268/dist/deprecation.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.270/dist/deprecation.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.270/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,29 +1,35 @@
1
1
  {
2
2
  "name": "@teambit/deprecation",
3
- "version": "1.0.268",
3
+ "version": "1.0.270",
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.268"
9
+ "version": "1.0.270"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
13
13
  "graphql-tag": "2.12.1",
14
+ "lodash": "4.17.21",
15
+ "p-map-series": "2.1.0",
14
16
  "semver": "7.5.2",
15
17
  "@teambit/harmony": "0.4.6",
16
18
  "@teambit/component-id": "1.2.0",
17
19
  "@teambit/component.ui.component-deprecated": "0.0.39",
18
20
  "@teambit/cli": "0.0.865",
19
- "@teambit/workspace": "1.0.268",
20
- "@teambit/component": "1.0.268",
21
- "@teambit/graphql": "1.0.268",
22
- "@teambit/scope": "1.0.268",
23
- "@teambit/docs": "1.0.268",
24
- "@teambit/ui": "1.0.268"
21
+ "@teambit/workspace": "1.0.270",
22
+ "@teambit/component": "1.0.270",
23
+ "@teambit/graphql": "1.0.270",
24
+ "@teambit/component-issues": "0.0.149",
25
+ "@teambit/dependency-resolver": "1.0.270",
26
+ "@teambit/issues": "1.0.270",
27
+ "@teambit/scope": "1.0.270",
28
+ "@teambit/docs": "1.0.270",
29
+ "@teambit/ui": "1.0.270"
25
30
  },
26
31
  "devDependencies": {
32
+ "@types/lodash": "4.14.165",
27
33
  "@types/semver": "7.3.4",
28
34
  "@types/mocha": "9.1.0",
29
35
  "chai": "4.3.0",