@systemfsoftware/stryker-js 10.1.1 → 10.2.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/dist/events.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { S as VerdictThresholds, _ as RunStarted, a as ModeSignal, b as VerdictMutant, c as PhaseEntered, d as RunDecodeError, f as RunEvent, g as RunReadError, h as RunPhase, i as HelpRendered, l as PlanKnown, m as RunMutantTested, n as StageError, o as MutationRunPlan, p as RunFailed, r as Heartbeat, s as OutputMode, t as PrepareError, u as PlanMutationRunCommand, x as VerdictReached, y as VerdictCounts } from "./Run.schema-BsSOfQnD.mjs";
1
+ import { S as VerdictThresholds, _ as RunStarted, a as ModeSignal, b as VerdictMutant, c as PhaseEntered, d as RunDecodeError, f as RunEvent, g as RunReadError, h as RunPhase, i as HelpRendered, l as PlanKnown, m as RunMutantTested, n as StageError, o as MutationRunPlan, p as RunFailed, r as Heartbeat, s as OutputMode, t as PrepareError, u as PlanMutationRunCommand, x as VerdictReached, y as VerdictCounts } from "./Run.schema-B-Pi3bCB.mjs";
2
2
  export { Heartbeat, HelpRendered, ModeSignal, MutationRunPlan, OutputMode, PhaseEntered, PlanKnown, PlanMutationRunCommand, PrepareError, RunDecodeError, RunEvent, RunFailed, RunMutantTested, RunPhase, RunReadError, RunStarted, StageError, type VerdictCounts, type VerdictMutant, VerdictReached, type VerdictThresholds };
package/dist/events.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as RunStarted, a as ModeSignal, c as PhaseEntered, d as RunDecodeError, f as RunEvent, g as RunReadError, h as RunPhase, i as HelpRendered, l as PlanKnown, m as RunMutantTested, n as StageError, o as MutationRunPlan, p as RunFailed, r as Heartbeat, s as OutputMode, t as PrepareError, u as PlanMutationRunCommand, v as VerdictReached } from "./Run.schema-B_KpPeBA.mjs";
1
+ import { _ as RunStarted, a as ModeSignal, c as PhaseEntered, d as RunDecodeError, f as RunEvent, g as RunReadError, h as RunPhase, i as HelpRendered, l as PlanKnown, m as RunMutantTested, n as StageError, o as MutationRunPlan, p as RunFailed, r as Heartbeat, s as OutputMode, t as PrepareError, u as PlanMutationRunCommand, v as VerdictReached } from "./Run.schema-Ba34IwAY.mjs";
2
2
  export { Heartbeat, HelpRendered, ModeSignal, MutationRunPlan, OutputMode, PhaseEntered, PlanKnown, PlanMutationRunCommand, PrepareError, RunDecodeError, RunEvent, RunFailed, RunMutantTested, RunPhase, RunReadError, RunStarted, StageError, VerdictReached };
@@ -65,6 +65,7 @@ declare const InstrumenterOptionsSchema: S.Struct<{
65
65
  readonly excludedMutations: S.$Array<S.String>;
66
66
  readonly ignorers: S.$Array<S.Unknown>;
67
67
  readonly noHeader: S.optional<S.Boolean>;
68
+ readonly optInMutations: S.optional<S.$Array<S.String>>;
68
69
  }>;
