Skip to content

Commit 7cda07e

Browse files
authored
Merge branch 'main' into print-helpful-error-in-worst-case
2 parents dd88210 + e68b9a6 commit 7cda07e

25 files changed

+810
-151
lines changed

.github/release-please/config.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"release-type": "node",
44
"include-component-in-tag": false,
55

6-
"prerelease": true,
7-
"versioning": "prerelease",
8-
96
"changelog-sections": [
107
{ "type": "feat", "section": "🌟 Features", "hidden": false },
118
{ "type": "fix", "section": "🩹 Fixes", "hidden": false },
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{".":"11.2.2"}
1+
{".":"11.6.0"}

.github/workflows/nightly-site-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Deploy `mochajs.org` branch nightly by hitting a netlify build URL.
22
# This updates the list of supporters
3+
# It uses commands from netlify.toml at root of repo
34

45
name: Nightly mochajs.org Deploy
56

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ jobs:
4545
- name: Install dependencies
4646
run: npm ci --ignore-scripts --force --no-fund --no-audit
4747

48-
- run: npm publish --provenance --access public --tag=next
48+
- run: npm publish --provenance --access public
4949
env:
5050
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,50 @@
11
# Changelog
22

3+
## [11.6.0](https://github.com/mochajs/mocha/compare/v11.5.0...v11.6.0) (2025-06-09)
4+
5+
6+
### 🌟 Features
7+
8+
* bump workerpool from ^6.5.1 to ^9.2.0 ([#5350](https://github.com/mochajs/mocha/issues/5350)) ([581a3c5](https://github.com/mochajs/mocha/commit/581a3c554489855ac02860689d3f4ae772c2ea79))
9+
10+
## [11.5.0](https://github.com/mochajs/mocha/compare/v11.4.0...v11.5.0) (2025-05-22)
11+
12+
13+
### 🌟 Features
14+
15+
* bump mimimatch from ^5.1.6 to ^9.0.5 ([#5349](https://github.com/mochajs/mocha/issues/5349)) ([a3dea85](https://github.com/mochajs/mocha/commit/a3dea85b316e229ea95f51c715ad61708e9ab9a3))
16+
17+
## [11.4.0](https://github.com/mochajs/mocha/compare/v11.3.0...v11.4.0) (2025-05-19)
18+
19+
20+
### 🌟 Features
21+
22+
* bump diff from ^5.2.0 to ^7.0.0 ([#5348](https://github.com/mochajs/mocha/issues/5348)) ([554d6bb](https://github.com/mochajs/mocha/commit/554d6bbec92c3c938af0a533109749b6f3b7bd2c))
23+
24+
25+
### 📚 Documentation
26+
27+
* added CHANGELOG.md note around 11.1 yargs-parser update ([#5362](https://github.com/mochajs/mocha/issues/5362)) ([618415d](https://github.com/mochajs/mocha/commit/618415d9c6fa3ef4e959207c8dd404f4703de7a7))
28+
29+
## [11.3.0](https://github.com/mochajs/mocha/compare/v11.2.2...v11.3.0) (2025-05-16)
30+
31+
32+
### 🌟 Features
33+
34+
* add option to use posix exit code upon fatal signal ([#4989](https://github.com/mochajs/mocha/issues/4989)) ([91bbf85](https://github.com/mochajs/mocha/commit/91bbf855012ee9b83700d3c563b517483de0831c))
35+
36+
37+
### 📚 Documentation
38+
39+
* Deploy new site alongside old one ([#5360](https://github.com/mochajs/mocha/issues/5360)) ([6c96545](https://github.com/mochajs/mocha/commit/6c96545aee03efeee78c55feedcf70664426514c))
40+
* mention explicit browser support range ([#5354](https://github.com/mochajs/mocha/issues/5354)) ([c514c0b](https://github.com/mochajs/mocha/commit/c514c0bfad044f8450a63b2f9c6c781b9ce6f164))
41+
* update Node.js version requirements for 11.x ([#5329](https://github.com/mochajs/mocha/issues/5329)) ([abf3dd9](https://github.com/mochajs/mocha/commit/abf3dd921544b45c4c09eef8f7c9c3c4481a3d66))
42+
43+
44+
### 🧹 Chores
45+
46+
* remove prerelease setting in release-please config ([#5363](https://github.com/mochajs/mocha/issues/5363)) ([8878f22](https://github.com/mochajs/mocha/commit/8878f222c418a0bf4fe170c17573c30b5ea2d567))
47+
348
## [11.2.2](https://github.com/mochajs/mocha/compare/v11.2.1...v11.2.2) (2025-04-10)
449

550

@@ -58,6 +103,8 @@
58103
### 🌟 Features
59104

60105
* bump yargs to 17 ([#5165](https://github.com/mochajs/mocha/issues/5165)) ([8f1c8d8](https://github.com/mochajs/mocha/commit/8f1c8d888b0104afcd95ca55a517320399755749))
106+
* Note that this also included a version bump of [`yargs-parser`](http://npmjs.com/package/yargs-parser) from `^20.2.9` to `^21.1.`, which fixed a bug that caused extra quotes in file paths to be removed.
107+
See [#5341](https://github.com/mochajs/mocha/issues/5341) for more information.
61108
* replace `strip-ansi` with `util.stripVTControlCharacters` ([#5267](https://github.com/mochajs/mocha/issues/5267)) ([3c191c0](https://github.com/mochajs/mocha/commit/3c191c05d9db1e99aec9b600edac2ce10a6b6d71)), closes [#5265](https://github.com/mochajs/mocha/issues/5265)
62109

63110
## [11.0.2](https://github.com/mochajs/mocha/compare/v11.0.1...v11.0.2) (2024-12-09)

bin/mocha.js

100644100755
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* @private
1111
*/
1212

13+
const os = require('node:os');
1314
const {loadOptions} = require('../lib/cli/options');
1415
const {
1516
unparseNodeFlags,
@@ -22,6 +23,7 @@ const {aliases} = require('../lib/cli/run-option-metadata');
2223

2324
const mochaArgs = {};
2425
const nodeArgs = {};
26+
const SIGNAL_OFFSET = 128;
2527
let hasInspect = false;
2628

2729
const opts = loadOptions(process.argv.slice(2));
@@ -109,9 +111,13 @@ if (mochaArgs['node-option'] || Object.keys(nodeArgs).length || hasInspect) {
109111
proc.on('exit', (code, signal) => {
110112
process.on('exit', () => {
111113
if (signal) {
114+
signal = typeof signal === 'string' ? os.constants.signals[signal] : signal;
115+
if (mochaArgs['posix-exit-codes'] === true) {
116+
process.exitCode = SIGNAL_OFFSET + signal;
117+
}
112118
process.kill(process.pid, signal);
113119
} else {
114-
process.exit(code);
120+
process.exit(Math.min(code, mochaArgs['posix-exit-codes'] ? 1 : 255));
115121
}
116122
});
117123
});
@@ -126,7 +132,7 @@ if (mochaArgs['node-option'] || Object.keys(nodeArgs).length || hasInspect) {
126132
// be needed.
127133
if (!args.parallel || args.jobs < 2) {
128134
// win32 does not support SIGTERM, so use next best thing.
129-
if (require('node:os').platform() === 'win32') {
135+
if (os.platform() === 'win32') {
130136
proc.kill('SIGKILL');
131137
} else {
132138
// using SIGKILL won't cleanly close the output streams, which can result

docs-next/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,19 @@ npm i
77
npm run generate
88
npm run dev
99
```
10+
11+
To merge with the old site:
12+
13+
```shell
14+
npm i
15+
npm run build-with-old
16+
```
17+
18+
To preview the old and new site:
19+
20+
```shell
21+
cd .. # back to root dir
22+
npm run docs:preview
23+
```
24+
25+
The new site will be at `http://localhost:8080/next`

docs-next/astro.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import { defineConfig } from "astro/config";
22
import starlight from "@astrojs/starlight";
33

44
export default defineConfig({
5-
// For now, this is only being deployed to mocha-docs-next.netlify.app.
6-
// Soon we'll move it onto mochajs.org/next.
7-
...(!process.env.NETLIFY_BUILD_BASE && { base: "/next" }),
5+
base: "/next",
86
integrations: [
97
starlight({
108
components: {

docs-next/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"docs": "cd .. && npm i && cd docs-next && npm run generate && npm run build",
1010
"build": "astro check && astro build",
1111
"preview": "astro preview",
12+
"build-with-old": "npm run generate && npm run build -- --outDir ../docs/_site/next",
1213
"astro": "astro"
1314
},
1415
"dependencies": {

docs-next/src/content/docs/running/browsers.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ A typical setup might look something like the following, where we call `mocha.se
3737
</html>
3838
```
3939

40+
Mocha supports the latest major versions of evergreen browsers available when Mocha's oldest supported Node.js major version was released.
41+
As of Mocha v11.0.0, that includes the following browser versions that were stable as of [Node.js 18.10.0](https://nodejs.org/en/blog/release/v18.0.0)'s release on April 19, 2022:
42+
43+
- [Chrome 100](https://developer.chrome.com/blog/new-in-chrome-100)
44+
- [Edge 100](https://learn.microsoft.com/en-us/deployedge/microsoft-edge-relnote-archive-stable-channel#version-1000118544-april-15)
45+
- [Firefox 99](https://www.mozilla.org/en-US/firefox/99.0/releasenotes)
46+
- [Safari 15.4](https://developer.apple.com/documentation/safari-release-notes/safari-15_4-release-notes)
47+
4048
## Grep
4149

4250
The browser may use the `--grep` as functionality.

0 commit comments

Comments
 (0)