Repository navigation
fix: fall back for Mocha configuration, and say so - #156
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Thanks, this fixes a real silent miss: on One change before merging: Also, This will need a rebase now that #155 is merged, since both change the same docs row. Leaving |
…orts it A change to .c8rc.js, ava.config.js, karma.conf.js or .mocharc.js reached no test through the graph, so the plan was SELECTIVE with nothing selected, no reason, and SAFE_TO_PROPOSE: a silent skip. CONFIG_PATTERNS only names the common configurations, so #142 and #156 fixed them one at a time. A JavaScript or TypeScript file with a configuration-style name (*.config.*, *.conf.*, .*rc.js) anywhere, or any one at the repository root, that no file imports and that reached no test now falls back with "Code that no file imports changed: <path>; a tool may load it by name". Declared inputs narrow it. An unused module under src/ still selects nothing, and an imported *.config.* module is still planned through its importers. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityankale190895 <[email protected]>
|
Update: you can skip the nested-case request. Following up on your This PR is still worth merging for the clearer "Mocha settings" reason. What's left: rebase onto |
A change to `.mocharc.json` fell back as an asset, and `.mocharc.js` was worse: it is code nothing imports, so the graph found no dependents and the plan was SELECTIVE with no tests at all. Both decide how the suite runs. `.mocharc` and `.mocharc.*` are now configuration, and the reason names them: `Tool configuration changed: Mocha settings (.mocharc.json); full validation required`. Fixes DiffCI#142 Signed-off-by: tyza66 <[email protected]>
e500dad to
f8a1bdf
Compare
|
Rebased onto
|
|
Thanks, reviewed
Nothing more needed from your side. |
|
Merged, thank you @tyza66. That's three merged PRs, and this one found more than it set out to: your You're credited for #144, #155 and #156 in the README, on diffci.com/contributors, and next to the If you'd like another one, |
Fixes #142, second half — the split you asked for after #144 merged.
.mocharc.jsonfell back as an asset, and.mocharc.jswas worse: it is code that nothing imports, sothe graph found no dependents and the plan was SELECTIVE with no tests at all. Both decide how the
suite runs, so a change has to fall back.
What changed
CONFIG_PATTERNSgains.mocharc(?:\.[^/]+)?, so every form Mocha reads is configuration:.mocharc,.mocharc.json,.mocharc.yml,.mocharc.js,.mocharc.cjs.toolConfigurationSubjectnames them:Tool configuration changed: Mocha settings (.mocharc.json); full validation required.Fixture (
tests/repo/mocharc-config-fallback.test.ts): four files plus the extensionless.mocharcin a real Mocha project — FULL, every test selected, nothing skipped, the named reason, no
Unknown changed file. One more case pins that a package's ownpackages/a/.mocharc.jsongets the samereason, since the pattern is name-anchored like the other configuration entries.
tests/repo/config-patterns.test.ts,release-files.jsonand thedocs/using-diffci.mdFallbackreasons table move with it.
Validation:
npm run typecheckandnpm run audit:boundary(384 files) pass;npm test1105 pass,the 8 failures being the same Rust/Cargo and Python end-to-end tests
mainfails on this machine. NoCHANGELOG edit; signed off.
.tool-versionsis not included:file-references.tsalready treats it as implicitly loaded, so itresolves by reference rather than through this reason path, and I did not want to change its behaviour
without your say-so. Happy to add it if you want it here.