Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: adapt new engine range for Mocha 11 #5216

Merged
merged 4 commits into from
Nov 11, 2024
Merged

Conversation

voxpelli
Copy link
Member

@voxpelli voxpelli commented Sep 16, 2024

As we prepare for the next step of Mocha its time to get rid of some of the baggage that's stopping us from updating dependencies and using modern language features.

As a dev dependency that other open source projects rely on we can't be too aggressive with this bump – eg. dropping Node 20 is sadly too soon.

To make as little hassle as possible for users it makes sense to align our version range with other common dev dependencies, and one of the newest such releases is ESLint 9, which has a version range of ^18.18.0 || ^20.9.0 || >=21.1.0

This PR also sets up release-please for pre-releases and adds installed-check (which I maintain) to validate the engine range against that of our dependencies (running npx installed-check --engine-check --verbose it shows which modules that are missing published engine ranges and which it can't check)

Fixes #5206

@voxpelli voxpelli self-assigned this Sep 16, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks Passed!

package.json Outdated Show resolved Hide resolved
@voxpelli voxpelli added this to the v11.0.0 milestone Sep 16, 2024
@voxpelli voxpelli added the semver-major implementation requires increase of "major" version number; "breaking changes" label Sep 16, 2024
@voxpelli voxpelli marked this pull request as draft September 16, 2024 18:24
@voxpelli
Copy link
Member Author

voxpelli commented Sep 16, 2024

Lets do some more due diligence before dropping older Node.js versions, as eg. TS uses Mocha and has a wider engine range than suggested here, see comment here: #5148 (comment)

Copy link
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.

LGTM

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

🚀

@voxpelli
Copy link
Member Author

We need to decide on if we feel we have enough data to support a decision to bump to 16 or 18

For 16 we should double check what that means in terms of bumping dependencies, if we still remain on outdated unsupported dependencies then we have kind of bumped in vain and are not much better of with 16 than 14?

If 18 means dropping far too many projects, then that will be complex as well

I tried pulling down all the engine ranges for dependents from ecosyste.ms using my list-dependents-cli, but I think I failed

And that data has been proven
More unreliable than I would have hoped as it turns out that some heavyweight projects refuse to use engine declarations, making automated calculations less representative fastify/fastify#5667

@voxpelli voxpelli marked this pull request as ready for review October 29, 2024 18:41
@voxpelli
Copy link
Member Author

If we don’t have time or want to do more investigation to pick between 16 and 18, then I say we stick with the original proposal and update to 18. Maybe it’s too cutting edge for some, but it’s simpler for us and we have no data to show that it would cause a lot of problems for the community.

@JoshuaKGoldberg
Copy link
Member

👍 I don't have the energy to push back on this and don't feel strongly beyond "we should do this next week". So if nobody has the energy to investigate, and you're ok with 18, then sure - 18 it is.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Member

Choose a reason for hiding this comment

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

[Docs] Just noting, we'll also want to do a find-all for any reference to Node.js 14. For example, .github/DEVELOPMENT.md.

Copy link
Member Author

Choose a reason for hiding this comment

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

In this or in a follow up PR?

Feel free to merge this one when you feel it’s ready

@JoshuaKGoldberg JoshuaKGoldberg merged commit 80da25a into main Nov 11, 2024
106 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the mocha-11-prerelease branch November 11, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major implementation requires increase of "major" version number; "breaking changes"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🧹 Versioning: Bump minimum Node.js version from 14.0.0 to 18.18.0
3 participants