Skip to content

chore(deps): remove legacy npm-run-all across monorepo - #7173

Merged
MichaelDoyle merged 1 commit into
mainfrom
md/remove-npm-run-all
Nov 12, 2026
Merged

MichaelDoyle merged 1 commit into
mainfrom
md/remove-npm-run-all

Conversation

@MichaelDoyle

@MichaelDoyle MichaelDoyle commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Removes the unmaintained npm-run-all@4.1.5 dependency (last published in 2018) across all 30 remaining package.json files in the monorepo (root, js/*, js/plugins/*, and tests) and replaces sequential script invocations with native pnpm chaining (&&).

Result: Prunes 244 legacy package snapshots (-2,330+ lockfile lines) across pnpm-lock.yaml, js/pnpm-lock.yaml, and tests/pnpm-lock.yaml, and resolves 12 open Dependabot security alerts (3 Critical, 7 High, 2 Medium).


Why

  1. Historical Pre-pnpm Leftover: npm-run-all was originally added in Feb 2024 (Renamed ollama plugin to genkitx-ollama #97) before the repo migrated to pnpm workspaces (refactor: consolidated registry into a class, made registry hierarchical #639 / [Docs] which models supports tools? #661) purely as shorthand to avoid repeating npm run in sequential scripts, and was subsequently copied across plugin templates. Every remaining call site was 100% sequential (no globs, no --parallel), and npm-run-all itself simply spawned child pnpm run <step> processes one by one.
  2. Unmaintained Legacy Polyfill Tree: npm-run-all@4.1.5 targets Node 4/6 and pulls in 100+ transitive ES5/ES6 polyfills and legacy packages (es-abstract, string.prototype.*, typed-array-*, read-pkg@3, shell-quote@1.8.x, minimatch@3.1.2, brace-expansion@1.1.x).

Quantified Dependency & Security Impact

Lockfile Footprint Reduction

Lockfile Before After Pruned Package Versions YAML Lines Removed
pnpm-lock.yaml (root) 337 214 -123 (-36.5%) -1,174
tests/pnpm-lock.yaml 277 179 -98 (-35.4%) -880
js/pnpm-lock.yaml 2,587 2,564 -23 (-0.9%) -276
Total 3,201 2,957 -244 snapshots -2,330+ lines

Open Dependabot Security Alerts Resolved (12 Alerts: 3 Critical, 7 High, 2 Medium)

Because npm-run-all@4.1.5 has not had a release since 2018, its pinned transitive ranges kept the following vulnerable packages locked in the dependency graph:

Alert Severity Lockfile Vulnerable Package Removed Advisory
#1828 Critical js/pnpm-lock.yaml shell-quote@1.8.3 (0 left) GHSA-w7jw-789q-3m8p — newline escaping bypass in quote()
#1829 Critical pnpm-lock.yaml shell-quote@1.8.3 (0 left) GHSA-w7jw-789q-3m8p — newline escaping bypass in quote()
#1834 Critical tests/pnpm-lock.yaml shell-quote@1.8.1 (0 left) GHSA-w7jw-789q-3m8p — newline escaping bypass in quote()
#2243 High js/pnpm-lock.yaml shell-quote@1.8.3 (0 left) GHSA-395f-4hp3-45gv — quadratic DoS in parse()
#2251 High pnpm-lock.yaml shell-quote@1.8.3 (0 left) GHSA-395f-4hp3-45gv — quadratic DoS in parse()
#2361 High tests/pnpm-lock.yaml shell-quote@1.8.1 (0 left) GHSA-395f-4hp3-45gv — quadratic DoS in parse()
#2250 High pnpm-lock.yaml brace-expansion@1.1.12 (0 left) GHSA-3jxr-9vmj-r5cp — exponential DoS on {} groups
#2359 High tests/pnpm-lock.yaml brace-expansion@1.1.11 (0 left) GHSA-3jxr-9vmj-r5cp — exponential DoS on {} groups
#752 High pnpm-lock.yaml minimatch@3.1.2 (0 <3.1.3 left) GHSA-7r86-cg39-jmmj — matchOne() ReDoS backtracking
#751 High tests/pnpm-lock.yaml minimatch@3.1.2 (0 left) GHSA-7r86-cg39-jmmj — matchOne() ReDoS backtracking
#2959 Medium pnpm-lock.yaml brace-expansion@1.1.12 (0 left) GHSA-q2hr-2g5m-vwhr — quadratic expansion DoS
#3130 Medium tests/pnpm-lock.yaml brace-expansion@1.1.11 (0 left) GHSA-q2hr-2g5m-vwhr — quadratic expansion DoS

Key Changes

  • Replaced sequential npm-run-all scripts with native pnpm ... && pnpm ... across package.json, js/package.json, js/core, js/ai, js/genkit, all 23 js/plugins/*, and tests/package.json.
  • Removed unused npm-run-all devDependencies from js/doc-snippets/package.json.
  • Pruned npm-run-all and its transitive dependency tree from pnpm-lock.yaml, js/pnpm-lock.yaml, and tests/pnpm-lock.yaml.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the 'npm-run-all' dependency across the entire workspace, including the core packages and various plugins. The scripts that previously used 'npm-run-all' have been refactored to run sequentially using 'pnpm' and the '&&' operator. The lockfiles have been updated to reflect the removal of this dependency and its transitive packages. I have no feedback to provide.

@MichaelDoyle
MichaelDoyle removed this pull request from stack #7165 November 12, 2026 02:55
@MichaelDoyle
MichaelDoyle added this pull request to stack #7185 November 12, 2026 02:55
@MichaelDoyle
MichaelDoyle requested a review from pavelgj November 12, 2026 14:43
Base automatically changed from md/build-speed-ups to main November 12, 2026 19:43
@MichaelDoyle
MichaelDoyle requested a review from a team as a code owner November 12, 2026 19:43
- Replace sequential npm-run-all scripts with native pnpm && chaining across root, js, and tests

- Remove unused npm-run-all devDependencies from doc-snippets and samples

- Prune npm-run-all and 100+ transitive Node 4/6 polyfill packages (-2,300+ lockfile lines) across root, js, and tests lockfiles
@MichaelDoyle
MichaelDoyle enabled stacked auto-merge (squash) November 12, 2026 21:27
@MichaelDoyle
MichaelDoyle merged commit be1c875 into main Nov 12, 2026
28 of 29 checks passed
@MichaelDoyle
MichaelDoyle deleted the md/remove-npm-run-all branch November 12, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants