@teambit/install 1.0.141 → 1.0.143
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,7 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites>
|
3
|
-
<testsuite name="teambit.workspace/install@1.0.
|
4
|
-
<testcase classname="pick-outdated-pkgs.spec.js" name="should render choices in correct order" time="0.
|
5
|
-
<testcase classname="pick-outdated-pkgs.spec.js" name="should render choices with context information" time="0.003"/>
|
3
|
+
<testsuite name="teambit.workspace/install@1.0.143" tests="2" failures="0" errors="0" skipped="0">
|
4
|
+
<testcase classname="dist/pick-outdated-pkgs.spec.js" name="should render choices in correct order" time="0.167"/>
|
5
|
+
<testcase classname="dist/pick-outdated-pkgs.spec.js" name="should render choices with context information" time="0.003"/>
|
6
6
|
</testsuite>
|
7
7
|
</testsuites>
|
@@ -1,5 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
function _chai() {
|
4
|
+
const data = require("chai");
|
5
|
+
_chai = function () {
|
6
|
+
return data;
|
7
|
+
};
|
8
|
+
return data;
|
9
|
+
}
|
3
10
|
function _stripAnsi() {
|
4
11
|
const data = _interopRequireDefault(require("strip-ansi"));
|
5
12
|
_stripAnsi = function () {
|
@@ -53,7 +60,7 @@ describe('makeOutdatedPkgChoices', () => {
|
|
53
60
|
const stripped = stripAnsiFromChoices(choices);
|
54
61
|
// @ts-ignore
|
55
62
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
56
|
-
expect(stripped).
|
63
|
+
(0, _chai().expect)(stripped).to.deep.equal(orderedChoices);
|
57
64
|
});
|
58
65
|
it('should render choices with context information', () => {
|
59
66
|
const choices = (0, _pickOutdatedPkgs().makeOutdatedPkgChoices)([{
|
@@ -75,7 +82,7 @@ describe('makeOutdatedPkgChoices', () => {
|
|
75
82
|
const stripped = stripAnsiFromChoices(choices);
|
76
83
|
// @ts-ignore
|
77
84
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
78
|
-
expect(stripped).
|
85
|
+
(0, _chai().expect)(stripped).to.deep.equal(contextOrders);
|
79
86
|
});
|
80
87
|
});
|
81
88
|
function stripAnsiFromChoices(choices) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["_chai","data","require","_stripAnsi","_interopRequireDefault","_component","_pickOutdatedPkgs","obj","__esModule","default","describe","it","choices","makeOutdatedPkgChoices","name","currentRange","latestRange","source","targetField","stripped","stripAnsiFromChoices","expect","to","deep","equal","orderedChoices","componentId","ComponentID","fromString","variantPattern","contextOrders","forEach","choice","message","stripAnsi","currChoice","value"],"sources":["pick-outdated-pkgs.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport 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).to.deep.equal(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).to.deep.equal(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,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,UAAA,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,kBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,iBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8D,SAAAG,uBAAAG,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;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AAMH,aAAa,GAAG,CACpB;EACElB,OAAO,EAAE,CACP;IACEqB,OAAO,EAAE,gCAAgC;IACzCnB,IAAI,EAAE,KAAK;IACXsB,KAAK,EAAE;MACLV,WAAW,EAAEC,wBAAW,CAACC,UAAU,CAAC,aAAa,CAAC;MAClDb,YAAY,EAAE,OAAO;MACrBC,WAAW,EAAE,OAAO;MACpBF,IAAI,EAAE,KAAK;MACXG,MAAM,EAAE,WAAW;MACnBC,WAAW,EAAE;IACf;EACF,CAAC,CACF;EACDe,OAAO,EAAE;AACX,CAAC,EACD;EACErB,OAAO,EAAE,CACP;IACEqB,OAAO,EAAE,gCAAgC;IACzCnB,IAAI,EAAE,KAAK;IACXsB,KAAK,EAAE;MACLrB,YAAY,EAAE,OAAO;MACrBC,WAAW,EAAE,OAAO;MACpBF,IAAI,EAAE,KAAK;MACXG,MAAM,EAAE,UAAU;MAClBC,WAAW,EAAE,kBAAkB;MAC/BW,cAAc,EAAE;IAClB;EACF,CAAC,CACF;EACDI,OAAO,EAAE;AACX,CAAC,CACF"}
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/install",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.143",
|
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.
|
9
|
+
"version": "1.0.143"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -22,34 +22,34 @@
|
|
22
22
|
"@teambit/harmony": "0.4.6",
|
23
23
|
"@teambit/bit-roots": "0.0.133",
|
24
24
|
"@teambit/bit-error": "0.0.404",
|
25
|
-
"@teambit/cli": "0.0.
|
26
|
-
"@teambit/dependency-resolver": "1.0.
|
27
|
-
"@teambit/logger": "0.0.
|
28
|
-
"@teambit/workspace": "1.0.
|
29
|
-
"@teambit/application": "1.0.
|
30
|
-
"@teambit/compiler": "1.0.
|
31
|
-
"@teambit/component-issues": "0.0.
|
25
|
+
"@teambit/cli": "0.0.849",
|
26
|
+
"@teambit/dependency-resolver": "1.0.143",
|
27
|
+
"@teambit/logger": "0.0.942",
|
28
|
+
"@teambit/workspace": "1.0.143",
|
29
|
+
"@teambit/application": "1.0.143",
|
30
|
+
"@teambit/compiler": "1.0.143",
|
31
|
+
"@teambit/component-issues": "0.0.141",
|
32
32
|
"@teambit/component-package-version": "0.0.433",
|
33
|
-
"@teambit/component": "1.0.
|
33
|
+
"@teambit/component": "1.0.143",
|
34
34
|
"@teambit/dependencies.fs.linked-dependencies": "0.0.8",
|
35
|
-
"@teambit/envs": "1.0.
|
36
|
-
"@teambit/generator": "1.0.
|
37
|
-
"@teambit/ipc-events": "1.0.
|
38
|
-
"@teambit/issues": "1.0.
|
39
|
-
"@teambit/variants": "0.0.
|
40
|
-
"@teambit/workspace-config-files": "1.0.
|
41
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
35
|
+
"@teambit/envs": "1.0.143",
|
36
|
+
"@teambit/generator": "1.0.144",
|
37
|
+
"@teambit/ipc-events": "1.0.143",
|
38
|
+
"@teambit/issues": "1.0.143",
|
39
|
+
"@teambit/variants": "0.0.987",
|
40
|
+
"@teambit/workspace-config-files": "1.0.143",
|
41
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.163",
|
42
42
|
"@teambit/toolbox.time.time-format": "0.0.496"
|
43
43
|
},
|
44
44
|
"devDependencies": {
|
45
45
|
"@types/fs-extra": "9.0.7",
|
46
46
|
"@types/lodash": "4.14.165",
|
47
47
|
"@types/object-hash": "1.3.4",
|
48
|
+
"@types/chai": "4.2.15",
|
49
|
+
"chai": "4.3.0",
|
48
50
|
"strip-ansi": "6.0.0",
|
49
51
|
"@types/mocha": "9.1.0",
|
50
|
-
"@
|
51
|
-
"@types/testing-library__jest-dom": "^5.9.5",
|
52
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.19"
|
52
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.24"
|
53
53
|
},
|
54
54
|
"peerDependencies": {
|
55
55
|
"@teambit/legacy": "1.0.624"
|
@@ -66,7 +66,8 @@
|
|
66
66
|
"default": "./dist/index.js"
|
67
67
|
},
|
68
68
|
"./dist/*": "./dist/*",
|
69
|
-
"./artifacts/*": "./artifacts/*"
|
69
|
+
"./artifacts/*": "./artifacts/*",
|
70
|
+
"./*": "./*.ts"
|
70
71
|
},
|
71
72
|
"private": false,
|
72
73
|
"engines": {
|
package/tsconfig.json
CHANGED
@@ -17,7 +17,10 @@
|
|
17
17
|
"resolveJsonModule": true,
|
18
18
|
"allowJs": true,
|
19
19
|
"outDir": "dist",
|
20
|
-
"emitDeclarationOnly": true
|
20
|
+
"emitDeclarationOnly": true,
|
21
|
+
"strict": true,
|
22
|
+
"strictPropertyInitialization": false,
|
23
|
+
"noImplicitAny": false
|
21
24
|
},
|
22
25
|
"exclude": [
|
23
26
|
"artifacts",
|
File without changes
|