@teambit/deprecation 1.0.163 → 1.0.165
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_component_deprecation-preview.js +1 -1
- package/artifacts/schema.json +296 -116
- package/dist/deprecate-cmd.d.ts +2 -1
- package/dist/deprecate-cmd.js +6 -5
- package/dist/deprecate-cmd.js.map +1 -1
- package/dist/deprecation.fragment.js +2 -1
- package/dist/deprecation.fragment.js.map +1 -1
- package/dist/deprecation.main.runtime.d.ts +13 -1
- package/dist/deprecation.main.runtime.js +27 -6
- package/dist/deprecation.main.runtime.js.map +1 -1
- package/dist/{preview-1707621407297.js → preview-1707794292057.js} +2 -2
- package/package.json +10 -8
package/dist/deprecate-cmd.d.ts
CHANGED
|
@@ -18,8 +18,9 @@ export declare class DeprecateCmd implements Command {
|
|
|
18
18
|
remoteOp: boolean;
|
|
19
19
|
helpUrl: string;
|
|
20
20
|
constructor(deprecation: DeprecationMain, workspace: Workspace);
|
|
21
|
-
report([id]: [string], { newId }: {
|
|
21
|
+
report([id]: [string], { newId, range }: {
|
|
22
22
|
newId?: string;
|
|
23
|
+
range?: string;
|
|
23
24
|
}): Promise<string>;
|
|
24
25
|
private deprecate;
|
|
25
26
|
}
|
package/dist/deprecate-cmd.js
CHANGED
|
@@ -28,24 +28,25 @@ class DeprecateCmd {
|
|
|
28
28
|
_defineProperty(this, "group", 'collaborate');
|
|
29
29
|
_defineProperty(this, "skipWorkspace", true);
|
|
30
30
|
_defineProperty(this, "alias", 'd');
|
|
31
|
-
_defineProperty(this, "options", [['', 'new-id <string>', 'if replaced by another component, enter the new component id. alternatively use "bit rename" to do this automatically']]);
|
|
31
|
+
_defineProperty(this, "options", [['', 'new-id <string>', 'if replaced by another component, enter the new component id. alternatively use "bit rename --deprecate" to do this automatically'], ['', 'range <string>', 'enter a Semver range to deprecate specific versions. see https://www.npmjs.com/package/semver#ranges for the range syntax']]);
|
|
32
32
|
_defineProperty(this, "loader", true);
|
|
33
33
|
_defineProperty(this, "remoteOp", true);
|
|
34
34
|
_defineProperty(this, "helpUrl", 'reference/components/removing-components');
|
|
35
35
|
}
|
|
36
36
|
async report([id], {
|
|
37
|
-
newId
|
|
37
|
+
newId,
|
|
38
|
+
range
|
|
38
39
|
}) {
|
|
39
|
-
const result = await this.deprecate(id, newId);
|
|
40
|
+
const result = await this.deprecate(id, newId, range);
|
|
40
41
|
if (result) {
|
|
41
42
|
return _chalk().default.green(`the component "${id}" has been deprecated successfully`);
|
|
42
43
|
}
|
|
43
44
|
return _chalk().default.bold(`the component "${id}" is already deprecated. no changes have been made`);
|
|
44
45
|
}
|
|
45
|
-
async deprecate(id, newId) {
|
|
46
|
+
async deprecate(id, newId, range) {
|
|
46
47
|
const componentId = await this.workspace.resolveComponentId(id);
|
|
47
48
|
const newComponentId = newId ? await this.workspace.resolveComponentId(newId) : undefined;
|
|
48
|
-
return this.deprecation.deprecate(componentId, newComponentId);
|
|
49
|
+
return this.deprecation.deprecate(componentId, newComponentId, range);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
exports.DeprecateCmd = DeprecateCmd;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeprecateCmd","constructor","deprecation","workspace","name","description","report","id","newId","result","deprecate","chalk","green","bold","componentId","resolveComponentId","newComponentId","undefined","exports"],"sources":["deprecate-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class DeprecateCmd implements Command {\n name = 'deprecate <component-name>';\n arguments = [{ name: 'component-name', description: 'component name or component id' }];\n description = 'deprecate a component';\n group = 'collaborate';\n skipWorkspace = true;\n alias = 'd';\n options = [\n [\n '',\n 'new-id <string>',\n 'if replaced by another component, enter the new component id. alternatively use \"bit rename\" to do this automatically',\n ],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n helpUrl = 'reference/components/removing-components';\n\n constructor(private deprecation: DeprecationMain, private workspace: Workspace) {}\n\n async report([id]: [string], { newId }: { newId?: string }): Promise<string> {\n const result = await this.deprecate(id, newId);\n if (result) {\n return chalk.green(`the component \"${id}\" has been deprecated successfully`);\n }\n return chalk.bold(`the component \"${id}\" is already deprecated. no changes have been made`);\n }\n\n private async deprecate(id: string, newId?: string): Promise<boolean> {\n const componentId = await this.workspace.resolveComponentId(id);\n const newComponentId = newId ? await this.workspace.resolveComponentId(newId) : undefined;\n return this.deprecation.deprecate(componentId, newComponentId);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AAKnB,MAAMW,YAAY,CAAoB;
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeprecateCmd","constructor","deprecation","workspace","name","description","report","id","newId","range","result","deprecate","chalk","green","bold","componentId","resolveComponentId","newComponentId","undefined","exports"],"sources":["deprecate-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class DeprecateCmd implements Command {\n name = 'deprecate <component-name>';\n arguments = [{ name: 'component-name', description: 'component name or component id' }];\n description = 'deprecate a component';\n group = 'collaborate';\n skipWorkspace = true;\n alias = 'd';\n options = [\n [\n '',\n 'new-id <string>',\n 'if replaced by another component, enter the new component id. alternatively use \"bit rename --deprecate\" to do this automatically',\n ],\n [\n '',\n 'range <string>',\n 'enter a Semver range to deprecate specific versions. see https://www.npmjs.com/package/semver#ranges for the range syntax',\n ],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n helpUrl = 'reference/components/removing-components';\n\n constructor(private deprecation: DeprecationMain, private workspace: Workspace) {}\n\n async report([id]: [string], { newId, range }: { newId?: string; range?: string }): Promise<string> {\n const result = await this.deprecate(id, newId, range);\n if (result) {\n return chalk.green(`the component \"${id}\" has been deprecated successfully`);\n }\n return chalk.bold(`the component \"${id}\" is already deprecated. no changes have been made`);\n }\n\n private async deprecate(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.deprecation.deprecate(componentId, newComponentId, range);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AAKnB,MAAMW,YAAY,CAAoB;EAuB3CC,WAAWA,CAASC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AAc,EAAER,KAAK,CAAC;EACvE;AACF;AAACU,OAAA,CAAAnB,YAAA,GAAAA,YAAA"}
|
|
@@ -17,9 +17,10 @@ class DeprecationFragment {
|
|
|
17
17
|
const deprecationInfo = await this.deprecation.getDeprecationInfo(component);
|
|
18
18
|
const isDeprecate = deprecationInfo.isDeprecate.toString();
|
|
19
19
|
const newId = deprecationInfo.newId ? ` (new-id: ${deprecationInfo.newId})` : '';
|
|
20
|
+
const range = deprecationInfo.range ? ` (range: ${deprecationInfo.range})` : '';
|
|
20
21
|
return {
|
|
21
22
|
title: this.title,
|
|
22
|
-
content: isDeprecate + newId
|
|
23
|
+
content: isDeprecate + newId + range
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
async json(component) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DeprecationFragment","constructor","deprecation","_defineProperty","renderRow","component","deprecationInfo","getDeprecationInfo","isDeprecate","toString","newId","title","content","json","exports"],"sources":["deprecation.fragment.ts"],"sourcesContent":["import { Component, ShowFragment } from '@teambit/component';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class DeprecationFragment implements ShowFragment {\n constructor(private deprecation: DeprecationMain) {}\n\n title = 'deprecated';\n\n async renderRow(component: Component) {\n const deprecationInfo = await this.deprecation.getDeprecationInfo(component);\n const isDeprecate = deprecationInfo.isDeprecate.toString();\n const newId = deprecationInfo.newId ? ` (new-id: ${deprecationInfo.newId})` : '';\n return {\n title: this.title,\n content: isDeprecate + newId,\n };\n }\n\n async json(component: Component) {\n return {\n title: this.title,\n json: await this.deprecation.getDeprecationInfo(component),\n };\n }\n\n weight = 3;\n}\n"],"mappings":";;;;;;;;;AAGO,MAAMA,mBAAmB,CAAyB;EACvDC,WAAWA,CAASC,WAA4B,EAAE;IAAA,KAA9BA,WAA4B,GAA5BA,WAA4B;IAAAC,eAAA,gBAExC,YAAY;IAAAA,eAAA,
|
|
1
|
+
{"version":3,"names":["DeprecationFragment","constructor","deprecation","_defineProperty","renderRow","component","deprecationInfo","getDeprecationInfo","isDeprecate","toString","newId","range","title","content","json","exports"],"sources":["deprecation.fragment.ts"],"sourcesContent":["import { Component, ShowFragment } from '@teambit/component';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class DeprecationFragment implements ShowFragment {\n constructor(private deprecation: DeprecationMain) {}\n\n title = 'deprecated';\n\n async renderRow(component: Component) {\n const deprecationInfo = await this.deprecation.getDeprecationInfo(component);\n const isDeprecate = deprecationInfo.isDeprecate.toString();\n const newId = deprecationInfo.newId ? ` (new-id: ${deprecationInfo.newId})` : '';\n const range = deprecationInfo.range ? ` (range: ${deprecationInfo.range})` : '';\n return {\n title: this.title,\n content: isDeprecate + newId + range,\n };\n }\n\n async json(component: Component) {\n return {\n title: this.title,\n json: await this.deprecation.getDeprecationInfo(component),\n };\n }\n\n weight = 3;\n}\n"],"mappings":";;;;;;;;;AAGO,MAAMA,mBAAmB,CAAyB;EACvDC,WAAWA,CAASC,WAA4B,EAAE;IAAA,KAA9BA,WAA4B,GAA5BA,WAA4B;IAAAC,eAAA,gBAExC,YAAY;IAAAA,eAAA,iBAoBX,CAAC;EAtByC;EAInD,MAAMC,SAASA,CAACC,SAAoB,EAAE;IACpC,MAAMC,eAAe,GAAG,MAAM,IAAI,CAACJ,WAAW,CAACK,kBAAkB,CAACF,SAAS,CAAC;IAC5E,MAAMG,WAAW,GAAGF,eAAe,CAACE,WAAW,CAACC,QAAQ,CAAC,CAAC;IAC1D,MAAMC,KAAK,GAAGJ,eAAe,CAACI,KAAK,GAAI,aAAYJ,eAAe,CAACI,KAAM,GAAE,GAAG,EAAE;IAChF,MAAMC,KAAK,GAAGL,eAAe,CAACK,KAAK,GAAI,YAAWL,eAAe,CAACK,KAAM,GAAE,GAAG,EAAE;IAC/E,OAAO;MACLC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBC,OAAO,EAAEL,WAAW,GAAGE,KAAK,GAAGC;IACjC,CAAC;EACH;EAEA,MAAMG,IAAIA,CAACT,SAAoB,EAAE;IAC/B,OAAO;MACLO,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBE,IAAI,EAAE,MAAM,IAAI,CAACZ,WAAW,CAACK,kBAAkB,CAACF,SAAS;IAC3D,CAAC;EACH;AAGF;AAACU,OAAA,CAAAf,mBAAA,GAAAA,mBAAA"}
|
|
@@ -7,10 +7,21 @@ import { ComponentIdObj } from '@teambit/component-id';
|
|
|
7
7
|
export type DeprecationInfo = {
|
|
8
8
|
isDeprecate: boolean;
|
|
9
9
|
newId?: string;
|
|
10
|
+
range?: string;
|
|
10
11
|
};
|
|
11
12
|
export type DeprecationMetadata = {
|
|
13
|
+
/**
|
|
14
|
+
* whether the head is deprecated
|
|
15
|
+
*/
|
|
12
16
|
deprecate?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* the new id to use instead of the current one
|
|
19
|
+
*/
|
|
13
20
|
newId?: ComponentIdObj;
|
|
21
|
+
/**
|
|
22
|
+
* Semver range to deprecate previous versions
|
|
23
|
+
*/
|
|
24
|
+
range?: string;
|
|
14
25
|
};
|
|
15
26
|
export declare class DeprecationMain {
|
|
16
27
|
private scope;
|
|
@@ -19,6 +30,7 @@ export declare class DeprecationMain {
|
|
|
19
30
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
20
31
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
21
32
|
getDeprecationInfo(component: Component): Promise<DeprecationInfo>;
|
|
33
|
+
private getHeadComponent;
|
|
22
34
|
/**
|
|
23
35
|
* mark a component as deprecated. after this change, the component will be modified.
|
|
24
36
|
* tag and export the component to have it deprecated on the remote.
|
|
@@ -27,7 +39,7 @@ export declare class DeprecationMain {
|
|
|
27
39
|
* @param newId
|
|
28
40
|
* @returns boolean whether or not the component has been deprecated
|
|
29
41
|
*/
|
|
30
|
-
deprecate(componentId: ComponentID, newId?: ComponentID): Promise<boolean>;
|
|
42
|
+
deprecate(componentId: ComponentID, newId?: ComponentID, range?: string): Promise<boolean>;
|
|
31
43
|
unDeprecate(componentId: ComponentID): Promise<boolean>;
|
|
32
44
|
static provider([graphql, scope, componentAspect, workspace, cli]: [
|
|
33
45
|
GraphqlMain,
|
|
@@ -11,6 +11,13 @@ function _cli() {
|
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
13
13
|
}
|
|
14
|
+
function _semver() {
|
|
15
|
+
const data = _interopRequireDefault(require("semver"));
|
|
16
|
+
_semver = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
14
21
|
function _component() {
|
|
15
22
|
const data = require("@teambit/component");
|
|
16
23
|
_component = function () {
|
|
@@ -84,15 +91,28 @@ class DeprecationMain {
|
|
|
84
91
|
this.workspace = workspace;
|
|
85
92
|
}
|
|
86
93
|
async getDeprecationInfo(component) {
|
|
87
|
-
const
|
|
94
|
+
const headComponent = await this.getHeadComponent(component);
|
|
95
|
+
const data = headComponent.config.extensions.findExtension(_deprecation().DeprecationAspect.id)?.config;
|
|
88
96
|
const deprecatedBackwardCompatibility = component.state._consumer.deprecated;
|
|
89
97
|
const isDeprecate = Boolean(data?.deprecate || deprecatedBackwardCompatibility);
|
|
98
|
+
const currentTag = component.getTag();
|
|
99
|
+
const isDeprecateByRange = Boolean(data?.range && currentTag && _semver().default.satisfies(currentTag.version, data.range));
|
|
90
100
|
const newId = data?.newId ? _component().ComponentID.fromObject(data?.newId).toString() : undefined;
|
|
91
101
|
return {
|
|
92
|
-
isDeprecate,
|
|
93
|
-
newId
|
|
102
|
+
isDeprecate: isDeprecate || isDeprecateByRange,
|
|
103
|
+
newId,
|
|
104
|
+
range: data?.range
|
|
94
105
|
};
|
|
95
106
|
}
|
|
107
|
+
async getHeadComponent(component) {
|
|
108
|
+
if (component.id.version && component.head && component.id.version !== component.head?.hash && component.id.version !== component.headTag?.version.version) {
|
|
109
|
+
const headComp = this.workspace // if workspace exits, prefer using the workspace as it may be modified
|
|
110
|
+
? await this.workspace.get(component.id.changeVersion(undefined)) : await this.scope.get(component.id.changeVersion(component.head.hash));
|
|
111
|
+
if (!headComp) throw new Error(`unable to get the head of ${component.id.toString()}`);
|
|
112
|
+
return headComp;
|
|
113
|
+
}
|
|
114
|
+
return component;
|
|
115
|
+
}
|
|
96
116
|
|
|
97
117
|
/**
|
|
98
118
|
* mark a component as deprecated. after this change, the component will be modified.
|
|
@@ -102,10 +122,11 @@ class DeprecationMain {
|
|
|
102
122
|
* @param newId
|
|
103
123
|
* @returns boolean whether or not the component has been deprecated
|
|
104
124
|
*/
|
|
105
|
-
async deprecate(componentId, newId) {
|
|
125
|
+
async deprecate(componentId, newId, range) {
|
|
106
126
|
const results = this.workspace.bitMap.addComponentConfig(componentId, _deprecation().DeprecationAspect.id, {
|
|
107
|
-
deprecate:
|
|
108
|
-
newId: newId?.toObject()
|
|
127
|
+
deprecate: !range,
|
|
128
|
+
newId: newId?.toObject(),
|
|
129
|
+
range
|
|
109
130
|
});
|
|
110
131
|
await this.workspace.bitMap.write(`deprecate ${componentId.toString()}`);
|
|
111
132
|
return results;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_component","_scope","_workspace","_interopRequireDefault","_graphql","_deprecation","_deprecation2","_deprecation3","_deprecateCmd","_undeprecateCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeprecationMain","constructor","scope","workspace","getDeprecationInfo","component","config","extensions","findExtension","DeprecationAspect","id","deprecatedBackwardCompatibility","state","_consumer","deprecated","isDeprecate","Boolean","deprecate","newId","ComponentID","fromObject","toString","undefined","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 { 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};\n\nexport type DeprecationMetadata = {\n deprecate?: boolean;\n newId?: ComponentIdObj;\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 data = component.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 newId = data?.newId ? ComponentID.fromObject(data?.newId).toString() : undefined;\n return {\n isDeprecate,\n newId,\n };\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): Promise<boolean> {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: true,\n newId: newId?.toObject(),\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,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAJ,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,aAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,cAAA;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wB,EAAE;IAC1C,MAAMC,OAAO,GAAG,IAAI,CAACrB,SAAS,CAACsB,MAAM,CAACC,kBAAkB,CAACH,WAAW,EAAEd,gCAAiB,CAACC,EAAE,EAAE;MAC1FO,SAAS,EAAE,KAAK;MAChBC,KAAK,EAAE;IACT,CAAC,CAAC;IACF,MAAM,IAAI,CAACf,SAAS,CAACsB,MAAM,CAACG,KAAK,CAAE,eAAcL,WAAW,CAACF,QAAQ,CAAC,CAAE,EAAC,CAAC;IAE1E,OAAOG,OAAO;EAChB;EAEA,aAAaM,QAAQA,CAAC,CAACC,OAAO,EAAE7B,KAAK,EAAE8B,eAAe,EAAE7B,SAAS,EAAE8B,GAAG,CAMrE,EAAE;IACD,MAAMC,WAAW,GAAG,IAAIlC,eAAe,CAACE,KAAK,EAAEC,SAAS,CAAC;IACzD8B,GAAG,CAACE,QAAQ,CAAC,KAAIC,4BAAY,EAACF,WAAW,EAAE/B,SAAS,CAAC,EAAE,KAAIkC,gCAAc,EAACH,WAAW,EAAE/B,SAAS,CAAC,CAAC;IAClG6B,eAAe,CAACM,qBAAqB,CAAC,CAAC,KAAIC,mCAAmB,EAACL,WAAW,CAAC,CAAC,CAAC;IAC7EH,OAAO,CAACI,QAAQ,CAAC,IAAAK,iCAAiB,EAACN,WAAW,CAAC,CAAC;IAEhD,OAAOA,WAAW;EACpB;AACF;AAACO,OAAA,CAAAzC,eAAA,GAAAA,eAAA;AAAApB,eAAA,CA5DYoB,eAAe,aAET0C,kBAAW;AAAA9D,eAAA,CAFjBoB,eAAe,kBAGJ,CAAC2C,wBAAa,EAAEC,oBAAW,EAAEC,4BAAe,EAAEC,oBAAe,EAAEC,gBAAS,CAAC;AA2DjGtC,gCAAiB,CAACuC,UAAU,CAAChD,eAAe,CAAC"}
|
|
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","String","r","e","Symbol","toPrimitive","call","TypeError","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,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAK,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,aAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,YAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,cAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,aAAA,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W,EAAE5B,gCAAiB,CAACC,EAAE,EAAE;MAC1FO,SAAS,EAAE,KAAK;MAChBQ,KAAK,EAAE;IACT,CAAC,CAAC;IACF,MAAM,IAAI,CAACxB,SAAS,CAACsC,MAAM,CAACG,KAAK,CAAE,eAAcL,WAAW,CAACT,QAAQ,CAAC,CAAE,EAAC,CAAC;IAE1E,OAAOU,OAAO;EAChB;EAEA,aAAaM,QAAQA,CAAC,CAACC,OAAO,EAAE7C,KAAK,EAAE8C,eAAe,EAAE7C,SAAS,EAAE8C,GAAG,CAMrE,EAAE;IACD,MAAMC,WAAW,GAAG,IAAIlD,eAAe,CAACE,KAAK,EAAEC,SAAS,CAAC;IACzD8C,GAAG,CAACE,QAAQ,CAAC,KAAIC,4BAAY,EAACF,WAAW,EAAE/C,SAAS,CAAC,EAAE,KAAIkD,gCAAc,EAACH,WAAW,EAAE/C,SAAS,CAAC,CAAC;IAClG6C,eAAe,CAACM,qBAAqB,CAAC,CAAC,KAAIC,mCAAmB,EAACL,WAAW,CAAC,CAAC,CAAC;IAC7EH,OAAO,CAACI,QAAQ,CAAC,IAAAK,iCAAiB,EAACN,WAAW,CAAC,CAAC;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,oBAAe,EAAEC,gBAAS,CAAC;AAiFjGpD,gCAAiB,CAACqD,UAAU,CAAChE,eAAe,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@1.0.165/dist/deprecation.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@1.0.165/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,28 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/deprecation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.165",
|
|
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.165"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
13
13
|
"graphql-tag": "2.12.1",
|
|
14
|
+
"semver": "7.5.2",
|
|
14
15
|
"@teambit/harmony": "0.4.6",
|
|
15
16
|
"@teambit/component-id": "1.2.0",
|
|
16
17
|
"@teambit/component.ui.component-deprecated": "0.0.39",
|
|
17
18
|
"@teambit/cli": "0.0.851",
|
|
18
|
-
"@teambit/workspace": "1.0.
|
|
19
|
-
"@teambit/component": "1.0.
|
|
20
|
-
"@teambit/graphql": "1.0.
|
|
21
|
-
"@teambit/scope": "1.0.
|
|
22
|
-
"@teambit/docs": "1.0.
|
|
23
|
-
"@teambit/ui": "1.0.
|
|
19
|
+
"@teambit/workspace": "1.0.165",
|
|
20
|
+
"@teambit/component": "1.0.165",
|
|
21
|
+
"@teambit/graphql": "1.0.165",
|
|
22
|
+
"@teambit/scope": "1.0.165",
|
|
23
|
+
"@teambit/docs": "1.0.165",
|
|
24
|
+
"@teambit/ui": "1.0.165"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
27
|
+
"@types/semver": "7.3.4",
|
|
26
28
|
"@types/mocha": "9.1.0",
|
|
27
29
|
"chai": "4.3.0",
|
|
28
30
|
"@teambit/harmony.envs.core-aspect-env": "0.0.25"
|