{"push_id":2836121267,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"2b4d9670b137dba4de79bb0da67577725145a1a9","before":"b399aa0fad75b6e55976363cff4f4c776bbb0d94","commits":[{"sha":"2b4d9670b137dba4de79bb0da67577725145a1a9","author":{"name":"jenkins-bot","email":"61a1c7c885f4fc173424af2875d459c32bdc4fee@gerrit.wikimedia.org"},"message":"Update git submodules\n\n* Update MobileFrontend from branch 'master'\n  to 38214617793eced0895e939ebc5f6e299e97d6f5\n  - Merge \"Hygiene: introduce Webpack bundling\"\n  - Hygiene: introduce Webpack bundling\n    \n    This patch introduces Webpack bundler into the MobileFrontend\n    mobile.startup module to add a layer of indirection between code shipped\n    and code written. This abstraction enables many useful modern JavaScript\n    practices not possible when supporting older browsers such as ES6\n    syntax, minification, enhanced code sharing, and improves the\n    sociability of Wikimedia's code by bringing it into the present.\n    \n    See also:\n    https://www.mediawiki.org/wiki/Reading/Web/Projects/Invest_in_the_MobileFrontend_&_MinervaNeue_frontend_architecture.\n    \n    In detail, this patch makes the following changes:\n    \n     • Add a Webpack config the defines two entrypoints, mobile.runtime and\n       mobile.startup.\n    \n       The former is a new ResourceLoader module of the same name that\n       contains Webpack bootloader / overhead. All MobileFrontend modules\n       that are bundled with Webpack should specify this module as a\n       ResourceLoader dependency instead of packing their own copy.\n    \n       The latter is a partial port of the mobile.startup ResourceLoader\n       module's files to a Webpack'd bundle of the same name. It only\n       contains one file in this patch, modules.js, but may eventually\n       encompass all of the module's file.\n    \n       To simplify configuration and minimize regression concerns, files\n       ported are imported into a new entrypoint file,\n       src/mobile.startup/mobile.startup.js. A future patchset can replace\n       this file with the true entry to allow for dead code elimination and\n       optimization.\n    \n       The configuration itself contains additional detail on the options\n       chosen which were derived mostly from the documentation on\n       https://webpack.js.org/ and previous Webpack experience in Marvin and\n       Popups projects.\n    \n     • Packed code can be identified at a glance. Updated production code is\n       moved from resources/<ResourceLoader module>/<file>.js to\n       src/<ResourceLoader module>/<file>.js.\n    \n     • Dynamic imports and require.ensure() are unused so shimming Promises\n       with jQuery Deferreds is unnecessary.\n    \n       https://webpack.js.org/concepts/#browser-compatibility\n       https://webpack.js.org/guides/shimming/\n    \n     • Literally no changes to modules.js itself.\n    \n     • clean-webpack-plugin is used to eliminate dirty dist/ directory risk\n       and based on its usage in Popups.\n    \n     • The dist/ directory is included both in the .gitignore file and\n       versioned in Git which may be unintuitive. Since the file is tracked\n       by Git, changes will be noted. However, it's proper for other tools\n       such as ripgrep or ag to generally ignore these build artifacts by\n       considering the .gitignore file and not the Git index.\n    \n     • ESLint rules modified to ignore the dist/ directory. Due to the\n       wildcards as opposed to directory specification used in the\n       Gruntfile, an inverted rule was needed there too to avoid warnings.\n    \n     • No errors noted when multiple bundles with multiple runtimes from\n       different versions of Webpack are present but additional\n       configuration consideration may be needed to ensure futureproof\n       behavior.\n    \n       http://localhost:8080/w/index.php?title=Barack_Obama&mobileaction=toggle_view_desktop&debug=true&useformat=mobile&useskin=minerva\n    \n     • The post-Webpack sizing is:\n    \n        RL module       RL module mw.inspect()  Bundle hints  bundlesize  FS size  source-map-explorer size\n        mobile.runtime   1.4 KiB ( 1478 B)      1.46 KiB      755 B       1497 B   NA\n        mobile.startup  54.3 KiB (55580 B)      1.06 KiB      549 B       1085 B   1.08 KB\n    \n      Prior to Webpack, mw.inspect() reports 54.4 KiB (55657 B) for\n      mobile.startup. This means the initial minified uncompressed overhead\n      is approximately the size of the mobile.runtime module,\n      (55580 B + 1478 B) - 55657 B = 1401 B or ~1.37 KiB. Additions to the\n      bundle, or even additional bundles, are expected to increase the\n      savings without adding to the overhead since most of the costs are in\n      the mobile.runtime module which can be shared across files and\n      bundles.\n    \n      Where:\n    \n       • RL module: the ResourceLoader module name OR Webpack JavaScript\n         bundle that is included in the ResourceLoader module of the same\n         name. E.g., mobile.runtime consists of nothing but the\n         mobile.runtime.js bundle so the module and bundle size are\n         identical whereas mobile.startup.js is only a fraction of the files\n         include in the mobile.startup ResourceLoader module.\n       • RL module mw.inspect(): the minified uncompressed total assets\n         sizing reported by ResourceLoader.\n       • Bundle hints: the minified uncompressed sizing reported by Webpack\n         performance hints.\n       • bundlesize: the minified gzipped compressed sizing reported by\n         bundlesize.\n       • FS size: the minified uncompressed file system sizing reported by\n         ls.\n       • source-map-explorer size: the minified uncompressed sizing in\n         kilobytes (not kibibytes) reported by source-map-explorer.\n    \n    Bug: T199452\n    Change-Id: Id65fff224ff34f617aee45eae1e644b106361a74","distinct":true,"url":"https://api.github.com/repos/wikimedia/mediawiki-extensions/commits/2b4d9670b137dba4de79bb0da67577725145a1a9"}]}
{"actor":{"display_login":"wmfgerrit"}}