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

Add support for bun-generated yarn lockfiles #1494

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Add support for bun-generated yarn lockfiles #1494

merged 2 commits into from
Sep 10, 2024

Conversation

cd-work
Copy link
Contributor

@cd-work cd-work commented Sep 10, 2024

The bun JavaScript package manager has the option to generate yarn lockfiles, however lockfiles generated by bun contain an additional header line which caused our existing parser to fail.

To allow our parser to support bun's yarn lockfile format, we now ignore all lines starting with #.

This also fixes an issue with parsing malformed yarn lockfiles, where all parsing failures were accepted as long as the first specified package didn't fail parsing, due to the way many1 works.

Closes #1491.

The bun JavaScript package manager has the option to generate yarn
lockfiles, however lockfiles generated by bun contain an additional
header line which caused our existing parser to fail.

To allow our parser to support bun's yarn lockfile format, we now ignore
all lines starting with `#`.

This also fixes an issue with parsing malformed yarn lockfiles, where
all parsing failures were accepted as long as the first specified
package didn't fail parsing, due to the way `many1` works.

Closes #1491.
@cd-work cd-work requested a review from a team as a code owner September 10, 2024 21:17
Copy link
Contributor

@maxrake maxrake left a comment

Choose a reason for hiding this comment

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

Code reviewed and tested locally. It functions as expected. Requesting changes for a CHANGELOG entry.

Copy link
Contributor

@maxrake maxrake left a comment

Choose a reason for hiding this comment

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

LGTM

@cd-work cd-work enabled auto-merge (squash) September 10, 2024 22:16
@cd-work cd-work merged commit 12fb1a8 into main Sep 10, 2024
15 checks passed
@cd-work cd-work deleted the knitted_rabbit branch September 10, 2024 22:20
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.

Allow parsing Yarn lockfiles generated by bun
2 participants