mootant 0.0.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +26 -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 +174 -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 +62 -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 +40 -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 +54 -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 +29 -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 +74 -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 +36 -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 +62 -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/create-input-filter.d.ts +26 -0
- package/dist/adapters/shared/create-input-filter.js +32 -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 +16 -0
- package/dist/adapters/shared/track-file-inputs.js +30 -0
- package/dist/adapters/shared/track-file-reads.d.ts +42 -0
- package/dist/adapters/shared/track-file-reads.js +243 -0
- package/dist/adapters/shared/track-inputs.d.ts +23 -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 +26 -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 +30 -0
- package/dist/adapters/vitest/collect-dependencies.js +39 -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 +77 -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/is-virtual-module.d.ts +11 -0
- package/dist/adapters/vitest/is-virtual-module.js +8 -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 +14 -0
- package/dist/adapters/vitest/read-out-files.js +9 -0
- package/dist/adapters/vitest/read-out-records.d.ts +17 -0
- package/dist/adapters/vitest/read-out-records.js +27 -0
- package/dist/adapters/vitest/read-strays.d.ts +20 -0
- package/dist/adapters/vitest/read-strays.js +53 -0
- package/dist/adapters/vitest/read-unit-inputs.d.ts +33 -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 +41 -0
- package/dist/adapters/vitest/run-plan.js +60 -0
- package/dist/adapters/vitest/run-specifications.d.ts +24 -0
- package/dist/adapters/vitest/run-specifications.js +19 -0
- package/dist/adapters/vitest/runner.d.ts +464 -0
- package/dist/adapters/vitest/runner.js +360 -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/stray-decisions.d.ts +8 -0
- package/dist/adapters/vitest/types/unit-outcome.d.ts +27 -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 +317 -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/encode-stray.d.ts +16 -0
- package/dist/adapters/vitest/worker/encode-stray.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/intercept-strays.d.ts +26 -0
- package/dist/adapters/vitest/worker/intercept-strays.js +13 -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 +37 -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/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/get-built-in-adapters.d.ts +15 -0
- package/dist/cli/get-built-in-adapters.js +29 -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 +12 -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/count-terminal-rows.d.ts +13 -0
- package/dist/cli/terminal/count-terminal-rows.js +7 -0
- package/dist/cli/terminal/create-colors.d.ts +59 -0
- package/dist/cli/terminal/create-colors.js +26 -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 +15 -0
- package/dist/core/cache/hash-files.js +23 -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 +114 -0
- package/dist/core/cache/prepare-run-cache.js +105 -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 +34 -0
- package/dist/core/cache/save-run-cache.js +55 -0
- package/dist/core/cache/unknown-hash.d.ts +7 -0
- package/dist/core/cache/unknown-hash.js +2 -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 +20 -0
- package/dist/core/files/select-changed-mutants.js +47 -0
- package/dist/core/generate/apply-solitary-rule.d.ts +33 -0
- package/dist/core/generate/apply-solitary-rule.js +55 -0
- package/dist/core/generate/collect-candidates.d.ts +148 -0
- package/dist/core/generate/collect-candidates.js +247 -0
- package/dist/core/generate/compare-candidates.d.ts +18 -0
- package/dist/core/generate/compare-candidates.js +4 -0
- package/dist/core/generate/compare-targets.d.ts +14 -0
- package/dist/core/generate/compare-targets.js +6 -0
- package/dist/core/generate/deduplicate-candidates.d.ts +32 -0
- package/dist/core/generate/deduplicate-candidates.js +27 -0
- package/dist/core/generate/find-list-removal.d.ts +20 -0
- package/dist/core/generate/find-list-removal.js +26 -0
- package/dist/core/generate/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 +226 -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-mutant-site.d.ts +18 -0
- package/dist/core/generate/get-mutant-site.js +4 -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/get-target.d.ts +14 -0
- package/dist/core/generate/get-target.js +4 -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/pick-host.d.ts +10 -0
- package/dist/core/generate/pick-host.js +16 -0
- package/dist/core/generate/validate-replacement.d.ts +28 -0
- package/dist/core/generate/validate-replacement.js +44 -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 +32 -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-attribute-values.d.ts +12 -0
- package/dist/core/instrument/find-attribute-values.js +13 -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-syntax.d.ts +14 -0
- package/dist/core/instrument/get-site-syntax.js +12 -0
- package/dist/core/instrument/group-mutant-ranges.d.ts +18 -0
- package/dist/core/instrument/group-mutant-ranges.js +30 -0
- package/dist/core/instrument/instrument-file.d.ts +41 -0
- package/dist/core/instrument/instrument-file.js +22 -0
- package/dist/core/instrument/instrumenter-version.d.ts +6 -0
- package/dist/core/instrument/render-branch.d.ts +17 -0
- package/dist/core/instrument/render-branch.js +81 -0
- package/dist/core/instrument/render-mutant-range.d.ts +33 -0
- package/dist/core/instrument/render-mutant-range.js +44 -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 +56 -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 +14 -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 +189 -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 +15 -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 +10 -0
- package/dist/core/mutators/object-property.js +18 -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 +248 -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 +29 -0
- package/dist/core/mutators/shared/get-branch-copy-skip.js +41 -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-default.d.ts +32 -0
- package/dist/core/mutators/shared/get-canonical-falsy-default.js +11 -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 +384 -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-endless-value.d.ts +20 -0
- package/dist/core/mutators/shared/get-endless-value.js +25 -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-forced-test-justifier.d.ts +44 -0
- package/dist/core/mutators/shared/get-forced-test-justifier.js +25 -0
- package/dist/core/mutators/shared/get-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 +121 -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 +22 -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 +32 -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 +26 -0
- package/dist/core/mutators/shared/get-toward-mutant.js +71 -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 +36 -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-loop-exit.d.ts +20 -0
- package/dist/core/mutators/shared/is-loop-exit.js +32 -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-read-only.d.ts +26 -0
- package/dist/core/mutators/shared/is-read-only.js +53 -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 +24 -0
- package/dist/core/mutators/statement-removal.js +182 -0
- package/dist/core/mutators/string-literal.d.ts +37 -0
- package/dist/core/mutators/string-literal.js +167 -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 +9 -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 +41 -0
- package/dist/core/run/apply-batch-result.js +119 -0
- package/dist/core/run/apply-isolated-result.d.ts +35 -0
- package/dist/core/run/apply-isolated-result.js +62 -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 +21 -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-test-file-limits.d.ts +13 -0
- package/dist/core/run/get-test-file-limits.js +13 -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 +17 -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 +19 -0
- package/dist/core/run/plan-batch.js +53 -0
- package/dist/core/run/plan-isolated.d.ts +15 -0
- package/dist/core/run/plan-isolated.js +16 -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 +17 -0
- package/dist/core/run/run-batch-phases.js +84 -0
- package/dist/core/run/run-dry-phase.d.ts +107 -0
- package/dist/core/run/run-dry-phase.js +254 -0
- package/dist/core/run/run-isolated-rounds.d.ts +27 -0
- package/dist/core/run/run-isolated-rounds.js +58 -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 +113 -0
- package/dist/core/run-mutants.js +334 -0
- package/dist/core/runtime/create-hit-limit-error.d.ts +11 -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 +44 -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 +392 -0
- package/dist/core/skips/skip-rules.js +387 -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-brace-sensitive-attribute.d.ts +18 -0
- package/dist/core/syntax/is-brace-sensitive-attribute.js +28 -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-spread-safe-member.d.ts +18 -0
- package/dist/core/syntax/is-spread-safe-member.js +18 -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 +20 -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-list-removal-range.d.ts +22 -0
- package/dist/core/text/get-list-removal-range.js +46 -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/is-plain-attribute-string.d.ts +10 -0
- package/dist/core/text/is-plain-attribute-string.js +5 -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 +20 -0
- package/dist/core/text/parse-expression.js +24 -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 +14 -0
- package/dist/core/text/remove-list-element.js +6 -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 +84 -0
- package/dist/types/adapter/dry-run-request.d.ts +41 -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 +69 -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 +80 -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 +32 -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 +27 -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/list-removal.d.ts +37 -0
- package/dist/types/mutant/mutant-candidate.d.ts +55 -0
- package/dist/types/mutant/mutant-host.d.ts +49 -0
- package/dist/types/mutant/mutant-kind.d.ts +18 -0
- package/dist/types/mutant/mutant-range.d.ts +38 -0
- package/dist/types/mutant/mutant-status.d.ts +5 -0
- package/dist/types/mutant/mutant.d.ts +69 -0
- package/dist/types/mutant/site-syntax.d.ts +14 -0
- package/dist/types/mutant/skip-category.d.ts +16 -0
- package/dist/types/mutant/skip-justifier.d.ts +23 -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 +68 -0
- package/dist/types/mutant/skipped-mutant.d.ts +74 -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 +53 -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 +384 -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 +37 -0
- package/dist/types/report/list-report-justifier.d.ts +28 -0
- package/dist/types/report/list-report-mutant.d.ts +103 -0
- package/dist/types/report/list-report-mutator.d.ts +19 -0
- package/dist/types/report/list-report-skipped.d.ts +82 -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 +113 -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 +26 -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 +11 -0
- package/dist/types/run/run-mode.d.ts +13 -0
- package/dist/types/run/run-result.d.ts +120 -0
- package/dist/types/run/run-score.d.ts +15 -0
- package/dist/types/run/run-state.d.ts +141 -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 +28 -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 +294 -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 +234 -0
- package/skills/mootant/references/mutators.md +45 -0
- package/skills/readme.md +11 -0
- package/README.md +0 -45
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { getCanonicalFalsyDefault as e } from "./get-canonical-falsy-default.js";
|
|
2
|
+
import { unwrapParentheses as t } from "../../tree/unwrap-parentheses.js";
|
|
3
|
+
import { getNullishSwapSkip as n } from "./get-nullish-swap-skip.js";
|
|
4
|
+
import { isBooleanValued as r } from "./is-boolean-valued.js";
|
|
5
|
+
import { isAlwaysNullish as i } from "./is-always-nullish.js";
|
|
6
|
+
import { hasPolarMutant as a } from "./has-polar-mutant.js";
|
|
7
|
+
import { isAlwaysTruthy as o } from "./is-always-truthy.js";
|
|
8
|
+
import { getFixedTruth as s } from "./get-fixed-truth.js";
|
|
9
|
+
import { isBooleanMode as c } from "./is-boolean-mode.js";
|
|
10
|
+
import { mayBeBoolean as l } from "./may-be-boolean.js";
|
|
11
|
+
import { mayBeNullish as u } from "./may-be-nullish.js";
|
|
12
|
+
function d(d, p, m) {
|
|
13
|
+
let { sourceCode: h, hints: g } = p, { operator: _, right: v, left: y } = d, b = _ === "&&", x = c(d, p), S = p.syntax.isBooleanContext(d) || r(y, p) && r(v, p), C = S ? s(y, p) : null, w = S ? s(v, p) : null, T = g.getType(y), E = e(y, v, p), D = {
|
|
14
|
+
mutator: "logical-operator",
|
|
15
|
+
node: d
|
|
16
|
+
}, O = [], k = b ? "truthy" : "falsy", A = b ? "falsy" : "truthy", j = E && {
|
|
17
|
+
reason: E.because === null ? "the right operand is the only falsy value of the left operand's type, so the result is the same" : `the right operand is the only falsy value of the left operand, which is never NaN (${E.because}), so the result is the same`,
|
|
18
|
+
rule: "canonical-falsy-default"
|
|
19
|
+
};
|
|
20
|
+
function M() {
|
|
21
|
+
return C === b ? {
|
|
22
|
+
reason: `the left operand is always ${k}, so dropping it changes nothing`,
|
|
23
|
+
rule: "fixed-operand"
|
|
24
|
+
} : w === !b ? {
|
|
25
|
+
reason: `the right operand is always ${A}, so the result is the same without the left operand`,
|
|
26
|
+
rule: "fixed-operand"
|
|
27
|
+
} : (b ? o(T) : i(T)) ? {
|
|
28
|
+
reason: `the type hints make the left operand always ${b ? "truthy" : "nullish"}, so dropping it changes nothing`,
|
|
29
|
+
rule: "typed-constant"
|
|
30
|
+
} : b && j ? j : a({
|
|
31
|
+
value: b,
|
|
32
|
+
decision: y,
|
|
33
|
+
candidate: D
|
|
34
|
+
}, p) ? {
|
|
35
|
+
reason: `a mutant inside the left operand makes it ${k} on some inputs`,
|
|
36
|
+
rule: "R2"
|
|
37
|
+
} : null;
|
|
38
|
+
}
|
|
39
|
+
function N() {
|
|
40
|
+
return w === b ? {
|
|
41
|
+
reason: `the right operand is always ${k}, so dropping it changes nothing`,
|
|
42
|
+
rule: "fixed-operand"
|
|
43
|
+
} : C === !b ? {
|
|
44
|
+
reason: `the left operand is always ${A}, so the right operand never decides the result`,
|
|
45
|
+
rule: "fixed-operand"
|
|
46
|
+
} : (b ? i(T) : o(T)) ? {
|
|
47
|
+
reason: `the type hints make the left operand always ${b ? "nullish" : "truthy"}, so the right operand never decides the result`,
|
|
48
|
+
rule: "typed-constant"
|
|
49
|
+
} : !b && j ? j : null;
|
|
50
|
+
}
|
|
51
|
+
function P() {
|
|
52
|
+
return a({
|
|
53
|
+
value: b,
|
|
54
|
+
decision: v,
|
|
55
|
+
candidate: D
|
|
56
|
+
}, p) || !x && !l(g.getType(v)) && a({
|
|
57
|
+
value: !b,
|
|
58
|
+
decision: y,
|
|
59
|
+
candidate: D
|
|
60
|
+
}, p, !0) ? {
|
|
61
|
+
reason: "a mutant inside the expression gives the same result as this drop on some inputs",
|
|
62
|
+
rule: "R2"
|
|
63
|
+
} : null;
|
|
64
|
+
}
|
|
65
|
+
let F = !1;
|
|
66
|
+
if (!f(y, _)) {
|
|
67
|
+
let e = M();
|
|
68
|
+
F = e === null, e && O.push({
|
|
69
|
+
text: h.getText(v),
|
|
70
|
+
skip: e,
|
|
71
|
+
node: d
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
let I = !1;
|
|
75
|
+
if (!f(v, _)) {
|
|
76
|
+
let e = N();
|
|
77
|
+
I = e === null, e && O.push({
|
|
78
|
+
text: h.getText(y),
|
|
79
|
+
skip: e,
|
|
80
|
+
node: d
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
let L = I && !b && !x && u(T) && t(y).type !== "LogicalExpression", R = L ? n(d, p, m) : null, z = L && R === null;
|
|
84
|
+
R && O.push({
|
|
85
|
+
text: h.replaceOperator(d, "??"),
|
|
86
|
+
skip: R,
|
|
87
|
+
node: d
|
|
88
|
+
});
|
|
89
|
+
let B = !1;
|
|
90
|
+
if (z) O.push({
|
|
91
|
+
skip: {
|
|
92
|
+
reason: "every test that kills the swap to ?? also kills this drop",
|
|
93
|
+
by: {
|
|
94
|
+
mutator: "logical-operator",
|
|
95
|
+
node: d
|
|
96
|
+
},
|
|
97
|
+
rule: "swap-subsumes-drop"
|
|
98
|
+
},
|
|
99
|
+
text: h.getText(y),
|
|
100
|
+
node: d
|
|
101
|
+
});
|
|
102
|
+
else if (I) {
|
|
103
|
+
let e = P();
|
|
104
|
+
B = e === null, e && O.push({
|
|
105
|
+
text: h.getText(y),
|
|
106
|
+
skip: e,
|
|
107
|
+
node: d
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
dropRight: B,
|
|
112
|
+
dropLeft: F,
|
|
113
|
+
skipped: O,
|
|
114
|
+
swap: z
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function f(e, n) {
|
|
118
|
+
let r = t(e);
|
|
119
|
+
return r.type === "LogicalExpression" && r.operator === n;
|
|
120
|
+
}
|
|
121
|
+
export { d as getLogicalDrops };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SkipNote } from '../../../types/mutant/skip-note.js';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the skip of a constant that gives a loop its running value, so the
|
|
4
|
+
* loop may never end.
|
|
5
|
+
*
|
|
6
|
+
* @param value - Constant that keeps the loop running.
|
|
7
|
+
* @returns Rule and reason of the skip.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getLoopRunningSkip(value: boolean): SkipNote;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Node } from 'oxc-parser';
|
|
2
|
+
import { MutatorContext } from '../../../types/mutator/mutator-context.js';
|
|
3
|
+
/**
|
|
4
|
+
* Top of the negation chain above a node.
|
|
5
|
+
*/
|
|
6
|
+
export interface NegationTop {
|
|
7
|
+
/**
|
|
8
|
+
* Number of `!` operators between the node and the top.
|
|
9
|
+
*/
|
|
10
|
+
negations: number;
|
|
11
|
+
/**
|
|
12
|
+
* Outermost `!` of the chain, or the node itself.
|
|
13
|
+
*/
|
|
14
|
+
node: Node;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Climbs from a node through the `!` operators above it, looking through
|
|
18
|
+
* parentheses and TypeScript wrappers (catalog 2.2, `chainTop` and
|
|
19
|
+
* `negations`).
|
|
20
|
+
*
|
|
21
|
+
* @param node - Node of the runtime tree.
|
|
22
|
+
* @param context - Mutator context of the file.
|
|
23
|
+
* @returns The top of the chain and the number of `!` on the way.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getNegationTop(node: Node, context: MutatorContext): NegationTop;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isNegation as e } from "./is-negation.js";
|
|
2
|
+
function t(t, n) {
|
|
3
|
+
let r = t, i = 0, { parent: a } = n.syntax.getContextSlot(r);
|
|
4
|
+
for (; e(a);) r = a, i += 1, {parent: a} = n.syntax.getContextSlot(r);
|
|
5
|
+
return {
|
|
6
|
+
node: r,
|
|
7
|
+
negations: i
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export { t as getNegationTop };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LiteralValue } from './get-literal-value.js';
|
|
2
|
+
/**
|
|
3
|
+
* Computes the value a literal mutator gives a literal (catalog 2.8): a flipped
|
|
4
|
+
* boolean, a number plus one, an empty or a filled string.
|
|
5
|
+
*
|
|
6
|
+
* @param value - Value of the literal before the change.
|
|
7
|
+
* @returns The value after the change.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getNextLiteralValue(value: LiteralValue): LiteralValue;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { LogicalExpression } from 'oxc-parser';
|
|
2
|
+
import { MutantSite, RunContext } from './create-run-context.js';
|
|
3
|
+
/**
|
|
4
|
+
* Truth value toward which a running directional mutant of a `??` moves it.
|
|
5
|
+
*/
|
|
6
|
+
export interface NullishDirection {
|
|
7
|
+
/**
|
|
8
|
+
* Directional mutant.
|
|
9
|
+
*/
|
|
10
|
+
by: MutantSite;
|
|
11
|
+
/**
|
|
12
|
+
* Truth value the mutant moves the `??` toward.
|
|
13
|
+
*/
|
|
14
|
+
value: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Finds the truth values toward which the running directional mutants of a `??`
|
|
18
|
+
* move it (catalog 4.7 and 4.8): logical-operator's drop of the default moves
|
|
19
|
+
* it toward false, its swap to `||` toward true, and the flip of a literal
|
|
20
|
+
* default by its literal mutator toward the default's other truth value. The
|
|
21
|
+
* rules of logical-operator are read with `nullishSwap: 'distinguishing'`, the
|
|
22
|
+
* setting under which a swap is emitted in every preset. Only a `??` in a truth
|
|
23
|
+
* position (a boolean context or a boolean-mode operand) has directions: in a
|
|
24
|
+
* value position its mutants change the value, not only the truth value.
|
|
25
|
+
*
|
|
26
|
+
* @param node - `??` expression of the runtime tree.
|
|
27
|
+
* @param candidate - Mutant whose skip the directions decide.
|
|
28
|
+
* @param context - Mutator context with the test of mutants that will run.
|
|
29
|
+
* @returns The truth values with their mutants, in the order drop, swap, flip;
|
|
30
|
+
* none outside a truth position.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getNullishDirections(node: LogicalExpression, candidate: MutantSite, context: RunContext): NullishDirection[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { unwrapParentheses as e } from "../../tree/unwrap-parentheses.js";
|
|
2
|
+
import { isBooleanModeOperand as t } from "./is-boolean-mode-operand.js";
|
|
3
|
+
import { getLiteralMutator as n } from "./get-literal-mutator.js";
|
|
4
|
+
import { getNullishPlan as r } from "./get-nullish-plan.js";
|
|
5
|
+
import { getLiteralFlip as i } from "./get-literal-flip.js";
|
|
6
|
+
function a(a, o, s) {
|
|
7
|
+
if (!s.syntax.isBooleanContext(a) && !t(a, s)) return [];
|
|
8
|
+
let c = [], l = r(a, s, {
|
|
9
|
+
nullishSwap: "distinguishing",
|
|
10
|
+
nullishNormalization: !1
|
|
11
|
+
}), u = {
|
|
12
|
+
mutator: "logical-operator",
|
|
13
|
+
node: a
|
|
14
|
+
};
|
|
15
|
+
s.runs(u, o) && (l.dropRight && c.push({
|
|
16
|
+
value: !1,
|
|
17
|
+
by: u
|
|
18
|
+
}), l.swap && c.push({
|
|
19
|
+
value: !0,
|
|
20
|
+
by: u
|
|
21
|
+
}));
|
|
22
|
+
let d = e(a.right), f = i(d, s), p = {
|
|
23
|
+
mutator: n(d),
|
|
24
|
+
node: d
|
|
25
|
+
};
|
|
26
|
+
return f !== null && s.runs(p, o) && c.push({
|
|
27
|
+
value: f,
|
|
28
|
+
by: p
|
|
29
|
+
}), c;
|
|
30
|
+
}
|
|
31
|
+
export { a as getNullishDirections };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { LogicalExpression } from 'oxc-parser';
|
|
2
|
+
import { MutatorContext } from '../../../types/mutator/mutator-context.js';
|
|
3
|
+
import { Replacement } from '../../../types/mutator/replacement.js';
|
|
4
|
+
/**
|
|
5
|
+
* Mutants that logical-operator emits for a `??`.
|
|
6
|
+
*/
|
|
7
|
+
export interface NullishPlan {
|
|
8
|
+
/**
|
|
9
|
+
* Mutants that are not emitted, as replacements with the rule that skips
|
|
10
|
+
* each, in emission order. Drops of a nested `??` group are not candidates
|
|
11
|
+
* and are not listed.
|
|
12
|
+
*/
|
|
13
|
+
skipped: Replacement[];
|
|
14
|
+
/**
|
|
15
|
+
* Whether the default is dropped (the node becomes its left side).
|
|
16
|
+
*/
|
|
17
|
+
dropRight: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the left side is dropped (the node becomes its default).
|
|
20
|
+
*/
|
|
21
|
+
dropLeft: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether `??` is swapped to `||`.
|
|
24
|
+
*/
|
|
25
|
+
swap: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Options of logical-operator that its `??` rules read.
|
|
29
|
+
*/
|
|
30
|
+
export interface NullishOptions {
|
|
31
|
+
/**
|
|
32
|
+
* When `??` and `||` are swapped.
|
|
33
|
+
*/
|
|
34
|
+
nullishSwap: 'distinguishing' | 'always';
|
|
35
|
+
/**
|
|
36
|
+
* Whether a default that is `null`, `undefined` or `void 0` is dropped.
|
|
37
|
+
*/
|
|
38
|
+
nullishNormalization: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Plans the mutants of `L ?? R` (catalog 4.8): the swap to `||` where falsy
|
|
42
|
+
* values differ, the drop of `L` unless the swap subsumes it, and the drop of
|
|
43
|
+
* `R` where `L` may be nullish, which normalizes `undefined` to `null` only
|
|
44
|
+
* with `nullishNormalization`. In a truth position with a literal or falsy
|
|
45
|
+
* default, the drop of `L` and the swap are the position's constants and are
|
|
46
|
+
* skipped, and the drop of `R` stays only for a truthy default that no literal
|
|
47
|
+
* mutator flips. Elsewhere, under every `nullishSwap` mode, the swap is
|
|
48
|
+
* equivalent when `L` is never falsy unless nullish (see `getNeverFalsyFact`),
|
|
49
|
+
* and so are the swap and the drop of `R` when `R` is a falsy literal and the
|
|
50
|
+
* `??` initializes a name that is only read for its truth (see
|
|
51
|
+
* `getTruthOnlyName`); the drop of `L` stays, as no swap subsumes it.
|
|
52
|
+
* Same-operator groups are flattened. Mutants that are not emitted are returned
|
|
53
|
+
* with their rule. The plan is pure: condition and the polarity rules read it.
|
|
54
|
+
*
|
|
55
|
+
* @param node - `??` expression of the runtime tree.
|
|
56
|
+
* @param context - Mutator context of the file.
|
|
57
|
+
* @param options - Options of logical-operator.
|
|
58
|
+
* @returns Which mutants are emitted, and the skipped ones.
|
|
59
|
+
*/
|
|
60
|
+
export declare function getNullishPlan(node: LogicalExpression, context: MutatorContext, options: NullishOptions): NullishPlan;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { isTruthFlippingLiteral as e } from "./is-truth-flipping-literal.js";
|
|
2
|
+
import { unwrapParentheses as t } from "../../tree/unwrap-parentheses.js";
|
|
3
|
+
import { isBooleanModeOperand as n } from "./is-boolean-mode-operand.js";
|
|
4
|
+
import { getNullishSwapSkip as r } from "./get-nullish-swap-skip.js";
|
|
5
|
+
import { isNullishConstant as i } from "./is-nullish-constant.js";
|
|
6
|
+
import { getLiteralMutator as a } from "./get-literal-mutator.js";
|
|
7
|
+
import { isAlwaysNullish as o } from "./is-always-nullish.js";
|
|
8
|
+
import { isFalsyConstant as s } from "./is-falsy-constant.js";
|
|
9
|
+
import { getLiteralValue as c } from "./get-literal-value.js";
|
|
10
|
+
import { mayBeNullish as l } from "./may-be-nullish.js";
|
|
11
|
+
function u(c, u, m) {
|
|
12
|
+
let { sourceCode: h } = u, { right: g, left: _ } = c, v = u.hints.getType(_), y = h.getText(_), b = h.getText(g), x = h.replaceOperator(c, "||"), S = {
|
|
13
|
+
dropRight: !1,
|
|
14
|
+
dropLeft: !1,
|
|
15
|
+
skipped: [],
|
|
16
|
+
swap: !1
|
|
17
|
+
};
|
|
18
|
+
function C(e, t) {
|
|
19
|
+
S.skipped.push({
|
|
20
|
+
skip: t,
|
|
21
|
+
node: c,
|
|
22
|
+
text: e
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
let w = {
|
|
26
|
+
reason: "the type hints say the left side is never nullish, so the default never applies",
|
|
27
|
+
rule: "never-nullish"
|
|
28
|
+
};
|
|
29
|
+
if (f(g, u) && (u.syntax.isBooleanContext(c) || n(c, u))) {
|
|
30
|
+
let n = {
|
|
31
|
+
reason: "in a truth position with a literal default it forces the position to a constant, as another mutator does",
|
|
32
|
+
rule: "O15"
|
|
33
|
+
};
|
|
34
|
+
if (C(b, n), C(x, s(g, u) ? {
|
|
35
|
+
reason: "the default is falsy, so in a truth position || and ?? agree",
|
|
36
|
+
rule: "falsy-default"
|
|
37
|
+
} : n), !l(v)) C(y, w);
|
|
38
|
+
else if (s(g, u)) C(y, {
|
|
39
|
+
reason: "the default is falsy, so in a truth position dropping it changes nothing",
|
|
40
|
+
rule: "falsy-default"
|
|
41
|
+
});
|
|
42
|
+
else if (e(g)) {
|
|
43
|
+
let e = t(g);
|
|
44
|
+
C(y, {
|
|
45
|
+
reason: "it acts like flipping the truth value of the default, which is left to its literal mutator",
|
|
46
|
+
by: {
|
|
47
|
+
mutator: a(e),
|
|
48
|
+
node: e
|
|
49
|
+
},
|
|
50
|
+
rule: "O15"
|
|
51
|
+
});
|
|
52
|
+
} else S.dropRight = !0;
|
|
53
|
+
return S;
|
|
54
|
+
}
|
|
55
|
+
let T = d(g) ? u.syntax.getTruthOnlyName(c) : null, E = T === null ? null : `\`${T}\` is only read for its truth and the default is falsy`;
|
|
56
|
+
if (E === null) {
|
|
57
|
+
let e = r(c, u, m.nullishSwap);
|
|
58
|
+
S.swap = e === null, e && C(x, e);
|
|
59
|
+
} else C(x, {
|
|
60
|
+
reason: `${E}, so ?? and || agree`,
|
|
61
|
+
rule: "falsy-default"
|
|
62
|
+
});
|
|
63
|
+
return p(_) || (S.swap ? C(b, {
|
|
64
|
+
reason: "every test that kills the swap to || also kills dropping the left side",
|
|
65
|
+
by: {
|
|
66
|
+
mutator: "logical-operator",
|
|
67
|
+
node: c
|
|
68
|
+
},
|
|
69
|
+
rule: "swap-subsumes-drop"
|
|
70
|
+
}) : o(v) ? C(b, {
|
|
71
|
+
reason: "the type hints make the left side always nullish, so dropping it changes nothing",
|
|
72
|
+
rule: "typed-constant"
|
|
73
|
+
}) : S.dropLeft = !0), p(g) || (l(v) ? !m.nullishNormalization && i(g, u) ? C(y, {
|
|
74
|
+
reason: "dropping a null or undefined default only turns one nullish value into the other (nullishNormalization is off)",
|
|
75
|
+
rule: "nullish-normalization"
|
|
76
|
+
}) : E === null ? S.dropRight = !0 : C(y, {
|
|
77
|
+
reason: `${E}, so dropping it changes nothing`,
|
|
78
|
+
rule: "falsy-default"
|
|
79
|
+
}) : C(y, w)), S;
|
|
80
|
+
}
|
|
81
|
+
function d(e) {
|
|
82
|
+
let n = c(e);
|
|
83
|
+
if (n !== null) return !n;
|
|
84
|
+
let r = t(e);
|
|
85
|
+
return r.type === "UnaryExpression" ? r.operator === "void" && t(r.argument).type === "Literal" : r.type === "Literal" && r.raw === "null";
|
|
86
|
+
}
|
|
87
|
+
function f(e, n) {
|
|
88
|
+
return t(e).type === "Literal" || c(e) !== null || s(e, n);
|
|
89
|
+
}
|
|
90
|
+
function p(e) {
|
|
91
|
+
let n = t(e);
|
|
92
|
+
return n.type === "LogicalExpression" && n.operator === "??";
|
|
93
|
+
}
|
|
94
|
+
export { u as getNullishPlan };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LogicalExpression } from 'oxc-parser';
|
|
2
|
+
import { MutatorContext } from '../../../types/mutator/mutator-context.js';
|
|
3
|
+
import { SkipNote } from '../../../types/mutant/skip-note.js';
|
|
4
|
+
/**
|
|
5
|
+
* Finds why the swap between `??` and `||` of a logical expression is not
|
|
6
|
+
* emitted (catalog 4.8): under every `nullishSwap` mode it is equivalent when
|
|
7
|
+
* the left side is never falsy unless nullish (see `getNeverFalsyFact`), and
|
|
8
|
+
* otherwise it is emitted only where `distinguishesNullishSwap` finds a falsy
|
|
9
|
+
* value that gives a different result.
|
|
10
|
+
*
|
|
11
|
+
* @param node - `??` or `||` expression of the runtime tree.
|
|
12
|
+
* @param context - Mutator context of the file.
|
|
13
|
+
* @param nullishSwap - The `nullishSwap` option of logical-operator.
|
|
14
|
+
* @returns Rule and reason of the skip, or null when the swap is emitted.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getNullishSwapSkip(node: LogicalExpression, context: MutatorContext, nullishSwap: 'distinguishing' | 'always'): SkipNote | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { distinguishesNullishSwap as e } from "./distinguishes-nullish-swap.js";
|
|
2
|
+
function t(t, n, r) {
|
|
3
|
+
let i = n.syntax.getNeverFalsyFact(t.left);
|
|
4
|
+
return i === null ? e(t, n.hints, r) ? null : {
|
|
5
|
+
reason: "?? and || differ here only on falsy values that the nullishSwap option does not count, such as the default itself",
|
|
6
|
+
rule: "nullish-swap"
|
|
7
|
+
} : {
|
|
8
|
+
reason: `the left side is never falsy when defined (${i}), so || and ?? agree`,
|
|
9
|
+
rule: "never-falsy"
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export { t as getNullishSwapSkip };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Node } from 'oxc-parser';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the text of a number literal moved by one step (catalog 2.3, T7). The
|
|
4
|
+
* new value is computed from the value, never from the text, and `-` applied to
|
|
5
|
+
* a literal counts as one negative value. A literal with a binary, octal or
|
|
6
|
+
* hexadecimal prefix keeps its radix while the new value is not negative, with
|
|
7
|
+
* upper-case digits when the original has any; every other value is written in
|
|
8
|
+
* its shortest form. BigInt literals keep their `n` suffix.
|
|
9
|
+
*
|
|
10
|
+
* @param node - Number or BigInt literal, or `-` applied directly to one.
|
|
11
|
+
* @param step - Amount added to the value: `1`, or `-1` for the shifted literal
|
|
12
|
+
* of a comparison.
|
|
13
|
+
* @returns The new text, or null when the node is not a number literal or the
|
|
14
|
+
* step does not change the value (beyond 2^53).
|
|
15
|
+
*/
|
|
16
|
+
export declare function getNumberText(node: Node, step: -1 | 1): string | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { unwrapParentheses as e } from "../../tree/unwrap-parentheses.js";
|
|
2
|
+
import { getLiteralValue as t } from "./get-literal-value.js";
|
|
3
|
+
let n = /* @__PURE__ */ new Map([
|
|
4
|
+
["x", 16],
|
|
5
|
+
["b", 2],
|
|
6
|
+
["o", 8]
|
|
7
|
+
]);
|
|
8
|
+
const r = /^(?<prefix>0(?<letter>[box]))(?<digits>[\da-f]+)(?<suffix>n?)$/iu;
|
|
9
|
+
function i(i, a) {
|
|
10
|
+
let o = t(i), s;
|
|
11
|
+
if (typeof o == "bigint") s = o + BigInt(a);
|
|
12
|
+
else if (typeof o == "number" && o + a !== o) s = o + a;
|
|
13
|
+
else return null;
|
|
14
|
+
let c = e(i), l = c.type === "UnaryExpression" ? c.argument : c, u = r.exec(l.raw.replaceAll("_", ""));
|
|
15
|
+
if (!u?.groups || s < 0) return `${s}${typeof s == "bigint" ? "n" : ""}`;
|
|
16
|
+
let { digits: d, letter: f, prefix: p, suffix: m } = u.groups, h = s.toString(n.get(f.toLowerCase()));
|
|
17
|
+
return `${p}${/[A-F]/u.test(d) ? h.toUpperCase() : h}${m}`;
|
|
18
|
+
}
|
|
19
|
+
export { i as getNumberText };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Node } from 'oxc-parser';
|
|
2
|
+
import { SkipNote } from '../../../types/mutant/skip-note.js';
|
|
3
|
+
import { LiteralValue } from './get-literal-value.js';
|
|
4
|
+
import { RunContext } from './create-run-context.js';
|
|
5
|
+
/**
|
|
6
|
+
* Decides whether a literal mutant of the right operand of a value-mode `L ||
|
|
7
|
+
* R` is skipped because it gives `R` the only falsy value of `L`'s type that is
|
|
8
|
+
* not nullish (catalog 5.2 O16 and 5.3 R7). When `L` cannot be nullish the
|
|
9
|
+
* mutant is logical-operator's drop of `R` (ownership, static); otherwise the
|
|
10
|
+
* nullish swap `L ?? R` subsumes it while that swap will run. A skipped mutant
|
|
11
|
+
* comes with its rule.
|
|
12
|
+
*
|
|
13
|
+
* @param node - Literal that a literal mutator would replace.
|
|
14
|
+
* @param value - Value the literal mutator gives it.
|
|
15
|
+
* @param context - Mutator context with the test of mutants that will run.
|
|
16
|
+
* @returns Rule and reason of the skip, or null when the mutant is emitted.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getOrDefaultSkip(node: Node, value: LiteralValue, context: RunContext): SkipNote | null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getCanonicalFalsy as e } from "./get-canonical-falsy.js";
|
|
2
|
+
import { getLiteralMutator as t } from "./get-literal-mutator.js";
|
|
3
|
+
import { getLogicalDrops as n } from "./get-logical-drops.js";
|
|
4
|
+
import { isBooleanMode as r } from "./is-boolean-mode.js";
|
|
5
|
+
import { mayBeNullish as i } from "./may-be-nullish.js";
|
|
6
|
+
import { getTypeView as a } from "./get-type-view.js";
|
|
7
|
+
function o(o, s, c) {
|
|
8
|
+
let { parent: l, key: u } = c.syntax.getContextSlot(o);
|
|
9
|
+
if (u !== "right" || l?.type !== "LogicalExpression" || l.operator !== "||" || r(l, c)) return null;
|
|
10
|
+
let d = c.hints.getType(l.left);
|
|
11
|
+
if (e(a(d).type) !== s) return null;
|
|
12
|
+
let f = {
|
|
13
|
+
mutator: "logical-operator",
|
|
14
|
+
node: l
|
|
15
|
+
};
|
|
16
|
+
return i(d) ? n(l, c, "distinguishing").swap && c.runs(f, {
|
|
17
|
+
mutator: t(o),
|
|
18
|
+
node: o
|
|
19
|
+
}) ? {
|
|
20
|
+
reason: "it gives the default the only falsy value of the left operand's type that is not nullish, and every test that kills the swap to ?? also kills it",
|
|
21
|
+
rule: "R7",
|
|
22
|
+
by: f
|
|
23
|
+
} : null : {
|
|
24
|
+
reason: "it gives the default the only falsy value of the left operand's type, which is logical-operator's drop of the default",
|
|
25
|
+
rule: "O16",
|
|
26
|
+
by: f
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export { o as getOrDefaultSkip };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Node } from 'oxc-parser';
|
|
2
|
+
import { MutatorContext } from '../../../types/mutator/mutator-context.js';
|
|
3
|
+
import { SkipNote } from '../../../types/mutant/skip-note.js';
|
|
4
|
+
/**
|
|
5
|
+
* Finds the constants of a node that logical-operator owns (catalog 4.6, rule
|
|
6
|
+
* 2, O3): both in a boolean-mode operand, an operand of a `&&` or `||` in
|
|
7
|
+
* boolean mode through the `!` chain above it; in value mode, the constant that
|
|
8
|
+
* forces the left operand of a `&&` or `||` to its identity, and the constant
|
|
9
|
+
* that makes a constant-eligible group take its absorbing value while every
|
|
10
|
+
* earlier operand is boolean-valued.
|
|
11
|
+
*
|
|
12
|
+
* @param node - Node a constant replaces, such as a comparison or the top of a
|
|
13
|
+
* `!` chain.
|
|
14
|
+
* @param context - Mutator context of the file.
|
|
15
|
+
* @returns The skip of each owned constant.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getOwnedConstants(node: Node, context: MutatorContext): Map<boolean, SkipNote>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { isConstantEligibleGroup as e } from "./is-constant-eligible-group.js";
|
|
2
|
+
import { isBooleanValued as t } from "./is-boolean-valued.js";
|
|
3
|
+
import { getNegationTop as n } from "./get-negation-top.js";
|
|
4
|
+
import { isBooleanMode as r } from "./is-boolean-mode.js";
|
|
5
|
+
import { isAndOr as i } from "./is-and-or.js";
|
|
6
|
+
function a(a, o) {
|
|
7
|
+
let { sourceCode: s, syntax: c } = o, l = n(a, o), u = l.negations % 2 == 1, { parent: d, key: f } = c.getContextSlot(l.node), p = /* @__PURE__ */ new Map();
|
|
8
|
+
if (!i(d)) return p;
|
|
9
|
+
if (r(d, o)) {
|
|
10
|
+
for (let e of [!0, !1]) p.set(e, {
|
|
11
|
+
reason: "the truth value of an operand of && or || is left to logical-operator",
|
|
12
|
+
by: {
|
|
13
|
+
mutator: "logical-operator",
|
|
14
|
+
node: d
|
|
15
|
+
},
|
|
16
|
+
rule: "O3"
|
|
17
|
+
});
|
|
18
|
+
return p;
|
|
19
|
+
}
|
|
20
|
+
let m = d, h = s.getSlot(m).parent;
|
|
21
|
+
for (; h?.type === "LogicalExpression" && h.operator === d.operator;) m = h, h = s.getSlot(m).parent;
|
|
22
|
+
let g = c.getLogicalChain(m).filter((e) => e.end <= l.node.start);
|
|
23
|
+
return e(m, o) && g.every((e) => t(e, o)) && p.set(d.operator === "||" !== u, {
|
|
24
|
+
reason: `it makes the whole group ${d.operator === "||" ? "truthy" : "falsy"}, which is logical-operator's constant of the group`,
|
|
25
|
+
by: {
|
|
26
|
+
mutator: "logical-operator",
|
|
27
|
+
node: m
|
|
28
|
+
},
|
|
29
|
+
rule: "O3"
|
|
30
|
+
}), f === "left" && p.set(d.operator === "&&" !== u, {
|
|
31
|
+
reason: `it makes the left operand of ${d.operator} ${d.operator === "&&" ? "truthy" : "falsy"}, which is logical-operator's drop of that operand`,
|
|
32
|
+
by: {
|
|
33
|
+
mutator: "logical-operator",
|
|
34
|
+
node: d
|
|
35
|
+
},
|
|
36
|
+
rule: "O3"
|
|
37
|
+
}), p;
|
|
38
|
+
}
|
|
39
|
+
export { a as getOwnedConstants };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Node } from 'oxc-parser';
|
|
2
|
+
import { MutatorContext } from '../../../types/mutator/mutator-context.js';
|
|
3
|
+
import { MutantSite } from './create-run-context.js';
|
|
4
|
+
/**
|
|
5
|
+
* Finds the mutant with which the owner of a decision emits a constant on it
|
|
6
|
+
* (catalog 5.2, O19): the owner chosen by O1, reached through wrappers, `!` and
|
|
7
|
+
* conditionals whose branch on the forced side is a literal with the sought
|
|
8
|
+
* truth value, emits the constant by its own rules, judged with every mutator
|
|
9
|
+
* enabled and without ignore comments: condition's constant, a comparison's
|
|
10
|
+
* constant, a group constant, or the flip of a literal. A candidate with the
|
|
11
|
+
* behavior of that decision forced to the value is then the same mutant under
|
|
12
|
+
* another name and is skipped statically. The constant skips every effect of
|
|
13
|
+
* the decision, so a candidate that still evaluates the decision is that mutant
|
|
14
|
+
* only when the decision has no effect, which the caller checks.
|
|
15
|
+
*
|
|
16
|
+
* @param node - Decision: a test, a returned value or a node inside one.
|
|
17
|
+
* @param value - Truth value the candidate forces the decision to.
|
|
18
|
+
* @param context - Mutator context of the file.
|
|
19
|
+
* @returns The owner's mutant that emits the constant, or null when the owner
|
|
20
|
+
* does not emit it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getOwnerConstant(node: Node, value: boolean, context: MutatorContext): MutantSite | null;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createStaticRunContext as e } from "./create-static-run-context.js";
|
|
2
|
+
import { getConditionConstants as t } from "./get-condition-constants.js";
|
|
3
|
+
import { unwrapParentheses as n } from "../../tree/unwrap-parentheses.js";
|
|
4
|
+
import { unwrapExpression as r } from "../../tree/unwrap-expression.js";
|
|
5
|
+
import { getComparisonPlan as i } from "./get-comparison-plan.js";
|
|
6
|
+
import { getLiteralMutator as a } from "./get-literal-mutator.js";
|
|
7
|
+
import { getGroupConstant as o } from "./get-group-constant.js";
|
|
8
|
+
import { getLiteralTruth as s } from "./get-literal-truth.js";
|
|
9
|
+
import { getLiteralFlip as c } from "./get-literal-flip.js";
|
|
10
|
+
import { isComparison as l } from "./is-comparison.js";
|
|
11
|
+
import { getInnermost as u } from "./get-innermost.js";
|
|
12
|
+
import { isAndOr as d } from "./is-and-or.js";
|
|
13
|
+
function f(t, n, r) {
|
|
14
|
+
return p(t, n, e(r));
|
|
15
|
+
}
|
|
16
|
+
function p(e, f, m) {
|
|
17
|
+
let h = n(e), g = r(e), _ = (h === g ? [h] : [h, g]).find((e) => t(e, m).values.includes(f));
|
|
18
|
+
if (_) return {
|
|
19
|
+
mutator: "condition",
|
|
20
|
+
node: _
|
|
21
|
+
};
|
|
22
|
+
let { node: v, negations: y } = u(e), b = f !== (y % 2 == 1);
|
|
23
|
+
return v.type === "ConditionalExpression" ? (s(v.consequent, m) === b ? p(v.test, !0, m) : null) ?? (s(v.alternate, m) === b ? p(v.test, !1, m) : null) : l(v) ? i(v, m).entries.some((e) => e.kind === "constant" && e.value === b) ? {
|
|
24
|
+
mutator: "comparison-operator",
|
|
25
|
+
node: v
|
|
26
|
+
} : null : d(v) ? v.operator === "||" === b && o(v, m).emitted ? {
|
|
27
|
+
mutator: "logical-operator",
|
|
28
|
+
node: v
|
|
29
|
+
} : null : c(v, m) === b ? {
|
|
30
|
+
mutator: a(v),
|
|
31
|
+
node: v
|
|
32
|
+
} : null;
|
|
33
|
+
}
|
|
34
|
+
export { f as getOwnerConstant };
|