Skip to content

chore(build): drop unused Grunt/npm toolchain#141

Open
zackkatz wants to merge 3 commits into
developfrom
chore/drop-grunt-toolchain
Open

chore(build): drop unused Grunt/npm toolchain#141
zackkatz wants to merge 3 commits into
developfrom
chore/drop-grunt-toolchain

Conversation

@zackkatz
Copy link
Copy Markdown
Contributor

@zackkatz zackkatz commented May 8, 2026

Summary

  • bin/build-sass (PHP/scssphp) is the canonical SCSS-to-CSS compiler. The committed src/assets/trustedlogin.css is produced by it. Grunt only added autoprefix-on-watch for local SCSS development and was not on the release path.
  • Removes the unused npm/Grunt toolchain, which clears all 21 open Dependabot alerts (all in the deleted package-lock.json / yarn.lock).
  • Also removes .github/workflows/tests.yml, which targeted the retired ubuntu-20.04 runner and depended on the deleted package.json test:php script.

What's deleted

File Reason
Gruntfile.js autoprefix-on-watch dev tool, not on release path
package.json only referenced Grunt deps + a test:php wp-env shortcut
package-lock.json / yarn.lock source of all 21 Dependabot alerts
.nvmrc only consumer was the removed Grunt workflow
.github/workflows/tests.yml targeted retired ubuntu-20.04; depended on deleted package.json

What still works

  • bin/build-sass smoke-tested locally; CSS output unchanged.
  • composer lint (PHPCS) — clean.
  • composer phpstan — clean.
  • composer test (PHPUnit) — unchanged.
  • .github/workflows/php-ci-tests.yml (PHPCS + PHPStan) — unchanged.
  • .github/workflows/e2e.yml (Playwright) — unchanged; uses its own tests/e2e/package.json which is separate.
  • .gitattributes already export-ignores any remaining dev cruft from the published archive.

Follow-up needed

The deleted tests.yml was the only workflow running PHPUnit in CI. PHPUnit should be added back into .github/workflows/php-ci-tests.yml (modern ubuntu-latest, multiple PHP versions). Tracked separately.

Test plan

  • Confirm composer install && composer lint && composer phpstan && composer test pass on a fresh clone
  • Confirm bin/build-sass --namespace=foo recompiles src/assets/trustedlogin.css without npm installed
  • Confirm Dependabot alerts on main go to zero after merge

zackkatz added 2 commits May 8, 2026 17:13
bin/build-sass (PHP/scssphp via Composer) is the canonical SCSS-to-CSS
compiler; the committed src/assets/trustedlogin.css is produced by it.
The Grunt workflow added autoprefix-on-watch for local SCSS edits but
was not on the release path.

Removed Gruntfile.js, package.json, package-lock.json, yarn.lock, and
.nvmrc. Also removed .github/workflows/tests.yml, which targeted the
removed ubuntu-20.04 runner image and depended on the now-deleted
package.json test:php script. PHPUnit jobs need to be re-added to
.github/workflows/php-ci-tests.yml as a follow-up.

Updated .gitattributes (drop export-ignore lines for files that no
longer exist) and README.md (drop the npm run test:php bullet; document
composer phpstan alongside composer test/lint/format).
Adds a Branching (Git Flow) section to AGENTS.md so contributors and
agents target develop by default and route releases through release/*
branches into main.
@zackkatz zackkatz changed the base branch from main to develop May 8, 2026 21:15
- Remote.php: drop dead `use WP_User;` and `use WP_Admin_Bar;` imports;
  drop unused `$key` from the errors-flatten foreach.
- Client.php: unset() the unused exception binding from the
  WP_Debug_Data ImagickException catch (PHP 5.3 floor rules out
  catch-without-binding).
- fake-saas/server.php: drop the unused `$state` arrow-fn param on the
  /__reset handler; PHP silently ignores extra args passed to closures
  with smaller arity, so with_state_locked()'s callsite is unaffected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant