mootant 0.1.0 → 0.3.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/bin/mootant.js +3 -2
- package/dist/adapters/jest/build-dry-file.d.ts +12 -12
- package/dist/adapters/jest/collect-jest-dependencies.d.ts +15 -12
- package/dist/adapters/jest/collect-jest-dependencies.js +20 -14
- package/dist/adapters/jest/get-jest-cache-inputs.d.ts +14 -13
- package/dist/adapters/jest/index.d.ts +3 -1
- package/dist/adapters/jest/run-dry.js +20 -20
- package/dist/adapters/jest/runner.d.ts +1 -1
- package/dist/adapters/jest/runner.js +1 -1
- package/dist/adapters/jest/start-jest-session.d.ts +6 -2
- package/dist/adapters/jest/start-jest-session.js +9 -2
- package/dist/adapters/jest/types/jest-handle.d.ts +2 -1
- package/dist/adapters/jest/types/jest-record.d.ts +5 -4
- package/dist/adapters/jest/types/unit-worker.d.ts +16 -8
- package/dist/adapters/jest/types/worker-channel.d.ts +7 -0
- package/dist/adapters/jest/types/worker-session.d.ts +6 -7
- package/dist/adapters/jest/worker/boot-worker.d.ts +5 -3
- package/dist/adapters/jest/worker/create-test-runner.d.ts +4 -1
- package/dist/adapters/jest/worker/keep-reset-loads.d.ts +13 -0
- package/dist/adapters/jest/worker/list-runtime-files.d.ts +13 -0
- package/dist/adapters/jest/worker/run-unit.d.ts +24 -17
- package/dist/adapters/jest/worker/vm-setup.js +1 -1
- package/dist/adapters/jest/worker/worker.js +1 -1
- package/dist/adapters/jest/write-worker-session.d.ts +1 -2
- package/dist/adapters/jest/write-worker-session.js +2 -2
- package/dist/adapters/node-test/check-typescript.js +2 -2
- package/dist/adapters/node-test/collect-node-dependencies.d.ts +7 -5
- package/dist/adapters/node-test/collect-node-dependencies.js +26 -20
- package/dist/adapters/node-test/create-spare-processes.d.ts +26 -0
- package/dist/adapters/node-test/create-spare-processes.js +53 -0
- package/dist/adapters/node-test/filter-exec-argv.d.ts +2 -1
- package/dist/adapters/node-test/filter-exec-argv.js +13 -12
- package/dist/adapters/node-test/get-node-cache-inputs.js +1 -1
- package/dist/adapters/node-test/get-unit-deadline.d.ts +6 -5
- package/dist/adapters/node-test/index.d.ts +2 -2
- package/dist/adapters/node-test/index.js +1 -0
- package/dist/adapters/node-test/is-group-alive.d.ts +8 -0
- package/dist/adapters/node-test/is-group-alive.js +8 -0
- package/dist/adapters/node-test/list-setup-files.js +2 -2
- package/dist/adapters/node-test/place-preload.d.ts +2 -1
- package/dist/adapters/node-test/place-preload.js +24 -18
- package/dist/adapters/node-test/preload/create-commonjs-route.js +1 -1
- package/dist/adapters/node-test/preload/preload.js +54 -49
- package/dist/adapters/node-test/preload/read-line-sync.d.ts +11 -0
- package/dist/adapters/node-test/preload/read-line-sync.js +25 -0
- package/dist/adapters/node-test/preload/read-unit.d.ts +11 -5
- package/dist/adapters/node-test/preload/read-unit.js +5 -4
- package/dist/adapters/node-test/run-isolated.d.ts +19 -10
- package/dist/adapters/node-test/run-isolated.js +68 -52
- package/dist/adapters/node-test/run-test-file.d.ts +12 -4
- package/dist/adapters/node-test/run-test-file.js +19 -14
- package/dist/adapters/node-test/run-test-process.d.ts +30 -13
- package/dist/adapters/node-test/run-test-process.js +38 -40
- package/dist/adapters/node-test/start-node-test-session.d.ts +10 -2
- package/dist/adapters/node-test/start-node-test-session.js +90 -84
- package/dist/adapters/node-test/start-test-process.d.ts +30 -0
- package/dist/adapters/node-test/start-test-process.js +27 -0
- package/dist/adapters/node-test/types/node-test-handle.d.ts +14 -1
- package/dist/adapters/node-test/types/node-test-record.d.ts +3 -3
- package/dist/adapters/node-test/types/node-test-unit.d.ts +6 -1
- package/dist/adapters/node-test/types/process-watch.d.ts +4 -3
- package/dist/adapters/node-test/types/spare-processes.d.ts +20 -0
- package/dist/adapters/node-test/types/test-process-outcome.d.ts +8 -1
- package/dist/adapters/shared/allows-spares.d.ts +11 -0
- package/dist/adapters/shared/allows-spares.js +23 -0
- package/dist/adapters/shared/create-environment-proxy.d.ts +4 -3
- package/dist/adapters/shared/create-input-filter.d.ts +29 -0
- package/dist/adapters/shared/create-input-filter.js +32 -0
- package/dist/adapters/shared/enable-compile-cache.d.ts +32 -0
- package/dist/adapters/shared/enable-compile-cache.js +7 -0
- package/dist/adapters/shared/find-tsconfig-property.d.ts +13 -0
- package/dist/adapters/shared/find-tsconfig-property.js +6 -0
- package/dist/adapters/shared/get-spare-limit.d.ts +10 -0
- package/dist/adapters/shared/get-spare-limit.js +5 -0
- package/dist/adapters/shared/index-environment-hashes.d.ts +2 -2
- package/dist/adapters/shared/index-environment-hashes.js +5 -13
- package/dist/adapters/{node-test → shared}/list-flag-values.d.ts +2 -1
- package/dist/adapters/shared/list-flag-values.js +10 -0
- package/dist/adapters/shared/list-tsconfig-files.d.ts +14 -5
- package/dist/adapters/shared/list-tsconfig-files.js +15 -13
- package/dist/adapters/shared/parse-tsconfig.d.ts +10 -0
- package/dist/adapters/shared/parse-tsconfig.js +19 -0
- package/dist/adapters/shared/read-flag-name.d.ts +9 -0
- package/dist/adapters/shared/read-flag-name.js +5 -0
- package/dist/adapters/shared/read-node-options.d.ts +11 -0
- package/dist/adapters/shared/read-node-options.js +6 -0
- package/dist/adapters/shared/read-prefork-switch.d.ts +10 -0
- package/dist/adapters/shared/read-prefork-switch.js +5 -0
- package/dist/adapters/shared/read-tsconfig-extends.d.ts +2 -5
- package/dist/adapters/shared/read-tsconfig-extends.js +16 -31
- package/dist/adapters/shared/read-tsconfig-references.d.ts +12 -0
- package/dist/adapters/shared/read-tsconfig-references.js +13 -0
- package/dist/adapters/shared/track-file-inputs.d.ts +7 -3
- package/dist/adapters/shared/track-file-inputs.js +16 -7
- package/dist/adapters/shared/track-file-reads.d.ts +13 -8
- package/dist/adapters/shared/track-file-reads.js +122 -69
- package/dist/adapters/shared/track-inputs.d.ts +13 -6
- package/dist/adapters/shared/track-inputs.js +7 -7
- package/dist/adapters/shared/track-process-group.d.ts +2 -1
- package/dist/adapters/shared/track-process-group.js +7 -2
- package/dist/adapters/shared/types/file-input-tracking.d.ts +6 -0
- package/dist/adapters/shared/types/input-tracking.d.ts +3 -3
- package/dist/adapters/vitest/build-isolated-facts.d.ts +4 -3
- package/dist/adapters/vitest/collect-dependencies.d.ts +10 -3
- package/dist/adapters/vitest/collect-dependencies.js +36 -26
- package/dist/adapters/vitest/configure-project.d.ts +3 -2
- package/dist/adapters/vitest/configure-project.js +1 -1
- package/dist/adapters/vitest/create-forks-pool.d.ts +34 -7
- package/dist/adapters/vitest/create-forks-pool.js +102 -24
- package/dist/adapters/vitest/create-interleaved-sequencer.d.ts +3 -2
- package/dist/adapters/vitest/drop-signal-listeners.d.ts +14 -0
- package/dist/adapters/vitest/drop-signal-listeners.js +15 -0
- package/dist/adapters/vitest/get-cache-inputs.d.ts +3 -1
- package/dist/adapters/vitest/get-cache-inputs.js +46 -29
- package/dist/adapters/vitest/get-module-file.d.ts +3 -5
- package/dist/adapters/vitest/get-module-file.js +1 -1
- package/dist/adapters/vitest/get-spare-key.d.ts +15 -0
- package/dist/adapters/vitest/get-spare-key.js +15 -0
- package/dist/adapters/vitest/index.d.ts +2 -1
- package/dist/adapters/vitest/index.js +1 -0
- package/dist/adapters/vitest/is-virtual-module.d.ts +10 -0
- package/dist/adapters/vitest/is-virtual-module.js +8 -0
- package/dist/adapters/vitest/list-script-defines.d.ts +13 -0
- package/dist/adapters/vitest/list-script-defines.js +22 -0
- package/dist/adapters/vitest/read-out-files.d.ts +7 -2
- package/dist/adapters/vitest/read-out-files.js +5 -5
- package/dist/adapters/vitest/read-out-records.d.ts +17 -0
- package/dist/adapters/vitest/read-out-records.js +27 -0
- package/dist/adapters/vitest/read-strays.d.ts +20 -0
- package/dist/adapters/vitest/read-strays.js +53 -0
- package/dist/adapters/vitest/read-unit-inputs.d.ts +9 -2
- package/dist/adapters/vitest/read-unit-inputs.js +1 -1
- package/dist/adapters/vitest/run-dry.js +17 -17
- package/dist/adapters/vitest/run-plan.d.ts +10 -6
- package/dist/adapters/vitest/run-plan.js +16 -16
- package/dist/adapters/vitest/run-specifications.d.ts +11 -3
- package/dist/adapters/vitest/run-specifications.js +22 -12
- package/dist/adapters/vitest/runner.d.ts +92 -46
- package/dist/adapters/vitest/runner.js +126 -104
- package/dist/adapters/vitest/start-vitest-session.d.ts +5 -1
- package/dist/adapters/vitest/start-vitest-session.js +64 -59
- package/dist/adapters/vitest/stop-hung-worker.d.ts +11 -4
- package/dist/adapters/vitest/stop-hung-worker.js +20 -7
- package/dist/adapters/vitest/types/mootant-forks-pool.d.ts +47 -0
- package/dist/adapters/vitest/types/stray-decisions.d.ts +8 -0
- package/dist/adapters/vitest/types/unit-outcome.d.ts +2 -1
- package/dist/adapters/vitest/types/vitest-session-state.d.ts +9 -8
- package/dist/adapters/vitest/types/vitest-worker.d.ts +118 -32
- package/dist/adapters/vitest/wait-for-workers.d.ts +5 -2
- package/dist/adapters/vitest/wait-for-workers.js +15 -15
- package/dist/adapters/vitest/worker/encode-stray.d.ts +16 -0
- package/dist/adapters/vitest/worker/encode-stray.js +16 -0
- package/dist/adapters/vitest/worker/intercept-strays.d.ts +26 -0
- package/dist/adapters/vitest/worker/intercept-strays.js +13 -0
- package/dist/adapters/vitest/worker/read-try-facts.d.ts +5 -4
- package/dist/adapters/vitest/worker/track-meta-defines.d.ts +39 -0
- package/dist/adapters/vitest/worker/track-meta-defines.js +23 -0
- package/dist/adapters/vitest/worker/track-values.d.ts +38 -0
- package/dist/adapters/vitest/worker/track-values.js +45 -0
- package/dist/adapters/vitest/worker/value-prefixes.d.ts +12 -0
- package/dist/adapters/vitest/worker/value-prefixes.js +6 -0
- package/dist/adapters/vitest/worker/wait-for-turn.d.ts +8 -6
- package/dist/adapters/vitest/worker/watch-property.d.ts +17 -0
- package/dist/adapters/vitest/worker/watch-property.js +27 -0
- package/dist/adapters/vitest/worker/write-out-record.d.ts +2 -2
- package/dist/cli/create-run-progress.d.ts +8 -1
- package/dist/cli/create-run-progress.js +4 -1
- package/dist/cli/ensure-exit.d.ts +11 -0
- package/dist/cli/ensure-exit.js +15 -0
- package/dist/cli/html/build-html-report.js +2 -1
- package/dist/cli/html/client/main.js +1 -1
- package/dist/cli/html/client/render-change.d.ts +3 -2
- package/dist/cli/html/client/render-code.d.ts +1 -1
- package/dist/cli/html/client/render-overview.d.ts +3 -3
- package/dist/cli/html/pack-replacement.d.ts +1 -1
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +3 -2
- package/dist/cli/parse-arguments.d.ts +4 -0
- package/dist/cli/parse-arguments.js +4 -1
- package/dist/cli/report/build-list-report.js +1 -1
- package/dist/cli/report/build-run-report.js +2 -1
- package/dist/cli/report/format-command.d.ts +5 -0
- package/dist/cli/report/format-command.js +1 -1
- package/dist/cli/report/format-file-groups.d.ts +1 -1
- package/dist/cli/report/format-run-text-report.d.ts +5 -4
- package/dist/cli/report/format-run-text-report.js +10 -10
- package/dist/cli/report/slim-run-report.d.ts +10 -10
- package/dist/cli/report/slim-run-report.js +1 -0
- package/dist/cli/run-mutation.d.ts +5 -1
- package/dist/cli/run-mutation.js +55 -47
- package/dist/cli/terminal/create-spinner.d.ts +2 -3
- package/dist/cli/terminal/create-spinner.js +23 -32
- package/dist/cli/terminal/get-text-style.js +4 -4
- package/dist/cli/watch-interrupts.d.ts +41 -0
- package/dist/cli/watch-interrupts.js +32 -0
- package/dist/core/cache/apply-cached-units.d.ts +8 -7
- package/dist/core/cache/build-hash.d.ts +9 -0
- package/dist/core/cache/build-hash.js +2 -0
- package/dist/core/cache/cache-version.d.ts +4 -4
- package/dist/core/cache/check-dry-snapshot.d.ts +25 -0
- package/dist/core/cache/check-dry-snapshot.js +13 -0
- package/dist/core/cache/create-dry-reuse-miss.d.ts +12 -0
- package/dist/core/cache/create-dry-reuse-miss.js +7 -0
- package/dist/core/cache/create-dry-snapshot.d.ts +71 -0
- package/dist/core/cache/create-dry-snapshot.js +27 -0
- package/dist/core/cache/create-run-cache.d.ts +20 -2
- package/dist/core/cache/create-run-cache.js +31 -22
- package/dist/core/cache/create-snapshot-session.d.ts +12 -0
- package/dist/core/cache/create-snapshot-session.js +19 -0
- package/dist/core/cache/get-build-id.d.ts +11 -0
- package/dist/core/cache/get-build-id.js +7 -0
- package/dist/core/cache/get-cache-path.d.ts +1 -1
- package/dist/core/cache/get-cache-path.js +1 -1
- package/dist/core/cache/get-dry-snapshot-key.d.ts +47 -0
- package/dist/core/cache/get-dry-snapshot-key.js +43 -0
- package/dist/core/cache/get-dry-snapshot-path.d.ts +9 -0
- package/dist/core/cache/get-dry-snapshot-path.js +5 -0
- package/dist/core/cache/get-environment-key.d.ts +9 -4
- package/dist/core/cache/get-environment-key.js +5 -4
- package/dist/core/cache/get-test-file-keys.d.ts +2 -1
- package/dist/core/cache/get-test-file-keys.js +11 -10
- package/dist/core/cache/hash-files.d.ts +11 -6
- package/dist/core/cache/hash-files.js +22 -17
- package/dist/core/cache/hash-project-tree.d.ts +22 -0
- package/dist/core/cache/hash-project-tree.js +69 -0
- package/dist/core/cache/is-dry-reuse-miss.d.ts +8 -0
- package/dist/core/cache/is-dry-reuse-miss.js +4 -0
- package/dist/core/cache/list-file-hashes.d.ts +4 -0
- package/dist/core/cache/list-file-hashes.js +5 -2
- package/dist/core/cache/list-install-states.d.ts +12 -0
- package/dist/core/cache/list-install-states.js +19 -0
- package/dist/core/cache/list-variable-hashes.d.ts +15 -0
- package/dist/core/cache/list-variable-hashes.js +14 -0
- package/dist/core/cache/prepare-run-cache.d.ts +64 -16
- package/dist/core/cache/prepare-run-cache.js +109 -62
- package/dist/core/cache/read-dry-snapshot.d.ts +10 -0
- package/dist/core/cache/read-dry-snapshot.js +15 -0
- package/dist/core/cache/read-run-cache.js +6 -2
- package/dist/core/cache/save-dry-snapshot.d.ts +34 -0
- package/dist/core/cache/save-dry-snapshot.js +32 -0
- package/dist/core/cache/save-run-cache.d.ts +8 -7
- package/dist/core/cache/save-run-cache.js +2 -1
- package/dist/core/cache/unknown-hash.d.ts +7 -0
- package/dist/core/cache/unknown-hash.js +2 -0
- package/dist/core/cache/volatile-variables.d.ts +7 -0
- package/dist/core/cache/volatile-variables.js +11 -0
- package/dist/core/cache/write-run-cache.js +1 -1
- package/dist/core/config/load-typescript-config.d.ts +6 -1
- package/dist/core/config/load-typescript-config.js +26 -10
- package/dist/core/config/prepare-run.d.ts +7 -3
- package/dist/core/config/prepare-run.js +1 -0
- package/dist/core/config/resolve-run-settings.d.ts +3 -2
- package/dist/core/config/resolve-run-settings.js +1 -0
- package/dist/core/config/validate-config.js +3 -2
- package/dist/core/files/get-package-manifest.d.ts +12 -0
- package/dist/core/files/get-package-manifest.js +7 -0
- package/dist/core/files/select-changed-mutants.d.ts +11 -6
- package/dist/core/files/select-changed-mutants.js +38 -13
- package/dist/core/generate/apply-solitary-rule.d.ts +8 -5
- package/dist/core/generate/apply-solitary-rule.js +36 -29
- package/dist/core/generate/collect-candidates.d.ts +23 -5
- package/dist/core/generate/collect-candidates.js +202 -92
- package/dist/core/generate/compare-targets.d.ts +14 -0
- package/dist/core/generate/compare-targets.js +6 -0
- package/dist/core/generate/deduplicate-candidates.d.ts +6 -4
- package/dist/core/generate/deduplicate-candidates.js +11 -9
- package/dist/core/generate/find-list-removal.d.ts +20 -0
- package/dist/core/generate/find-list-removal.js +26 -0
- package/dist/core/generate/generate-file-mutants.js +49 -47
- package/dist/core/generate/get-mutant-site.d.ts +18 -0
- package/dist/core/generate/get-mutant-site.js +4 -0
- package/dist/core/generate/get-target.d.ts +14 -0
- package/dist/core/generate/get-target.js +4 -0
- package/dist/core/generate/pick-host.d.ts +10 -0
- package/dist/core/generate/pick-host.js +16 -0
- package/dist/core/generate/validate-replacement.d.ts +15 -4
- package/dist/core/generate/validate-replacement.js +28 -13
- package/dist/core/ignore/find-ignore-rule.d.ts +8 -7
- package/dist/core/index.d.ts +18 -0
- package/dist/core/instrument/find-attribute-values.d.ts +12 -0
- package/dist/core/instrument/find-attribute-values.js +13 -0
- package/dist/core/instrument/get-site-syntax.d.ts +14 -0
- package/dist/core/instrument/get-site-syntax.js +12 -0
- package/dist/core/instrument/group-mutant-ranges.d.ts +7 -3
- package/dist/core/instrument/group-mutant-ranges.js +25 -19
- package/dist/core/instrument/instrument-file.d.ts +5 -3
- package/dist/core/instrument/instrument-file.js +10 -9
- package/dist/core/instrument/instrumenter-version.d.ts +1 -1
- package/dist/core/instrument/render-branch.d.ts +17 -0
- package/dist/core/instrument/render-branch.js +81 -0
- package/dist/core/instrument/render-mutant-range.d.ts +17 -6
- package/dist/core/instrument/render-mutant-range.js +39 -13
- package/dist/core/list-mutants.d.ts +7 -5
- package/dist/core/list-mutants.js +2 -2
- package/dist/core/mutators/array-element.d.ts +7 -6
- package/dist/core/mutators/array-element.js +13 -13
- package/dist/core/mutators/assignment-operator.js +34 -33
- package/dist/core/mutators/boolean-literal.d.ts +3 -2
- package/dist/core/mutators/number-literal.d.ts +1 -1
- package/dist/core/mutators/object-property.d.ts +4 -3
- package/dist/core/mutators/object-property.js +7 -8
- package/dist/core/mutators/return-value.js +65 -33
- package/dist/core/mutators/shared/get-branch-copy-skip.d.ts +14 -9
- package/dist/core/mutators/shared/get-branch-copy-skip.js +34 -35
- package/dist/core/mutators/shared/get-canonical-falsy-default.d.ts +32 -0
- package/dist/core/mutators/shared/get-canonical-falsy-default.js +11 -0
- package/dist/core/mutators/shared/get-comparison-plan.d.ts +2 -2
- package/dist/core/mutators/shared/get-comparison-plan.js +86 -85
- package/dist/core/mutators/shared/get-condition-constants.d.ts +8 -8
- package/dist/core/mutators/shared/get-condition-constants.js +3 -3
- package/dist/core/mutators/shared/get-default-option-skip.d.ts +2 -2
- package/dist/core/mutators/shared/get-endless-value.d.ts +20 -0
- package/dist/core/mutators/shared/get-endless-value.js +25 -0
- package/dist/core/mutators/shared/get-forced-test-justifier.d.ts +44 -0
- package/dist/core/mutators/shared/get-forced-test-justifier.js +25 -0
- package/dist/core/mutators/shared/get-group-constant.d.ts +6 -6
- package/dist/core/mutators/shared/get-group-constant.js +2 -2
- package/dist/core/mutators/shared/get-literal-skip.d.ts +9 -9
- package/dist/core/mutators/shared/get-literal-skip.js +2 -2
- package/dist/core/mutators/shared/get-logical-drops.d.ts +8 -8
- package/dist/core/mutators/shared/get-logical-drops.js +80 -82
- package/dist/core/mutators/shared/get-loop-running-skip.d.ts +2 -2
- package/dist/core/mutators/shared/get-nullish-swap-skip.d.ts +2 -2
- package/dist/core/mutators/shared/get-or-default-skip.d.ts +2 -2
- package/dist/core/mutators/shared/get-owned-constants.d.ts +2 -2
- package/dist/core/mutators/shared/get-owner-constant.d.ts +3 -1
- package/dist/core/mutators/shared/get-running-value.d.ts +5 -4
- package/dist/core/mutators/shared/get-toward-mutant.d.ts +10 -2
- package/dist/core/mutators/shared/get-toward-mutant.js +45 -40
- package/dist/core/mutators/shared/has-other-exit.js +16 -36
- package/dist/core/mutators/shared/is-loop-exit.d.ts +20 -0
- package/dist/core/mutators/shared/is-loop-exit.js +32 -0
- package/dist/core/mutators/shared/is-read-only.d.ts +26 -0
- package/dist/core/mutators/shared/is-read-only.js +53 -0
- package/dist/core/mutators/shared/leave-now-skip.d.ts +2 -2
- package/dist/core/mutators/shared/no-op-callback-skip.d.ts +2 -2
- package/dist/core/mutators/statement-removal.d.ts +4 -3
- package/dist/core/mutators/statement-removal.js +69 -73
- package/dist/core/mutators/string-literal.d.ts +15 -5
- package/dist/core/mutators/string-literal.js +79 -50
- package/dist/core/plugins/create-mutator-registry.d.ts +4 -2
- package/dist/core/plugins/create-mutator-registry.js +15 -5
- package/dist/core/plugins/validate-plugin.d.ts +3 -3
- package/dist/core/plugins/validate-plugin.js +32 -10
- package/dist/core/presets/recommended.d.ts +2 -2
- package/dist/core/presets/strict.d.ts +4 -2
- package/dist/core/regex/collect-pattern-changes.d.ts +2 -2
- package/dist/core/regex/create-regex-replacement.d.ts +2 -2
- package/dist/core/run/apply-batch-result.d.ts +23 -22
- package/dist/core/run/apply-batch-result.js +5 -5
- package/dist/core/run/apply-isolated-result.d.ts +21 -12
- package/dist/core/run/apply-isolated-result.js +45 -25
- package/dist/core/run/classify-try.d.ts +9 -8
- package/dist/core/run/count-run.d.ts +2 -1
- package/dist/core/run/create-run-state.d.ts +5 -0
- package/dist/core/run/create-run-state.js +1 -0
- package/dist/core/run/create-work-directory.d.ts +4 -1
- package/dist/core/run/create-work-directory.js +15 -12
- package/dist/core/run/decide-evidence.d.ts +4 -3
- package/dist/core/run/get-test-file-limits.d.ts +13 -0
- package/dist/core/run/get-test-file-limits.js +13 -0
- package/dist/core/run/get-unit-evidence.d.ts +12 -3
- package/dist/core/run/get-unit-evidence.js +1 -1
- package/dist/core/run/guard-session.d.ts +18 -0
- package/dist/core/run/guard-session.js +30 -0
- package/dist/core/run/live-work-directories.d.ts +5 -0
- package/dist/core/run/live-work-directories.js +2 -0
- package/dist/core/run/plan-batch.d.ts +6 -3
- package/dist/core/run/plan-batch.js +36 -31
- package/dist/core/run/plan-isolated.d.ts +3 -1
- package/dist/core/run/plan-isolated.js +8 -14
- package/dist/core/run/read-isolated-unit.d.ts +9 -6
- package/dist/core/run/read-isolated-unit.js +77 -38
- package/dist/core/run/remove-live-work-directories.d.ts +7 -0
- package/dist/core/run/remove-live-work-directories.js +12 -0
- package/dist/core/run/run-batch-phases.d.ts +4 -3
- package/dist/core/run/run-dry-phase.d.ts +35 -19
- package/dist/core/run/run-dry-phase.js +127 -77
- package/dist/core/run/run-isolated-rounds.d.ts +15 -10
- package/dist/core/run/run-isolated-rounds.js +4 -2
- package/dist/core/run/validate-adapter.d.ts +1 -1
- package/dist/core/run/validate-adapter.js +1 -1
- package/dist/core/run-mutants.d.ts +59 -22
- package/dist/core/run-mutants.js +356 -208
- package/dist/core/runtime/create-hit-limit-error.d.ts +5 -3
- package/dist/core/runtime/create-hit-limit-error.js +1 -1
- package/dist/core/runtime/install-mutant-runtime.js +23 -6
- package/dist/core/runtime/runtime-version.d.ts +4 -4
- package/dist/core/skips/skip-rules.d.ts +7 -1
- package/dist/core/skips/skip-rules.js +4 -0
- package/dist/core/syntax/is-brace-sensitive-attribute.d.ts +18 -0
- package/dist/core/syntax/is-brace-sensitive-attribute.js +28 -0
- package/dist/core/syntax/is-spread-safe-member.d.ts +18 -0
- package/dist/core/syntax/is-spread-safe-member.js +18 -0
- package/dist/core/syntax/is-value-position.d.ts +3 -1
- package/dist/core/text/get-list-removal-range.d.ts +22 -0
- package/dist/core/text/get-list-removal-range.js +46 -0
- package/dist/core/text/is-plain-attribute-string.d.ts +10 -0
- package/dist/core/text/is-plain-attribute-string.js +5 -0
- package/dist/core/text/parse-expression.d.ts +8 -4
- package/dist/core/text/parse-expression.js +1 -0
- package/dist/core/text/remove-list-element.d.ts +2 -4
- package/dist/core/text/remove-list-element.js +4 -45
- package/dist/docs/styles/colors.js +1 -1
- package/dist/package.js +1 -1
- package/dist/types/adapter/adapter-context.d.ts +20 -0
- package/dist/types/adapter/adapter-session.d.ts +2 -1
- package/dist/types/adapter/cache-inputs.d.ts +3 -2
- package/dist/types/adapter/dry-file.d.ts +6 -3
- package/dist/types/adapter/dry-run-request.d.ts +5 -4
- package/dist/types/adapter/isolated-plan.d.ts +2 -1
- package/dist/types/adapter/isolated-result.d.ts +3 -1
- package/dist/types/adapter/mutant-runtime.d.ts +30 -1
- package/dist/types/adapter/run-inputs.d.ts +5 -4
- package/dist/types/adapter/test-adapter.d.ts +7 -0
- package/dist/types/cache/cache-entry.d.ts +9 -7
- package/dist/types/cache/cached-inputs.d.ts +2 -2
- package/dist/types/cache/dry-snapshot.d.ts +76 -0
- package/dist/types/cache/project-tree.d.ts +16 -0
- package/dist/types/cache/run-cache-file.d.ts +1 -1
- package/dist/types/cache/run-cache.d.ts +6 -5
- package/dist/types/cli/text-style.d.ts +1 -1
- package/dist/types/config/plugin.d.ts +11 -2
- package/dist/types/config/preset-settings.d.ts +2 -2
- package/dist/types/config/run-config.d.ts +22 -4
- package/dist/types/config/run-settings.d.ts +6 -0
- package/dist/types/html/indexed-mutant.d.ts +4 -2
- package/dist/types/html/shown-change.d.ts +4 -3
- package/dist/types/mutant/core-note.d.ts +12 -0
- package/dist/types/mutant/diagnostic.d.ts +1 -0
- package/dist/types/mutant/list-removal.d.ts +37 -0
- package/dist/types/mutant/mutant-candidate.d.ts +11 -17
- package/dist/types/mutant/mutant-host.d.ts +49 -0
- package/dist/types/mutant/mutant-kind.d.ts +18 -0
- package/dist/types/mutant/mutant-range.d.ts +15 -8
- package/dist/types/mutant/mutant.d.ts +9 -15
- package/dist/types/mutant/registered-skip-rule.d.ts +11 -0
- package/dist/types/mutant/site-syntax.d.ts +14 -0
- package/dist/types/mutant/skip-justifier.d.ts +3 -1
- package/dist/types/mutant/skip-note.d.ts +7 -6
- package/dist/types/mutant/skip-rule-id.d.ts +3 -2
- package/dist/types/mutant/skip-rule.d.ts +2 -1
- package/dist/types/mutant/skipped-candidate.d.ts +27 -17
- package/dist/types/mutant/skipped-mutant.d.ts +15 -12
- package/dist/types/mutator/mutator.d.ts +3 -2
- package/dist/types/mutator/registered-mutator.d.ts +8 -0
- package/dist/types/mutator/replacement.d.ts +14 -3
- package/dist/types/regex/regex-change.d.ts +2 -2
- package/dist/types/report/html-report.d.ts +13 -9
- package/dist/types/report/list-report-focus.d.ts +3 -2
- package/dist/types/report/list-report-justifier.d.ts +4 -2
- package/dist/types/report/list-report-mutant.d.ts +15 -9
- package/dist/types/report/list-report-skipped.d.ts +6 -4
- package/dist/types/report/list-report.d.ts +1 -1
- package/dist/types/report/run-report.d.ts +13 -4
- package/dist/types/report/slim-list-report.d.ts +6 -3
- package/dist/types/report/slim-run-report.d.ts +2 -2
- package/dist/types/run/isolated-evidence.d.ts +3 -2
- package/dist/types/run/isolated-reason.d.ts +6 -4
- package/dist/types/run/mutant-state.d.ts +1 -1
- package/dist/types/run/run-durations.d.ts +8 -3
- package/dist/types/run/run-event.d.ts +11 -8
- package/dist/types/run/run-kind.d.ts +3 -2
- package/dist/types/run/run-result.d.ts +17 -5
- package/dist/types/run/run-state.d.ts +30 -1
- package/dist/types/run/run-status.d.ts +2 -2
- package/dist/types/run/try-cause.d.ts +10 -7
- package/dist/types/syntax/syntax-helpers.d.ts +5 -3
- package/package.json +5 -5
- package/readme.md +85 -68
- package/skills/mootant/SKILL.md +50 -31
- package/skills/mootant/references/mutators.md +31 -23
- package/dist/adapters/node-test/list-flag-values.js +0 -9
- package/dist/core/instrument/get-site-check.d.ts +0 -9
- package/dist/core/instrument/get-site-check.js +0 -5
- package/dist/core/instrument/get-template-site-check.d.ts +0 -12
- package/dist/core/instrument/get-template-site-check.js +0 -5
- /package/dist/adapters/{node-test → shared}/loader-flags.d.ts +0 -0
- /package/dist/adapters/{node-test → shared}/loader-flags.js +0 -0
- /package/dist/cli/{built-in-adapters.d.ts → get-built-in-adapters.d.ts} +0 -0
- /package/dist/cli/{built-in-adapters.js → get-built-in-adapters.js} +0 -0
- /package/dist/cli/terminal/{colors.d.ts → create-colors.d.ts} +0 -0
- /package/dist/cli/terminal/{colors.js → create-colors.js} +0 -0
- /package/dist/{adapters/shared → core/files}/list-package-files.d.ts +0 -0
- /package/dist/{adapters/shared → core/files}/list-package-files.js +0 -0
- /package/dist/{adapters/shared → core/files}/read-package-type.d.ts +0 -0
- /package/dist/{adapters/shared → core/files}/read-package-type.js +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Node } from 'oxc-parser';
|
|
2
|
-
import { SkipRuleId } from './skip-rule-id.js';
|
|
3
2
|
/**
|
|
4
3
|
* Why a mutator does not emit a replacement it would otherwise make.
|
|
5
4
|
*/
|
|
@@ -18,13 +17,15 @@ export interface SkipNote {
|
|
|
18
17
|
heuristic?: boolean
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
22
|
-
* rule is a heuristic.
|
|
20
|
+
* Plain-English reason, worded to follow `skipped: `.
|
|
23
21
|
*/
|
|
24
|
-
|
|
22
|
+
reason: string
|
|
25
23
|
|
|
26
24
|
/**
|
|
27
|
-
*
|
|
25
|
+
* Name of the rule, which gives the category and whether the rule is a
|
|
26
|
+
* heuristic: a key of the `skipRules` of the mutator's plugin, else an id of
|
|
27
|
+
* the registry. A skip with any other rule is a mutator error, and its
|
|
28
|
+
* replacement is dropped.
|
|
28
29
|
*/
|
|
29
|
-
|
|
30
|
+
rule: string
|
|
30
31
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { skipRules } from '../../core/skips/skip-rules.js';
|
|
2
2
|
/**
|
|
3
|
-
* Id of a skip rule of the registry: a catalog label such as
|
|
4
|
-
* short kebab-case name such as `lower-bound`.
|
|
3
|
+
* Id of a built-in skip rule, a key of the registry: a catalog label such as
|
|
4
|
+
* `O3` or `R2`, or a short kebab-case name such as `lower-bound`. Rules of a
|
|
5
|
+
* plugin are not among them.
|
|
5
6
|
*/
|
|
6
7
|
export type SkipRuleId = keyof typeof skipRules
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import { RegisteredMutator } from '../mutator/registered-mutator.js';
|
|
2
2
|
import { SkipJustifier } from './skip-justifier.js';
|
|
3
|
+
import { SkipCategory } from './skip-category.js';
|
|
3
4
|
import { TextEdit } from '../source/text-edit.js';
|
|
4
|
-
import {
|
|
5
|
+
import { MutantKind } from './mutant-kind.js';
|
|
5
6
|
/**
|
|
6
7
|
* Replacement that was considered and not emitted, before it is sorted.
|
|
7
8
|
*/
|
|
8
9
|
export interface SkippedCandidate {
|
|
9
|
-
/**
|
|
10
|
-
* How the mutant switch would host the replacement, derived from the replaced
|
|
11
|
-
* node; null when it cannot host it.
|
|
12
|
-
*/
|
|
13
|
-
kind: 'expression' | 'block' | null
|
|
14
|
-
|
|
15
10
|
/**
|
|
16
11
|
* Mutator that considered the replacement.
|
|
17
12
|
*/
|
|
@@ -23,13 +18,27 @@ export interface SkippedCandidate {
|
|
|
23
18
|
by: SkipJustifier | null
|
|
24
19
|
|
|
25
20
|
/**
|
|
26
|
-
*
|
|
21
|
+
* How the mutant switch would host the replacement, derived from the replaced
|
|
22
|
+
* node or from the literal of a removed element or member; null when it
|
|
23
|
+
* cannot host it.
|
|
24
|
+
*/
|
|
25
|
+
kind: MutantKind | null
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Category of the skip rule.
|
|
29
|
+
*/
|
|
30
|
+
category: SkipCategory
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Whether the skip rests on a guess: its rule is a heuristic, or the skip
|
|
34
|
+
* also rests on one.
|
|
27
35
|
*/
|
|
28
36
|
heuristic: boolean
|
|
29
37
|
|
|
30
38
|
/**
|
|
31
39
|
* Edit inside the replaced range that the mutant amounts to, which reports
|
|
32
|
-
* show in place of the whole range;
|
|
40
|
+
* show in place of the whole range; set when the mutator names one, and on
|
|
41
|
+
* every removal of kind `element` or `property`.
|
|
33
42
|
*/
|
|
34
43
|
focus?: TextEdit
|
|
35
44
|
|
|
@@ -38,28 +47,29 @@ export interface SkippedCandidate {
|
|
|
38
47
|
*/
|
|
39
48
|
emission: number
|
|
40
49
|
|
|
41
|
-
/**
|
|
42
|
-
* Id of the skip rule.
|
|
43
|
-
*/
|
|
44
|
-
rule: SkipRuleId
|
|
45
|
-
|
|
46
50
|
/**
|
|
47
51
|
* Plain-English reason of the skip.
|
|
48
52
|
*/
|
|
49
53
|
reason: string
|
|
50
54
|
|
|
51
55
|
/**
|
|
52
|
-
* Start of the replaced
|
|
56
|
+
* Start of the replaced range.
|
|
53
57
|
*/
|
|
54
58
|
start: number
|
|
55
59
|
|
|
56
60
|
/**
|
|
57
|
-
* Text that would have been written in place of the
|
|
61
|
+
* Text that would have been written in place of the range.
|
|
58
62
|
*/
|
|
59
63
|
text: string
|
|
60
64
|
|
|
61
65
|
/**
|
|
62
|
-
*
|
|
66
|
+
* Id of the skip rule: a built-in id, or `namespace/name` for a rule of a
|
|
67
|
+
* plugin.
|
|
68
|
+
*/
|
|
69
|
+
rule: string
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* End of the replaced range.
|
|
63
73
|
*/
|
|
64
74
|
end: number
|
|
65
75
|
}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { SkipJustifier } from './skip-justifier.js';
|
|
2
2
|
import { SkipCategory } from './skip-category.js';
|
|
3
3
|
import { TextEdit } from '../source/text-edit.js';
|
|
4
|
-
import {
|
|
4
|
+
import { MutantKind } from './mutant-kind.js';
|
|
5
5
|
/**
|
|
6
6
|
* Mutation that a mutator or the pipeline considered and did not emit. It has
|
|
7
7
|
* no id and never runs.
|
|
8
8
|
*/
|
|
9
9
|
export interface SkippedMutant {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* node; null when it cannot host it.
|
|
11
|
+
* Mutant that justifies the skip, or null when no single mutant does.
|
|
13
12
|
*/
|
|
14
|
-
|
|
13
|
+
by: SkipJustifier | null
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
16
|
+
* How the mutant switch would host the replacement, derived from the replaced
|
|
17
|
+
* node or from the literal of a removed element or member; null when it
|
|
18
|
+
* cannot host it.
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
|
+
kind: MutantKind | null
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Category of the skip rule.
|
|
@@ -35,15 +36,11 @@ export interface SkippedMutant {
|
|
|
35
36
|
|
|
36
37
|
/**
|
|
37
38
|
* Edit inside the replaced range that the mutant amounts to, which reports
|
|
38
|
-
* show in place of the whole range;
|
|
39
|
+
* show in place of the whole range; set when the mutator names one, and on
|
|
40
|
+
* every removal of kind `element` or `property`.
|
|
39
41
|
*/
|
|
40
42
|
focus?: TextEdit
|
|
41
43
|
|
|
42
|
-
/**
|
|
43
|
-
* Id of the skip rule.
|
|
44
|
-
*/
|
|
45
|
-
rule: SkipRuleId
|
|
46
|
-
|
|
47
44
|
/**
|
|
48
45
|
* Id of the mutator that considered the mutation.
|
|
49
46
|
*/
|
|
@@ -59,6 +56,12 @@ export interface SkippedMutant {
|
|
|
59
56
|
*/
|
|
60
57
|
start: number
|
|
61
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Id of the skip rule: a built-in id such as `O3` or `lower-bound`, or
|
|
61
|
+
* `namespace/name` for a rule of a plugin.
|
|
62
|
+
*/
|
|
63
|
+
rule: string
|
|
64
|
+
|
|
62
65
|
/**
|
|
63
66
|
* Path of the file relative to the working directory, with `/` separators.
|
|
64
67
|
*/
|
|
@@ -7,8 +7,9 @@ import { MutatorMeta } from './mutator-meta.js';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface Mutator<Options extends object = object> {
|
|
9
9
|
/**
|
|
10
|
-
* Creates the visitors for one
|
|
11
|
-
*
|
|
10
|
+
* Creates the visitors for one program: a file, or a script block or the
|
|
11
|
+
* template of a Vue or Svelte file. Mootant calls it once per program, so the
|
|
12
|
+
* visitors may keep state for that program in the closure.
|
|
12
13
|
*/
|
|
13
14
|
create(context: MutatorContext<Options>): MutatorVisitors
|
|
14
15
|
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
import { RegisteredSkipRule } from '../mutant/registered-skip-rule.js';
|
|
1
2
|
import { Mutator } from './mutator.js';
|
|
2
3
|
/**
|
|
3
4
|
* Mutator known to the registry.
|
|
4
5
|
*/
|
|
5
6
|
export interface RegisteredMutator {
|
|
7
|
+
/**
|
|
8
|
+
* Skip rules of the plugin of the mutator, keyed by the name a skip gives,
|
|
9
|
+
* each with its id `namespace/name`, which a skip names before the built-in
|
|
10
|
+
* rules; omitted for a built-in mutator.
|
|
11
|
+
*/
|
|
12
|
+
skipRules?: ReadonlyMap<string, RegisteredSkipRule>
|
|
13
|
+
|
|
6
14
|
/**
|
|
7
15
|
* Module that produces the replacements.
|
|
8
16
|
*/
|
|
@@ -16,7 +16,8 @@ export interface Replacement {
|
|
|
16
16
|
/**
|
|
17
17
|
* Edit inside the replaced node that the mutant amounts to, such as the
|
|
18
18
|
* changed part of a regular expression pattern. Reports show it in place of
|
|
19
|
-
* the whole node; the mutant still replaces the whole node.
|
|
19
|
+
* the whole node; the mutant still replaces the whole node. Mootant sets the
|
|
20
|
+
* focus of a removed element or member, whatever the mutator gives.
|
|
20
21
|
*/
|
|
21
22
|
focus?: TextEdit
|
|
22
23
|
|
|
@@ -30,13 +31,23 @@ export interface Replacement {
|
|
|
30
31
|
/**
|
|
31
32
|
* Text written in place of the node, built from slices of the original
|
|
32
33
|
* source. An expression must parse inside parentheses, a statement list
|
|
33
|
-
* inside braces.
|
|
34
|
+
* inside braces. An empty text for an element of an array literal or a member
|
|
35
|
+
* of an object literal removes it with its comma.
|
|
34
36
|
*/
|
|
35
37
|
text: string
|
|
36
38
|
|
|
37
39
|
/**
|
|
38
40
|
* Node whose whole range, from `node.start` to `node.end`, is replaced: an
|
|
39
|
-
* expression in a value position or a statement of the runtime tree.
|
|
41
|
+
* expression in a value position or a statement of the runtime tree. A quoted
|
|
42
|
+
* JSX attribute value is replaced too when it and the text are string
|
|
43
|
+
* literals without a backslash, a control character or a character reference,
|
|
44
|
+
* and a compiler such as Solid's reads the attribute the same way in braces,
|
|
45
|
+
* where Mootant hosts it: not for `value`, a boolean attribute, a name that
|
|
46
|
+
* starts with `on`, `ref`, `children`, `class`, `className`, `classList`,
|
|
47
|
+
* `style`, `innerHTML`, `innerText`, `textContent`, or an attribute of a
|
|
48
|
+
* custom element or of Solid's namespaces, such as `bool:`. With an empty
|
|
49
|
+
* text, an element of an array literal or a member of an object literal is
|
|
50
|
+
* removed with its comma instead.
|
|
40
51
|
*/
|
|
41
52
|
node: Node
|
|
42
53
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CoreNote } from '../mutant/core-note.js';
|
|
2
2
|
/**
|
|
3
3
|
* Edit of a regular expression pattern that a regex mutator considers, with
|
|
4
4
|
* offsets relative to the pattern.
|
|
@@ -7,7 +7,7 @@ export interface RegexChange {
|
|
|
7
7
|
/**
|
|
8
8
|
* Why the change is not emitted, or null when it is.
|
|
9
9
|
*/
|
|
10
|
-
skip:
|
|
10
|
+
skip: CoreNote | null
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Offset of the first replaced character of the pattern.
|
|
@@ -3,6 +3,7 @@ import { ListReportMutator } from './list-report-mutator.js';
|
|
|
3
3
|
import { IsolatedReason } from '../run/isolated-reason.js';
|
|
4
4
|
import { IgnoreSource } from '../mutant/ignore-source.js';
|
|
5
5
|
import { SkipCategory } from '../mutant/skip-category.js';
|
|
6
|
+
import { MutantKind } from '../mutant/mutant-kind.js';
|
|
6
7
|
import { Diagnostic } from '../mutant/diagnostic.js';
|
|
7
8
|
import { RunStatus } from '../run/run-status.js';
|
|
8
9
|
import { TryCause } from '../run/try-cause.js';
|
|
@@ -15,7 +16,8 @@ import { TryCause } from '../run/try-cause.js';
|
|
|
15
16
|
export interface HtmlReportMutant {
|
|
16
17
|
/**
|
|
17
18
|
* Part of the range the change amounts to, as offsets and the text written in
|
|
18
|
-
* its place, when the mutator names one
|
|
19
|
+
* its place, when the mutator names one or the mutant removes an array
|
|
20
|
+
* element or an object member.
|
|
19
21
|
*/
|
|
20
22
|
focus?: { replacement: string; start: number; end: number }
|
|
21
23
|
|
|
@@ -26,6 +28,11 @@ export interface HtmlReportMutant {
|
|
|
26
28
|
*/
|
|
27
29
|
testFiles?: [file: number, tests: number][]
|
|
28
30
|
|
|
31
|
+
/**
|
|
32
|
+
* How the mutant is switched on (see `MutantKind`); absent for an expression.
|
|
33
|
+
*/
|
|
34
|
+
kind?: Exclude<MutantKind, 'expression'>
|
|
35
|
+
|
|
29
36
|
/**
|
|
30
37
|
* Lengths of the start and the end of the original that the replacement
|
|
31
38
|
* keeps, when storing only the text between them is shorter.
|
|
@@ -111,11 +118,6 @@ export interface HtmlReportMutant {
|
|
|
111
118
|
*/
|
|
112
119
|
scope?: number
|
|
113
120
|
|
|
114
|
-
/**
|
|
115
|
-
* `block` for a mutant that replaces a block; absent for an expression.
|
|
116
|
-
*/
|
|
117
|
-
kind?: 'block'
|
|
118
|
-
|
|
119
121
|
/**
|
|
120
122
|
* Whether the verdict came from the cache.
|
|
121
123
|
*/
|
|
@@ -156,7 +158,8 @@ export interface HtmlReportSkipped {
|
|
|
156
158
|
|
|
157
159
|
/**
|
|
158
160
|
* Part of the range the change amounts to, as offsets and the text written in
|
|
159
|
-
* its place, when the mutator names one
|
|
161
|
+
* its place, when the mutator names one or the mutant removes an array
|
|
162
|
+
* element or an object member.
|
|
160
163
|
*/
|
|
161
164
|
focus?: { replacement: string; start: number; end: number }
|
|
162
165
|
|
|
@@ -198,7 +201,8 @@ export interface HtmlReportSkipped {
|
|
|
198
201
|
start: number
|
|
199
202
|
|
|
200
203
|
/**
|
|
201
|
-
* Id of the skip rule, such as `O3
|
|
204
|
+
* Id of the skip rule, such as `O3`, `lower-bound` or, for a rule of a
|
|
205
|
+
* plugin, `namespace/name`.
|
|
202
206
|
*/
|
|
203
207
|
rule: string
|
|
204
208
|
|
|
@@ -279,7 +283,7 @@ export interface HtmlReport {
|
|
|
279
283
|
*/
|
|
280
284
|
export interface HtmlReportMeta extends Pick<
|
|
281
285
|
RunReport,
|
|
282
|
-
'runnerVersion' | 'runner' | 'preset' | 'since' | 'mode'
|
|
286
|
+
'parallelUnits' | 'runnerVersion' | 'runner' | 'preset' | 'since' | 'mode'
|
|
283
287
|
> {
|
|
284
288
|
/**
|
|
285
289
|
* Characters ids are cut to: the shortest that tells apart every listed
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Part of a mutant's range that the mutant changes, such as the edited part of
|
|
3
|
-
* a regular expression pattern
|
|
4
|
-
* `replacement` of the mutant; the focus
|
|
3
|
+
* a regular expression pattern or a removed array element without its comma.
|
|
4
|
+
* Apply the mutant with `original` and `replacement` of the mutant; the focus
|
|
5
|
+
* only says where to look.
|
|
5
6
|
*/
|
|
6
7
|
export interface ListReportFocus {
|
|
7
8
|
/**
|
|
@@ -15,12 +15,14 @@ export interface ListReportJustifier {
|
|
|
15
15
|
mutator: string
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* 1-based UTF-16 column of the
|
|
18
|
+
* 1-based UTF-16 column of the justifying mutant: of its focus, or of the
|
|
19
|
+
* range it replaces when it has none.
|
|
19
20
|
*/
|
|
20
21
|
column: number
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
|
-
* 1-based line of the
|
|
24
|
+
* 1-based line of the justifying mutant: of its focus, or of the range it
|
|
25
|
+
* replaces when it has none.
|
|
24
26
|
*/
|
|
25
27
|
line: number
|
|
26
28
|
}
|
|
@@ -2,6 +2,7 @@ import { IgnoreSource } from '../mutant/ignore-source.js';
|
|
|
2
2
|
import { MutantStatus } from '../mutant/mutant-status.js';
|
|
3
3
|
import { ListReportFocus } from './list-report-focus.js';
|
|
4
4
|
import { ListReportDiff } from './list-report-diff.js';
|
|
5
|
+
import { MutantKind } from '../mutant/mutant-kind.js';
|
|
5
6
|
/**
|
|
6
7
|
* Mutant as an agent needs it, without reading the file, with its source lines
|
|
7
8
|
* before and after it is applied.
|
|
@@ -13,14 +14,10 @@ export interface ListReportMutant extends ListReportDiff {
|
|
|
13
14
|
ignoredBy: IgnoreSource | null
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Part of the range the change amounts to, present when the mutator names
|
|
23
|
-
* one; text reports show its position and texts.
|
|
17
|
+
* Part of the range the change amounts to, present when the mutator names one
|
|
18
|
+
* and on every mutant of kind `element` or `property`; text reports show its
|
|
19
|
+
* position and texts, and ignore directives cover a mutant of those kinds at
|
|
20
|
+
* its line.
|
|
24
21
|
*/
|
|
25
22
|
focus?: ListReportFocus
|
|
26
23
|
|
|
@@ -50,13 +47,22 @@ export interface ListReportMutant extends ListReportDiff {
|
|
|
50
47
|
*/
|
|
51
48
|
endColumn: number
|
|
52
49
|
|
|
50
|
+
/**
|
|
51
|
+
* How the mutant will be switched on, and so how to apply it: wrap the
|
|
52
|
+
* replacement in parentheses for `expression`, and these in braces in place
|
|
53
|
+
* of a quoted JSX attribute value, as in `type={("")}`; in braces for
|
|
54
|
+
* `block`; and write it as is for `element` and `property`, which remove an
|
|
55
|
+
* array element or an object member with its comma.
|
|
56
|
+
*/
|
|
57
|
+
kind: MutantKind
|
|
58
|
+
|
|
53
59
|
/**
|
|
54
60
|
* Source text the mutant replaces.
|
|
55
61
|
*/
|
|
56
62
|
original: string
|
|
57
63
|
|
|
58
64
|
/**
|
|
59
|
-
* 1-based line of the last replaced character.
|
|
65
|
+
* 1-based line of the offset just past the last replaced character.
|
|
60
66
|
*/
|
|
61
67
|
endLine: number
|
|
62
68
|
|
|
@@ -11,8 +11,9 @@ export interface ListReportSkipped {
|
|
|
11
11
|
by: ListReportJustifier | null
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Part of the range the change amounts to, present when the mutator names
|
|
15
|
-
*
|
|
14
|
+
* Part of the range the change amounts to, present when the mutator names one
|
|
15
|
+
* and on every removal of an array element or an object member with its
|
|
16
|
+
* comma; text reports show its position and texts.
|
|
16
17
|
*/
|
|
17
18
|
focus?: ListReportFocus
|
|
18
19
|
|
|
@@ -69,8 +70,9 @@ export interface ListReportSkipped {
|
|
|
69
70
|
line: number
|
|
70
71
|
|
|
71
72
|
/**
|
|
72
|
-
* Id of the skip rule: a catalog label such as `O3` or `R2`,
|
|
73
|
-
* kebab-case name such as `lower-bound` or `duplicate
|
|
73
|
+
* Id of the skip rule: a catalog label such as `O3` or `R2`, a short
|
|
74
|
+
* kebab-case name such as `lower-bound` or `duplicate`, or `namespace/name`
|
|
75
|
+
* for a rule of a plugin.
|
|
74
76
|
*/
|
|
75
77
|
rule: string
|
|
76
78
|
|
|
@@ -111,13 +111,14 @@ export interface RunReportMutant extends Omit<ListReportMutant, 'status'> {
|
|
|
111
111
|
*/
|
|
112
112
|
export interface RunReportSummary {
|
|
113
113
|
/**
|
|
114
|
-
* Test runner runs by kind; kinds that did not run are left out
|
|
114
|
+
* Test runner runs by kind; kinds that did not run are left out, the dry run
|
|
115
|
+
* too when the run reused the dry run of an earlier run.
|
|
115
116
|
*/
|
|
116
117
|
runs: Partial<Record<RunKind, number>>
|
|
117
118
|
|
|
118
119
|
/**
|
|
119
120
|
* Tests whose two dry tries differed in pass/fail or stray errors, or null
|
|
120
|
-
* outside fast mode
|
|
121
|
+
* outside fast mode.
|
|
121
122
|
*/
|
|
122
123
|
totalUnrepeatableTests: number | null
|
|
123
124
|
|
|
@@ -214,7 +215,8 @@ export interface RunReportSummary {
|
|
|
214
215
|
totalErrors: number
|
|
215
216
|
|
|
216
217
|
/**
|
|
217
|
-
* Tests the dry run ran
|
|
218
|
+
* Tests the dry run ran, or the dry run of an earlier run that the run
|
|
219
|
+
* reused.
|
|
218
220
|
*/
|
|
219
221
|
totalTests: number
|
|
220
222
|
|
|
@@ -285,11 +287,18 @@ export interface RunReport {
|
|
|
285
287
|
*/
|
|
286
288
|
files: ListReportFile[]
|
|
287
289
|
|
|
290
|
+
/**
|
|
291
|
+
* True when isolated units of one test file ran at the same time
|
|
292
|
+
* (`run.parallelUnits`), so tests that share a fixed file, port or database
|
|
293
|
+
* may have given false verdicts, mostly false kills; left out otherwise.
|
|
294
|
+
*/
|
|
295
|
+
parallelUnits?: true
|
|
296
|
+
|
|
288
297
|
/**
|
|
289
298
|
* Version of the report shape. It changes when a field changes meaning or is
|
|
290
299
|
* removed; new fields do not change it.
|
|
291
300
|
*/
|
|
292
|
-
schemaVersion:
|
|
301
|
+
schemaVersion: 4
|
|
293
302
|
|
|
294
303
|
/**
|
|
295
304
|
* Command that produced the report.
|
|
@@ -40,7 +40,7 @@ export interface SlimListReport {
|
|
|
40
40
|
/**
|
|
41
41
|
* Version of the report shape, the same as of the full report.
|
|
42
42
|
*/
|
|
43
|
-
schemaVersion:
|
|
43
|
+
schemaVersion: 4
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* Command that produced the report.
|
|
@@ -70,7 +70,9 @@ export interface SlimListReportMutant extends Pick<
|
|
|
70
70
|
ignoredBy?: NonNullable<ListReportMutant['ignoredBy']>
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Part of the range the change amounts to, when the mutator names one
|
|
73
|
+
* Part of the range the change amounts to, when the mutator names one or the
|
|
74
|
+
* mutant removes an array element or an object member with its comma, which
|
|
75
|
+
* ignore directives then cover at the line of the focus.
|
|
74
76
|
*/
|
|
75
77
|
focus?: SlimReportFocus
|
|
76
78
|
|
|
@@ -99,7 +101,8 @@ export interface SlimListReportSkipped extends Omit<
|
|
|
99
101
|
by?: NonNullable<ListReportSkipped['by']>
|
|
100
102
|
|
|
101
103
|
/**
|
|
102
|
-
* Part of the range the change amounts to, when the mutator names one
|
|
104
|
+
* Part of the range the change amounts to, when the mutator names one or the
|
|
105
|
+
* change removes an array element or an object member with its comma.
|
|
103
106
|
*/
|
|
104
107
|
focus?: SlimReportFocus
|
|
105
108
|
}
|
|
@@ -115,7 +115,7 @@ export interface SlimRunReportSummary extends Pick<
|
|
|
115
115
|
*/
|
|
116
116
|
export interface SlimRunReport extends Pick<
|
|
117
117
|
RunReport,
|
|
118
|
-
'runner' | 'listed' | 'preset' | 'mode'
|
|
118
|
+
'parallelUnits' | 'runner' | 'listed' | 'preset' | 'mode'
|
|
119
119
|
> {
|
|
120
120
|
/**
|
|
121
121
|
* Mutants of the mutated files, in file and canonical order: the ones to act
|
|
@@ -141,7 +141,7 @@ export interface SlimRunReport extends Pick<
|
|
|
141
141
|
/**
|
|
142
142
|
* Version of the report shape, the same as of the full report.
|
|
143
143
|
*/
|
|
144
|
-
schemaVersion:
|
|
144
|
+
schemaVersion: 4
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* Command that produced the report.
|
|
@@ -2,8 +2,9 @@ import { MutantVerdict } from './mutant-state.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Evidence of one isolated test file of a mutant: a kill, a timeout or an
|
|
4
4
|
* error, `none` for a file done without one (it passed or did not reach the
|
|
5
|
-
* mutant), `confirming` while a timeout waits for its confirmation
|
|
6
|
-
* `retrying` while a unit the test runner
|
|
5
|
+
* mutant), `confirming` while a timeout waits for its confirmation or a crash
|
|
6
|
+
* for the second run of its unit, or `retrying` while a unit the test runner
|
|
7
|
+
* did not report, or an inconclusive one, waits for its retry.
|
|
7
8
|
*/
|
|
8
9
|
export type IsolatedEvidence =
|
|
9
10
|
MutantVerdict | 'confirming' | 'retrying' | 'none'
|
|
@@ -6,13 +6,15 @@
|
|
|
6
6
|
* tries;
|
|
7
7
|
* - `unrepeatable`: in fast mode, a covering test passed once and failed once
|
|
8
8
|
* without a mutant, or had stray errors;
|
|
9
|
-
* - `doubtful`: a batch try could not decide it (see `TryVerdict`)
|
|
10
|
-
* next to its kill failed, a late error followed
|
|
11
|
-
* batch unit failed, or no batch try reached
|
|
9
|
+
* - `doubtful`: a batch try could not decide it (see `TryVerdict`) or went over
|
|
10
|
+
* its hit limit, a control try next to its kill failed, a late error followed
|
|
11
|
+
* its try, a suite hook of its batch unit failed, or no batch try reached
|
|
12
|
+
* it;
|
|
12
13
|
* - `batch-survivor`: it passed every batch try that reached it; batch passes are
|
|
13
14
|
* not trusted, so a fresh module graph with its whole covering test files
|
|
14
15
|
* decides whether it survives;
|
|
15
|
-
* - `recovery`: batch tries
|
|
16
|
+
* - `recovery`: its batch tries were still missing after two recovery runs, or
|
|
17
|
+
* went missing in the confirmation run;
|
|
16
18
|
* - `no-batch`: in fast mode, the adapter has no batch mode.
|
|
17
19
|
*/
|
|
18
20
|
export type IsolatedReason =
|
|
@@ -8,7 +8,7 @@ import { TryCause } from './try-cause.js';
|
|
|
8
8
|
export interface MutantState {
|
|
9
9
|
/**
|
|
10
10
|
* Batch tries that ran out of time with it and wait for a confirmation with
|
|
11
|
-
*
|
|
11
|
+
* twice the time of their whole test file.
|
|
12
12
|
*/
|
|
13
13
|
confirm: { cause: 'time-limit' | 'hang'; test: string }[]
|
|
14
14
|
|
|
@@ -9,17 +9,22 @@ export interface RunDurations {
|
|
|
9
9
|
batch: number | null
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Isolated runs, retries and confirmations included
|
|
12
|
+
* Isolated runs, retries and confirmations included, and saving the cache and
|
|
13
|
+
* the dry run for later runs.
|
|
13
14
|
*/
|
|
14
15
|
isolated: number
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
|
-
* Loading the configuration, listing mutants
|
|
18
|
+
* Loading the configuration, listing mutants, checking the dry run of an
|
|
19
|
+
* earlier run and hashing the project, and starting the test runner when that
|
|
20
|
+
* dry run is not reused.
|
|
18
21
|
*/
|
|
19
22
|
startup: number
|
|
20
23
|
|
|
21
24
|
/**
|
|
22
|
-
* Dry runs, the uninstrumented check of failing tests included
|
|
25
|
+
* Dry runs, the uninstrumented check of failing tests included, and preparing
|
|
26
|
+
* the cache; only the latter when the run reuses the dry run of an earlier
|
|
27
|
+
* run.
|
|
23
28
|
*/
|
|
24
29
|
dryRun: number
|
|
25
30
|
|