Skip to content

Commit

Permalink
fix: dependencies for root component where missing with --required_on…
Browse files Browse the repository at this point in the history
…ly (#1305)

* fix: dependencies for root component where missing with --required_only

Signed-off-by: Stefan Fleckenstein <[email protected]>

* fix: postgen map

Signed-off-by: Stefan Fleckenstein <[email protected]>

* fix: dependencies for root component and its components

Signed-off-by: Stefan Fleckenstein <[email protected]>

---------

Signed-off-by: Stefan Fleckenstein <[email protected]>
  • Loading branch information
StefanFl authored Aug 10, 2024
1 parent f9a42d7 commit 775b3b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions postgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ export function filterBom(bomJson, options) {
for (const aref of Object.keys(newPkgMap).sort()) {
newcomponents.push(newPkgMap[aref]);
}
newPkgMap[bomJson.metadata.component["bom-ref"]] =
bomJson.metadata.component;
if (bomJson.metadata.component.components) {
for (const comp of bomJson.metadata.component.components) {
newPkgMap[comp["bom-ref"]] = comp;
}
}
for (const adep of bomJson.dependencies) {
if (newPkgMap[adep.ref]) {
const newdepson = (adep.dependsOn || []).filter((d) => newPkgMap[d]);
Expand Down
2 changes: 1 addition & 1 deletion types/postgen.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 775b3b3

Please sign in to comment.