-
Notifications
You must be signed in to change notification settings - Fork 567
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
fix: correct remediation broken after last refactoring #507
Conversation
f39fe7a
to
42c2341
Compare
@@ -304,13 +311,6 @@ async function assembleLocalPayloads(root, options): Promise<Payload[]> { | |||
body.depGraph = depGraph; | |||
} | |||
|
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.
moved the code + flipped the condition
@@ -0,0 +1,172 @@ | |||
{ |
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.
this is artificial, just to be compatible enough with npm-package
fixture for the test to run
@@ -0,0 +1,89 @@ | |||
import * as tap from 'tap'; |
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.
this file more or less copies cli-acceptance (we need a mock Registry), but only runs runTest
🎉 This PR is included in version 1.163.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What does this PR do?
Fixes remediation which got broken in v1.161.2
Remediation relies on annotations added to the test result from the Registry. These annotations are added depending on
payload.modules
, which is a piggybacking field on a request description object. In the latest refactoring, modules were erroneously (and under inverse conditions) assigned tobody.modules
, which broke the refactoring workflow.Apart from the fix, now there are:
Where should the reviewer start?
The fix itself is at the bottom of src/lib/snyk-test/run-test.ts
The rest is just tests and typechecks.
How should this be manually tested?
snyk wizard
now forks on snyk-fixtures/npm-lockfiles/goof-yarn (e.g. not offering to fixbraces
which it shouldn't).Any background context you want to provide?
The bug was introduced in 73e96aa