@d-es-ign/stryker-js-core 9.6.0 → 9.6.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.
Files changed (93) hide show
  1. package/README.md +11 -4
  2. package/package.json +7 -7
  3. package/schema/stryker-schema.json +12 -12
  4. package/src/checker/checker-child-process-proxy.ts +2 -2
  5. package/src/checker/checker-facade.ts +2 -2
  6. package/src/checker/checker-factory.ts +3 -3
  7. package/src/checker/checker-resource.ts +2 -2
  8. package/src/checker/checker-retry-decorator.ts +2 -2
  9. package/src/checker/checker-worker.ts +4 -4
  10. package/src/child-proxy/child-process-crashed-error.ts +1 -1
  11. package/src/child-proxy/child-process-proxy-worker.ts +3 -3
  12. package/src/child-proxy/child-process-proxy.ts +3 -3
  13. package/src/child-proxy/message-protocol.ts +1 -1
  14. package/src/concurrent/concurrency-token-provider.ts +3 -3
  15. package/src/concurrent/pool.ts +2 -2
  16. package/src/config/config-reader.ts +6 -6
  17. package/src/config/file-matcher.ts +1 -1
  18. package/src/config/meta-schema-builder.ts +2 -2
  19. package/src/config/options-validator.ts +4 -4
  20. package/src/di/plugin-creator.ts +1 -1
  21. package/src/di/plugin-loader.ts +7 -7
  22. package/src/errors.ts +1 -1
  23. package/src/fs/file-system.ts +1 -1
  24. package/src/fs/project-file.ts +3 -3
  25. package/src/fs/project-reader.ts +4 -4
  26. package/src/fs/project.ts +3 -3
  27. package/src/initializer/custom-initializers/angular-initializer.ts +5 -5
  28. package/src/initializer/custom-initializers/custom-initializer.ts +2 -2
  29. package/src/initializer/custom-initializers/index.ts +2 -2
  30. package/src/initializer/custom-initializers/react-initializer.ts +3 -3
  31. package/src/initializer/custom-initializers/svelte-initializer.ts +1 -1
  32. package/src/initializer/custom-initializers/vue-js-initializer.ts +3 -3
  33. package/src/initializer/gitignore-writer.ts +1 -1
  34. package/src/initializer/index.ts +1 -1
  35. package/src/initializer/npm-client.ts +6 -6
  36. package/src/initializer/npm-registry.ts +3 -3
  37. package/src/initializer/stryker-config-writer.ts +6 -6
  38. package/src/initializer/stryker-initializer.ts +4 -4
  39. package/src/logging/logger-impl.ts +2 -2
  40. package/src/logging/logging-backend.ts +1 -1
  41. package/src/logging/logging-client.ts +2 -2
  42. package/src/logging/logging-event.ts +1 -1
  43. package/src/logging/logging-server.ts +2 -2
  44. package/src/logging/logging-sink.ts +1 -1
  45. package/src/logging/priority.ts +1 -1
  46. package/src/logging/provide-logging.ts +3 -3
  47. package/src/mutants/incremental-differ.ts +5 -5
  48. package/src/mutants/mutant-test-planner.ts +5 -5
  49. package/src/mutants/test-coverage.ts +5 -5
  50. package/src/process/1-prepare-executor.ts +5 -5
  51. package/src/process/2-mutant-instrumenter-executor.ts +5 -5
  52. package/src/process/3-dry-run-executor.ts +6 -6
  53. package/src/process/4-mutation-test-executor.ts +6 -6
  54. package/src/reporters/broadcast-reporter.ts +4 -4
  55. package/src/reporters/clear-text-reporter.ts +4 -4
  56. package/src/reporters/clear-text-score-table.ts +1 -1
  57. package/src/reporters/dashboard-reporter/dashboard-reporter-client.ts +4 -4
  58. package/src/reporters/dashboard-reporter/dashboard-reporter.ts +4 -4
  59. package/src/reporters/dashboard-reporter/index.ts +1 -1
  60. package/src/reporters/dashboard-reporter/report.ts +1 -1
  61. package/src/reporters/dots-reporter.ts +2 -2
  62. package/src/reporters/event-recorder-reporter.ts +4 -4
  63. package/src/reporters/html-reporter.ts +4 -4
  64. package/src/reporters/index.ts +1 -1
  65. package/src/reporters/json-reporter.ts +4 -4
  66. package/src/reporters/mutation-test-report-helper.ts +12 -12
  67. package/src/reporters/mutation-timings-reporter.ts +4 -4
  68. package/src/reporters/progress-append-only-reporter.ts +1 -1
  69. package/src/reporters/progress-keeper.ts +3 -3
  70. package/src/reporters/progress-reporter.ts +2 -2
  71. package/src/reporters/strict-reporter.ts +1 -1
  72. package/src/sandbox/create-preprocessor.ts +2 -2
  73. package/src/sandbox/disable-type-checks-preprocessor.ts +4 -4
  74. package/src/sandbox/sandbox.ts +4 -4
  75. package/src/sandbox/ts-config-preprocessor.ts +3 -3
  76. package/src/stryker-cli.ts +1 -1
  77. package/src/stryker-package.ts +1 -1
  78. package/src/stryker-server.ts +5 -5
  79. package/src/stryker.ts +2 -2
  80. package/src/test-runner/child-process-test-runner-proxy.ts +4 -4
  81. package/src/test-runner/child-process-test-runner-worker.ts +4 -4
  82. package/src/test-runner/command-test-runner.ts +3 -3
  83. package/src/test-runner/index.ts +4 -4
  84. package/src/test-runner/max-test-runner-reuse-decorator.ts +2 -2
  85. package/src/test-runner/reload-environment-decorator.ts +1 -1
  86. package/src/test-runner/retry-rejected-decorator.ts +3 -3
  87. package/src/test-runner/test-runner-decorator.ts +1 -1
  88. package/src/test-runner/timeout-decorator.ts +3 -3
  89. package/src/unexpected-exit-handler.ts +1 -1
  90. package/src/utils/file-utils.ts +1 -1
  91. package/src/utils/object-utils.ts +2 -2
  92. package/src/utils/string-utils.ts +2 -2
  93. package/src/utils/temporary-directory.ts +3 -3
