Skip to content

chore: degulpify the package tasks - #10323

Open
maribethb wants to merge 2 commits into
RaspberryPiFoundation:mainfrom
maribethb:gulp-package
Open

chore: degulpify the package tasks#10323
maribethb wants to merge 2 commits into
RaspberryPiFoundation:mainfrom
maribethb:gulp-package

Conversation

@maribethb

Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #10300

Proposed Changes

  • Removes gulpfiles/package_tasks.js and replaces it with a function-by-function equivalent that uses plain node scripts instead of gulp tasks.
  • Removes gulpfiles/helper_tasks.js and replaces it with several different utility files with better-organized helper functions
  • Updates other gulpfiles that referenced those helpers to use the new functions instead
  • Noteworthy changes:
    • Still uses gulp to run the build which is a prerequisite to packing, since the build is still a gulp task. At some point after build is no longer a gulp task, we should instead use the nx task graph to make sure that build is always run before packaging instead of relying on invoking it here, that way we get cacheing
    • Removed one line that was calling .replace on the contents of all the msg files to "remove references to goog.module and goog.provide" -- there weren't any of those references present, and that is a bug waiting to happen if a translation ever contains the string goog
    • we were using a gulp plugin called gulp-umd to do the umd wrapping, that's been replaced with a handwritten script that I think is not too difficult to maintain and hopefully in v14 we can stop doing umd altogether..
    • uses promise.all to do some stuff in parallel that gulp was previously doing in parallel, using a guard to make sure we're not opening too many files at once

The biggest addition in this PR is scripts/package.mjs and if you review that side-by-side with the old (deleted in this PR) gulpfiles/package_tasks.js it's easier to understand since it really is function-by-function equivalent (with the exception above about the msg files)

Reason for Changes

This is faster and easier to read

Test Coverage

Verified that the results of dist/ are identical before and after this change.

Documentation

n/a

Additional Information

This change was created with assistance from Claude and manually verified / tested / rewritten where needed

@maribethb
maribethb requested a review from a team as a code owner August 26, 2026 21:35
@maribethb
maribethb requested a review from gonfunko August 26, 2026 21:35
@maribethb maribethb changed the title Gulp package chore: degulpify the package tasks Aug 26, 2026
@github-actions github-actions Bot added the PR: chore General chores (dependencies, typos, etc) label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: chore General chores (dependencies, typos, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stop using gulp just to copy files

2 participants