This is a simple library for parsing Yarn lockfiles. This is library is heavily inspierd by Yarn's own parser, so it's very imperative-like in many places. I do plan to improve this and make better use of Elixir and OTP's features and ecosystem in the future.
Note on performance: This library was built in part as a learning exercise and therefore does not necessarily apply the best possible practices and tools when it comes to code quality and performance. If performance is important to you, I recommend using Dorgan's library (hex.pm, Github), which uses NimbleParsec for better performance.
The package can be installed by adding ex_yarn
to your list of dependencies in mix.exs
:
def deps do
[
{:ex_yarn, "~> 0.4.1"}
]
end
Documentation is generated with ExDoc and is published at https://hexdocs.pm/ex_yarn.
- Write documentation.
- Wrap the parser's output in a struct to make actual usage of the library easier.
- Improve code quality (this will obviously be an ongoing goal, but credo should at least run without errors for this to be considered "completed").
- Consider using NimbleParsec to replace the parser for better maintainability and performance.
- Reorganize module structure (move ExYarn private functions to other modules)
- Support version 2 of lockfiles