-
Notifications
You must be signed in to change notification settings - Fork 996
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
Add note about why installing via npm is not recommended #291
Conversation
are not signed and npm does not perform any integrity checks, which is a | ||
security risk when installing system-wide apps. Additionally, in an environment | ||
with a system-wide package manager such as most Linux distributions, apps | ||
installed via npm are not updated when you update the rest of your system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only really convincing bit here is the security check, I would simplify it to just that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this true? Fairly certain NPM DOES do shasum validation - https://github.com/npm/npm/blob/latest/lib/cache/add-remote-tarball.js#L86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hash verification is not the same. It doesn't verify who uploaded the
package or that it's actually a legitimate release, it's just a hash of the
contents. Additionally, npm uses SHA1, which is not considered secure.
I should probably also mention the fact that dependency versions are locked down with all other installation methods, so things like yarnpkg/yarn#2072 are avoided. |
@Daniel15 floating dependency versions are not required in |
That won't lock transitive dependencies. Even if we depend on an exact version of package Foo (say, version 1.2.3), Foo could depend on Locking (including transitive dependencies) can be done with |
@Daniel15 you should be able to do |
But then I guess the problem would be that the optional dependencies don't
have their version numbers locked... I guess it's better than nothing.
Sent from my phone.
…On Dec 3, 2016 5:48 PM, "Jason Palmer" ***@***.***> wrote:
@Daniel15 <https://github.com/Daniel15> you should be able to do npm
shrinkwrap --no-optionals to make a shrinkwrap that doesn't contain
optional dependencies.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#291 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAFnHXrEVoF6zs3NwujPEkyGV-zyYiaEks5rEhv7gaJpZM4K-miP>
.
|
Optional deps, by definition, shouldn't be required in order for a project to function :) If they are then that's a much bigger problem. |
Yeah, but there's a difference in them not being there and them being there and being broken. |
@thejameskyle - hopefully it's good now, let me know what you think 😃 |
I tried to be as neutral as possible while writing this, let me know if it doesn't make sense.