@teambit/install 1.0.107 → 1.0.109

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 _stripAnsi() {
4
+ const data = _interopRequireDefault(require("strip-ansi"));
5
+ _stripAnsi = function () {
6
+ return data;
7
+ };
8
+ return data;
9
+ }
3
10
  function _component() {
4
11
  const data = require("@teambit/component");
5
12
  _component = function () {
@@ -14,6 +21,7 @@ function _pickOutdatedPkgs() {
14
21
  };
15
22
  return data;
16
23
  }
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
25
  describe('makeOutdatedPkgChoices', () => {
18
26
  it('should render choices in correct order', () => {
19
27
  const choices = (0, _pickOutdatedPkgs().makeOutdatedPkgChoices)([{
@@ -41,8 +49,11 @@ describe('makeOutdatedPkgChoices', () => {
41
49
  source: 'rootPolicy',
42
50
  targetField: 'peerDependencies'
43
51
  }]);
52
+ // Removing the ansi chars for better work on bit build on ci
53
+ const stripped = stripAnsiFromChoices(choices);
44
54
  // @ts-ignore
45
- expect(choices).toMatchSnapshot();
55
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
56
+ expect(stripped).toMatchObject(orderedChoices);
46
57
  });
47
58
  it('should render choices with context information', () => {
48
59
  const choices = (0, _pickOutdatedPkgs().makeOutdatedPkgChoices)([{
@@ -60,9 +71,94 @@ describe('makeOutdatedPkgChoices', () => {
60
71
  variantPattern: '{comp2}',
61
72
  targetField: 'peerDependencies'
62
73
  }]);
74
+ // Removing the ansi chars for better work on bit build on ci
75
+ const stripped = stripAnsiFromChoices(choices);
63
76
  // @ts-ignore
64
- expect(choices).toMatchSnapshot();
77
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
78
+ expect(stripped).toMatchObject(contextOrders);
65
79
  });
66
80
  });
81
+ function stripAnsiFromChoices(choices) {
82
+ choices.forEach(choice => {
83
+ choice.message = (0, _stripAnsi().default)(choice.message);
84
+ choice.choices.forEach(currChoice => {
85
+ currChoice.message = (0, _stripAnsi().default)(currChoice.message);
86
+ });
87
+ });
88
+ return choices;
89
+ }
90
+ const orderedChoices = [{
91
+ choices: [{
92
+ message: 'foo (runtime) 1.0.0 ❯ 2.0.0 ',
93
+ name: 'foo',
94
+ value: {
95
+ currentRange: '1.0.0',
96
+ latestRange: '2.0.0',
97
+ name: 'foo',
98
+ source: 'rootPolicy',
99
+ targetField: 'dependencies'
100
+ }
101
+ }, {
102
+ message: 'qar (runtime) 1.0.0 ❯ 1.1.0 ',
103
+ name: 'qar',
104
+ value: {
105
+ currentRange: '1.0.0',
106
+ latestRange: '1.1.0',
107
+ name: 'qar',
108
+ source: 'rootPolicy',
109
+ targetField: 'dependencies'
110
+ }
111
+ }, {
112
+ message: 'zoo (dev) 1.0.0 ❯ 1.1.0 ',
113
+ name: 'zoo',
114
+ value: {
115
+ currentRange: '1.0.0',
116
+ latestRange: '1.1.0',
117
+ name: 'zoo',
118
+ source: 'rootPolicy',
119
+ targetField: 'devDependencies'
120
+ }
121
+ }, {
122
+ message: 'bar (peer) 1.0.0 ❯ 1.1.0 ',
123
+ name: 'bar',
124
+ value: {
125
+ currentRange: '1.0.0',
126
+ latestRange: '1.1.0',
127
+ name: 'bar',
128
+ source: 'rootPolicy',
129
+ targetField: 'peerDependencies'
130
+ }
131
+ }],
132
+ message: 'Root policies'
133
+ }];
134
+ const contextOrders = [{
135
+ choices: [{
136
+ message: 'foo (runtime) 1.0.0 ❯ 2.0.0 ',
137
+ name: 'foo',
138
+ value: {
139
+ componentId: _component().ComponentID.fromString('scope/comp1'),
140
+ currentRange: '1.0.0',
141
+ latestRange: '2.0.0',
142
+ name: 'foo',
143
+ source: 'component',
144
+ targetField: 'dependencies'
145
+ }
146
+ }],
147
+ message: 'scope/comp1 (component)'
148
+ }, {
149
+ choices: [{
150
+ message: 'bar (peer) 1.0.0 ❯ 1.1.0 ',
151
+ name: 'bar',
152
+ value: {
153
+ currentRange: '1.0.0',
154
+ latestRange: '1.1.0',
155
+ name: 'bar',
156
+ source: 'variants',
157
+ targetField: 'peerDependencies',
158
+ variantPattern: '{comp2}'
159
+ }
160
+ }],
161
+ message: '{comp2} (variant)'
162
+ }];
67
163
 
68
164
  //# sourceMappingURL=pick-outdated-pkgs.spec.js.map
@@ -1 +1 @@
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});\n"],"mappings":";;AAAA,SAAAA,WAAA;E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Aa,CAAC;MAClDL,WAAW,EAAE;IACf,CAAC,EACD;MACEJ,IAAI,EAAE,KAAK;MACXC,YAAY,EAAE,OAAO;MACrBC,WAAW,EAAE,OAAO;MACpBC,MAAM,EAAE,UAAU;MAClBO,cAAc,EAAE,SAAS;MACzBN,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":["_stripAnsi","data","_interopRequireDefault","require","_component","_pickOutdatedPkgs","obj","__esModule","default","describe","it","choices","makeOutdatedPkgChoices","name","currentRange","latestRange","source","targetField","stripped","stripAnsiFromChoices","expect","toMatchObject","orderedChoices","componentId","ComponentID","fromString","variantPattern","contextOrders","forEach","choice","message","stripAnsi","currChoice","value"],"sources":["pick-outdated-pkgs.spec.ts"],"sourcesContent":["import stripAnsi from 'strip-ansi';\nimport { 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 // Removing the ansi chars for better work on bit build on ci\n const stripped = stripAnsiFromChoices(choices);\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n expect(stripped).toMatchObject(orderedChoices);\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 // Removing the ansi chars for better work on bit build on ci\n const stripped = stripAnsiFromChoices(choices);\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n expect(stripped).toMatchObject(contextOrders);\n });\n});\n\nfunction stripAnsiFromChoices(choices) {\n choices.forEach((choice) => {\n choice.message = stripAnsi(choice.message);\n choice.choices.forEach((currChoice) => {\n currChoice.message = stripAnsi(currChoice.message);\n });\n });\n return choices;\n}\n\nconst orderedChoices = [\n {\n choices: [\n {\n message: 'foo (runtime) 1.0.0 ❯ 2.0.0 ',\n name: 'foo',\n value: {\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n name: 'foo',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n },\n {\n message: 'qar (runtime) 1.0.0 ❯ 1.1.0 ',\n name: 'qar',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'qar',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n },\n {\n message: 'zoo (dev) 1.0.0 ❯ 1.1.0 ',\n name: 'zoo',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'zoo',\n source: 'rootPolicy',\n targetField: 'devDependencies',\n },\n },\n {\n message: 'bar (peer) 1.0.0 ❯ 1.1.0 ',\n name: 'bar',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'bar',\n source: 'rootPolicy',\n targetField: 'peerDependencies',\n },\n },\n ],\n message: 'Root policies',\n },\n];\n\nconst contextOrders = [\n {\n choices: [\n {\n message: 'foo (runtime) 1.0.0 ❯ 2.0.0 ',\n name: 'foo',\n value: {\n componentId: ComponentID.fromString('scope/comp1'),\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n name: 'foo',\n source: 'component',\n targetField: 'dependencies',\n },\n },\n ],\n message: 'scope/comp1 (component)',\n },\n {\n choices: [\n {\n message: 'bar (peer) 1.0.0 ❯ 1.1.0 ',\n name: 'bar',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'bar',\n source: 'variants',\n targetField: 'peerDependencies',\n variantPattern: '{comp2}',\n },\n },\n ],\n message: '{comp2} (variant)',\n },\n];\n"],"mappings":";;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8D,SAAAC,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9DG,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACvCC,EAAE,CAAC,wCAAwC,EAAE,MAAM;IACjD,MAAMC,OAAO,GAAG,IAAAC,0CAAsB,EAAC,CACrC;MACEC,IAAI,EAAE,KAAK;MACXC,YAAY,EAAE,OAAO;MACrBC,WAAW,EAAE,OAAO;MACpBC,MAAM,EAAE,YAAY;MACpBC,WAAW,EAAE;IACf,CAAC,EACD;MACEJ,IAAI,EAAE,KAAK;MACXC,YAAY,EAAE,OAAO;MACrBC,WAAW,EAAE,OAAO;MACpBC,MAAM,EAAE,YAAY;MACpBC,WAAW,EAAE;IACf,CA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AAK,EAAE;MACLV,WAAW,EAAEC,wBAAW,CAACC,UAAU,CAAC,aAAa,CAAC;MAClDX,YAAY,EAAE,OAAO;MACrBC,WAAW,EAAE,OAAO;MACpBF,IAAI,EAAE,KAAK;MACXG,MAAM,EAAE,WAAW;MACnBC,WAAW,EAAE;IACf;EACF,CAAC,CACF;EACDa,OAAO,EAAE;AACX,CAAC,EACD;EACEnB,OAAO,EAAE,CACP;IACEmB,OAAO,EAAE,gCAAgC;IACzCjB,IAAI,EAAE,KAAK;IACXoB,KAAK,EAAE;MACLnB,YAAY,EAAE,OAAO;MACrBC,WAAW,EAAE,OAAO;MACpBF,IAAI,EAAE,KAAK;MACXG,MAAM,EAAE,UAAU;MAClBC,WAAW,EAAE,kBAAkB;MAC/BS,cAAc,EAAE;IAClB;EACF,CAAC,CACF;EACDI,OAAO,EAAE;AACX,CAAC,CACF"}
@@ -1,6 +1,6 @@
1
1
  import { Command, CommandOptions } from '@teambit/cli';
2
2
  import { InstallMain } from './install.main.runtime';
3
- declare type UpdateCmdOptions = {
3
+ type UpdateCmdOptions = {
4
4
  yes?: boolean;
5
5
  patterns?: string[];
6
6
  major?: boolean;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/install",
3
- "version": "1.0.107",
3
+ "version": "1.0.109",
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": "1.0.107"
9
+ "version": "1.0.109"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -19,45 +19,40 @@
19
19
  "@pnpm/semver-diff": "1.1.0",
20
20
  "enquirer": "2.3.6",
21
21
  "table": "5.4.6",
22
- "core-js": "^3.0.0",
23
- "@babel/runtime": "7.20.0",
24
22
  "@teambit/harmony": "0.4.6",
25
23
  "@teambit/bit-roots": "0.0.133",
26
24
  "@teambit/bit-error": "0.0.404",
27
- "@teambit/cli": "0.0.839",
28
- "@teambit/dependency-resolver": "1.0.107",
29
- "@teambit/logger": "0.0.932",
30
- "@teambit/workspace": "1.0.107",
31
- "@teambit/application": "1.0.107",
32
- "@teambit/compiler": "1.0.107",
33
- "@teambit/component-issues": "0.0.137",
34
- "@teambit/component-package-version": "0.0.430",
35
- "@teambit/component": "1.0.107",
25
+ "@teambit/cli": "0.0.841",
26
+ "@teambit/dependency-resolver": "1.0.109",
27
+ "@teambit/logger": "0.0.934",
28
+ "@teambit/workspace": "1.0.109",
29
+ "@teambit/application": "1.0.109",
30
+ "@teambit/compiler": "1.0.109",
31
+ "@teambit/component-issues": "0.0.138",
32
+ "@teambit/component-package-version": "0.0.431",
33
+ "@teambit/component": "1.0.109",
36
34
  "@teambit/dependencies.fs.linked-dependencies": "0.0.6",
37
- "@teambit/envs": "1.0.107",
38
- "@teambit/generator": "1.0.108",
39
- "@teambit/ipc-events": "1.0.107",
40
- "@teambit/issues": "1.0.107",
41
- "@teambit/variants": "0.0.951",
42
- "@teambit/workspace-config-files": "1.0.107",
43
- "@teambit/workspace.modules.node-modules-linker": "0.0.157",
35
+ "@teambit/envs": "1.0.109",
36
+ "@teambit/generator": "1.0.110",
37
+ "@teambit/ipc-events": "1.0.109",
38
+ "@teambit/issues": "1.0.109",
39
+ "@teambit/variants": "0.0.953",
40
+ "@teambit/workspace-config-files": "1.0.109",
41
+ "@teambit/workspace.modules.node-modules-linker": "0.0.159",
44
42
  "@teambit/toolbox.time.time-format": "0.0.494"
45
43
  },
46
44
  "devDependencies": {
47
45
  "@types/fs-extra": "9.0.7",
48
46
  "@types/lodash": "4.14.165",
49
47
  "@types/object-hash": "1.3.4",
48
+ "strip-ansi": "6.0.0",
50
49
  "@types/mocha": "9.1.0",
51
- "@types/node": "12.20.4",
52
- "@types/react": "^17.0.8",
53
- "@types/react-dom": "^17.0.5",
54
- "@types/jest": "^26.0.0",
55
- "@types/testing-library__jest-dom": "5.9.5"
50
+ "@types/jest": "^29.2.2",
51
+ "@types/testing-library__jest-dom": "^5.9.5",
52
+ "@teambit/harmony.envs.core-aspect-env": "0.0.14"
56
53
  },
57
54
  "peerDependencies": {
58
- "@teambit/legacy": "1.0.624",
59
- "react": "^16.8.0 || ^17.0.0",
60
- "react-dom": "^16.8.0 || ^17.0.0"
55
+ "@teambit/legacy": "1.0.624"
61
56
  },
62
57
  "license": "Apache-2.0",
63
58
  "optionalDependencies": {},
@@ -71,7 +66,7 @@
71
66
  },
72
67
  "private": false,
73
68
  "engines": {
74
- "node": ">=12.22.0"
69
+ "node": ">=16.0.0"
75
70
  },
76
71
  "repository": {
77
72
  "type": "git",
@@ -80,12 +75,9 @@
80
75
  "keywords": [
81
76
  "bit",
82
77
  "bit-aspect",
78
+ "bit-core-aspect",
83
79
  "components",
84
80
  "collaboration",
85
- "web",
86
- "react",
87
- "react-components",
88
- "angular",
89
- "angular-components"
81
+ "web"
90
82
  ]
91
83
  }
package/tsconfig.json CHANGED
@@ -1,38 +1,33 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "lib": [
4
- "es2019",
5
- "DOM",
6
- "ES6",
7
- "DOM.Iterable",
8
- "ScriptHost"
4
+ "esnext",
5
+ "dom",
6
+ "dom.Iterable"
9
7
  ],
10
- "target": "es2015",
11
- "module": "CommonJS",
12
- "jsx": "react",
13
- "allowJs": true,
14
- "composite": true,
8
+ "target": "es2020",
9
+ "module": "es2020",
10
+ "jsx": "react-jsx",
15
11
  "declaration": true,
16
12
  "sourceMap": true,
17
- "skipLibCheck": true,
18
13
  "experimentalDecorators": true,
19
- "outDir": "dist",
14
+ "skipLibCheck": true,
20
15
  "moduleResolution": "node",
21
16
  "esModuleInterop": true,
22
- "rootDir": ".",
23
17
  "resolveJsonModule": true,
24
- "emitDeclarationOnly": true,
25
- "emitDecoratorMetadata": true,
26
- "allowSyntheticDefaultImports": true,
27
- "strictPropertyInitialization": false,
28
- "strict": true,
29
- "noImplicitAny": false,
30
- "preserveConstEnums": true
18
+ "allowJs": true,
19
+ "outDir": "dist",
20
+ "emitDeclarationOnly": true
31
21
  },
32
22
  "exclude": [
23
+ "artifacts",
24
+ "public",
33
25
  "dist",
26
+ "node_modules",
27
+ "package.json",
34
28
  "esm.mjs",
35
- "package.json"
29
+ "**/*.cjs",
30
+ "./dist"
36
31
  ],
37
32
  "include": [
38
33
  "**/*",
package/types/asset.d.ts CHANGED
@@ -5,12 +5,12 @@ declare module '*.png' {
5
5
  declare module '*.svg' {
6
6
  import type { FunctionComponent, SVGProps } from 'react';
7
7
 
8
- export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
8
+ export const ReactComponent: FunctionComponent<
9
+ SVGProps<SVGSVGElement> & { title?: string }
10
+ >;
9
11
  const src: string;
10
12
  export default src;
11
13
  }
12
-
13
- // @TODO Gilad
14
14
  declare module '*.jpg' {
15
15
  const value: any;
16
16
  export = value;
@@ -27,3 +27,15 @@ declare module '*.bmp' {
27
27
  const value: any;
28
28
  export = value;
29
29
  }
30
+ declare module '*.otf' {
31
+ const value: any;
32
+ export = value;
33
+ }
34
+ declare module '*.woff' {
35
+ const value: any;
36
+ export = value;
37
+ }
38
+ declare module '*.woff2' {
39
+ const value: any;
40
+ export = value;
41
+ }
@@ -1,102 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`makeOutdatedPkgChoices should render choices in correct order 1`] = `
4
- Array [
5
- Object {
6
- "choices": Array [
7
- Object {
8
- "message": "foo (runtime) 1.0.0 ❯ 2.0.0 ",
9
- "name": "foo",
10
- "value": Object {
11
- "currentRange": "1.0.0",
12
- "latestRange": "2.0.0",
13
- "name": "foo",
14
- "source": "rootPolicy",
15
- "targetField": "dependencies",
16
- },
17
- },
18
- Object {
19
- "message": "qar (runtime) 1.0.0 ❯ 1.1.0 ",
20
- "name": "qar",
21
- "value": Object {
22
- "currentRange": "1.0.0",
23
- "latestRange": "1.1.0",
24
- "name": "qar",
25
- "source": "rootPolicy",
26
- "targetField": "dependencies",
27
- },
28
- },
29
- Object {
30
- "message": "zoo (dev) 1.0.0 ❯ 1.1.0 ",
31
- "name": "zoo",
32
- "value": Object {
33
- "currentRange": "1.0.0",
34
- "latestRange": "1.1.0",
35
- "name": "zoo",
36
- "source": "rootPolicy",
37
- "targetField": "devDependencies",
38
- },
39
- },
40
- Object {
41
- "message": "bar (peer) 1.0.0 ❯ 1.1.0 ",
42
- "name": "bar",
43
- "value": Object {
44
- "currentRange": "1.0.0",
45
- "latestRange": "1.1.0",
46
- "name": "bar",
47
- "source": "rootPolicy",
48
- "targetField": "peerDependencies",
49
- },
50
- },
51
- ],
52
- "message": "Root policies",
53
- },
54
- ]
55
- `;
56
-
57
- exports[`makeOutdatedPkgChoices should render choices with context information 1`] = `
58
- Array [
59
- Object {
60
- "choices": Array [
61
- Object {
62
- "message": "foo (runtime) 1.0.0 ❯ 2.0.0 ",
63
- "name": "foo",
64
- "value": Object {
65
- "componentId": ComponentID {
66
- "_legacy": BitId {
67
- "box": undefined,
68
- "name": "comp1",
69
- "scope": "scope",
70
- "version": "latest",
71
- },
72
- "_scope": undefined,
73
- },
74
- "currentRange": "1.0.0",
75
- "latestRange": "2.0.0",
76
- "name": "foo",
77
- "source": "component",
78
- "targetField": "dependencies",
79
- },
80
- },
81
- ],
82
- "message": "scope/comp1 (component)",
83
- },
84
- Object {
85
- "choices": Array [
86
- Object {
87
- "message": "bar (peer) 1.0.0 ❯ 1.1.0 ",
88
- "name": "bar",
89
- "value": Object {
90
- "currentRange": "1.0.0",
91
- "latestRange": "1.1.0",
92
- "name": "bar",
93
- "source": "variants",
94
- "targetField": "peerDependencies",
95
- "variantPattern": "{comp2}",
96
- },
97
- },
98
- ],
99
- "message": "{comp2} (variant)",
100
- },
101
- ]
102
- `;
@@ -1,102 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`makeOutdatedPkgChoices should render choices in correct order 1`] = `
4
- Array [
5
- Object {
6
- "choices": Array [
7
- Object {
8
- "message": "foo (runtime) 1.0.0 ❯ 2.0.0 ",
9
- "name": "foo",
10
- "value": Object {
11
- "currentRange": "1.0.0",
12
- "latestRange": "2.0.0",
13
- "name": "foo",
14
- "source": "rootPolicy",
15
- "targetField": "dependencies",
16
- },
17
- },
18
- Object {
19
- "message": "qar (runtime) 1.0.0 ❯ 1.1.0 ",
20
- "name": "qar",
21
- "value": Object {
22
- "currentRange": "1.0.0",
23
- "latestRange": "1.1.0",
24
- "name": "qar",
25
- "source": "rootPolicy",
26
- "targetField": "dependencies",
27
- },
28
- },
29
- Object {
30
- "message": "zoo (dev) 1.0.0 ❯ 1.1.0 ",
31
- "name": "zoo",
32
- "value": Object {
33
- "currentRange": "1.0.0",
34
- "latestRange": "1.1.0",
35
- "name": "zoo",
36
- "source": "rootPolicy",
37
- "targetField": "devDependencies",
38
- },
39
- },
40
- Object {
41
- "message": "bar (peer) 1.0.0 ❯ 1.1.0 ",
42
- "name": "bar",
43
- "value": Object {
44
- "currentRange": "1.0.0",
45
- "latestRange": "1.1.0",
46
- "name": "bar",
47
- "source": "rootPolicy",
48
- "targetField": "peerDependencies",
49
- },
50
- },
51
- ],
52
- "message": "Root policies",
53
- },
54
- ]
55
- `;
56
-
57
- exports[`makeOutdatedPkgChoices should render choices with context information 1`] = `
58
- Array [
59
- Object {
60
- "choices": Array [
61
- Object {
62
- "message": "foo (runtime) 1.0.0 ❯ 2.0.0 ",
63
- "name": "foo",
64
- "value": Object {
65
- "componentId": ComponentID {
66
- "_legacy": BitId {
67
- "box": undefined,
68
- "name": "comp1",
69
- "scope": "scope",
70
- "version": "latest",
71
- },
72
- "_scope": undefined,
73
- },
74
- "currentRange": "1.0.0",
75
- "latestRange": "2.0.0",
76
- "name": "foo",
77
- "source": "component",
78
- "targetField": "dependencies",
79
- },
80
- },
81
- ],
82
- "message": "scope/comp1 (component)",
83
- },
84
- Object {
85
- "choices": Array [
86
- Object {
87
- "message": "bar (peer) 1.0.0 ❯ 1.1.0 ",
88
- "name": "bar",
89
- "value": Object {
90
- "currentRange": "1.0.0",
91
- "latestRange": "1.1.0",
92
- "name": "bar",
93
- "source": "variants",
94
- "targetField": "peerDependencies",
95
- "variantPattern": "{comp2}",
96
- },
97
- },
98
- ],
99
- "message": "{comp2} (variant)",
100
- },
101
- ]
102
- `;
@@ -1,102 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`makeOutdatedPkgChoices should render choices in correct order 1`] = `
4
- Array [
5
- Object {
6
- "choices": Array [
7
- Object {
8
- "message": "foo (runtime) 1.0.0 ❯ 2.0.0 ",
9
- "name": "foo",
10
- "value": Object {
11
- "currentRange": "1.0.0",
12
- "latestRange": "2.0.0",
13
- "name": "foo",
14
- "source": "rootPolicy",
15
- "targetField": "dependencies",
16
- },
17
- },
18
- Object {
19
- "message": "qar (runtime) 1.0.0 ❯ 1.1.0 ",
20
- "name": "qar",
21
- "value": Object {
22
- "currentRange": "1.0.0",
23
- "latestRange": "1.1.0",
24
- "name": "qar",
25
- "source": "rootPolicy",
26
- "targetField": "dependencies",
27
- },
28
- },
29
- Object {
30
- "message": "zoo (dev) 1.0.0 ❯ 1.1.0 ",
31
- "name": "zoo",
32
- "value": Object {
33
- "currentRange": "1.0.0",
34
- "latestRange": "1.1.0",
35
- "name": "zoo",
36
- "source": "rootPolicy",
37
- "targetField": "devDependencies",
38
- },
39
- },
40
- Object {
41
- "message": "bar (peer) 1.0.0 ❯ 1.1.0 ",
42
- "name": "bar",
43
- "value": Object {
44
- "currentRange": "1.0.0",
45
- "latestRange": "1.1.0",
46
- "name": "bar",
47
- "source": "rootPolicy",
48
- "targetField": "peerDependencies",
49
- },
50
- },
51
- ],
52
- "message": "Root policies",
53
- },
54
- ]
55
- `;
56
-
57
- exports[`makeOutdatedPkgChoices should render choices with context information 1`] = `
58
- Array [
59
- Object {
60
- "choices": Array [
61
- Object {
62
- "message": "foo (runtime) 1.0.0 ❯ 2.0.0 ",
63
- "name": "foo",
64
- "value": Object {
65
- "componentId": ComponentID {
66
- "_legacy": BitId {
67
- "box": undefined,
68
- "name": "comp1",
69
- "scope": "scope",
70
- "version": "latest",
71
- },
72
- "_scope": undefined,
73
- },
74
- "currentRange": "1.0.0",
75
- "latestRange": "2.0.0",
76
- "name": "foo",
77
- "source": "component",
78
- "targetField": "dependencies",
79
- },
80
- },
81
- ],
82
- "message": "scope/comp1 (component)",
83
- },
84
- Object {
85
- "choices": Array [
86
- Object {
87
- "message": "bar (peer) 1.0.0 ❯ 1.1.0 ",
88
- "name": "bar",
89
- "value": Object {
90
- "currentRange": "1.0.0",
91
- "latestRange": "1.1.0",
92
- "name": "bar",
93
- "source": "variants",
94
- "targetField": "peerDependencies",
95
- "variantPattern": "{comp2}",
96
- },
97
- },
98
- ],
99
- "message": "{comp2} (variant)",
100
- },
101
- ]
102
- `;