Support npmv7 (lock file v2) for transitiveRemediation #24816
Replies: 15 comments
-
@rarkins Can you maybe add links/references to those bugs you need to get fixed before we can start on this feature? It's not clear to me what upstream fixes you need before this can get unblocked. 😉 |
Beta Was this translation helpful? Give feedback.
-
One of them is npm/cli#3171 I didn't have time to document any other problems I found, unfortunately. |
Beta Was this translation helpful? Give feedback.
-
The author of the bug report says:
But I think you're still waiting on bugfixes for other things as well? So this is still |
Beta Was this translation helpful? Give feedback.
-
Todo:
Example:
npm@6 does this, npm@7 did not when I last tried it. In other words npm@7 failed to identify invalid lock files, while npm@6 and all versions of yarn do. |
Beta Was this translation helpful? Give feedback.
-
👋🏻 Is there any update for this issue? With Node.js 12 approaching EOL on 2022-04-30, many projects will be updating to Node.js 14 / 16. Newer npm versions come packaged with Node.js 14 / 16, meaning more projects will be using the v2 version for lock files and lack of Renovate support for transitive remediation with lock file v2 version will impact more projects. Edited: clarity |
Beta Was this translation helpful? Give feedback.
-
Are you sure you understand what this issue is about? Because it's certainly no blocker for updating your npm version. |
Beta Was this translation helpful? Give feedback.
-
If we update to npm v7 / v8, our lock files will update to the v2 format. Won't that mean we would lose out on transitive remediation until that support is added? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the clarification. Transitive remediation is quite an edge case, so that's why I don't consider it a blocker. Unfortunately some changes to npm>6 make it much harder to achieve. |
Beta Was this translation helpful? Give feedback.
-
That's interesting to hear. Transitive remediation and de-duping of transitive dependencies are really important to us - just wanted to let you know. |
Beta Was this translation helpful? Give feedback.
-
Same here. Transitive dependencies make up the vast majority of our findings and automated fixes from Renovate. |
Beta Was this translation helpful? Give feedback.
-
Linking related issue for awareness: #3080 |
Beta Was this translation helpful? Give feedback.
-
This is now partially supported. If a transitive remediation bubbles all the way up to to cause a |
Beta Was this translation helpful? Give feedback.
-
Workaround: Use dependabot for security updatesOfficial support is available now, but I'd like to introduce the workaround I use. This allows normal package updates to be opened in renovate and security updates in dependabot. This may be useful for those who want to automate the review of security updates. # .github.dependabot.yml
# NOTE: Yaml aliases are not allowed in dependabot.yml. Therefore, there are many duplicates.
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
# PR of security update ignores interval and opens PR at arbitrary timing,
# but this is a required option, so I have no choice to specify it.
interval: "daily"
# Prevent PRs from opening except for security updates
open-pull-requests-limit: 0
# Add reviewers automatically
reviewers:
- "my-org/my-team"
- "octocat"
- package-ecosystem: "npm"
directory: "/packages/pakcage-a"
schedule:
interval: "daily"
open-pull-requests-limit: 0
reviewers:
- "my-org/my-team"
- "octocat"
- package-ecosystem: "npm"
directory: "/packages/pakcage-b"
schedule:
interval: "daily"
open-pull-requests-limit: 0
reviewers:
- "my-org/my-team"
- "octocat" |
Beta Was this translation helpful? Give feedback.
-
I admit that I am way out of my depth in this discussion, but I did see in that starting in version 8.6.0, npm began to "complain" about invalid lock files, ones where |
Beta Was this translation helpful? Give feedback.
-
i came across this issue today, seems like even with the lockfile v3 it isn't working, is there any resolution? |
Beta Was this translation helpful? Give feedback.
-
What would you like Renovate to be able to do?
Support
transitiveRemediation
option for npm v7.Did you already have any implementation ideas?
Unfortunately it needs some bugs in
npm
identified and either fixed by thenpm
team or a workaround found.Beta Was this translation helpful? Give feedback.
All reactions