@@ -1,9 +1,9 @@
1
1
  import path from 'path';
2
2
 
3
- import { MutantResult } from '@stryker-mutator/api/core';
4
- import { Logger } from '@stryker-mutator/api/logging';
5
- import { commonTokens, tokens } from '@stryker-mutator/api/plugin';
6
- import { Reporter } from '@stryker-mutator/api/report';
3
+ import { MutantResult } from '@d-es-ign/stryker-js-api/core';
4
+ import { Logger } from '@d-es-ign/stryker-js-api/logging';
5
+ import { commonTokens, tokens } from '@d-es-ign/stryker-js-api/plugin';
6
+ import { Reporter } from '@d-es-ign/stryker-js-api/report';
7
7
 
8
8
  import { reporterUtil } from './reporter-util.js';
9
9
 
@@ -1,6 +1,6 @@
1
1
  import os from 'os';
2
2
 
3
- import { MutationTestingPlanReadyEvent } from '@stryker-mutator/api/report';
3
+ import { MutationTestingPlanReadyEvent } from '@d-es-ign/stryker-js-api/report';
4
4
 
5
5
  import { ProgressKeeper } from './progress-keeper.js';
6
6
 
@@ -3,14 +3,14 @@ import {
3
3
  MutantRunPlan,
4
4
  MutantTestPlan,
5
5
  PlanKind,
6
- } from '@stryker-mutator/api/core';
6
+ } from '@d-es-ign/stryker-js-api/core';
7
7
  import {
8
8
  DryRunCompletedEvent,
9
9
  MutationTestingPlanReadyEvent,
10
10
  Reporter,
11
11
  RunTiming,
12
- } from '@stryker-mutator/api/report';
13
- import { TestRunnerCapabilities } from '@stryker-mutator/api/test-runner';
12
+ } from '@d-es-ign/stryker-js-api/report';
13
+ import { TestRunnerCapabilities } from '@d-es-ign/stryker-js-api/test-runner';
14
14
 
15
15
  import { Timer } from '../utils/timer.js';
16
16
 
