mootant 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/bin/mootant.js +3 -2
  2. package/dist/adapters/jest/collect-jest-dependencies.d.ts +8 -6
  3. package/dist/adapters/jest/collect-jest-dependencies.js +20 -14
  4. package/dist/adapters/jest/get-jest-cache-inputs.d.ts +14 -13
  5. package/dist/adapters/jest/index.d.ts +3 -1
  6. package/dist/adapters/jest/run-dry.js +20 -20
  7. package/dist/adapters/jest/start-jest-session.d.ts +6 -2
  8. package/dist/adapters/jest/start-jest-session.js +9 -2
  9. package/dist/adapters/jest/types/jest-handle.d.ts +2 -1
  10. package/dist/adapters/jest/types/jest-record.d.ts +4 -3
  11. package/dist/adapters/jest/types/worker-channel.d.ts +7 -0
  12. package/dist/adapters/jest/worker/boot-worker.d.ts +5 -4
  13. package/dist/adapters/jest/worker/create-test-runner.d.ts +4 -1
  14. package/dist/adapters/jest/worker/keep-reset-loads.d.ts +13 -0
  15. package/dist/adapters/jest/worker/list-runtime-files.d.ts +13 -0
  16. package/dist/adapters/jest/worker/run-unit.d.ts +25 -20
  17. package/dist/adapters/jest/worker/vm-setup.js +1 -1
  18. package/dist/adapters/jest/worker/worker.js +1 -1
  19. package/dist/adapters/node-test/check-typescript.js +2 -2
  20. package/dist/adapters/node-test/collect-node-dependencies.d.ts +7 -5
  21. package/dist/adapters/node-test/collect-node-dependencies.js +26 -20
  22. package/dist/adapters/node-test/create-spare-processes.d.ts +26 -0
  23. package/dist/adapters/node-test/create-spare-processes.js +53 -0
  24. package/dist/adapters/node-test/filter-exec-argv.d.ts +2 -1
  25. package/dist/adapters/node-test/filter-exec-argv.js +13 -12
  26. package/dist/adapters/node-test/get-node-cache-inputs.js +1 -1
  27. package/dist/adapters/node-test/get-unit-deadline.d.ts +6 -5
  28. package/dist/adapters/node-test/index.d.ts +2 -2
  29. package/dist/adapters/node-test/index.js +1 -0
  30. package/dist/adapters/node-test/is-group-alive.d.ts +8 -0
  31. package/dist/adapters/node-test/is-group-alive.js +8 -0
  32. package/dist/adapters/node-test/list-setup-files.js +2 -2
  33. package/dist/adapters/node-test/place-preload.d.ts +2 -1
  34. package/dist/adapters/node-test/place-preload.js +24 -18
  35. package/dist/adapters/node-test/preload/create-commonjs-route.js +1 -1
  36. package/dist/adapters/node-test/preload/preload.js +54 -52
  37. package/dist/adapters/node-test/preload/read-line-sync.d.ts +11 -0
  38. package/dist/adapters/node-test/preload/read-line-sync.js +25 -0
  39. package/dist/adapters/node-test/preload/read-unit.d.ts +11 -5
  40. package/dist/adapters/node-test/preload/read-unit.js +5 -4
  41. package/dist/adapters/node-test/run-isolated.d.ts +19 -10
  42. package/dist/adapters/node-test/run-isolated.js +68 -52
  43. package/dist/adapters/node-test/run-test-file.d.ts +12 -4
  44. package/dist/adapters/node-test/run-test-file.js +18 -14
  45. package/dist/adapters/node-test/run-test-process.d.ts +30 -13
  46. package/dist/adapters/node-test/run-test-process.js +38 -40
  47. package/dist/adapters/node-test/start-node-test-session.d.ts +10 -2
  48. package/dist/adapters/node-test/start-node-test-session.js +90 -84
  49. package/dist/adapters/node-test/start-test-process.d.ts +30 -0
  50. package/dist/adapters/node-test/start-test-process.js +27 -0
  51. package/dist/adapters/node-test/types/node-test-handle.d.ts +14 -1
  52. package/dist/adapters/node-test/types/process-watch.d.ts +4 -3
  53. package/dist/adapters/node-test/types/spare-processes.d.ts +20 -0
  54. package/dist/adapters/node-test/types/test-process-outcome.d.ts +8 -1
  55. package/dist/adapters/shared/allows-spares.d.ts +11 -0
  56. package/dist/adapters/shared/allows-spares.js +23 -0
  57. package/dist/adapters/shared/create-environment-proxy.d.ts +4 -3
  58. package/dist/adapters/shared/create-input-filter.d.ts +17 -14
  59. package/dist/adapters/shared/create-input-filter.js +2 -2
  60. package/dist/adapters/shared/enable-compile-cache.d.ts +32 -0
  61. package/dist/adapters/shared/enable-compile-cache.js +7 -0
  62. package/dist/adapters/shared/find-tsconfig-property.d.ts +13 -0
  63. package/dist/adapters/shared/find-tsconfig-property.js +6 -0
  64. package/dist/adapters/shared/get-spare-limit.d.ts +10 -0
  65. package/dist/adapters/shared/get-spare-limit.js +5 -0
  66. package/dist/adapters/shared/index-environment-hashes.d.ts +2 -2
  67. package/dist/adapters/shared/index-environment-hashes.js +5 -13
  68. package/dist/adapters/{node-test → shared}/list-flag-values.d.ts +2 -1
  69. package/dist/adapters/shared/list-flag-values.js +10 -0
  70. package/dist/adapters/shared/list-tsconfig-files.d.ts +14 -5
  71. package/dist/adapters/shared/list-tsconfig-files.js +15 -13
  72. package/dist/adapters/shared/parse-tsconfig.d.ts +10 -0
  73. package/dist/adapters/shared/parse-tsconfig.js +19 -0
  74. package/dist/adapters/shared/read-flag-name.d.ts +9 -0
  75. package/dist/adapters/shared/read-flag-name.js +5 -0
  76. package/dist/adapters/shared/read-node-options.d.ts +11 -0
  77. package/dist/adapters/shared/read-node-options.js +6 -0
  78. package/dist/adapters/shared/read-prefork-switch.d.ts +10 -0
  79. package/dist/adapters/shared/read-prefork-switch.js +5 -0
  80. package/dist/adapters/shared/read-tsconfig-extends.d.ts +2 -5
  81. package/dist/adapters/shared/read-tsconfig-extends.js +16 -31
  82. package/dist/adapters/shared/read-tsconfig-references.d.ts +12 -0
  83. package/dist/adapters/shared/read-tsconfig-references.js +13 -0
  84. package/dist/adapters/shared/track-file-reads.d.ts +13 -12
  85. package/dist/adapters/shared/track-file-reads.js +71 -71
  86. package/dist/adapters/shared/track-process-group.d.ts +2 -1
  87. package/dist/adapters/shared/track-process-group.js +7 -2
  88. package/dist/adapters/vitest/build-isolated-facts.d.ts +4 -3
  89. package/dist/adapters/vitest/collect-dependencies.d.ts +11 -5
  90. package/dist/adapters/vitest/collect-dependencies.js +36 -27
  91. package/dist/adapters/vitest/configure-project.d.ts +3 -2
  92. package/dist/adapters/vitest/configure-project.js +1 -1
  93. package/dist/adapters/vitest/create-forks-pool.d.ts +34 -7
  94. package/dist/adapters/vitest/create-forks-pool.js +102 -24
  95. package/dist/adapters/vitest/create-interleaved-sequencer.d.ts +3 -2
  96. package/dist/adapters/vitest/drop-signal-listeners.d.ts +14 -0
  97. package/dist/adapters/vitest/drop-signal-listeners.js +15 -0
  98. package/dist/adapters/vitest/get-cache-inputs.d.ts +3 -1
  99. package/dist/adapters/vitest/get-cache-inputs.js +43 -28
  100. package/dist/adapters/vitest/get-module-file.d.ts +3 -5
  101. package/dist/adapters/vitest/get-module-file.js +1 -1
  102. package/dist/adapters/vitest/get-spare-key.d.ts +15 -0
  103. package/dist/adapters/vitest/get-spare-key.js +15 -0
  104. package/dist/adapters/vitest/index.d.ts +2 -1
  105. package/dist/adapters/vitest/index.js +1 -0
  106. package/dist/adapters/vitest/is-virtual-module.d.ts +1 -2
  107. package/dist/adapters/vitest/is-virtual-module.js +1 -1
  108. package/dist/adapters/vitest/list-script-defines.d.ts +13 -0
  109. package/dist/adapters/vitest/list-script-defines.js +22 -0
  110. package/dist/adapters/vitest/read-unit-inputs.d.ts +2 -1
  111. package/dist/adapters/vitest/run-dry.js +1 -1
  112. package/dist/adapters/vitest/run-plan.d.ts +10 -8
  113. package/dist/adapters/vitest/run-plan.js +1 -1
  114. package/dist/adapters/vitest/run-specifications.d.ts +9 -2
  115. package/dist/adapters/vitest/run-specifications.js +22 -12
  116. package/dist/adapters/vitest/runner.d.ts +60 -29
  117. package/dist/adapters/vitest/runner.js +109 -86
  118. package/dist/adapters/vitest/start-vitest-session.d.ts +5 -1
  119. package/dist/adapters/vitest/start-vitest-session.js +64 -59
  120. package/dist/adapters/vitest/stop-hung-worker.d.ts +11 -4
  121. package/dist/adapters/vitest/stop-hung-worker.js +20 -7
  122. package/dist/adapters/vitest/types/mootant-forks-pool.d.ts +47 -0
  123. package/dist/adapters/vitest/types/vitest-session-state.d.ts +9 -8
  124. package/dist/adapters/vitest/types/vitest-worker.d.ts +48 -33
  125. package/dist/adapters/vitest/wait-for-workers.d.ts +5 -2
  126. package/dist/adapters/vitest/wait-for-workers.js +15 -15
  127. package/dist/adapters/vitest/worker/track-meta-defines.d.ts +39 -0
  128. package/dist/adapters/vitest/worker/track-meta-defines.js +23 -0
  129. package/dist/adapters/vitest/worker/track-values.d.ts +38 -0
  130. package/dist/adapters/vitest/worker/track-values.js +45 -0
  131. package/dist/adapters/vitest/worker/value-prefixes.d.ts +12 -0
  132. package/dist/adapters/vitest/worker/value-prefixes.js +6 -0
  133. package/dist/adapters/vitest/worker/wait-for-turn.d.ts +8 -6
  134. package/dist/adapters/vitest/worker/watch-property.d.ts +17 -0
  135. package/dist/adapters/vitest/worker/watch-property.js +27 -0
  136. package/dist/cli/create-run-progress.d.ts +8 -1
  137. package/dist/cli/create-run-progress.js +4 -1
  138. package/dist/cli/ensure-exit.d.ts +11 -0
  139. package/dist/cli/ensure-exit.js +15 -0
  140. package/dist/cli/html/build-html-report.js +1 -0
  141. package/dist/cli/html/client/main.js +1 -1
  142. package/dist/cli/html/client/render-overview.d.ts +3 -3
  143. package/dist/cli/index.d.ts +1 -0
  144. package/dist/cli/index.js +3 -2
  145. package/dist/cli/parse-arguments.d.ts +4 -0
  146. package/dist/cli/parse-arguments.js +4 -1
  147. package/dist/cli/report/build-run-report.js +1 -0
  148. package/dist/cli/report/format-command.d.ts +5 -0
  149. package/dist/cli/report/format-command.js +1 -1
  150. package/dist/cli/report/format-run-text-report.d.ts +5 -4
  151. package/dist/cli/report/format-run-text-report.js +10 -10
  152. package/dist/cli/report/slim-run-report.d.ts +10 -10
  153. package/dist/cli/report/slim-run-report.js +1 -0
  154. package/dist/cli/run-mutation.d.ts +5 -1
  155. package/dist/cli/run-mutation.js +32 -24
  156. package/dist/cli/terminal/create-spinner.d.ts +1 -2
  157. package/dist/cli/terminal/create-spinner.js +23 -32
  158. package/dist/cli/watch-interrupts.d.ts +41 -0
  159. package/dist/cli/watch-interrupts.js +32 -0
  160. package/dist/core/cache/apply-cached-units.d.ts +8 -7
  161. package/dist/core/cache/build-hash.d.ts +9 -0
  162. package/dist/core/cache/build-hash.js +2 -0
  163. package/dist/core/cache/cache-version.d.ts +4 -4
  164. package/dist/core/cache/check-dry-snapshot.d.ts +25 -0
  165. package/dist/core/cache/check-dry-snapshot.js +13 -0
  166. package/dist/core/cache/create-dry-reuse-miss.d.ts +12 -0
  167. package/dist/core/cache/create-dry-reuse-miss.js +7 -0
  168. package/dist/core/cache/create-dry-snapshot.d.ts +71 -0
  169. package/dist/core/cache/create-dry-snapshot.js +27 -0
  170. package/dist/core/cache/create-run-cache.d.ts +20 -2
  171. package/dist/core/cache/create-run-cache.js +31 -22
  172. package/dist/core/cache/create-snapshot-session.d.ts +12 -0
  173. package/dist/core/cache/create-snapshot-session.js +19 -0
  174. package/dist/core/cache/get-build-id.d.ts +11 -0
  175. package/dist/core/cache/get-build-id.js +7 -0
  176. package/dist/core/cache/get-cache-path.d.ts +1 -1
  177. package/dist/core/cache/get-cache-path.js +1 -1
  178. package/dist/core/cache/get-dry-snapshot-key.d.ts +47 -0
  179. package/dist/core/cache/get-dry-snapshot-key.js +43 -0
  180. package/dist/core/cache/get-dry-snapshot-path.d.ts +9 -0
  181. package/dist/core/cache/get-dry-snapshot-path.js +5 -0
  182. package/dist/core/cache/get-environment-key.d.ts +9 -4
  183. package/dist/core/cache/get-environment-key.js +3 -2
  184. package/dist/core/cache/get-test-file-keys.d.ts +2 -1
  185. package/dist/core/cache/get-test-file-keys.js +11 -10
  186. package/dist/core/cache/hash-files.d.ts +8 -7
  187. package/dist/core/cache/hash-files.js +17 -11
  188. package/dist/core/cache/hash-project-tree.d.ts +22 -0
  189. package/dist/core/cache/hash-project-tree.js +69 -0
  190. package/dist/core/cache/is-dry-reuse-miss.d.ts +8 -0
  191. package/dist/core/cache/is-dry-reuse-miss.js +4 -0
  192. package/dist/core/cache/list-file-hashes.d.ts +4 -0
  193. package/dist/core/cache/list-file-hashes.js +5 -2
  194. package/dist/core/cache/list-install-states.d.ts +12 -0
  195. package/dist/core/cache/list-install-states.js +19 -0
  196. package/dist/core/cache/list-variable-hashes.d.ts +15 -0
  197. package/dist/core/cache/list-variable-hashes.js +14 -0
  198. package/dist/core/cache/prepare-run-cache.d.ts +48 -22
  199. package/dist/core/cache/prepare-run-cache.js +86 -73
  200. package/dist/core/cache/read-dry-snapshot.d.ts +10 -0
  201. package/dist/core/cache/read-dry-snapshot.js +15 -0
  202. package/dist/core/cache/read-run-cache.js +6 -2
  203. package/dist/core/cache/save-dry-snapshot.d.ts +34 -0
  204. package/dist/core/cache/save-dry-snapshot.js +32 -0
  205. package/dist/core/cache/volatile-variables.d.ts +7 -0
  206. package/dist/core/cache/volatile-variables.js +11 -0
  207. package/dist/core/cache/write-run-cache.js +1 -1
  208. package/dist/core/config/load-typescript-config.d.ts +6 -1
  209. package/dist/core/config/load-typescript-config.js +26 -10
  210. package/dist/core/config/prepare-run.d.ts +7 -3
  211. package/dist/core/config/prepare-run.js +1 -0
  212. package/dist/core/config/resolve-run-settings.d.ts +3 -2
  213. package/dist/core/config/resolve-run-settings.js +1 -0
  214. package/dist/core/config/validate-config.js +3 -2
  215. package/dist/core/files/get-package-manifest.d.ts +12 -0
  216. package/dist/core/files/get-package-manifest.js +7 -0
  217. package/dist/core/generate/collect-candidates.d.ts +5 -1
  218. package/dist/core/generate/collect-candidates.js +125 -97
  219. package/dist/core/generate/generate-file-mutants.js +6 -5
  220. package/dist/core/index.d.ts +18 -0
  221. package/dist/core/mutators/shared/get-branch-copy-skip.d.ts +2 -2
  222. package/dist/core/mutators/shared/get-comparison-plan.d.ts +2 -2
  223. package/dist/core/mutators/shared/get-default-option-skip.d.ts +2 -2
  224. package/dist/core/mutators/shared/get-group-constant.d.ts +2 -2
  225. package/dist/core/mutators/shared/get-literal-skip.d.ts +3 -3
  226. package/dist/core/mutators/shared/get-loop-running-skip.d.ts +2 -2
  227. package/dist/core/mutators/shared/get-nullish-swap-skip.d.ts +2 -2
  228. package/dist/core/mutators/shared/get-or-default-skip.d.ts +2 -2
  229. package/dist/core/mutators/shared/get-owned-constants.d.ts +2 -2
  230. package/dist/core/mutators/shared/leave-now-skip.d.ts +2 -2
  231. package/dist/core/mutators/shared/no-op-callback-skip.d.ts +2 -2
  232. package/dist/core/plugins/create-mutator-registry.d.ts +4 -2
  233. package/dist/core/plugins/create-mutator-registry.js +15 -5
  234. package/dist/core/plugins/validate-plugin.d.ts +3 -3
  235. package/dist/core/plugins/validate-plugin.js +32 -10
  236. package/dist/core/regex/collect-pattern-changes.d.ts +2 -2
  237. package/dist/core/regex/create-regex-replacement.d.ts +2 -2
  238. package/dist/core/run/apply-isolated-result.d.ts +22 -14
  239. package/dist/core/run/apply-isolated-result.js +45 -26
  240. package/dist/core/run/count-run.d.ts +2 -1
  241. package/dist/core/run/create-run-state.d.ts +5 -0
  242. package/dist/core/run/create-run-state.js +1 -0
  243. package/dist/core/run/create-work-directory.d.ts +4 -1
  244. package/dist/core/run/create-work-directory.js +15 -12
  245. package/dist/core/run/decide-evidence.d.ts +4 -3
  246. package/dist/core/run/get-unit-evidence.d.ts +13 -7
  247. package/dist/core/run/get-unit-evidence.js +1 -1
  248. package/dist/core/run/guard-session.d.ts +18 -0
  249. package/dist/core/run/guard-session.js +30 -0
  250. package/dist/core/run/live-work-directories.d.ts +5 -0
  251. package/dist/core/run/live-work-directories.js +2 -0
  252. package/dist/core/run/read-isolated-unit.d.ts +6 -3
  253. package/dist/core/run/read-isolated-unit.js +77 -38
  254. package/dist/core/run/remove-live-work-directories.d.ts +7 -0
  255. package/dist/core/run/remove-live-work-directories.js +12 -0
  256. package/dist/core/run/run-isolated-rounds.d.ts +16 -12
  257. package/dist/core/run/run-isolated-rounds.js +3 -2
  258. package/dist/core/run/validate-adapter.d.ts +1 -1
  259. package/dist/core/run/validate-adapter.js +1 -1
  260. package/dist/core/run-mutants.d.ts +34 -2
  261. package/dist/core/run-mutants.js +356 -216
  262. package/dist/core/skips/skip-rules.d.ts +3 -1
  263. package/dist/package.js +1 -1
  264. package/dist/types/adapter/adapter-context.d.ts +20 -0
  265. package/dist/types/adapter/adapter-session.d.ts +2 -1
  266. package/dist/types/adapter/cache-inputs.d.ts +3 -2
  267. package/dist/types/adapter/dry-file.d.ts +4 -2
  268. package/dist/types/adapter/isolated-plan.d.ts +2 -1
  269. package/dist/types/adapter/isolated-result.d.ts +3 -1
  270. package/dist/types/adapter/run-inputs.d.ts +5 -4
  271. package/dist/types/adapter/test-adapter.d.ts +7 -0
  272. package/dist/types/cache/cache-entry.d.ts +9 -7
  273. package/dist/types/cache/cached-inputs.d.ts +2 -2
  274. package/dist/types/cache/dry-snapshot.d.ts +76 -0
  275. package/dist/types/cache/project-tree.d.ts +16 -0
  276. package/dist/types/cache/run-cache-file.d.ts +1 -1
  277. package/dist/types/cache/run-cache.d.ts +6 -5
  278. package/dist/types/config/plugin.d.ts +11 -2
  279. package/dist/types/config/run-config.d.ts +10 -0
  280. package/dist/types/config/run-settings.d.ts +6 -0
  281. package/dist/types/mutant/core-note.d.ts +12 -0
  282. package/dist/types/mutant/diagnostic.d.ts +1 -0
  283. package/dist/types/mutant/registered-skip-rule.d.ts +11 -0
  284. package/dist/types/mutant/skip-note.d.ts +7 -6
  285. package/dist/types/mutant/skip-rule-id.d.ts +3 -2
  286. package/dist/types/mutant/skip-rule.d.ts +2 -1
  287. package/dist/types/mutant/skipped-candidate.d.ts +14 -7
  288. package/dist/types/mutant/skipped-mutant.d.ts +6 -6
  289. package/dist/types/mutator/mutator.d.ts +3 -2
  290. package/dist/types/mutator/registered-mutator.d.ts +8 -0
  291. package/dist/types/regex/regex-change.d.ts +2 -2
  292. package/dist/types/report/html-report.d.ts +3 -2
  293. package/dist/types/report/list-report-skipped.d.ts +3 -2
  294. package/dist/types/report/run-report.d.ts +11 -2
  295. package/dist/types/report/slim-run-report.d.ts +1 -1
  296. package/dist/types/run/isolated-evidence.d.ts +3 -2
  297. package/dist/types/run/isolated-reason.d.ts +2 -1
  298. package/dist/types/run/run-durations.d.ts +8 -3
  299. package/dist/types/run/run-event.d.ts +10 -7
  300. package/dist/types/run/run-result.d.ts +11 -2
  301. package/dist/types/run/run-state.d.ts +21 -0
  302. package/dist/types/run/try-cause.d.ts +2 -1
  303. package/package.json +1 -1
  304. package/readme.md +85 -68
  305. package/skills/mootant/SKILL.md +36 -19
  306. package/skills/mootant/references/mutators.md +29 -23
  307. package/dist/adapters/node-test/list-flag-values.js +0 -9
  308. /package/dist/adapters/{node-test → shared}/loader-flags.d.ts +0 -0
  309. /package/dist/adapters/{node-test → shared}/loader-flags.js +0 -0
  310. /package/dist/{adapters/shared → core/files}/list-package-files.d.ts +0 -0
  311. /package/dist/{adapters/shared → core/files}/list-package-files.js +0 -0
  312. /package/dist/{adapters/shared → core/files}/read-package-type.d.ts +0 -0
  313. /package/dist/{adapters/shared → core/files}/read-package-type.js +0 -0
