Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

save yarn output to DB with fully resolved dependency versions #192

Open
g-k opened this issue Feb 27, 2020 · 0 comments
Open

save yarn output to DB with fully resolved dependency versions #192

g-k opened this issue Feb 27, 2020 · 0 comments

Comments

@g-k
Copy link
Contributor

g-k commented Feb 27, 2020

When yarn.lock is present it doesn't require a full install to list deps. That's good!
However, yarn --list --json outputs jsonlines with the child constraint and not the fully resolved package version (e.g. ["[email protected]",[{"name":"babel-runtime@^6.22.0","color":"dim","shadow":true}]] from .data | .trees[] | [.name,.children] jq filter) . That's not so good! It complicates things for us.

We've taken the approach of storing fully resolved versions for edges between the package nodes, so we don't have to replicate how each language and package manager resolves dependencies (in code or the DB), and would like to continue doing so.

A few options:

  • replicate semver and other version matching in the DB or postprocessing code (if yarn uses a subset of full semver and it's fairly stable and not ambiguous that might not be too bad e.g. we can link
["[email protected]",[{"name":"sparkles@^1.0.0","color":"dim","shadow":true}],0]
["[email protected]",[],0]

without a problem)

  • possibly reuse the depth field from the children
  • run a full install and examine things on disk
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant