Page MenuHomePhabricator

[EPIC] Transition Gruntfile.js tasks to NPM scripts
Open, Needs TriagePublic

Description

Background and overview

Epic umbrella task for transitioning Grunt JavaScript task runner tasks into npm scripts in Wikimedia deployed projects.

With the decline of Grunt for many years now, it won't be feasible to use it infinitely without risking modern functionality and abilities and security (read below). The last release dates back to Jan 2023.
In a recent NPM audit in Oct 2025, a security vulnerability was identified, where Grunt, depends on an unmaintained version of Glob.

This task tracks the overall progress while T246326: Process template: How to transition Gruntfile.js tasks to NPM scripts serves with examples.

Besides the pure technical transition challenges, we also need to ensure to update documentation and remove mentions of Grunt.
https://www.mediawiki.org/wiki/Continuous_integration/Entry_points

Goal

Transition Grunt tasks using projects away with npm as current technology choice

Acceptance criteria for done

  • Transition each of the projects below
  • Remove mentioning of/replace Grunt in documentation
  • Update LibUp configuration

Projects (Wikimedia deployed)

MediaWiki core

  • MediaWiki Core

Extensions
From prior art tasks

Newly captured in this task

Skins

Other projects

Prior art

T246321: [EPIC] Transition Gruntfile.js tasks to NPM scripts in some projects

Event Timeline

Change #1207876 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] npm: remove Gruntfile and grunt in favor of npm task

https://gerrit.wikimedia.org/r/1207876

The checkbox in the task description for MediaViewer is currently ticked, but FYI (at a first look) it seems like this might not currently be implemented for that extension (as the task is marked as declined/the linked patch was abandoned).

Change #1207876 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] npm: remove Gruntfile and grunt in favor of npm task

https://gerrit.wikimedia.org/r/1207876

Updating the BoilerPlate and Examples extensions should probably be part of the acceptance criteria, as these are intended to exemplify best practices.