gruntjs / grunt-cli

Grunt's command line interface.
http://gruntjs.com/
MIT License
706 stars 248 forks source link

Update from nopt 4.x to nopt 5.0.0 #156

Closed Krinkle closed 2 months ago

Krinkle commented 2 months ago

installation of latest grunt-cli@1.4.2 produces a warning:

npm WARN deprecated osenv@0.1.5: 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 https://github.com/npm/nopt/commit/5c0e45b2f94414c074270b133e90c77ec35f5a4b 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.

XhmikosR commented 2 months ago

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 commented 2 months ago

@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 commented 2 months ago

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

XhmikosR commented 2 months ago

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