@@ -1,5 +1,5 @@
1
- import { MutantResult } from '@stryker-mutator/api/core';
2
- import { MutationTestingPlanReadyEvent } from '@stryker-mutator/api/report';
1
+ import { MutantResult } from '@d-es-ign/stryker-js-api/core';
2
+ import { MutationTestingPlanReadyEvent } from '@d-es-ign/stryker-js-api/report';
3
3
 
4
4
  import { progressBarWrapper } from './progress-bar.js';
5
5
  import { ProgressKeeper } from './progress-keeper.js';
@@ -1,3 +1,3 @@
1
- import { Reporter } from '@stryker-mutator/api/report';
1
+ import { Reporter } from '@d-es-ign/stryker-js-api/report';
2
2
 
3
3
  export type StrictReporter = Required<Reporter>;
@@ -3,9 +3,9 @@ import {
3
3
  Injector,
4
4
  commonTokens,
5
5
  PluginContext,
6
- } from '@stryker-mutator/api/plugin';
6
+ } from '@d-es-ign/stryker-js-api/plugin';
7
7
 
8
- import { disableTypeChecks } from '@stryker-mutator/instrumenter';
8
+ import { disableTypeChecks } from '@d-es-ign/stryker-js-instrumenter';
9
9
 
10
10
  import { coreTokens } from '../di/index.js';
11
11
 
@@ -1,9 +1,9 @@
1
1
  import path from 'path';
2
2
 
3
- import { commonTokens, tokens } from '@stryker-mutator/api/plugin';
4
- import { StrykerOptions } from '@stryker-mutator/api/core';
5
- import type { disableTypeChecks } from '@stryker-mutator/instrumenter';
6
- import { Logger } from '@stryker-mutator/api/logging';
3
+ import { commonTokens, tokens } from '@d-es-ign/stryker-js-api/plugin';
4
+ import { StrykerOptions } from '@d-es-ign/stryker-js-api/core';
5
+ import type { disableTypeChecks } from '@d-es-ign/stryker-js-instrumenter';
6
+ import { Logger } from '@d-es-ign/stryker-js-api/logging';
7
7
 
8
8
  import { optionsPath } from '../utils/index.js';
9
9
  import { coreTokens } from '../di/index.js';
@@ -2,14 +2,14 @@ import path from 'path';
2
2
 
3
3
  import type { execaCommand } from 'execa';
4
4
  import { npmRunPathEnv } from 'npm-run-path';
5
- import { StrykerOptions } from '@stryker-mutator/api/core';
5
+ import { StrykerOptions } from '@d-es-ign/stryker-js-api/core';
6
6
  import {
7
7
  normalizeWhitespaces,
8
8
  I,
9
9
  isErrnoException,
10
- } from '@stryker-mutator/util';
11
- import { Logger } from '@stryker-mutator/api/logging';
12
- import { tokens, commonTokens, Disposable } from '@stryker-mutator/api/plugin';
10
+ } from '@d-es-ign/stryker-js-util';
11
+ import { Logger } from '@d-es-ign/stryker-js-api/logging';
12
+ import { tokens, commonTokens, Disposable } from '@d-es-ign/stryker-js-api/plugin';
13
13
 
14
14
  import { TemporaryDirectory } from '../utils/temporary-directory.js';
15
15
  import { fileUtils } from '../utils/file-utils.js';
@@ -1,8 +1,8 @@
1
1
  import path from 'path';
2
2
 
3
- import { StrykerOptions } from '@stryker-mutator/api/core';
4
- import { tokens, commonTokens } from '@stryker-mutator/api/plugin';
5
- import { Logger } from '@stryker-mutator/api/logging';
3
+ import { StrykerOptions } from '@d-es-ign/stryker-js-api/core';
4
+ import { tokens, commonTokens } from '@d-es-ign/stryker-js-api/plugin';
5
+ import { Logger } from '@d-es-ign/stryker-js-api/logging';
6
6
 
7
7
  import { Project } from '../fs/project.js';
8
8
 
@@ -6,7 +6,7 @@ import {
6
6
  DashboardOptions,
7
7
  ALL_REPORT_TYPES,
8
8
  PartialStrykerOptions,
9
- } from '@stryker-mutator/api/core';
9
+ } from '@d-es-ign/stryker-js-api/core';
10
10
 
