mootant 0.0.0 → 0.1.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 +5 -0
- package/dist/adapters/jest/build-dry-file.d.ts +54 -0
- package/dist/adapters/jest/build-dry-file.js +73 -0
- package/dist/adapters/jest/build-isolated-facts.d.ts +45 -0
- package/dist/adapters/jest/build-isolated-facts.js +37 -0
- package/dist/adapters/jest/check-jest-support.d.ts +16 -0
- package/dist/adapters/jest/check-jest-support.js +5 -0
- package/dist/adapters/jest/check-repeatable.d.ts +39 -0
- package/dist/adapters/jest/check-repeatable.js +63 -0
- package/dist/adapters/jest/collect-jest-dependencies.d.ts +25 -0
- package/dist/adapters/jest/collect-jest-dependencies.js +15 -0
- package/dist/adapters/jest/create-heap-cap.d.ts +16 -0
- package/dist/adapters/jest/create-heap-cap.js +12 -0
- package/dist/adapters/jest/create-record-reader.d.ts +14 -0
- package/dist/adapters/jest/create-record-reader.js +25 -0
- package/dist/adapters/jest/create-worker-pool.d.ts +16 -0
- package/dist/adapters/jest/create-worker-pool.js +41 -0
- package/dist/adapters/jest/filter-jest-arguments.d.ts +32 -0
- package/dist/adapters/jest/filter-jest-arguments.js +210 -0
- package/dist/adapters/jest/find-jest-command.d.ts +15 -0
- package/dist/adapters/jest/find-jest-command.js +117 -0
- package/dist/adapters/jest/fold-attempts.d.ts +13 -0
- package/dist/adapters/jest/fold-attempts.js +21 -0
- package/dist/adapters/jest/get-dry-deadline.d.ts +20 -0
- package/dist/adapters/jest/get-dry-deadline.js +8 -0
- package/dist/adapters/jest/get-jest-base-arguments.d.ts +13 -0
- package/dist/adapters/jest/get-jest-base-arguments.js +18 -0
- package/dist/adapters/jest/get-jest-cache-directory.d.ts +9 -0
- package/dist/adapters/jest/get-jest-cache-directory.js +5 -0
- package/dist/adapters/jest/get-jest-cache-inputs.d.ts +61 -0
- package/dist/adapters/jest/get-jest-cache-inputs.js +58 -0
- package/dist/adapters/jest/get-jest-console.d.ts +22 -0
- package/dist/adapters/jest/get-jest-console.js +5 -0
- package/dist/adapters/jest/get-unit-deadline.d.ts +15 -0
- package/dist/adapters/jest/get-unit-deadline.js +8 -0
- package/dist/adapters/jest/index.d.ts +13 -0
- package/dist/adapters/jest/index.js +11 -0
- package/dist/adapters/jest/insert-jest-flags.d.ts +9 -0
- package/dist/adapters/jest/insert-jest-flags.js +9 -0
- package/dist/adapters/jest/is-transform-input.d.ts +14 -0
- package/dist/adapters/jest/is-transform-input.js +9 -0
- package/dist/adapters/jest/keep-late-transforms.d.ts +16 -0
- package/dist/adapters/jest/keep-late-transforms.js +5 -0
- package/dist/adapters/jest/keep-transform-reads.d.ts +34 -0
- package/dist/adapters/jest/keep-transform-reads.js +30 -0
- package/dist/adapters/jest/list-jest-config-files.d.ts +21 -0
- package/dist/adapters/jest/list-jest-config-files.js +29 -0
- package/dist/adapters/jest/list-jest-config-paths.d.ts +19 -0
- package/dist/adapters/jest/list-jest-config-paths.js +24 -0
- package/dist/adapters/jest/list-jest-projects.d.ts +24 -0
- package/dist/adapters/jest/list-jest-projects.js +29 -0
- package/dist/adapters/jest/list-jest-test-files.d.ts +21 -0
- package/dist/adapters/jest/list-jest-test-files.js +16 -0
- package/dist/adapters/jest/list-unserved-files.d.ts +16 -0
- package/dist/adapters/jest/list-unserved-files.js +12 -0
- package/dist/adapters/jest/read-host-config.d.ts +28 -0
- package/dist/adapters/jest/read-host-config.js +26 -0
- package/dist/adapters/jest/read-jest-config.d.ts +27 -0
- package/dist/adapters/jest/read-jest-config.js +43 -0
- package/dist/adapters/jest/read-teardown.d.ts +23 -0
- package/dist/adapters/jest/read-teardown.js +34 -0
- package/dist/adapters/jest/resolve-jest-packages.d.ts +20 -0
- package/dist/adapters/jest/resolve-jest-packages.js +45 -0
- package/dist/adapters/jest/results-mark.d.ts +6 -0
- package/dist/adapters/jest/results-mark.js +2 -0
- package/dist/adapters/jest/run-dry.d.ts +37 -0
- package/dist/adapters/jest/run-dry.js +165 -0
- package/dist/adapters/jest/run-isolated.d.ts +26 -0
- package/dist/adapters/jest/run-isolated.js +113 -0
- package/dist/adapters/jest/run-on-worker.d.ts +46 -0
- package/dist/adapters/jest/run-on-worker.js +76 -0
- package/dist/adapters/jest/runner.d.ts +23 -0
- package/dist/adapters/jest/runner.js +2 -0
- package/dist/adapters/jest/score-jest.d.ts +12 -0
- package/dist/adapters/jest/score-jest.js +19 -0
- package/dist/adapters/jest/start-jest-host.d.ts +37 -0
- package/dist/adapters/jest/start-jest-host.js +85 -0
- package/dist/adapters/jest/start-jest-session.d.ts +40 -0
- package/dist/adapters/jest/start-jest-session.js +185 -0
- package/dist/adapters/jest/start-worker.d.ts +32 -0
- package/dist/adapters/jest/start-worker.js +50 -0
- package/dist/adapters/jest/transform-config-names.d.ts +6 -0
- package/dist/adapters/jest/transform-config-names.js +20 -0
- package/dist/adapters/jest/ts-jest-path.d.ts +7 -0
- package/dist/adapters/jest/ts-jest-path.js +2 -0
- package/dist/adapters/jest/types/booted-project.d.ts +25 -0
- package/dist/adapters/jest/types/circus-event.d.ts +103 -0
- package/dist/adapters/jest/types/circus-state.d.ts +50 -0
- package/dist/adapters/jest/types/error-realm.d.ts +7 -0
- package/dist/adapters/jest/types/flag-kind.d.ts +6 -0
- package/dist/adapters/jest/types/folded-test.d.ts +55 -0
- package/dist/adapters/jest/types/heap-cap.d.ts +18 -0
- package/dist/adapters/jest/types/host-test.d.ts +26 -0
- package/dist/adapters/jest/types/inline-cjs.d.ts +7 -0
- package/dist/adapters/jest/types/jest-adapter-options.d.ts +22 -0
- package/dist/adapters/jest/types/jest-command.d.ts +27 -0
- package/dist/adapters/jest/types/jest-config.d.ts +16 -0
- package/dist/adapters/jest/types/jest-console.d.ts +6 -0
- package/dist/adapters/jest/types/jest-file-facts.d.ts +14 -0
- package/dist/adapters/jest/types/jest-file-result.d.ts +47 -0
- package/dist/adapters/jest/types/jest-global-config.d.ts +49 -0
- package/dist/adapters/jest/types/jest-handle.d.ts +119 -0
- package/dist/adapters/jest/types/jest-host.d.ts +72 -0
- package/dist/adapters/jest/types/jest-module-map.d.ts +15 -0
- package/dist/adapters/jest/types/jest-packages.d.ts +57 -0
- package/dist/adapters/jest/types/jest-project-config.d.ts +112 -0
- package/dist/adapters/jest/types/jest-project.d.ts +16 -0
- package/dist/adapters/jest/types/jest-ready.d.ts +58 -0
- package/dist/adapters/jest/types/jest-record.d.ts +333 -0
- package/dist/adapters/jest/types/jest-test-runner.d.ts +46 -0
- package/dist/adapters/jest/types/jest-timed-record.d.ts +6 -0
- package/dist/adapters/jest/types/jest-unit.d.ts +42 -0
- package/dist/adapters/jest/types/jest-worker.d.ts +49 -0
- package/dist/adapters/jest/types/record-reader.d.ts +16 -0
- package/dist/adapters/jest/types/unit-outcome.d.ts +45 -0
- package/dist/adapters/jest/types/unit-worker.d.ts +166 -0
- package/dist/adapters/jest/types/vm-side.d.ts +43 -0
- package/dist/adapters/jest/types/worker-calls.d.ts +66 -0
- package/dist/adapters/jest/types/worker-channel.d.ts +53 -0
- package/dist/adapters/jest/types/worker-files.d.ts +31 -0
- package/dist/adapters/jest/types/worker-pool.d.ts +55 -0
- package/dist/adapters/jest/types/worker-process.d.ts +64 -0
- package/dist/adapters/jest/types/worker-project.d.ts +15 -0
- package/dist/adapters/jest/types/worker-session.d.ts +63 -0
- package/dist/adapters/jest/types/worker-slot.d.ts +20 -0
- package/dist/adapters/jest/wait-for-jest-exit.d.ts +15 -0
- package/dist/adapters/jest/wait-for-jest-exit.js +28 -0
- package/dist/adapters/jest/worker/boot-worker.d.ts +39 -0
- package/dist/adapters/jest/worker/channel-slot.d.ts +6 -0
- package/dist/adapters/jest/worker/count-default-resolver-calls.d.ts +18 -0
- package/dist/adapters/jest/worker/count-resolver-calls.d.ts +16 -0
- package/dist/adapters/jest/worker/create-circus-tracker.d.ts +61 -0
- package/dist/adapters/jest/worker/create-state-guard.d.ts +55 -0
- package/dist/adapters/jest/worker/create-test-runner.d.ts +76 -0
- package/dist/adapters/jest/worker/create-transformer-factory.d.ts +124 -0
- package/dist/adapters/jest/worker/create-worker-channel.d.ts +11 -0
- package/dist/adapters/jest/worker/install-exit-guards.d.ts +34 -0
- package/dist/adapters/jest/worker/install-vm-side.d.ts +36 -0
- package/dist/adapters/jest/worker/read-error-facts.d.ts +21 -0
- package/dist/adapters/jest/worker/read-jest-result.d.ts +11 -0
- package/dist/adapters/jest/worker/run-unit.d.ts +52 -0
- package/dist/adapters/jest/worker/switch-source.d.ts +16 -0
- package/dist/adapters/jest/worker/track-stores.d.ts +10 -0
- package/dist/adapters/jest/worker/vm-setup.d.ts +1 -0
- package/dist/adapters/jest/worker/vm-setup.js +2 -0
- package/dist/adapters/jest/worker/worker.d.ts +1 -0
- package/dist/adapters/jest/worker/worker.js +2 -0
- package/dist/adapters/jest/worker/wrap-project-config.d.ts +24 -0
- package/dist/adapters/jest/write-worker-files.d.ts +13 -0
- package/dist/adapters/jest/write-worker-files.js +31 -0
- package/dist/adapters/jest/write-worker-session.d.ts +30 -0
- package/dist/adapters/jest/write-worker-session.js +23 -0
- package/dist/adapters/node-test/build-dry-file.d.ts +52 -0
- package/dist/adapters/node-test/build-dry-file.js +56 -0
- package/dist/adapters/node-test/build-isolated-facts.d.ts +33 -0
- package/dist/adapters/node-test/build-isolated-facts.js +34 -0
- package/dist/adapters/node-test/check-node-support.d.ts +8 -0
- package/dist/adapters/node-test/check-node-support.js +5 -0
- package/dist/adapters/node-test/check-todo-bail.d.ts +10 -0
- package/dist/adapters/node-test/check-todo-bail.js +5 -0
- package/dist/adapters/node-test/check-typescript.d.ts +24 -0
- package/dist/adapters/node-test/check-typescript.js +17 -0
- package/dist/adapters/node-test/collect-node-dependencies.d.ts +31 -0
- package/dist/adapters/node-test/collect-node-dependencies.js +24 -0
- package/dist/adapters/node-test/create-glob-pattern.d.ts +11 -0
- package/dist/adapters/node-test/create-glob-pattern.js +21 -0
- package/dist/adapters/node-test/describe-hook-failure.d.ts +14 -0
- package/dist/adapters/node-test/describe-hook-failure.js +4 -0
- package/dist/adapters/node-test/drop-todo-errors.d.ts +10 -0
- package/dist/adapters/node-test/drop-todo-errors.js +5 -0
- package/dist/adapters/node-test/filter-exec-argv.d.ts +19 -0
- package/dist/adapters/node-test/filter-exec-argv.js +33 -0
- package/dist/adapters/node-test/find-test-command.d.ts +13 -0
- package/dist/adapters/node-test/find-test-command.js +18 -0
- package/dist/adapters/node-test/get-default-patterns.d.ts +13 -0
- package/dist/adapters/node-test/get-default-patterns.js +14 -0
- package/dist/adapters/node-test/get-dry-deadline.d.ts +17 -0
- package/dist/adapters/node-test/get-dry-deadline.js +6 -0
- package/dist/adapters/node-test/get-node-cache-inputs.d.ts +31 -0
- package/dist/adapters/node-test/get-node-cache-inputs.js +33 -0
- package/dist/adapters/node-test/get-preload-path.d.ts +10 -0
- package/dist/adapters/node-test/get-preload-path.js +7 -0
- package/dist/adapters/node-test/get-unit-deadline.d.ts +13 -0
- package/dist/adapters/node-test/get-unit-deadline.js +5 -0
- package/dist/adapters/node-test/includes-tsx.d.ts +9 -0
- package/dist/adapters/node-test/includes-tsx.js +5 -0
- package/dist/adapters/node-test/index.d.ts +13 -0
- package/dist/adapters/node-test/index.js +11 -0
- package/dist/adapters/node-test/list-file-errors.d.ts +18 -0
- package/dist/adapters/node-test/list-file-errors.js +8 -0
- package/dist/adapters/node-test/list-flag-values.d.ts +10 -0
- package/dist/adapters/node-test/list-flag-values.js +9 -0
- package/dist/adapters/node-test/list-loaded-files.d.ts +9 -0
- package/dist/adapters/node-test/list-loaded-files.js +7 -0
- package/dist/adapters/node-test/list-node-test-files.d.ts +13 -0
- package/dist/adapters/node-test/list-node-test-files.js +42 -0
- package/dist/adapters/node-test/list-running-tries.d.ts +16 -0
- package/dist/adapters/node-test/list-running-tries.js +6 -0
- package/dist/adapters/node-test/list-setup-files.d.ts +11 -0
- package/dist/adapters/node-test/list-setup-files.js +9 -0
- package/dist/adapters/node-test/loader-flags.d.ts +4 -0
- package/dist/adapters/node-test/loader-flags.js +8 -0
- package/dist/adapters/node-test/place-preload.d.ts +17 -0
- package/dist/adapters/node-test/place-preload.js +27 -0
- package/dist/adapters/node-test/preload/create-bail-error.d.ts +9 -0
- package/dist/adapters/node-test/preload/create-bail-error.js +7 -0
- package/dist/adapters/node-test/preload/create-commonjs-route.d.ts +24 -0
- package/dist/adapters/node-test/preload/create-commonjs-route.js +15 -0
- package/dist/adapters/node-test/preload/create-file-recorder.d.ts +10 -0
- package/dist/adapters/node-test/preload/create-file-recorder.js +10 -0
- package/dist/adapters/node-test/preload/create-load-hook.d.ts +22 -0
- package/dist/adapters/node-test/preload/create-load-hook.js +18 -0
- package/dist/adapters/node-test/preload/create-record-writer.d.ts +13 -0
- package/dist/adapters/node-test/preload/create-record-writer.js +8 -0
- package/dist/adapters/node-test/preload/create-report-reader.d.ts +35 -0
- package/dist/adapters/node-test/preload/create-report-reader.js +34 -0
- package/dist/adapters/node-test/preload/create-source-switcher.d.ts +25 -0
- package/dist/adapters/node-test/preload/create-source-switcher.js +25 -0
- package/dist/adapters/node-test/preload/create-try-tracker.d.ts +71 -0
- package/dist/adapters/node-test/preload/create-try-tracker.js +125 -0
- package/dist/adapters/node-test/preload/hooks.d.ts +19 -0
- package/dist/adapters/node-test/preload/hooks.js +17 -0
- package/dist/adapters/node-test/preload/install-marker-receivers.d.ts +30 -0
- package/dist/adapters/node-test/preload/install-marker-receivers.js +16 -0
- package/dist/adapters/node-test/preload/install-module-hooks.d.ts +79 -0
- package/dist/adapters/node-test/preload/install-module-hooks.js +13 -0
- package/dist/adapters/node-test/preload/loaded-key.d.ts +5 -0
- package/dist/adapters/node-test/preload/loaded-key.js +2 -0
- package/dist/adapters/node-test/preload/patch-module-compile.d.ts +14 -0
- package/dist/adapters/node-test/preload/patch-module-compile.js +11 -0
- package/dist/adapters/node-test/preload/preload.d.ts +1 -0
- package/dist/adapters/node-test/preload/preload.js +71 -0
- package/dist/adapters/node-test/preload/read-unit.d.ts +13 -0
- package/dist/adapters/node-test/preload/read-unit.js +5 -0
- package/dist/adapters/node-test/preload/reported-key.d.ts +5 -0
- package/dist/adapters/node-test/preload/reported-key.js +2 -0
- package/dist/adapters/node-test/preload/reporter.d.ts +10 -0
- package/dist/adapters/node-test/preload/reporter.js +12 -0
- package/dist/adapters/node-test/preload/served-key.d.ts +5 -0
- package/dist/adapters/node-test/preload/served-key.js +2 -0
- package/dist/adapters/node-test/read-node-runtime.d.ts +22 -0
- package/dist/adapters/node-test/read-node-runtime.js +40 -0
- package/dist/adapters/node-test/read-test-timeout.d.ts +8 -0
- package/dist/adapters/node-test/read-test-timeout.js +12 -0
- package/dist/adapters/node-test/read-tries.d.ts +47 -0
- package/dist/adapters/node-test/read-tries.js +31 -0
- package/dist/adapters/node-test/resolve-command.d.ts +15 -0
- package/dist/adapters/node-test/resolve-command.js +87 -0
- package/dist/adapters/node-test/resolve-tsx.d.ts +8 -0
- package/dist/adapters/node-test/resolve-tsx.js +12 -0
- package/dist/adapters/node-test/run-dry.d.ts +32 -0
- package/dist/adapters/node-test/run-dry.js +87 -0
- package/dist/adapters/node-test/run-isolated.d.ts +22 -0
- package/dist/adapters/node-test/run-isolated.js +56 -0
- package/dist/adapters/node-test/run-test-file.d.ts +22 -0
- package/dist/adapters/node-test/run-test-file.js +35 -0
- package/dist/adapters/node-test/run-test-process.d.ts +63 -0
- package/dist/adapters/node-test/run-test-process.js +69 -0
- package/dist/adapters/node-test/score-node-test.d.ts +11 -0
- package/dist/adapters/node-test/score-node-test.js +32 -0
- package/dist/adapters/node-test/start-node-test-session.d.ts +26 -0
- package/dist/adapters/node-test/start-node-test-session.js +124 -0
- package/dist/adapters/node-test/types/node-test-adapter-options.d.ts +33 -0
- package/dist/adapters/node-test/types/node-test-command.d.ts +28 -0
- package/dist/adapters/node-test/types/node-test-handle.d.ts +118 -0
- package/dist/adapters/node-test/types/node-test-hooks-data.d.ts +20 -0
- package/dist/adapters/node-test/types/node-test-record.d.ts +330 -0
- package/dist/adapters/node-test/types/node-test-unit.d.ts +57 -0
- package/dist/adapters/node-test/types/process-watch.d.ts +22 -0
- package/dist/adapters/node-test/types/source-switcher.d.ts +21 -0
- package/dist/adapters/node-test/types/test-process-outcome.d.ts +31 -0
- package/dist/adapters/node-test/types/try-context.d.ts +26 -0
- package/dist/adapters/node-test/types/try-tracker.d.ts +44 -0
- package/dist/adapters/shared/capture-clock.d.ts +11 -0
- package/dist/adapters/shared/capture-clock.js +14 -0
- package/dist/adapters/shared/create-environment-proxy.d.ts +12 -0
- package/dist/adapters/shared/create-environment-proxy.js +17 -0
- package/dist/adapters/shared/describe-exit.d.ts +14 -0
- package/dist/adapters/shared/describe-exit.js +4 -0
- package/dist/adapters/shared/environment-slot.d.ts +5 -0
- package/dist/adapters/shared/environment-slot.js +2 -0
- package/dist/adapters/shared/get-error-message.d.ts +9 -0
- package/dist/adapters/shared/get-error-message.js +10 -0
- package/dist/adapters/shared/get-test-id.d.ts +19 -0
- package/dist/adapters/shared/get-test-id.js +11 -0
- package/dist/adapters/shared/hash-environment.d.ts +9 -0
- package/dist/adapters/shared/hash-environment.js +6 -0
- package/dist/adapters/shared/index-environment-hashes.d.ts +13 -0
- package/dist/adapters/shared/index-environment-hashes.js +19 -0
- package/dist/adapters/shared/list-package-files.d.ts +11 -0
- package/dist/adapters/shared/list-package-files.js +9 -0
- package/dist/adapters/shared/list-tsconfig-files.d.ts +12 -0
- package/dist/adapters/shared/list-tsconfig-files.js +15 -0
- package/dist/adapters/shared/live-process-groups.d.ts +5 -0
- package/dist/adapters/shared/live-process-groups.js +2 -0
- package/dist/adapters/shared/parse-command.d.ts +16 -0
- package/dist/adapters/shared/parse-command.js +27 -0
- package/dist/adapters/shared/read-command-prefix.d.ts +16 -0
- package/dist/adapters/shared/read-command-prefix.js +33 -0
- package/dist/adapters/shared/read-out-file.d.ts +8 -0
- package/dist/adapters/shared/read-out-file.js +11 -0
- package/dist/adapters/shared/read-package-type.d.ts +8 -0
- package/dist/adapters/shared/read-package-type.js +12 -0
- package/dist/adapters/shared/read-test-scripts.d.ts +14 -0
- package/dist/adapters/shared/read-test-scripts.js +55 -0
- package/dist/adapters/shared/read-tsconfig-extends.d.ts +12 -0
- package/dist/adapters/shared/read-tsconfig-extends.js +39 -0
- package/dist/adapters/shared/run-in-pool.d.ts +16 -0
- package/dist/adapters/shared/run-in-pool.js +22 -0
- package/dist/adapters/shared/split-node-arguments.d.ts +14 -0
- package/dist/adapters/shared/split-node-arguments.js +18 -0
- package/dist/adapters/shared/stop-live-process-groups.d.ts +5 -0
- package/dist/adapters/shared/stop-live-process-groups.js +7 -0
- package/dist/adapters/shared/stop-process-group.d.ts +9 -0
- package/dist/adapters/shared/stop-process-group.js +10 -0
- package/dist/adapters/shared/track-environment.d.ts +43 -0
- package/dist/adapters/shared/track-environment.js +18 -0
- package/dist/adapters/shared/track-file-inputs.d.ts +12 -0
- package/dist/adapters/shared/track-file-inputs.js +21 -0
- package/dist/adapters/shared/track-file-reads.d.ts +38 -0
- package/dist/adapters/shared/track-file-reads.js +190 -0
- package/dist/adapters/shared/track-inputs.d.ts +16 -0
- package/dist/adapters/shared/track-inputs.js +21 -0
- package/dist/adapters/shared/track-process-group.d.ts +9 -0
- package/dist/adapters/shared/track-process-group.js +20 -0
- package/dist/adapters/shared/track-spawners.d.ts +20 -0
- package/dist/adapters/shared/track-spawners.js +49 -0
- package/dist/adapters/shared/types/environment-proxy-state.d.ts +23 -0
- package/dist/adapters/shared/types/file-input-tracking.d.ts +20 -0
- package/dist/adapters/shared/types/input-tracking.d.ts +26 -0
- package/dist/adapters/shared/types/safe-clock.d.ts +25 -0
- package/dist/adapters/shared/types/switch-plan.d.ts +7 -0
- package/dist/adapters/shared/verdict-variable-pattern.d.ts +6 -0
- package/dist/adapters/shared/verdict-variable-pattern.js +2 -0
- package/dist/adapters/shared/write-switch-plan.d.ts +11 -0
- package/dist/adapters/shared/write-switch-plan.js +16 -0
- package/dist/adapters/vitest/build-isolated-facts.d.ts +19 -0
- package/dist/adapters/vitest/build-isolated-facts.js +31 -0
- package/dist/adapters/vitest/check-project-config.d.ts +10 -0
- package/dist/adapters/vitest/check-project-config.js +6 -0
- package/dist/adapters/vitest/check-vitest-copy.d.ts +12 -0
- package/dist/adapters/vitest/check-vitest-copy.js +15 -0
- package/dist/adapters/vitest/collect-dependencies.d.ts +29 -0
- package/dist/adapters/vitest/collect-dependencies.js +38 -0
- package/dist/adapters/vitest/configure-project.d.ts +17 -0
- package/dist/adapters/vitest/configure-project.js +24 -0
- package/dist/adapters/vitest/create-forks-pool.d.ts +22 -0
- package/dist/adapters/vitest/create-forks-pool.js +49 -0
- package/dist/adapters/vitest/create-interleaved-sequencer.d.ts +13 -0
- package/dist/adapters/vitest/create-interleaved-sequencer.js +21 -0
- package/dist/adapters/vitest/create-mootant-plugin.d.ts +18 -0
- package/dist/adapters/vitest/create-mootant-plugin.js +31 -0
- package/dist/adapters/vitest/create-output-reporter.d.ts +28 -0
- package/dist/adapters/vitest/create-output-reporter.js +7 -0
- package/dist/adapters/vitest/create-output-stream.d.ts +11 -0
- package/dist/adapters/vitest/create-output-stream.js +16 -0
- package/dist/adapters/vitest/detect-vitest.d.ts +28 -0
- package/dist/adapters/vitest/detect-vitest.js +26 -0
- package/dist/adapters/vitest/get-cache-inputs.d.ts +16 -0
- package/dist/adapters/vitest/get-cache-inputs.js +75 -0
- package/dist/adapters/vitest/get-file-key.d.ts +10 -0
- package/dist/adapters/vitest/get-file-key.js +15 -0
- package/dist/adapters/vitest/get-module-file.d.ts +10 -0
- package/dist/adapters/vitest/get-module-file.js +7 -0
- package/dist/adapters/vitest/get-project-label.d.ts +8 -0
- package/dist/adapters/vitest/get-project-label.js +4 -0
- package/dist/adapters/vitest/get-runner-path.d.ts +9 -0
- package/dist/adapters/vitest/get-runner-path.js +7 -0
- package/dist/adapters/vitest/get-switchable-path.d.ts +12 -0
- package/dist/adapters/vitest/get-switchable-path.js +8 -0
- package/dist/adapters/vitest/index-switched-files.d.ts +10 -0
- package/dist/adapters/vitest/index-switched-files.js +5 -0
- package/dist/adapters/vitest/index.d.ts +11 -0
- package/dist/adapters/vitest/index.js +11 -0
- package/dist/adapters/vitest/read-environment-hashes.d.ts +9 -0
- package/dist/adapters/vitest/read-environment-hashes.js +13 -0
- package/dist/adapters/vitest/read-out-files.d.ts +9 -0
- package/dist/adapters/vitest/read-out-files.js +9 -0
- package/dist/adapters/vitest/read-unit-inputs.d.ts +27 -0
- package/dist/adapters/vitest/read-unit-inputs.js +15 -0
- package/dist/adapters/vitest/reset-run-directory.d.ts +9 -0
- package/dist/adapters/vitest/reset-run-directory.js +21 -0
- package/dist/adapters/vitest/run-batch.d.ts +16 -0
- package/dist/adapters/vitest/run-batch.js +70 -0
- package/dist/adapters/vitest/run-dry.d.ts +26 -0
- package/dist/adapters/vitest/run-dry.js +136 -0
- package/dist/adapters/vitest/run-isolated.d.ts +15 -0
- package/dist/adapters/vitest/run-isolated.js +29 -0
- package/dist/adapters/vitest/run-plan.d.ts +39 -0
- package/dist/adapters/vitest/run-plan.js +60 -0
- package/dist/adapters/vitest/run-specifications.d.ts +23 -0
- package/dist/adapters/vitest/run-specifications.js +19 -0
- package/dist/adapters/vitest/runner.d.ts +449 -0
- package/dist/adapters/vitest/runner.js +361 -0
- package/dist/adapters/vitest/score-vitest.d.ts +11 -0
- package/dist/adapters/vitest/score-vitest.js +7 -0
- package/dist/adapters/vitest/start-vitest-session.d.ts +24 -0
- package/dist/adapters/vitest/start-vitest-session.js +88 -0
- package/dist/adapters/vitest/stop-hung-worker.d.ts +11 -0
- package/dist/adapters/vitest/stop-hung-worker.js +29 -0
- package/dist/adapters/vitest/types/unit-outcome.d.ts +26 -0
- package/dist/adapters/vitest/types/vitest-adapter-options.d.ts +10 -0
- package/dist/adapters/vitest/types/vitest-session-state.d.ts +94 -0
- package/dist/adapters/vitest/types/vitest-worker.d.ts +246 -0
- package/dist/adapters/vitest/wait-for-workers.d.ts +30 -0
- package/dist/adapters/vitest/wait-for-workers.js +39 -0
- package/dist/adapters/vitest/watch-heartbeats.d.ts +23 -0
- package/dist/adapters/vitest/watch-heartbeats.js +25 -0
- package/dist/adapters/vitest/watch-unit-ends.d.ts +22 -0
- package/dist/adapters/vitest/watch-unit-ends.js +14 -0
- package/dist/adapters/vitest/worker/claim-unit.d.ts +16 -0
- package/dist/adapters/vitest/worker/claim-unit.js +16 -0
- package/dist/adapters/vitest/worker/find-hook-error.d.ts +10 -0
- package/dist/adapters/vitest/worker/find-hook-error.js +12 -0
- package/dist/adapters/vitest/worker/get-file-hash.d.ts +11 -0
- package/dist/adapters/vitest/worker/get-file-hash.js +5 -0
- package/dist/adapters/vitest/worker/get-hook-budget.d.ts +16 -0
- package/dist/adapters/vitest/worker/get-hook-budget.js +36 -0
- package/dist/adapters/vitest/worker/install-try-hook.d.ts +16 -0
- package/dist/adapters/vitest/worker/install-try-hook.js +11 -0
- package/dist/adapters/vitest/worker/is-process-alive.d.ts +9 -0
- package/dist/adapters/vitest/worker/is-process-alive.js +9 -0
- package/dist/adapters/vitest/worker/is-timeout-message.d.ts +7 -0
- package/dist/adapters/vitest/worker/is-timeout-message.js +5 -0
- package/dist/adapters/vitest/worker/list-dependencies.d.ts +35 -0
- package/dist/adapters/vitest/worker/list-dependencies.js +10 -0
- package/dist/adapters/vitest/worker/list-tests.d.ts +8 -0
- package/dist/adapters/vitest/worker/list-tests.js +4 -0
- package/dist/adapters/vitest/worker/order-tests.d.ts +14 -0
- package/dist/adapters/vitest/worker/order-tests.js +7 -0
- package/dist/adapters/vitest/worker/race-try-timeout.d.ts +13 -0
- package/dist/adapters/vitest/worker/race-try-timeout.js +17 -0
- package/dist/adapters/vitest/worker/read-try-facts.d.ts +36 -0
- package/dist/adapters/vitest/worker/read-try-facts.js +19 -0
- package/dist/adapters/vitest/worker/read-worker-plan.d.ts +11 -0
- package/dist/adapters/vitest/worker/read-worker-plan.js +13 -0
- package/dist/adapters/vitest/worker/vitest-variables.d.ts +6 -0
- package/dist/adapters/vitest/worker/vitest-variables.js +2 -0
- package/dist/adapters/vitest/worker/wait-for-turn.d.ts +24 -0
- package/dist/adapters/vitest/worker/wait-for-turn.js +11 -0
- package/dist/adapters/vitest/worker/watch-worker-close.d.ts +20 -0
- package/dist/adapters/vitest/worker/watch-worker-close.js +32 -0
- package/dist/adapters/vitest/worker/write-heartbeat.d.ts +14 -0
- package/dist/adapters/vitest/worker/write-heartbeat.js +6 -0
- package/dist/adapters/vitest/worker/write-out-record.d.ts +10 -0
- package/dist/adapters/vitest/worker/write-out-record.js +5 -0
- package/dist/adapters/vitest/write-plan-files.d.ts +12 -0
- package/dist/adapters/vitest/write-plan-files.js +14 -0
- package/dist/cli/built-in-adapters.d.ts +15 -0
- package/dist/cli/built-in-adapters.js +29 -0
- package/dist/cli/create-run-progress.d.ts +50 -0
- package/dist/cli/create-run-progress.js +218 -0
- package/dist/cli/create-time-estimator.d.ts +80 -0
- package/dist/cli/create-time-estimator.js +63 -0
- package/dist/cli/diff/format-change.d.ts +38 -0
- package/dist/cli/diff/format-change.js +101 -0
- package/dist/cli/diff/format-diff-groups.d.ts +46 -0
- package/dist/cli/diff/format-diff-groups.js +48 -0
- package/dist/cli/diff/format-diff.d.ts +20 -0
- package/dist/cli/diff/format-diff.js +94 -0
- package/dist/cli/diff/get-diff-lines.d.ts +23 -0
- package/dist/cli/diff/get-diff-lines.js +24 -0
- package/dist/cli/diff/is-joined.d.ts +10 -0
- package/dist/cli/diff/is-joined.js +5 -0
- package/dist/cli/diff/mark-diff.d.ts +63 -0
- package/dist/cli/diff/mark-diff.js +43 -0
- package/dist/cli/diff/narrow-change.d.ts +36 -0
- package/dist/cli/diff/narrow-change.js +46 -0
- package/dist/cli/diff/separate-replacement.d.ts +21 -0
- package/dist/cli/diff/separate-replacement.js +6 -0
- package/dist/cli/html/build-html-report.d.ts +48 -0
- package/dist/cli/html/build-html-report.js +113 -0
- package/dist/cli/html/client/copy-text.d.ts +9 -0
- package/dist/cli/html/client/describe-status.d.ts +13 -0
- package/dist/cli/html/client/download-json.d.ts +8 -0
- package/dist/cli/html/client/escape-html.d.ts +7 -0
- package/dist/cli/html/client/escape-html.js +4 -0
- package/dist/cli/html/client/filter-by-status.d.ts +11 -0
- package/dist/cli/html/client/find-search-results.d.ts +30 -0
- package/dist/cli/html/client/format-date.d.ts +8 -0
- package/dist/cli/html/client/format-score.d.ts +8 -0
- package/dist/cli/html/client/format-time.d.ts +8 -0
- package/dist/cli/html/client/get-file-href.d.ts +10 -0
- package/dist/cli/html/client/get-icon.d.ts +37 -0
- package/dist/cli/html/client/get-line-end.d.ts +10 -0
- package/dist/cli/html/client/get-table-layout.d.ts +15 -0
- package/dist/cli/html/client/get-test-groups.d.ts +11 -0
- package/dist/cli/html/client/get-wordmark.d.ts +9 -0
- package/dist/cli/html/client/html.d.ts +12 -0
- package/dist/cli/html/client/index-report.d.ts +14 -0
- package/dist/cli/html/client/is-overlapping.d.ts +10 -0
- package/dist/cli/html/client/main.d.ts +1 -0
- package/dist/cli/html/client/main.js +2 -0
- package/dist/cli/html/client/measure-column.d.ts +10 -0
- package/dist/cli/html/client/paint-ranges.d.ts +33 -0
- package/dist/cli/html/client/parse-route.d.ts +13 -0
- package/dist/cli/html/client/render-attention.d.ts +12 -0
- package/dist/cli/html/client/render-change.d.ts +11 -0
- package/dist/cli/html/client/render-code.d.ts +50 -0
- package/dist/cli/html/client/render-command.d.ts +8 -0
- package/dist/cli/html/client/render-count-cells.d.ts +10 -0
- package/dist/cli/html/client/render-diff.d.ts +16 -0
- package/dist/cli/html/client/render-file-code.d.ts +12 -0
- package/dist/cli/html/client/render-file-panel.d.ts +12 -0
- package/dist/cli/html/client/render-files-table.d.ts +10 -0
- package/dist/cli/html/client/render-files-view.d.ts +14 -0
- package/dist/cli/html/client/render-frame.d.ts +12 -0
- package/dist/cli/html/client/render-mutant-link.d.ts +11 -0
- package/dist/cli/html/client/render-mutant-panel.d.ts +18 -0
- package/dist/cli/html/client/render-mutant-row.d.ts +13 -0
- package/dist/cli/html/client/render-mutants-table.d.ts +13 -0
- package/dist/cli/html/client/render-mutants-view.d.ts +12 -0
- package/dist/cli/html/client/render-mutators-view.d.ts +11 -0
- package/dist/cli/html/client/render-overview.d.ts +14 -0
- package/dist/cli/html/client/render-side-panel.d.ts +12 -0
- package/dist/cli/html/client/render-skip-panel.d.ts +14 -0
- package/dist/cli/html/client/render-skipped-summary.d.ts +10 -0
- package/dist/cli/html/client/render-spotlight.d.ts +12 -0
- package/dist/cli/html/client/render-status-bar.d.ts +10 -0
- package/dist/cli/html/client/render-status-filter.d.ts +40 -0
- package/dist/cli/html/client/render-test-name.d.ts +8 -0
- package/dist/cli/html/client/render-tests-view.d.ts +16 -0
- package/dist/cli/html/client/render-tree.d.ts +11 -0
- package/dist/cli/html/client/set-markup.d.ts +9 -0
- package/dist/cli/html/client/start-report.d.ts +14 -0
- package/dist/cli/html/client/tokenize-source.d.ts +12 -0
- package/dist/cli/html/client/unpack-replacement.d.ts +15 -0
- package/dist/cli/html/client/unpack-run-report.d.ts +12 -0
- package/dist/cli/html/format-html-report.d.ts +12 -0
- package/dist/cli/html/format-html-report.js +52 -0
- package/dist/cli/html/pack-replacement.d.ts +15 -0
- package/dist/cli/html/pack-replacement.js +11 -0
- package/dist/cli/html/read-project-name.d.ts +8 -0
- package/dist/cli/html/read-project-name.js +12 -0
- package/dist/cli/html/report.js +2 -0
- package/dist/cli/html/serialize-report-data.d.ts +11 -0
- package/dist/cli/html/serialize-report-data.js +4 -0
- package/dist/cli/html/write-html-report.d.ts +7 -0
- package/dist/cli/html/write-html-report.js +6 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.js +14 -0
- package/dist/cli/parse-arguments.d.ts +127 -0
- package/dist/cli/parse-arguments.js +137 -0
- package/dist/cli/report/build-list-report.d.ts +13 -0
- package/dist/cli/report/build-list-report.js +131 -0
- package/dist/cli/report/build-run-report.d.ts +39 -0
- package/dist/cli/report/build-run-report.js +108 -0
- package/dist/cli/report/format-command.d.ts +59 -0
- package/dist/cli/report/format-command.js +14 -0
- package/dist/cli/report/format-duration.d.ts +8 -0
- package/dist/cli/report/format-duration.js +9 -0
- package/dist/cli/report/format-fields.d.ts +11 -0
- package/dist/cli/report/format-fields.js +15 -0
- package/dist/cli/report/format-file-groups.d.ts +66 -0
- package/dist/cli/report/format-file-groups.js +53 -0
- package/dist/cli/report/format-header.d.ts +19 -0
- package/dist/cli/report/format-header.js +12 -0
- package/dist/cli/report/format-report.d.ts +16 -0
- package/dist/cli/report/format-report.js +10 -0
- package/dist/cli/report/format-run-report.d.ts +13 -0
- package/dist/cli/report/format-run-report.js +10 -0
- package/dist/cli/report/format-run-text-report.d.ts +59 -0
- package/dist/cli/report/format-run-text-report.js +126 -0
- package/dist/cli/report/format-text-report.d.ts +33 -0
- package/dist/cli/report/format-text-report.js +57 -0
- package/dist/cli/report/format-time-left.d.ts +10 -0
- package/dist/cli/report/format-time-left.js +9 -0
- package/dist/cli/report/get-file-scores.d.ts +11 -0
- package/dist/cli/report/get-file-scores.js +21 -0
- package/dist/cli/report/get-short-id-length.d.ts +9 -0
- package/dist/cli/report/get-short-id-length.js +11 -0
- package/dist/cli/report/print-diagnostics.d.ts +11 -0
- package/dist/cli/report/print-diagnostics.js +15 -0
- package/dist/cli/report/slim-diff.d.ts +11 -0
- package/dist/cli/report/slim-diff.js +9 -0
- package/dist/cli/report/slim-focus.d.ts +10 -0
- package/dist/cli/report/slim-focus.js +9 -0
- package/dist/cli/report/slim-list-mutant.d.ts +17 -0
- package/dist/cli/report/slim-list-mutant.js +18 -0
- package/dist/cli/report/slim-list-report.d.ts +14 -0
- package/dist/cli/report/slim-list-report.js +20 -0
- package/dist/cli/report/slim-run-report.d.ts +20 -0
- package/dist/cli/report/slim-run-report.js +66 -0
- package/dist/cli/report/sort-by-location.d.ts +16 -0
- package/dist/cli/report/sort-by-location.js +9 -0
- package/dist/cli/run-list.d.ts +9 -0
- package/dist/cli/run-list.js +27 -0
- package/dist/cli/run-mutation.d.ts +18 -0
- package/dist/cli/run-mutation.js +72 -0
- package/dist/cli/terminal/colors.d.ts +59 -0
- package/dist/cli/terminal/colors.js +26 -0
- package/dist/cli/terminal/count-terminal-rows.d.ts +13 -0
- package/dist/cli/terminal/count-terminal-rows.js +7 -0
- package/dist/cli/terminal/create-spinner.d.ts +37 -0
- package/dist/cli/terminal/create-spinner.js +62 -0
- package/dist/cli/terminal/cut-to-width.d.ts +17 -0
- package/dist/cli/terminal/cut-to-width.js +14 -0
- package/dist/cli/terminal/fit-parts.d.ts +12 -0
- package/dist/cli/terminal/fit-parts.js +10 -0
- package/dist/cli/terminal/format-by-file.d.ts +35 -0
- package/dist/cli/terminal/format-by-file.js +15 -0
- package/dist/cli/terminal/get-display-width.d.ts +24 -0
- package/dist/cli/terminal/get-display-width.js +15 -0
- package/dist/cli/terminal/get-max-display-width.d.ts +9 -0
- package/dist/cli/terminal/get-max-display-width.js +5 -0
- package/dist/cli/terminal/get-symbols.d.ts +37 -0
- package/dist/cli/terminal/get-symbols.js +18 -0
- package/dist/cli/terminal/get-text-style.d.ts +15 -0
- package/dist/cli/terminal/get-text-style.js +16 -0
- package/dist/cli/terminal/is-interactive-terminal.d.ts +12 -0
- package/dist/cli/terminal/is-interactive-terminal.js +5 -0
- package/dist/cli/terminal/is-unicode-supported.d.ts +10 -0
- package/dist/cli/terminal/is-unicode-supported.js +5 -0
- package/dist/cli/terminal/measure-parts.d.ts +10 -0
- package/dist/cli/terminal/measure-parts.js +6 -0
- package/dist/cli/terminal/pad-to-width.d.ts +9 -0
- package/dist/cli/terminal/pad-to-width.js +5 -0
- package/dist/cli/terminal/strip-ansi.d.ts +7 -0
- package/dist/cli/terminal/strip-ansi.js +14 -0
- package/dist/cli/terminal/wrap-text.d.ts +9 -0
- package/dist/cli/terminal/wrap-text.js +10 -0
- package/dist/core/cache/apply-cached-batch.d.ts +21 -0
- package/dist/core/cache/apply-cached-batch.js +37 -0
- package/dist/core/cache/apply-cached-units.d.ts +15 -0
- package/dist/core/cache/apply-cached-units.js +19 -0
- package/dist/core/cache/cache-version.d.ts +6 -0
- package/dist/core/cache/create-digest.d.ts +7 -0
- package/dist/core/cache/create-digest.js +5 -0
- package/dist/core/cache/create-run-cache.d.ts +93 -0
- package/dist/core/cache/create-run-cache.js +126 -0
- package/dist/core/cache/find-changed-files.d.ts +10 -0
- package/dist/core/cache/find-changed-files.js +11 -0
- package/dist/core/cache/find-lockfile.d.ts +8 -0
- package/dist/core/cache/find-lockfile.js +23 -0
- package/dist/core/cache/get-cache-path.d.ts +9 -0
- package/dist/core/cache/get-cache-path.js +5 -0
- package/dist/core/cache/get-environment-key.d.ts +63 -0
- package/dist/core/cache/get-environment-key.js +25 -0
- package/dist/core/cache/get-portable-path.d.ts +11 -0
- package/dist/core/cache/get-portable-path.js +5 -0
- package/dist/core/cache/get-test-file-keys.d.ts +31 -0
- package/dist/core/cache/get-test-file-keys.js +24 -0
- package/dist/core/cache/hash-files.d.ts +11 -0
- package/dist/core/cache/hash-files.js +24 -0
- package/dist/core/cache/list-file-hashes.d.ts +16 -0
- package/dist/core/cache/list-file-hashes.js +7 -0
- package/dist/core/cache/prepare-run-cache.d.ts +92 -0
- package/dist/core/cache/prepare-run-cache.js +71 -0
- package/dist/core/cache/prune-cache-entries.d.ts +10 -0
- package/dist/core/cache/prune-cache-entries.js +6 -0
- package/dist/core/cache/read-run-cache.d.ts +11 -0
- package/dist/core/cache/read-run-cache.js +33 -0
- package/dist/core/cache/run-in-chunks.d.ts +10 -0
- package/dist/core/cache/run-in-chunks.js +6 -0
- package/dist/core/cache/save-run-cache.d.ts +33 -0
- package/dist/core/cache/save-run-cache.js +54 -0
- package/dist/core/cache/write-run-cache.d.ts +22 -0
- package/dist/core/cache/write-run-cache.js +20 -0
- package/dist/core/compare-code-units.d.ts +10 -0
- package/dist/core/compare-code-units.js +4 -0
- package/dist/core/config/define-config.d.ts +13 -0
- package/dist/core/config/define-config.js +4 -0
- package/dist/core/config/import-config.d.ts +9 -0
- package/dist/core/config/import-config.js +5 -0
- package/dist/core/config/load-config.d.ts +38 -0
- package/dist/core/config/load-config.js +55 -0
- package/dist/core/config/load-typescript-config.d.ts +11 -0
- package/dist/core/config/load-typescript-config.js +13 -0
- package/dist/core/config/prepare-run.d.ts +67 -0
- package/dist/core/config/prepare-run.js +36 -0
- package/dist/core/config/resolve-run-settings.d.ts +15 -0
- package/dist/core/config/resolve-run-settings.js +20 -0
- package/dist/core/config/validate-config.d.ts +17 -0
- package/dist/core/config/validate-config.js +74 -0
- package/dist/core/files/expand-paths.d.ts +46 -0
- package/dist/core/files/expand-paths.js +106 -0
- package/dist/core/files/is-source-file.d.ts +8 -0
- package/dist/core/files/is-source-file.js +6 -0
- package/dist/core/files/list-file-mutants.d.ts +71 -0
- package/dist/core/files/list-file-mutants.js +69 -0
- package/dist/core/files/select-changed-mutants.d.ts +15 -0
- package/dist/core/files/select-changed-mutants.js +22 -0
- package/dist/core/generate/apply-solitary-rule.d.ts +30 -0
- package/dist/core/generate/apply-solitary-rule.js +48 -0
- package/dist/core/generate/collect-candidates.d.ts +134 -0
- package/dist/core/generate/collect-candidates.js +165 -0
- package/dist/core/generate/compare-candidates.d.ts +18 -0
- package/dist/core/generate/compare-candidates.js +4 -0
- package/dist/core/generate/deduplicate-candidates.d.ts +30 -0
- package/dist/core/generate/deduplicate-candidates.js +25 -0
- package/dist/core/generate/fit-template-text.d.ts +26 -0
- package/dist/core/generate/fit-template-text.js +17 -0
- package/dist/core/generate/generate-file-mutants.d.ts +77 -0
- package/dist/core/generate/generate-file-mutants.js +225 -0
- package/dist/core/generate/get-mutant-regions.d.ts +49 -0
- package/dist/core/generate/get-mutant-regions.js +69 -0
- package/dist/core/generate/get-replacement-kind.d.ts +12 -0
- package/dist/core/generate/get-replacement-kind.js +24 -0
- package/dist/core/generate/group-replacement.d.ts +40 -0
- package/dist/core/generate/group-replacement.js +151 -0
- package/dist/core/generate/pick-focus.d.ts +14 -0
- package/dist/core/generate/pick-focus.js +4 -0
- package/dist/core/generate/validate-replacement.d.ts +17 -0
- package/dist/core/generate/validate-replacement.js +29 -0
- package/dist/core/git/find-git-root.d.ts +10 -0
- package/dist/core/git/find-git-root.js +8 -0
- package/dist/core/git/get-merge-base.d.ts +12 -0
- package/dist/core/git/get-merge-base.js +32 -0
- package/dist/core/git/parse-binary-paths.d.ts +11 -0
- package/dist/core/git/parse-binary-paths.js +9 -0
- package/dist/core/git/parse-unified-diff.d.ts +15 -0
- package/dist/core/git/parse-unified-diff.js +26 -0
- package/dist/core/git/read-changed-lines.d.ts +18 -0
- package/dist/core/git/read-changed-lines.js +60 -0
- package/dist/core/git/run-git.d.ts +30 -0
- package/dist/core/git/run-git.js +30 -0
- package/dist/core/git/unquote-git-path.d.ts +9 -0
- package/dist/core/git/unquote-git-path.js +25 -0
- package/dist/core/hints/analyze-scopes.d.ts +15 -0
- package/dist/core/hints/analyze-scopes.js +317 -0
- package/dist/core/hints/create-inferred-type.d.ts +12 -0
- package/dist/core/hints/create-inferred-type.js +5 -0
- package/dist/core/hints/create-syntactic-type-provider.d.ts +19 -0
- package/dist/core/hints/create-syntactic-type-provider.js +63 -0
- package/dist/core/hints/create-type-hints.d.ts +11 -0
- package/dist/core/hints/create-type-hints.js +21 -0
- package/dist/core/hints/find-this-class.d.ts +25 -0
- package/dist/core/hints/find-this-class.js +27 -0
- package/dist/core/hints/get-asserted-type.d.ts +9 -0
- package/dist/core/hints/get-asserted-type.js +5 -0
- package/dist/core/hints/infer-annotation-type.d.ts +14 -0
- package/dist/core/hints/infer-annotation-type.js +171 -0
- package/dist/core/hints/infer-binding-type.d.ts +13 -0
- package/dist/core/hints/infer-binding-type.js +93 -0
- package/dist/core/hints/infer-call-type.d.ts +14 -0
- package/dist/core/hints/infer-call-type.js +116 -0
- package/dist/core/hints/infer-expression-type.d.ts +12 -0
- package/dist/core/hints/infer-expression-type.js +104 -0
- package/dist/core/hints/infer-member-type.d.ts +13 -0
- package/dist/core/hints/infer-member-type.js +131 -0
- package/dist/core/hints/infer-operator-type.d.ts +18 -0
- package/dist/core/hints/infer-operator-type.js +103 -0
- package/dist/core/hints/infer-this-type.d.ts +16 -0
- package/dist/core/hints/infer-this-type.js +21 -0
- package/dist/core/hints/non-nullish-kinds.d.ts +5 -0
- package/dist/core/hints/non-nullish-kinds.js +12 -0
- package/dist/core/hints/object-kinds.d.ts +6 -0
- package/dist/core/hints/object-kinds.js +7 -0
- package/dist/core/hints/remove-nullish.d.ts +9 -0
- package/dist/core/hints/remove-nullish.js +5 -0
- package/dist/core/hints/union-inferred-types.d.ts +10 -0
- package/dist/core/hints/union-inferred-types.js +11 -0
- package/dist/core/hints/well-known-calls.d.ts +9 -0
- package/dist/core/hints/well-known-calls.js +100 -0
- package/dist/core/identity/assert-unique-ids.d.ts +12 -0
- package/dist/core/identity/assert-unique-ids.js +21 -0
- package/dist/core/identity/assign-mutant-ids.d.ts +16 -0
- package/dist/core/identity/assign-mutant-ids.js +26 -0
- package/dist/core/identity/create-mutant-id.d.ts +42 -0
- package/dist/core/identity/create-mutant-id.js +22 -0
- package/dist/core/identity/get-scope-path.d.ts +15 -0
- package/dist/core/identity/get-scope-path.js +69 -0
- package/dist/core/identity/resolve-mutant-ids.d.ts +15 -0
- package/dist/core/identity/resolve-mutant-ids.js +15 -0
- package/dist/core/ignore/create-ignore-rules.d.ts +35 -0
- package/dist/core/ignore/create-ignore-rules.js +83 -0
- package/dist/core/ignore/find-ignore-rule.d.ts +31 -0
- package/dist/core/ignore/find-ignore-rule.js +18 -0
- package/dist/core/ignore/parse-ignore-directives.d.ts +28 -0
- package/dist/core/ignore/parse-ignore-directives.js +72 -0
- package/dist/core/index.d.ts +31 -0
- package/dist/core/index.js +4 -0
- package/dist/core/instrument/check-svelte-compile.d.ts +16 -0
- package/dist/core/instrument/check-svelte-compile.js +15 -0
- package/dist/core/instrument/check-vue-compile.d.ts +18 -0
- package/dist/core/instrument/check-vue-compile.js +28 -0
- package/dist/core/instrument/create-switched-files.d.ts +52 -0
- package/dist/core/instrument/create-switched-files.js +52 -0
- package/dist/core/instrument/find-statement-starts.d.ts +26 -0
- package/dist/core/instrument/find-statement-starts.js +46 -0
- package/dist/core/instrument/get-site-check.d.ts +9 -0
- package/dist/core/instrument/get-site-check.js +5 -0
- package/dist/core/instrument/get-template-site-check.d.ts +12 -0
- package/dist/core/instrument/get-template-site-check.js +5 -0
- package/dist/core/instrument/group-mutant-ranges.d.ts +14 -0
- package/dist/core/instrument/group-mutant-ranges.js +24 -0
- package/dist/core/instrument/instrument-file.d.ts +39 -0
- package/dist/core/instrument/instrument-file.js +21 -0
- package/dist/core/instrument/instrumenter-version.d.ts +6 -0
- package/dist/core/instrument/render-mutant-range.d.ts +22 -0
- package/dist/core/instrument/render-mutant-range.js +18 -0
- package/dist/core/instrument/resolve-switched-text.d.ts +13 -0
- package/dist/core/instrument/resolve-switched-text.js +5 -0
- package/dist/core/list-mutants.d.ts +54 -0
- package/dist/core/list-mutants.js +27 -0
- package/dist/core/mutators/arithmetic-operator.d.ts +14 -0
- package/dist/core/mutators/arithmetic-operator.js +94 -0
- package/dist/core/mutators/array-element.d.ts +13 -0
- package/dist/core/mutators/array-element.js +35 -0
- package/dist/core/mutators/assignment-operator.d.ts +26 -0
- package/dist/core/mutators/assignment-operator.js +188 -0
- package/dist/core/mutators/bitwise-operator.d.ts +11 -0
- package/dist/core/mutators/bitwise-operator.js +48 -0
- package/dist/core/mutators/boolean-literal.d.ts +14 -0
- package/dist/core/mutators/boolean-literal.js +21 -0
- package/dist/core/mutators/comparison-operator.d.ts +6 -0
- package/dist/core/mutators/comparison-operator.js +16 -0
- package/dist/core/mutators/condition.d.ts +5 -0
- package/dist/core/mutators/condition.js +44 -0
- package/dist/core/mutators/logical-operator.d.ts +22 -0
- package/dist/core/mutators/logical-operator.js +53 -0
- package/dist/core/mutators/method-call.d.ts +21 -0
- package/dist/core/mutators/method-call.js +265 -0
- package/dist/core/mutators/missing-await.d.ts +17 -0
- package/dist/core/mutators/missing-await.js +144 -0
- package/dist/core/mutators/number-literal.d.ts +23 -0
- package/dist/core/mutators/number-literal.js +94 -0
- package/dist/core/mutators/object-property.d.ts +9 -0
- package/dist/core/mutators/object-property.js +19 -0
- package/dist/core/mutators/optional-chaining.d.ts +19 -0
- package/dist/core/mutators/optional-chaining.js +95 -0
- package/dist/core/mutators/regex-flag.d.ts +20 -0
- package/dist/core/mutators/regex-flag.js +86 -0
- package/dist/core/mutators/regex-pattern.d.ts +23 -0
- package/dist/core/mutators/regex-pattern.js +54 -0
- package/dist/core/mutators/return-value.d.ts +16 -0
- package/dist/core/mutators/return-value.js +216 -0
- package/dist/core/mutators/shared/create-run-context.d.ts +42 -0
- package/dist/core/mutators/shared/create-run-context.js +9 -0
- package/dist/core/mutators/shared/create-static-run-context.d.ts +12 -0
- package/dist/core/mutators/shared/create-static-run-context.js +9 -0
- package/dist/core/mutators/shared/distinguishes-nullish-swap.d.ts +32 -0
- package/dist/core/mutators/shared/distinguishes-nullish-swap.js +11 -0
- package/dist/core/mutators/shared/empties-callback.d.ts +15 -0
- package/dist/core/mutators/shared/empties-callback.js +6 -0
- package/dist/core/mutators/shared/get-branch-copy-skip.d.ts +24 -0
- package/dist/core/mutators/shared/get-branch-copy-skip.js +42 -0
- package/dist/core/mutators/shared/get-branch-pair.d.ts +33 -0
- package/dist/core/mutators/shared/get-branch-pair.js +33 -0
- package/dist/core/mutators/shared/get-call-target.d.ts +13 -0
- package/dist/core/mutators/shared/get-call-target.js +5 -0
- package/dist/core/mutators/shared/get-call-top.d.ts +12 -0
- package/dist/core/mutators/shared/get-call-top.js +5 -0
- package/dist/core/mutators/shared/get-callback-owner.d.ts +19 -0
- package/dist/core/mutators/shared/get-callback-owner.js +15 -0
- package/dist/core/mutators/shared/get-callback-result.d.ts +36 -0
- package/dist/core/mutators/shared/get-callback-result.js +15 -0
- package/dist/core/mutators/shared/get-canonical-falsy.d.ts +11 -0
- package/dist/core/mutators/shared/get-canonical-falsy.js +10 -0
- package/dist/core/mutators/shared/get-comparison-plan.d.ts +78 -0
- package/dist/core/mutators/shared/get-comparison-plan.js +383 -0
- package/dist/core/mutators/shared/get-condition-constants.d.ts +40 -0
- package/dist/core/mutators/shared/get-condition-constants.js +150 -0
- package/dist/core/mutators/shared/get-default-option-skip.d.ts +25 -0
- package/dist/core/mutators/shared/get-default-option-skip.js +89 -0
- package/dist/core/mutators/shared/get-fixed-truth.d.ts +15 -0
- package/dist/core/mutators/shared/get-fixed-truth.js +23 -0
- package/dist/core/mutators/shared/get-function-returns.d.ts +10 -0
- package/dist/core/mutators/shared/get-function-returns.js +7 -0
- package/dist/core/mutators/shared/get-group-constant.d.ts +32 -0
- package/dist/core/mutators/shared/get-group-constant.js +44 -0
- package/dist/core/mutators/shared/get-innermost.d.ts +22 -0
- package/dist/core/mutators/shared/get-innermost.js +11 -0
- package/dist/core/mutators/shared/get-leave-now-value.d.ts +17 -0
- package/dist/core/mutators/shared/get-leave-now-value.js +22 -0
- package/dist/core/mutators/shared/get-literal-flip.d.ts +18 -0
- package/dist/core/mutators/shared/get-literal-flip.js +10 -0
- package/dist/core/mutators/shared/get-literal-mutator.d.ts +10 -0
- package/dist/core/mutators/shared/get-literal-mutator.js +13 -0
- package/dist/core/mutators/shared/get-literal-skip.d.ts +38 -0
- package/dist/core/mutators/shared/get-literal-skip.js +61 -0
- package/dist/core/mutators/shared/get-literal-truth.d.ts +12 -0
- package/dist/core/mutators/shared/get-literal-truth.js +7 -0
- package/dist/core/mutators/shared/get-literal-value.d.ts +16 -0
- package/dist/core/mutators/shared/get-literal-value.js +23 -0
- package/dist/core/mutators/shared/get-logical-drops.d.ts +45 -0
- package/dist/core/mutators/shared/get-logical-drops.js +123 -0
- package/dist/core/mutators/shared/get-loop-running-skip.d.ts +9 -0
- package/dist/core/mutators/shared/get-loop-running-skip.js +7 -0
- package/dist/core/mutators/shared/get-negation-top.d.ts +25 -0
- package/dist/core/mutators/shared/get-negation-top.js +10 -0
- package/dist/core/mutators/shared/get-next-literal-value.d.ts +9 -0
- package/dist/core/mutators/shared/get-next-literal-value.js +9 -0
- package/dist/core/mutators/shared/get-nullish-directions.d.ts +32 -0
- package/dist/core/mutators/shared/get-nullish-directions.js +31 -0
- package/dist/core/mutators/shared/get-nullish-plan.d.ts +60 -0
- package/dist/core/mutators/shared/get-nullish-plan.js +94 -0
- package/dist/core/mutators/shared/get-nullish-swap-skip.d.ts +16 -0
- package/dist/core/mutators/shared/get-nullish-swap-skip.js +12 -0
- package/dist/core/mutators/shared/get-number-text.d.ts +16 -0
- package/dist/core/mutators/shared/get-number-text.js +19 -0
- package/dist/core/mutators/shared/get-or-default-skip.d.ts +18 -0
- package/dist/core/mutators/shared/get-or-default-skip.js +29 -0
- package/dist/core/mutators/shared/get-owned-constants.d.ts +17 -0
- package/dist/core/mutators/shared/get-owned-constants.js +39 -0
- package/dist/core/mutators/shared/get-owner-constant.d.ts +20 -0
- package/dist/core/mutators/shared/get-owner-constant.js +34 -0
- package/dist/core/mutators/shared/get-proven-comparison-value.d.ts +13 -0
- package/dist/core/mutators/shared/get-proven-comparison-value.js +24 -0
- package/dist/core/mutators/shared/get-return-switch.d.ts +33 -0
- package/dist/core/mutators/shared/get-return-switch.js +16 -0
- package/dist/core/mutators/shared/get-return-value-kind.d.ts +40 -0
- package/dist/core/mutators/shared/get-return-value-kind.js +47 -0
- package/dist/core/mutators/shared/get-returned-value.d.ts +10 -0
- package/dist/core/mutators/shared/get-returned-value.js +7 -0
- package/dist/core/mutators/shared/get-running-value.d.ts +31 -0
- package/dist/core/mutators/shared/get-running-value.js +25 -0
- package/dist/core/mutators/shared/get-shifted-literal.d.ts +25 -0
- package/dist/core/mutators/shared/get-shifted-literal.js +19 -0
- package/dist/core/mutators/shared/get-toward-mutant.d.ts +18 -0
- package/dist/core/mutators/shared/get-toward-mutant.js +66 -0
- package/dist/core/mutators/shared/get-type-view.d.ts +29 -0
- package/dist/core/mutators/shared/get-type-view.js +31 -0
- package/dist/core/mutators/shared/get-typeof-name.d.ts +10 -0
- package/dist/core/mutators/shared/get-typeof-name.js +20 -0
- package/dist/core/mutators/shared/has-defined-falsy-value.d.ts +10 -0
- package/dist/core/mutators/shared/has-defined-falsy-value.js +10 -0
- package/dist/core/mutators/shared/has-other-exit.d.ts +19 -0
- package/dist/core/mutators/shared/has-other-exit.js +56 -0
- package/dist/core/mutators/shared/has-polar-mutant.d.ts +34 -0
- package/dist/core/mutators/shared/has-polar-mutant.js +33 -0
- package/dist/core/mutators/shared/is-always-nullish.d.ts +9 -0
- package/dist/core/mutators/shared/is-always-nullish.js +5 -0
- package/dist/core/mutators/shared/is-always-truthy.d.ts +9 -0
- package/dist/core/mutators/shared/is-always-truthy.js +10 -0
- package/dist/core/mutators/shared/is-and-or.d.ts +11 -0
- package/dist/core/mutators/shared/is-and-or.js +4 -0
- package/dist/core/mutators/shared/is-boolean-mode-operand.d.ts +12 -0
- package/dist/core/mutators/shared/is-boolean-mode-operand.js +8 -0
- package/dist/core/mutators/shared/is-boolean-mode.d.ts +13 -0
- package/dist/core/mutators/shared/is-boolean-mode.js +10 -0
- package/dist/core/mutators/shared/is-boolean-result-source.d.ts +13 -0
- package/dist/core/mutators/shared/is-boolean-result-source.js +15 -0
- package/dist/core/mutators/shared/is-boolean-result.d.ts +13 -0
- package/dist/core/mutators/shared/is-boolean-result.js +5 -0
- package/dist/core/mutators/shared/is-boolean-valued.d.ts +13 -0
- package/dist/core/mutators/shared/is-boolean-valued.js +19 -0
- package/dist/core/mutators/shared/is-canonical-falsy.d.ts +13 -0
- package/dist/core/mutators/shared/is-canonical-falsy.js +8 -0
- package/dist/core/mutators/shared/is-comparator-result.d.ts +13 -0
- package/dist/core/mutators/shared/is-comparator-result.js +8 -0
- package/dist/core/mutators/shared/is-comparison-operand.d.ts +13 -0
- package/dist/core/mutators/shared/is-comparison-operand.js +7 -0
- package/dist/core/mutators/shared/is-comparison.d.ts +13 -0
- package/dist/core/mutators/shared/is-comparison.js +5 -0
- package/dist/core/mutators/shared/is-constant-eligible-group.d.ts +16 -0
- package/dist/core/mutators/shared/is-constant-eligible-group.js +15 -0
- package/dist/core/mutators/shared/is-expected-boolean.d.ts +14 -0
- package/dist/core/mutators/shared/is-expected-boolean.js +30 -0
- package/dist/core/mutators/shared/is-falsy-constant.d.ts +13 -0
- package/dist/core/mutators/shared/is-falsy-constant.js +11 -0
- package/dist/core/mutators/shared/is-global-identifier.d.ts +14 -0
- package/dist/core/mutators/shared/is-global-identifier.js +4 -0
- package/dist/core/mutators/shared/is-lookup-position.d.ts +14 -0
- package/dist/core/mutators/shared/is-lookup-position.js +10 -0
- package/dist/core/mutators/shared/is-negation.d.ts +10 -0
- package/dist/core/mutators/shared/is-negation.js +4 -0
- package/dist/core/mutators/shared/is-no-op-callback-constant.d.ts +15 -0
- package/dist/core/mutators/shared/is-no-op-callback-constant.js +10 -0
- package/dist/core/mutators/shared/is-no-op-callback-literal.d.ts +15 -0
- package/dist/core/mutators/shared/is-no-op-callback-literal.js +14 -0
- package/dist/core/mutators/shared/is-non-nullable.d.ts +10 -0
- package/dist/core/mutators/shared/is-non-nullable.js +5 -0
- package/dist/core/mutators/shared/is-non-number-type.d.ts +9 -0
- package/dist/core/mutators/shared/is-non-number-type.js +5 -0
- package/dist/core/mutators/shared/is-nullish-constant.d.ts +12 -0
- package/dist/core/mutators/shared/is-nullish-constant.js +12 -0
- package/dist/core/mutators/shared/is-number-literal.d.ts +9 -0
- package/dist/core/mutators/shared/is-number-literal.js +6 -0
- package/dist/core/mutators/shared/is-number-type.d.ts +10 -0
- package/dist/core/mutators/shared/is-number-type.js +9 -0
- package/dist/core/mutators/shared/is-numeric-pair.d.ts +11 -0
- package/dist/core/mutators/shared/is-numeric-pair.js +6 -0
- package/dist/core/mutators/shared/is-plain-return-value.d.ts +14 -0
- package/dist/core/mutators/shared/is-plain-return-value.js +15 -0
- package/dist/core/mutators/shared/is-tail-position.d.ts +16 -0
- package/dist/core/mutators/shared/is-tail-position.js +28 -0
- package/dist/core/mutators/shared/is-timer-wait.d.ts +15 -0
- package/dist/core/mutators/shared/is-timer-wait.js +5 -0
- package/dist/core/mutators/shared/is-truth-flipping-literal.d.ts +11 -0
- package/dist/core/mutators/shared/is-truth-flipping-literal.js +12 -0
- package/dist/core/mutators/shared/is-typed-by-method-name.d.ts +16 -0
- package/dist/core/mutators/shared/is-typed-by-method-name.js +26 -0
- package/dist/core/mutators/shared/is-void-operand.d.ts +12 -0
- package/dist/core/mutators/shared/is-void-operand.js +6 -0
- package/dist/core/mutators/shared/is-whole-body.d.ts +12 -0
- package/dist/core/mutators/shared/is-whole-body.js +5 -0
- package/dist/core/mutators/shared/leave-now-skip.d.ts +6 -0
- package/dist/core/mutators/shared/leave-now-skip.js +5 -0
- package/dist/core/mutators/shared/may-be-boolean.d.ts +9 -0
- package/dist/core/mutators/shared/may-be-boolean.js +6 -0
- package/dist/core/mutators/shared/may-be-nullish.d.ts +9 -0
- package/dist/core/mutators/shared/may-be-nullish.js +5 -0
- package/dist/core/mutators/shared/no-op-callback-skip.d.ts +6 -0
- package/dist/core/mutators/shared/no-op-callback-skip.js +5 -0
- package/dist/core/mutators/statement-removal.d.ts +23 -0
- package/dist/core/mutators/statement-removal.js +186 -0
- package/dist/core/mutators/string-literal.d.ts +27 -0
- package/dist/core/mutators/string-literal.js +138 -0
- package/dist/core/mutators/unary-operator.d.ts +14 -0
- package/dist/core/mutators/unary-operator.js +51 -0
- package/dist/core/mutators/update-operator.d.ts +13 -0
- package/dist/core/mutators/update-operator.js +29 -0
- package/dist/core/parser/collect-svelte-expressions.d.ts +19 -0
- package/dist/core/parser/collect-svelte-expressions.js +104 -0
- package/dist/core/parser/collect-vue-expressions.d.ts +22 -0
- package/dist/core/parser/collect-vue-expressions.js +69 -0
- package/dist/core/parser/create-comment-program.d.ts +19 -0
- package/dist/core/parser/create-comment-program.js +25 -0
- package/dist/core/parser/create-template-failure.d.ts +19 -0
- package/dist/core/parser/create-template-failure.js +19 -0
- package/dist/core/parser/find-vue-template.d.ts +10 -0
- package/dist/core/parser/find-vue-template.js +9 -0
- package/dist/core/parser/get-component-framework.d.ts +9 -0
- package/dist/core/parser/get-component-framework.js +5 -0
- package/dist/core/parser/get-parser-options.d.ts +9 -0
- package/dist/core/parser/get-parser-options.js +42 -0
- package/dist/core/parser/get-shared-scopes.d.ts +24 -0
- package/dist/core/parser/get-shared-scopes.js +8 -0
- package/dist/core/parser/get-source-blocks.d.ts +13 -0
- package/dist/core/parser/get-source-blocks.js +22 -0
- package/dist/core/parser/get-template-language.d.ts +11 -0
- package/dist/core/parser/get-template-language.js +4 -0
- package/dist/core/parser/is-declaration-file.d.ts +8 -0
- package/dist/core/parser/is-declaration-file.js +5 -0
- package/dist/core/parser/load-svelte-compiler.d.ts +9 -0
- package/dist/core/parser/load-svelte-compiler.js +13 -0
- package/dist/core/parser/load-vue-compiler.d.ts +10 -0
- package/dist/core/parser/load-vue-compiler.js +13 -0
- package/dist/core/parser/parse-component-template.d.ts +14 -0
- package/dist/core/parser/parse-component-template.js +8 -0
- package/dist/core/parser/parse-file.d.ts +34 -0
- package/dist/core/parser/parse-file.js +72 -0
- package/dist/core/parser/parse-svelte-template.d.ts +21 -0
- package/dist/core/parser/parse-svelte-template.js +17 -0
- package/dist/core/parser/parse-template-expressions.d.ts +60 -0
- package/dist/core/parser/parse-template-expressions.js +147 -0
- package/dist/core/parser/parse-vue-template.d.ts +20 -0
- package/dist/core/parser/parse-vue-template.js +20 -0
- package/dist/core/parser/read-template-program.d.ts +19 -0
- package/dist/core/parser/read-template-program.js +28 -0
- package/dist/core/parser/scan-script-blocks.d.ts +19 -0
- package/dist/core/parser/scan-script-blocks.js +267 -0
- package/dist/core/plugins/core-plugin.d.ts +6 -0
- package/dist/core/plugins/core-plugin.js +51 -0
- package/dist/core/plugins/create-mutator-registry.d.ts +17 -0
- package/dist/core/plugins/create-mutator-registry.js +31 -0
- package/dist/core/plugins/get-settings-problem.d.ts +9 -0
- package/dist/core/plugins/get-settings-problem.js +29 -0
- package/dist/core/plugins/is-kebab-case-name.d.ts +8 -0
- package/dist/core/plugins/is-kebab-case-name.js +5 -0
- package/dist/core/plugins/is-mutator-id.d.ts +9 -0
- package/dist/core/plugins/is-mutator-id.js +6 -0
- package/dist/core/plugins/is-mutator-setting.d.ts +9 -0
- package/dist/core/plugins/is-mutator-setting.js +5 -0
- package/dist/core/plugins/is-record.d.ts +8 -0
- package/dist/core/plugins/is-record.js +4 -0
- package/dist/core/plugins/resolve-preset.d.ts +31 -0
- package/dist/core/plugins/resolve-preset.js +60 -0
- package/dist/core/plugins/validate-plugin.d.ts +14 -0
- package/dist/core/plugins/validate-plugin.js +46 -0
- package/dist/core/presets/default-loggers.d.ts +6 -0
- package/dist/core/presets/default-loggers.js +8 -0
- package/dist/core/presets/recommended.d.ts +7 -0
- package/dist/core/presets/recommended.js +32 -0
- package/dist/core/presets/strict.d.ts +7 -0
- package/dist/core/presets/strict.js +28 -0
- package/dist/core/regex/can-match-empty.d.ts +14 -0
- package/dist/core/regex/can-match-empty.js +18 -0
- package/dist/core/regex/collect-pattern-changes.d.ts +24 -0
- package/dist/core/regex/collect-pattern-changes.js +133 -0
- package/dist/core/regex/compiles-regex.d.ts +9 -0
- package/dist/core/regex/compiles-regex.js +8 -0
- package/dist/core/regex/create-regex-replacement.d.ts +42 -0
- package/dist/core/regex/create-regex-replacement.js +36 -0
- package/dist/core/regex/create-regex-visitors.d.ts +15 -0
- package/dist/core/regex/create-regex-visitors.js +19 -0
- package/dist/core/regex/encode-pattern-text.d.ts +20 -0
- package/dist/core/regex/encode-pattern-text.js +25 -0
- package/dist/core/regex/find-open-repeat-scope.d.ts +26 -0
- package/dist/core/regex/find-open-repeat-scope.js +21 -0
- package/dist/core/regex/find-string-match-call.d.ts +15 -0
- package/dist/core/regex/find-string-match-call.js +12 -0
- package/dist/core/regex/get-regex-usage.d.ts +15 -0
- package/dist/core/regex/get-regex-usage.js +8 -0
- package/dist/core/regex/has-backreference.d.ts +10 -0
- package/dist/core/regex/has-backreference.js +8 -0
- package/dist/core/regex/has-capturing-group.d.ts +11 -0
- package/dist/core/regex/has-capturing-group.js +8 -0
- package/dist/core/regex/has-cased-character.d.ts +15 -0
- package/dist/core/regex/has-cased-character.js +29 -0
- package/dist/core/regex/has-named-group.d.ts +10 -0
- package/dist/core/regex/has-named-group.js +8 -0
- package/dist/core/regex/is-edge-wildcard.d.ts +20 -0
- package/dist/core/regex/is-edge-wildcard.js +10 -0
- package/dist/core/regex/is-mandatory-group.d.ts +16 -0
- package/dist/core/regex/is-mandatory-group.js +10 -0
- package/dist/core/regex/is-raw-template-text.d.ts +12 -0
- package/dist/core/regex/is-raw-template-text.js +13 -0
- package/dist/core/regex/is-valid-regex-literal.d.ts +14 -0
- package/dist/core/regex/is-valid-regex-literal.js +20 -0
- package/dist/core/regex/keeps-neighbor-tokens.d.ts +18 -0
- package/dist/core/regex/keeps-neighbor-tokens.js +29 -0
- package/dist/core/regex/load-regexpp.d.ts +15 -0
- package/dist/core/regex/load-regexpp.js +6 -0
- package/dist/core/regex/map-pattern-offsets.d.ts +11 -0
- package/dist/core/regex/map-pattern-offsets.js +9 -0
- package/dist/core/regex/map-string-units.d.ts +33 -0
- package/dist/core/regex/map-string-units.js +82 -0
- package/dist/core/regex/matches-any-character.d.ts +13 -0
- package/dist/core/regex/matches-any-character.js +22 -0
- package/dist/core/regex/parse-regex-pattern.d.ts +12 -0
- package/dist/core/regex/parse-regex-pattern.js +17 -0
- package/dist/core/regex/print-flags-edit.d.ts +33 -0
- package/dist/core/regex/print-flags-edit.js +38 -0
- package/dist/core/regex/print-pattern-edit.d.ts +34 -0
- package/dist/core/regex/print-pattern-edit.js +42 -0
- package/dist/core/regex/print-regex-literal.d.ts +9 -0
- package/dist/core/regex/print-regex-literal.js +4 -0
- package/dist/core/regex/read-regex-argument.d.ts +14 -0
- package/dist/core/regex/read-regex-argument.js +56 -0
- package/dist/core/regex/read-regex-call.d.ts +16 -0
- package/dist/core/regex/read-regex-call.js +27 -0
- package/dist/core/regex/read-regex-literal.d.ts +13 -0
- package/dist/core/regex/read-regex-literal.js +19 -0
- package/dist/core/regex/reads-regex-statics.d.ts +15 -0
- package/dist/core/regex/reads-regex-statics.js +5 -0
- package/dist/core/run/apply-batch-result.d.ts +40 -0
- package/dist/core/run/apply-batch-result.js +119 -0
- package/dist/core/run/apply-isolated-result.d.ts +34 -0
- package/dist/core/run/apply-isolated-result.js +61 -0
- package/dist/core/run/classify-mutants.d.ts +32 -0
- package/dist/core/run/classify-mutants.js +34 -0
- package/dist/core/run/classify-try.d.ts +20 -0
- package/dist/core/run/classify-try.js +28 -0
- package/dist/core/run/compare-dry-entries.d.ts +20 -0
- package/dist/core/run/compare-dry-entries.js +5 -0
- package/dist/core/run/compute-score.d.ts +11 -0
- package/dist/core/run/compute-score.js +11 -0
- package/dist/core/run/compute-static-cost.d.ts +11 -0
- package/dist/core/run/compute-static-cost.js +16 -0
- package/dist/core/run/count-run.d.ts +31 -0
- package/dist/core/run/count-run.js +19 -0
- package/dist/core/run/count-statuses.d.ts +11 -0
- package/dist/core/run/count-statuses.js +13 -0
- package/dist/core/run/count-verdicts.d.ts +16 -0
- package/dist/core/run/count-verdicts.js +32 -0
- package/dist/core/run/create-run-state.d.ts +67 -0
- package/dist/core/run/create-run-state.js +61 -0
- package/dist/core/run/create-work-directory.d.ts +21 -0
- package/dist/core/run/create-work-directory.js +14 -0
- package/dist/core/run/decide-evidence.d.ts +18 -0
- package/dist/core/run/decide-evidence.js +13 -0
- package/dist/core/run/decide-results.d.ts +20 -0
- package/dist/core/run/decide-results.js +45 -0
- package/dist/core/run/get-batch-unit-cost.d.ts +16 -0
- package/dist/core/run/get-batch-unit-cost.js +11 -0
- package/dist/core/run/get-display-path.d.ts +9 -0
- package/dist/core/run/get-display-path.js +5 -0
- package/dist/core/run/get-file-cost.d.ts +12 -0
- package/dist/core/run/get-file-cost.js +6 -0
- package/dist/core/run/get-final-status.d.ts +14 -0
- package/dist/core/run/get-final-status.js +8 -0
- package/dist/core/run/get-html-path.d.ts +19 -0
- package/dist/core/run/get-html-path.js +6 -0
- package/dist/core/run/get-package-directory.d.ts +9 -0
- package/dist/core/run/get-package-directory.js +12 -0
- package/dist/core/run/get-test-file-key.d.ts +15 -0
- package/dist/core/run/get-test-file-key.js +4 -0
- package/dist/core/run/get-try-limits.d.ts +18 -0
- package/dist/core/run/get-try-limits.js +8 -0
- package/dist/core/run/get-unit-evidence.d.ts +14 -0
- package/dist/core/run/get-unit-evidence.js +4 -0
- package/dist/core/run/index-module-tests.d.ts +15 -0
- package/dist/core/run/index-module-tests.js +11 -0
- package/dist/core/run/mark-outside-mutants.d.ts +14 -0
- package/dist/core/run/mark-outside-mutants.js +28 -0
- package/dist/core/run/number-chains.d.ts +8 -0
- package/dist/core/run/number-chains.js +8 -0
- package/dist/core/run/order-covering-tests.d.ts +15 -0
- package/dist/core/run/order-covering-tests.js +15 -0
- package/dist/core/run/plan-batch.d.ts +16 -0
- package/dist/core/run/plan-batch.js +48 -0
- package/dist/core/run/plan-isolated.d.ts +13 -0
- package/dist/core/run/plan-isolated.js +22 -0
- package/dist/core/run/preview-isolated-unit.d.ts +14 -0
- package/dist/core/run/preview-isolated-unit.js +17 -0
- package/dist/core/run/rank-module-files.d.ts +17 -0
- package/dist/core/run/rank-module-files.js +24 -0
- package/dist/core/run/rank-mutant-files.d.ts +21 -0
- package/dist/core/run/rank-mutant-files.js +26 -0
- package/dist/core/run/rank-test-file.d.ts +40 -0
- package/dist/core/run/rank-test-file.js +34 -0
- package/dist/core/run/read-dry-run.d.ts +20 -0
- package/dist/core/run/read-dry-run.js +53 -0
- package/dist/core/run/read-isolated-unit.d.ts +29 -0
- package/dist/core/run/read-isolated-unit.js +70 -0
- package/dist/core/run/read-test-imports.d.ts +12 -0
- package/dist/core/run/read-test-imports.js +26 -0
- package/dist/core/run/resolve-adapter.d.ts +34 -0
- package/dist/core/run/resolve-adapter.js +22 -0
- package/dist/core/run/route-isolated.d.ts +14 -0
- package/dist/core/run/route-isolated.js +6 -0
- package/dist/core/run/run-batch-phases.d.ts +16 -0
- package/dist/core/run/run-batch-phases.js +84 -0
- package/dist/core/run/run-dry-phase.d.ts +91 -0
- package/dist/core/run/run-dry-phase.js +204 -0
- package/dist/core/run/run-isolated-rounds.d.ts +26 -0
- package/dist/core/run/run-isolated-rounds.js +57 -0
- package/dist/core/run/select-run-files.d.ts +28 -0
- package/dist/core/run/select-run-files.js +30 -0
- package/dist/core/run/sort-test-files.d.ts +15 -0
- package/dist/core/run/sort-test-files.js +6 -0
- package/dist/core/run/sort-tests.d.ts +10 -0
- package/dist/core/run/sort-tests.js +5 -0
- package/dist/core/run/validate-adapter.d.ts +12 -0
- package/dist/core/run/validate-adapter.js +11 -0
- package/dist/core/run-mutants.d.ts +108 -0
- package/dist/core/run-mutants.js +326 -0
- package/dist/core/runtime/create-hit-limit-error.d.ts +9 -0
- package/dist/core/runtime/create-hit-limit-error.js +7 -0
- package/dist/core/runtime/index.d.ts +5 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/install-mutant-runtime.d.ts +13 -0
- package/dist/core/runtime/install-mutant-runtime.js +27 -0
- package/dist/core/runtime/is-hit-limit-error.d.ts +9 -0
- package/dist/core/runtime/is-hit-limit-error.js +4 -0
- package/dist/core/runtime/runtime-global.d.ts +5 -0
- package/dist/core/runtime/runtime-global.js +2 -0
- package/dist/core/runtime/runtime-symbol-key.d.ts +7 -0
- package/dist/core/runtime/runtime-symbol-key.js +2 -0
- package/dist/core/runtime/runtime-version.d.ts +6 -0
- package/dist/core/skips/skip-rules.d.ts +388 -0
- package/dist/core/skips/skip-rules.js +383 -0
- package/dist/core/syntax/advances-loop.d.ts +19 -0
- package/dist/core/syntax/advances-loop.js +62 -0
- package/dist/core/syntax/create-syntax-helpers.d.ts +49 -0
- package/dist/core/syntax/create-syntax-helpers.js +100 -0
- package/dist/core/syntax/find-compiler-pins.d.ts +18 -0
- package/dist/core/syntax/find-compiler-pins.js +79 -0
- package/dist/core/syntax/find-logging-calls.d.ts +21 -0
- package/dist/core/syntax/find-logging-calls.js +74 -0
- package/dist/core/syntax/find-message-texts.d.ts +13 -0
- package/dist/core/syntax/find-message-texts.js +10 -0
- package/dist/core/syntax/get-binding-closure.d.ts +36 -0
- package/dist/core/syntax/get-binding-closure.js +20 -0
- package/dist/core/syntax/get-chain-end.d.ts +12 -0
- package/dist/core/syntax/get-chain-end.js +6 -0
- package/dist/core/syntax/get-chain-root.d.ts +16 -0
- package/dist/core/syntax/get-chain-root.js +17 -0
- package/dist/core/syntax/get-checked-name.d.ts +19 -0
- package/dist/core/syntax/get-checked-name.js +9 -0
- package/dist/core/syntax/get-closed-initializer.d.ts +20 -0
- package/dist/core/syntax/get-closed-initializer.js +14 -0
- package/dist/core/syntax/get-collection-class.d.ts +28 -0
- package/dist/core/syntax/get-collection-class.js +34 -0
- package/dist/core/syntax/get-count-map.d.ts +18 -0
- package/dist/core/syntax/get-count-map.js +35 -0
- package/dist/core/syntax/get-enclosing-function.d.ts +12 -0
- package/dist/core/syntax/get-enclosing-function.js +8 -0
- package/dist/core/syntax/get-exited-loops.d.ts +25 -0
- package/dist/core/syntax/get-exited-loops.js +38 -0
- package/dist/core/syntax/get-fixed-initializer.d.ts +16 -0
- package/dist/core/syntax/get-fixed-initializer.js +7 -0
- package/dist/core/syntax/get-guard-bound.d.ts +28 -0
- package/dist/core/syntax/get-guard-bound.js +79 -0
- package/dist/core/syntax/get-logical-chain.d.ts +13 -0
- package/dist/core/syntax/get-logical-chain.js +10 -0
- package/dist/core/syntax/get-lower-bound.d.ts +12 -0
- package/dist/core/syntax/get-lower-bound.js +6 -0
- package/dist/core/syntax/get-match-regex.d.ts +26 -0
- package/dist/core/syntax/get-match-regex.js +48 -0
- package/dist/core/syntax/get-match-result-use.d.ts +29 -0
- package/dist/core/syntax/get-match-result-use.js +40 -0
- package/dist/core/syntax/get-member-path.d.ts +14 -0
- package/dist/core/syntax/get-member-path.js +30 -0
- package/dist/core/syntax/get-member-root.d.ts +12 -0
- package/dist/core/syntax/get-member-root.js +7 -0
- package/dist/core/syntax/get-named-groups-fact.d.ts +34 -0
- package/dist/core/syntax/get-named-groups-fact.js +44 -0
- package/dist/core/syntax/get-never-falsy-fact.d.ts +23 -0
- package/dist/core/syntax/get-never-falsy-fact.js +31 -0
- package/dist/core/syntax/get-result-slot.d.ts +14 -0
- package/dist/core/syntax/get-result-slot.js +7 -0
- package/dist/core/syntax/get-root-name.d.ts +10 -0
- package/dist/core/syntax/get-root-name.js +19 -0
- package/dist/core/syntax/get-statement-list.d.ts +14 -0
- package/dist/core/syntax/get-statement-list.js +13 -0
- package/dist/core/syntax/get-truth-only-name.d.ts +16 -0
- package/dist/core/syntax/get-truth-only-name.js +6 -0
- package/dist/core/syntax/get-value-bound.d.ts +48 -0
- package/dist/core/syntax/get-value-bound.js +192 -0
- package/dist/core/syntax/is-boolean-context.d.ts +20 -0
- package/dist/core/syntax/is-boolean-context.js +43 -0
- package/dist/core/syntax/is-caught-in-loop.d.ts +15 -0
- package/dist/core/syntax/is-caught-in-loop.js +19 -0
- package/dist/core/syntax/is-comparison-operator.d.ts +12 -0
- package/dist/core/syntax/is-comparison-operator.js +16 -0
- package/dist/core/syntax/is-condition-test.d.ts +12 -0
- package/dist/core/syntax/is-condition-test.js +7 -0
- package/dist/core/syntax/is-console-path.d.ts +11 -0
- package/dist/core/syntax/is-console-path.js +5 -0
- package/dist/core/syntax/is-effect-free.d.ts +11 -0
- package/dist/core/syntax/is-effect-free.js +20 -0
- package/dist/core/syntax/is-error-message.d.ts +17 -0
- package/dist/core/syntax/is-error-message.js +31 -0
- package/dist/core/syntax/is-for-each-result.d.ts +18 -0
- package/dist/core/syntax/is-for-each-result.js +12 -0
- package/dist/core/syntax/is-format-free.d.ts +14 -0
- package/dist/core/syntax/is-format-free.js +9 -0
- package/dist/core/syntax/is-function.d.ts +10 -0
- package/dist/core/syntax/is-function.js +9 -0
- package/dist/core/syntax/is-global-name.d.ts +20 -0
- package/dist/core/syntax/is-global-name.js +8 -0
- package/dist/core/syntax/is-global-type-name.d.ts +17 -0
- package/dist/core/syntax/is-global-type-name.js +13 -0
- package/dist/core/syntax/is-inside-try-block.d.ts +14 -0
- package/dist/core/syntax/is-inside-try-block.js +18 -0
- package/dist/core/syntax/is-joined-array.d.ts +21 -0
- package/dist/core/syntax/is-joined-array.js +27 -0
- package/dist/core/syntax/is-log-message.d.ts +18 -0
- package/dist/core/syntax/is-log-message.js +7 -0
- package/dist/core/syntax/is-logger-factory-call.d.ts +13 -0
- package/dist/core/syntax/is-logger-factory-call.js +21 -0
- package/dist/core/syntax/is-logger-label.d.ts +13 -0
- package/dist/core/syntax/is-logger-label.js +15 -0
- package/dist/core/syntax/is-logger-name.d.ts +11 -0
- package/dist/core/syntax/is-logger-name.js +8 -0
- package/dist/core/syntax/is-logging-call.d.ts +15 -0
- package/dist/core/syntax/is-logging-call.js +31 -0
- package/dist/core/syntax/is-logical-operand.d.ts +12 -0
- package/dist/core/syntax/is-logical-operand.js +5 -0
- package/dist/core/syntax/is-loop-advance-value.d.ts +20 -0
- package/dist/core/syntax/is-loop-advance-value.js +16 -0
- package/dist/core/syntax/is-loop-test.d.ts +12 -0
- package/dist/core/syntax/is-loop-test.js +7 -0
- package/dist/core/syntax/is-module-call.d.ts +12 -0
- package/dist/core/syntax/is-module-call.js +12 -0
- package/dist/core/syntax/is-non-thenable.d.ts +17 -0
- package/dist/core/syntax/is-non-thenable.js +18 -0
- package/dist/core/syntax/is-plain-message.d.ts +13 -0
- package/dist/core/syntax/is-plain-message.js +11 -0
- package/dist/core/syntax/is-presence-test.d.ts +16 -0
- package/dist/core/syntax/is-presence-test.js +19 -0
- package/dist/core/syntax/is-property-key.d.ts +13 -0
- package/dist/core/syntax/is-property-key.js +12 -0
- package/dist/core/syntax/is-read-chain.d.ts +12 -0
- package/dist/core/syntax/is-read-chain.js +13 -0
- package/dist/core/syntax/is-regex-only-tested.d.ts +23 -0
- package/dist/core/syntax/is-regex-only-tested.js +18 -0
- package/dist/core/syntax/is-result-unused.d.ts +19 -0
- package/dist/core/syntax/is-result-unused.js +13 -0
- package/dist/core/syntax/is-rune-call.d.ts +15 -0
- package/dist/core/syntax/is-rune-call.js +34 -0
- package/dist/core/syntax/is-statement.d.ts +9 -0
- package/dist/core/syntax/is-statement.js +5 -0
- package/dist/core/syntax/is-tested-loop.d.ts +9 -0
- package/dist/core/syntax/is-tested-loop.js +9 -0
- package/dist/core/syntax/is-timer-delay.d.ts +23 -0
- package/dist/core/syntax/is-timer-delay.js +39 -0
- package/dist/core/syntax/is-truth-test.d.ts +17 -0
- package/dist/core/syntax/is-truth-test.js +17 -0
- package/dist/core/syntax/is-value-position.d.ts +18 -0
- package/dist/core/syntax/is-value-position.js +83 -0
- package/dist/core/syntax/is-vue-macro-call.d.ts +11 -0
- package/dist/core/syntax/is-vue-macro-call.js +13 -0
- package/dist/core/syntax/is-write-target.d.ts +11 -0
- package/dist/core/syntax/is-write-target.js +15 -0
- package/dist/core/syntax/is-written-member.d.ts +13 -0
- package/dist/core/syntax/is-written-member.js +8 -0
- package/dist/core/syntax/never-empty-methods.d.ts +9 -0
- package/dist/core/syntax/never-empty-methods.js +8 -0
- package/dist/core/syntax/passes-truthiness.d.ts +13 -0
- package/dist/core/syntax/passes-truthiness.js +10 -0
- package/dist/core/syntax/read-import.d.ts +13 -0
- package/dist/core/syntax/read-import.js +19 -0
- package/dist/core/syntax/read-literal-type.d.ts +15 -0
- package/dist/core/syntax/read-literal-type.js +27 -0
- package/dist/core/syntax/read-number-literal.d.ts +9 -0
- package/dist/core/syntax/read-number-literal.js +6 -0
- package/dist/core/syntax/read-timer-call.d.ts +27 -0
- package/dist/core/syntax/read-timer-call.js +70 -0
- package/dist/core/syntax/resolve-closed-expression.d.ts +18 -0
- package/dist/core/syntax/resolve-closed-expression.js +9 -0
- package/dist/core/syntax/solve-value-bounds.d.ts +41 -0
- package/dist/core/syntax/solve-value-bounds.js +168 -0
- package/dist/core/text/blank-outside.d.ts +12 -0
- package/dist/core/text/blank-outside.js +10 -0
- package/dist/core/text/create-source-code.d.ts +16 -0
- package/dist/core/text/create-source-code.js +33 -0
- package/dist/core/text/edit-text.d.ts +17 -0
- package/dist/core/text/edit-text.js +12 -0
- package/dist/core/text/find-closest-name.d.ts +12 -0
- package/dist/core/text/find-closest-name.js +21 -0
- package/dist/core/text/find-last-start.d.ts +11 -0
- package/dist/core/text/find-last-start.js +9 -0
- package/dist/core/text/find-token-start.d.ts +14 -0
- package/dist/core/text/find-token-start.js +12 -0
- package/dist/core/text/get-line-starts.d.ts +8 -0
- package/dist/core/text/get-line-starts.js +7 -0
- package/dist/core/text/get-operator-range.d.ts +15 -0
- package/dist/core/text/get-operator-range.js +21 -0
- package/dist/core/text/get-source-position.d.ts +11 -0
- package/dist/core/text/get-source-position.js +9 -0
- package/dist/core/text/needs-grouping.d.ts +30 -0
- package/dist/core/text/needs-grouping.js +54 -0
- package/dist/core/text/needs-separator.d.ts +11 -0
- package/dist/core/text/needs-separator.js +15 -0
- package/dist/core/text/parse-expression.d.ts +16 -0
- package/dist/core/text/parse-expression.js +23 -0
- package/dist/core/text/pluralize.d.ts +8 -0
- package/dist/core/text/pluralize.js +4 -0
- package/dist/core/text/remove-list-element.d.ts +16 -0
- package/dist/core/text/remove-list-element.js +47 -0
- package/dist/core/text/replace-operator.d.ts +16 -0
- package/dist/core/text/replace-operator.js +82 -0
- package/dist/core/text/swap-string-quotes.d.ts +13 -0
- package/dist/core/text/swap-string-quotes.js +24 -0
- package/dist/core/tree/get-callee-name.d.ts +10 -0
- package/dist/core/tree/get-callee-name.js +6 -0
- package/dist/core/tree/get-context-slot.d.ts +14 -0
- package/dist/core/tree/get-context-slot.js +8 -0
- package/dist/core/tree/get-raw-slot.d.ts +13 -0
- package/dist/core/tree/get-raw-slot.js +6 -0
- package/dist/core/tree/get-slot.d.ts +14 -0
- package/dist/core/tree/get-slot.js +7 -0
- package/dist/core/tree/index-tree.d.ts +17 -0
- package/dist/core/tree/index-tree.js +56 -0
- package/dist/core/tree/is-expression-wrapper.d.ts +15 -0
- package/dist/core/tree/is-expression-wrapper.js +12 -0
- package/dist/core/tree/is-name-position.d.ts +10 -0
- package/dist/core/tree/is-name-position.js +17 -0
- package/dist/core/tree/unwrap-expression.d.ts +9 -0
- package/dist/core/tree/unwrap-expression.js +7 -0
- package/dist/core/tree/unwrap-parentheses.d.ts +9 -0
- package/dist/core/tree/unwrap-parentheses.js +6 -0
- package/dist/core/tree/walk-tree.d.ts +12 -0
- package/dist/core/tree/walk-tree.js +44 -0
- package/dist/docs/public/fonts/jetbrains-mono.js +2 -0
- package/dist/docs/public/fonts/sora-bold.js +2 -0
- package/dist/docs/public/fonts/sora-regular.js +2 -0
- package/dist/docs/styles/base.js +2 -0
- package/dist/docs/styles/colors.js +2 -0
- package/dist/docs/styles/fonts.js +2 -0
- package/dist/docs/styles/sizes.js +2 -0
- package/dist/docs/styles/spaces.js +2 -0
- package/dist/package.js +2 -0
- package/dist/types/adapter/adapter-context.d.ts +51 -0
- package/dist/types/adapter/adapter-session.d.ts +71 -0
- package/dist/types/adapter/batch-plan.d.ts +63 -0
- package/dist/types/adapter/batch-result.d.ts +80 -0
- package/dist/types/adapter/built-in-adapters.d.ts +31 -0
- package/dist/types/adapter/cache-inputs.d.ts +29 -0
- package/dist/types/adapter/dry-file.d.ts +83 -0
- package/dist/types/adapter/dry-run-request.d.ts +40 -0
- package/dist/types/adapter/dry-run-result.d.ts +53 -0
- package/dist/types/adapter/dry-test.d.ts +35 -0
- package/dist/types/adapter/isolated-plan.d.ts +42 -0
- package/dist/types/adapter/isolated-result.d.ts +84 -0
- package/dist/types/adapter/mutant-runtime.d.ts +40 -0
- package/dist/types/adapter/run-inputs.d.ts +20 -0
- package/dist/types/adapter/switched-file.d.ts +20 -0
- package/dist/types/adapter/test-adapter.d.ts +34 -0
- package/dist/types/adapter/try-facts.d.ts +63 -0
- package/dist/types/adapter/try-limits.d.ts +14 -0
- package/dist/types/adapter/unit-end.d.ts +25 -0
- package/dist/types/cache/cache-entry.d.ts +66 -0
- package/dist/types/cache/cached-inputs.d.ts +18 -0
- package/dist/types/cache/run-cache-file.d.ts +23 -0
- package/dist/types/cache/run-cache.d.ts +130 -0
- package/dist/types/cache/stored-cache.d.ts +16 -0
- package/dist/types/cli/line-part.d.ts +22 -0
- package/dist/types/cli/text-style.d.ts +21 -0
- package/dist/types/config/config.d.ts +36 -0
- package/dist/types/config/plugin.d.ts +17 -0
- package/dist/types/config/preset-settings.d.ts +43 -0
- package/dist/types/config/preset.d.ts +28 -0
- package/dist/types/config/run-config.d.ts +72 -0
- package/dist/types/config/run-settings.d.ts +38 -0
- package/dist/types/git/changed-lines.d.ts +15 -0
- package/dist/types/git/since-revision.d.ts +15 -0
- package/dist/types/hints/inferred-type.d.ts +19 -0
- package/dist/types/hints/type-hint-provider.d.ts +18 -0
- package/dist/types/hints/type-hints.d.ts +34 -0
- package/dist/types/hints/type-inference.d.ts +28 -0
- package/dist/types/hints/value-kind.d.ts +16 -0
- package/dist/types/html/file-view.d.ts +39 -0
- package/dist/types/html/indexed-file.d.ts +73 -0
- package/dist/types/html/indexed-mutant.d.ts +30 -0
- package/dist/types/html/indexed-mutator.d.ts +21 -0
- package/dist/types/html/indexed-skip.d.ts +31 -0
- package/dist/types/html/inline-script.d.ts +9 -0
- package/dist/types/html/mutants-filter.d.ts +26 -0
- package/dist/types/html/report-index.d.ts +49 -0
- package/dist/types/html/report-route.d.ts +48 -0
- package/dist/types/html/shown-change.d.ts +26 -0
- package/dist/types/html/tests-filter.d.ts +20 -0
- package/dist/types/mutant/diagnostic.d.ts +64 -0
- package/dist/types/mutant/file-mutants.d.ts +54 -0
- package/dist/types/mutant/ignore-directive.d.ts +46 -0
- package/dist/types/mutant/ignore-rule.d.ts +46 -0
- package/dist/types/mutant/ignore-source.d.ts +20 -0
- package/dist/types/mutant/mutant-candidate.d.ts +61 -0
- package/dist/types/mutant/mutant-range.d.ts +31 -0
- package/dist/types/mutant/mutant-status.d.ts +5 -0
- package/dist/types/mutant/mutant.d.ts +75 -0
- package/dist/types/mutant/skip-category.d.ts +16 -0
- package/dist/types/mutant/skip-justifier.d.ts +21 -0
- package/dist/types/mutant/skip-note.d.ts +30 -0
- package/dist/types/mutant/skip-rule-id.d.ts +6 -0
- package/dist/types/mutant/skip-rule.d.ts +17 -0
- package/dist/types/mutant/skipped-candidate.d.ts +65 -0
- package/dist/types/mutant/skipped-mutant.d.ts +71 -0
- package/dist/types/mutator/active-mutator.d.ts +10 -0
- package/dist/types/mutator/mutator-context.d.ts +58 -0
- package/dist/types/mutator/mutator-meta.d.ts +24 -0
- package/dist/types/mutator/mutator-registry.d.ts +16 -0
- package/dist/types/mutator/mutator-setting.d.ts +5 -0
- package/dist/types/mutator/mutator-visitors.d.ts +24 -0
- package/dist/types/mutator/mutator.d.ts +19 -0
- package/dist/types/mutator/regex-flag-options.d.ts +10 -0
- package/dist/types/mutator/regex-pattern-options.d.ts +28 -0
- package/dist/types/mutator/registered-mutator.d.ts +21 -0
- package/dist/types/mutator/replacement.d.ts +42 -0
- package/dist/types/regex/regex-call.d.ts +28 -0
- package/dist/types/regex/regex-change.d.ts +26 -0
- package/dist/types/regex/regex-source.d.ts +67 -0
- package/dist/types/report/file-score.d.ts +24 -0
- package/dist/types/report/html-report.d.ts +381 -0
- package/dist/types/report/list-report-diff.d.ts +28 -0
- package/dist/types/report/list-report-file.d.ts +20 -0
- package/dist/types/report/list-report-focus.d.ts +36 -0
- package/dist/types/report/list-report-justifier.d.ts +26 -0
- package/dist/types/report/list-report-mutant.d.ts +97 -0
- package/dist/types/report/list-report-mutator.d.ts +19 -0
- package/dist/types/report/list-report-skipped.d.ts +81 -0
- package/dist/types/report/list-report-summary.d.ts +46 -0
- package/dist/types/report/list-report.d.ts +66 -0
- package/dist/types/report/list-result.d.ts +39 -0
- package/dist/types/report/run-report.d.ts +336 -0
- package/dist/types/report/slim-list-report.d.ts +110 -0
- package/dist/types/report/slim-run-report.d.ts +196 -0
- package/dist/types/run/dry-analysis.d.ts +68 -0
- package/dist/types/run/isolated-evidence.d.ts +9 -0
- package/dist/types/run/isolated-reason.d.ts +25 -0
- package/dist/types/run/live-verdicts.d.ts +42 -0
- package/dist/types/run/module-cost.d.ts +25 -0
- package/dist/types/run/mutant-class.d.ts +28 -0
- package/dist/types/run/mutant-result.d.ts +82 -0
- package/dist/types/run/mutant-state.d.ts +131 -0
- package/dist/types/run/run-durations.d.ts +30 -0
- package/dist/types/run/run-event.d.ts +227 -0
- package/dist/types/run/run-kind.d.ts +10 -0
- package/dist/types/run/run-mode.d.ts +13 -0
- package/dist/types/run/run-result.d.ts +117 -0
- package/dist/types/run/run-score.d.ts +15 -0
- package/dist/types/run/run-state.d.ts +133 -0
- package/dist/types/run/run-status.d.ts +14 -0
- package/dist/types/run/status-counts.d.ts +5 -0
- package/dist/types/run/try-cause.d.ts +26 -0
- package/dist/types/run/try-verdict.d.ts +20 -0
- package/dist/types/source/component-framework.d.ts +4 -0
- package/dist/types/source/parse-settings.d.ts +23 -0
- package/dist/types/source/parsed-file.d.ts +49 -0
- package/dist/types/source/script-block.d.ts +26 -0
- package/dist/types/source/source-block.d.ts +12 -0
- package/dist/types/source/source-code.d.ts +101 -0
- package/dist/types/source/source-position.d.ts +14 -0
- package/dist/types/source/source-range.d.ts +14 -0
- package/dist/types/source/svelte-compiler.d.ts +7 -0
- package/dist/types/source/template-compilers.d.ts +17 -0
- package/dist/types/source/template-expression.d.ts +27 -0
- package/dist/types/source/template-outcome.d.ts +46 -0
- package/dist/types/source/template-parts.d.ts +17 -0
- package/dist/types/source/template-source.d.ts +20 -0
- package/dist/types/source/text-edit.d.ts +11 -0
- package/dist/types/source/vue-compiler.d.ts +7 -0
- package/dist/types/syntax/analyzed-program.d.ts +24 -0
- package/dist/types/syntax/binding-closure.d.ts +11 -0
- package/dist/types/syntax/binding.d.ts +53 -0
- package/dist/types/syntax/bound-evaluation.d.ts +33 -0
- package/dist/types/syntax/compiler-pin.d.ts +18 -0
- package/dist/types/syntax/count-map.d.ts +18 -0
- package/dist/types/syntax/imported-name.d.ts +15 -0
- package/dist/types/syntax/list-expression.d.ts +6 -0
- package/dist/types/syntax/literal-change.d.ts +27 -0
- package/dist/types/syntax/logging-call.d.ts +23 -0
- package/dist/types/syntax/match-regex.d.ts +18 -0
- package/dist/types/syntax/node-slot.d.ts +20 -0
- package/dist/types/syntax/operator-expression.d.ts +11 -0
- package/dist/types/syntax/read-check.d.ts +7 -0
- package/dist/types/syntax/scope-analysis.d.ts +42 -0
- package/dist/types/syntax/syntax-helpers.d.ts +292 -0
- package/dist/types/syntax/timer-call.d.ts +18 -0
- package/dist/types/syntax/timer-kind.d.ts +15 -0
- package/dist/types/syntax/tree-index.d.ts +18 -0
- package/dist/types/syntax/value-bound.d.ts +37 -0
- package/dist/types/syntax/value-bounds.d.ts +47 -0
- package/license.md +20 -0
- package/package.json +83 -6
- package/readme.md +132 -0
- package/skills/mootant/SKILL.md +232 -0
- package/skills/mootant/references/mutators.md +43 -0
- package/skills/readme.md +11 -0
- package/README.md +0 -45
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e = "// \\0rolldown/runtime.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n key = keys[i];\n if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n get: ((k) => from[k]).bind(null, key),\n enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, \"default\") ? __defProp(target, \"default\", {\n value: mod,\n enumerable: true\n}) : target, mod));\nlet node_async_hooks = require(\"node:async_hooks\");\nlet node_module = require(\"node:module\");\nlet node_fs = require(\"node:fs\");\nnode_fs = __toESM(node_fs, 1);\nlet node_v8 = require(\"node:v8\");\nlet node_os = require(\"node:os\");\nlet node_path = require(\"node:path\");\nnode_path = __toESM(node_path, 1);\nlet node_crypto = require(\"node:crypto\");\nlet node_url = require(\"node:url\");\nlet node_child_process = require(\"node:child_process\");\nnode_child_process = __toESM(node_child_process, 1);\nlet node_util = require(\"node:util\");\n// adapters/jest/worker/count-default-resolver-calls.ts\n/**\n* Options of the default resolver that hold the project's own code, which it\n* calls as it reads a package.\n*/\nvar CALLBACKS = /* @__PURE__ */ new Set([\"packageFilter\", \"pathFilter\"]);\n/**\n* Makes the default resolver of Jest 29.7 count its calls in\n* `calls.defaultResolver` until they return, so a project's own resolver that\n* hands it a request does not take its probes and `package.json` reads for its\n* own: those are Jest's, and the dependencies of a unit hold the `package.json`\n* files of what it loaded. A `packageFilter` or `pathFilter` that resolver\n* hands it is its own code again, so the count is 0 while one runs. Jest's\n* resolver and the resolver it gives a project's own one read the export at\n* each call, so the replaced export reaches both.\n*\n* @param module - Exports of `jest-resolve/build/defaultResolver.js`.\n* @param module.default - The default resolver, which is synchronous.\n* @param calls - Calls running in the worker.\n*/\nfunction countDefaultResolverCalls(module, calls) {\n let resolve = module.default;\n module.default = (path, options) => {\n calls.defaultResolver += 1;\n try {\n return resolve(path, Object.fromEntries(Object.entries(options).map(([key, value]) => [key, typeof value === \"function\" && CALLBACKS.has(key) ? runAsOwn(value, calls) : value])));\n } finally {\n calls.defaultResolver -= 1;\n }\n };\n}\n/**\n* Wraps a callback of a project's own resolver so that the default resolver's\n* count is 0 while it runs, as what it reads is the project's.\n*\n* @param callback - A `packageFilter` or `pathFilter` of the project.\n* @param calls - Calls running in the worker.\n* @returns The callback, which keeps the `this` it is called with.\n*/\nfunction runAsOwn(callback, calls) {\n return function(...parameters) {\n let depth = calls.defaultResolver;\n calls.defaultResolver = 0;\n try {\n return Reflect.apply(callback, this, parameters);\n } finally {\n calls.defaultResolver = depth;\n }\n };\n}\n// adapters/shared/get-error-message.ts\n/**\n* Longest message kept, in code units.\n*/\nvar MESSAGE_LIMIT = 200;\n/**\n* Shortens an error to a message for facts and reports. Errors a test runner\n* serialized may have no prototype, so they are read by their fields.\n*\n* @param error - Thrown value or error serialized by the test runner.\n* @returns First line of the message, or the name of an error without one, at\n* most 200 code units.\n*/\nfunction getErrorMessage(error) {\n let text = \"Error\";\n if (typeof error !== \"object\" || error === null) text = String(error);\n else {\n let message = Reflect.get(error, \"message\");\n let name = Reflect.get(error, \"name\");\n if (typeof message === \"string\" && message !== \"\") text = message;\n else if (typeof name === \"string\" && name !== \"\") text = name;\n }\n return text.split(\"\\n\", 1)[0].slice(0, MESSAGE_LIMIT);\n}\n// adapters/jest/ts-jest-path.ts\n/**\n* Real path that tells ts-jest, whose type check mootant turns off: it rejects\n* switched text on a type error, and its language service would keep the text\n* and reject the next test file too. The transformer of jest-preset-angular\n* counts as ts-jest, since it extends ts-jest's and takes its options.\n*/\nvar TS_JEST_PATH = /[/\\\\](?:jest-preset-angular|ts-jest)[/\\\\]/u;\n// core/instrument/resolve-switched-text.ts\n/**\n* Byte order mark as it appears at the start of a text read as UTF-8.\n*/\nvar BYTE_ORDER_MARK = String.fromCodePoint(65279);\n/**\n* Picks the text an adapter serves for a module of a switched file. The\n* switched text applies only to the text mootant listed mutants from; a loader\n* that dropped the leading byte order mark gets the switched text without it,\n* since the mark is never inside a mutant range.\n*\n* @param entry - Switched file of the module.\n* @param code - Text the test runner loaded for the module.\n* @returns The switched text to serve, or null when the loaded text differs and\n* must be served as is.\n*/\nfunction resolveSwitchedText(entry, code) {\n if (code === entry.original) return entry.switched;\n if (entry.original.startsWith(BYTE_ORDER_MARK) && code === entry.original.slice(BYTE_ORDER_MARK.length)) return entry.switched.slice(BYTE_ORDER_MARK.length);\n return null;\n}\n// adapters/jest/worker/switch-source.ts\n/**\n* Picks the text of a module for a transformer. Jest strips a shebang from what\n* it hands a transformer and leaves the empty line, so the texts of the plan\n* are compared and served the same way.\n*\n* @param entry - Switched file of the module, if the plan has it.\n* @param source - Text Jest handed over.\n* @returns The text to transform and what happened to it: `served` for the\n* switched text, `mismatched` for a text that differs from the one mootant\n* listed mutants from, null for a file the plan does not have.\n*/\nfunction switchSource(entry, source) {\n if (entry === void 0) return {\n text: source,\n kind: null\n };\n let text = resolveSwitchedText({\n ...entry,\n original: stripShebang(entry.original),\n switched: stripShebang(entry.switched)\n }, source);\n return text === null ? {\n kind: \"mismatched\",\n text: source\n } : {\n kind: \"served\",\n text\n };\n}\n/**\n* Removes a shebang the way Jest does.\n*\n* @param text - Text of a module.\n* @returns The text with the first line empty when it was a shebang.\n*/\nfunction stripShebang(text) {\n return text.startsWith(\"#!\") ? text.replace(/^#!.*/u, \"\") : text;\n}\n// adapters/jest/worker/create-transformer-factory.ts\n/**\n* `fs.readFileSync` as this module loads: CommonJS output reads a named import\n* on the real module at each use, where a test's `jest.spyOn(fs, ...)` reaches\n* it, and files load during tests.\n*/\nvar readFile = node_fs.readFileSync;\n/**\n* `crypto.createHash` as this module loads.\n*/\nvar hash = node_crypto.createHash;\n/**\n* `path.extname` as this module loads.\n*/\nvar readExtension = node_path.default.extname;\n/**\n* Extensions of the files Jest strips types from. Not `.tsx`: Node's strip-only\n* mode cannot parse JSX.\n*/\nvar TYPESCRIPT_EXTENSIONS = /* @__PURE__ */ new Set([\n \".cts\",\n \".mts\",\n \".ts\"\n]);\n/**\n* Creates the object `transformer.cjs` exports. Plans and their entries are\n* read once and kept for the life of the worker, since a plan is a new path and\n* a worker sees few. The entry for files no pattern of the project matches\n* hands on the text, or strips its types where the project's Jest would: in a\n* `.ts`, `.mts` or `.cts` file, with Node's function, whose output depends on\n* Node, so the version of Node joins its key. Each call into a real\n* transformer, from loading its module and making it to every key and\n* transform, is marked until it ends, so that what it reads, its configuration\n* among it, is told apart from what tests read: a warm worker does not read\n* that again, as Jest keeps what a transformer gave and a transformer keeps\n* what it read. An asynchronous key or transform holds `calls.asyncTransformer`\n* rather than a count, since Jest loads the other imports of an ES module while\n* it waits.\n*\n* @param input - What a worker works with.\n* @returns Object with the `createTransformer` Jest calls for each entry of a\n* project copy.\n*/\nfunction createTransformerFactory(input) {\n let { requireOrImportModule, stripTypes, projects, channel, calls } = input;\n let files = /* @__PURE__ */ new Map();\n let warned = false;\n /**\n * Makes a synchronous call into a real transformer, which counts until it\n * returns.\n *\n * @param call - Makes the call.\n * @returns What the call returns.\n */\n function enter(call) {\n calls.transformer += 1;\n try {\n return call();\n } finally {\n calls.transformer -= 1;\n }\n }\n /**\n * Loads the module of a real transformer or calls its factory, which counts\n * until it settles: Jest awaits both before it loads a test file, so no read\n * of the test file can come meanwhile.\n *\n * @param call - Makes the call.\n * @returns What the call settles with.\n */\n async function enterLoad(call) {\n calls.transformer += 1;\n try {\n return await call();\n } finally {\n calls.transformer -= 1;\n }\n }\n /**\n * Makes an asynchronous key or transform of a real transformer, inside which,\n * and in what it goes on with, `calls.asyncTransformer` holds true until it\n * settles. A count would take what Jest reads for another module meanwhile,\n * so the count of these, `calls.unsettled`, only tells whether one is left.\n *\n * @param call - Makes the call.\n * @returns What the call settles with.\n */\n async function enterAsync(call) {\n calls.unsettled += 1;\n try {\n return await calls.asyncTransformer.run(true, async () => await call());\n } finally {\n calls.unsettled -= 1;\n }\n }\n /**\n * Tells whether the project's Jest strips the types of a file no transformer\n * of the project claims.\n *\n * @param file - Absolute path of the module.\n * @returns Whether it does.\n */\n function strips(file) {\n return stripTypes !== null && TYPESCRIPT_EXTENSIONS.has(readExtension(file));\n }\n /**\n * Strips types as Jest does: Node's one warning about the function is spent\n * on an empty text with warnings off, and a failure gets Jest's words.\n *\n * @param text - Text of the module.\n * @param file - Absolute path of the module.\n * @returns The text with its types erased.\n * @throws {Error} When Node cannot strip the text, such as one with an\n * `enum`.\n */\n function strip(text, file) {\n if (!warned) {\n warned = true;\n let emitWarning = Object.getOwnPropertyDescriptor(process, \"emitWarning\");\n process.emitWarning = () => {};\n try {\n stripTypes(\"\", { mode: \"strip\" });\n } finally {\n Object.defineProperty(process, \"emitWarning\", emitWarning);\n }\n }\n try {\n return stripTypes(text, { mode: \"strip\" });\n } catch (error) {\n throw new Error(`jest: failed to strip TypeScript types from ${file}\\n\\n${error.message}\\n\\nNode.js only erases type annotations - it cannot compile TypeScript features that emit code, such as \\`enum\\`, \\`namespace\\` and parameter properties. Configure a \\`transform\\` using \\`@babel/preset-typescript\\` or \\`ts-jest\\` to handle this file.`, { cause: error });\n }\n }\n /**\n * Transformer of a file no pattern of the project matches.\n */\n let identity = {\n getCacheKey(text, file, options) {\n return hashText(text, file, options).update(strips(file) ? process.version : \"\").digest(\"hex\");\n },\n process(text, file) {\n return { code: strips(file) ? strip(text, file) : text };\n }\n };\n /**\n * Reads a JSON file of a plan, once.\n *\n * @param file - Absolute path of the file.\n * @returns Its value.\n */\n function readJson(file) {\n if (!files.has(file)) files.set(file, JSON.parse(readFile(file, \"utf8\")));\n return files.get(file);\n }\n /**\n * Finds the switched file of a module.\n *\n * @param plan - Absolute path of the plan, or null.\n * @param file - Absolute path of the module.\n * @returns The switched file, if the plan has it.\n */\n function findEntry(plan, file) {\n let entry = plan === null ? void 0 : readJson(plan)[file];\n return entry === void 0 ? void 0 : readJson(entry);\n }\n /**\n * Wraps a transformer: it gets the switched text, and options with the plain\n * project, so the plan and mootant's paths never reach its cache key.\n *\n * @param real - Transformer to wrap.\n * @param handed - Options the transformer was made with.\n * @param plan - Absolute path of the plan, or null.\n * @returns The transformer Jest gets.\n */\n function wrap(real, handed, plan) {\n /**\n * Gives the options of the real transformer.\n *\n * @param options - Options from Jest.\n * @returns The options with the plain project.\n */\n function plain(options) {\n let project = projects.get(options.config.id);\n return {\n ...options,\n configString: project.configString,\n transformerConfig: handed,\n config: project.config\n };\n }\n /**\n * Switches the text of a module.\n *\n * @param source - Text from Jest.\n * @param file - Absolute path of the module.\n * @returns The text and what happened to it.\n */\n function switchText(source, file) {\n return switchSource(findEntry(plan, file), source);\n }\n /**\n * Writes that a text was served or mismatched; the disk cache may then\n * spare the transformer, so this happens where the key is made.\n *\n * @param kind - What happened to the text.\n * @param file - Absolute path of the module.\n */\n function note(kind, file) {\n if (kind !== null) channel.write(channel.token, {\n kind,\n file\n });\n }\n /**\n * Writes that the transformer failed on a switched text; a failure on any\n * other text is the project's own.\n *\n * @param error - What the transformer threw.\n * @param kind - What happened to the text.\n * @param file - Absolute path of the module.\n */\n function noteFailure(error, kind, file) {\n if (kind === \"served\") channel.write(channel.token, {\n message: getErrorMessage(error),\n kind: \"rejected\",\n file\n });\n }\n let wrapped = {\n getCacheKey(source, file, options) {\n let { text, kind } = switchText(source, file);\n note(kind, file);\n try {\n return enter(() => real.getCacheKey ? real.getCacheKey(text, file, plain(options)) : hashText(text, file, plain(options)).digest(\"hex\"));\n } catch (error) {\n noteFailure(error, kind, file);\n throw error;\n }\n },\n canInstrument: Boolean(real.canInstrument)\n };\n if (real.process) wrapped.process = (source, file, options) => {\n let { text, kind } = switchText(source, file);\n try {\n return enter(() => real.process(text, file, plain(options)));\n } catch (error) {\n noteFailure(error, kind, file);\n throw error;\n }\n };\n if (real.processAsync) wrapped.processAsync = async (source, file, options) => {\n let { text, kind } = switchText(source, file);\n try {\n return await enterAsync(() => real.processAsync(text, file, plain(options)));\n } catch (error) {\n noteFailure(error, kind, file);\n throw error;\n }\n };\n if (real.getCacheKeyAsync) wrapped.getCacheKeyAsync = async (source, file, options) => {\n let { text, kind } = switchText(source, file);\n note(kind, file);\n try {\n return await enterAsync(() => real.getCacheKeyAsync(text, file, plain(options)));\n } catch (error) {\n noteFailure(error, kind, file);\n throw error;\n }\n };\n return wrapped;\n }\n return { async createTransformer({ realConfig, plan, real }) {\n if (real === null) return wrap(identity, void 0, plan);\n let clone = structuredClone(realConfig);\n let handed = TS_JEST_PATH.test(real) ? {\n ...clone,\n diagnostics: false\n } : clone;\n let loaded = await enterLoad(() => requireOrImportModule(real));\n return wrap(typeof loaded.createTransformer === \"function\" ? await enterLoad(() => loaded.createTransformer(handed)) : loaded, handed, plan);\n } };\n}\n/**\n* Starts the key of a text for a transformer that has no key of its own: the\n* text, the plain project, whether Jest asks for coverage counters, and the\n* file.\n*\n* @param text - Text of the module.\n* @param file - Absolute path of the module.\n* @param options - Plain options.\n* @returns The hash, to update further or digest.\n*/\nfunction hashText(text, file, options) {\n return hash(\"sha1\").update(text).update(options.configString).update(options.instrument ? \"instrument\" : \"\").update(file);\n}\n// core/runtime/runtime-global.ts\n/**\n* Name of the global through which switched code reaches the mutant runtime:\n* `globalThis.__mootant`.\n*/\nvar RUNTIME_GLOBAL = \"__mootant\";\n// adapters/shared/track-file-reads.ts\n/**\n* Functions of `node:fs` that read a path given first, each with its `Sync`\n* variant and the one of `fs/promises` where they exist; `open` reads only with\n* a read-only flag and writes otherwise, and `glob`, of Node 22 and later,\n* reads the directories its patterns walk.\n*/\nvar READERS = /* @__PURE__ */ new Set([\n \"createReadStream\",\n \"readFile\",\n \"readdir\",\n \"opendir\",\n \"access\",\n \"exists\",\n \"lstat\",\n \"glob\",\n \"stat\",\n \"open\"\n]);\n/**\n* Functions of `node:fs` that change the paths at the given arguments, with\n* their `Sync` and `fs/promises` variants; `mkdir` changes only the directories\n* it creates.\n*/\nvar WRITERS = {\n createWriteStream: [0],\n appendFile: [0],\n writeFile: [0],\n rename: [0, 1],\n truncate: [0],\n copyFile: [1],\n symlink: [1],\n unlink: [0],\n rmdir: [0],\n mkdir: [0],\n link: [1],\n cp: [1],\n rm: [0]\n};\n/**\n* Functions of `node:fs` that read the path at the first argument besides the\n* paths they change: the source of a copy, a move or a hard link, and the\n* target of a symbolic link, relative to the link's directory.\n*/\nvar SOURCES = /* @__PURE__ */ new Set([\n \"copyFile\",\n \"symlink\",\n \"rename\",\n \"link\",\n \"cp\"\n]);\n/**\n* Directories a recursive copy of a directory does not walk into for the files\n* it reads.\n*/\nvar SKIPPED = /* @__PURE__ */ new Set([\"node_modules\", \".git\"]);\n/**\n* Characters that make a segment of a glob pattern match more than one name.\n*/\nvar GLOB_MAGIC = /[!()*+?@[\\\\\\]{}]/u;\n/**\n* Bits of numeric `open` flags that create, empty or append to a file.\n*/\nvar WRITE_BITS = node_fs.default.constants.O_WRONLY | node_fs.default.constants.O_APPEND | node_fs.default.constants.O_CREAT | node_fs.default.constants.O_TRUNC;\n/**\n* Global slot of the tracking state of the process.\n*/\nvar SLOT = Symbol.for(\"mootant.file-reads\");\n/**\n* `path.resolve` as this module loads: code it watches may replace it, as a\n* test's `jest.spyOn(path, ...)` does, and must not see the calls made here.\n*/\nvar resolvePath = node_path.default.resolve;\n/**\n* `path.dirname` as this module loads.\n*/\nvar getDirectory$1 = node_path.default.dirname;\n/**\n* `path.join` as this module loads.\n*/\nvar joinPaths = node_path.default.join;\n/**\n* `fileURLToPath` as this module loads.\n*/\nvar readFileUrl = node_url.fileURLToPath;\n/**\n* Makes `node:fs` report the paths code reads and writes through it: replaces\n* the functions that read a path (`readFile`, `readdir`, `opendir`, `stat`,\n* `lstat`, `access`, `exists`, `open` and `createReadStream`, in their\n* callback, `Sync` and `fs/promises` forms) and those that change one (write,\n* create, remove, move, copy or link it) with wrappers, once per process, and\n* updates the named exports of the ESM modules `node:fs` and `node:fs/promises`\n* to them. A path is reported before the call, so a missing file counts too.\n* `open` reads unless its flags create, empty or append to the file, as `w`,\n* `a` or `O_CREAT` do; `r+` reads. The source of a copy, a move or a link is\n* read, and so is every file and directory in a directory `cp` copies, outside\n* `node_modules` and `.git`; `mkdir` writes only the directories that did not\n* exist. A recursive `readdir` or `opendir` reads the directory and every\n* directory in it, each listed by its own names, so adding a file anywhere in\n* the tree changes what was read; `readdir` also reads the directories behind\n* the links it follows. `glob` reads the same of the directory where each\n* pattern's fixed part ends. Calls of `node:fs` that a wrapped function makes\n* while it runs report nothing, and neither do those of the asynchronous work\n* of `glob`. Descriptors and file handles are not paths and are not reported.\n*\n* @param receiver - Receives the paths while it is the current receiver; the\n* next call replaces it, and null stops recording.\n*/\nfunction trackFileReads(receiver) {\n let global = globalThis;\n let slot = global[SLOT];\n if (slot === void 0) {\n slot = {\n original: {\n realpathSync: node_fs.default.realpathSync,\n readdirSync: node_fs.default.readdirSync,\n existsSync: node_fs.default.existsSync,\n statSync: node_fs.default.statSync\n },\n globbing: new node_async_hooks.AsyncLocalStorage(),\n receiver: null,\n inside: false\n };\n global[SLOT] = slot;\n let names = [...READERS, ...Object.keys(WRITERS)].flatMap((name) => [name, `${name}Sync`]);\n for (let target of [node_fs.default, node_fs.default.promises]) for (let name of names) {\n let original = Reflect.get(target, name);\n if (typeof original === \"function\") Reflect.set(target, name, wrap(original, name, slot));\n }\n (0, node_module.syncBuiltinESMExports)();\n }\n slot.receiver = receiver;\n}\n/**\n* Wraps a function of `node:fs` so it reports its path argument to the current\n* receiver before it runs.\n*\n* @param original - Function to wrap.\n* @param name - Its name, such as `readFileSync`.\n* @param slot - Tracking state of the process.\n* @returns Wrapper with the properties of the function, such as its\n* `util.promisify.custom`.\n*/\nfunction wrap(original, name, slot) {\n let base = name.replace(/Sync$/u, \"\");\n /**\n * Reports the paths, then calls the function.\n *\n * @param parameters - Arguments of the call.\n * @returns What the function returns.\n */\n function wrapper(...parameters) {\n if (slot.inside || slot.globbing.getStore() === true) return original.apply(this, parameters);\n let current = slot.receiver;\n if (current !== null) try {\n let access = getAccess(base, parameters, slot);\n for (let file of access.read) current.read(file);\n for (let file of access.written) current.write(file);\n } catch {}\n slot.inside = true;\n try {\n if (name !== \"glob\") return original.apply(this, parameters);\n return guardIterator(slot.globbing.run(true, () => original.apply(this, parameters)), slot);\n } finally {\n slot.inside = false;\n }\n }\n Object.defineProperties(wrapper, Object.getOwnPropertyDescriptors(original));\n return wrapper;\n}\n/**\n* Lists the directories a recursive listing reads: the path itself, whether it\n* is a directory or not, and every directory in it. A recursive `readdir`\n* follows links to directories, so with `follow` such a link is listed and\n* walked into by its own path, once per real directory, so a loop of links\n* ends; `opendir` and `glob` do not follow links. `node_modules` is listed but\n* not walked into, as no path in it is a project file.\n*\n* @param file - Absolute path of the listed directory.\n* @param slot - Tracking state of the process, with the functions as Node made\n* them.\n* @param follow - Whether the listing follows links to directories.\n* @returns Absolute paths of the directories, the listed path first.\n*/\nfunction walkDirectories(file, slot, follow) {\n let read = [file];\n let seen = /* @__PURE__ */ new Set();\n let directories = [file];\n while (directories.length > 0) {\n let directory = directories.shift();\n let entries = [];\n try {\n seen.add(slot.original.realpathSync(directory));\n entries = slot.original.readdirSync(directory, { withFileTypes: true });\n } catch {}\n for (let entry of entries) {\n let child = joinPaths(directory, entry.name);\n let walked = entry.isDirectory();\n if (follow && entry.isSymbolicLink()) try {\n walked = slot.original.statSync(child).isDirectory();\n if (walked && seen.has(slot.original.realpathSync(child))) {\n read.push(child);\n continue;\n }\n } catch {}\n if (walked) {\n read.push(child);\n if (entry.name !== \"node_modules\") directories.push(child);\n }\n }\n }\n return read;\n}\n/**\n* Lists a path a copy reads: a file, or a directory with every file and\n* directory in it, outside `node_modules` and `.git`; links in it are listed,\n* not followed.\n*\n* @param file - Absolute path of the source.\n* @param slot - Tracking state of the process, with the functions as Node made\n* them.\n* @param read - Receives the paths.\n*/\nfunction walk(file, slot, read) {\n read.push(file);\n let directories = [];\n try {\n if (slot.original.statSync(file).isDirectory()) directories.push(file);\n } catch {}\n while (directories.length > 0) {\n let directory = directories.shift();\n let entries = [];\n try {\n entries = slot.original.readdirSync(directory, { withFileTypes: true });\n } catch {}\n for (let entry of entries) if (!SKIPPED.has(entry.name)) {\n let child = joinPaths(directory, entry.name);\n read.push(child);\n if (entry.isDirectory()) directories.push(child);\n }\n }\n}\n/**\n* Finds the paths a call of a function of `node:fs` reads and changes when the\n* function reads a path given first: `open` changes the path unless its flags\n* leave the file as it is, a recursive `readdir` or `opendir` reads the path\n* and every directory in it, and any other call reads the path.\n*\n* @param base - Name of the function without `Sync`, such as `readFile`.\n* @param parameters - Arguments of the call.\n* @param slot - Tracking state of the process, with the functions as Node made\n* them.\n* @returns Paths read and changed, absolute; none when the first argument is no\n* path, such as a descriptor.\n*/\nfunction getReaderAccess(base, parameters, slot) {\n let access = {\n written: [],\n read: []\n };\n let first = toPath(parameters[0]);\n if (first === null) return access;\n if (base === \"open\" && !isReadOpen(parameters[1])) access.written.push(first);\n else if ((base === \"readdir\" || base === \"opendir\") && Boolean(parameters[1]?.recursive)) access.read.push(...walkDirectories(first, slot, base === \"readdir\"));\n else access.read.push(first);\n return access;\n}\n/**\n* Lists the paths a call of a function of `node:fs` that changes paths reads\n* besides them: the source of a copy, a move or a hard link, with every file\n* and directory in a directory `cp` copies, and the target of a symbolic link,\n* relative to the link's directory.\n*\n* @param base - Name of the function without `Sync`, such as `copyFile`.\n* @param parameters - Arguments of the call.\n* @param slot - Tracking state of the process, with the functions as Node made\n* them.\n* @returns Absolute paths read, none for a function that reads no source.\n*/\nfunction listSourceReads(base, parameters, slot) {\n let first = toPath(parameters[0]);\n if (first === null || !SOURCES.has(base)) return [];\n if (base === \"symlink\") {\n let link = toPath(parameters[1]);\n return [link === null || typeof parameters[0] !== \"string\" ? first : resolvePath(getDirectory$1(link), parameters[0])];\n }\n if (base === \"cp\") {\n let read = [];\n walk(first, slot, read);\n return read;\n }\n return [first];\n}\n/**\n* Lists the directories a call of `glob` reads: those each pattern given as a\n* string walks, relative to the `cwd` option, or to the working directory of\n* the process without one.\n*\n* @param parameters - Arguments of the call.\n* @param slot - Tracking state of the process, with the functions as Node made\n* them.\n* @returns Absolute paths of the directories, pattern by pattern.\n*/\nfunction listGlobReads(parameters, slot) {\n let read = [];\n let patterns = [parameters[0]].flat();\n let options = parameters[1];\n let cwd = typeof options === \"object\" ? toPath(options.cwd) : null;\n for (let pattern of patterns) if (typeof pattern === \"string\") read.push(...walkDirectories(getGlobBase(pattern, cwd ?? process.cwd()), slot, false));\n return read;\n}\n/**\n* Lists the paths a call of a function of `node:fs` changes: those at the\n* arguments the function changes, where `mkdir` changes only the directories it\n* creates, the given one first, then each parent that does not exist yet.\n*\n* @param base - Name of the function without `Sync`, such as `writeFile`.\n* @param parameters - Arguments of the call.\n* @param slot - Tracking state of the process, with the functions as Node made\n* them.\n* @returns Absolute paths changed.\n*/\nfunction listWrites(base, parameters, slot) {\n let written = [];\n let indexes = WRITERS[base];\n for (let index of indexes) {\n let file = toPath(parameters[index]);\n if (file === null) continue;\n if (base === \"mkdir\") while (!slot.original.existsSync(file)) {\n written.push(file);\n file = getDirectory$1(file);\n }\n else written.push(file);\n }\n return written;\n}\n/**\n* Makes the asynchronous iterator `fs.promises.glob` returns run each step as\n* the work of a wrapped `glob`, whose own calls of `node:fs` report nothing.\n*\n* @param result - What `glob` returned: an asynchronous generator, or nothing\n* for the callback form.\n* @param slot - Tracking state of the process.\n* @returns An iterator over the same values, or nothing.\n*/\nfunction guardIterator(result, slot) {\n if (result === void 0) return result;\n let generator = result;\n let guarded = {\n return: (value) => slot.globbing.run(true, () => generator.return(value)),\n next: () => slot.globbing.run(true, () => generator.next()),\n [Symbol.asyncIterator]: () => guarded\n };\n return guarded;\n}\n/**\n* Finds the directory a glob pattern walks: where its fixed segments end, one\n* level up for every `..` after them, since each may leave a directory the\n* pattern entered.\n*\n* @param pattern - Pattern as `fs.glob` takes it, with `/` between segments.\n* @param cwd - Absolute path the pattern is relative to.\n* @returns Absolute path of the directory.\n*/\nfunction getGlobBase(pattern, cwd) {\n let segments = pattern.split(\"/\");\n let magic = segments.findIndex((segment) => GLOB_MAGIC.test(segment));\n if (magic === -1) return resolvePath(cwd, pattern);\n let base = resolvePath(cwd, segments.slice(0, magic).join(\"/\"));\n for (let segment of segments.slice(magic)) if (segment === \"..\") base = getDirectory$1(base);\n return base;\n}\n/**\n* Finds the paths a call of a function of `node:fs` reads and changes.\n*\n* @param base - Name of the function without `Sync`, such as `readFile`.\n* @param parameters - Arguments of the call.\n* @param slot - Tracking state of the process, with the functions as Node made\n* them.\n* @returns Paths read and changed, absolute.\n*/\nfunction getAccess(base, parameters, slot) {\n if (base === \"glob\") return {\n read: listGlobReads(parameters, slot),\n written: []\n };\n if (READERS.has(base)) return getReaderAccess(base, parameters, slot);\n return {\n read: listSourceReads(base, parameters, slot),\n written: listWrites(base, parameters, slot)\n };\n}\n/**\n* Turns a path argument into an absolute path.\n*\n* @param value - Argument: a string, a `file:` URL or a buffer is a path;\n* anything else, such as a descriptor, is not.\n* @returns The absolute path, or null when the argument is no path.\n*/\nfunction toPath(value) {\n let file = null;\n if (typeof value === \"string\") file = value;\n else if (isUrl(value)) file = value.protocol === \"file:\" ? readFileUrl(value) : null;\n else if (value instanceof Buffer) file = value.toString();\n return file === null ? null : resolvePath(file);\n}\n/**\n* Tells whether `node:fs` takes a value as a URL. It checks the shape, not the\n* class, as Node does, so the `URL` of another realm counts too, such as\n* jsdom's in the tests of a Jest project.\n*\n* @param value - Argument of a call.\n* @returns Whether it has a `href` and a `protocol`, and neither `auth` nor\n* `path`, which a result of the legacy `url.parse` has.\n*/\nfunction isUrl(value) {\n let url = value;\n return Boolean(url?.href) && Boolean(url?.protocol) && url?.auth === void 0 && url?.path === void 0;\n}\n/**\n* Tells whether flags of `open` leave the content of an existing file as it is,\n* so what code reads from it is an input.\n*\n* @param flags - Flags argument of `open`.\n* @returns Whether the flags neither create, empty nor append to the file.\n*/\nfunction isReadOpen(flags) {\n if (typeof flags === \"number\") return (flags & WRITE_BITS) === 0;\n return typeof flags !== \"string\" || !/[aw]/u.test(flags);\n}\n// adapters/jest/worker/create-worker-channel.ts\n/**\n* `fs.writeSync` as this module loads: CommonJS output reads a named import on\n* the real module at each use, where a test's `jest.spyOn(fs, ...)` reaches\n* it.\n*/\nvar writeLine = node_fs.writeSync;\n/**\n* `fs.closeSync` as this module loads.\n*/\nvar closeFile = node_fs.closeSync;\n/**\n* `fs.openSync` as this module loads.\n*/\nvar openFile = node_fs.openSync;\n/**\n* `Date.now` of the worker's realm as this module loads, which neither fake\n* timers nor spies in a vm reach.\n*/\nvar { now: now$1 } = Date;\n/**\n* Creates the channel of a worker, the writer of the records of its units. A\n* record carries the token of its unit, so a leftover timer of an earlier unit\n* cannot write into this one. Writing never throws into test code: `mock-fs`\n* replaces the binding that even a captured `writeSync` goes through, so a line\n* that fails to write stays queued, with what follows it, for the next write.\n*\n* @returns The channel, with no unit yet.\n*/\nfunction createWorkerChannel() {\n let descriptor = null;\n let queue = [];\n /**\n * Writes the queued lines in order and forgets each one written.\n *\n * @param target - Descriptor of the out file.\n */\n function flush(target) {\n while (queue.length > 0) {\n writeLine(target, queue[0]);\n queue.shift();\n }\n }\n let channel = {\n write(token, record) {\n if (descriptor === null || token !== channel.token) return;\n try {\n queue.push(`${JSON.stringify({\n ...record,\n time: now$1()\n })}\\n`);\n flush(descriptor);\n } catch {}\n },\n end() {\n if (descriptor === null) return;\n try {\n flush(descriptor);\n } catch {}\n try {\n closeFile(descriptor);\n } catch {}\n descriptor = null;\n queue = [];\n },\n begin(unit) {\n channel.token += 1;\n channel.unit = unit;\n channel.vm = null;\n descriptor = openFile(unit.out, \"a\");\n channel.write(channel.token, { kind: \"start\" });\n return channel.token;\n },\n enterEnvironment() {},\n unit: null,\n vm: null,\n token: 0\n };\n return channel;\n}\n// adapters/jest/worker/count-resolver-calls.ts\n/**\n* Wraps Jest's resolver of a project so that `calls.resolver` counts each call\n* of one of its methods until the call returns. A method runs on the resolver\n* itself, so the calls it makes of other methods do not count again. An\n* asynchronous method counts until it returns its promise, so a read of a test\n* that runs while the promise is pending still counts as the test's, and runs\n* in `calls.asyncResolver` too, so what it goes on with after an `await`, such\n* as a project's own asynchronous resolver that reads a file, stays the\n* resolver's.\n*\n* @param resolver - Jest's resolver of a project.\n* @param calls - Calls running in the worker.\n* @returns The resolver behind a proxy.\n*/\nfunction countResolverCalls(resolver, calls) {\n return new Proxy(resolver, { \n /**\n * Gives a property of the resolver, a method as one that counts its calls.\n *\n * @param target - The resolver.\n * @param key - Name of the property.\n * @returns The property.\n */\nget(target, key) {\n let value = Reflect.get(target, key);\n if (typeof value !== \"function\") return value;\n /**\n * Calls the method on the resolver while `calls.resolver` counts it.\n *\n * @param parameters - Arguments of the call.\n * @returns What the method returns.\n */\n return (...parameters) => {\n calls.resolver += 1;\n try {\n return typeof key === \"string\" && key.endsWith(\"Async\") ? calls.asyncResolver.run(true, () => Reflect.apply(value, target, parameters)) : Reflect.apply(value, target, parameters);\n } finally {\n calls.resolver -= 1;\n }\n };\n } });\n}\n// adapters/shared/track-spawners.ts\n/**\n* Functions of `node:child_process` that start a process; it gets the variables\n* of the process when the options name no `env`.\n*/\nvar SPAWNERS = [\n \"execFileSync\",\n \"spawnSync\",\n \"execFile\",\n \"execSync\",\n \"spawn\",\n \"exec\",\n \"fork\"\n];\n/**\n* Key of the state on `globalThis`, so the functions are wrapped once in a\n* process, whatever module loads this one.\n*/\nvar SPAWNER_SLOT = Symbol.for(\"mootant.spawners\");\n/**\n* Makes the functions of `node:child_process` that start a process report `*`\n* before they start one with the variables of the process: options that are\n* missing or name no `env`, or name `process.env` itself, since Node passes the\n* variables on without reading them where tracking sees it. The functions are\n* wrapped once in a process, with their `util.promisify.custom` too; later\n* calls only replace the receiver. A promisified `execFile` or `exec` made\n* before the first call, as a preload may make and hand to tests through a\n* global, starts processes without the wrappers, which only the caller can make\n* up for; a function a preload put in place of one with no promisified form of\n* its own is wrapped as it is.\n*\n* @param real - `process.env` as Node made it; the one of the first call\n* applies.\n* @param record - Receives `*` while it is the current receiver; the next call\n* replaces it, and null stops recording.\n* @returns Whether such a promisified function was made before the first call,\n* so that any process may get the variables with no word.\n*/\nfunction trackSpawners(real, record) {\n let global = globalThis;\n let slot = global[SPAWNER_SLOT];\n if (slot === void 0) {\n slot = {\n early: [\"execFile\", \"exec\"].some((name) => {\n let custom = Reflect.get(Reflect.get(node_child_process.default, name), node_util.promisify.custom);\n return typeof custom === \"function\" && Reflect.get(custom, node_util.promisify.custom) === custom;\n }),\n wrappers: /* @__PURE__ */ new WeakMap(),\n record: null,\n real\n };\n global[SPAWNER_SLOT] = slot;\n for (let name of SPAWNERS) {\n let original = Reflect.get(node_child_process.default, name);\n Reflect.set(node_child_process.default, name, wrapSpawner(original, slot));\n }\n (0, node_module.syncBuiltinESMExports)();\n }\n slot.record = record;\n return slot.early;\n}\n/**\n* Wraps a function of `node:child_process` so it reports `*` before it starts a\n* process with the variables of the process. A function is wrapped once:\n* wrapping it again, or wrapping its wrapper, returns the same wrapper, so a\n* function that names itself as its `util.promisify.custom`, as the result of\n* `util.promisify(execFile)` does, gets a wrapper that names itself.\n*\n* @param original - Function to wrap.\n* @param slot - What the wrappers report to.\n* @returns Wrapper with the properties of the function, and its\n* `util.promisify.custom` wrapped too, since it starts the process without\n* the function.\n*/\nfunction wrapSpawner(original, slot) {\n let known = slot.wrappers.get(original);\n if (known !== void 0) return known;\n /**\n * Reports `*` when the process inherits the variables, then calls the\n * function.\n *\n * @param parameters - Arguments of the call.\n * @returns What the function returns.\n */\n function wrapper(...parameters) {\n let options = parameters.slice(1).find((value) => typeof value === \"object\" && value !== null && !Array.isArray(value));\n if ([\n process.env,\n void 0,\n slot.real,\n null\n ].includes(options?.env)) slot.record?.(\"*\");\n return original.apply(this, parameters);\n }\n slot.wrappers.set(original, wrapper);\n slot.wrappers.set(wrapper, wrapper);\n let descriptors = Object.getOwnPropertyDescriptors(original);\n let custom = descriptors[node_util.promisify.custom];\n if (typeof custom?.value === \"function\") custom.value = wrapSpawner(custom.value, slot);\n Object.defineProperties(wrapper, descriptors);\n return wrapper;\n}\n// adapters/jest/worker/install-exit-guards.ts\n/**\n* Leaves the worker with only mootant's listeners for errors nothing caught.\n* Circus strips the listeners of `uncaughtException` and `unhandledRejection`\n* and restores only what it read from the vm's copy, so after a load failure\n* dead listeners stay. The guard ends the worker, since nothing owns such an\n* error.\n*\n* @param target - The worker's process.\n*/\nfunction installExitGuards(target) {\n target.removeAllListeners(\"uncaughtException\");\n target.removeAllListeners(\"unhandledRejection\");\n target.removeAllListeners(\"rejectionHandled\");\n /**\n * Reports the error and ends the worker.\n *\n * @param error - Value nothing caught.\n */\n function guard(error) {\n target.stderr.write(`mootant: an error outside any test: ${getErrorMessage(error)}\\n`);\n target.exit(1);\n }\n target.on(\"uncaughtException\", guard);\n target.on(\"unhandledRejection\", guard);\n}\n// core/compare-code-units.ts\n/**\n* Compares two strings by their UTF-16 code units, the order of the default\n* array sort, so the result never depends on the locale of the machine.\n*\n* @param left - String expected first.\n* @param right - String expected second.\n* @returns A negative number when `left` sorts first, a positive number when\n* `right` sorts first and 0 when both strings are equal.\n*/\nfunction compareCodeUnits(left, right) {\n if (left < right) return -1;\n if (left > right) return 1;\n return 0;\n}\n// adapters/jest/worker/create-state-guard.ts\n/**\n* Core modules a test can change for every later unit of a worker.\n*/\nvar CORE_MODULES = [\n \"assert\",\n \"async_hooks\",\n \"buffer\",\n \"child_process\",\n \"crypto\",\n \"dns\",\n \"events\",\n \"fs\",\n \"fs/promises\",\n \"http\",\n \"https\",\n \"module\",\n \"net\",\n \"os\",\n \"path\",\n \"perf_hooks\",\n \"readline\",\n \"stream\",\n \"string_decoder\",\n \"timers\",\n \"tty\",\n \"url\",\n \"util\",\n \"vm\",\n \"worker_threads\",\n \"zlib\"\n];\n/**\n* Resources that a test can leave behind, such as a server on a fixed port.\n*/\nvar RESOURCES = [\n \"TCPServerWrap\",\n \"PipeWrap\",\n \"PipeServerWrap\",\n \"ProcessWrap\"\n];\n/**\n* Takes a baseline of what units of a worker share: the own properties of core\n* modules, the working directory, the mask of new files and the resources a\n* test can leave. Creating it is the last step of a worker's boot, after what\n* refs the IPC pipe, and reads `stdout` and `stderr` first so their pipes are\n* in the baseline.\n*\n* @param input - The worker's process and how to wait for a turn.\n* @returns Function that waits two turns of the event loop, since a server\n* closed properly stays listed until uv's closing phase, and gives the sorted\n* reasons the worker is no longer clean: `cwd`, `umask`, `<module>.<key>` for\n* a new, changed or deleted key, and `<resource> +<n>` for a count that\n* rose.\n*/\nfunction createStateGuard(input) {\n let { process: target } = input;\n Reflect.get(target, \"stdout\");\n Reflect.get(target, \"stderr\");\n let modules = CORE_MODULES.map((name) => {\n let owner = target.getBuiltinModule(name);\n return {\n descriptors: readDescriptors(owner),\n owner,\n name\n };\n });\n let directory = target.cwd();\n let mask = target.umask();\n let resources = countResources(target.getActiveResourcesInfo());\n /**\n * Waits for one turn of the event loop.\n *\n * @returns A promise that settles on the next turn.\n */\n function waitTurn() {\n return new Promise((resolve) => {\n input.setImmediate(resolve);\n });\n }\n return async () => {\n await waitTurn();\n await waitTurn();\n let reasons = [];\n if (target.cwd() !== directory) reasons.push(\"cwd\");\n if (target.umask() !== mask) reasons.push(\"umask\");\n for (let { descriptors, owner, name } of modules) {\n let current = readDescriptors(owner);\n let keys = /* @__PURE__ */ new Set([...descriptors.keys(), ...current.keys()]);\n for (let key of keys) if (isChanged(descriptors.get(key), current.get(key), owner)) reasons.push(`${name}.${String(key)}`);\n }\n let counts = countResources(target.getActiveResourcesInfo());\n for (let [index, resource] of RESOURCES.entries()) {\n let rise = counts[index] - resources[index];\n if (rise > 0) reasons.push(`${resource} +${rise}`);\n }\n return reasons.toSorted(compareCodeUnits);\n };\n}\n/**\n* Tells whether a key of a core module differs from the baseline. A getter\n* replaced by the value it returns is no change: Node's lazy properties replace\n* themselves.\n*\n* @param before - Descriptor in the baseline, if the key was there.\n* @param after - Descriptor now, if the key is there.\n* @param owner - The module.\n* @returns Whether the key counts as changed.\n*/\nfunction isChanged(before, after, owner) {\n if (before === void 0 || after === void 0) return true;\n if (before.value === after.value && before.get === after.get && before.set === after.set) return false;\n return before.get === void 0 || !Object.hasOwn(after, \"value\") || before.get.call(owner) !== after.value;\n}\n/**\n* Reads the own properties of a module without running its getters.\n*\n* @param owner - The module.\n* @returns Descriptors by key.\n*/\nfunction readDescriptors(owner) {\n return new Map(Reflect.ownKeys(owner).map((key) => [key, Reflect.getOwnPropertyDescriptor(owner, key)]));\n}\n/**\n* Counts the resources a test can leave.\n*\n* @param listed - What the process lists as active.\n* @returns Count of each of `RESOURCES`, in its order.\n*/\nfunction countResources(listed) {\n return RESOURCES.map((resource) => listed.filter((item) => item === resource).length);\n}\n// adapters/jest/worker/read-error-facts.ts\n/**\n* Message of a thrown value that throws when it is read.\n*/\nvar UNREADABLE_MESSAGE = \"An error mootant cannot read.\";\n/**\n* Reads the message and the realm of a thrown value. A project can throw\n* anything, such as a `Proxy` with throwing traps, and a failed test must not\n* lose its flag to an odd value, so nothing here throws: a value that cannot be\n* read has the realm found before the read that threw, `other` when none was.\n*\n* @param entry - What circus keeps: a value, or a `[error, asyncError]` pair,\n* of which the first counts.\n* @param realms - What tells the realms apart.\n* @param realms.current - `Error` of the vm of the running unit, or null.\n* @param realms.dead - `Error` of the vm of every unit that ended.\n* @returns First line of the message, at most 200 code units, and the realm.\n*/\nfunction readErrorFacts(entry, realms) {\n let message = UNREADABLE_MESSAGE;\n let realm = \"other\";\n try {\n let value = Array.isArray(entry) ? entry[0] : entry;\n realm = readRealm(value, realms);\n message = getErrorMessage(value);\n } catch {}\n return {\n message,\n realm\n };\n}\n/**\n* Tells where a thrown value comes from.\n*\n* @param value - What was thrown.\n* @param realms - What tells the realms apart.\n* @param realms.current - `Error` of the vm of the running unit, or null.\n* @param realms.dead - `Error` of the vm of every unit that ended.\n* @returns Where the value comes from.\n*/\nfunction readRealm(value, realms) {\n if (value === null || typeof value !== \"object\" && typeof value !== \"function\") return \"primitive\";\n if (value instanceof Error) return \"host\";\n if (realms.current !== null && value instanceof realms.current) return \"current\";\n let prototype = Object.getPrototypeOf(value);\n while (prototype !== null) {\n let owner = Object.getOwnPropertyDescriptor(prototype, \"constructor\");\n if (realms.dead.has(owner?.value)) return \"stale\";\n prototype = Object.getPrototypeOf(prototype);\n }\n return \"other\";\n}\n// adapters/jest/worker/create-circus-tracker.ts\n/**\n* Circus's message for a test or hook that ran past its timeout, which circus\n* throws as a string, so a project's own error that holds some of these words\n* stays a failure.\n*/\nvar TIMEOUT_MESSAGE = /^Exceeded timeout of \\S+ ms for a (?:hook|test)\\b/u;\n/**\n* Creates the handler of circus's events for one unit, which turns them into\n* records. Every test of a unit runs, as in a plain run, since a later test may\n* clean what the next unit needs. It may throw on a broken input: the caller\n* catches, since circus's `dispatch` does not and a throw would fail the user's\n* file. `test_started` opens an attempt because `.only` and `-t` give\n* `test_start` for tests that never run. An `error` event other than a stale\n* one writes nothing: on Jest 30 a rejection handled later never fails the\n* file, so a record would be a false stray. Jest reads the errors of a test\n* when the run ends, and they may change after its `test_done`: Jest 30.5 can\n* give a test errors then, and an environment's own handler, which runs after\n* this one, may give or take them, as one that keeps failing tests in\n* quarantine does. So `run_finish`, which runs once that handler settled,\n* writes one more `try` for a test whose errors no longer match its last one,\n* either way, which folding reads as its last.\n*\n* @param input - What the tracker reads and where it reports.\n* @returns The handler.\n*/\nfunction createCircusTracker(input) {\n let { freezeSnapshots, onStale, realms, write, side, dry, now } = input;\n let { runtime } = side;\n let fileCoverage = runtime.coverage;\n let attempts = /* @__PURE__ */ new WeakMap();\n let ids = /* @__PURE__ */ new WeakMap();\n let occurrences = /* @__PURE__ */ new Map();\n let written = /* @__PURE__ */ new Map();\n let concurrent = false;\n /**\n * Gives every test of a block its id, in the order of definition, so an id\n * depends on neither the seed nor retries.\n *\n * @param block - Block to walk.\n * @param names - Names of the block and the blocks around it, without the\n * root's.\n */\n function assignIds(block, names) {\n for (let child of block.children) if (child.type === \"describeBlock\") assignIds(child, [...names, child.name]);\n else {\n let name = [...names, child.name].join(\" > \");\n let occurrence = occurrences.get(name) ?? 0;\n occurrences.set(name, occurrence + 1);\n ids.set(child, {\n occurrence,\n name\n });\n }\n }\n /**\n * Writes a `try` record with what a test holds now.\n *\n * @param test - Test the record is about.\n * @param attempt - What the record says of the attempt.\n * @param attempt.covers - Ids of the sites of the attempt, or null.\n * @param attempt.duration - Milliseconds of the attempt.\n * @param attempt.hits - Site evaluations in the attempt.\n */\n function writeTry(test, attempt) {\n let { occurrence, name } = ids.get(test);\n let failed = test.errors.length > 0;\n let facts = failed ? readErrorFacts(test.errors[0], realms) : null;\n write({\n timedOut: facts !== null && TIMEOUT_MESSAGE.test(facts.message),\n message: facts?.message ?? null,\n realm: facts?.realm ?? null,\n reached: side.isReached(),\n kind: \"try\",\n occurrence,\n failed,\n name,\n ...attempt\n });\n if (facts?.realm === \"stale\") onStale();\n written.set(test, failed);\n }\n return (event, state) => {\n switch (event.name) {\n case \"test_started\": {\n let { occurrence, name } = ids.get(event.test);\n let covers = fileCoverage === null || concurrent ? null : /* @__PURE__ */ new Set();\n attempts.set(event.test, {\n hits: runtime.hits,\n started: now(),\n covers\n });\n if (covers !== null) runtime.coverage = covers;\n write({\n timeout: (event.test.timeout ?? 0) || state.testTimeout,\n kind: \"open\",\n occurrence,\n name\n });\n break;\n }\n case \"hook_failure\": {\n let { type } = event.hook;\n if (type === \"beforeAll\" || type === \"afterAll\") {\n let { message } = readErrorFacts(event.error, realms);\n write({\n timedOut: TIMEOUT_MESSAGE.test(message),\n kind: \"hook\",\n message,\n type\n });\n }\n break;\n }\n case \"run_finish\":\n for (let [test, failed] of written) if (test.errors.length > 0 !== failed) writeTry(test, {\n covers: null,\n duration: 0,\n hits: 0\n });\n break;\n case \"hook_start\":\n if (dry) write({\n timeout: (event.hook.timeout ?? 0) || state.testTimeout,\n kind: \"beat\"\n });\n break;\n case \"run_start\":\n assignIds(state.rootDescribeBlock, []);\n write({\n covers: [...fileCoverage ?? []].toSorted(compareCodeUnits),\n hits: runtime.hits,\n kind: \"load\"\n });\n freezeSnapshots();\n break;\n case \"test_done\": {\n let attempt = attempts.get(event.test);\n writeTry(event.test, {\n covers: attempt.covers === null ? null : [...attempt.covers].toSorted(compareCodeUnits),\n duration: now() - attempt.started,\n hits: runtime.hits - attempt.hits\n });\n runtime.coverage = fileCoverage;\n attempts.delete(event.test);\n break;\n }\n case \"add_test\":\n if (!concurrent && event.concurrent) {\n concurrent = true;\n write({ kind: \"concurrent\" });\n }\n break;\n case \"error\": {\n let { message, realm } = readErrorFacts(event.error, realms);\n if (realm === \"stale\") {\n write({\n kind: \"stale\",\n message\n });\n onStale();\n }\n break;\n }\n }\n };\n}\n// adapters/jest/worker/create-test-runner.ts\n/**\n* Key of what `expect` keeps on the global object of a vm, with its state.\n*/\nvar MATCHERS_SLOT = Symbol.for(\"$$jest-matchers-object\");\n/**\n* `Date.now` of the worker's realm as this module loads, which neither fake\n* timers nor spies in a vm reach.\n*/\nvar { now } = Date;\n/**\n* `existsSync` as this module loads, which a test's spy does not reach.\n*/\nvar exists = node_fs.existsSync;\n/**\n* Creates the `testRunner` function of the project copies. It reads the token,\n* the unit and the vm's side once, so a leftover of this unit writes under this\n* unit's token and no later one; the vm's side is always set here, since\n* `setupFiles` ran before Jest calls a test framework. The real test framework\n* runs out of the store of the test environment's calls\n* (`WorkerCalls.environment`), which the last setup file may have entered for\n* `environment.setup()` and the load of the real test framework, and what\n* follows it, `environment.teardown()` among it, is back in it.\n*\n* @param input - What the wrapper works with.\n* @returns The function Jest calls as `(globalConfig, config, environment,\n* runtime, testPath, send)`, which runs the real test framework with the\n* tracker of the unit and returns its result.\n*/\nfunction createTestRunner(input) {\n let { requireOrImportModule, projects, channel, onStale, calls, dead } = input;\n return async (...parameters) => {\n let [, config, environment] = parameters;\n let real = await requireOrImportModule(projects.get(config.id).config.testRunner);\n let { token } = channel;\n let unit = channel.unit;\n let side = channel.vm;\n let realms = {\n current: side.realmError,\n dead\n };\n /**\n * Writes a record of this unit.\n *\n * @param record - Record to write.\n */\n function write(record) {\n channel.write(token, record);\n }\n let tracker = createCircusTracker({\n freezeSnapshots: () => {\n freezeSnapshots(environment.global);\n },\n dry: unit.mutant === null,\n onStale,\n realms,\n write,\n side,\n now\n });\n let previous = environment.handleTestEvent;\n /**\n * Runs the tracker, which must not fail the user's file.\n *\n * @param event - Event of circus.\n * @param state - State of circus.\n */\n function track(event, state) {\n try {\n tracker(event, state);\n } catch (error) {\n write({\n message: readErrorFacts(error, realms).message,\n kind: \"tracker-error\",\n event: event.name\n });\n }\n }\n /**\n * Runs the tracker, then the handler the environment had, which may fail\n * the user's file, as in plain Jest. On `run_finish` the tracker runs once\n * that handler settled, thrown or not: circus reads what the tests hold\n * right after that event, and the handler may give a test an error then.\n *\n * @param event - Event of circus.\n * @param state - State of circus.\n * @returns What the environment's handler returns, which circus awaits.\n */\n function handleTestEvent(event, state) {\n if (event.name === \"run_finish\") return trackAfter(() => callEnvironment(this, event, state), event, state);\n track(event, state);\n return callEnvironment(this, event, state);\n }\n /**\n * Calls the handler the environment had, if any, inside the store of its\n * calls, so a read in it or in what it goes on with is the session's, as an\n * environment may keep what it read across units. Without a handler the\n * store stays off, which on Node 22 would slow every promise of the unit.\n *\n * @param self - What circus calls the handler on.\n * @param event - Event of circus.\n * @param state - State of circus.\n * @returns What the handler returns.\n */\n function callEnvironment(self, event, state) {\n if (previous === void 0) return;\n return calls.environment.run(true, () => previous.call(self, event, state));\n }\n /**\n * Runs the tracker once a call settled, thrown or not.\n *\n * @param call - Call of the environment's handler.\n * @param event - Event of circus.\n * @param state - State of circus.\n * @returns What the call returned, awaited.\n */\n async function trackAfter(call, event, state) {\n try {\n return await call();\n } finally {\n track(event, state);\n }\n }\n environment.handleTestEvent = handleTestEvent;\n return await calls.environment.exit(() => real(...parameters));\n };\n}\n/**\n* Keeps Jest from writing the snapshot file of a test file. `updateSnapshot:\n* 'none'` holds back new values only: with an unchecked entry `save` still\n* rewrites the file, with its entries in Jest's order and the header of this\n* major, in the user's tree. The stand-in writes nothing and says what `save`\n* says of a snapshot file with no entry, which Jest calls obsolete and which\n* fails a plain run with every test passing: deleted, though only `-u` removes\n* it.\n*\n* @param global - Global object of the vm, whose `expect` holds the state of\n* the snapshots by the time the tests run.\n*/\nfunction freezeSnapshots(global) {\n let { state } = Reflect.get(global, MATCHERS_SLOT);\n let { snapshotState } = state;\n snapshotState.save = () => ({\n deleted: Object.keys(snapshotState._snapshotData).length === 0 && (!snapshotState._dirty || snapshotState._inlineSnapshots.length === 0) && exists(snapshotState._snapshotPath),\n saved: false\n });\n}\n// adapters/jest/worker/channel-slot.ts\n/**\n* Key of the worker's channel on `process`: a test's vm gets a copy of it that\n* holds what a symbol key holds as it is, so the vm reaches the same object,\n* and the bundle of the vm's setup has no module in common with the worker's.\n*/\nvar CHANNEL_SLOT = Symbol.for(\"mootant.channel\");\n// adapters/jest/worker/track-stores.ts\n/**\n* Remembers every `AsyncLocalStorage` enabled from now on, through its private\n* `_enable`. On Jest 30 with Node 22 a store a unit left enabled made every\n* later unit slower, from 17 to 133 ms over 2000 units. Node 24 has no\n* `_enable`, and nothing to fix.\n*\n* @param prototype - `AsyncLocalStorage.prototype`.\n* @returns Function that disables every store remembered and forgets them.\n*/\nfunction trackStores(prototype) {\n let stores = /* @__PURE__ */ new Set();\n let original = Reflect.get(prototype, \"_enable\");\n /**\n * Remembers a store and enables it.\n *\n * @param parameters - Arguments of the call.\n * @returns What the original returns.\n */\n function enable(...parameters) {\n stores.add(this);\n return original.apply(this, parameters);\n }\n if (typeof original === \"function\") Reflect.set(prototype, \"_enable\", enable);\n return () => {\n for (let store of stores) store.disable();\n stores.clear();\n };\n}\n// adapters/shared/track-file-inputs.ts\n/**\n* `path.dirname` as this module loads, since code it watches may replace it.\n*/\nvar getDirectory = node_path.default.dirname;\n/**\n* Starts recording the files and directories code reads through `node:fs`, and\n* which of them it changed itself: the path it wrote or the directory that path\n* is in. A read counts unless the code wrote that path earlier, since then it\n* reads its own output and not an input.\n*\n* @param accept - Tells whether a path counts when it is read.\n* @returns The files read so far and the function that stops recording and\n* returns what was read.\n*/\nfunction trackFileInputs(accept) {\n let written = /* @__PURE__ */ new Set();\n let touched = /* @__PURE__ */ new Set();\n let files = /* @__PURE__ */ new Set();\n trackFileReads({\n write: (file) => {\n written.add(file);\n touched.add(file);\n touched.add(getDirectory(file));\n },\n read: (file) => {\n if (accept(file) && !written.has(file)) files.add(file);\n }\n });\n return {\n stop: () => {\n trackFileReads(null);\n return {\n modified: [...files].filter((file) => touched.has(file)).toSorted(),\n files: [...files].toSorted()\n };\n },\n files\n };\n}\n// adapters/jest/worker/wrap-project-config.ts\n/**\n* Pattern of the last transformer entry, which matches every file. Not `^`:\n* Jest keeps loaded transformers under pattern and path, all entries here have\n* one path, and a project's own `^` would collide and lose its transformer.\n*/\nvar CATCH_ALL_PATTERN = \"^(?:)\";\n/**\n* Makes the copy of a project's configuration that a unit runs: mootant's test\n* framework, first setup file and transformer wrap the project's, and so does a\n* last setup file when the test environment or the test runner is the project's\n* own, not a package, as its calls may read a file once in a worker. A file no\n* pattern matches would have no transformer, and Jest's fallback key hashes the\n* copy's `configString`, which holds per-run paths; the catch-all gives it the\n* wrapper's key. `silent` and `verbose` are cleared because Jest 30.4 reads the\n* project's first, and one copy serves dry runs and units.\n*\n* @param config - Configuration as `--showConfig` printed it.\n* @param plan - Absolute path of the switch plan, or null; a new path per plan,\n* so each plan gets its own entry in Jest's in-memory transforms.\n* @param directory - Real path of the directory of mootant's Jest files.\n* @returns The copy.\n*/\nfunction wrapProjectConfig(config, plan, directory) {\n let transformer = `${directory}/transformer.cjs`;\n let escaped = directory.replaceAll(/[$()*+.?[\\\\\\]^{|}]/gu, String.raw`\\$&`);\n return {\n ...config,\n setupFiles: [\n `${directory}/vm-setup.cjs`,\n ...config.setupFiles,\n ...[config.testEnvironment, config.testRunner].some((file) => !/[/\\\\]node_modules[/\\\\]/u.test(file)) ? [`${directory}/vm-setup-end.cjs`] : []\n ],\n transform: [...config.transform.map(([pattern, real, realConfig]) => [\n pattern,\n transformer,\n {\n realConfig,\n real,\n plan\n }\n ]), [\n CATCH_ALL_PATTERN,\n transformer,\n {\n real: null,\n plan\n }\n ]],\n transformIgnorePatterns: [`^${escaped}/`, ...config.transformIgnorePatterns],\n testRunner: `${directory}/test-runner.cjs`,\n testLocationInResults: true,\n detectLeaks: false,\n verbose: void 0,\n silent: void 0,\n cache: true\n };\n}\n// adapters/jest/worker/read-jest-result.ts\n/**\n* Jest's own words for a test file without tests: `TestRunner` lacks the check\n* of the scheduler that says them.\n*/\nvar NO_TESTS = \"Your test suite must contain at least one test.\";\n/**\n* Reads what the `finish` record of a unit takes from a test file that gave a\n* result. An error outside any test is read from the `stack` of\n* `testExecError`, since its `message` is empty on Jest 29 and 30.\n*\n* @param result - What Jest gave for the test file.\n* @returns The facts of the file, with `empty` for a file without tests.\n*/\nfunction readJestResult(result) {\n let { failureMessage = null, testExecError, testResults, snapshot } = result;\n let empty = testResults.length === 0 && !testExecError;\n return {\n lines: Object.fromEntries(testResults.flatMap(({ ancestorTitles, location, title }) => location ? [[[...ancestorTitles, title].join(\" > \"), location.line]] : [])),\n snapshots: snapshot.unchecked + snapshot.unmatched + (snapshot.fileDeleted ? 1 : 0),\n execError: testExecError ? testExecError.stack.split(\"\\n\", 1)[0] : null,\n outcome: empty ? \"empty\" : \"result\",\n message: empty ? NO_TESTS : null,\n failureMessage,\n realm: null\n };\n}\n// adapters/jest/worker/run-unit.ts\n/**\n* `path.extname` as this module loads, since test code the filter of reads runs\n* beside may replace it.\n*/\nvar getExtension = node_path.default.extname;\n/**\n* Runs one test file through Jest's own `TestRunner` in serial mode: a fresh vm\n* and module registry in this process. Jest picks the console of the tests from\n* the global copy, which the unit's console decides, as the project copy says\n* nothing of it. What the vm left is stopped through what its setup registered,\n* since the wrapper of the test framework never runs when a setup file throws.\n* The file cache of `jest-resolve` goes only after a failure, as a plain run\n* clears it at its end and a file a failing test left missing would stay\n* missing, while the speed of a warm worker rests on it. The exit guards come\n* back after the turns the check of shared state waits, so that a rejection\n* Jest left in the unit, as Jest 29.7 does for an ES module that fails to\n* parse, meets the listener its test framework left, as in plain Jest. The last\n* record of the unit, `finish`, holds what Jest reported, what the vm counted\n* and what the unit left in the worker, and in a dry run what a console that\n* kept it printed, as Jest's reporters show it; its variables hold `*` in a\n* worker that met a promisified `execFile` made before its wrappers\n* (`UnitWorker.early`), as a child that function starts gets them all. Nobody\n* reads what a unit with a mutant printed, so there a console that keeps what\n* tests print takes no stack for the origin of an entry, which costs about 50\n* µs a call; it still formats what it gets, and its buffer still holds the\n* messages, as tests may read them. What the console kept is emptied once\n* `finish` is written, since with `--experimental-vm-modules` the vm of every\n* unit, its console with it, stays in the worker. A read counts under the\n* directories of the session, or with one of its extensions outside the\n* temporary directory, where tests make files under new names each run, but\n* never under `node_modules`, which the lockfile stands for, in mootant's\n* files, or as a `node:` name that a stack frame gave and the tracker made a\n* path of. What Jest's resolver reads does not count, as it keeps what it found\n* across units and a real load is read anyway, but what a project's own\n* resolver reads, a file it only looks for too, decides what it gives, Jest's\n* default one aside when it hands that a request\n* (`WorkerCalls.defaultResolver`); that and what a transformer reads go apart,\n* as the session's, since a warm worker reads them only once, and stay among\n* the reads too when code outside the transformers read them, as a test file\n* loads a source the language service of ts-jest read first. The CommonJS\n* modules the own realm of the worker loaded so far count as reads do, since a\n* warm worker does not read a transformer, a test environment or a resolver\n* again, nor what they import; ES modules are not in `require.cache`, so one of\n* those counts only in the unit that loaded it. A transform still running when\n* the run ended, of an import the unit never awaited, ends the worker: what it\n* reads from then on reaches no unit, and a later unit would get the module\n* from the worker's memory.\n*\n* @param unit - Test file, project, mutant, switch plan and out file.\n* @param worker - What the boot of the worker made.\n* @returns Whether the worker must not run another unit, since an error of an\n* earlier unit showed up, the unit left shared state changed or a transform\n* unsettled.\n*/\nasync function runUnit(unit, worker) {\n let { BufferedConsole, process: target, directory, channel, flags } = worker;\n let { directories, extensions, temporary } = worker.reads;\n let { calls } = worker;\n let token = channel.begin(unit);\n /**\n * Tells whether a path lies under one of some directories.\n *\n * @param parents - Absolute directories.\n * @param file - Absolute path.\n * @returns Whether it does.\n */\n function isUnder(parents, file) {\n return parents.some((parent) => file.startsWith(`${parent}/`));\n }\n /**\n * Tells whether a file the unit read or the worker loaded counts.\n *\n * @param file - Absolute path.\n * @returns Whether it does.\n */\n function counts(file) {\n return !file.includes(\"/node_modules/\") && !file.endsWith(\"/node_modules\") && !file.startsWith(`${directory}/`) && !file.includes(\"/node:\") && (isUnder(directories, file) || !isUnder(temporary, file) && extensions.has(getExtension(file).slice(1)));\n }\n let project = worker.projects.get(unit.project);\n let ownResolver = typeof project.config.resolver === \"string\";\n let transformed = /* @__PURE__ */ new Set();\n let direct = /* @__PURE__ */ new Set();\n /**\n * Tells whether a read counts, and remembers whether a warm worker may not\n * make it again, which sorts it once the unit ended: what a transformer\n * reads, what is read before the vm is set up but the test file, as the test\n * environment and the test runner load then, once in a worker, what the\n * environment reads in its own calls and the real test runner as it loads,\n * which may keep it across units (`WorkerCalls.environment`), and what the\n * project's own resolver reads, a file it looks for too, such as a map of the\n * paths it gives or a flag it chooses by, as Jest keeps what it resolved\n * across units. Such a file goes apart unless code in the vm read it too.\n *\n * @param file - Absolute path.\n * @returns Whether it counts, which no read of Jest's own resolver does: its\n * probes are kept across units, and a real load is read anyway.\n */\n function accept(file) {\n let resolving = calls.resolver > 0 || calls.asyncResolver.getStore() === true;\n if (!counts(file) || resolving && (!ownResolver || calls.defaultResolver > 0)) return false;\n if (resolving || calls.transformer > 0 || calls.asyncTransformer.getStore() === true || calls.environment.getStore() === true || channel.vm === null && file !== unit.file) transformed.add(file);\n else direct.add(file);\n return true;\n }\n let tracking = trackFileInputs(accept);\n flags.stale = false;\n let globalConfig = {\n ...worker.globalConfig,\n verbose: unit.console === \"stream\",\n silent: unit.console === \"none\",\n updateSnapshot: \"none\",\n collectCoverage: false\n };\n let runner = new worker.TestRunner(globalConfig, {});\n let { write } = BufferedConsole;\n if (unit.mutant !== null && unit.console === \"buffer\") BufferedConsole.write = keepWithoutOrigin;\n let printed;\n let facts = new Promise((resolve) => {\n runner.on(\"test-file-success\", ([, result]) => {\n printed = result.console;\n resolve(readJestResult(result));\n });\n runner.on(\"test-file-failure\", ([, error]) => {\n resolve(readFailure(error, worker));\n });\n });\n let running = runner.runTests([{\n context: {\n config: readWrappedConfig(project, unit.plan, directory),\n moduleMap: project.moduleMap,\n resolver: project.resolver\n },\n duration: void 0,\n path: unit.file\n }], { isInterrupted: () => false }, { serial: true });\n target.env[\"JEST_WORKER_ID\"] = worker.slot;\n await running;\n BufferedConsole.write = write;\n if (worker.early) channel.vm?.addVariable(\"*\");\n let side = closeVmSide(channel.vm, worker.dead);\n worker.clearPerformance();\n let { modified, files } = tracking.stop();\n let unsettled = calls.unsettled > 0;\n worker.disableStores();\n let dirty = await readDirtyState(worker);\n installExitGuards(target);\n let file = await facts;\n if (file.outcome !== \"result\" || file.failureMessage !== null) worker.Resolver.clearDefaultResolverCache();\n channel.write(token, {\n ...file,\n consoleOutput: printed === void 0 || unit.mutant !== null ? null : ` ● Console\\n\\n${worker.getConsoleOutput(printed, project.config, globalConfig)}\\n`,\n loaded: Object.keys(worker.requireCache).filter(counts).toSorted(compareCodeUnits),\n transforms: files.filter((read) => transformed.has(read)),\n reads: files.filter((read) => direct.has(read)),\n outside: [...worker.outside],\n tracked: worker.tracked,\n writes: modified,\n kind: \"finish\",\n dirty,\n ...side\n });\n channel.end();\n if (printed !== void 0) printed.length = 0;\n return dirty.length > 0 || flags.stale || unsettled;\n}\n/**\n* Stops what the vm of a unit left and reads what it counted.\n*\n* @param side - What the vm's setup registered, or null when it never ran.\n* @param dead - Receives the `Error` of the vm, so an error of this unit reads\n* as stale in a later one.\n* @returns What the `finish` record takes from the vm.\n*/\nfunction closeVmSide(side, dead) {\n if (side === null) return {\n variables: [],\n covers: [],\n hits: 0\n };\n side.stopTimers();\n dead.add(side.realmError);\n side.close();\n return {\n covers: [...side.runtime.coverage ?? []].toSorted(compareCodeUnits),\n variables: side.listVariables(),\n hits: side.runtime.hits\n };\n}\n/**\n* Reads what the `finish` record of a unit takes from a test file that could\n* not run. Nothing here throws, since a project can throw anything.\n*\n* @param error - What Jest got.\n* @param worker - What the boot of the worker made.\n* @returns The facts of the file, whose failure message is the stack when there\n* is one.\n*/\nfunction readFailure(error, worker) {\n let { message, realm } = readErrorFacts(error, {\n current: worker.channel.vm?.realmError ?? null,\n dead: worker.dead\n });\n let failureMessage = message;\n try {\n let stack = Reflect.get(error, \"stack\");\n if (typeof stack === \"string\") failureMessage = stack;\n } catch {}\n return {\n outcome: \"failure\",\n execError: null,\n failureMessage,\n snapshots: 0,\n lines: {},\n message,\n realm\n };\n}\n/**\n* Gives the copy of a project's configuration for a switch plan, made once: a\n* stringify of a big configuration costs, and the plan path decides identity,\n* since Jest keeps its in-memory transforms by the copy.\n*\n* @param project - Project of the unit.\n* @param plan - Absolute path of the switch plan, or null.\n* @param directory - Real path of the directory of mootant's Jest files.\n* @returns The copy.\n*/\nfunction readWrappedConfig(project, plan, directory) {\n let wrapped = project.wrapped.get(plan);\n if (wrapped === void 0) {\n wrapped = wrapProjectConfig(project.config, plan, directory);\n project.wrapped.set(plan, wrapped);\n }\n return wrapped;\n}\n/**\n* Compares what units share with the baseline. The comparison rejects when a\n* test removed its working directory, which leaves the worker dirty and not\n* dead.\n*\n* @param worker - What the boot of the worker made.\n* @returns The reasons the worker is no longer clean.\n*/\nasync function readDirtyState(worker) {\n try {\n return await worker.checkState();\n } catch (error) {\n return [`guard: ${getErrorMessage(error)}`];\n }\n}\n/**\n* Keeps an entry of what a test printed, as `BufferedConsole.write` does, but\n* with an empty origin, which spares the stack it would take.\n*\n* @param buffer - Entries the console kept.\n* @param type - Method of the console, such as `log`.\n* @param message - What it printed, formatted.\n* @returns The buffer.\n*/\nfunction keepWithoutOrigin(buffer, type, message) {\n buffer.push({\n origin: \"\",\n message,\n type\n });\n return buffer;\n}\n// adapters/jest/worker/boot-worker.ts\n/**\n* Key of what `test-runner.cjs` and `transformer.cjs` export on the worker's\n* global, so they share one module instance with the worker: a second copy\n* would silently break what is kept in closures, such as stale detection.\n*/\nvar WORKER_SLOT = Symbol.for(\"mootant.worker\");\n/**\n* Units a worker runs with `--experimental-vm-modules` before it ends. In that\n* mode the vm context of every unit stays in the worker, about 10 MB a unit on\n* a graph of 400 modules, so a worker that runs on dies at its heap limit and\n* the limit climbs; after 20 such units it holds about 350 MB, well under the\n* first limit of 512 MB.\n*/\nvar VM_MODULE_UNITS = 20;\n/**\n* `setImmediate` as this module loads, for what waits after test code ran.\n*/\nvar runNextTurn = setImmediate;\n/**\n* `v8.setFlagsFromString` as this module loads.\n*/\nvar setV8Flags = node_v8.setFlagsFromString;\n/**\n* Boots a worker and starts its message loop. The read tracker comes first,\n* because `graceful-fs` clones `fs` once: one that is in `require.cache` before\n* any Jest package loads came with a `--require` and reads past the tracker,\n* which the units then say. Resolvers are made here and never lazily: on Jest\n* 29.7 making one loads `graceful-fs`, which patches `fs.close`, and a lazy one\n* would dirty the first unit. The guard comes last, as its baseline must hold\n* the IPC pipe the `message` listener refs, and the mask global setup left,\n* which a fork from main does not inherit. A unit that throws leaves the exit\n* without `done` for main to read. The heap flag leaves `execArgv` and V8's\n* flags right after the tracker: a limit is read when an isolate is made, so\n* this worker keeps its cap, while what a test forks or starts as a thread gets\n* what it gets in plain Jest. Types are stripped only where the project's Jest\n* strips them, which needs Node's function. One count of the calls into the\n* resolvers and transformers of the projects serves every unit, which tells\n* what they read apart from what tests read. The temporary directory, as Node\n* gives it and as its real path, is where tests put what they make, under a new\n* name each run.\n*\n* @param input - What the worker runs with.\n* @param input.process - The worker's process, with `MOOTANT_SESSION`, the\n* absolute path of `session.json`, `MOOTANT_SLOT` and, when it has a heap\n* limit from mootant, `MOOTANT_HEAP_FLAG` in its environment.\n* @param input.global - The worker's global object, with its `performance`.\n* @param input.stores - `AsyncLocalStorage.prototype`.\n* @param input.stripTypes - `module.stripTypeScriptTypes`, which Node before\n* 22.13 lacks.\n*/\nfunction bootWorker(input) {\n trackFileReads(null);\n let { process: target, global, stores } = input;\n let heapFlag = target.env[\"MOOTANT_HEAP_FLAG\"];\n if (heapFlag !== void 0) {\n target.execArgv = target.execArgv.filter((flag) => flag !== heapFlag);\n setV8Flags(\"--max-old-space-size=0\");\n }\n let sessionFile = target.env[\"MOOTANT_SESSION\"];\n let slot = target.env[\"MOOTANT_SLOT\"];\n delete target.env[\"MOOTANT_HEAP_FLAG\"];\n delete target.env[\"MOOTANT_SESSION\"];\n delete target.env[\"MOOTANT_SLOT\"];\n let channel = createWorkerChannel();\n Reflect.set(target, CHANNEL_SLOT, channel);\n let session = JSON.parse((0, node_fs.readFileSync)(sessionFile, \"utf8\"));\n target.umask(session.umask);\n let load = (0, node_module.createRequire)(sessionFile);\n let tracked = Object.keys(load.cache).every((file) => !file.includes(\"/graceful-fs/\"));\n let { default: TestRunner } = load(session.packages.runner);\n let { default: Runtime } = load(session.packages.runtime);\n let { default: HasteMap } = load(session.packages.hasteMap);\n let { requireOrImportModule } = load(session.packages.util);\n let { default: Resolver } = load(session.packages.resolve);\n let { getConsoleOutput, BufferedConsole } = load(session.packages.console);\n let calls = {\n asyncTransformer: new node_async_hooks.AsyncLocalStorage(),\n asyncResolver: new node_async_hooks.AsyncLocalStorage(),\n environment: new node_async_hooks.AsyncLocalStorage(),\n defaultResolver: 0,\n transformer: 0,\n unsettled: 0,\n resolver: 0\n };\n let defaultResolver = node_path.default.join(session.packages.resolve, \"build/defaultResolver.js\");\n if ((0, node_fs.existsSync)(defaultResolver)) countDefaultResolverCalls(load(defaultResolver), calls);\n channel.enterEnvironment = () => {\n calls.environment.enterWith(true);\n };\n let early = trackSpawners(target.env, (name) => {\n if (calls.transformer === 0 && calls.asyncTransformer.getStore() !== true && calls.environment.getStore() !== true) channel.vm?.addVariable(name);\n });\n let projects = new Map(session.projects.map(({ moduleMap: json, config, id }) => {\n let moduleMap = HasteMap.getStatic(config).getModuleMapFromJSON(json);\n return [id, {\n resolver: countResolverCalls(Runtime.createResolver(config, moduleMap), calls),\n configString: JSON.stringify(config),\n wrapped: /* @__PURE__ */ new Map(),\n moduleMap,\n config\n }];\n }));\n let flags = { stale: false };\n let dead = /* @__PURE__ */ new WeakSet();\n Reflect.set(global, WORKER_SLOT, {\n transformer: createTransformerFactory({\n stripTypes: session.packages.stripsTypes ? input.stripTypes ?? null : null,\n requireOrImportModule,\n projects,\n channel,\n calls\n }),\n testRunner: createTestRunner({\n onStale() {\n flags.stale = true;\n },\n requireOrImportModule,\n projects,\n channel,\n calls,\n dead\n })\n });\n let outside = /* @__PURE__ */ new Set();\n Reflect.set(global, RUNTIME_GLOBAL, { hit(id) {\n outside.add(id);\n return false;\n } });\n let disableStores = trackStores(stores);\n let clearMarks = global.performance.clearMarks.bind(global.performance);\n let clearMeasures = global.performance.clearMeasures.bind(global.performance);\n let checkState;\n let temporary = (0, node_os.tmpdir)();\n let worker = {\n reads: {\n temporary: (0, node_fs.existsSync)(temporary) ? [temporary, (0, node_fs.realpathSync)(temporary)] : [temporary],\n extensions: new Set(session.reads.extensions),\n directories: session.reads.directories\n },\n clearPerformance() {\n clearMarks();\n clearMeasures();\n },\n directory: node_path.default.dirname(sessionFile),\n globalConfig: session.globalConfig,\n checkState: () => checkState(),\n requireCache: load.cache,\n getConsoleOutput,\n BufferedConsole,\n process: target,\n disableStores,\n TestRunner,\n Resolver,\n projects,\n outside,\n tracked,\n channel,\n early,\n calls,\n flags,\n dead,\n slot\n };\n let modules = [...target.execArgv, ...(target.env[\"NODE_OPTIONS\"] ?? \"\").split(/\\s+/u)].includes(\"--experimental-vm-modules\");\n let units = 0;\n /**\n * Runs a unit, says when it ended, and ends the worker when it must not run\n * another one, only after the message is out: a message followed by an exit\n * can be lost. With `--experimental-vm-modules` a worker ends after a number\n * of units, as it keeps the vm context of every unit.\n *\n * @param unit - Unit main sent.\n */\n async function run(unit) {\n let last;\n try {\n last = await runUnit(unit, worker);\n } catch (error) {\n let text = error?.stack ?? getErrorMessage(error);\n target.stderr.write(`mootant: ${text}\\n`);\n target.exit(1);\n return;\n }\n units += 1;\n last ||= modules && units >= VM_MODULE_UNITS;\n target.send({\n type: \"done\",\n last\n }, () => {\n if (last) target.exit(0);\n });\n }\n installExitGuards(target);\n target.on(\"message\", (message) => {\n run(message.unit);\n });\n target.on(\"disconnect\", () => {\n target.exit(0);\n });\n checkState = createStateGuard({\n setImmediate: runNextTurn,\n process: target\n });\n target.send({ type: \"ready\" });\n}\n// adapters/jest/worker/worker.ts\n/**\n* Entry of a worker process. It stays this small because a file imported only\n* through `?inline-cjs` reads as covered without ever running.\n*/\nbootWorker({\n stores: node_async_hooks.AsyncLocalStorage.prototype,\n stripTypes: node_module.stripTypeScriptTypes,\n global: globalThis,\n process\n});\n";
|
|
2
|
+
export { e as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { WorkerProject } from '../types/worker-project.js';
|
|
2
|
+
/**
|
|
3
|
+
* Makes the copy of a project's configuration that a unit runs: mootant's test
|
|
4
|
+
* framework, first setup file and transformer wrap the project's, and so does a
|
|
5
|
+
* last setup file when the test environment or the test runner is the project's
|
|
6
|
+
* own, not a package, as its calls may read a file once in a worker. A file no
|
|
7
|
+
* pattern matches would have no transformer, and Jest's fallback key hashes the
|
|
8
|
+
* copy's `configString`, which holds per-run paths; the catch-all gives it the
|
|
9
|
+
* wrapper's key. `silent` and `verbose` are cleared because Jest 30.4 reads the
|
|
10
|
+
* project's first, and one copy serves dry runs and units.
|
|
11
|
+
*
|
|
12
|
+
* @param config - Configuration as `--showConfig` printed it.
|
|
13
|
+
* @param plan - Absolute path of the switch plan, or null; a new path per plan,
|
|
14
|
+
* so each plan gets its own entry in Jest's in-memory transforms.
|
|
15
|
+
* @param directory - Real path of the directory of mootant's Jest files.
|
|
16
|
+
* @returns The copy.
|
|
17
|
+
*/
|
|
18
|
+
export declare function wrapProjectConfig(config: WorkerProject['config'], plan: string | null, directory: string): {
|
|
19
|
+
testLocationInResults: boolean;
|
|
20
|
+
detectLeaks: boolean;
|
|
21
|
+
verbose: undefined;
|
|
22
|
+
silent: undefined;
|
|
23
|
+
cache: boolean;
|
|
24
|
+
} & WorkerProject['config'];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WorkerFiles } from './types/worker-files.js';
|
|
2
|
+
/**
|
|
3
|
+
* Writes the files of the Jest processes to the `jest` directory of the work
|
|
4
|
+
* directory, by its real path, so that Jest and mootant read the same paths.
|
|
5
|
+
* The runner gets an extension no project lists in `moduleFileExtensions`: Jest
|
|
6
|
+
* hands the project's transformer only the files with those, and one that adds
|
|
7
|
+
* an import or refuses a file outside the project would fail on it. Node loads
|
|
8
|
+
* an unknown extension as CommonJS.
|
|
9
|
+
*
|
|
10
|
+
* @param workDirectory - Work directory of the run.
|
|
11
|
+
* @returns Paths of the files main uses and their directory.
|
|
12
|
+
*/
|
|
13
|
+
export declare function writeWorkerFiles(workDirectory: string): Promise<WorkerFiles>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import e from "./worker/vm-setup.js";
|
|
2
|
+
import t from "./worker/worker.js";
|
|
3
|
+
import { RESULTS_MARK as n } from "./results-mark.js";
|
|
4
|
+
import r from "./runner.js";
|
|
5
|
+
import i from "node:path";
|
|
6
|
+
import { mkdir as a, realpath as o, writeFile as s } from "node:fs/promises";
|
|
7
|
+
const c = `let { writeFileSync, renameSync } = require('node:fs')
|
|
8
|
+
let path = require('node:path')
|
|
9
|
+
|
|
10
|
+
module.exports = function results(results) {
|
|
11
|
+
let mark = path.join(__dirname, ${JSON.stringify(n)})
|
|
12
|
+
writeFileSync(mark + '.part', JSON.stringify(results.snapshot.filesRemovedList))
|
|
13
|
+
renameSync(mark + '.part', mark)
|
|
14
|
+
return results
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
async function l(n) {
|
|
18
|
+
let l = i.join(await o(n), "jest");
|
|
19
|
+
await a(l, { recursive: !0 });
|
|
20
|
+
let u = {
|
|
21
|
+
results: i.join(l, "results.cjs"),
|
|
22
|
+
runner: i.join(l, "runner.host"),
|
|
23
|
+
worker: i.join(l, "worker.cjs"),
|
|
24
|
+
noop: i.join(l, "noop.cjs")
|
|
25
|
+
};
|
|
26
|
+
return await s(u.runner, r), await s(u.worker, t), await s(u.noop, "module.exports = function noop(results) { return results }\n"), await s(u.results, c), await s(i.join(l, "vm-setup.cjs"), e), await s(i.join(l, "vm-setup-end.cjs"), "Reflect.get(process, Symbol.for('mootant.channel')).enterEnvironment()\n"), await s(i.join(l, "test-runner.cjs"), "module.exports = globalThis[Symbol.for('mootant.worker')].testRunner\n"), await s(i.join(l, "transformer.cjs"), "module.exports = globalThis[Symbol.for('mootant.worker')].transformer\n"), {
|
|
27
|
+
...u,
|
|
28
|
+
directory: l
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export { l as writeWorkerFiles };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { JestGlobalConfig } from './types/jest-global-config.js';
|
|
2
|
+
import { JestPackages } from './types/jest-packages.js';
|
|
3
|
+
import { JestProject } from './types/jest-project.js';
|
|
4
|
+
import { JestReady } from './types/jest-ready.js';
|
|
5
|
+
/**
|
|
6
|
+
* Writes `session.json`, which workers read at boot: the packages, the global
|
|
7
|
+
* configuration, the mask of new files global setup left, what the reads of a
|
|
8
|
+
* unit count, and, for each kept project that has test files, its haste map and
|
|
9
|
+
* its configuration as the session gives it (`readHostConfig`). Reads count
|
|
10
|
+
* under the project root and the `rootDir` and `roots` of every kept project,
|
|
11
|
+
* or with an extension of their modules or of a snapshot. Main is its only
|
|
12
|
+
* writer.
|
|
13
|
+
*
|
|
14
|
+
* @param input - What to write.
|
|
15
|
+
* @param input.globalConfig - Global configuration.
|
|
16
|
+
* @param input.directory - Directory of the file.
|
|
17
|
+
* @param input.packages - Jest packages of the project.
|
|
18
|
+
* @param input.projects - Kept projects.
|
|
19
|
+
* @param input.ready - The host's `ready` message.
|
|
20
|
+
* @param input.root - Real path of the project root.
|
|
21
|
+
* @returns Absolute path of the file, once it is written.
|
|
22
|
+
*/
|
|
23
|
+
export declare function writeWorkerSession(input: {
|
|
24
|
+
projects: readonly JestProject[];
|
|
25
|
+
globalConfig: JestGlobalConfig;
|
|
26
|
+
packages: JestPackages;
|
|
27
|
+
directory: string;
|
|
28
|
+
ready: JestReady;
|
|
29
|
+
root: string;
|
|
30
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import e from "node:path";
|
|
2
|
+
import { writeFile as t } from "node:fs/promises";
|
|
3
|
+
async function n(n) {
|
|
4
|
+
let r = n.projects.flatMap(({ config: e }) => {
|
|
5
|
+
let t = n.ready.moduleMaps[e.id];
|
|
6
|
+
return t === void 0 ? [] : {
|
|
7
|
+
id: e.id,
|
|
8
|
+
moduleMap: t,
|
|
9
|
+
config: e
|
|
10
|
+
};
|
|
11
|
+
}), i = n.projects.map(({ config: e }) => e), a = {
|
|
12
|
+
extensions: [.../* @__PURE__ */ new Set([...i.flatMap((e) => e.moduleFileExtensions), "snap"])],
|
|
13
|
+
directories: [.../* @__PURE__ */ new Set([n.root, ...i.flatMap((e) => [e.rootDir, ...e.roots])])]
|
|
14
|
+
}, o = e.join(n.directory, "session.json");
|
|
15
|
+
return await t(o, JSON.stringify({
|
|
16
|
+
globalConfig: n.globalConfig,
|
|
17
|
+
packages: n.packages,
|
|
18
|
+
umask: n.ready.umask,
|
|
19
|
+
projects: r,
|
|
20
|
+
reads: a
|
|
21
|
+
})), o;
|
|
22
|
+
}
|
|
23
|
+
export { n as writeWorkerSession };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TestProcessOutcome } from './types/test-process-outcome.js';
|
|
2
|
+
import { DryFile } from '../../types/adapter/dry-file.js';
|
|
3
|
+
import { DryTest } from '../../types/adapter/dry-test.js';
|
|
4
|
+
import { NodeTestUnit } from './types/node-test-unit.js';
|
|
5
|
+
/**
|
|
6
|
+
* What the dry run of one test file reported.
|
|
7
|
+
*/
|
|
8
|
+
interface DryFileReport {
|
|
9
|
+
/**
|
|
10
|
+
* Test that ran when the watchdog stopped the process, or null.
|
|
11
|
+
*/
|
|
12
|
+
hung: {
|
|
13
|
+
name: string | null;
|
|
14
|
+
test: string | null;
|
|
15
|
+
} | null;
|
|
16
|
+
/**
|
|
17
|
+
* Tests that failed in a process that still exited with 0, for isolated units
|
|
18
|
+
* of the file.
|
|
19
|
+
*/
|
|
20
|
+
expected: NodeTestUnit['expected'];
|
|
21
|
+
/**
|
|
22
|
+
* Tests of the file with their one try each, in the order they started.
|
|
23
|
+
*/
|
|
24
|
+
tests: DryTest[];
|
|
25
|
+
/**
|
|
26
|
+
* The test file.
|
|
27
|
+
*/
|
|
28
|
+
entry: DryFile;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Builds the dry-run report of a test file from what its process left behind.
|
|
32
|
+
* The file failed to load when an error stopped its loading, when the process
|
|
33
|
+
* did not reach its end (stopped by the watchdog or a signal, or exiting
|
|
34
|
+
* early), or when the process failed with no failed test: an unhandled error
|
|
35
|
+
* outside tests, a failed suite hook or teardown, or a failed root hook, which
|
|
36
|
+
* mootant's reporter records since plain `node` exits with 0 after it from Node
|
|
37
|
+
* 22 on (`describeHookFailure`). The uncaught errors that count against the
|
|
38
|
+
* file are its errors (`listFileErrors`). Uncaught errors that node:test gave
|
|
39
|
+
* to a todo test count nowhere (`dropTodoErrors`). Dependencies are left for
|
|
40
|
+
* the caller.
|
|
41
|
+
*
|
|
42
|
+
* @param outcome - What the process left behind.
|
|
43
|
+
* @param input - Test file and project root.
|
|
44
|
+
* @param input.root - Project root.
|
|
45
|
+
* @param input.file - Absolute path of the test file.
|
|
46
|
+
* @returns The test file, its tests, its expected failures and its hang.
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildDryFile(outcome: TestProcessOutcome, input: {
|
|
49
|
+
root: string;
|
|
50
|
+
file: string;
|
|
51
|
+
}): DryFileReport;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { describeHookFailure as e } from "./describe-hook-failure.js";
|
|
2
|
+
import { listRunningTries as t } from "./list-running-tries.js";
|
|
3
|
+
import { describeExit as n } from "../shared/describe-exit.js";
|
|
4
|
+
import { dropTodoErrors as r } from "./drop-todo-errors.js";
|
|
5
|
+
import { listFileErrors as i } from "./list-file-errors.js";
|
|
6
|
+
import { getTestId as a } from "../shared/get-test-id.js";
|
|
7
|
+
import { readTries as o } from "./read-tries.js";
|
|
8
|
+
function s(t, a) {
|
|
9
|
+
let s = r(t.records), { root: l, file: u } = a, d = o(s, {
|
|
10
|
+
passed: t.code === 0,
|
|
11
|
+
mutant: null,
|
|
12
|
+
root: l,
|
|
13
|
+
file: u
|
|
14
|
+
}), f = s.find((e) => e.kind === "end"), p = s.find((e) => e.kind === "root-hook"), m = i(s), h = m.map((e) => e.message), g = m.filter((e) => e.load).length, _ = d.some((e) => e.facts.failed), v = t.hung || f === void 0 || g > 0;
|
|
15
|
+
return f === void 0 || t.hung ? g === 0 && h.push(n(t)) : _ || p === void 0 && t.code === 0 || (v = !0, h.length === 0 && h.push(e(t, p))), {
|
|
16
|
+
entry: {
|
|
17
|
+
...f !== void 0 && {
|
|
18
|
+
environment: f.environment,
|
|
19
|
+
modified: f.modified
|
|
20
|
+
},
|
|
21
|
+
loadDuration: f?.loadDuration ?? 0,
|
|
22
|
+
hookDuration: f?.hookDuration ?? 0,
|
|
23
|
+
concurrent: f?.concurrent ?? !1,
|
|
24
|
+
covers: f?.covers ?? [],
|
|
25
|
+
hits: f?.hits ?? 0,
|
|
26
|
+
project: "",
|
|
27
|
+
loadFailed: v,
|
|
28
|
+
errors: h,
|
|
29
|
+
file: u
|
|
30
|
+
},
|
|
31
|
+
tests: d.map((e) => ({
|
|
32
|
+
id: e.facts.test,
|
|
33
|
+
tries: [e.facts],
|
|
34
|
+
name: e.name,
|
|
35
|
+
project: "",
|
|
36
|
+
line: null,
|
|
37
|
+
file: u
|
|
38
|
+
})),
|
|
39
|
+
expected: d.filter((e) => e.expected).map(({ occurrence: e, name: t }) => ({
|
|
40
|
+
occurrence: e,
|
|
41
|
+
name: t
|
|
42
|
+
})),
|
|
43
|
+
hung: t.hung ? c(t, a) : null
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function c(e, n) {
|
|
47
|
+
let r = t(e.records).at(-1);
|
|
48
|
+
return r === void 0 ? {
|
|
49
|
+
name: null,
|
|
50
|
+
test: null
|
|
51
|
+
} : {
|
|
52
|
+
test: a(n.root, n.file, r),
|
|
53
|
+
name: r.name
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export { s as buildDryFile };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IsolatedFacts } from '../../types/adapter/isolated-result.js';
|
|
2
|
+
import { TestProcessOutcome } from './types/test-process-outcome.js';
|
|
3
|
+
/**
|
|
4
|
+
* Builds the facts of an isolated unit from what its process left behind. The
|
|
5
|
+
* unit hung when the watchdog stopped it; an error that stopped the test file
|
|
6
|
+
* from loading is its load error (`listFileErrors`); without that, a process
|
|
7
|
+
* that did not reach its end crashed. A process that exited with 0 failed no
|
|
8
|
+
* test, nor did a todo test (`readTries`). Without an end record, the site
|
|
9
|
+
* evaluations are the most an error record or the tries saw, so a hit limit
|
|
10
|
+
* exceeded while the file loaded still shows. Uncaught errors that node:test
|
|
11
|
+
* gave to a todo test count nowhere (`dropTodoErrors`); other uncaught errors
|
|
12
|
+
* outside tries are strays. A process that failed with no failed test, no load
|
|
13
|
+
* error and no stray failed outside its tests, as in a suite hook or teardown,
|
|
14
|
+
* which is its hook error (`describeHookFailure`), unless a todo test failed
|
|
15
|
+
* and no test or suite that is not todo did, since `node --test` then takes the
|
|
16
|
+
* todo test as the reason; a failed root hook, which mootant's reporter
|
|
17
|
+
* records, is a hook error even in a process that exited with 0, as `node
|
|
18
|
+
* --test` fails it. Inputs are left for the caller.
|
|
19
|
+
*
|
|
20
|
+
* @param outcome - What the process left behind.
|
|
21
|
+
* @param input - Unit, its test file and the project root.
|
|
22
|
+
* @param input.unit - Index of the unit in the plan.
|
|
23
|
+
* @param input.mutant - Id of the unit's mutant.
|
|
24
|
+
* @param input.file - Absolute path of the test file.
|
|
25
|
+
* @param input.root - Project root.
|
|
26
|
+
* @returns Facts of the unit.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildIsolatedFacts(outcome: TestProcessOutcome, input: {
|
|
29
|
+
mutant: string;
|
|
30
|
+
unit: number;
|
|
31
|
+
file: string;
|
|
32
|
+
root: string;
|
|
33
|
+
}): IsolatedFacts;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { describeHookFailure as e } from "./describe-hook-failure.js";
|
|
2
|
+
import { dropTodoErrors as t } from "./drop-todo-errors.js";
|
|
3
|
+
import { listFileErrors as n } from "./list-file-errors.js";
|
|
4
|
+
import { readTries as r } from "./read-tries.js";
|
|
5
|
+
function i(i, a) {
|
|
6
|
+
let o = t(i.records), s = r(o, {
|
|
7
|
+
passed: i.code === 0 && !i.hung,
|
|
8
|
+
mutant: a.mutant,
|
|
9
|
+
root: a.root,
|
|
10
|
+
file: a.file
|
|
11
|
+
}).map((e) => e.facts), c = o.find((e) => e.kind === "end"), l = o.find((e) => e.kind === "start"), u = n(o), d = u.filter((e) => !e.load).map((e) => e.message), f = u.find((e) => e.load)?.message ?? null, p = s.reduce((e, t) => e + t.hits, 0);
|
|
12
|
+
for (let e of o) e.kind === "error" && (p = Math.max(p, e.hits));
|
|
13
|
+
let m = null;
|
|
14
|
+
i.hung ? (m = "hang", f = null) : c === void 0 && f === null && (m = "crash");
|
|
15
|
+
let h = null;
|
|
16
|
+
if (m === null && f === null && c !== void 0 && d.length === 0 && s.every((e) => !e.failed)) {
|
|
17
|
+
let t = o.find((e) => e.kind === "root-hook");
|
|
18
|
+
(t !== void 0 || i.code !== 0 && (o.every((e) => e.kind !== "todo" || !e.failed) || o.some((e) => e.kind === "failure"))) && (h = e(i, t));
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
duration: c?.duration ?? s.reduce((e, t) => e + t.duration, 0),
|
|
22
|
+
startup: l === void 0 ? 0 : Math.max(0, l.time - i.spawned),
|
|
23
|
+
reached: c?.reached ?? s.some((e) => e.reached),
|
|
24
|
+
hits: c?.total ?? p,
|
|
25
|
+
unit: a.unit,
|
|
26
|
+
timedOut: !1,
|
|
27
|
+
incomplete: m,
|
|
28
|
+
loadError: f,
|
|
29
|
+
hookError: h,
|
|
30
|
+
strays: d,
|
|
31
|
+
tests: s
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export { i as buildIsolatedFacts };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tells whether mootant runs node:test on a Node version: 20.19 and later 20.x,
|
|
3
|
+
* and 22.12 and later, as `^20.19.0 || >=22.12.0`.
|
|
4
|
+
*
|
|
5
|
+
* @param version - Version of Node, such as `v22.12.0`.
|
|
6
|
+
* @returns Whether the version is supported.
|
|
7
|
+
*/
|
|
8
|
+
export declare function checkNodeSupport(version: string): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NodeTestRecord } from './types/node-test-record.js';
|
|
2
|
+
/**
|
|
3
|
+
* Tells whether a unit stopped starting tests for a failed try that turned out
|
|
4
|
+
* a todo test only after the preload recorded it, so the tests it skipped may
|
|
5
|
+
* have passed or failed: a bail record of a try with a `todo-try` record.
|
|
6
|
+
*
|
|
7
|
+
* @param records - Records of the process.
|
|
8
|
+
* @returns Whether it did.
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkTodoBail(records: readonly NodeTestRecord[]): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks that the test processes can load the TypeScript files of a run and
|
|
3
|
+
* that mootant can switch them: they must load through Node's type stripping or
|
|
4
|
+
* tsx, not through another loader such as ts-node; without type stripping tsx
|
|
5
|
+
* must compile them; and tsx must not compile them as CommonJS, since it then
|
|
6
|
+
* reads them again past mootant's module hooks (`.cts` files, or `.ts` files
|
|
7
|
+
* whose nearest `package.json` lacks `"type": "module"`).
|
|
8
|
+
*
|
|
9
|
+
* @param input - What the test processes load.
|
|
10
|
+
* @param input.root - Project root, which the messages name.
|
|
11
|
+
* @param input.version - Version of Node, such as `v20.19.0`.
|
|
12
|
+
* @param input.strips - Whether Node strips TypeScript types itself.
|
|
13
|
+
* @param input.loaders - Modules Node flags load before the test file.
|
|
14
|
+
* @param input.files - Absolute paths of the test files and switched files of
|
|
15
|
+
* the run.
|
|
16
|
+
* @returns A sentence naming the problem, or null.
|
|
17
|
+
*/
|
|
18
|
+
export declare function checkTypeScript(input: {
|
|
19
|
+
loaders: readonly string[];
|
|
20
|
+
files: readonly string[];
|
|
21
|
+
version: string;
|
|
22
|
+
strips: boolean;
|
|
23
|
+
root: string;
|
|
24
|
+
}): string | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { listPackageFiles as e } from "../shared/list-package-files.js";
|
|
2
|
+
import { readPackageType as t } from "../shared/read-package-type.js";
|
|
3
|
+
import { includesTsx as n } from "./includes-tsx.js";
|
|
4
|
+
import r from "node:path";
|
|
5
|
+
const i = /(?:^|[/\\])(?:esbuild-register|ts-node|tsm|@swc-node|@esbuild-kit)(?:$|[/@\\])/u, a = /\.[cm]?ts$/u;
|
|
6
|
+
function o(o) {
|
|
7
|
+
let s = o.files.filter((e) => a.test(e));
|
|
8
|
+
if (s.length === 0) return null;
|
|
9
|
+
let c = o.loaders.find((e) => i.test(e));
|
|
10
|
+
if (c !== void 0) return `mootant switches TypeScript files only through Node's type stripping or tsx (--import tsx), so it cannot run the tests of ${o.root} with ${c}.`;
|
|
11
|
+
let l = n(o.loaders);
|
|
12
|
+
if (!l && !o.strips) return `Node ${o.version} cannot run the TypeScript files of ${o.root} without a loader; add tsx (--import tsx) to the test command or use Node 22.18 or later.`;
|
|
13
|
+
if (!l) return null;
|
|
14
|
+
let u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = s.find((n) => n.endsWith(".cts") || n.endsWith(".ts") && t(e(r.dirname(n), u).at(-1), d) !== "module");
|
|
15
|
+
return f === void 0 ? null : `mootant cannot switch TypeScript files that tsx loads as CommonJS, such as ${r.relative(o.root, f)}; add "type": "module" to its package.json or run the tests with Node's type stripping instead of tsx.`;
|
|
16
|
+
}
|
|
17
|
+
export { o as checkTypeScript };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { NodeTestRecord } from './types/node-test-record.js';
|
|
2
|
+
/**
|
|
3
|
+
* Lists what a test file depended on in a test process that reached its end:
|
|
4
|
+
* the test file, its default snapshot file (`<file>.snapshot`), whether it
|
|
5
|
+
* exists or not, the modules the process loaded (`listLoadedFiles`) and the
|
|
6
|
+
* project files the test code read, without files under `node_modules`, which
|
|
7
|
+
* the lockfile stands for, and without mootant's preload; for the directory of
|
|
8
|
+
* each module, the `package.json` files that decide its format
|
|
9
|
+
* (`listPackageFiles`) and, when tsx compiles modules, the `tsconfig.json`
|
|
10
|
+
* files that decide how (`listTsconfigFiles`).
|
|
11
|
+
*
|
|
12
|
+
* @param input - Records of the process and what to look up.
|
|
13
|
+
* @param input.records - Records of the process.
|
|
14
|
+
* @param input.file - Absolute path of the test file.
|
|
15
|
+
* @param input.preload - Absolute path of mootant's preload.
|
|
16
|
+
* @param input.tsx - Whether the test processes load tsx.
|
|
17
|
+
* @param input.cache - Lists found before by directory, shared by the test
|
|
18
|
+
* files of a run.
|
|
19
|
+
* @returns Absolute paths, sorted, or null when the process did not reach its
|
|
20
|
+
* end.
|
|
21
|
+
*/
|
|
22
|
+
export declare function collectNodeDependencies(input: {
|
|
23
|
+
cache: {
|
|
24
|
+
tsconfigs: Map<string, string[]>;
|
|
25
|
+
packages: Map<string, string[]>;
|
|
26
|
+
};
|
|
27
|
+
records: readonly NodeTestRecord[];
|
|
28
|
+
preload: string;
|
|
29
|
+
file: string;
|
|
30
|
+
tsx: boolean;
|
|
31
|
+
}): string[] | null;
|