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 4.x to nopt 5.0.0 #156

Merged
merged 1 commit into from
Jul 7, 2024
Merged

Conversation

Krinkle
Copy link
Contributor

@Krinkle Krinkle commented Jun 9, 2024

installation of latest [email protected] produces a warning:

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

This package is only used by nopt to call os.homedir() which has been stable since Node.js 2. It was removed npm/nopt@5c0e45b in nopt 5.0.0.

There are newer versions of nopt 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.

installation of latest [email protected] produces a warning:

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

This package is only used by nopt to call `os.homedir()` which has
been stable since Node.js 2. It was removed [1] in nopt 5.0.0.

There are newer versions of nopt available, but those raise the
required Node.js engine level. In order to make this easy to release
and to resolve the warning first, let's first move to nopt 5.0.0.

[1]: npm/nopt@5c0e45b
@XhmikosR
Copy link
Member

XhmikosR commented Jul 2, 2024

I still notice the warning, are you sure it comes from nopt?

https://github.com/gruntjs/grunt-cli/actions/runs/9440385892/job/25999608376?pr=156#step:4:10

@Krinkle
Copy link
Contributor Author

Krinkle commented Jul 2, 2024

@XhmikosR Yes and no.

Yes, when using this e.g. in wikimedia/mediawiki, this is the only package pulling it in.

"node_modules/grunt-cli/node_modules/nopt": {
			"version": "4.0.3",,
			"dependencies": {,
				"osenv": "^0.1.4"
			},

"grunt-cli": {
			"version": "1.4.3",,
			"requires": {,
				"nopt": "~4.0.1",},
			"dependencies": {
				"nopt": {
					"version": "4.0.3",,
					"requires": {
						,
						"osenv": "^0.1.4"

I believe this PR would fix the warning for downstream users of Grunt. But, my guess is that there is a dev dependency within the grunt-cli repo that is still pulling it in by other means as well.

@Krinkle
Copy link
Contributor Author

Krinkle commented Jul 2, 2024

OK. It's actually grunt 1.6.1, also depending on the even older "nopt": "~3.0.6".

@XhmikosR
Copy link
Member

XhmikosR commented Jul 3, 2024

All good, I just noticed it on CI and thought I'd mention it :)

@vladikoff vladikoff merged commit f33cc6a into gruntjs:main Jul 7, 2024
6 checks passed
@Krinkle Krinkle deleted the update-nopt branch July 7, 2024 01:45
Krinkle added a commit to Krinkle/grunt that referenced this pull request Jul 20, 2024
* 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.
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.

3 participants