Skip to content

feat: bump yargs to 17#5165

Merged
JoshuaKGoldberg merged 7 commits into
mochajs:mainfrom
JoshuaKGoldberg:yargs-17
Jan 2, 2025
Merged

feat: bump yargs to 17#5165
JoshuaKGoldberg merged 7 commits into
mochajs:mainfrom
JoshuaKGoldberg:yargs-17

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Jul 2, 2024

PR Checklist

Overview

Bumps yargs and related packages to their latest versions:

  • yargs: from 16.2.0 to 17.7.2
  • yargs-parser: from 20.2.9 to 21.1.1

Both still support Node >= 12.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review July 2, 2024 16:27
@JoshuaKGoldberg JoshuaKGoldberg requested a review from a team July 2, 2024 16:28
@JoshuaKGoldberg JoshuaKGoldberg added the semver-minor implementation requires increase of "minor" version number; "features" label Jul 3, 2024
Copy link
Copy Markdown
Member

@voxpelli voxpelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests seems to claim that this is failing

Will be easier to figure out why once #5177 is fixed, as then we will no longer fail-fast in the matrix

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft July 20, 2024 16:25
@Uzlopak Uzlopak self-assigned this Sep 3, 2024
Comment thread package.json
Comment thread lib/cli/cli.js
.wrap(process.stdout.columns ? Math.min(process.stdout.columns, 80) : 80)
.epilog(
`Mocha Resources
`${ansi.reset("Mocha Resources")}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This epilog(ue) wasn't being printed before. Now it is. On error, everything is red, so this ansi.reset is needed to make the colors actually show through.

Comment thread lib/cli/run.js
},
'list-reporters': {
conflicts: Array.from(ONE_AND_DONE_ARGS),
conflicts: Array.from(ONE_AND_DONE_ARGS).filter(arg => arg !== "list-reporters"),
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without these:

  2 failing
  1) --list-interfaces
       should dump a list of all interfaces with descriptions:
     Uncaught UnexpectedError: 
expected 1 to be 0
      at /home/runner/work/mocha/mocha/test/integration/options/listInterfaces.spec.js:26:7
      at ChildProcess.<anonymous> (test/integration/helpers.js:352:5)
      at ChildProcess.emit (node:events:519:28)
      at maybeClose (node:internal/child_process:1105:16)
      at ChildProcess._handle.onexit (node:internal/child_process:305:5)
      set UNEXPECTED_FULL_TRACE=true to see the full stack trace
  2) --list-reporters
       should dump a list of all reporters with descriptions:
     Uncaught UnexpectedError: 
expected 1 to be 0
      at /home/runner/work/mocha/mocha/test/integration/options/listReporters.spec.js:29:7
      at ChildProcess.<anonymous> (test/integration/helpers.js:352:5)
      at ChildProcess.emit (node:events:519:28)
      at maybeClose (node:internal/child_process:1105:16)
      at ChildProcess._handle.onexit (node:internal/child_process:305:5)
      set UNEXPECTED_FULL_TRACE=true to see the full stack trace

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review October 30, 2024 17:52
@JoshuaKGoldberg JoshuaKGoldberg dismissed voxpelli’s stale review December 9, 2024 14:31

Changed since review; re-requested

Copy link
Copy Markdown
Member

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and LGTM

@gausie
Copy link
Copy Markdown

gausie commented Jan 21, 2025

v11.1.0 is marked as "next" in npm, v11.0.1 is still "latest". Is that on purpose?

@JoshuaKGoldberg
Copy link
Copy Markdown
Member Author

Ah, it's not - thanks @gausie! I just updated the tag on npm.

lennonnikolas pushed a commit to lennonnikolas/mocha that referenced this pull request Jan 24, 2026
* feat: bump yargs to 17

* fix: prefer coerced reporter-option for options

* Aha, fix: process.exit() instead of process.exitCode

* fix: --list-interfaces one-and-done conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-minor implementation requires increase of "minor" version number; "features"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔒 Security: Upgrade yargs-parser and yargs to latest stable version

4 participants