-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Improve printOccurrences function with streaming output for large SBO… #1482
Conversation
8494ee3
to
5710a30
Compare
This is amazing. Could you kindly run pnpm lint and remove any extra new lines. Also revert the package.json changes. |
sure |
a5eaee4
to
284ca60
Compare
I have run pnpm lint, removed any extra new lines, and reverted the changes to package.json. The pull request has been updated accordingly. Please let me know if anything else is needed! |
Please remove package-lock.json and .vscode changes. |
9b78da6
to
4028837
Compare
done |
I meant this branch should only have display.js changes alone. |
Signed-off-by: deeshantk <[email protected]>
4028837
to
16353c0
Compare
Thank you for the clarification! I have now updated the branch so that it only includes the changes to display.js |
lib/helpers/display.js
Outdated
if (!bomJson || !bomJson.components) { | ||
console.error("Invalid or empty SBOM data."); |
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 error log can be removed, since empty bom data will be flagged elsewhere.
lib/helpers/display.js
Outdated
}, | ||
columnCount: 4, | ||
columns: [{ width: 20 }, { width: 40 }, { width: 50 }, { width: 25 }], |
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.
Is this tested? Width 25 in column 4 for filenames might be too small.
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.
- Removed the unnecessary error log for empty BOM data, as it will be flagged elsewhere. - Increased column width for filenames from 25 to a more suitable size. Signed-off-by: deeshantk <[email protected]>
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.
Thank you so much!
Fixes issue #1482. |
Refactored the printOccurrences function to use streaming for better performance with large SBOM datasets.