Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed Jun 4, 2024
2 parents a2868fe + 472a8be commit 4b87ce6
Show file tree
Hide file tree
Showing 21 changed files with 173 additions and 204 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
groups:
github-actions:
patterns:
- '*'
4 changes: 2 additions & 2 deletions .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '~/.npm'
key: "ubuntu-latest-node-full-lts-${{ hashFiles('**/package-lock.json') }}"
Expand All @@ -32,7 +32,7 @@ jobs:
SAUCE_USERNAME: '${{secrets.SAUCE_USERNAME}}'
SAUCE_ACCESS_KEY: '${{secrets.SAUCE_ACCESS_KEY}}'
- name: remove 'run-browser-test' label
uses: buildsville/add-remove-label@v2.0.0
uses: buildsville/add-remove-label@v2.0.1
if: ${{ always() }}
with:
token: ${{secrets.GITHUB_TOKEN}}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/mocha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
with:
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '~/.npm'
key: "ubuntu-latest-node-lts-${{ hashFiles('**/package-lock.json') }}"
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
run: |
echo "dir=$(npm config get cache)" >> $env:GITHUB_OUTPUT
- name: 'Cache node_modules'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ matrix.os == 'ubuntu-latest' && '~/.npm' || steps.npm-cache.outputs.dir }}
key: "${{ matrix.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}"
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
with:
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '~/.npm'
# this key is different than above, since we are running scripts
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
with:
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '~/.npm'
# this key is different than above, since we are running scripts
Expand Down
7 changes: 7 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -547,5 +547,12 @@ Aras Abbasi <aras.abbasi@googlemail.com>
Spencer <16455389+Spencer-Doak@users.noreply.github.com>
Feng Yu <F3n67u@outlook.com>
Pelle Wessman <pelle@kodfabrik.se>
Orgad Shaneh <orgads@gmail.com>
Lucas Lopes <lucasaferrlopes@gmail.com>
Bryan Mishkin <698306+bmish@users.noreply.github.com>
Ville Lahdenvuo <tuhoojabotti@gmail.com>
Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
Ståle Tomten <stale.tomten@finn.no>
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

# Generated by scripts/update-authors.js
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 10.4.0 / 2024-03-26

### :tada: Enhancements

