Skip to content

Commit fd20084

Browse files
tkirda-bisonclaude
andcommitted
build(deps): collapse jquery-mockjax's per-major jquery aliases
jquery-mockjax@3 declares four jquery peer aliases (jquery1, jquery2, jquery3, jquery4) so it can self-test against every jQuery major. npm auto-installs all four, dragging old jquery 1.x/2.x copies into node_modules. Those copies are never loaded by our test suite — mockjax's main bundle is jQuery-version-agnostic at runtime and just uses whatever jQuery is globally available — but GitHub Dependabot flags four open moderate XSS advisories against them. Add an `overrides` entry that redirects each non-jquery3 alias to our top-level jquery@^3.7.1, so npm installs one jquery (under three aliases that all point at it) instead of four versioned jQueries. Verified: full test suite still green (40/40), `npm audit` now reports 0 vulnerabilities. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5ba4c7f commit fd20084

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

package-lock.json

Lines changed: 9 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
"peerDependencies": {
4848
"jquery": ">=3.0"
4949
},
50+
"overrides": {
51+
"jquery1": "npm:jquery@^3.7.1",
52+
"jquery2": "npm:jquery@^3.7.1",
53+
"jquery4": "npm:jquery@^3.7.1"
54+
},
5055
"devDependencies": {
5156
"@eslint/js": "^9.39.4",
5257
"@types/jquery": "^3.5.32",

0 commit comments

Comments
 (0)