@@ -119,7 +119,11 @@ interface CandidateCollection {
119
119
  * only it knows which link it removes. A replacement that a visitor marks as
120
120
  * skipped is never validated and never becomes a candidate; on request it is
121
121
  * collected with its rule, like dropped and invalid replacements, so that
122
- * skipped replacements never change the candidates. In a template only
122
+ * skipped replacements never change the candidates. Its rule is checked in
123
+ * every run: it is one of the skip rules of the mutator's plugin, else a
124
+ * built-in rule (see `findSkipRule`); a skip with any other rule is a mutator
125
+ * error, and its replacement is dropped. Rules of the collection itself, such
126
+ * as a timer delay, are built-in rules whatever the mutator. In a template only
123
127
  * expressions are replaced: a replacement of a statement, a declaration or a
124
128
  * node of the synthetic module around the template code is dropped without a
125
129
  * trace, and every candidate has the scope `<template>`. A replacement in a Vue
@@ -5,49 +5,61 @@ import { findCompilerPins as r } from "../syntax/find-compiler-pins.js";
5
5
  import { removeListElement as i } from "../text/remove-list-element.js";
6
6
  import { readLiteralType as a } from "../syntax/read-literal-type.js";
7
7
  import { validateReplacement as o } from "./validate-replacement.js";
8
- import { findIgnoreRule as s } from "../ignore/find-ignore-rule.js";
9
- import { getReplacementKind as c } from "./get-replacement-kind.js";
10
- import { parseExpression as l } from "../text/parse-expression.js";
11
- import { getScopePath as u } from "../identity/get-scope-path.js";
12
- import { groupReplacement as d } from "./group-replacement.js";
13
- import { fitTemplateText as f } from "./fit-template-text.js";
14
- import { findListRemoval as p } from "./find-list-removal.js";
15
- import { getMutantSite as m } from "./get-mutant-site.js";
16
- import { getSlot as h } from "../tree/get-slot.js";
17
- import { pickFocus as g } from "./pick-focus.js";
18
- const _ = {
8
+ import { findClosestName as s } from "../text/find-closest-name.js";
9
+ import { findIgnoreRule as c } from "../ignore/find-ignore-rule.js";
10
+ import { getReplacementKind as l } from "./get-replacement-kind.js";
11
+ import { parseExpression as u } from "../text/parse-expression.js";
12
+ import { getScopePath as d } from "../identity/get-scope-path.js";
13
+ import { groupReplacement as f } from "./group-replacement.js";
14
+ import { fitTemplateText as p } from "./fit-template-text.js";
15
+ import { findListRemoval as m } from "./find-list-removal.js";
16
+ import { getMutantSite as h } from "./get-mutant-site.js";
17
+ import { skipRules as g } from "../skips/skip-rules.js";
18
+ import { getSlot as _ } from "../tree/get-slot.js";
19
+ import { pickFocus as v } from "./pick-focus.js";
20
+ const y = {
19
21
  reason: "it only changes a timer delay",
20
22
  rule: "timer-delay"
21
23
  };
22
- function v(v) {
23
- let { services: S, parsed: C, rules: w, tree: T } = v, E = C.language === "typescript" ? "ts" : "js", D = [], O = [], k = [];
24
- function A(e, t, n) {
25
- if (v.skipped) {
26
- let { by: r } = n;
27
- k.push({
28
- by: r ? {
29
- start: r.node.start,
30
- mutator: r.mutator,
24
+ function b(s) {
25
+ let { services: b, parsed: E, rules: D, tree: O } = s, k = E.language === "typescript" ? "ts" : "js", A = [], j = [], M = [];
26
+ function N(e, t, n) {
27
+ if (s.skipped) {
28
+ let { rule: r, by: i } = n;
29
+ M.push({
30
+ by: i ? {
31
+ start: i.node.start,
32
+ mutator: i.mutator,
31
33
  id: null
32
34
  } : null,
33
- heuristic: n.heuristic === !0,
34
- emission: k.length,
35
+ heuristic: r.heuristic || n.heuristic === !0,
36
+ emission: M.length,
37
+ category: r.category,
35
38
  start: t.start,
36
39
  reason: n.reason,
37
40
  kind: t.kind,
38
41
  text: t.text,
39
42
  end: t.end,
40
- rule: n.rule,
43
+ rule: r.id,
41
44
  registered: e,
42
- ...g(t)
45
+ ...v(t)
43
46
  });
44
47
  }
45
48
  }
46
- function j(e, n, r) {
49
+ function P(e, t, n) {
50
+ N(e, t, {
51
+ ...n,
52
+ rule: {
53
+ ...g[n.rule],
54
+ id: n.rule
55
+ }
56
+ });
57
+ }
58
+ function F(e, n, r) {
47
59
  if (r?.narrow) {
48
60
  let { start: e, end: i } = n.node;
49
61
  return {
50
- ...t(C, r.list, r.index),
62
+ ...t(E, r.list, r.index),
51
63
  list: {
52
64
  start: r.list.start,
53
65
  end: r.list.end
@@ -62,147 +74,151 @@ function v(v) {
62
74
  };
63
75
  }
64
76
  let a = r === null ? n : {
65
- text: i(C, r.list, r.index),
77
+ text: i(E, r.list, r.index),
66
78
  node: r.list
67
- }, { node: o, text: s } = d(a, {
68
- parsed: C,
69
- tree: T
79
+ }, { node: o, text: s } = f(a, {
80
+ parsed: E,
81
+ tree: O
70
82
  }, e.id.includes("/"));
71
83
  return {
72
- kind: c(o),
84
+ kind: l(o),
73
85
  start: o.start,
74
86
  end: o.end,
75
87
  text: s,
76
- ...g(a)
88
+ ...v(a)
77
89
  };
78
90
  }
79
- function M(e, t) {
80
- let { syntax: n } = S;
91
+ function I(e, t) {
92
+ let { syntax: n } = b;
81
93
  if (!n.isRuntimeNode(e) || !n.isTimerDelay(e)) return !1;
82
94
  let r = a(e);
83
95
  if (r === null) return !1;
84
- let i = l(t, E);
96
+ let i = u(t, k);
85
97
  return i !== null && a(i) === r;
86
98
  }
87
- function N(e, t) {
88
- if (e.kind !== "element" && e.kind !== "property") return f(e.text, t, E);
89
- let n = C.text.slice(e.start - 1, e.start) + C.text.slice(e.end, e.end + 1), r = f(n, t, E);
99
+ function L(e, t) {
100
+ if (e.kind !== "element" && e.kind !== "property") return p(e.text, t, k);
101
+ let n = E.text.slice(e.start - 1, e.start) + E.text.slice(e.end, e.end + 1), r = p(n, t, k);
90
102
  return r.kind === "fit" ? {
91
103
  text: e.text,
92
104
  kind: "fit"
93
105
  } : r;
94
106
  }
95
- function P(e, t, r) {
96
- let i = p(T, r, L), a = i?.list ?? r.node;
97
- if (I !== null && (I.has(a) || c(a) !== "expression")) return;
98
- let l = i !== null && !i.narrow && i.copies > 8;
99
- l && i !== null && (i = {
107
+ function R(e, t, r) {
108
+ let i = m(O, r, V), a = i?.list ?? r.node;
109
+ if (B !== null && (B.has(a) || l(a) !== "expression")) return;
110
+ let u = i !== null && !i.narrow && i.copies > 8;
111
+ u && i !== null && (i = {
100
112
  ...i,
101
113
  narrow: !0
102
114
  });
103
- let d = j(e, r, i);
115
+ let f = F(e, r, i);
104
116
  if (r.skip) {
105
- A(e, d, M(a, d.text) ? _ : r.skip);
117
+ let { rule: n } = r.skip, i = w(e, n);
118
+ i === null ? A.push(C(E, t, S(e, n))) : I(a, f.text) ? P(e, f, y) : N(e, f, {
119
+ ...r.skip,
120
+ rule: i
121
+ });
106
122
  return;
107
123
  }
108
- let f = i === null && r.text === "" && d.kind === "expression", h = f ? `returned an empty text for a ${a.type} node; only an element of an array literal or a member of an object literal is removed with an empty text.` : o(T, a, d);
109
- if (h !== null) {
110
- D.push(b(C, t, `Mutator "${e.id}" ${h}`)), A(e, f ? {
111
- ...d,
124
+ let p = i === null && r.text === "" && f.kind === "expression", g = p ? `returned an empty text for a ${a.type} node; only an element of an array literal or a member of an object literal is removed with an empty text.` : o(O, a, f);
125
+ if (g !== null) {
126
+ A.push(C(E, t, `Mutator "${e.id}" ${g}`)), P(e, p ? {
127
+ ...f,
112
128
  text: ""
113
- } : d, {
114
- reason: `the mutator ${h.slice(0, -1)}`,
129
+ } : f, {
130
+ reason: `the mutator ${g.slice(0, -1)}`,
115
131
  rule: "invalid-target"
116
132
  });
117
133
  return;
118
134
  }
119
- let { start: y, end: E } = a, k = F.find((e) => y <= e.start && e.end <= E && e.region.start <= y && E <= e.region.end);
135
+ let { start: _, end: x } = a, k = z.find((e) => _ <= e.start && e.end <= x && e.region.start <= _ && x <= e.region.end);
120
136
  if (k) {
121
- A(e, d, {
137
+ P(e, f, {
122
138
  rule: "compiler-macro",
123
139
  reason: k.reason
124
140
  });
125
141
  return;
126
142
  }
127
- let P = v.expressions?.findLast((e) => e.start <= y)?.delimiter, R = P === void 0 ? {
143
+ let M = s.expressions?.findLast((e) => e.start <= _)?.delimiter, R = M === void 0 ? {
128
144
  kind: "fit",
129
- text: d.text
130
- } : N(d, P);
145
+ text: f.text
146
+ } : L(f, M);
131
147
  if (R.kind === "unfit") {
132
- A(e, d, {
148
+ P(e, f, {
133
149
  rule: "template-text",
134
150
  reason: R.reason
135
151
  });
136
152
  return;
137
153
  }
138
- if (M(a, d.text)) {
139
- A(e, d, _);
154
+ if (I(a, f.text)) {
155
+ P(e, f, y);
140
156
  return;
141
157
  }
142
- if (!S.settings.timeouts && e.id !== "optional-chaining" && S.syntax.isLoopAdvanceValue(a)) {
143
- A(e, d, {
158
+ if (!b.settings.timeouts && e.id !== "optional-chaining" && b.syntax.isLoopAdvanceValue(a)) {
159
+ P(e, f, {
144
160
  reason: "it changes the value that advances a loop, so it may keep the loop running forever",
145
161
  rule: "loop-advance"
146
162
  });
147
163
  return;
148
164
  }
149
- if (l) {
150
- A(e, d, {
151
- reason: `removing it takes a copy of the whole literal, which Mootant does not make for a literal with more than 8 such ${d.kind === "element" ? "elements" : "members"}`,
165
+ if (u) {
166
+ P(e, f, {
167
+ reason: `removing it takes a copy of the whole literal, which Mootant does not make for a literal with more than 8 such ${f.kind === "element" ? "elements" : "members"}`,
152
168
  rule: "literal-copies"
153
169
  });
154
170
  return;
155
171
  }
156
- let z = d.kind === "element" || d.kind === "property" ? {
157
- focus: d.focus,
158
- kind: d.kind,
159
- list: d.list
172
+ let H = f.kind === "element" || f.kind === "property" ? {
173
+ focus: f.focus,
174
+ kind: f.kind,
175
+ list: f.list
160
176
  } : {
161
- kind: d.kind,
162
- ...g(d)
163
- }, B = m({
164
- ...z,
165
- start: d.start
177
+ kind: f.kind,
178
+ ...v(f)
179
+ }, U = h({
180
+ ...H,
181
+ start: f.start
166
182
  });
167
- O.push({
168
- ignoreRule: s(w, {
169
- line: n(C.lineStarts, B).line,
183
+ j.push({
184
+ ignoreRule: c(D, {
185
+ line: n(E.lineStarts, U).line,
170
186
  mutator: e.id,
171
- start: B
187
+ start: U
172
188
  }),
173
- scope: I === null ? u(T, a) : "<template>",
174
- solitary: x(r.solitary),
175
- emission: O.length,
176
- start: d.start,
177
- end: d.end,
189
+ scope: B === null ? d(O, a) : "<template>",
190
+ solitary: T(r.solitary),
191
+ emission: j.length,
192
+ start: f.start,
193
+ end: f.end,
178
194
  text: R.text,
179
195
  registered: e,
180
- ...z
196
+ ...H
181
197
  });
182
198
  }
183
- let F = r(T, C.file), I = v.hosts ?? null, L = I !== null && e(C.file) === "svelte", R = y(v, D);
184
- for (let e of T.order) {
185
- let t = R.get(e.type);
199
+ let z = r(O, E.file), B = s.hosts ?? null, V = B !== null && e(E.file) === "svelte", H = x(s, A);
200
+ for (let e of O.order) {
201
+ let t = H.get(e.type);
186
202
  if (!t) continue;
187
- let { parent: n } = h(T, e);
203
+ let { parent: n } = _(O, e);
188
204
  for (let { registered: r, visit: i } of t) {
189
205
  let t;
190
206
  try {
191
207
  t = i(e, n);
192
208
  } catch (t) {
193
- D.push(b(C, e, `Mutator "${r.id}" failed on ${e.type}: ${t.message}`));
209
+ A.push(C(E, e, `Mutator "${r.id}" failed on ${e.type}: ${t.message}`));
194
210
  continue;
195
211
  }
196
- for (let n of t) P(r, e, n);
212
+ for (let n of t) R(r, e, n);
197
213
  }
198
214
  }
199
215
  return {
200
- diagnostics: D,
201
- candidates: O,
202
- skipped: k
216
+ diagnostics: A,
217
+ candidates: j,
218
+ skipped: M
203
219
  };
204
220
  }
205
- function y(e, t) {
221
+ function x(e, t) {
206
222
  let { services: n, mutators: r, parsed: i } = e, a = /* @__PURE__ */ new Map();
207
223
  for (let e of r) {
208
224
  let r;
@@ -214,7 +230,7 @@ function y(e, t) {
214
230
  file: i.file
215
231
  });
216
232
  } catch (n) {
217
- t.push(b(i, null, `Mutator "${e.id}" failed while preparing the file: ${n.message}`));
233
+ t.push(C(i, null, `Mutator "${e.id}" failed while preparing the file: ${n.message}`));
218
234
  continue;
219
235
  }
220
236
  for (let [t, n] of Object.entries(r)) {
@@ -227,7 +243,13 @@ function y(e, t) {
227
243
  }
228
244
  return a;
229
245
  }
230
- function b(e, t, r) {
246
+ function S(e, t) {
247
+ let n = `Mutator "${e.id}" returned a skip`;
248
+ if (typeof t != "string") return `${n} whose rule is not a string.`;
249
+ let r = `${n} with the unknown rule "${t}".`, i = s(t.slice(t.lastIndexOf("/") + 1), [...e.skipRules?.keys() ?? [], ...Object.keys(g)]);
250
+ return i === null ? e.skipRules ? `${r} Declare it in the skipRules of its plugin.` : r : `${r} Did you mean "${i}"?`;
251
+ }
252
+ function C(e, t, r) {
231
253
  let i = t === null ? null : n(e.lineStarts, t.start);
232
254
  return {
233
255
  column: i?.column ?? null,
@@ -238,10 +260,16 @@ function b(e, t, r) {
238
260
  message: r
239
261
  };
240
262
  }
241
- function x(e) {
263
+ function w(e, t) {
264
+ return typeof t == "string" ? e.skipRules?.get(t) || (Object.hasOwn(g, t) ? {
265
+ ...g[t],
266
+ id: t
267
+ } : null) : null;
268
+ }
269
+ function T(e) {
242
270
  return !e || e.length === 0 ? null : e.map(({ start: e, end: t }) => ({
243
271
  start: e,
244
272
  end: t
245
273
  }));
246
274
  }
247
- export { v as collectCandidates };
275
+ export { b as collectCandidates };
@@ -80,7 +80,7 @@ function k(e, t) {
80
80
  text: e.text,
81
81
  kind: e.kind,
82
82
  end: e.end,
83
- heuristic: !1,
83
+ ...w[n.rule],
84
84
  ...E(e),
85
85
  ...n
86
86
  };
@@ -94,9 +94,9 @@ function k(e, t) {
94
94
  rule: "duplicate"
95
95
  }));
96
96
  return [...r, ...c].toSorted(v).map((e) => ({
97
- ...w[e.rule],
98
- heuristic: w[e.rule].heuristic || e.heuristic,
99
97
  mutator: e.registered.id,
98
+ heuristic: e.heuristic,
99
+ category: e.category,
100
100
  replacement: e.text,
101
101
  reason: e.reason,
102
102
  start: e.start,
@@ -190,16 +190,17 @@ function N(e, t, r) {
190
190
  };
191
191
  }
192
192
  function P(e) {
193
+ let t = "log-message";
193
194
  return {
194
195
  reason: e.kind === "block" ? "it only removes a log message" : "it only changes the text of a log message",
195
196
  registered: e.registered,
197
+ ...w[t],
196
198
  emission: e.emission,
197
199
  start: e.start,
198
200
  text: e.text,
199
201
  kind: e.kind,
200
- rule: "log-message",
201
202
  end: e.end,
202
- heuristic: !1,
203
+ rule: t,
203
204
  ...E(e),
204
205
  by: null
205
206
  };
@@ -1,6 +1,7 @@
1
1
  export type { IsolatedResult, IsolatedFacts, } from '../types/adapter/isolated-result.js';
2
2
  export type { BatchPlan, BatchUnit, BatchTest, } from '../types/adapter/batch-plan.js';
3
3
  export type { IsolatedPlan, IsolatedUnit } from '../types/adapter/isolated-plan.js';
4
+ export type { OperatorExpression } from '../types/syntax/operator-expression.js';
4
5
  export { resolveSwitchedText } from './instrument/resolve-switched-text.js';
5
6
  export type { MutatorVisitors } from '../types/mutator/mutator-visitors.js';
6
7
  export type { MutatorContext } from '../types/mutator/mutator-context.js';
@@ -9,23 +10,40 @@ export type { AdapterSession } from '../types/adapter/adapter-session.js';
9
10
  export type { AdapterContext } from '../types/adapter/adapter-context.js';
10
11
  export type { PresetSettings } from '../types/config/preset-settings.js';
11
12
  export type { DryRunRequest } from '../types/adapter/dry-run-request.js';
13
+ export type { ListExpression } from '../types/syntax/list-expression.js';
14
+ export type { SourcePosition } from '../types/source/source-position.js';
12
15
  export type { MutantRuntime } from '../types/adapter/mutant-runtime.js';
13
16
  export type { DryRunResult } from '../types/adapter/dry-run-result.js';
17
+ export type { SyntaxHelpers } from '../types/syntax/syntax-helpers.js';
14
18
  export type { SwitchedFile } from '../types/adapter/switched-file.js';
19
+ export type { SkipCategory } from '../types/mutant/skip-category.js';
15
20
  export type { MutatorMeta } from '../types/mutator/mutator-meta.js';
16
21
  export type { BatchResult } from '../types/adapter/batch-result.js';
17
22
  export type { TestAdapter } from '../types/adapter/test-adapter.js';
23
+ export type { InferredType } from '../types/hints/inferred-type.js';
18
24
  export type { Replacement } from '../types/mutator/replacement.js';
25
+ export type { SourceRange } from '../types/source/source-range.js';
26
+ export type { SourceCode } from '../types/source/source-code.js';
27
+ export type { ValueBound } from '../types/syntax/value-bound.js';
19
28
  export type { TryLimits } from '../types/adapter/try-limits.js';
29
+ export type { TimerCall } from '../types/syntax/timer-call.js';
20
30
  export type { TryVerdict } from '../types/run/try-verdict.js';
21
31
  export type { TryFacts } from '../types/adapter/try-facts.js';
32
+ export type { TypeHints } from '../types/hints/type-hints.js';
33
+ export type { ValueKind } from '../types/hints/value-kind.js';
34
+ export type { SkipNote } from '../types/mutant/skip-note.js';
35
+ export type { TextEdit } from '../types/source/text-edit.js';
36
+ export type { SkipRule } from '../types/mutant/skip-rule.js';
37
+ export type { NodeSlot } from '../types/syntax/node-slot.js';
22
38
  export type { UnitEnd } from '../types/adapter/unit-end.js';
23
39
  export type { DryFile } from '../types/adapter/dry-file.js';
24
40
  export type { DryTest } from '../types/adapter/dry-test.js';
25
41
  export type { Mutator } from '../types/mutator/mutator.js';
26
42
  export type { TryCause } from '../types/run/try-cause.js';
43
+ export type { Binding } from '../types/syntax/binding.js';
27
44
  export { defineConfig } from './config/define-config.js';
28
45
  export type { Config } from '../types/config/config.js';
29
46
  export type { Plugin } from '../types/config/plugin.js';
30
47
  export type { Preset } from '../types/config/preset.js';
31
48
  export { classifyTry } from './run/classify-try.js';
49
+ export type * as AST from 'oxc-parser';
@@ -1,6 +1,6 @@
1
1
  import { Node } from 'oxc-parser';
2
2
  import { LiteralChange } from '../../../types/syntax/literal-change.js';
3
- import { SkipNote } from '../../../types/mutant/skip-note.js';
3
+ import { CoreNote } from '../../../types/mutant/core-note.js';
4
4
  import { RunContext } from './create-run-context.js';
5
5
  /**
6
6
  * Decides whether a literal mutant of a branch is skipped because it forces the
@@ -26,4 +26,4 @@ import { RunContext } from './create-run-context.js';
26
26
  * @param context - Mutator context with the test of mutants that will run.
27
27
  * @returns Rule and reason of the skip, or null when the mutant is emitted.
28
28
  */
29
- export declare function getBranchCopySkip(node: Node, replacement: LiteralChange, context: RunContext): SkipNote | null;
29
+ export declare function getBranchCopySkip(node: Node, replacement: LiteralChange, context: RunContext): CoreNote | null;
@@ -1,7 +1,7 @@
1
1
  import { PrivateInExpression, BinaryExpression } from 'oxc-parser';
2
2
  import { MutatorContext } from '../../../types/mutator/mutator-context.js';
3
3
  import { Replacement } from '../../../types/mutator/replacement.js';
4
- import { SkipNote } from '../../../types/mutant/skip-note.js';
4
+ import { CoreNote } from '../../../types/mutant/core-note.js';
5
5
  /**
6
6
  * Entries comparison-operator emits for a comparison, and those it skips.
7
7
  */
@@ -12,7 +12,7 @@ export interface ComparisonPlan {
12
12
  * that a lower bound leaves equal to the constant, or the lower bound itself
13
13
  * when it makes every input where the constant differs impossible.
14
14
  */
15
- skippedConstants: Map<boolean, SkipNote>;
15
+ skippedConstants: Map<boolean, CoreNote>;
16
16
  /**
17
17
  * Entries that are emitted, in emission order.
18
18
  */
@@ -1,6 +1,6 @@
1
1
  import { ObjectPropertyKind, ObjectExpression } from 'oxc-parser';
2
2
  import { MutatorContext } from '../../../types/mutator/mutator-context.js';
3
- import { SkipNote } from '../../../types/mutant/skip-note.js';
3
+ import { CoreNote } from '../../../types/mutant/core-note.js';
4
4
  /**
5
5
  * Decides whether the removal of a member of an object literal is skipped
6
6
  * because the member sets an option of an `Intl` constructor to its default,
@@ -22,4 +22,4 @@ import { SkipNote } from '../../../types/mutant/skip-note.js';
22
22
  * @param context - Mutator context.
23
23
  * @returns Rule and reason of the skip, or null when the removal is emitted.
24
24
  */
25
- export declare function getDefaultOptionSkip(property: ObjectPropertyKind, node: ObjectExpression, context: MutatorContext): SkipNote | null;
25
+ export declare function getDefaultOptionSkip(property: ObjectPropertyKind, node: ObjectExpression, context: MutatorContext): CoreNote | null;
@@ -1,5 +1,5 @@
1
1
  import { LogicalExpression } from 'oxc-parser';
2
- import { SkipNote } from '../../../types/mutant/skip-note.js';
2
+ import { CoreNote } from '../../../types/mutant/core-note.js';
3
3
  import { RunContext } from './create-run-context.js';
4
4
  /**
5
5
  * Whether logical-operator gives a group its absorbing constant.
@@ -8,7 +8,7 @@ export interface GroupConstant {
8
8
  /**
9
9
  * Why the constant is not emitted on a node that could have it, or null.
10
10
  */
11
- skip: SkipNote | null;
11
+ skip: CoreNote | null;
12
12
  /**
13
13
  * Whether the constant is emitted.
14
14
  */
@@ -1,6 +1,6 @@
1
1
  import { Node } from 'oxc-parser';
2
2
  import { LiteralChange } from '../../../types/syntax/literal-change.js';
3
- import { SkipNote } from '../../../types/mutant/skip-note.js';
3
+ import { CoreNote } from '../../../types/mutant/core-note.js';
4
4
  import { RunContext } from './create-run-context.js';
5
5
  /**
6
6
  * Change of a literal and the rules of its own mutator.
@@ -10,7 +10,7 @@ interface LiteralSkipQuery {
10
10
  * Rules of the literal's own mutator, checked after the operand and error
11
11
  * message rules; omitted when the mutator has none.
12
12
  */
13
- getOwnSkip?(): SkipNote | null;
13
+ getOwnSkip?(): CoreNote | null;
14
14
  /**
15
15
  * New value of the literal, or new text of a template with expressions.
16
16
  */
@@ -34,5 +34,5 @@ interface LiteralSkipQuery {
34
34
  * @param context - Mutator context with the test of mutants that will run.
35
35
  * @returns Rule and reason of the skip, or null when no rule skips the change.
36
36
  */
37
- export declare function getLiteralSkip(node: Node, query: LiteralSkipQuery, context: RunContext): SkipNote | null;
37
+ export declare function getLiteralSkip(node: Node, query: LiteralSkipQuery, context: RunContext): CoreNote | null;
38
38
  export {};
@@ -1,4 +1,4 @@
1
- import { SkipNote } from '../../../types/mutant/skip-note.js';
1
+ import { CoreNote } from '../../../types/mutant/core-note.js';
2
2
  /**
3
3
  * Builds the skip of a constant that gives a loop its running value, so the
4
4
  * loop may never end.
@@ -6,4 +6,4 @@ import { SkipNote } from '../../../types/mutant/skip-note.js';
6
6
  * @param value - Constant that keeps the loop running.
7
7
  * @returns Rule and reason of the skip.
8
8
  */
9
- export declare function getLoopRunningSkip(value: boolean): SkipNote;
9
+ export declare function getLoopRunningSkip(value: boolean): CoreNote;
@@ -1,6 +1,6 @@
1
1
  import { LogicalExpression } from 'oxc-parser';
2
2
  import { MutatorContext } from '../../../types/mutator/mutator-context.js';
3
- import { SkipNote } from '../../../types/mutant/skip-note.js';
3
+ import { CoreNote } from '../../../types/mutant/core-note.js';
4
4
  /**
5
5
  * Finds why the swap between `??` and `||` of a logical expression is not
6
6
  * emitted (catalog 4.8): under every `nullishSwap` mode it is equivalent when
@@ -13,4 +13,4 @@ import { SkipNote } from '../../../types/mutant/skip-note.js';
13
13
  * @param nullishSwap - The `nullishSwap` option of logical-operator.
14
14
  * @returns Rule and reason of the skip, or null when the swap is emitted.
15
15
  */
16
- export declare function getNullishSwapSkip(node: LogicalExpression, context: MutatorContext, nullishSwap: 'distinguishing' | 'always'): SkipNote | null;
16
+ export declare function getNullishSwapSkip(node: LogicalExpression, context: MutatorContext, nullishSwap: 'distinguishing' | 'always'): CoreNote | null;
@@ -1,5 +1,5 @@
1
1
  import { Node } from 'oxc-parser';
2
- import { SkipNote } from '../../../types/mutant/skip-note.js';
2
+ import { CoreNote } from '../../../types/mutant/core-note.js';
3
3
  import { LiteralValue } from './get-literal-value.js';
4
4
  import { RunContext } from './create-run-context.js';
5
5
  /**
@@ -15,4 +15,4 @@ import { RunContext } from './create-run-context.js';
15
15
  * @param context - Mutator context with the test of mutants that will run.
16
16
  * @returns Rule and reason of the skip, or null when the mutant is emitted.
17
17
  */
18
- export declare function getOrDefaultSkip(node: Node, value: LiteralValue, context: RunContext): SkipNote | null;
18
+ export declare function getOrDefaultSkip(node: Node, value: LiteralValue, context: RunContext): CoreNote | null;
@@ -1,6 +1,6 @@
1
1
  import { Node } from 'oxc-parser';
2
2
  import { MutatorContext } from '../../../types/mutator/mutator-context.js';
3
- import { SkipNote } from '../../../types/mutant/skip-note.js';
3
+ import { CoreNote } from '../../../types/mutant/core-note.js';
4
4
  /**
5
5
  * Finds the constants of a node that logical-operator owns (catalog 4.6, rule
6
6
  * 2, O3): both in a boolean-mode operand, an operand of a `&&` or `||` in
@@ -14,4 +14,4 @@ import { SkipNote } from '../../../types/mutant/skip-note.js';
14
14
  * @param context - Mutator context of the file.
15
15
  * @returns The skip of each owned constant.
16
16
  */
17
- export declare function getOwnedConstants(node: Node, context: MutatorContext): Map<boolean, SkipNote>;
17
+ export declare function getOwnedConstants(node: Node, context: MutatorContext): Map<boolean, CoreNote>;
@@ -1,6 +1,6 @@
1
- import { SkipNote } from '../../../types/mutant/skip-note.js';
1
+ import { CoreNote } from '../../../types/mutant/core-note.js';
2
2
  /**
3
3
  * Skip of the leave-now constant of a first exit test, which is the loop's
4
4
  * never-run mutant (catalog O13).
5
5
  */
6
- export declare const LEAVE_NOW_SKIP: SkipNote;
6
+ export declare const LEAVE_NOW_SKIP: CoreNote;
@@ -1,6 +1,6 @@
1
- import { SkipNote } from '../../../types/mutant/skip-note.js';
1
+ import { CoreNote } from '../../../types/mutant/core-note.js';
2
2
  /**
3
3
  * Skip of a mutant that makes a callback a no-op, which is method-call's
4
4
  * removal of the call (catalog O12).
5
5
  */
6
- export declare const NO_OP_CALLBACK_SKIP: SkipNote;
6
+ export declare const NO_OP_CALLBACK_SKIP: CoreNote;
@@ -5,13 +5,15 @@ import { Plugin } from '../../types/config/plugin.js';
5
5
  * plugins under their full ids. Mutators are ranked in canonical order: core
6
6
  * mutators by name, then the plugins by namespace and the mutators of each
7
7
  * plugin by name, so the order of object keys in plugin files never matters.
8
+ * Every mutator of a namespaced plugin gets the skip rules of its plugin, keyed
9
+ * by name, each with its full id; a built-in mutator gets none.
8
10
  *
9
11
  * @param core - Plugin of the built-in mutators and presets, without a
10
12
  * namespace.
11
13
  * @param plugins - Other plugins keyed by the namespace that prefixes their
12
14
  * ids.
13
15
  * @returns Mutators in rank order and presets, keyed by full id.
14
- * @throws Error - When a namespace, mutator name or preset name is not
15
- * kebab-case.
16
+ * @throws Error - When a namespace, mutator name, preset name or skip rule name
17
+ * is not kebab-case.
16
18
  */
17
19
  export declare function createMutatorRegistry(core: Plugin, plugins: Record<string, Plugin>): MutatorRegistry;