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(deps): migrate js-yaml to yaml #8326

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danielbayley
Copy link

yaml is a better library, and handles comments much better than js-yaml, which is no longer maintained, since ~3 years now.

Precondition for #6273. Also related to zkochan/packages#198.

@danielbayley danielbayley marked this pull request as draft July 21, 2024 23:02
@zkochan
Copy link
Member

zkochan commented Jul 21, 2024

We use a fork of js-yaml with some changes added for pnpm specifically. Like formatting some fields in the lockfile the way we want.

@danielbayley
Copy link
Author

danielbayley commented Jul 21, 2024

We use a fork of js-yaml with some changes added for pnpm specifically. Like formatting some fields in the lockfile the way we want.

Ok, so we also fork/patch yaml and implement the same changes… @zkochan Is it just the commits listed here? What are the important changes? Are there tests against them?

@zkochan
Copy link
Member

zkochan commented Jul 22, 2024

IIRC the changes were related to formatting. There is probably just one test that checks the format of the generated lockfile: https://github.com/pnpm/pnpm/blob/main/lockfile/lockfile-file/test/__snapshots__/write.test.ts.snap

@danielbayley
Copy link
Author

Ok, so I don’t have access to pnpm org to be able to fork yaml@zkochan If you could, then I can try and replicate the same changes there, as to the js-yaml fork.

@zkochan
Copy link
Member

zkochan commented Jul 22, 2024

ok, done
https://github.com/pnpm/yaml

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.

None yet

2 participants