== Resources == * Learn to build from source https://wiki.debian.org/BuildingTutorial * Understanding Breaking changes and Semantic Versioning https://semver.org * Update packages to new upstream versions https://wiki.debian.org/UpdatingaPackagetoNewUpstreamVersion * Webpack major changes from version 4 => 5 https://webpack.js.org/migrate/5/ * For reporting bugs of failed packages https://www.debian.org/Bugs/Reporting * [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001549|Mail Template for node-mermaid to file subsequent bug report for webpack5 reverse dependencies]] * To search all bugs with webpack5 usertag https://udd.debian.org/cgi-bin/bts-usertags.cgi * To see list of all reverse dependencies of webpack5 with usertag `webpack5` https://udd.debian.org/cgi-bin/bts-usertags.cgi?user=pkg-javascript-devel%40alioth-lists.debian.net&tag=webpack5 == Contribution Tasks == Update the following packages (add your name next to the package before you start to avoid more than one person updating at same time) * node-isurl 4.0.1 to 4.0.2 ('''Caleb O.A.''') * node-dompurify 2.3.0 to 2.3.3 ('''Caleb O.A.''') * node-yargs 15.3.1 -> 17.2.1 ('''Ayoyimika''') * node-jszip 3.5.0 to 3.7.1 ('''Ayoyimika''') * node-lunr 2.3.8 to 2.3.9 ('''Caleb O.A.''') == Project Tasks == We need to test autopkgtest failure and rebuild failure for both nodejs and webpack. autopkgtests are already known 1. https://release.debian.org/britney/pseudo-excuses-experimental.html#nodejs 1. https://release.debian.org/britney/pseudo-excuses-experimental.html#node-webpack For rebuilds, use [[Packaging/ruby-team-meta-build]] Steps: 1. Find list of packages to fix 1. See if new upstream versions are available 1. See if new upstream version works 1. Report bugs in debian 1. Forward bugs upstream 1. Fix packages and forward patches == Working with chroot == We basically have two separate chroots 1. debian-sid 1. unstable-amd64-sbuild The first one (debian-sid) is always for local development and is an unclean chroot having side-effects. The other one (unstable-amd64-sbuild) is for clean builds as it is a clean chroot. If we manually installed anything in the clean chroot it becomes unclean also. == Building Webpack 5 == There are two options to consider when building Webpack 5. 1. We either go through the manual work of modifying the `debian/control` file of individual reverse dependencies of Webpack 5 by adding `webpack >= 5~` to make it test with Webpack 5 or, 1. we make an exception by just building Webpack in an unclean chroot which would mean installing Webpack 5 in our clean chroot, thereby making it unclean. This will make Webpack 5 available to all reverse dependencies and will be used for their builds. The first option involves a lot of manual work, modifying the `debian/control` file of all reverse dependencies. For example testing node-axios with Webpack 5 would mean adding `webpack >= 5~` to its `debian/control` file. To make this easier we choose the second option, which is an exception that permits us to build in an unclean chroot just for Webpack 5. If chroot already has Webpack 5 then every package built using that chroot will use the chroot's installation of Webpack rather than installing Webpack 5 for each reverse dependencies, they all just use the global installation in the chroot. Usually, sbuild will install only packages mentioned in build depends of `debian/control` file of each package in a clean chroot. But since we can't do the manual work of pointing the version of webpack in build depends of each package to 5. We install Webpack 5 in the chroot ourselves. So we should discard this chroot and recreate a clean chroot after we test webpack 5. == Notes for webpack 5 porting == If a package wants to use webpack.config.babel.js, then it needs to add @babel/register in debian/nodejs/extlinks. TODO: patch webpack to look in /usr/share/nodejs for @babel/register. {{{ [webpack-cli] Unable load '/home/ayoyimika/debian-js-packaging/mermaid/node-mermaid/.webpack/webpack.config.babel.js' [webpack-cli] Unable to use specified module loaders for ".babel.js". [webpack-cli] Cannot find module '@babel/register' from '/home/ayoyimika/debian-js-packaging/mermaid/node-mermaid/.webpack' [webpack-cli] Cannot find module 'babel-register' from '/home/ayoyimika/debian-js-packaging/mermaid/node-mermaid/.webpack' [webpack-cli] Cannot find module 'babel-core/register' from '/home/ayoyimika/debian-js-packaging/mermaid/node-mermaid/.webpack' [webpack-cli] Cannot find module 'babel/register' from '/home/ayoyimika/debian-js-packaging/mermaid/node-mermaid/.webpack' [webpack-cli] Please install one of them [webpack-cli] Error: Unable to use specified module loaders for ".babel.js". }}} ---- === Need Help === Packages listed below are failing and seems harder to fix, ''others - these could be removed if not fixed'' * node-mermaid [[DebianBug:1001549]] * jupyter-notebook [[DebianBug:1011522]] * leaflet-image [[DebianBug:1003260]] * node-jsonld [[DebianBug:1003502]] * node-node-forge [[DebianBug:1002861]] === Completed === * jekyll * glewlwyd [[DebianBug:1011519]] * node-axios * node-babel-loader [[DebianBug:1001683]] * node-clipboard * node-es6-promise * node-jschardet * node-lodash * node-fuzzaldrin-plus * node-katex * node-prop-types [[DebianBug:1002862]] * node-matrix-js-sdk [[DebianBug:1003505]] * node-mini-css-extract-plugin * node-mocha * q2-demux [[DebianBug:1011446]] * shaarli [[DebianBug:1011447]] * node-stats-webpack-plugin * node-turbolinks * node-url-parse * node-vue-resource * node-webpack-sources [[DebianBug:1011973]] * rainloop [[DebianBug:1001632]] - patch available in salsa * pdf.js [[DebianBug:1001631]] - ready in salsa, need node-dommatrix to clear NEW * ipywidgets - build failure seems unrelated to webpack 5 * node-react-audio-player - [[https://alioth-lists.debian.net/pipermail/pkg-javascript-devel/2022-May/069294.html|this package can be removed from the archive]] * node-source-map [[DebianBug:1004658]] - salsa master branch has fix for webpack 5, but will need to update build to use packaged rust libraries instead of downloading from the internet.