11
11
  import { initializerFactory } from './initializer/index.js';
12
12
  import { Stryker } from './stryker.js';
@@ -1,7 +1,7 @@
1
1
  import { fileURLToPath, URL } from 'url';
2
2
  import fs from 'fs';
3
3
 
4
- import { deepFreeze } from '@stryker-mutator/util';
4
+ import { deepFreeze } from '@d-es-ign/stryker-js-util';
5
5
 
6
6
  const pkg = deepFreeze(
7
7
  JSON.parse(
@@ -17,8 +17,8 @@ import net from 'net';
17
17
  import { on } from 'events';
18
18
  import { createInjector, Injector } from 'typed-inject';
19
19
  import { PrepareExecutor } from './process/1-prepare-executor.js';
20
- import { createInstrumenter } from '@stryker-mutator/instrumenter';
21
- import { commonTokens, PluginKind } from '@stryker-mutator/api/plugin';
20
+ import { createInstrumenter } from '@d-es-ign/stryker-js-instrumenter';
21
+ import { commonTokens, PluginKind } from '@d-es-ign/stryker-js-api/plugin';
22
22
  import { coreTokens } from './di/index.js';
23
23
  import { objectUtils } from './utils/object-utils.js';
24
24
  import { JsonRpcEventDeserializer } from './utils/json-rpc-event-deserializer.js';
@@ -27,8 +27,8 @@ import {
27
27
  LogLevel,
28
28
  MutantResult,
29
29
  PartialStrykerOptions,
30
- } from '@stryker-mutator/api/core';
31
- import { Reporter } from '@stryker-mutator/api/report';
30
+ } from '@d-es-ign/stryker-js-api/core';
31
+ import { Reporter } from '@d-es-ign/stryker-js-api/report';
32
32
  import { Stryker } from './stryker.js';
33
33
  import { promisify } from 'util';
34
34
  import { normalizeReportFileName } from './reporters/mutation-test-report-helper.js';
@@ -41,7 +41,7 @@ import {
41
41
  LoggingServer,
42
42
  LoggingServerAddress,
43
43
  } from './logging/index.js';
44
- import { Logger, LoggerFactoryMethod } from '@stryker-mutator/api/logging';
44
+ import { Logger, LoggerFactoryMethod } from '@d-es-ign/stryker-js-api/logging';
45
45
 
46
46
  export const rpcMethods = Object.freeze({
47
47
  configure: 'configure',
package/src/stryker.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { MutantResult, PartialStrykerOptions } from '@stryker-mutator/api/core';
1
+ import { MutantResult, PartialStrykerOptions } from '@d-es-ign/stryker-js-api/core';
2
2
  import { createInjector, Injector } from 'typed-inject';
3
- import { commonTokens } from '@stryker-mutator/api/plugin';
3
+ import { commonTokens } from '@d-es-ign/stryker-js-api/plugin';
4
4
 
5
5
  import {
6
6
  PrepareExecutor,
@@ -1,7 +1,7 @@
1
1
  import { URL } from 'url';
2
2
 
3
- import { FileDescriptions, StrykerOptions } from '@stryker-mutator/api/core';
4
- import { LoggerFactoryMethod } from '@stryker-mutator/api/logging';
3
+ import { FileDescriptions, StrykerOptions } from '@d-es-ign/stryker-js-api/core';
4
+ import { LoggerFactoryMethod } from '@d-es-ign/stryker-js-api/logging';
5
5
  import {
6
6
  TestRunner,
7
7
  DryRunOptions,
@@ -9,8 +9,8 @@ import {
9
9
  MutantRunResult,
10
10
  DryRunResult,
11
11
  TestRunnerCapabilities,
12
- } from '@stryker-mutator/api/test-runner';
13
- import { ExpirableTask } from '@stryker-mutator/util';
12
+ } from '@d-es-ign/stryker-js-api/test-runner';
13
+ import { ExpirableTask } from '@d-es-ign/stryker-js-util';
14
14
 
15
15
  import { ChildProcessCrashedError } from '../child-proxy/child-process-crashed-error.js';
16
16
  import { ChildProcessProxy } from '../child-proxy/child-process-proxy.js';
@@ -1,5 +1,5 @@
1
- import { StrykerOptions } from '@stryker-mutator/api/core';
2
- import { commonTokens, PluginKind, tokens } from '@stryker-mutator/api/plugin';
1
+ import { StrykerOptions } from '@d-es-ign/stryker-js-api/core';
2
+ import { commonTokens, PluginKind, tokens } from '@d-es-ign/stryker-js-api/plugin';
3
3
  import {
4
4
  TestRunner,
5
5
  DryRunOptions,
@@ -9,8 +9,8 @@ import {
9
9
  DryRunStatus,
10
10
  MutantRunStatus,
11
11
  TestRunnerCapabilities,
12
- } from '@stryker-mutator/api/test-runner';
13
- import { errorToString } from '@stryker-mutator/util';
12
+ } from '@d-es-ign/stryker-js-api/test-runner';
13
+ import { errorToString } from '@d-es-ign/stryker-js-util';
14
14
 
15
15
  import { coreTokens, PluginCreator } from '../di/index.js';
16
16
 
@@ -5,7 +5,7 @@ import {
5
5
  StrykerOptions,
6
6
  CommandRunnerOptions,
7
7
  INSTRUMENTER_CONSTANTS,
8
- } from '@stryker-mutator/api/core';
8
+ } from '@d-es-ign/stryker-js-api/core';
9
9
  import {
10
10
  TestRunner,
11
11
  TestStatus,
@@ -18,8 +18,8 @@ import {
18
18
  toMutantRunResult,
19
19
  TestRunnerCapabilities,
20
20
  DryRunOptions,
21
- } from '@stryker-mutator/api/test-runner';
22
- import { errorToString, testFilesProvided } from '@stryker-mutator/util';
21
+ } from '@d-es-ign/stryker-js-api/test-runner';
22
+ import { errorToString, testFilesProvided } from '@d-es-ign/stryker-js-util';
23
23
 
24
24
  import { objectUtils } from '../utils/object-utils.js';
25
25
  import { Timer } from '../utils/timer.js';
@@ -1,7 +1,7 @@
1
- import { TestRunner } from '@stryker-mutator/api/test-runner';
2
- import { FileDescriptions, StrykerOptions } from '@stryker-mutator/api/core';
3
- import { tokens, commonTokens } from '@stryker-mutator/api/plugin';
4
- import { LoggerFactoryMethod } from '@stryker-mutator/api/logging';
1
+ import { TestRunner } from '@d-es-ign/stryker-js-api/test-runner';
2
+ import { FileDescriptions, StrykerOptions } from '@d-es-ign/stryker-js-api/core';
3
+ import { tokens, commonTokens } from '@d-es-ign/stryker-js-api/plugin';
4
+ import { LoggerFactoryMethod } from '@d-es-ign/stryker-js-api/logging';
5
5
 
6
6
  import { LoggingServerAddress } from '../logging/index.js';
7
7
  import { coreTokens } from '../di/index.js';
@@ -2,9 +2,9 @@ import {
2
2
  MutantRunOptions,
3
3
  MutantRunResult,
4
4
  TestRunner,
5
- } from '@stryker-mutator/api/test-runner';
5
+ } from '@d-es-ign/stryker-js-api/test-runner';
6
6
 
7
- import { StrykerOptions } from '@stryker-mutator/api/core';
7
+ import { StrykerOptions } from '@d-es-ign/stryker-js-api/core';
8
8
 
9
9
  import { TestRunnerDecorator } from './test-runner-decorator.js';
10
10
 
@@ -4,7 +4,7 @@ import {
4
4
  MutantRunOptions,
5
5
  MutantRunResult,
6
6
  TestRunnerCapabilities,
7
- } from '@stryker-mutator/api/test-runner';
7
+ } from '@d-es-ign/stryker-js-api/test-runner';
8
8
 
9
9
  import { TestRunnerDecorator } from './test-runner-decorator.js';
10
10
 
@@ -6,13 +6,13 @@ import {
6
6
  MutantRunOptions,
7
7
  MutantRunStatus,
8
8
  TestRunner,
9
- } from '@stryker-mutator/api/test-runner';
10
- import { errorToString } from '@stryker-mutator/util';
9
+ } from '@d-es-ign/stryker-js-api/test-runner';
10
+ import { errorToString } from '@d-es-ign/stryker-js-util';
11
11
 
