Npm-check-updates: ncu doesn't play well with linked packages

Created on 5 Oct 2015  Â·  8Comments  Â·  Source: raineorshine/npm-check-updates

if the linked package is already up-to-date, ncu doesn't see that the version in package.json can be updated

bug

Most helpful comment

definitely still the case. bump.

All 8 comments

Thanks. I assume that the correct behavior would be to just go based off the package.json. I will investigate.

@dbuezas Is this for global packages, local packages, or both?

I didn't try it with global packages, in my case it was a local package which was "npm linked".

In any case and as far as I remember, npm link does copy the package to the global packages folder so I guess both cases are analogous.

definitely still the case. bump.

Still causing need for manually checking and updating packages here. bump.

I definitely interested in seeing this get fixed. I have had limited time to work on side projects given my current commitments. I'm happy to offer support to anyone that is interested in contributing.

I did some testing on this issue and found,

a) Its not NPM.

  • I symlinked a package to my home directory, and then from my home directory into node_modules.
ln -s /home/me/mycomponents/mycomponent /home/me/sharedcomponents
ln -s /home/me/sharedcomponents/mycomponent /home/me/myprojects/myproject/node_modules
  • I modified /home/me/myprojects/myproject/package.json to rewind the mycomponent version.
  • I ran ncu and it gave me the dreaded "All dependencies match the latest package versions :)"

Sadly like @raineorshine , I'm slightly busy right now but thought i'd record this in case someone wants to pick this up. If I unbusy sooner than that, i'll do a pull request for you.

Since ncu https://github.com/raineorshine/npm-check-updates/releases/tag/v3.0.0, node_modules is ignored and only the package.json is considered, so this should no longer be an issue. If I am mistaken, please let me know and I will re-open. Thanks!

Installed modules ignored

In ncu v2, out-of-date dependencies in package.json that were installed up-to-date (e.g. ^1.0.0 specified and 1.0.1 installed) were ignored by ncu. Installed modules are now completely ignored and ncu only consider your package.json. This change was made to better match users’ expectations.

Was this page helpful?
0 / 5 - 0 ratings