The open-source dependency management project Yarn is looking to keep with the ever-changing industry with a new focus and plans for the next version and beyond. The team just revealed its roadmap for version 2 (codenamed Berry) along with major changes users can expect in the future.
“When the Yarn project started back in 2016, our landscape was very different from what it is now. Package locking was far from being a first class citizen in the JavaScript ecosystem, and the time needed to run an install wa … well, it was what it was. Yarn’s release shook the status quo and started a movement that ended up being beneficial to everyone, other package managers included. Now is the time to assess where we are, reinforce our strengths and patch our weaknesses,” the team wrote in a post.
Currently Yarn features the ability to cache every package it downloads, parallelize operations for maximum resource utilization, verify the integrity of installed packages before code is executed and guarantee an install that works on one system will work on any other system. In addition, the project includes an offline mode, improved network performance, network resilience and a flat mode.
Some major changes expected to come to the project this year include: making the lockfile and configuration format a strict subset of YAML; support for plugins; making Yarn an API in addition to a CLI; support for Node 4 and 6; and overhauling the log system.
New features expected include nested workspaces support, the ability to run “yarn run foo:bar” regardless of the workspace, a new resolution protocol, a new command for enforcing constraints, a new dependency type, and updates to the yarn link command.
In addition, the team says to expect bug fixes as it works to modernize the codebase.
“As you might guess, this isn’t a comprehensive list — we plan Berry to be the big refactoring that Yarn had needed for a while now so many internal systems will be reworked. After that we expect following majors to become much smaller, as we’ll have strong foundation for building new features and reworking the project one component at a time,” the team wrote.
According to the team, the reason it is going ahead with so many changes is because of its philosophy:
- Developing JavaScript projects shouldn’t leave the door open to surprises
- Developing JavaScript projects should be easy
- Contributing to the Yarn ecosystem should be simple
Additional goals for 2019 include:
- Making Yarn a development-first tool
- Rewriting Yarn in TypeScript
- Making Yarn an API while splitting internal components into module entities
- Designing Yarn to support different install targets than Node
- Preserving overall compatibility