12
12
  import { OutOfMemoryError } from '../child-proxy/out-of-memory-error.js';
13
13
 
14
14
  import { TestRunnerDecorator } from './test-runner-decorator.js';
15
- import { Logger } from '@stryker-mutator/api/logging';
15
+ import { Logger } from '@d-es-ign/stryker-js-api/logging';
16
16
 
17
17
  const ERROR_MESSAGE =
18
18
  'Test runner crashed. Tried twice to restart it without any luck. Last time the error message was: ';
@@ -5,7 +5,7 @@ import {
5
5
  MutantRunResult,
6
6
  DryRunResult,
7
7
  TestRunnerCapabilities,
8
- } from '@stryker-mutator/api/test-runner';
8
+ } from '@d-es-ign/stryker-js-api/test-runner';
9
9
 
10
10
  import { ResourceDecorator } from '../concurrent/index.js';
11
11
 
@@ -6,11 +6,11 @@ import {
6
6
  MutantRunResult,
7
7
  MutantRunStatus,
8
8
  TestRunner,
9
- } from '@stryker-mutator/api/test-runner';
10
- import { ExpirableTask } from '@stryker-mutator/util';
9
+ } from '@d-es-ign/stryker-js-api/test-runner';
10
+ import { ExpirableTask } from '@d-es-ign/stryker-js-util';
11
11
 
