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

why yarn.lock not use JSON file? #2250

Closed
rhinoceros opened this issue Dec 14, 2016 · 8 comments
Closed

why yarn.lock not use JSON file? #2250

rhinoceros opened this issue Dec 14, 2016 · 8 comments

Comments

@rhinoceros
Copy link

Hello:
why yarn.lock not use JSON file?

@rhinoceros
Copy link
Author

we want to pasrs yarn.lock , to edit some filed.
eg. in order to count ut line coverage , we want to change

istanbul@^0.4.0:
version "0.4.5"
resolved "http://172.18.2.109:7001/istanbul/download/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b"

==>
istanbul@^0.4.0:
version "0.4.4"
resolved "http://172.18.2.109:7001/istanbul/download/istanbul-0.4.4.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b"

@mcharytoniuk
Copy link

It's YAML (https://en.wikipedia.org/wiki/YAML) but you shouldn't edit yarn.lock manually anyway.

@rhinoceros
Copy link
Author

@mcharytoniuk thanks for help.

@itajaja
Copy link

itajaja commented Oct 13, 2017

it's not yaml, unfortunately. I am curious about why you didn't pick a standard format, as would make parsing it much easier. our use case is that we are gathering a list of dependencies for our systems, and the script is not written in javascript, so relying on json or yaml would be much better :)

@milesj
Copy link

milesj commented Oct 13, 2017

@itajaja
Copy link

itajaja commented Oct 13, 2017

as I stated, the script is not written in javascript (it gathers dependencies from multiple systems/languages). it just seems a reasonable choice to use an established format, so I am curios why that wasn't the case for yarn. especially considered that the file is "almost" yaml, why not support it entirely?

@itajaja
Copy link

itajaja commented Oct 13, 2017

I am doing this, and now I feel dirty inside

image

@taion
Copy link

taion commented Oct 16, 2017

I want to reiterate the importance of the above point. There are a number of real use cases where it's important to e.g. gather dependencies across an entire deployed project, such as when regulatory concerns exist. It would be great, then, if there were a better way than the above to figure out what's in a Yarn lockfile, when using something other than Node as our scripting language.

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

No branches or pull requests

5 participants