@systemfsoftware/stryker-js-html-reporter 5.0.3 → 5.0.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @systemfsoftware/stryker-js-html-reporter
2
2
 
3
+ ## 5.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - @systemfsoftware/stryker-js-instrumenter@11.0.0
9
+ - @systemfsoftware/stryker-js-plugin-interface@11.0.0
10
+
11
+ ## 5.0.4
12
+
13
+ ### Patch Changes
14
+
15
+ - The packages now depend on `@systemfsoftware/effect-cell-types` 11.
16
+
17
+ - Every tagged error now has a one-line message built from its fields, so a failure names the file, mutant, plugin, worker or exit code involved instead of an empty message. The errors' tags, fields and encoded forms are unchanged.
18
+
3
19
  ## 5.0.3
4
20
 
5
21
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,11 +1,6 @@
1
- import { Sandwich, Workflow } from "@systemfsoftware/effect-cell-types";
2
1
  import { Options, Reporter } from "@systemfsoftware/stryker-js-plugin-interface";
3
2
  import * as Effect from "effect/Effect";
4
- import "effect/FileSystem";
5
- import "effect/Path";
6
- import "effect/Schema";
7
- import { Schema } from "effect";
8
- //#region src/write-html-report.cell.d.ts
3
+ //#region src/html-reporter.d.ts
9
4
  declare const makeHtmlReporter: ((options: Options.StrykerOptions) => (init: Reporter.ReporterInit) => (events: AsyncIterable<Reporter.ReporterEvent>) => Effect.Effect<void, Reporter.ReporterFailed>) & ((options: Options.StrykerOptions, init: Reporter.ReporterInit) => (events: AsyncIterable<Reporter.ReporterEvent>) => Effect.Effect<void, Reporter.ReporterFailed>);
