@systemfsoftware/stryker-js-vitest-runner 0.1.3 → 1.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 +54 -0
- package/dist/index.d.mts +11 -44
- package/dist/index.mjs +400 -10795
- package/package.json +6 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js-vitest-runner
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- effect is now a required peer dependency. Install it alongside these packages. They previously bundled their own copy, which meant two Effect instances in one process and services that could not find each other across the boundary.
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- The Vitest runner accepts `setupFilePath`, naming the setup file it copies into
|
|
12
|
+
the sandbox. It defaults to the file shipped beside the runner's own module,
|
|
13
|
+
which is the right answer for an installed package; supply it only when you are
|
|
14
|
+
running the runner from sources rather than from an install.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- The shared helpers package is gone. Nothing installs it any more, and the
|
|
19
|
+
handful of helpers worth sharing now live in the plugin contract next to the
|
|
20
|
+
types they serve:
|
|
21
|
+
|
|
22
|
+
- `strykerReportBugUrl`, `normalizeFileName`, `propertyPath`, `errorToString`
|
|
23
|
+
and `isErrnoException` from `@systemfsoftware/stryker-js-plugin-api/core`
|
|
24
|
+
- `noopLogger` from `@systemfsoftware/stryker-js-plugin-api/logging`
|
|
25
|
+
- `testFilesProvided` from `@systemfsoftware/stryker-js-plugin-api/test-runner`
|
|
26
|
+
|
|
27
|
+
If you imported any of those, change the specifier. Everything else it exported
|
|
28
|
+
had no consumer and is removed: use `Predicate.isNotNullish` from Effect in place
|
|
29
|
+
of `notEmpty`, and `RegExp.escape` in place of `escapeRegExp`.
|
|
30
|
+
|
|
31
|
+
- These packages no longer install dependencies they never imported, so installing them pulls less into your tree.
|
|
32
|
+
|
|
33
|
+
`tslib` is gone from all six. The mutation runner additionally stops installing `lodash.groupby`, `semver` and `source-map`, and the command line interface stops installing `@effect/platform-node-shared`. Nothing exported changes.
|
|
34
|
+
|
|
35
|
+
- Published packages no longer carry build artifacts left over from earlier builds. One package was shipping about a megabyte of bundled test-runner internals this way.
|
|
36
|
+
|
|
37
|
+
- Updated dependencies:
|
|
38
|
+
- @systemfsoftware/stryker-js-plugin-api@3.0.0
|
|
39
|
+
|
|
40
|
+
## 0.1.4
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Plugins are discovered under this scope by default. The `plugins` option now
|
|
45
|
+
defaults to a glob over this scope instead of the original project's, so a
|
|
46
|
+
configuration that relied on the previous default while installing plugins from
|
|
47
|
+
the original project must now list those plugins explicitly. Discovery also no
|
|
48
|
+
longer fails when no matching scope directory is installed: it loads nothing and
|
|
49
|
+
warns.
|
|
50
|
+
|
|
51
|
+
The report's dependency section names the packages of this scope, and the
|
|
52
|
+
report's home link points at this project.
|
|
53
|
+
|
|
54
|
+
- Updated dependencies:
|
|
55
|
+
- @systemfsoftware/stryker-js-util@0.2.0
|
|
56
|
+
|
|
3
57
|
## 0.1.3
|
|
4
58
|
|
|
5
59
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,52 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { INSTRUMENTER_CONSTANTS, StrykerOptions } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
3
|
-
import { DryRunOptions, DryRunResult, MutantRunOptions, MutantRunResult, TestRunner, TestRunnerCapabilities } from "@systemfsoftware/stryker-js-plugin-api/test-runner";
|
|
4
|
-
import { createVitest } from "vitest/node";
|
|
5
|
-
import { Logger } from "@systemfsoftware/stryker-js-plugin-api/logging";
|
|
6
|
-
//#region src/vitest-wrapper.d.ts
|
|
7
|
-
interface ResolvedVitest {
|
|
8
|
-
createVitest: typeof createVitest;
|
|
9
|
-
version: string;
|
|
10
|
-
}
|
|
11
|
-
type VitestResolver = (dir: string) => Promise<ResolvedVitest>;
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/vitest-test-runner.d.ts
|
|
14
|
-
type StrykerNamespace = '__stryker__' | '__stryker2__';
|
|
15
|
-
declare class VitestTestRunner implements TestRunner {
|
|
16
|
-
private readonly log;
|
|
17
|
-
private globalNamespace;
|
|
18
|
-
private readonly sandboxDirectory;
|
|
19
|
-
private readonly resolveVitestFor;
|
|
20
|
-
static inject: readonly ["options", "logger", 'globalNamespace', "sandboxDirectory"];
|
|
21
|
-
private ctx?;
|
|
22
|
-
private readonly options;
|
|
23
|
-
private localSetupFile?;
|
|
24
|
-
constructor(options: StrykerOptions, log: Logger, globalNamespace: StrykerNamespace, sandboxDirectory: string, resolveVitestFor?: VitestResolver);
|
|
25
|
-
capabilities(): TestRunnerCapabilities;
|
|
26
|
-
init(): Promise<void>;
|
|
27
|
-
dryRun(options: DryRunOptions): Promise<DryRunResult>;
|
|
28
|
-
mutantRun(options: MutantRunOptions): Promise<MutantRunResult>;
|
|
29
|
-
private run;
|
|
30
|
-
private setEnv;
|
|
31
|
-
private requireCtx;
|
|
32
|
-
private resetContext;
|
|
33
|
-
private readHitCount;
|
|
34
|
-
private readMutantCoverage;
|
|
35
|
-
dispose(): Promise<void>;
|
|
36
|
-
}
|
|
37
|
-
declare function createVitestTestRunnerFactory(namespace?: typeof INSTRUMENTER_CONSTANTS.NAMESPACE | '__stryker2__'): {
|
|
38
|
-
(injector: Injector<SandboxPluginContext>): VitestTestRunner;
|
|
39
|
-
inject: ['$injector'];
|
|
40
|
-
};
|
|
41
|
-
//#endregion
|
|
1
|
+
import { PluginKind } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
42
2
|
//#region src/index.d.ts
|
|
43
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The `vitest` test runner, as the plugin the engine loads.
|
|
5
|
+
*
|
|
6
|
+
* The declared layer asks for the run's resolved options and the sandbox it runs
|
|
7
|
+
* in, so the requirement is visible in the type and an engine that does not
|
|
8
|
+
* provide it fails to compile.
|
|
9
|
+
*/
|
|
10
|
+
declare const strykerPlugins: import("@systemfsoftware/stryker-js-plugin-api/plugin").PluginContribution<PluginKind.TestRunner>[];
|
|
44
11
|
/**
|
|
45
12
|
* The `vitest` option section as a JSON Schema document, for Stryker's option
|
|
46
|
-
* validation
|
|
13
|
+
* validation — derived from the declaration, never read from a file. It is built
|
|
47
14
|
* here, at the entry that contributes it, because a document is a *use* of a
|
|
48
15
|
* schema and the schema module exports only declarations.
|
|
49
16
|
*/
|
|
50
17
|
declare const strykerValidationSchema: Record<string, unknown>;
|
|
51
18
|
//#endregion
|
|
52
|
-
export {
|
|
19
|
+
export { strykerPlugins, strykerValidationSchema };
|