chore: bump mocha from 11.8.0 to 12.0.0 in /prqlc/bindings/js - #6277
Conversation
Bumps [mocha](https://github.com/mochajs/mocha) from 11.8.0 to 12.0.0. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](mochajs/mocha@v11.8.0...v12.0.0) --- updated-dependencies: - dependency-name: mocha dependency-version: 12.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
prql-bot
left a comment
There was a problem hiding this comment.
mocha 12 declares engines: { node: "^20.19.0 || >=22.12.0" } and ships as pure ESM ("type": "module"), with .cjs shims that require() those ESM modules — a pattern that only works on Node versions with require(esm) support. .github/workflows/test-js.yaml pins node-version: "21.x", which falls in the gap between those two ranges, so this bump takes the test-js job from green to a hard crash rather than a warning. npm only warns on EBADENGINE (no engine-strict in this repo), so npm ci succeeds and the failure surfaces at npm test.
Reproduced locally against mocha 12.0.0: ERR_REQUIRE_ESM at lib/cli/options.cjs under Node 21.7.3 (the final Node 21 release, which is what 21.x resolves to), and a clean pass under Node 22. npm cit in prqlc/bindings/js runs mocha tests, so all three test-js legs are affected — they were still in flight when I reviewed.
I've pushed the prerequisite Node pin bump (21.x → 24.x, matching .github/actions/build-js/action.yaml) onto this branch so the dependency bump can land on its own. Node 21 went EOL in June 2024, so the pin was overdue regardless. If you'd rather keep this PR to the dependency change alone, the workflow commit splits out cleanly.
Holding approval until CI is green at the new head.
Repro
$ npm install mocha@12.0.0
$ cat node_modules/mocha/package.json | jq '{type, engines}'
{ "type": "module", "engines": { "node": "^20.19.0 || >=22.12.0" } }
$ node-v21.7.3/bin/node node_modules/mocha/bin/mocha.js tests
/tmp/mochacheck/node_modules/mocha/lib/cli/options.cjs:12
const { parseMochaArgs } = require("./parse-args.js");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module .../lib/cli/parse-args.js from .../lib/cli/options.cjs not supported.
$ node --version && node node_modules/mocha/bin/mocha.js tests
v22.23.2
smoke
✔ works
1 passing (3ms)mocha 12 declares engines ^20.19.0 || >=22.12.0 and ships as pure ESM with .cjs shims that require() ESM, so it fails with ERR_REQUIRE_ESM on Node 21. Node 21 has also been EOL since June 2024. 24.x matches the pin already used by .github/actions/build-js.
Bumps mocha from 11.8.0 to 12.0.0.
Release notes
Sourced from mocha's releases.
... (truncated)
Changelog
Sourced from mocha's changelog.
... (truncated)
Commits
07c92f9chore(main): release 12.0.0 (#6217)219674fchore: setup Release Please for v12 stable (#6084)3bb317dfix: preserve FIFO descriptors when respawning (#6254)2962875fix: fixup parsing negative numbers and quoted strings (#6250)e6b9ee7docs: fix minor correctness issues (#6215)8720225docs: link to mochajs.org instead of the wiki (#6216)505b5e9chore(main): release 12.0.0-rc.6 (#6173)c54539fchore: fix esm-utils tests when run without coverage (#6160)dcc539achore(deps): update dependency@playwright/testto v1.62.1 (#6197)c2c6d63chore(deps): update dependency globals to v17.9.0 (#6201)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)