12
12
  import { TestRunnerDecorator } from './test-runner-decorator.js';
13
- import { Logger } from '@stryker-mutator/api/logging';
13
+ import { Logger } from '@d-es-ign/stryker-js-api/logging';
14
14
 
15
15
  /**
16
16
  * Wraps a test runner and implements the timeout functionality.
@@ -1,4 +1,4 @@
1
- import { Disposable } from '@stryker-mutator/api/plugin';
1
+ import { Disposable } from '@d-es-ign/stryker-js-api/plugin';
2
2
 
3
3
  import { coreTokens } from './di/index.js';
4
4
 
@@ -1,7 +1,7 @@
1
1
  import path from 'path';
2
2
  import fs from 'fs';
3
3
 
4
- import { isErrnoException } from '@stryker-mutator/util';
4
+ import { isErrnoException } from '@d-es-ign/stryker-js-util';
5
5
 
6
6
  export const fileUtils = {
7
7
  /**
@@ -1,11 +1,11 @@
1
1
  import treeKill from 'tree-kill';
2
- import { StrykerError, KnownKeys } from '@stryker-mutator/util';
2
+ import { StrykerError, KnownKeys } from '@d-es-ign/stryker-js-util';
3
3
  import {
4
4
  Location,
5
5
  Position,
6
6
  schema,
7
7
  WarningOptions,
8
- } from '@stryker-mutator/api/core';
8
+ } from '@d-es-ign/stryker-js-api/core';
9
9
 
10
10
  export const objectUtils = {
11
11
  /**
@@ -1,5 +1,5 @@
1
- import { propertyPath } from '@stryker-mutator/util';
2
- import { StrykerOptions, schema } from '@stryker-mutator/api/core';
1
+ import { propertyPath } from '@d-es-ign/stryker-js-util';
2
+ import { StrykerOptions, schema } from '@d-es-ign/stryker-js-api/core';
3
3
  import emojiRegex from 'emoji-regex';
4
4
 
5
5
  const emojiRe = emojiRegex();
@@ -1,9 +1,9 @@
1
1
  import path from 'path';
2
2
  import fs from 'fs';
3
3
 
4
- import { StrykerOptions } from '@stryker-mutator/api/core';
5
- import { Logger } from '@stryker-mutator/api/logging';
6
- import { commonTokens, tokens } from '@stryker-mutator/api/plugin';
4
+ import { StrykerOptions } from '@d-es-ign/stryker-js-api/core';
5
+ import { Logger } from '@d-es-ign/stryker-js-api/logging';
6
+ import { commonTokens, tokens } from '@d-es-ign/stryker-js-api/plugin';
7
7
  import { Disposable } from 'typed-inject';
8
8
 
9
9
  export class TemporaryDirectory implements Disposable {