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

Unexpected error while analysis of yarn.lock created by bun #5962

Open
tina-junold opened this issue Sep 28, 2023 · 1 comment
Open

Unexpected error while analysis of yarn.lock created by bun #5962

tina-junold opened this issue Sep 28, 2023 · 1 comment
Labels

Comments

@tina-junold
Copy link

Describe the bug
When using bun instead of yarn to generate a lock file, the format does not match the expectations of the analyzer

Version of dependency-check used
latest docker version, using the script in the description on docker hub

Log file
https://gist.github.com/tburschka/377fb54eaa196271fd6dda44a1944c6c

To Reproduce

[install.lockfile]
print = "yarn"
  • run bun install
  • run the dependency-check script from docker description

Expected behavior
The analysis of the yarn.lock should not fail

Additional context
alternative: support for the bun.lockb (binary) lockfile ;-)

@tina-junold tina-junold changed the title Unexpected error while analyis of yarn.lock created by bun Unexpected error while analysis of yarn.lock created by bun Sep 28, 2023
@chadlwilson
Copy link
Contributor

All the YarnAuditAnalyzer does is to run yarn audit if it detects a yarn.lock. it doesn't actually parse the lock file directly.

If you have yarn available, but yarn itself cannot understand bun-created lock files, then ODC can't do much about that. If you do not have yarn available then I guess you'd expect this to fail. - although maybe not as gracefully as would be useful.

FWIW, right now ODC's YarnAuditAnalayzer doesn't work with Yarn Berry (v2+) anyway (#4215 & #4894) and you get a similar error, so it may be related - especially if bun is generating yarn v2+ format lockfiles that would only work with Yarn Berry.

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

No branches or pull requests

2 participants