@code-pushup/utils 0.13.2 → 0.14.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.
package/index.js CHANGED
@@ -1517,7 +1517,7 @@ function scoreReport(report) {
1517
1517
  )?.score;
1518
1518
  if (score == null) {
1519
1519
  throw new Error(
1520
- `Group has invalid ref - audit with slug ${slug}-${ref.slug}-audit not found`
1520
+ `Group has invalid ref - audit with slug ${ref.slug} from plugin ${slug} not found`
1521
1521
  );
1522
1522
  }
1523
1523
  return score;
@@ -1638,21 +1638,21 @@ function sortPlugins(plugins) {
1638
1638
  }
1639
1639
 
1640
1640
  // packages/utils/src/lib/verbose-utils.ts
1641
- function getLogVerbose(verbose) {
1641
+ function getLogVerbose(verbose = false) {
1642
1642
  return (...args) => {
1643
1643
  if (verbose) {
1644
1644
  console.info(...args);
1645
1645
  }
1646
1646
  };
1647
1647
  }
1648
- function getExecVerbose(verbose) {
1648
+ function getExecVerbose(verbose = false) {
1649
1649
  return (fn) => {
1650
1650
  if (verbose) {
1651
1651
  fn();
1652
1652
  }
1653
1653
  };
1654
1654
  }
1655
- var verboseUtils = (verbose) => ({
1655
+ var verboseUtils = (verbose = false) => ({
1656
1656
  log: getLogVerbose(verbose),
1657
1657
  exec: getExecVerbose(verbose)
1658
1658
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/utils",
3
- "version": "0.13.2",
3
+ "version": "0.14.1",
4
4
  "dependencies": {
5
5
  "@code-pushup/models": "*",
6
6
  "bundle-require": "^4.0.1",
@@ -1,4 +1,4 @@
1
- export declare const verboseUtils: (verbose: boolean) => {
1
+ export declare const verboseUtils: (verbose?: boolean) => {
2
2
  log: (...args: unknown[]) => void;
3
3
  exec: (fn: () => unknown) => void;
4
4
  };