@teambit/install 0.0.217 → 0.0.218

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.
@@ -1,5 +1,12 @@
1
1
  "use strict";
2
2
 
3
+ function _component() {
4
+ const data = require("@teambit/component");
5
+ _component = function () {
6
+ return data;
7
+ };
8
+ return data;
9
+ }
3
10
  function _pickOutdatedPkgs() {
4
11
  const data = require("./pick-outdated-pkgs");
5
12
  _pickOutdatedPkgs = function () {
@@ -43,7 +50,7 @@ describe('makeOutdatedPkgChoices', () => {
43
50
  currentRange: '1.0.0',
44
51
  latestRange: '2.0.0',
45
52
  source: 'component',
46
- componentId: 'comp1',
53
+ componentId: _component().ComponentID.fromString('scope/comp1'),
47
54
  targetField: 'dependencies'
48
55
  }, {
49
56
  name: 'bar',
@@ -62,14 +69,14 @@ describe('makeOutdatedPkgChoices', () => {
62
69
  currentRange: '1.0.0',
63
70
  latestRange: '2.0.0',
64
71
  source: 'component-model',
65
- componentId: 'comp1',
72
+ componentId: _component().ComponentID.fromString('scope/comp1'),
66
73
  targetField: 'devDependencies'
67
74
  }, {
68
75
  name: 'foo',
69
76
  currentRange: '1.1.0',
70
77
  latestRange: '2.0.0',
71
78
  source: 'component-model',
72
- componentId: 'comp2',
79
+ componentId: _component().ComponentID.fromString('scope/comp2'),
73
80
  targetField: 'dependencies'
74
81
  }]);
75
82
  // @ts-ignore
@@ -81,14 +88,14 @@ describe('makeOutdatedPkgChoices', () => {
81
88
  currentRange: '<=10.0.0',
82
89
  latestRange: '2.0.0',
83
90
  source: 'component-model',
84
- componentId: 'comp1',
91
+ componentId: _component().ComponentID.fromString('scope/comp1'),
85
92
  targetField: 'dependencies'
86
93
  }, {
87
94
  name: 'foo',
88
95
  currentRange: '1.1.0',
89
96
  latestRange: '2.0.0',
90
97
  source: 'component-model',
91
- componentId: 'comp2',
98
+ componentId: _component().ComponentID.fromString('scope/comp2'),
92
99
  targetField: 'dependencies'
93
100
  }]);
94
101
  // @ts-ignore
@@ -100,14 +107,14 @@ describe('makeOutdatedPkgChoices', () => {
100
107
  currentRange: '^1.2.3',
101
108
  latestRange: '2.0.0',
102
109
  source: 'component-model',
103
- componentId: 'comp1',
110
+ componentId: _component().ComponentID.fromString('scope/comp1'),
104
111
  targetField: 'dependencies'
105
112
  }, {
106
113
  name: 'foo',
107
114
  currentRange: '^1.2.3',
108
115
  latestRange: '2.0.0',
109
116
  source: 'component-model',
110
- componentId: 'comp2',
117
+ componentId: _component().ComponentID.fromString('scope/comp2'),
111
118
  targetField: 'dependencies'
112
119
  }]);
113
120
  // @ts-ignore
@@ -1 +1 @@
1
- {"version":3,"names":["_pickOutdatedPkgs","data","require","describe","it","choices","makeOutdatedPkgChoices","name","currentRange","latestRange","source","targetField","expect","toMatchSnapshot","componentId","variantPattern"],"sources":["pick-outdated-pkgs.spec.ts"],"sourcesContent":["import { makeOutdatedPkgChoices } from './pick-outdated-pkgs';\n\ndescribe('makeOutdatedPkgChoices', () => {\n it('should render choices in correct order', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'zoo',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'devDependencies',\n },\n {\n name: 'qar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n {\n name: 'foo',\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n {\n name: 'bar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'peerDependencies',\n },\n ]);\n // @ts-ignore\n expect(choices).toMatchSnapshot();\n });\n it('should render choices with context information', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'foo',\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n source: 'component',\n componentId: 'comp1',\n targetField: 'dependencies',\n },\n {\n name: 'bar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'variants',\n variantPattern: '{comp2}',\n targetField: 'peerDependencies',\n },\n ]);\n // @ts-ignore\n expect(choices).toMatchSnapshot();\n });\n it('should group component model updates of the same dependency', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'foo',\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: 'comp1',\n targetField: 'devDependencies',\n },\n {\n name: 'foo',\n currentRange: '1.1.0',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: 'comp2',\n targetField: 'dependencies',\n },\n ]);\n // @ts-ignore\n expect(choices).toMatchSnapshot();\n });\n it(\"should group component model updates of the same dependency and use * as current range when can't compare ranges\", () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'foo',\n currentRange: '<=10.0.0',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: 'comp1',\n targetField: 'dependencies',\n },\n {\n name: 'foo',\n currentRange: '1.1.0',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: 'comp2',\n targetField: 'dependencies',\n },\n ]);\n // @ts-ignore\n expect(choices).toMatchSnapshot();\n });\n it('should group component model updates of the same dependency and display the current range when all components use the same range', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'foo',\n currentRange: '^1.2.3',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: 'comp1',\n targetField: 'dependencies',\n },\n {\n name: 'foo',\n currentRange: '^1.2.3',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: 'comp2',\n targetField: 'dependencies',\n },\n ]);\n // @ts-ignore\n expect(choices).toMatchSnapshot();\n });\n});\n"],"mappings":";;AAAA,SAAAA,kBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,iBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEAE,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACvCC,EAAE,CAAC,wCAAwC,EAAE,MAAM;IACjD,MAAMC,OAAO,GAAG,IAAAC,0CAAsB,E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C,MAAM,EAAE,iBAAiB;MACzBI,WAAW,EAAE,OAAO;MACpBH,WAAW,EAAE;IACf,CAAC,CACF,CAAC;IACF;IACAC,MAAM,CAACP,OAAO,CAAC,CAACQ,eAAe,CAAC,CAAC;EACnC,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["_component","data","require","_pickOutdatedPkgs","describe","it","choices","makeOutdatedPkgChoices","name","currentRange","latestRange","source","targetField","expect","toMatchSnapshot","componentId","ComponentID","fromString","variantPattern"],"sources":["pick-outdated-pkgs.spec.ts"],"sourcesContent":["import { ComponentID } from '@teambit/component';\nimport { makeOutdatedPkgChoices } from './pick-outdated-pkgs';\n\ndescribe('makeOutdatedPkgChoices', () => {\n it('should render choices in correct order', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'zoo',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'devDependencies',\n },\n {\n name: 'qar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n {\n name: 'foo',\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n {\n name: 'bar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'peerDependencies',\n },\n ]);\n // @ts-ignore\n expect(choices).toMatchSnapshot();\n });\n it('should render choices with context information', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'foo',\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n source: 'component',\n componentId: ComponentID.fromString('scope/comp1'),\n targetField: 'dependencies',\n },\n {\n name: 'bar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'variants',\n variantPattern: '{comp2}',\n targetField: 'peerDependencies',\n },\n ]);\n // @ts-ignore\n expect(choices).toMatchSnapshot();\n });\n it('should group component model updates of the same dependency', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'foo',\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: ComponentID.fromString('scope/comp1'),\n targetField: 'devDependencies',\n },\n {\n name: 'foo',\n currentRange: '1.1.0',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: ComponentID.fromString('scope/comp2'),\n targetField: 'dependencies',\n },\n ]);\n // @ts-ignore\n expect(choices).toMatchSnapshot();\n });\n it(\"should group component model updates of the same dependency and use * as current range when can't compare ranges\", () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'foo',\n currentRange: '<=10.0.0',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: ComponentID.fromString('scope/comp1'),\n targetField: 'dependencies',\n },\n {\n name: 'foo',\n currentRange: '1.1.0',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: ComponentID.fromString('scope/comp2'),\n targetField: 'dependencies',\n },\n ]);\n // @ts-ignore\n expect(choices).toMatchSnapshot();\n });\n it('should group component model updates of the same dependency and display the current range when all components use the same range', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'foo',\n currentRange: '^1.2.3',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: ComponentID.fromString('scope/comp1'),\n targetField: 'dependencies',\n },\n {\n name: 'foo',\n currentRange: '^1.2.3',\n latestRange: '2.0.0',\n source: 'component-model',\n componentId: ComponentID.fromString('scope/comp2'),\n targetField: 'dependencies',\n },\n ]);\n // @ts-ignore\n expect(choices).toMatchSnapshot();\n });\n});\n"],"mappings":";;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,kBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,iBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEAG,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACvCC,EAAE,CAAC,w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AK;MACXC,YAAY,EAAE,QAAQ;MACtBC,WAAW,EAAE,OAAO;MACpBC,MAAM,EAAE,iBAAiB;MACzBI,WAAW,EAAEC,wBAAW,CAACC,UAAU,CAAC,aAAa,CAAC;MAClDL,WAAW,EAAE;IACf,CAAC,EACD;MACEJ,IAAI,EAAE,KAAK;MACXC,YAAY,EAAE,QAAQ;MACtBC,WAAW,EAAE,OAAO;MACpBC,MAAM,EAAE,iBAAiB;MACzBI,WAAW,EAAEC,wBAAW,CAACC,UAAU,CAAC,aAAa,CAAC;MAClDL,WAAW,EAAE;IACf,CAAC,CACF,CAAC;IACF;IACAC,MAAM,CAACP,OAAO,CAAC,CAACQ,eAAe,CAAC,CAAC;EACnC,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -24,9 +24,9 @@ class UpdateCmd {
24
24
  (0, _defineProperty2().default)(this, "group", 'development');
25
25
  (0, _defineProperty2().default)(this, "arguments", [{
26
26
  name: 'package-patterns...',
27
- description: 'a list of package names, or patterns (separated by space). The patterns should be in glob format. By default, all packages are selected.'
27
+ description: 'a string list of package names, or patterns (separated by space), e.g. "@teambit/** @my-org/ui/**". The patterns should be in glob format. By default, all packages are selected.'
28
28
  }]);
29
- (0, _defineProperty2().default)(this, "options", [['y', 'yes', 'automatically update all outdated packages'], ['', 'patch', 'update to the latest patch version. Semver rules are ignored'], ['', 'minor', 'update to the latest minor version. Semver rules are ignored'], ['', 'major', 'update to the latest major version. Semver rules are ignored']]);
29
+ (0, _defineProperty2().default)(this, "options", [['y', 'yes', 'automatically update all outdated versions for packages specified in pattern (all if no pattern supplied) - use carefully as could result in breaking updates for dependencies'], ['', 'patch', 'update to the latest patch version. Semver rules are ignored'], ['', 'minor', 'update to the latest minor version. Semver rules are ignored'], ['', 'major', 'update to the latest major version. Semver rules are ignored']]);
30
30
  }
31
31
  async report([patterns = []], options) {
32
32
  let forceVersionBump;
@@ -1 +1 @@
1
- {"version":3,"names":["UpdateCmd","constructor","install","_defineProperty2","default","name","description","report","patterns","options","forceVersionBump","major","minor","patch","updateDependencies","all","yes","exports"],"sources":["update.cmd.tsx"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\n\nimport { InstallMain } from './install.main.runtime';\n\ntype UpdateCmdOptions = {\n yes?: boolean;\n patterns?: string[];\n major?: boolean;\n minor?: boolean;\n patch?: boolean;\n};\n\nexport default class UpdateCmd implements Command {\n name = 'update [package-patterns...]';\n description = 'update dependencies';\n helpUrl = 'docs/dependencies/configuring-dependencies/#update-dependencies';\n alias = 'up';\n group = 'development';\n arguments = [\n {\n name: 'package-patterns...',\n description:\n 'a list of package names, or patterns (separated by space). The patterns should be in glob format. By default, all packages are selected.',\n },\n ];\n options = [\n ['y', 'yes', 'automatically update all outdated packages'],\n ['', 'patch', 'update to the latest patch version. Semver rules are ignored'],\n ['', 'minor', 'update to the latest minor version. Semver rules are ignored'],\n ['', 'major', 'update to the latest major version. Semver rules are ignored'],\n ] as CommandOptions;\n\n constructor(private install: InstallMain) {}\n\n async report([patterns = []]: [string[]], options: UpdateCmdOptions) {\n let forceVersionBump: 'major' | 'minor' | 'patch' | undefined;\n if (options.major) {\n forceVersionBump = 'major';\n } else if (options.minor) {\n forceVersionBump = 'minor';\n } else if (options.patch) {\n forceVersionBump = 'patch';\n }\n await this.install.updateDependencies({\n all: options.yes === true,\n patterns,\n forceVersionBump,\n });\n return '';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAYe,MAAMA,SAAS,CAAoB;EAoBhDC,WAAWA,CAASC,OAAoB,EAAE;IAAA,KAAtBA,OAAoB,GAApBA,OAAoB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBAnBjC,8BAA8B;IAAA,IAAAD,gBAAA,GAAAC,OAAA,uBACvB,qBAAqB;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACzB,iEAAiE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACnE,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACJ,aAAa;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBACT,CACV;MACEC,IAAI,EAAE,qBAAqB;MAC3BC,WAAW,EACT;IACJ,CAAC,CACF;IAAA,IAAAH,gBAAA,GAAAC,OAAA,mBACS,CACR,CAAC,GAAG,EAAE,KAAK,EAAE,4CAA4C,CAAC,EAC1D,CAAC,EAAE,EAAE,OAAO,EAAE,8DAA8D,CAAC,EAC7E,CAAC,EAAE,EAAE,OAAO,EAAE,8DAA8D,CAAC,EAC7E,CAAC,EAAE,EAAE,OAAO,EAAE,8DAA8D,CAAC,CAC9E;EAE0C;EAE3C,MAAMG,MAAMA,CAAC,CAACC,QAAQ,GAAG,EAAE,CAAa,EAAEC,OAAyB,EAAE;IACnE,IAAIC,gBAAyD;IAC7D,IAAID,OAAO,CAACE,KAAK,EAAE;MACjBD,gBAAgB,GAAG,OAAO;IAC5B,CAAC,MAAM,IAAID,OAAO,CAACG,KAAK,EAAE;MACxBF,gBAAgB,GAAG,OAAO;IAC5B,CAAC,MAAM,IAAID,OAAO,CAACI,KAAK,EAAE;MACxBH,gBAAgB,GAAG,OAAO;IAC5B;IACA,MAAM,IAAI,CAACR,OAAO,CAACY,kBAAkB,CAAC;MACpCC,GAAG,EAAEN,OAAO,CAACO,GAAG,KAAK,IAAI;MACzBR,QAAQ;MACRE;IACF,CAAC,CAAC;IACF,OAAO,EAAE;EACX;AACF;AAACO,OAAA,CAAAb,OAAA,GAAAJ,SAAA"}
1
+ {"version":3,"names":["UpdateCmd","constructor","install","_defineProperty2","default","name","description","report","patterns","options","forceVersionBump","major","minor","patch","updateDependencies","all","yes","exports"],"sources":["update.cmd.tsx"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\n\nimport { InstallMain } from './install.main.runtime';\n\ntype UpdateCmdOptions = {\n yes?: boolean;\n patterns?: string[];\n major?: boolean;\n minor?: boolean;\n patch?: boolean;\n};\n\nexport default class UpdateCmd implements Command {\n name = 'update [package-patterns...]';\n description = 'update dependencies';\n helpUrl = 'docs/dependencies/configuring-dependencies/#update-dependencies';\n alias = 'up';\n group = 'development';\n arguments = [\n {\n name: 'package-patterns...',\n description:\n 'a string list of package names, or patterns (separated by space), e.g. \"@teambit/** @my-org/ui/**\". The patterns should be in glob format. By default, all packages are selected.',\n },\n ];\n options = [\n [\n 'y',\n 'yes',\n 'automatically update all outdated versions for packages specified in pattern (all if no pattern supplied) - use carefully as could result in breaking updates for dependencies',\n ],\n ['', 'patch', 'update to the latest patch version. Semver rules are ignored'],\n ['', 'minor', 'update to the latest minor version. Semver rules are ignored'],\n ['', 'major', 'update to the latest major version. Semver rules are ignored'],\n ] as CommandOptions;\n\n constructor(private install: InstallMain) {}\n\n async report([patterns = []]: [string[]], options: UpdateCmdOptions) {\n let forceVersionBump: 'major' | 'minor' | 'patch' | undefined;\n if (options.major) {\n forceVersionBump = 'major';\n } else if (options.minor) {\n forceVersionBump = 'minor';\n } else if (options.patch) {\n forceVersionBump = 'patch';\n }\n await this.install.updateDependencies({\n all: options.yes === true,\n patterns,\n forceVersionBump,\n });\n return '';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAYe,MAAMA,SAAS,CAAoB;EAwBhDC,WAAWA,CAASC,OAAoB,EAAE;IAAA,KAAtBA,OAAoB,GAApBA,OAAoB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBAvBjC,8BAA8B;IAAA,IAAAD,gBAAA,GAAAC,OAAA,uBACvB,qBAAqB;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACzB,iEAAiE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACnE,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACJ,aAAa;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBACT,CACV;MACEC,IAAI,EAAE,qBAAqB;MAC3BC,WAAW,EACT;IACJ,CAAC,CACF;IAAA,IAAAH,gBAAA,GAAAC,OAAA,mBACS,CACR,CACE,GAAG,EACH,KAAK,EACL,gLAAgL,CACjL,EACD,CAAC,EAAE,EAAE,OAAO,EAAE,8DAA8D,CAAC,EAC7E,CAAC,EAAE,EAAE,OAAO,EAAE,8DAA8D,CAAC,EAC7E,CAAC,EAAE,EAAE,OAAO,EAAE,8DAA8D,CAAC,CAC9E;EAE0C;EAE3C,MAAMG,MAAMA,CAAC,CAACC,QAAQ,GAAG,EAAE,CAAa,EAAEC,OAAyB,EAAE;IACnE,IAAIC,gBAAyD;IAC7D,IAAID,OAAO,CAACE,KAAK,EAAE;MACjBD,gBAAgB,GAAG,OAAO;IAC5B,CAAC,MAAM,IAAID,OAAO,CAACG,KAAK,EAAE;MACxBF,gBAAgB,GAAG,OAAO;IAC5B,CAAC,MAAM,IAAID,OAAO,CAACI,KAAK,EAAE;MACxBH,gBAAgB,GAAG,OAAO;IAC5B;IACA,MAAM,IAAI,CAACR,OAAO,CAACY,kBAAkB,CAAC;MACpCC,GAAG,EAAEN,OAAO,CAACO,GAAG,KAAK,IAAI;MACzBR,QAAQ;MACRE;IACF,CAAC,CAAC;IACF,OAAO,EAAE;EACX;AACF;AAACO,OAAA,CAAAb,OAAA,GAAAJ,SAAA"}
package/install.cmd.tsx CHANGED
@@ -41,7 +41,7 @@ export default class InstallCmd implements Command {
41
41
  group = 'development';
42
42
  options = [
43
43
  ['t', 'type [lifecycleType]', '"runtime" (default) or "peer" (dev is not a valid option)'],
44
- ['u', 'update', 'update all dependencies'],
44
+ ['u', 'update', 'update all dependencies to latest version according to their semver range'],
45
45
  [
46
46
  '',
47
47
  'update-existing [updateExisting]',
@@ -78,11 +78,11 @@ export default class InstallCmd implements Command {
78
78
  const startTime = Date.now();
79
79
  if (!this.workspace) throw new OutsideWorkspaceError();
80
80
  if (packages.length && options.addMissingDeps) {
81
- throw new BitError('You can not use --add-missing-deps with a list of packages');
81
+ throw new BitError('cannot use --add-missing-deps with a list of packages');
82
82
  }
83
83
  if (options.updateExisting) {
84
84
  this.logger.consoleWarning(
85
- `--update-existing is deprecated, please omit it. "bit install" will update existing dependency by default`
85
+ `--update-existing is deprecated, please omit it. "bit install" will update existing dependencies by default`
86
86
  );
87
87
  }
88
88
  this.logger.console(`Resolving component dependencies for workspace: '${chalk.cyan(this.workspace.name)}'`);
@@ -137,7 +137,7 @@ function formatOutput({
137
137
  export function getAnotherInstallRequiredOutput(recurringInstall = false, oldNonLoadedEnvs: string[] = []): string {
138
138
  if (!oldNonLoadedEnvs.length) return '';
139
139
  const oldNonLoadedEnvsStr = oldNonLoadedEnvs.join(', ');
140
- const firstPart = `Bit is unable to install all dependencies. Please run "${chalk.cyan('bit install')}" again `;
140
+ const firstPart = `Bit was not able to install all dependencies. Please run "${chalk.cyan('bit install')}" again `;
141
141
  const flag = chalk.cyan(`--${recurringInstallFlagName}`);
142
142
  const suggestRecurringInstall = recurringInstall ? '' : `(or use the "${flag}" option next time).`;
143
143
  const envsStr = `The following environments need to add support for "dependency policy" to fix the warning: ${chalk.cyan(
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/install",
3
- "version": "0.0.217",
3
+ "version": "0.0.218",
4
4
  "homepage": "https://bit.cloud/teambit/workspace/install",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.workspace",
8
8
  "name": "install",
9
- "version": "0.0.217"
9
+ "version": "0.0.218"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -18,24 +18,33 @@
18
18
  "@pnpm/colorize-semver-diff": "1.0.1",
19
19
  "@pnpm/semver-diff": "1.1.0",
20
20
  "enquirer": "2.3.6",
21
- "semver": "7.5.2",
22
21
  "table": "5.4.6",
23
22
  "core-js": "^3.0.0",
24
23
  "@babel/runtime": "7.20.0",
25
24
  "@teambit/harmony": "0.4.6",
26
25
  "@teambit/bit-error": "0.0.402",
27
- "@teambit/bit-roots": "0.0.94",
26
+ "@teambit/cli": "0.0.760",
27
+ "@teambit/dependency-resolver": "0.0.1134",
28
+ "@teambit/logger": "0.0.853",
29
+ "@teambit/workspace": "0.0.1134",
30
+ "@teambit/application": "0.0.776",
31
+ "@teambit/bit-roots": "0.0.95",
32
+ "@teambit/compiler": "0.0.1134",
28
33
  "@teambit/component-issues": "0.0.95",
29
34
  "@teambit/component-package-version": "0.0.425",
35
+ "@teambit/component": "0.0.1134",
30
36
  "@teambit/dependencies.fs.linked-dependencies": "0.0.2",
31
- "@teambit/workspace.modules.node-modules-linker": "0.0.101",
37
+ "@teambit/envs": "0.0.1134",
38
+ "@teambit/ipc-events": "0.0.24",
39
+ "@teambit/issues": "0.0.442",
40
+ "@teambit/variants": "0.0.866",
41
+ "@teambit/workspace.modules.node-modules-linker": "0.0.102",
32
42
  "@teambit/toolbox.time.time-format": "0.0.490"
33
43
  },
34
44
  "devDependencies": {
35
45
  "@types/fs-extra": "9.0.7",
36
46
  "@types/lodash": "4.14.165",
37
47
  "@types/object-hash": "1.3.4",
38
- "@types/semver": "7.3.4",
39
48
  "@types/mocha": "9.1.0",
40
49
  "@types/node": "12.20.4",
41
50
  "@types/react": "^17.0.8",
@@ -44,7 +53,7 @@
44
53
  "@types/testing-library__jest-dom": "5.9.5"
45
54
  },
46
55
  "peerDependencies": {
47
- "@teambit/legacy": "1.0.542",
56
+ "@teambit/legacy": "1.0.544",
48
57
  "react": "^16.8.0 || ^17.0.0",
49
58
  "react-dom": "^16.8.0 || ^17.0.0"
50
59
  },
package/update.cmd.tsx CHANGED
@@ -20,11 +20,15 @@ export default class UpdateCmd implements Command {
20
20
  {
21
21
  name: 'package-patterns...',
22
22
  description:
23
- 'a list of package names, or patterns (separated by space). The patterns should be in glob format. By default, all packages are selected.',
23
+ 'a string list of package names, or patterns (separated by space), e.g. "@teambit/** @my-org/ui/**". The patterns should be in glob format. By default, all packages are selected.',
24
24
  },
25
25
  ];
26
26
  options = [
27
- ['y', 'yes', 'automatically update all outdated packages'],
27
+ [
28
+ 'y',
29
+ 'yes',
30
+ 'automatically update all outdated versions for packages specified in pattern (all if no pattern supplied) - use carefully as could result in breaking updates for dependencies',
31
+ ],
28
32
  ['', 'patch', 'update to the latest patch version. Semver rules are ignored'],
29
33
  ['', 'minor', 'update to the latest minor version. Semver rules are ignored'],
30
34
  ['', 'major', 'update to the latest major version. Semver rules are ignored'],