@code-pushup/cli 0.53.0 → 0.53.1

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.
Files changed (2) hide show
  1. package/index.js +9 -9
  2. package/package.json +38 -16
package/index.js CHANGED
@@ -20,7 +20,7 @@ var MAX_ISSUE_MESSAGE_LENGTH = 1024;
20
20
  var slugRegex = /^[a-z\d]+(?:-[a-z\d]+)*$/;
21
21
  var filenameRegex = /^(?!.*[ \\/:*?"<>|]).+$/;
22
22
  function hasDuplicateStrings(strings) {
23
- const sortedStrings = [...strings].sort();
23
+ const sortedStrings = strings.toSorted();
24
24
  const duplStrings = sortedStrings.filter(
25
25
  (item, index) => index !== 0 && item === sortedStrings[index - 1]
26
26
  );
@@ -1588,7 +1588,7 @@ function getColumnAlignments(tableData) {
1588
1588
  (_, idx) => getColumnAlignmentForIndex(idx, columns)
1589
1589
  );
1590
1590
  }
1591
- const biggestRow = [...rows].sort((a, b) => Object.keys(a).length - Object.keys(b).length).at(-1);
1591
+ const biggestRow = rows.toSorted((a, b) => Object.keys(a).length - Object.keys(b).length).at(-1);
1592
1592
  if (columns.length > 0) {
1593
1593
  return columns.map(
1594
1594
  (column, idx) => typeof column === "string" ? column : getColumnAlignmentForKeyAndIndex(
@@ -1767,7 +1767,7 @@ function getSortableGroupByRef({ plugin, slug, weight }, plugins) {
1767
1767
  throwIsNotPresentError(`Group ${slug}`, groupPlugin.slug);
1768
1768
  }
1769
1769
  const sortedAudits = getSortedGroupAudits(group, groupPlugin.slug, plugins);
1770
- const sortedAuditRefs = [...group.refs].sort((a, b) => {
1770
+ const sortedAuditRefs = group.refs.toSorted((a, b) => {
1771
1771
  const aIndex = sortedAudits.findIndex((ref) => ref.slug === a.slug);
1772
1772
  const bIndex = sortedAudits.findIndex((ref) => ref.slug === b.slug);
1773
1773
  return aIndex - bIndex;
@@ -1796,7 +1796,7 @@ function sortReport(report) {
1796
1796
  const sortedAuditsAndGroups = [...audits, ...groups2].sort(
1797
1797
  compareCategoryAuditsAndGroups
1798
1798
  );
1799
- const sortedRefs = [...category.refs].sort((a, b) => {
1799
+ const sortedRefs = category.refs.toSorted((a, b) => {
1800
1800
  const aIndex = sortedAuditsAndGroups.findIndex(
1801
1801
  (ref) => ref.slug === a.slug && ref.plugin === a.plugin
1802
1802
  );
@@ -1816,12 +1816,12 @@ function sortReport(report) {
1816
1816
  function sortPlugins(plugins) {
1817
1817
  return plugins.map((plugin) => ({
1818
1818
  ...plugin,
1819
- audits: [...plugin.audits].sort(compareAudits).map(
1819
+ audits: plugin.audits.toSorted(compareAudits).map(
1820
1820
  (audit) => audit.details?.issues ? {
1821
1821
  ...audit,
1822
1822
  details: {
1823
1823
  ...audit.details,
1824
- issues: [...audit.details.issues].sort(compareIssues)
1824
+ issues: audit.details.issues.toSorted(compareIssues)
1825
1825
  }
1826
1826
  } : audit
1827
1827
  )
@@ -2098,7 +2098,7 @@ function formatPortalLink(portalUrl) {
2098
2098
  return portalUrl && md5.link(portalUrl, "\u{1F575}\uFE0F See full comparison in Code PushUp portal \u{1F50D}");
2099
2099
  }
2100
2100
  function sortChanges(changes) {
2101
- return [...changes].sort(
2101
+ return changes.toSorted(
2102
2102
  (a, b) => Math.abs(b.scores.diff) - Math.abs(a.scores.diff) || Math.abs(b.values?.diff ?? 0) - Math.abs(a.values?.diff ?? 0)
2103
2103
  );
2104
2104
  }
@@ -2564,7 +2564,7 @@ var verboseUtils = (verbose = false) => ({
2564
2564
 
2565
2565
  // packages/core/package.json
2566
2566
  var name = "@code-pushup/core";
2567
- var version = "0.53.0";
2567
+ var version = "0.53.1";
2568
2568
 
2569
2569
  // packages/core/src/lib/implementation/execute-plugin.ts
2570
2570
  import { bold as bold5 } from "ansis";
@@ -4107,7 +4107,7 @@ import { blue, dim as dim2, green as green4 } from "ansis";
4107
4107
  import yargs2 from "yargs";
4108
4108
 
4109
4109
  // packages/cli/package.json
4110
- var version2 = "0.53.0";
4110
+ var version2 = "0.53.1";
4111
4111
 
4112
4112
  // packages/cli/src/lib/implementation/formatting.ts
4113
4113
  import { bold as bold13, dim, green as green3 } from "ansis";
package/package.json CHANGED
@@ -1,32 +1,54 @@
1
1
  {
2
2
  "name": "@code-pushup/cli",
3
- "version": "0.53.0",
3
+ "version": "0.53.1",
4
4
  "license": "MIT",
5
5
  "description": "A CLI to run all kinds of code quality measurements to align your team with company goals",
6
- "bin": {
7
- "code-pushup": "index.js"
8
- },
9
- "dependencies": {
10
- "@code-pushup/models": "0.53.0",
11
- "@code-pushup/core": "0.53.0",
12
- "@code-pushup/utils": "0.53.0",
13
- "yargs": "^17.7.2",
14
- "ansis": "^3.3.0",
15
- "simple-git": "^3.20.0"
16
- },
17
- "homepage": "code-pushup.dev",
6
+ "homepage": "https://code-pushup.dev",
18
7
  "bugs": {
19
- "url": "https://github.com/code-pushup/cli/issues"
8
+ "url": "https://github.com/code-pushup/cli/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug%20label%3A\"🧩%20cli\""
20
9
  },
21
10
  "repository": {
22
11
  "type": "git",
23
12
  "url": "git+https://github.com/code-pushup/cli.git",
24
13
  "directory": "packages/cli"
25
14
  },
15
+ "keywords": [
16
+ "CLI",
17
+ "Code PushUp",
18
+ "automation",
19
+ "developer tools",
20
+ "code quality",
21
+ "conformance",
22
+ "build tools",
23
+ "KPI tracking",
24
+ "tech debt",
25
+ "automated feedback",
26
+ "regression guard",
27
+ "CI integration",
28
+ "code management",
29
+ "actionable feedback",
30
+ "trend analysis",
31
+ "static analysis",
32
+ "linting",
33
+ "audit",
34
+ "performance",
35
+ "score monitoring"
36
+ ],
26
37
  "publishConfig": {
27
38
  "access": "public"
28
39
  },
29
40
  "type": "module",
30
41
  "main": "./index.js",
31
- "types": "./src/index.d.ts"
32
- }
42
+ "types": "./src/index.d.ts",
43
+ "bin": {
44
+ "code-pushup": "index.js"
45
+ },
46
+ "dependencies": {
47
+ "@code-pushup/models": "0.53.1",
48
+ "@code-pushup/core": "0.53.1",
49
+ "@code-pushup/utils": "0.53.1",
50
+ "yargs": "^17.7.2",
51
+ "ansis": "^3.3.0",
52
+ "simple-git": "^3.20.0"
53
+ }
54
+ }