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

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,22 @@
1
1
  # @systemfsoftware/stryker-js-html-reporter
2
2
 
3
+ ## 5.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Stages now run as cells over workflows, multi-item work runs as Effect streams, pools and worker transport use scoped Effect resources, and named operations are traced with Effect.fn. The Angular ignorer now declares @systemfsoftware/stryker-ignorer-kit as a runtime dependency.
8
+
9
+ - Updated dependencies:
10
+ - @systemfsoftware/stryker-js-instrumenter@10.0.0
11
+ - @systemfsoftware/stryker-js-plugin-interface@10.0.0
12
+
13
+ ## 5.0.2
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies:
18
+ - @systemfsoftware/stryker-js-plugin-interface@9.0.0
19
+
3
20
  ## 5.0.1
4
21
 
5
22
  ### Patch Changes
package/dist/index.mjs CHANGED
@@ -69,12 +69,12 @@ const buildReportHtml = (report, scriptContent) => `<!DOCTYPE html>
69
69
  </html>`;
70
70
  const BUNDLE_SPECIFIER = "mutation-testing-elements/dist/mutation-test-elements.js";
71
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.gen(function* () {
72
+ const readBundleFromDisk = Effect.fn("html_report.read_bundle_from_disk")(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 = (fileName, html) => Effect.gen(function* () {
77
+ const writeHtmlFile = Effect.fn("html_report.write_file")(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,19 +86,20 @@ 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) {
90
+ const bundle = yield* readBundleFromDisk();
91
+ yield* writeHtmlFile(command.fileName, buildReportHtml(command.report, bundle));
92
+ });
89
93
  const writeHtmlReport = Sandwich.named("html_report.write")(readRenderCommand).decide(renderHtmlReport).write({
90
94
  BundleInlined: ({ bundle }, command) => writeHtmlFile(command.fileName, buildReportHtml(command.report, bundle)),
91
- BundleFromDisk: (_decision, command) => Effect.gen(function* () {
92
- const bundle = yield* readBundleFromDisk;
93
- yield* writeHtmlFile(command.fileName, buildReportHtml(command.report, bundle));
94
- }),
95
+ BundleFromDisk: (_decision, command) => writeBundleFromDisk(command),
95
96
  CommandRejected: (rejected) => Effect.die(rejected)
96
97
  });
97
98
  const nodeFsPathLayer = Layer.mergeAll(NodeFileSystem.layer, NodePath.layer);
98
99
  const failAsHtmlReporter = (cause) => Reporter.ReporterFailed.make({
99
100
  reporterName: "html",
100
101
  event: "mutationTestReportReady",
101
- cause: Option$1.getOrElse(Option$1.map(ErrorText.ErrorText.fromCause(cause), (rendered) => rendered.text), () => "")
102
+ cause: Option$1.getOrElse(Option$1.map(ErrorText.errorTextOf(cause), (rendered) => rendered.text), () => "")
102
103
  });
103
104
  const drainEvents = (fileName, events) => Stream.runForEach(Stream.fromAsyncIterable(events, failAsHtmlReporter).pipe(Stream.filter(S.is(Reporter.MutationTestReportReady))), (ready) => writeHtmlReport.run({
104
105
  fileName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-js-html-reporter",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
@@ -17,8 +17,8 @@
17
17
  "@effect/platform-node-shared": "4.0.0-rc.117",
18
18
  "@systemfsoftware/effect-cell-types": "^10.2.0",
19
19
  "mutation-testing-elements": "3.9.0",
20
- "@systemfsoftware/stryker-js-plugin-interface": "^8.0.0",
21
- "@systemfsoftware/stryker-js-instrumenter": "^9.0.1"
20
+ "@systemfsoftware/stryker-js-instrumenter": "^10.0.0",
21
+ "@systemfsoftware/stryker-js-plugin-interface": "^10.0.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@effect/tsgo": "^0.45.0",
@@ -36,8 +36,8 @@
36
36
  "tsdown": "^0.23.0",
37
37
  "typescript": "^7",
38
38
  "vitest": "^5",
39
- "@systemfsoftware/vitest-config": "^0.1.0",
40
- "@systemfsoftware/tsdown-config": "^0.1.0"
39
+ "@systemfsoftware/tsdown-config": "^0.1.0",
40
+ "@systemfsoftware/vitest-config": "^0.1.0"
41
41
  },
42
42
  "engines": {
43
43
  "node": ">=20.0.0"