docs: switch util.inherits to class extends#5677
docs: switch util.inherits to class extends#5677JoshuaKGoldberg wants to merge 8 commits intomochajs:mainfrom
Conversation
5e30b2b to
2974a87
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5677 +/- ##
==========================================
- Coverage 88.44% 88.40% -0.04%
==========================================
Files 66 66
Lines 4794 4797 +3
Branches 978 982 +4
==========================================
+ Hits 4240 4241 +1
- Misses 554 556 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@JoshuaKGoldberg as an FYI this will mean the docs slightly don't match our actual releases, not even a beta release for this change is ready. I'm OK to merge if you are, but maybe we should at least get a beta for this, or add a disclaimer? Esp. if folks are still using v11, for which we don't have dedicated docs yet. (e.g. v11.mochajs.org) |
|
Blocked on a beta release first |
|
I'll try to act as an end-user with Mocha 11 and see if this |
Accidentally overpasted mochajs/mocha#5677
mark-wiemer
left a comment
There was a problem hiding this comment.
class MyReporter(runner) { isn't valid syntax, I don't think! Even when trying to revisit this, I couldn't get the new pattern to work, we'll have to revise this. Ref https://github.com/mark-wiemer/hello-hello/tree/496f4640638d717287601fc60b4ddb5d86d62abc/packages/mocha/packages/custom-reporter
|
Confirmed on the failure: Switching class MyReporter extends mocha.reporters.Base {
constructor(runner) {
super(runner);
... |
|
@JoshuaKGoldberg I'll try to repro this shortly to make sure I fully understand stuff. In the meantime, let me know if you have ideas for how to draft a migration guide for this. We'll need one to close the backing issue :) Thanks for continuing this one! |
PR Checklist
status: accepting prsOverview
Tweaks the page to mention
extendsinstead ofutil.inherits.Other parts of the page will need updating too. Out of scope for this.
🤎