@systemfsoftware/stryker-js-html-reporter 5.0.4 → 6.0.0
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 +23 -0
- package/dist/index.d.mts +1 -6
- package/dist/index.mjs +11 -8
- package/package.json +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js-html-reporter
|
|
2
2
|
|
|
3
|
+
## 6.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- Effect moves to the stable `4.0.0` release, together with the `@effect/*` packages these libraries use. The `4.0.0` release candidates are no longer supported: install `effect` `^4.0.0` next to these packages before upgrading.
|
|
8
|
+
|
|
9
|
+
The TypeScript checker and test-runner plugins bundle their own Effect runtime, so they need no change in your project.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies:
|
|
14
|
+
- @systemfsoftware/stryker-js-cli-contract@0.2.0
|
|
15
|
+
- @systemfsoftware/stryker-js-instrumenter@12.0.0
|
|
16
|
+
- @systemfsoftware/stryker-js-plugin-interface@12.0.0
|
|
17
|
+
|
|
18
|
+
## 5.0.5
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies:
|
|
23
|
+
- @systemfsoftware/stryker-js-instrumenter@11.0.0
|
|
24
|
+
- @systemfsoftware/stryker-js-plugin-interface@11.0.0
|
|
25
|
+
|
|
3
26
|
## 5.0.4
|
|
4
27
|
|
|
5
28
|
### 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
|
-
|
|
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
|
|
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(
|
|
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(
|
|
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(
|
|
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": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
|
|
@@ -14,22 +14,23 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@effect/platform-node-shared": "4.0.0
|
|
18
|
-
"@systemfsoftware/effect-cell-types": "^
|
|
17
|
+
"@effect/platform-node-shared": "^4.0.0",
|
|
18
|
+
"@systemfsoftware/effect-cell-types": "^12.0.0",
|
|
19
19
|
"mutation-testing-elements": "3.9.0",
|
|
20
|
-
"@systemfsoftware/stryker-js-
|
|
21
|
-
"@systemfsoftware/stryker-js-
|
|
20
|
+
"@systemfsoftware/stryker-js-plugin-interface": "^12.0.0",
|
|
21
|
+
"@systemfsoftware/stryker-js-cli-contract": "^0.2.0",
|
|
22
|
+
"@systemfsoftware/stryker-js-instrumenter": "^12.0.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": "^
|
|
28
|
-
"@systemfsoftware/oxlint-config-recommended": "^
|
|
28
|
+
"@systemfsoftware/effect-gherkin-spec": "^7.0.0",
|
|
29
|
+
"@systemfsoftware/oxlint-config-recommended": "^4.0.0",
|
|
29
30
|
"@systemfsoftware/tsconfig": "^2.0.1",
|
|
30
|
-
"@systemfsoftware/vitest": "^0.
|
|
31
|
+
"@systemfsoftware/vitest": "^1.0.0",
|
|
31
32
|
"@types/node": "^24",
|
|
32
|
-
"effect": "4.0.0
|
|
33
|
+
"effect": "^4.0.0",
|
|
33
34
|
"oxlint": "^1",
|
|
34
35
|
"oxlint-tsgolint": "^7",
|
|
35
36
|
"rimraf": "^6.1.3",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"provenance": true
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|
|
51
|
-
"effect": "4.0.0
|
|
52
|
+
"effect": "^4.0.0"
|
|
52
53
|
},
|
|
53
54
|
"exports": {
|
|
54
55
|
".": {
|