10
5
  declare namespace mod_d_exports {
11
6
  export { makeHtmlReporter };
package/dist/index.mjs CHANGED
@@ -1,18 +1,19 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
2
  import * as NodeFileSystem from "@effect/platform-node-shared/NodeFileSystem";
3
3
  import * as NodePath from "@effect/platform-node-shared/NodePath";
4
- import { Sandwich, Workflow } from "@systemfsoftware/effect-cell-types";
5
4
  import { ErrorText } from "@systemfsoftware/stryker-js-instrumenter";
6
5
  import { Reporter } from "@systemfsoftware/stryker-js-plugin-interface";
7
6
  import * as Effect from "effect/Effect";
8
- import * as FileSystem from "effect/FileSystem";
9
7
  import { dual } from "effect/Function";
10
8
  import * as Layer from "effect/Layer";
11
9
  import * as Match from "effect/Match";
12
10
  import * as Option$1 from "effect/Option";
13
- import * as Path from "effect/Path";
14
11
  import * as S from "effect/Schema";
15
12
  import * as Stream from "effect/Stream";
13
+ import { Sandwich, Workflow } from "@systemfsoftware/effect-cell-types";
14
+ import { SpanTaxonomy } from "@systemfsoftware/stryker-js-cli-contract";
15
+ import * as FileSystem from "effect/FileSystem";
16
+ import * as Path from "effect/Path";
16
17
  import { Option, Schema } from "effect";
17
18
  import * as Result from "effect/Result";
18
19
  //#region src/render-html-report.workflow.ts
@@ -68,13 +69,12 @@ const buildReportHtml = (report, scriptContent) => `<!DOCTYPE html>
68
69
  </body>
69
70
  </html>`;
70
71
  const BUNDLE_SPECIFIER = "mutation-testing-elements/dist/mutation-test-elements.js";
71
- const inlinedBundle = () => Match.value(typeof __STRYKER_HTML_REPORTER_CLIENT_BUNDLE__).pipe(Match.when("undefined", () => void 0), Match.orElse(() => __STRYKER_HTML_REPORTER_CLIENT_BUNDLE__));
72
- const readBundleFromDisk = Effect.fn("html_report.read_bundle_from_disk")(function* () {
72
+ const readBundleFromDisk = Effect.fn(SpanTaxonomy.Spans.htmlReportReadBundleFromDisk.name)(function* () {
73
73
  const fs = yield* FileSystem.FileSystem;
74
74
  const bundlePath = yield* (yield* Path.Path).fromFileUrl(new URL(import.meta.resolve(BUNDLE_SPECIFIER)));
75
75
  return yield* fs.readFileString(bundlePath);
76
76
  });
77
- const writeHtmlFile = Effect.fn("html_report.write_file")(function* (fileName, html) {
77
+ const writeHtmlFile = Effect.fn(SpanTaxonomy.Spans.htmlReportWriteFile.name)(function* (fileName, html) {
78
78
  const fs = yield* FileSystem.FileSystem;
79
79
  const path = yield* Path.Path;
80
80
  yield* fs.makeDirectory(path.dirname(fileName), { recursive: true });
@@ -86,15 +86,18 @@ const readRenderCommand = (input) => Effect.succeed({
86
86
  inlinedBundle: input.inlinedBundle,
87
87
  report: input.report
88
88
  });
89
- const writeBundleFromDisk = Effect.fn("html_report.write_bundle_from_disk")(function* (command) {
89
+ const writeBundleFromDisk = Effect.fn(SpanTaxonomy.Spans.htmlReportWriteBundleFromDisk.name)(function* (command) {
90
90
  const bundle = yield* readBundleFromDisk();
91
91
  yield* writeHtmlFile(command.fileName, buildReportHtml(command.report, bundle));
92
92
  });
93
- const writeHtmlReport = Sandwich.named("html_report.write")(readRenderCommand).decide(renderHtmlReport).write({
93
+ const writeHtmlReport = Sandwich.named(SpanTaxonomy.Spans.htmlReportWrite.name)(readRenderCommand).decide(renderHtmlReport).write({
94
94
  BundleInlined: ({ bundle }, command) => writeHtmlFile(command.fileName, buildReportHtml(command.report, bundle)),
95
95
  BundleFromDisk: (_decision, command) => writeBundleFromDisk(command),
96
96
  CommandRejected: (rejected) => Effect.die(rejected)
97
97
  });
98
+ //#endregion
99
+ //#region src/html-reporter.ts
100
+ const inlinedBundle = () => Match.value(typeof __STRYKER_HTML_REPORTER_CLIENT_BUNDLE__).pipe(Match.when("undefined", () => void 0), Match.orElse(() => __STRYKER_HTML_REPORTER_CLIENT_BUNDLE__));
98
101
  const nodeFsPathLayer = Layer.mergeAll(NodeFileSystem.layer, NodePath.layer);
99
102
  const failAsHtmlReporter = (cause) => Reporter.ReporterFailed.make({
100
103
  reporterName: "html",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-js-html-reporter",
3
- "version": "5.0.3",
3
+ "version": "5.0.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
@@ -15,19 +15,20 @@
15
15
  ],
16
16
  "dependencies": {
17
17
  "@effect/platform-node-shared": "4.0.0-rc.117",
18
- "@systemfsoftware/effect-cell-types": "^10.2.0",
18
+ "@systemfsoftware/effect-cell-types": "^11.0.0",
19
19
  "mutation-testing-elements": "3.9.0",
20
- "@systemfsoftware/stryker-js-instrumenter": "^10.0.0",
21
- "@systemfsoftware/stryker-js-plugin-interface": "^10.0.0"
20
+ "@systemfsoftware/stryker-js-cli-contract": "^0.1.0",
21
+ "@systemfsoftware/stryker-js-instrumenter": "^11.0.0",
22
+ "@systemfsoftware/stryker-js-plugin-interface": "^11.1.0"
22
23
  },
23
24
  "devDependencies": {
24
25
  "@effect/tsgo": "^0.45.0",
25
26
  "@microsoft/api-extractor": "^7",
26
27
  "@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
27
- "@systemfsoftware/effect-gherkin-spec": "^5.0.0",
28
- "@systemfsoftware/oxlint-config-recommended": "^3.1.0",
28
+ "@systemfsoftware/effect-gherkin-spec": "^6.0.1",
29
+ "@systemfsoftware/oxlint-config-recommended": "^3.4.0",
29
30
  "@systemfsoftware/tsconfig": "^2.0.1",
30
- "@systemfsoftware/vitest": "^0.1.0",
31
+ "@systemfsoftware/vitest": "^0.3.0",
31
32
  "@types/node": "^24",
32
33
  "effect": "4.0.0-rc.117",
33
34
  "oxlint": "^1",