@teambit/lister 1.0.699 → 1.0.702
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/dist/list-template.js
CHANGED
|
@@ -33,7 +33,6 @@ function listTemplate(listScopeResults, json, showRemoteVersion) {
|
|
|
33
33
|
if (!json && showRemoteVersion) {
|
|
34
34
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
35
35
|
const color = listScopeResult.remoteVersion && _semver().default.gt(listScopeResult.remoteVersion, version) ? 'red' : null;
|
|
36
|
-
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
37
36
|
version = color ? _chalk().default[color](version) : version;
|
|
38
37
|
}
|
|
39
38
|
const getFormattedId = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_semver","_cliTable","e","__esModule","default","listTemplate","listScopeResults","json","showRemoteVersion","tabulateComponent","listScopeResult","id","toStringWithoutVersion","version","hasVersion","color","remoteVersion","semver","gt","c","getFormattedId","deprecated","laneReadmeOf","removed","formattedId","white","yellow","red","length","forEach","laneName","localVersion","currentVersion","currentlyUsedVersion","toJsonComponent","map","rows","head","push","table","Table","style","row","Object","values","toString"],"sources":["list-template.ts"],"sourcesContent":["import c from 'chalk';\nimport semver from 'semver';\nimport Table from 'cli-table';\nimport type { ListScopeResult } from './lister.main.runtime';\n\ntype Row = { id: string; localVersion: string; currentVersion: string; remoteVersion?: string };\n\nexport function listTemplate(listScopeResults: ListScopeResult[], json: boolean, showRemoteVersion: boolean) {\n function tabulateComponent(listScopeResult: ListScopeResult): Row {\n const id = listScopeResult.id.toStringWithoutVersion();\n let version = listScopeResult.id.hasVersion() ? (listScopeResult.id.version as string) : '<new>';\n if (!json && showRemoteVersion) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const color = listScopeResult.remoteVersion && semver.gt(listScopeResult.remoteVersion, version!) ? 'red' : null;\n
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_semver","_cliTable","e","__esModule","default","listTemplate","listScopeResults","json","showRemoteVersion","tabulateComponent","listScopeResult","id","toStringWithoutVersion","version","hasVersion","color","remoteVersion","semver","gt","c","getFormattedId","deprecated","laneReadmeOf","removed","formattedId","white","yellow","red","length","forEach","laneName","localVersion","currentVersion","currentlyUsedVersion","toJsonComponent","map","rows","head","push","table","Table","style","row","Object","values","toString"],"sources":["list-template.ts"],"sourcesContent":["import c from 'chalk';\nimport semver from 'semver';\nimport Table from 'cli-table';\nimport type { ListScopeResult } from './lister.main.runtime';\n\ntype Row = { id: string; localVersion: string; currentVersion: string; remoteVersion?: string };\n\nexport function listTemplate(listScopeResults: ListScopeResult[], json: boolean, showRemoteVersion: boolean) {\n function tabulateComponent(listScopeResult: ListScopeResult): Row {\n const id = listScopeResult.id.toStringWithoutVersion();\n let version = listScopeResult.id.hasVersion() ? (listScopeResult.id.version as string) : '<new>';\n if (!json && showRemoteVersion) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const color = listScopeResult.remoteVersion && semver.gt(listScopeResult.remoteVersion, version!) ? 'red' : null;\n version = color ? c[color](version) : version;\n }\n const getFormattedId = () => {\n const { deprecated, laneReadmeOf, removed } = listScopeResult;\n let formattedId = c.white(`${id}`);\n if (deprecated) {\n formattedId = c.yellow(`${formattedId} [Deprecated]`);\n }\n if (removed) {\n formattedId = c.red(`${formattedId} [Deleted]`);\n }\n if (laneReadmeOf && laneReadmeOf.length > 0) {\n formattedId = `${formattedId}\\n`;\n laneReadmeOf.forEach((laneName) => {\n formattedId = `${formattedId}${c.yellow(`[Lane Readme]: ${laneName}\\n`)}`;\n });\n }\n return formattedId;\n };\n\n const data: Row = {\n id: getFormattedId(),\n localVersion: version,\n currentVersion: listScopeResult.currentlyUsedVersion || 'N/A',\n };\n\n if (showRemoteVersion) {\n let remoteVersion = listScopeResult.remoteVersion || 'N/A';\n const color =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n listScopeResult.remoteVersion && semver.gt(listScopeResult.id.version!, listScopeResult.remoteVersion)\n ? 'red'\n : null;\n remoteVersion = color ? c[color](remoteVersion) : remoteVersion;\n data.remoteVersion = remoteVersion;\n }\n return data;\n }\n\n function toJsonComponent(listScopeResult: ListScopeResult): Record<string, any> {\n const id = listScopeResult.id.toStringWithoutVersion();\n const localVersion = listScopeResult.id.hasVersion() ? (listScopeResult.id.version as string) : '<new>';\n const data = {\n id,\n localVersion,\n deprecated: listScopeResult.deprecated,\n currentVersion: listScopeResult.currentlyUsedVersion || 'N/A',\n remoteVersion: listScopeResult.remoteVersion || 'N/A',\n removed: listScopeResult.removed,\n };\n return data;\n }\n\n if (json) {\n return listScopeResults.map(toJsonComponent);\n }\n const rows = listScopeResults.map(tabulateComponent);\n const head = ['component ID', 'latest in scope', 'used in workspace'];\n if (showRemoteVersion) {\n head.push('latest in remote scope');\n }\n\n const table = new Table({ head, style: { head: ['cyan'] } });\n rows.map((row) => table.push(Object.values(row)));\n return table.toString();\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;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8B,SAAAC,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKvB,SAASG,YAAYA,CAACC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AC1B,iBAAiB,CAAC;EACpD,MAAM4B,IAAI,GAAG,CAAC,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,CAAC;EACrE,IAAI7B,iBAAiB,EAAE;IACrB6B,IAAI,CAACC,IAAI,CAAC,wBAAwB,CAAC;EACrC;EAEA,MAAMC,KAAK,GAAG,KAAIC,mBAAK,EAAC;IAAEH,IAAI;IAAEI,KAAK,EAAE;MAAEJ,IAAI,EAAE,CAAC,MAAM;IAAE;EAAE,CAAC,CAAC;EAC5DD,IAAI,CAACD,GAAG,CAAEO,GAAG,IAAKH,KAAK,CAACD,IAAI,CAACK,MAAM,CAACC,MAAM,CAACF,GAAG,CAAC,CAAC,CAAC;EACjD,OAAOH,KAAK,CAACM,QAAQ,CAAC,CAAC;AACzB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/lister",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.702",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/lister",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "lister",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.702"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
13
13
|
"cli-table": "0.3.6",
|
|
14
14
|
"semver": "7.7.1",
|
|
15
15
|
"lodash": "4.17.21",
|
|
16
|
-
"@teambit/cli": "0.0.1258",
|
|
17
16
|
"@teambit/legacy.utils": "0.0.23",
|
|
18
17
|
"@teambit/harmony": "0.4.7",
|
|
19
18
|
"@teambit/bit-error": "0.0.404",
|
|
20
19
|
"@teambit/component-id": "1.2.4",
|
|
21
|
-
"@teambit/
|
|
22
|
-
"@teambit/legacy.
|
|
23
|
-
"@teambit/
|
|
24
|
-
"@teambit/
|
|
25
|
-
"@teambit/
|
|
20
|
+
"@teambit/cli": "0.0.1261",
|
|
21
|
+
"@teambit/legacy.component-list": "0.0.122",
|
|
22
|
+
"@teambit/legacy.consumer": "0.0.68",
|
|
23
|
+
"@teambit/logger": "0.0.1354",
|
|
24
|
+
"@teambit/scope.remotes": "0.0.68",
|
|
25
|
+
"@teambit/workspace": "1.0.702"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/cli-table": "^0.3.0",
|
|
File without changes
|