ci: ignore mocha semver-major updates - #255
Merged
Merged
Conversation
Mocha 12 declares engines "^20.19.0 || >=22.12.0" and its CLI entrypoint
uses import attributes (`with { type: "json" }`), so it cannot run on
Node 16 or 18 at all — the syntax is a parse error there.
Both versions are still first-class entries in the CI test matrix
([16.x, 18.x, 20.x, 22.x, 24.x]), and the compiler targets
@tsconfig/node16, so the package advertises support for them. Taking the
major fails those legs outright; dropping them from the matrix instead
would leave the package claiming support for runtimes it never exercises.
This mirrors the existing @types/node rule, which holds the same support
floor for the same reason. Raising that floor is a deliberate decision,
not something a routine dependency bump should force.
Note this must be a config rule rather than an `@dependabot ignore`
comment: those suppress exactly one major each, so they accumulate and a
fresh PR arrives with every subsequent release — precisely the problem
#240 cleaned up for @types/node.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Holds
mochaat 11.x so the package keeps testing the Node versions it claims to support.Why
Mocha 12 declares
engines: "^20.19.0 || >=22.12.0", and its CLI entrypoint uses import attributes:That is a parse error on Node 16 and 18 — not a soft warning, and not something a flag works around.
Both versions are still first-class entries in the CI matrix (
[16.x, 18.x, 20.x, 22.x, 24.x]), and the compiler targets@tsconfig/node16. So the package actively advertises support for them.The options, and why this one
Option 2 is the tempting one and the worst: untested support is more dangerous than either honest position, because the breakage surfaces in a consumer's environment rather than in CI.
Why a config rule, not a comment
An
@dependabot ignore this major versioncomment suppresses exactly one major. They accumulate, and a fresh PR lands with every subsequent release. Aversion-update:semver-majorrule holds the whole line.Revisiting
Deliberately reversible. When the support floor is raised, drop this rule and take mocha 12 in the same change — that keeps the engines bump, the matrix change and the tooling upgrade in one reviewable commit, which is exactly where that decision belongs.
Mirrors the existing
@types/noderule added in #240, which holds the same support floor for the same reason.Closes #253 once merged — Dependabot retires the superseded PR automatically.