-
Notifications
You must be signed in to change notification settings - Fork 60
fix: property references are skipped when DependsOn is present (refactor)
#524
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
Conversation
When computing the graph for the stack, if there is a `DependsOn`, the algorithm will ignore other dependencies. Also, `DependsOn` may be a string or an array, and this was not being properly handled.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #524 +/- ##
=======================================
Coverage 78.92% 78.92%
=======================================
Files 46 46
Lines 6980 6980
Branches 777 777
=======================================
Hits 5509 5509
Misses 1452 1452
Partials 19 19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| } | ||
| if ('DependsOn' in value) { | ||
| return [value.DependsOn]; | ||
| const result = Object.values(value).flatMap(findDependencies); |
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.
Bit strange we have to call this again, since we are already doing it in line 61. Can you not:
const result = [];
if ('DependsOn' in value) {
if (Array.isArray(value.DependsOn)) {
result.push(...value.DependsOn);
} else {
result.push(value.DependsOn);
}
}
result.push(...Object.values(value).flatMap(findDependencies))
return result;?
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.
Approved and deqeueud anyway - take it or leave it.
When computing the graph for the stack, if there is a
DependsOn, the algorithm will ignore other dependencies. Also,DependsOnmay be a string or an array, and this was not being properly handled.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license