69
70
  declare class InstrumentError extends InstrumentError_base {
70
71
  get message(): string;
@@ -948,6 +949,7 @@ declare const StrykerOptionsSchema: S.StructWithRest<S.Struct<{
948
949
  readonly mutate: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
949
950
  readonly mutator: S.withDecodingDefaultKey<S.Struct<{
950
951
  readonly excludedMutations: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
952
+ readonly optInMutations: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
951
953
  }>, never>;
952
954
  readonly packageManager: S.optional<S.Literals<readonly ["npm", "yarn", "pnpm"]>>;
953
955
  readonly plugins: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
package/dist/index.d.mts CHANGED
@@ -8,6 +8,7 @@ import * as Effect from 'effect/Effect';
8
8
  import * as EffectDuration from 'effect/Duration';
9
9
  import * as Exit from 'effect/Exit';
10
10
  import * as FileSystem from 'effect/FileSystem';
11
+ import { HarnessModuleBuiltin } from '@systemfsoftware/stryker-vm-harness';
11
12
  import * as HashMap from 'effect/HashMap';
12
13
  import { JsonSchema } from 'effect/JsonSchema';
13
14
  import * as Layer from 'effect/Layer';
@@ -443,11 +444,6 @@ export declare const classifyWorkerExit: (pid: number, exitCode: number) => Chil
443
444
 
444
445
  declare type ClassType = "ClassDeclaration" | "ClassExpression";
445
446
 
446
- export declare interface CompiledTests {
447
- readonly fileName: string;
448
- readonly script: VmScript;
449
- }
450
-
451
447
  export declare interface CompleteDryRunResult {
452
448
  readonly tests: readonly TestResult[];
453
449
  readonly mutantCoverage?: MutantCoverage;
@@ -881,6 +877,7 @@ export declare const forkOptionsSchema: S.StructWithRest<S.Struct<{
881
877
  readonly mutate: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
882
878
  readonly mutator: S.withDecodingDefaultKey<S.Struct<{
883
879
  readonly excludedMutations: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
880
+ readonly optInMutations: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
884
881
  }>, never>;
885
882
  readonly packageManager: S.optional<S.Literals<readonly ["npm", "yarn", "pnpm"]>>;
886
883
  readonly plugins: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
@@ -2353,6 +2350,7 @@ export declare const StrykerOptionsSchema: S.StructWithRest<S.Struct<{
2353
2350
  readonly mutate: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
2354
2351
  readonly mutator: S.withDecodingDefaultKey<S.Struct<{
2355
2352
  readonly excludedMutations: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
2353
+ readonly optInMutations: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
2356
2354
  }>, never>;
2357
2355
  readonly packageManager: S.optional<S.Literals<readonly ["npm", "yarn", "pnpm"]>>;
2358
2356
  readonly plugins: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
@@ -3219,27 +3217,15 @@ export declare interface VerdictThresholds {
3219
3217
  readonly break: number | null;
3220
3218
  }
3221
3219
 
3222
- export declare interface VmModule {
3223
- readonly createContext: (sandbox: object) => object;
3224
- readonly Script: new (code: string, options?: {
3225
- readonly filename?: string;
3226
- }) => VmScript;
3227
- }
3228
-
3229
- export declare interface VmModuleBuiltin {
3230
- readonly createRequire: (fileName: string | URL) => VmRequire;
3231
- readonly stripTypeScriptTypes: (source: string, options?: {
3232
- readonly mode?: 'strip' | 'transform';
3233
- }) => string;
3220
+ declare interface VmFileUrl {
3221
+ readonly href: string;
3234
3222
  }
3235
3223
 
3236
3224
  export declare interface VmPlatform {
3237
- readonly module: VmModuleBuiltin;
3238
- readonly vm: VmModule;
3225
+ readonly moduleBuiltin: HarnessModuleBuiltin;
3226
+ readonly pathToFileURL: (path: string) => VmFileUrl;
3239
3227
  }
3240
3228
 
3241
- export declare type VmRequire = <A = unknown>(specifier: string) => A;
3242
-
3243
3229
  export declare class VmRunner extends VmRunner_base {}
3244
3230
 
3245
3231
  declare const VmRunner_base: Context.ServiceClass<VmRunner, "@systemfsoftware/stryker-js/VmRunner", VmPlatform>;
@@ -3250,14 +3236,11 @@ export declare const vmRunnerCapabilities: {
3250
3236
 
3251
3237
  export declare const vmRunnerName = "vm";
3252
3238
 
3253
- export declare interface VmScript {
3254
- readonly runInContext: <A = unknown>(context: object) => A;
3255
- }
3256
-
3257
- export declare const vmTestRunner: (config: VmTestRunnerConfig) => Effect.Effect<PooledTestRunner, TestRunnerFailed, FileSystem.FileSystem | VmRunner>;
3239
+ export declare const vmTestRunner: (config: VmTestRunnerConfig) => Effect.Effect<PooledTestRunner, TestRunnerFailed, VmRunner>;
3258
3240
 
3259
3241
  export declare interface VmTestRunnerConfig {
3260
3242
  readonly testFiles: readonly string[];
3243
+ readonly sandboxWorkingDirectory?: string;
3261
3244
  }
3262
3245
 
3263
3246
  export declare type WarningOptions = Exclude<StrykerOptions['warnings'], boolean>;
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { A as MetricsSchema, B as ReporterEventBatch, C as CheckerRequest, D as FileResultSchema, E as ExitClass, F as MutationTestingPlanReady, H as ReporterInitOptions, M as MutantTested, N as MutationTestReportReady, P as MutationTestResultSchema, R as ReporterAck, S as CheckerMutantWire, T as DryRunCompleted, U as ReporterRpcs, W as StrykerOptionsSchema, X as TraceContextMiddleware, _ as RunStarted, b as CheckerFailed, c as PhaseEntered, dt as PositionSchema, et as WorkerPluginKind, h as RunPhase, i as HelpRendered, j as MutantResultSchema, l as PlanKnown, lt as MutantActivationSchema, m as RunMutantTested, n as StageError, p as RunFailed, q as TestRunnerConfigSchema, r as Heartbeat, st as LocationSchema, ut as MutantStatusSchema, v as VerdictReached, w as CheckerRpcs, x as CheckerGroupResult, y as CheckerCheckResult, z as ReporterDrained } from "./Run.schema-B_KpPeBA.mjs";
2
- import { $ as OutOfMemoryError, A as strykerVersion, At as defaultOptions, B as initialExtendsStepState, C as checkerMutantsSkipped, Ct as extendsPropertySchema, D as CheckerSkippedRequested, Dt as SUPPORTED_CONFIG_FILE_NAMES, E as CheckerAnsweredUnrequested, Et as CONFIG_SYNTAX_HELP, F as spawnReporterWorker, Ft as toRelativeNormalizedFileName, G as buildTestRunner, H as mergeConfigs, I as decideExtendsStep, It as RunEvents, J as connectRetry, K as isCommandRunner, L as describeErrors, Lt as RunIdentity, M as RunEnvironment, Mt as isModuleSpecifier, N as REPORTER_EVENT_BATCH_BOUND, Nt as isWarningEnabled, O as createFileMatcher, Ot as createDefaultOptions, P as reporterWorkerFactory, Pt as optionsPath, Q as ChildProcessCrashedError, R as forkCoreSchema, Rt as RunEventWireLine, S as checkerMutantsChecked, St as ReadConfigCommand, T as checkerRpcFailures, Tt as survivorsPriorReport, U as readConfig, V as loadConfigCell, W as validateOptions, X as IdGenerator, Y as makeWorkerClient, Z as classifyWorkerExit, _ as verdictExitClass, _t as ExtendsStepResolve, a as RUN_EVENTS_QUEUE_BOUND, at as vmTestRunner, b as checkGroupedPlans, bt as MergeCommand, c as shouldKeepTempDir, ct as ConfigError, d as buildVerdictEnvelope, dt as ConfigFileUnreadableError, et as WorkerBootTimeoutError, f as generateRunId, ft as ConfigFileUnsupportedError, g as resolveExitCode, gt as ExtendsStepRefused, h as highestExitClass, ht as ExtendsStepRead, i as makeRunEventStream, it as vmRunnerName, j as IncrementalReportSchema, jt as findUnserializables, k as matchesFile, kt as deepFreeze, l as ACTIONABLE_STATUSES, lt as ConfigFileInvalidError, m as EXIT_CODE, mt as ExtendsStepDone, n as RunEventDrain, nt as isVmRunner, o as makeRunLayer, ot as StrykerError, p as isActionableStatus, pt as ExtendsStepDocumentSchema, q as WorkerLauncher, r as RunEventDrainLive, rt as vmRunnerCapabilities, s as mutationTestCell, st as ConfigDocumentSchema, t as strykerCell, tt as VmRunner, u as VERDICT_ENVELOPE_SCHEMA_VERSION, ut as ConfigFileNotFoundError, v as calculateMetrics, vt as ExtendsStepStateSchema, w as checkerProcessCrashes, wt as forkOptionsSchema, x as checkerDuration, xt as MergeResult, y as countMutants, yt as ImportedModuleSchema, z as importModule, zt as S } from "./src-BkTsNvl0.mjs";
1
+ import { A as MetricsSchema, B as ReporterEventBatch, C as CheckerRequest, D as FileResultSchema, E as ExitClass, F as MutationTestingPlanReady, H as ReporterInitOptions, M as MutantTested, N as MutationTestReportReady, P as MutationTestResultSchema, R as ReporterAck, S as CheckerMutantWire, T as DryRunCompleted, U as ReporterRpcs, W as StrykerOptionsSchema, X as TraceContextMiddleware, _ as RunStarted, b as CheckerFailed, c as PhaseEntered, dt as PositionSchema, et as WorkerPluginKind, h as RunPhase, i as HelpRendered, j as MutantResultSchema, l as PlanKnown, lt as MutantActivationSchema, m as RunMutantTested, n as StageError, p as RunFailed, q as TestRunnerConfigSchema, r as Heartbeat, st as LocationSchema, ut as MutantStatusSchema, v as VerdictReached, w as CheckerRpcs, x as CheckerGroupResult, y as CheckerCheckResult, z as ReporterDrained } from "./Run.schema-Ba34IwAY.mjs";
2
+ import { $ as OutOfMemoryError, A as strykerVersion, At as defaultOptions, B as initialExtendsStepState, C as checkerMutantsSkipped, Ct as extendsPropertySchema, D as CheckerSkippedRequested, Dt as SUPPORTED_CONFIG_FILE_NAMES, E as CheckerAnsweredUnrequested, Et as CONFIG_SYNTAX_HELP, F as spawnReporterWorker, Ft as toRelativeNormalizedFileName, G as buildTestRunner, H as mergeConfigs, I as decideExtendsStep, It as RunEvents, J as connectRetry, K as isCommandRunner, L as describeErrors, Lt as RunIdentity, M as RunEnvironment, Mt as isModuleSpecifier, N as REPORTER_EVENT_BATCH_BOUND, Nt as isWarningEnabled, O as createFileMatcher, Ot as createDefaultOptions, P as reporterWorkerFactory, Pt as optionsPath, Q as ChildProcessCrashedError, R as forkCoreSchema, Rt as RunEventWireLine, S as checkerMutantsChecked, St as ReadConfigCommand, T as checkerRpcFailures, Tt as survivorsPriorReport, U as readConfig, V as loadConfigCell, W as validateOptions, X as IdGenerator, Y as makeWorkerClient, Z as classifyWorkerExit, _ as verdictExitClass, _t as ExtendsStepResolve, a as RUN_EVENTS_QUEUE_BOUND, at as vmTestRunner, b as checkGroupedPlans, bt as MergeCommand, c as shouldKeepTempDir, ct as ConfigError, d as buildVerdictEnvelope, dt as ConfigFileUnreadableError, et as WorkerBootTimeoutError, f as generateRunId, ft as ConfigFileUnsupportedError, g as resolveExitCode, gt as ExtendsStepRefused, h as highestExitClass, ht as ExtendsStepRead, i as makeRunEventStream, it as vmRunnerName, j as IncrementalReportSchema, jt as findUnserializables, k as matchesFile, kt as deepFreeze, l as ACTIONABLE_STATUSES, lt as ConfigFileInvalidError, m as EXIT_CODE, mt as ExtendsStepDone, n as RunEventDrain, nt as isVmRunner, o as makeRunLayer, ot as StrykerError, p as isActionableStatus, pt as ExtendsStepDocumentSchema, q as WorkerLauncher, r as RunEventDrainLive, rt as vmRunnerCapabilities, s as mutationTestCell, st as ConfigDocumentSchema, t as strykerCell, tt as VmRunner, u as VERDICT_ENVELOPE_SCHEMA_VERSION, ut as ConfigFileNotFoundError, v as calculateMetrics, vt as ExtendsStepStateSchema, w as checkerProcessCrashes, wt as forkOptionsSchema, x as checkerDuration, xt as MergeResult, y as countMutants, yt as ImportedModuleSchema, z as importModule, zt as S } from "./src-CcqEZJIY.mjs";
3
3
  export { ACTIONABLE_STATUSES, CONFIG_SYNTAX_HELP, CheckerAnsweredUnrequested, CheckerCheckResult, CheckerFailed, CheckerGroupResult, CheckerMutantWire, CheckerRequest, CheckerRpcs, CheckerSkippedRequested, ChildProcessCrashedError, ConfigDocumentSchema, ConfigError, ConfigFileInvalidError, ConfigFileNotFoundError, ConfigFileUnreadableError, ConfigFileUnsupportedError, DryRunCompleted, EXIT_CODE, ExitClass, ExtendsStepDocumentSchema, ExtendsStepDone, ExtendsStepRead, ExtendsStepRefused, ExtendsStepResolve, ExtendsStepStateSchema, FileResultSchema, Heartbeat, HelpRendered, IdGenerator, ImportedModuleSchema, IncrementalReportSchema, LocationSchema, MergeCommand, MergeResult, MetricsSchema, MutantActivationSchema, MutantResultSchema, MutantStatusSchema, MutantTested, MutationTestReportReady, MutationTestResultSchema, MutationTestingPlanReady, OutOfMemoryError, PhaseEntered, PlanKnown, PositionSchema, REPORTER_EVENT_BATCH_BOUND, RUN_EVENTS_QUEUE_BOUND, ReadConfigCommand, ReporterAck, ReporterDrained, ReporterEventBatch, ReporterInitOptions, ReporterRpcs, RunEnvironment, RunEventDrain, RunEventDrainLive, RunEventWireLine, RunEvents, RunFailed, RunIdentity, RunMutantTested, RunPhase, RunStarted, S, SUPPORTED_CONFIG_FILE_NAMES, StageError, StrykerError, StrykerOptionsSchema, TestRunnerConfigSchema, TraceContextMiddleware, VERDICT_ENVELOPE_SCHEMA_VERSION, VerdictReached, VmRunner, WorkerBootTimeoutError, WorkerLauncher, WorkerPluginKind, buildTestRunner, buildVerdictEnvelope, calculateMetrics, checkGroupedPlans, checkerDuration, checkerMutantsChecked, checkerMutantsSkipped, checkerProcessCrashes, checkerRpcFailures, classifyWorkerExit, connectRetry, countMutants, createDefaultOptions, createFileMatcher, decideExtendsStep, deepFreeze, defaultOptions, describeErrors, extendsPropertySchema, findUnserializables, forkCoreSchema, forkOptionsSchema, generateRunId, highestExitClass, importModule, initialExtendsStepState, isActionableStatus, isCommandRunner, isModuleSpecifier, isVmRunner, isWarningEnabled, loadConfigCell, makeRunEventStream, makeRunLayer, makeWorkerClient, matchesFile, mergeConfigs, mutationTestCell, optionsPath, readConfig, reporterWorkerFactory, resolveExitCode, shouldKeepTempDir, spawnReporterWorker, strykerCell, strykerVersion, survivorsPriorReport, toRelativeNormalizedFileName, validateOptions, verdictExitClass, vmRunnerCapabilities, vmRunnerName, vmTestRunner };