Skip to content
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

Feat/return packages list #52

Merged
merged 4 commits into from
Oct 15, 2020
Merged

Feat/return packages list #52

merged 4 commits into from
Oct 15, 2020

Conversation

ivanstanev
Copy link
Contributor

  • Tests written and linted
  • Documentation written
  • Commit history is tidy
  • Potential release notes have been inspected

What this does

Packages up until now were returned as a single string with each new line containing the package data.
Readers of this output had to do further processing to extract the relevant package data.
This single-string format was added to the plugin in order to match what the snyk-docker-plugin was expecting; it was used for backwards-compatibility.

Now in addition to this we return the list of packages in a new field in the parser response so it is easier to process them.

Additionally changed the following:

  • exceptions thrown by parsing the RPM package entries are no longer ignored
  • exceptions are now allowed to throw to the caller of the parser
  • improved docs around some types

Notes for the reviewer

Other various improvement added as separate commits 🙏

The interface will be used to build a list of packages returned by the parser, but the comment currently is misleading.
Packages up until now were returned as a single string with each new line containing the package data.
Readers of this output had to do further processing to extract the relevant package data.
This single-string format was added to the plugin in order to match what the snyk-docker-plugin was expecting; it was used for backwards-compatibility.

Now in addition to this we return the list of packages in a new field in the parser response so it is easier to process them.

Additionally changed the following:
- exceptions thrown by parsing the RPM package entries are no longer ignored
- exceptions are now allowed to throw to the caller of the parser
- improved docs around some types
Interfaces can be inferred by the IDE and don't need an "I" prefix in the name.
@ivanstanev ivanstanev requested a review from a team as a code owner October 12, 2020 16:55
@ivanstanev ivanstanev self-assigned this Oct 12, 2020
@snyk-deployer
Copy link

Expected release notes (by @ivanstanev)

features:
return a list of RPM packages for easier processing (89482a5)

others (will not be included in Semantic-Release notes):
add back ESLint rule to prevent interface prefixes (2212b10)
remove comment on the PackageInfo interface (944fb0b)
add prettier as a script to allow consistent formatting (842e7e7)

@agatakrajewska
Copy link
Contributor

Amazing improvements!! 🥇😄 So we still need the string response, I understand sdp now consumes the new format but there's still other consumers?

Copy link

@agranado2k agranado2k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

@ivanstanev ivanstanev merged commit f7a8cde into master Oct 15, 2020
@ivanstanev ivanstanev deleted the feat/return-packages-list branch October 15, 2020 08:32
@snyksec
Copy link

snyksec commented Oct 15, 2020

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants