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: added initial dependencies parser implementation #20

Merged
merged 1 commit into from
Feb 11, 2019

Conversation

Kirill89
Copy link
Contributor

@Kirill89 Kirill89 commented Feb 10, 2019

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Added initial dependencies parser implementation.

TODOs:

  • parse nuget dependency options
  • handle comments in parseGroupOption
  • parse clitool source
  • parse git source
  • parse gist source
  • parse http source

But I believe we can continue without it for now.

@Kirill89 Kirill89 changed the base branch from feat/cherry-pick-line-parser to master February 10, 2019 15:15
@Kirill89 Kirill89 closed this Feb 10, 2019
@Kirill89 Kirill89 reopened this Feb 10, 2019
const parts = line.match(re).splice(1);
const [repo, version] = parts[0].split(':');

return {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we do some validation in case the file we get is not valid according to what we know?

We could just log it in debug mode for now if it's irrelevant to getting the dependencies themselves.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would ratter ignore this for now and fail with default out of bounds exception. We need to replace line parser with proper tokenizer anyway, let's do it there?

@Kirill89 Kirill89 merged commit 5dbbffc into master Feb 11, 2019
@Kirill89 Kirill89 deleted the feat/dependencies-parser branch February 11, 2019 10:23
@snyksec
Copy link

snyksec commented Feb 11, 2019

🎉 This PR is included in version 1.2.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.

3 participants