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: re-enable updating local packages #73

Closed
wants to merge 16 commits into from

Conversation

larsgw
Copy link
Contributor

@larsgw larsgw commented Oct 2, 2018

PR npm/npm#11584 removed the possibility of updating local packages (linked with symlinks) with npm update.
Reason was that this functionality didn't work in v3.6.0. However, the system behind local dependencies
has since changed, and I can't reproduce the original error anymore.

Reverts 53cdb96
See discussion in https://npm.community/t/1725

@larsgw larsgw requested a review from a team as a code owner October 2, 2018 18:28
@zkat zkat changed the base branch from latest to release-next November 13, 2018 15:00
@zkat
Copy link
Contributor

zkat commented Nov 13, 2018

I'd like an 👀 from @iarna on this one.

@jmfNodejsUser
Copy link

Hello,
Is this correction now available in 6.4.1 ?

@iarna
Copy link
Contributor

iarna commented Jan 8, 2019

@jmfNodejsUser It is not, it's not yet been merged.

Copy link
Contributor

@iarna iarna left a comment

Choose a reason for hiding this comment

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

Ok, it took me a bit to wrap my head around what this was doing:

This is fixing a problem where npm update won't auto-heal missing links. (The work around is to run npm i instead, which will.)

I approve of this idea, but there are two things that need to be addressed before it lands:

  1. It needs a test (this would have helped us understand what the patch was hoping to achieve)
  2. With this patch and a file: type dep, npm outdated -l crashes, this'll need to be fixed.

@jmfNodejsUser
Copy link

Thank you for the reply iarna.
How can I help to test this change? OR will somebody from the leader team test the modification?

Your suggestion to use npm i works and installs/links the first/primary dependency (local node module) in the main project. All sub dependencies of the local node modules are not installed/linked. Except when I delete the package-lock.json first and then run "npm i". In this case, it works and installs all primary and sub dependencies which are all local node modules(i.e. not from the npm registry)

@jmfNodejsUser
Copy link

The problem with using "npm i" is the same mentioned in
https://npm.community/t/npm-install-for-package-with-local-dependency-fails/754

@zkat zkat force-pushed the release-next branch 2 times, most recently from 6ca2f43 to 6d0cc95 Compare January 18, 2019 19:17
@larsgw
Copy link
Contributor Author

larsgw commented Jan 18, 2019

Sorry for the confusion. I added tests. As for the npm outdated -l crash, that should be fixed in #124.

@zkat zkat force-pushed the release-next branch 3 times, most recently from db63b89 to b09bc8c Compare January 23, 2019 18:36
zkat and others added 14 commits January 24, 2019 11:24
Make sure publishing with legacy username:password _auth works again
@jmfNodejsUser
Copy link

Hello @zkat , @iarna ,
Has this correction been merged into version 6.7.0 release?
I tried downloading version 6.7.0 and testing it.
The "npm update" still does not work for local node modules.

@larsgw ,
This problem started after npm version 5.6.0 and exists till now. So I think, that the change in v3.6.0 is probably not the reason for these problems since 5.6.0.
The workaround by using "npm install" still needs a deletion of the package-lock.json.

PR #11584 removed the possibility of updating local
packages (linked with symlinks) with `npm update`.
Reason was that this functionality didn't work in
v3.6.0. However, the system behind local dependencies
has since changed, and I can't reproduce the original
error anymore.

Reverts 59e5056
@zkat zkat added semver:patch semver patch level for changes and removed needs-discussion labels Feb 11, 2019
Copy link
Contributor

@zkat zkat left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for fixing things up. This looks like it fulfill's @iarna's requirements, so we're good to go. 👍

zkat pushed a commit that referenced this pull request Feb 18, 2019
PR #11584 removed the possibility of updating local
packages (linked with symlinks) with `npm update`.
Reason was that this functionality didn't work in
v3.6.0. However, the system behind local dependencies
has since changed, and I can't reproduce the original
error anymore.

Reverts 59e5056

Fixes: https://npm.community/t/1725?u=larsgw
PR-URL: #73
Credit: @larsgw
Reviewed-By: @iarna
Reviewed-By: @zkat
@zkat
Copy link
Contributor

zkat commented Feb 18, 2019

This has been merged by hand. Thanks again, @larsgw!

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

Successfully merging this pull request may close these issues.

8 participants