Skip to content

Commit e250817

Browse files
dhensbyCopilot
andcommitted
ci: ignore mocha semver-major updates
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>
1 parent 94f31b2 commit e250817

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ updates:
5757
# is only moved when the support floor is raised.
5858
- dependency-name: "@types/node"
5959
update-types: ["version-update:semver-major"]
60+
# Mocha 12 declares engines "^20.19.0 || >=22.12.0" and uses import
61+
# attributes, so it cannot run on Node 16 or 18 — both of which are still
62+
# in the CI test matrix (see also @tsconfig/node16, and the @types/node
63+
# rule above, which holds the same floor). Taking the major would fail
64+
# those legs, and silently dropping them would leave the package claiming
65+
# support for runtimes it never tests. Move this when the support floor is
66+
# deliberately raised, not as a routine dependency bump.
67+
- dependency-name: "mocha"
68+
update-types: ["version-update:semver-major"]
6069
- package-ecosystem: "github-actions" # Keep workflow action versions up to date
6170
directory: "/"
6271
schedule:

0 commit comments

Comments
 (0)