-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[feat] yarn audit fix #7075
Comments
I feel like 100 thumbs up should warrant some sort of response.. |
Hey - I didn't see the upvotes, my bad. I think it's something we would be interested in, but I'm currently short on time while I'm working on our next major release. If someone from the community is willing to put the work into adding support for it, I'd certainly be happy to review it! 🙂 |
@arcanis Maybe this should have an RFC? Could be a little involved. From the npm v6.1.0-next.0 post:
|
My full personal opinion on The main reason I consider it a good thing to have in the v1 is that people expect it to have most of the npm features by default, so it makes sense to implement it the same way that they did, conceptually. In this situation we don't need a RFC, since the spec is pretty much "whatever already exists". For the v2 I don't think it needs an RFC either because as I mentioned it'll likely be a community plugin - meaning that its maintainers will get to pick the logic they think suits the best their users, and if their users aren't happy with it they can just implement a different logic in a separate plugin. Does that make sense? |
It's a part of npm. To be an npm replacement, it should be a part of yarn. |
I'm surprised this is a discussion. This seems like required feature parity, if your tagline on your main site is: "Install any package from npm and keep your package workflow the same." |
A PR would be more impactful than a discussion given that we already agree.
|
It wasn't clear on reading this thread that there was agreement. I definitely cannot take this on at the moment. |
`yarn audit fix` doesn't work [1] and since for us yarn doesn't bring anything to the table that npm doesn't, we'll go with npm instead. [1] yarnpkg/yarn#7075
this is highly needed. I have 2 side project repos that I'll consider moving over to npm if this isn't addressed anytime soon. npm caught up by enforcing lock files. it's improved install speeds as well. yarn used to stand out clearly from npm as a replacement, but now it seems to need to catch up in at least one way, that happens to be rather crucial - aiding in keeping repos secure. |
This is definitely a deal breaker for using yarn over npm. We have hundreds of projects which we use yarn, but the lack of |
Is there a rudimentary implementation of this for people to use in the meantime? Unfortunately, I don't believe we can just |
@CharlesStover If you're project is on GitHub, you can use Dependabot to automatically create PRs for you whenever dependencies need updating. It supports yarn. |
Dependabot has managed to fix some but not all of my audits. Even in some repos with 3 needed fixes, Dependabot just fixes just one or two. I'm left scratching my head how to fix the last one. I've tried |
Maybe this isn't the right place for this discussion, but usually what I do is:
|
Yarn does not support automatic fix of vulnerabilities (yarnpkg/yarn#7075) so use NPM which does Signed-off-by: Knut Ahlers <knut@ahlers.me>
(this comment was in response to another comment that its owner deleted)
Now can you all stop with the obnoxious passive aggressiveness? You're not as subtil as you think, and I don't care as much as you think either. |
(Answering a comment its author deleted)
Take it from my perspective. The Yarn is a community project. Everything so far got done because people decided that they cared enough about a feature to implement them. Our work as maintainers is to help them figure out how to do it in an idiomatic way. Not to implement features for you. Sometimes (relatively often) we happen to believe in a feature enough to spend our own time implementing it. This is not one of these cases, at least not for me. I think we all said everything we had in mind, I'm going to lock this issue for now. Again, I'd be happy to spend some of my time helping you land it into Yarn; I just won't do it for you. |
Related to #5808 (
yarn audit
)Do you want to request a feature or report a bug?
feature
What is the current behavior?
yarn audit fix
does the same asyarn audit
and doesn't actually fix known vulnerabilities.What is the expected behavior?
It should behave like
npm audit fix
and update packages to safe versions where possible. Another report should be displayed after upgrading packages if there are still vulnerabilities that have to be fixed manually.Unfortunately
npm audit fix
can't be used directly with yarn because it requires an npm lockfile, which would have different dependency versions than yarn's lockfile. There should be some APIs available though, as there were fornpm audit
andyarn audit
.The text was updated successfully, but these errors were encountered: