{"id":59,"date":"2019-08-01T15:08:13","date_gmt":"2019-08-01T13:08:13","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/npm-from-its-conception-to-its-future\/"},"modified":"2019-12-10T11:39:20","modified_gmt":"2019-12-10T10:39:20","slug":"npm-from-its-conception-to-its-future","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/","title":{"rendered":"npm: from its conception to its future"},"content":{"rendered":"\n<p><strong>npm<\/strong> is a <strong>dependency manager for the NodeJS<\/strong> ecosystem, composed of two main elements:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>a registry with all the packages that can be installed in a NodeJS project<\/li><li>the npm CLI, which provides the ability to workout which dependencies are required for the project<\/li><\/ol>\n\n\n\n<p>npm is bundled together with <strong>NodeJS<\/strong>, so if you have a NodeJS environment on your machine, there is also npm installed with that.<\/p>\n\n\n\n<p>The packages in the registry are immutable for each version: this means that it&#8217;s not possible to update a package submitted to the npm registry, but rather it is mandatory to publish a new version for it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How npm CLI works?<\/h2>\n\n\n\n<p>It all starts with <code>npm install<\/code>.<\/p>\n\n\n\n<p>The npm CLI is the tool that computes the dependencies required by the project, fetches them from the registry (if not downloaded yet, i.e. when adding a new library to an existing project) and executes building scripts, putting all the results into the <code>node_modules<\/code> folder. The best feature of npm CLI is the local dependency trees for each project, so that no conflict can arise for dependencies when the server is hosting multiple applications.<\/p>\n\n\n\n<p>First releases of npm CLI were using pretty simple approaches, downloading recursively the dependencies for each package: that led to very nested folders inside <code>node_modules<\/code> and pretty &#8220;fat&#8221; project folders, hence the meme of the heaviest object in the universe:<\/p>\n\n\n\n<div style=\"text-align: center; margin: 0; padding: 0; width: 100%;\"><figure><img decoding=\"async\" class=\"alignnone size-medium wp-image-5345\" style=\"max-height: 350px; width: auto;\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tfugj4n3l6ez.png\"><\/figure><\/div>\n\n\n\n<p>The process was also slow as many packages had to be downloaded from the registry and a lot of disk I\/O was required to complete the process.<\/p>\n\n\n\n<p>Managing the dependency tree is a tricky task, as we\u2019ll see later in the \u201clock file\u201d section. Indeed it requires not only a better logistic approach for the download and disk I\/O but also the foundation for the reproducibility of the installation process.<\/p>\n\n\n\n<p>Since npm CLI version 3, the approach has been smarter, so that shared dependencies are worked out to build a flatten tree, less download and disk I\/O in general was required. Newer versions of npm CLI refined this approach to reduce as much as possible the overhead required to install, challenged by another competitor arised meanwhile: <code>yarn<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is yarn?<\/h2>\n\n\n\n<p><code>yarn<\/code> is another CLI application, a npm registry client, which aims to map the same feature of npm, but <strong>faster<\/strong>. The <code>yarn<\/code> project was created by some big companies like Google and Facebook amongst the others to provide a secure and faster alternative to npm. It periodically makes a copy of the npm registry and provides a lock file (<code>yarn.lock<\/code>) by default.<\/p>\n\n\n\n<p>Since <code>yarn<\/code> introduced the lock file by default, also npm started providing one (<em>package-lock.json<\/em>), which was before an optional feature behind a flag.<\/p>\n\n\n\n<p>But what exactly is this lock file? Why <code>yarn<\/code> decided it was so important to have it by default?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The lock file<\/h2>\n\n\n\n<p>The <strong>lock file<\/strong> aims to solve a typical problem of dependency management systems: the <strong>reproducibility of the installation process<\/strong>. With a single <em>package.json<\/em> file (as in the original <code>npm<\/code> approach), the developer has the ability to choose which versions of the libraries s\/he wants to use, but has no power on the rest of the dependency tree (which can be very deep). This means that an author of a dependency expressed in the <em>package.json<\/em> (or even a sub-dependency at any level of the tree) could arbitrarily update his library in a way that can lead to a conflict in the final project.<\/p>\n\n\n\n<p>The lock file makes a snapshot of the whole tree once installed and use this snapshot, when available, to replicate the same setup: a sort of &#8220;work on my machine&#8221; extended to the dependency management.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The next generation<\/h2>\n\n\n\n<p>So far we&#8217;ve been talking about npm and its history, as well as about <code>yarn<\/code>. But have they reached the tip of the mountain in terms of speed and user experience for dependency management? Well, not yet.<\/p>\n\n\n\n<p>Both projects are still pursuing the performance target to improve the CLI and have an almost zero-time install experience. Interestingly, during the latest JSconf EU 2019 both the projects showcased two completely opposite approaches to this goal.<\/p>\n\n\n\n<p>npm presented the <strong>tink<\/strong> project, which eventually will be merged into the next npm CLI project. The idea is to let <code>tink<\/code> compute the dependencies just before runtime, fetching only the strictly required files from each dependency. This means no more packages in <code>node_modules<\/code> with test and documentation folders, source code or unused dependencies. For production environments, a special command will be provided to bundle this list of files and install them.<\/p>\n\n\n\n<p>On the other hand the yarn project is going in the completely opposite direction, keeping the <code>node_modules<\/code> folder and fill it with <strong>compressed package files<\/strong>. Avoiding to uncompress each package saves a lot of CPU and disk I\/O time during the installation process, and additional security checks can be applied to them. In the end, their idea is to commit the <code>node_modules<\/code> folder to bring the next level of lock safeness to the project.<\/p>\n\n\n\n<p>With both projects presenting their (opposite) ideas on how to improve the install experience, we can now try to figure out what the future will bring.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s next?<\/h2>\n\n\n\n<p>The state of the art for both npm CLI and <code>yarn<\/code> has been presented now, but no particular evolution has been seen on the registry side of npm for many years. This year, at the JSconf EU 2019 conference, a new project on this topic has been presented, by no-less than the former npm CTO <strong>C. J. Silverio<\/strong>.<\/p>\n\n\n\n<p>We recommend to watch the full talk, as it provides very interesting insights on the npm registry world which only few people in the world can have:<\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"The economics of open source by C J Silverio | JSConf EU 2019\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube-nocookie.com\/embed\/MO8hZlgK5zc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>For those who prefer to jump to the final point, here&#8217;s the conclusion. npm has been always a centralized registry for the NodeJS ecosystem, beating competition because it got bundled in the NodeJS binary. Due to some recent rumors about economic difficulties for npm inc., the NodeJS world started to look around for alternatives before doom\u2019s day and half of the Internet collapses because npm registry has had to close (remember those funny days of <a href=\"https:\/\/blog.npmjs.org\/post\/141577284765\/kik-left-pad-and-npm\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">leftpad<\/a>?).<\/p>\n\n\n\n<p>C. J. Silverio proposes a federated package manager called <b>entropic<\/b> which works like the npm CLI but has multiple registries federated to look for packages. This will bring more resilience to the NodeJS ecosystem with a robust solution which does not depend on a single company infrastructure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/youtu.be\/SHIci8-6_gs\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">&gt;Tink: A Next-Generation Package Manager<\/a><\/li><li><a href=\"https:\/\/youtu.be\/XePfzVs852s\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Yarn \u2014 2019 and Beyond<\/a><\/li><li><a href=\"https:\/\/youtu.be\/MO8hZlgK5zc\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">The economics of open source<\/a><\/li><li><a href=\"https:\/\/blog.npmjs.org\/post\/141577284765\/kik-left-pad-and-npm\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">kik, left-pad, and npm<\/a><\/li><li><a href=\"https:\/\/yarnpkg.com\/blog\/2016\/10\/11\/introducing-yarn\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Yarn: A new package manager for JavaScript<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>npm is a dependency manager for the NodeJS ecosystem, composed of two main elements: a registry with all the packages that can be installed in a NodeJS project the npm CLI, which provides the ability to workout which dependencies are required for the project npm is bundled together with NodeJS, so if you have a&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/\">Read more<\/a><\/p>\n","protected":false},"author":10,"featured_media":60,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[36],"tags":[],"collections":[],"class_list":{"0":"post-59","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-backend","8":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>npm: from its conception to its future - Codemotion Magazine<\/title>\n<meta name=\"description\" content=\"An overview of how npm (and its competitor yarn) works, and which developments to expect in the near future for the NodeJS ecosystem.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"npm: from its conception to its future\" \/>\n<meta property=\"og:description\" content=\"An overview of how npm (and its competitor yarn) works, and which developments to expect in the near future for the NodeJS ecosystem.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-01T13:08:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-10T10:39:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Marco Liberati\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Marco Liberati\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/\"},\"author\":{\"name\":\"Marco Liberati\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/35b2a685d3154030dccf48af78880509\"},\"headline\":\"npm: from its conception to its future\",\"datePublished\":\"2019-08-01T13:08:13+00:00\",\"dateModified\":\"2019-12-10T10:39:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/\"},\"wordCount\":1094,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg\",\"articleSection\":[\"Backend\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/\",\"name\":\"npm: from its conception to its future - Codemotion Magazine\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg\",\"datePublished\":\"2019-08-01T13:08:13+00:00\",\"dateModified\":\"2019-12-10T10:39:20+00:00\",\"description\":\"An overview of how npm (and its competitor yarn) works, and which developments to expect in the near future for the NodeJS ecosystem.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg\",\"width\":800,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Backend\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/backend\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"npm: from its conception to its future\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/35b2a685d3154030dccf48af78880509\",\"name\":\"Marco Liberati\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5f7b8b739c7398e9a151fa3f30d1f29fb44a77c4723ece6995dd896d3ad0c90e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5f7b8b739c7398e9a151fa3f30d1f29fb44a77c4723ece6995dd896d3ad0c90e?s=96&d=mm&r=g\",\"caption\":\"Marco Liberati\"},\"description\":\"I am passionate about data visualisation and the start-up enviroment. If I can write in JS I will, and it will probably be mapped into a graphDB and visualised: I like drawing pixels on the screen, better if I can do it with Javascript and ReactJS. Recently I've been exploring the GraphQL world and how it can leverage the productivity of developers for building complex apps and\/or data dashboards. Community fellow of the RomaJS and GraphRM.\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/marco-liberati\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"npm: from its conception to its future - Codemotion Magazine","description":"An overview of how npm (and its competitor yarn) works, and which developments to expect in the near future for the NodeJS ecosystem.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/","og_locale":"en_US","og_type":"article","og_title":"npm: from its conception to its future","og_description":"An overview of how npm (and its competitor yarn) works, and which developments to expect in the near future for the NodeJS ecosystem.","og_url":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2019-08-01T13:08:13+00:00","article_modified_time":"2019-12-10T10:39:20+00:00","og_image":[{"width":800,"height":400,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg","type":"image\/jpeg"}],"author":"Marco Liberati","twitter_card":"summary_large_image","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Marco Liberati","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/"},"author":{"name":"Marco Liberati","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/35b2a685d3154030dccf48af78880509"},"headline":"npm: from its conception to its future","datePublished":"2019-08-01T13:08:13+00:00","dateModified":"2019-12-10T10:39:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/"},"wordCount":1094,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg","articleSection":["Backend"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/","url":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/","name":"npm: from its conception to its future - Codemotion Magazine","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg","datePublished":"2019-08-01T13:08:13+00:00","dateModified":"2019-12-10T10:39:20+00:00","description":"An overview of how npm (and its competitor yarn) works, and which developments to expect in the near future for the NodeJS ecosystem.","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg","width":800,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/npm-from-its-conception-to-its-future\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"Backend","item":"https:\/\/www.codemotion.com\/magazine\/backend\/"},{"@type":"ListItem","position":3,"name":"npm: from its conception to its future"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/35b2a685d3154030dccf48af78880509","name":"Marco Liberati","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5f7b8b739c7398e9a151fa3f30d1f29fb44a77c4723ece6995dd896d3ad0c90e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5f7b8b739c7398e9a151fa3f30d1f29fb44a77c4723ece6995dd896d3ad0c90e?s=96&d=mm&r=g","caption":"Marco Liberati"},"description":"I am passionate about data visualisation and the start-up enviroment. If I can write in JS I will, and it will probably be mapped into a graphDB and visualised: I like drawing pixels on the screen, better if I can do it with Javascript and ReactJS. Recently I've been exploring the GraphQL world and how it can leverage the productivity of developers for building complex apps and\/or data dashboards. Community fellow of the RomaJS and GraphRM.","url":"https:\/\/www.codemotion.com\/magazine\/author\/marco-liberati\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo-600x400.jpg","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo-600x400.jpg","author_info":{"display_name":"Marco Liberati","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/marco-liberati\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg",800,400,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo-150x150.jpg",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo-300x150.jpg",300,150,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo-768x384.jpg",768,384,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg",800,400,false],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg",800,400,false],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg",800,400,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg",100,50,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo-180x128.jpg",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo.jpg",800,400,false],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo-400x225.jpg",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo-600x400.jpg",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/npm_logo-600x400.jpg",600,400,true]},"uagb_author_info":{"display_name":"Marco Liberati","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/marco-liberati\/"},"uagb_comment_info":0,"uagb_excerpt":"npm is a dependency manager for the NodeJS ecosystem, composed of two main elements: a registry with all the packages that can be installed in a NodeJS project the npm CLI, which provides the ability to workout which dependencies are required for the project npm is bundled together with NodeJS, so if you have a&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":3,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":2007,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/59\/revisions\/2007"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/60"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=59"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}