@code-pushup/coverage-plugin 0.23.1 → 0.25.6

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 (3) hide show
  1. package/bin.js +7 -7
  2. package/index.js +8 -7
  3. package/package.json +1 -1
package/bin.js CHANGED
@@ -617,6 +617,9 @@ function executeProcess(cfg) {
617
617
  });
618
618
  }
619
619
 
620
+ // packages/utils/src/lib/git.ts
621
+ import { simpleGit } from "simple-git";
622
+
620
623
  // packages/utils/src/lib/transform.ts
621
624
  import { platform } from "node:os";
622
625
  function toUnixNewlines(text) {
@@ -642,9 +645,6 @@ function toOrdinal(value) {
642
645
  return `${value}th`;
643
646
  }
644
647
 
645
- // packages/utils/src/lib/git.ts
646
- import { simpleGit } from "simple-git";
647
-
648
648
  // packages/utils/src/lib/logging.ts
649
649
  import chalk2 from "chalk";
650
650
 
@@ -837,9 +837,9 @@ async function executeRunner() {
837
837
  await executeProcess({ command, args });
838
838
  } catch (error) {
839
839
  if (error instanceof ProcessError) {
840
- console.info(chalk5.bold("stdout from failed process:"));
841
- console.info(error.stdout);
842
- console.error(chalk5.bold("stderr from failed process:"));
840
+ console.error(chalk5.bold("stdout from failed coverage tool process:"));
841
+ console.error(error.stdout);
842
+ console.error(chalk5.bold("stderr from failed coverage tool process:"));
843
843
  console.error(error.stderr);
844
844
  }
845
845
  throw new Error(
@@ -853,4 +853,4 @@ async function executeRunner() {
853
853
  }
854
854
 
855
855
  // packages/plugin-coverage/src/bin.ts
856
- await executeRunner().catch(console.error);
856
+ await executeRunner();
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // packages/plugin-coverage/src/lib/coverage-plugin.ts
2
- import { dirname, join as join3 } from "node:path";
2
+ import { dirname as dirname2, join as join3 } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
 
5
5
  // packages/models/src/lib/audit.ts
@@ -555,6 +555,9 @@ function pluginWorkDir(slug) {
555
555
  return join("node_modules", ".code-pushup", slug);
556
556
  }
557
557
 
558
+ // packages/utils/src/lib/git.ts
559
+ import { simpleGit } from "simple-git";
560
+
558
561
  // packages/utils/src/lib/transform.ts
559
562
  function capitalize(text) {
560
563
  return `${text.charAt(0).toLocaleUpperCase()}${text.slice(
@@ -562,9 +565,6 @@ function capitalize(text) {
562
565
  )}`;
563
566
  }
564
567
 
565
- // packages/utils/src/lib/git.ts
566
- import { simpleGit } from "simple-git";
567
-
568
568
  // packages/utils/src/lib/logging.ts
569
569
  import chalk2 from "chalk";
570
570
 
@@ -579,7 +579,7 @@ import CliTable3 from "cli-table3";
579
579
 
580
580
  // packages/plugin-coverage/package.json
581
581
  var name = "@code-pushup/coverage-plugin";
582
- var version = "0.23.1";
582
+ var version = "0.25.6";
583
583
 
584
584
  // packages/plugin-coverage/src/lib/config.ts
585
585
  import { z as z13 } from "zod";
@@ -618,6 +618,7 @@ var coveragePluginConfigSchema = z13.object({
618
618
  // packages/plugin-coverage/src/lib/runner/index.ts
619
619
  import chalk5 from "chalk";
620
620
  import { writeFile } from "node:fs/promises";
621
+ import { dirname } from "node:path";
621
622
 
622
623
  // packages/plugin-coverage/src/lib/utils.ts
623
624
  var coverageDescription = {
@@ -653,7 +654,7 @@ var parseLcov = "default" in godKnows ? godKnows.default : godKnows;
653
654
 
654
655
  // packages/plugin-coverage/src/lib/runner/index.ts
655
656
  async function createRunnerConfig(scriptPath, config) {
656
- await ensureDirectoryExists(WORKDIR);
657
+ await ensureDirectoryExists(dirname(PLUGIN_CONFIG_PATH));
657
658
  await writeFile(PLUGIN_CONFIG_PATH, JSON.stringify(config));
658
659
  const threshold = config.perfectScoreThreshold;
659
660
  return {
@@ -686,7 +687,7 @@ async function coveragePlugin(config) {
686
687
  }))
687
688
  };
688
689
  const runnerScriptPath = join3(
689
- fileURLToPath(dirname(import.meta.url)),
690
+ fileURLToPath(dirname2(import.meta.url)),
690
691
  "bin.js"
691
692
  );
692
693
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/coverage-plugin",
3
- "version": "0.23.1",
3
+ "version": "0.25.6",
4
4
  "dependencies": {
5
5
  "@code-pushup/models": "*",
6
6
  "@code-pushup/utils": "*",