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

Update from nopt 3.x to nopt 5.0.0 #1778

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Conversation

Krinkle
Copy link
Contributor

@Krinkle Krinkle commented Jul 20, 2024

The simple usage of nopt(known, alias, argv, 2) has remained unchanged through both changes, same as in this repo.

Installation of latest grunt- produces a warning:

npm WARN deprecated [email protected]: This package is no longer supported.

This package was used by nopt to call os.homedir() which has been built-in since Node.js 2. The dependency was removed in nopt 5.0.0 with npm/nopt@5c0e45b.

Newer versions of nopt are available, but those raise the required Node.js engine level. In order to make this safe to land, and easy to release, resolve the warning first by moving to nopt 5.0.0, matching grunt-cli.

I'm loosening grunt-cli to allow for grunt-cli 1.5.0, which was just released with a similar fix. This way it will update by default, but not cause duplicate installations for downstream projects that depend on grunt-cli 1.4 directly.

* grunt-cli updated to nopt 4.x in gruntjs/grunt-cli#117
* grunt-cli updated to nopt 5.0 in gruntjs/grunt-cli#156
* changelog: https://github.com/npm/nopt/blob/v5.0.0/CHANGELOG.md

The simple usage of `nopt(known, alias, argv, 2)` has remained
unchanged through both changes, same as in this repo.

Installation of latest grunt- produces a warning:

> npm WARN deprecated [email protected]: This package is no longer supported.

This package was used by nopt to call `os.homedir()` which has been built-in
since Node.js 2. The dependency was removed in nopt 5.0.0 with
npm/nopt@5c0e45b.

Newer versions of nopt are available, but those raise the required
Node.js engine level. In order to make this safe to land, and easy to release,
resolve the warning first by moving to nopt 5.0.0, matching grunt-cli.

I'm loosening grunt-cli to allow for grunt-cli 1.5.0, which was just
released with a similar fix. This way it will update by default, but
not cause duplicate installations for downstream projects that depend
on grunt-cli 1.4 directly.
@Krinkle Krinkle requested a review from vladikoff July 20, 2024 19:53
@vladikoff vladikoff merged commit e2edc00 into gruntjs:main Jul 23, 2024
6 checks passed
@vladikoff
Copy link
Member

Thanks!

@Krinkle Krinkle deleted the update-nopt branch July 23, 2024 01:18
@Krinkle
Copy link
Contributor Author

Krinkle commented Jul 23, 2024

@vladikoff Thank you! This is my first patch in gruntjs/grunt if you can believe it. What's the release process for this one?

@vladikoff
Copy link
Member

@Krinkle hm with such a big dependency jump we should probably publish a major version, maybe we can pick up some other deps as well

@Krinkle
Copy link
Contributor Author

Krinkle commented Jul 23, 2024

@vladikoff Do you mean Grunt 2.0? I was hoping for a minor 1.x version. I worry a major version at this point in Grunt's life would bifurcate the ecosystem for a long time. We should probably revert this if this can be a breaking change for downstream users of Grunt.

Is nopt exposed by this package to users of Grunt? I was under the impression that its use is purely as internal dependency. The way we call nopt() was not affected by the upgrade, we didn't have to update any callers ourselves. And the function isn't exposed publicly, I think? For example, the semver-major reason for nopt 5.0 was dropping support for Node <= 6 in npm/nopt@5c0e45b, but Grunt 1.6 already requires Node 16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants