Nodejs 16 and Webpack 5 transition in Debian🍥

Photo by Lukas on Unsplash

Nodejs 16 and Webpack 5 transition in Debian🍥

my outreachy project in Debian🍥💻

What is Debian 🍥 ?

Debian is also known as Debian GNU/Linux is a free open-source operating system (OS) based currently on the Linux kernel or the FreeBSD kernel, developed by the community-supported Debian Project; although efforts are in place to provide Debian for other kernels, primarily for the Hurd.

Fun fact about Debian 😁💃💃

  • Debian was the first Linux distribution to include a package management system for easy installation and removal of software. It was also the first Linux distribution that could be upgraded without requiring reinstallation.

  • To protect your system against “Trojan horses” and other malevolent software, Debian's servers verify that uploaded packages come from their registered Debian maintainers.

  • Debian comes with over 59000 packages; as of this writing (precompiled software that is bundled up in a nice format for easy installation on your machine), a package manager (APT), and other utilities that make it possible to manage thousands of packages on thousands of computers as easily as installing a single application. All of it is FREE!

  • Debian is also the basis for many other distributions, most notably Ubuntu

What is Webpack ?

Webpack is a static module bundler for modern JavaScript applications. When webpack processes your application, it internally builds a dependency graph from one or more entry points and then combines every module your project needs into one or more bundles, which are static assets to serve your content from

What is nodejs ?

Node.js is an open-source, cross-platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications and also developing server-side applications, Here javascript code is no longer limited to the traditional method of running on the web browser

What does Transitioning mean in Debian?

Transitioning is a concept in Debian about maintaining only one version of a library like webpack, nodejs. There is a bottleneck as other libraries and applications may not support the version we have in Debian. So we have to port that software which For example, mini-css-extract-plugin, mermaid and so many packages useing webpack. In buster we had webpack4, and in bullseye we want to update it to webpack5. mini-css-extract-plugin already supports webpack5, but others like mermaid don't support it yet. So either we wait till mermaid support webpack5(the wait maybe forever😫) or update the mermaid webpack version to webpack5 (that's the beauty of open-source software😁). Check out this chat between my mentor and a community member on transitioning of rails6

Getting Started with Creating or Updating packages in Debian

To be able to create or maintain packages suitable for uploading to Debian you must be in a sid/unstable environment or distribution. See recommended instructions on how to setup Debian Sid via this link

See link on how to debianize a new package

See link for brief steps on how to update a package to its new upstream version. For more detailed content on the whys and hows of updating a package to its new upstream version visit here

Note💡 In updating to the new upstream version we have to watch out for breaking changes caused by both minor updates or major updates. As per semver.org major updates(e.g If the current version is 2.3.4, then 3.0 is a major update) of libraries with versions greater than 1.0 and minor updates(e.g If the current version is 0.10 then 0.11 is a minor update) of libraries with versions less than 1.0 can have breaking changes

The overall flow of webpack5 and nodejs16 transitioning in Debian

After grasping the fundamental process and flow on how to update a package, you are well on your way to transitioning🚀🚀. Transitioning in webpack or nodejs involves building and testing of dependencies or packages that depend on webpack or nodejs respectively called reverse-dependencies, these reverse dependencies are tested and built with the new updated version usually uploaded to the experimental distribution if reverse dependencies are built and tested successfully both reverse dependencies and dependency in this case nodejs or webpack are then uploaded to the unstable/sid distribution for further processing

The major guidelines to follow while transitioning are

  • Find a list of reverse dependencies to fix

  • See if new upstream versions of reverse dependencies are available that supports the transitioning version

  • See if new upstream of reverse dependencies are available that supports the transitioning version works

  • Report bugs found while rebuilding and testing reverse dependencies in Debian

  • Forward bugs found while rebuilding and testing reverse dependencies to upstream

  • Fix or update packages and forward patches upstream

After a successful transitioning phase users of the Debian OS have access to the latest and also oldest installation of these packages via apt based on their preferences, which implies having the benefit of more features, bug fixes, updated security patches from those packages, all these are possible due to the community of amazing people💗🔥