@systemfsoftware/stryker-js-instrumenter 10.0.0 → 10.0.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/CHANGELOG.md +8 -0
- package/dist/index.mjs +40 -8
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js-instrumenter
|
|
2
2
|
|
|
3
|
+
## 10.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The packages now depend on `@systemfsoftware/effect-cell-types` 11.
|
|
8
|
+
|
|
9
|
+
- 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.
|
|
10
|
+
|
|
3
11
|
## 10.0.0
|
|
4
12
|
|
|
5
13
|
### Major Changes
|
package/dist/index.mjs
CHANGED
|
@@ -331,16 +331,32 @@ var MutantsUnapplied = class extends S.TaggedError()("MutantsUnapplied", {
|
|
|
331
331
|
placer: PlacerNameSchema,
|
|
332
332
|
mutatorNames: S.Array(MutatorNameSchema),
|
|
333
333
|
cause: S.Defect()
|
|
334
|
-
}) {
|
|
334
|
+
}) {
|
|
335
|
+
get message() {
|
|
336
|
+
return `Failed to apply ${this.mutatorNames.join(", ")} in ${this.fileName}`;
|
|
337
|
+
}
|
|
338
|
+
};
|
|
335
339
|
var MutantNotApplied = class extends S.TaggedError()("MutantNotApplied", {
|
|
336
340
|
fileName: S.String,
|
|
337
341
|
mutatorName: MutatorNameSchema
|
|
338
|
-
}) {
|
|
339
|
-
|
|
342
|
+
}) {
|
|
343
|
+
get message() {
|
|
344
|
+
return `Could not apply the ${this.mutatorName} mutant in ${this.fileName}`;
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
var NodeWithoutSpan = class extends S.TaggedError()("NodeWithoutSpan", { fileName: S.String }) {
|
|
348
|
+
get message() {
|
|
349
|
+
return `Node without a span in ${this.fileName}`;
|
|
350
|
+
}
|
|
351
|
+
};
|
|
340
352
|
var MutantsUnplaced = class extends S.TaggedError()("MutantsUnplaced", {
|
|
341
353
|
fileName: S.String,
|
|
342
354
|
detail: S.String
|
|
343
|
-
}) {
|
|
355
|
+
}) {
|
|
356
|
+
get message() {
|
|
357
|
+
return `Mutants cannot be placed. This shouldn't happen! Unplaced mutants: ${this.detail}`;
|
|
358
|
+
}
|
|
359
|
+
};
|
|
344
360
|
var PlacementRefused = class extends S.TaggedError()("PlacementRefused", { message: S.String }) {};
|
|
345
361
|
//#endregion
|
|
346
362
|
//#region src/Location.ts
|
|
@@ -3339,7 +3355,11 @@ var FormatOverrideUnclaimed = class extends S.TaggedError()("FormatOverrideUncla
|
|
|
3339
3355
|
fileName: S.String,
|
|
3340
3356
|
formatId: S.String,
|
|
3341
3357
|
reason: S.String
|
|
3342
|
-
}) {
|
|
3358
|
+
}) {
|
|
3359
|
+
get message() {
|
|
3360
|
+
return `Cannot instrument ${this.fileName}: ${this.reason}`;
|
|
3361
|
+
}
|
|
3362
|
+
};
|
|
3343
3363
|
const pinOf = (command) => Option.fromUndefinedOr(command.formatId);
|
|
3344
3364
|
const matchesCommand = (claim, command) => Match.value(pinOf(command)).pipe(Match.when(Option.isSome, (pin) => claim.formatId === pin.value), Match.orElse(() => claim.extensions.includes(command.extension)));
|
|
3345
3365
|
const claimFor = (command) => command.claims.find((claim) => matchesCommand(claim, command));
|
|
@@ -3576,8 +3596,16 @@ var MutantKindMismatch = class extends S.TaggedError()("MutantKindMismatch", {
|
|
|
3576
3596
|
mutantId: MutantId,
|
|
3577
3597
|
mutatorName: MutatorNameSchema,
|
|
3578
3598
|
expected: ExpectedKindSchema
|
|
3579
|
-
}) {
|
|
3580
|
-
|
|
3599
|
+
}) {
|
|
3600
|
+
get message() {
|
|
3601
|
+
return `Expected ${this.expected} for mutant ${this.mutantId} (${this.mutatorName}) in ${this.fileName}`;
|
|
3602
|
+
}
|
|
3603
|
+
};
|
|
3604
|
+
var NoPlacerClaimsNode = class extends S.TaggedError()("NoPlacerClaimsNode", { fileName: S.String }) {
|
|
3605
|
+
get message() {
|
|
3606
|
+
return `No placer claims the node in ${this.fileName}`;
|
|
3607
|
+
}
|
|
3608
|
+
};
|
|
3581
3609
|
const claimingPlacer = (facts) => Match.value(facts).pipe(Match.when({
|
|
3582
3610
|
isExpression: true,
|
|
3583
3611
|
expressionIsValid: true
|
|
@@ -3679,7 +3707,11 @@ var MutantsFullyIgnored = class extends S.TaggedClass()("MutantsFullyIgnored", {
|
|
|
3679
3707
|
var MutantWithoutLocation = class extends S.TaggedError()("MutantWithoutLocation", {
|
|
3680
3708
|
fileName: S.String,
|
|
3681
3709
|
mutatorName: MutatorNameSchema
|
|
3682
|
-
}) {
|
|
3710
|
+
}) {
|
|
3711
|
+
get message() {
|
|
3712
|
+
return `Mutant without a source location: ${this.mutatorName} in ${this.fileName}`;
|
|
3713
|
+
}
|
|
3714
|
+
};
|
|
3683
3715
|
const reachedLine = (located, line) => Match.value(located.directive.scope).pipe(Match.when(NEXT_LINE, () => located.governedLine === line), Match.when("block", () => true), Match.exhaustive);
|
|
3684
3716
|
const namesMutator = (located, lowerMutatorName) => located.directive.mutatorNames.some((name) => [name === WILDCARD, name.toLowerCase() === lowerMutatorName].some(Boolean));
|
|
3685
3717
|
const lastReachingDirective = (rule, lowerMutatorName, line) => Option.fromNullishOr(rule.findLast((located) => [reachedLine(located, line), namesMutator(located, lowerMutatorName)].every(Boolean)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/stryker-js-instrumenter",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@eslint-community/regexpp": "^4.12.2",
|
|
26
26
|
"@oxc-project/types": "^0.150.0",
|
|
27
|
-
"@systemfsoftware/effect-cell-types": "^
|
|
27
|
+
"@systemfsoftware/effect-cell-types": "^11.0.0",
|
|
28
28
|
"effect": "4.0.0-rc.117",
|
|
29
29
|
"oxc-parser": "^0.150.0",
|
|
30
30
|
"oxc-walker": "^1",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"@effect/tsgo": "^0.45.0",
|
|
36
36
|
"@microsoft/api-extractor": "^7",
|
|
37
37
|
"@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
|
|
38
|
-
"@systemfsoftware/effect-gherkin-spec": "^
|
|
39
|
-
"@systemfsoftware/oxlint-config-recommended": "^3.
|
|
38
|
+
"@systemfsoftware/effect-gherkin-spec": "^6.0.0",
|
|
39
|
+
"@systemfsoftware/oxlint-config-recommended": "^3.2.0",
|
|
40
40
|
"@systemfsoftware/tsconfig": "^2.0.1",
|
|
41
|
-
"@systemfsoftware/vitest": "^0.
|
|
41
|
+
"@systemfsoftware/vitest": "^0.2.0",
|
|
42
42
|
"@types/node": "^24",
|
|
43
43
|
"oxlint": "^1",
|
|
44
44
|
"rimraf": "^6.1.3",
|
|
45
45
|
"tsdown": "^0.23.0",
|
|
46
46
|
"typescript": "^7",
|
|
47
47
|
"vitest": "^5",
|
|
48
|
-
"@systemfsoftware/stryker-ignorer-interface": "^0.1.1",
|
|
49
48
|
"@systemfsoftware/tsdown-config": "^0.1.0",
|
|
49
|
+
"@systemfsoftware/stryker-ignorer-interface": "^0.1.1",
|
|
50
50
|
"@systemfsoftware/vitest-config": "^0.1.0"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|