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

Create lib #1

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Create lib #1

merged 1 commit into from
Sep 20, 2024

Conversation

jayvdb
Copy link
Contributor

@jayvdb jayvdb commented Sep 20, 2024

Allow use of the pnpm structs by other projects

Copy link
Owner

@simonbuchan simonbuchan left a comment

Choose a reason for hiding this comment

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

I'm happy enough in principle, though this is still pretty raw code I crapped out in an evening, so the API will need some work to add flexibility for the uses people will probably have if they want to do more interesting things.

In particular, the workspace file code is very bare bones and not likely useful in practice, as you will want to have a concrete syntax tree to preserve formatting and comments.

That said, if perfect is the enemy of good, then good is the enemy of fine, I guess! A major version bump isn't a huge deal.

@simonbuchan simonbuchan merged commit 4d9a1b0 into simonbuchan:main Sep 20, 2024
1 check passed
@jayvdb jayvdb deleted the create-pnpm-extra-lib branch September 20, 2024 22:56
@jayvdb
Copy link
Contributor Author

jayvdb commented Sep 20, 2024

Thanks Simon. I agree. I expect that the lib here will be unstable for a while, or might even go nowhere. It is a start.

I found two open source pnpm lock file parsers, your one and https://github.com/phylum-dev/cli/blob/1229114ffdbc8f9082e305b7f66c5e6297e15fc5/lockfile/src/javascript.rs#L298 , and that group isnt publishing their code on crates.io . Maybe there are others.

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.

2 participants