- [#4829](https://github.com/mochajs/mocha/pull/4829) feat: include `.cause` stacks in the error stack traces ([**@voxpelli**](https://github.com/voxpelli))
- [#4985](https://github.com/mochajs/mocha/pull/4985) feat: add file path to xunit reporter ([**@bmish**](https://github.com/bmish))

### :bug: Fixes

- [#5074](https://github.com/mochajs/mocha/pull/5074) fix: harden error handling in `lib/cli/run.js` ([**@stalet**](https://github.com/stalet))

### :nut_and_bolt: Other

- [#5077](https://github.com/mochajs/mocha/pull/5077) chore: add mtfoley/pr-compliance-action ([**@JoshuaKGoldberg**](https://github.com/JoshuaKGoldberg))
- [#5060](https://github.com/mochajs/mocha/pull/5060) chore: migrate ESLint config to flat config ([**@JoshuaKGoldberg**](https://github.com/JoshuaKGoldberg))
- [#5095](https://github.com/mochajs/mocha/pull/5095) chore: revert [#5069](https://github.com/mochajs/mocha/pull/5069) to restore Netlify builds ([**@voxpelli**](https://github.com/voxpelli))
- [#5097](https://github.com/mochajs/mocha/pull/5097) docs: add sponsored to sponsorship link rels ([**@JoshuaKGoldberg**](https://github.com/JoshuaKGoldberg))
- [#5093](https://github.com/mochajs/mocha/pull/5093) chore: add 'status: in triage' label to issue templates and docs ([**@JoshuaKGoldberg**](https://github.com/JoshuaKGoldberg))
- [#5083](https://github.com/mochajs/mocha/pull/5083) docs: fix CHANGELOG.md headings to start with a root-level h1 ([**@JoshuaKGoldberg**](https://github.com/JoshuaKGoldberg))
- [#5100](https://github.com/mochajs/mocha/pull/5100) chore: fix header generation and production build crashes ([**@JoshuaKGoldberg**](https://github.com/JoshuaKGoldberg))
- [#5104](https://github.com/mochajs/mocha/pull/5104) chore: bump ESLint ecmaVersion to 2020 ([**@JoshuaKGoldberg**](https://github.com/JoshuaKGoldberg))
- [#5116](https://github.com/mochajs/mocha/pull/5116) fix: eleventy template builds crash with 'unexpected token at ": string, msg..."' ([**@LcsK**](https://github.com/LcsK))
- [#4869](https://github.com/mochajs/mocha/pull/4869) docs: fix documentation concerning glob expansion on UNIX ([**@binki**](https://github.com/binki))
- [#5122](https://github.com/mochajs/mocha/pull/5122) test: fix xunit integration test ([**@voxpelli**](https://github.com/voxpelli))
- [#5123](https://github.com/mochajs/mocha/pull/5123) chore: activate dependabot for workflows ([**@voxpelli**](https://github.com/voxpelli))
- [#5125](https://github.com/mochajs/mocha/pull/5125) build(deps): bump the github-actions group with 2 updates ([**@dependabot**](https://github.com/dependabot))

## 10.3.0 / 2024-02-08

This is a stable release equivalent to [10.30.0-prerelease](#1030-prerelease--2024-01-18).
Expand Down
2 changes: 1 addition & 1 deletion docs/changelogs/CHANGELOG_V3_older.md
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ Thanks to everyone who contributed, and our fabulous [sponsors and backers](http

# 1.10.0 / 2013-05-21

- add add better globbing support for windows via `glob` module
- add better globbing support for windows via `glob` module
- add support to pass through flags such as --debug-brk=1234. Closes [#852](https://github.com/mochajs/mocha/issues/852)
- add test.only, test.skip to qunit interface
- change to always use word-based diffs for now. Closes [#733](https://github.com/mochajs/mocha/issues/733)
Expand Down
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,7 @@ Available root hooks and their behavior:

> _Tip: If you need to ensure code runs once and only once in any mode, use [global fixtures](#global-fixtures)._
As with other hooks, `this` refers to to the current context object:
As with other hooks, `this` refers to the current context object:

```js
// test/hooks.mjs
Expand Down Expand Up @@ -2268,10 +2268,11 @@ Some shells support recursive matching by using the globstar (`**`) wildcard. Ba
$ mocha "./spec/**/*.js"
```

[You should _always_ quote your globs in npm scripts][article-globbing]. If you
use double quotes, it's the shell on UNIX that will expand the glob. On the
other hand, if you use single quotes, the [`node-glob`][npm-glob] module will
handle its expansion.
You should _always_ quote your globs in npm scripts. If you
use quotes, the [`node-glob`][npm-glob] module will
handle its expansion. For maximum compatibility,
surround the entire expression with double quotes and refrain
from `$`, `"`, `^`, and `\` within your expression.

See this [tutorial][gist-globbing-tutorial] on using globs.

Expand Down Expand Up @@ -2363,7 +2364,6 @@ For a running example of Mocha, view [example/tests.html](example/tests.html). F
or the [source](https://github.com/mochajs/mocha/blob/master/lib/mocha.js).

[//]: # 'Cross reference section'
[article-globbing]: https://medium.com/@jakubsynowiec/you-should-always-quote-your-globs-in-npm-scripts-621887a2a784
[bash-globbing]: https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html
[better-assert]: https://github.com/visionmedia/better-assert
[caniuse-notifications]: https://caniuse.com/#feat=notifications
Expand Down
138 changes: 0 additions & 138 deletions lib/browser/progress.js

This file was deleted.

2 changes: 1 addition & 1 deletion lib/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ exports.handler = async function (argv) {
try {
await runMocha(mocha, argv);
} catch (err) {
console.error('\n' + (err.stack || `Error: ${err.message || err}`));
console.error('\n Exception during run:', err);
process.exit(1);
}
};
2 changes: 1 addition & 1 deletion lib/nodejs/reporters/parallel-buffered.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ONCE_EVENT_NAMES = [EVENT_DELAY_BEGIN, EVENT_DELAY_END];

/**
* The `ParallelBuffered` reporter is used by each worker process in "parallel"
* mode, by default. Instead of reporting to to `STDOUT`, etc., it retains a
* mode, by default. Instead of reporting to `STDOUT`, etc., it retains a
* list of events it receives and hands these off to the callback passed into
* {@link Mocha#run}. That callback will then return the data to the main
* process.
Expand Down
2 changes: 1 addition & 1 deletion lib/nodejs/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class SerializableEvent {
/**
* Constructs a `SerializableEvent`, throwing if we receive unexpected data.
*
* Practically, events emitted from `Runner` have a minumum of zero (0)
* Practically, events emitted from `Runner` have a minimum of zero (0)
* arguments-- (for example, {@link Runnable.constants.EVENT_RUN_BEGIN}) and a
* maximum of two (2) (for example,
* {@link Runnable.constants.EVENT_TEST_FAIL}, where the second argument is an
Expand Down
11 changes: 10 additions & 1 deletion lib/reporters/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ var generateDiff = (exports.generateDiff = function (actual, expected) {
* @private
* @param {Error} err
* @param {Set<Error>} [seen]
* @return {{ message: string, msg: string, stack: string }}
* @return {FullErrorStack}
*/
var getFullErrorStack = function (err, seen) {
if (seen && seen.has(err)) {
Expand Down Expand Up @@ -580,3 +580,12 @@ function sameType(a, b) {
Base.consoleLog = consoleLog;

Base.abstract = true;

/**
* An object with all stack traces recursively mounted from each err.cause
* @memberof module:lib/reporters/base
* @typedef {Object} FullErrorStack
* @property {string} message
* @property {string} msg
* @property {string} stack
*/
Loading

0 comments on commit 4b87ce6

Please sign in to comment.