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

Packagelock json bool resolved #775

Merged
merged 5 commits into from
Jan 21, 2022
Merged

Conversation

csasarak
Copy link
Contributor

@csasarak csasarak commented Jan 20, 2022

Overview

This fixes a parser error when a package-lock.json dependency's resolved key is a boolean rather than a string.

Acceptance criteria

The parser for package-lock.json dependencies should ignore a boolean resolved key.

Testing plan

I added unit tests for the dependency parser. I also manually ran fossa analyze against the repo referenced in #718 and verified that it now parses successfully.

To reproduce you can run the master branch's fossa analyze against the repo in the above issue.

Risks

References

Closes fossas/team-analysis#849
Closes #718

Checklist

  • I added tests for this PR's change (or confirmed tests are not viable).
  • If this PR introduced a user-visible change, I added documentation into docs/.
  • I updated Changelog.md if this change is externally facing. If this PR did not mark a release, I added my changes into an # Unreleased section at the top.
  • I updated *schema.json if I have made changes for .fossa.yml, fossa-deps.{json, yaml, yml}. You may also need to update these if you have added/removed new dependency (e.g. pip) or analysis target type (e.g. poetry).
  • I linked this PR to any referenced GitHub issues, if they exist.

@csasarak csasarak force-pushed the packagelock-json-bool-resolved branch from 975503c to d2a7680 Compare January 20, 2022 22:12
@csasarak csasarak force-pushed the packagelock-json-bool-resolved branch from 7ec4404 to 0d81b11 Compare January 20, 2022 22:19
Copy link
Contributor

@skilly-lily skilly-lily left a comment

Choose a reason for hiding this comment

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

LGTM, one comment about test readability

test/Node/NpmLockSpec.hs Outdated Show resolved Hide resolved
@csasarak csasarak marked this pull request as ready for review January 20, 2022 22:52
@skilly-lily skilly-lily mentioned this pull request Jan 20, 2022
@csasarak csasarak merged commit 1a6271d into master Jan 21, 2022
@csasarak csasarak deleted the packagelock-json-bool-resolved branch January 21, 2022 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fossa analyze v.3 fails for npm repo when resolved is not URL in package-lock
2 participants