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

RFC: Notification system for cli updates #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ruyadorno
Copy link
Contributor

@ruyadorno ruyadorno added the Agenda will be discussed at the Open RFC call label May 20, 2020
## Implementation

- Set a `user-agent` header in the requests from the **npm cli**
- Add a check on the registry that notifies user if a greater version of the cli is available
Copy link
Contributor

Choose a reason for hiding this comment

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

this needs to take into account the node version; there's very complex logic (https://github.com/nvm-sh/nvm/blob/master/nvm.sh#L150-L269) for figuring out which npm version works on which node version, and it would be pretty bad if npm suggesting updating on a node version where the act of updating completely hosed the entire node install by breaking npm.


## Motivation

- Remove an extra http request from the cli
Copy link

Choose a reason for hiding this comment

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

I am not sure this makes sense. It is just one request per week. During an installation there are hundreds of requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my guess is that when this was brought up it was with regards to commands that should not necessarily hit the registry, such as npm ls but i do agree with your point, it might be silly and not worth having this listed in the RFC after all

Copy link

Choose a reason for hiding this comment

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

I think it's worth it to keep it if reducing HTTP calls where they may not be necessary is a goal of the project (I think that's a fair and valid goal).

@ruyadorno
Copy link
Contributor Author

ruyadorno commented May 21, 2020

Feedback from OpenRFC meeting:

  • state of the registry engineering resources makes it difficult to commit to adding new features to the registry right now
  • let's follow up with how the situation will evolve there and reiterate back on this when appropriate

@ruyadorno ruyadorno added Agenda will be discussed at the Open RFC call and removed Agenda will be discussed at the Open RFC call labels May 27, 2020
@ruyadorno ruyadorno added the Agenda will be discussed at the Open RFC call label Sep 2, 2020
@ruyadorno ruyadorno removed the Agenda will be discussed at the Open RFC call label Sep 2, 2020
@ruyadorno
Copy link
Contributor Author

Action Item:

  • Update the RFC to reflect recent updates in npm7 beta so that the RFC should be mostly about registry-side changes and the requests the cli is going to perform

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.

5 participants