Open jimmywarting opened 10 months ago
Fully agree!
Some classes that needs to be converted:
If we can find a linting rule that enforces / helps with this, then we should
Bad news: I think this would technically be a breaking change. Out of the three PRs that split it up:
...indicating that the runtime differences noted in https://nodejs.org/api/util.html#utilinheritsconstructor-superconstructor do impact usage of these class(-like)s.
These are all part of the public Mocha API:
As much as we want to clean up this old code, we'll have to wait for the next major version of Mocha. 😞
I think we should get planning for a new major version fairly soon, as it eg is needed to update some outdated dependencies as well
We can keep a 10.x branch around for bug fixes and have main be for the next major?
get planning for a new major version fairly soon
Agreed, the more I dig into the legacy dependencies the more breaking changes I find...
For visibility: we'll talk about this in our next maintainer meeting to see what strategy we go with. 👍
Is your feature request related to a problem or a nice-to-have?? Please describe. It would be nice to get rid of some NodeJS specific things that makes it better suited for browsers. one such thing could be the option to remove
util.inherits
and replacing it with classes that can extends things. resulting in fewer dependencies and smaller code bundle that won't require the browserified version of util that has an additional of 20 modules and 12 kbNodeJS docs have marked it as legacy and has this to say about
util.inherits
Describe the solution you'd like Change prototype based classes into es-classes