A SHORT HISTORY OF PACKAGE MANAGERS

We are almost at the end of our first cycle of lectures here at Sipod.

This Thursday, our colleague Dusan talked about the history of package managers and differences between them.

For those who don’t know what package managers are, it’s a collection of software tools that automate the process of installing, upgrading, configuring, and removing computer programs for operating systems in a consistent manner.

The primary function of any package manager is to install some package from a global registry into an engineer’s local environment.

Package managers eliminate the need for manual installs and updates which can be particularly useful for large enterprises whose operating systems are based on Linux.

Without package managers, users must ensure that all of the required dependencies for a piece of software are installed and up-to-date, compile the software from the source code, and manage configuration for each piece of software.

NPM

Node.js package manager (npm) is a package manager for the JavaScript programming language.

Node.js package manager consists of a command line client, also called npm, and an online database of public and paid-for private packages called the npm registry. The registry is accessed via the client, and the available packages can be browsed and searched via the Npm website.

YARN

Yarn enables engineers to move faster and with confidence when using shared code so they can focus on building new products and features.

Yarn is a new package manager that replaces the existing workflow for the npm client, while remaining compatible with the npm registry.

It has the same feature set as existing workflows, while operates faster, more securely, and more reliably. Yarn enables engineers to move faster and with confidence when using shared code so they can focus on building new products and features

Whenever npm or Yarn needs to install a package, it carries out a series of tasks. In npm, these tasks are executed per package and sequentially, meaning it will wait for a package to be fully installed before moving on to the next. Yarn executes these tasks in parallel, which increases performance.

Approximately, Yarn is 4.7 times faster than npm.  It seems the difference in speed depends on the amount of packages that are being installed, but every time Yarn is consistently faster than npm.