Most of the time, adding a library or package as a dependency to a JavaScript project using yarn (or its ancestor npm) is as simple as typing yarn add the-pkg-i-want to get the latest version.

But this article is not about that. This article is for when things aren’t so simple.

To really understand exactly what happens during package resolution, there’s no better way than to run the actual code yarn uses to decide amongst package versions. That’s exactly what we are going to do in this article. Literally. In this page, in your browser, querying the live npm registry.

[The full article is hosted here on GitHub Pages]