@teambit/deprecation 1.0.1027 → 1.0.1028

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.
@@ -40,9 +40,11 @@ deprecated components remain available but display warnings when installed or im
40
40
  }) {
41
41
  const result = await this.deprecate(id, newId, range);
42
42
  if (result) {
43
- return (0, _cli().formatSuccessSummary)(`the component "${id}" has been deprecated successfully`);
43
+ const successMessage = range ? `versions of "${id}" matching the range "${range}" have been deprecated successfully` : `the component "${id}" has been deprecated successfully`;
44
+ return (0, _cli().formatSuccessSummary)(successMessage);
44
45
  }
45
- return (0, _cli().formatHint)(`the component "${id}" is already deprecated. no changes have been made`);
46
+ const hintMessage = range ? `the range "${range}" of "${id}" is already deprecated. no changes have been made` : `the component "${id}" is already deprecated. no changes have been made`;
47
+ return (0, _cli().formatHint)(hintMessage);
46
48
  }
47
49
  async deprecate(id, newId, range) {
48
50
  return this.deprecation.deprecateByCLIValues(id, newId, range);
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DeprecateCmd","constructor","deprecation","name","description","report","id","newId","range","result","deprecate","formatSuccessSummary","formatHint","deprecateByCLIValues","exports"],"sources":["deprecate-cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport { formatSuccessSummary, formatHint } from '@teambit/cli';\nimport type { 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 = 'mark a component as deprecated to discourage its use';\n extendedDescription = `marks a component as deprecated locally, then after snap/tag and export it becomes deprecated in the remote scope.\noptionally specify a replacement component or deprecate only specific version ranges.\ndeprecated components remain available but display warnings when installed or imported.`;\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) {}\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 formatSuccessSummary(`the component \"${id}\" has been deprecated successfully`);\n }\n return formatHint(`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 return this.deprecation.deprecateByCLIValues(id, newId, range);\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgE,SAAAE,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD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AAA,YAAA","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DeprecateCmd","constructor","deprecation","name","description","report","id","newId","range","result","deprecate","successMessage","formatSuccessSummary","hintMessage","formatHint","deprecateByCLIValues","exports"],"sources":["deprecate-cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport { formatSuccessSummary, formatHint } from '@teambit/cli';\nimport type { 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 = 'mark a component as deprecated to discourage its use';\n extendedDescription = `marks a component as deprecated locally, then after snap/tag and export it becomes deprecated in the remote scope.\noptionally specify a replacement component or deprecate only specific version ranges.\ndeprecated components remain available but display warnings when installed or imported.`;\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) {}\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 const successMessage = range\n ? `versions of \"${id}\" matching the range \"${range}\" have been deprecated successfully`\n : `the component \"${id}\" has been deprecated successfully`;\n return formatSuccessSummary(successMessage);\n }\n const hintMessage = range\n ? `the range \"${range}\" of \"${id}\" is already deprecated. no changes have been made`\n : `the component \"${id}\" is already deprecated. no changes have been made`;\n return formatHint(hintMessage);\n }\n\n private async deprecate(id: string, newId?: string, range?: string): Promise<boolean> {\n return this.deprec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AA,eAAA,gBACZ,GAAG;IAAAA,eAAA,kBACD,CACR,CACE,EAAE,EACF,iBAAiB,EACjB,mIAAmI,CACpI,EACD,CACE,EAAE,EACF,gBAAgB,EAChB,2HAA2H,CAC5H,CACF;IAAAA,eAAA,iBACQ,IAAI;IAAAA,eAAA,mBACF,IAAI;IAAAA,eAAA,kBACL,0CAA0C;EAED;EAEnD,MAAMwB,MAAMA,CAAC,CAACC,EAAE,CAAW,EAAE;IAAEC,KAAK;IAAEC;EAA0C,CAAC,EAAmB;IAClG,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACC,SAAS,CAACJ,EAAE,EAAEC,KAAK,EAAEC,KAAK,CAAC;IACrD,IAAIC,MAAM,EAAE;MACV,MAAME,cAAc,GAAGH,KAAK,GACxB,gBAAgBF,EAAE,yBAAyBE,KAAK,qCAAqC,GACrF,kBAAkBF,EAAE,oCAAoC;MAC5D,OAAO,IAAAM,2BAAoB,EAACD,cAAc,CAAC;IAC7C;IACA,MAAME,WAAW,GAAGL,KAAK,GACrB,cAAcA,KAAK,SAASF,EAAE,oDAAoD,GAClF,kBAAkBA,EAAE,oDAAoD;IAC5E,OAAO,IAAAQ,iBAAU,EAACD,WAAW,CAAC;EAChC;EAEA,MAAcH,SAASA,CAACJ,EAAU,EAAEC,KAAc,EAAEC,KAAc,EAAoB;IACpF,OAAO,IAAI,CAACN,WAAW,CAACa,oBAAoB,CAACT,EAAE,EAAEC,KAAK,EAAEC,KAAK,CAAC;EAChE;AACF;AAACQ,OAAA,CAAAhB,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.1027/dist/deprecation.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.1027/dist/deprecation.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.1028/dist/deprecation.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_deprecation@1.0.1028/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.1027",
3
+ "version": "1.0.1028",
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.1027"
9
+ "version": "1.0.1028"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
@@ -19,14 +19,14 @@
19
19
  "@teambit/component-id": "1.2.4",
20
20
  "@teambit/component-issues": "0.0.174",
21
21
  "@teambit/component.ui.component-deprecated": "0.0.41",
22
- "@teambit/component": "1.0.1027",
23
- "@teambit/graphql": "1.0.1027",
24
- "@teambit/dependency-resolver": "1.0.1027",
25
- "@teambit/issues": "1.0.1027",
26
- "@teambit/scope": "1.0.1027",
27
- "@teambit/workspace": "1.0.1027",
28
- "@teambit/docs": "1.0.1027",
29
- "@teambit/ui": "1.0.1027"
22
+ "@teambit/component": "1.0.1028",
23
+ "@teambit/graphql": "1.0.1028",
24
+ "@teambit/dependency-resolver": "1.0.1028",
25
+ "@teambit/issues": "1.0.1028",
26
+ "@teambit/scope": "1.0.1028",
27
+ "@teambit/workspace": "1.0.1028",
28
+ "@teambit/docs": "1.0.1028",
29
+ "@teambit/ui": "1.0.1028"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/lodash": "4.14.165",