[deps]: Update jquery to v4 - #6932
Conversation
|
Internal tracking:
|
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #6932 +/- ##
==========================================
- Coverage 68.41% 63.17% -5.24%
==========================================
Files 2380 2381 +1
Lines 103679 103771 +92
Branches 9386 9394 +8
==========================================
- Hits 70931 65559 -5372
- Misses 30420 35981 +5561
+ Partials 2328 2231 -97 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
c6944ba to
94e72f7
Compare
|
Claude finished @renovate[bot]'s task in 1m 48s —— View job Code Review SummaryReviewed PR: #6932 - [deps]: Update jquery to v4 OverviewThis Renovate bot PR upgrades jQuery from 3.7.1 to 4.0.0 in two locations:
AnalysisjQuery Usage Assessment:
Compatibility Check: The Admin portal uses the following jQuery APIs, all of which remain supported in jQuery 4.0:
Breaking Changes in jQuery 4.0 Not Affecting This Codebase:
Risk Assessment
Recommendations
Verdict: This dependency upgrade appears safe to merge. The jQuery APIs used in the codebase are all supported in version 4.0, and no deprecated methods were identified. Reviewed by Claude (AI-assisted code review) |
|
Great job! No new security vulnerabilities introduced in this pull request |
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Renovate bumps jQuery from 3.7.1 to 4.0.0 in Code Review Details
Dependency Changes
|
| "bootstrap": "5.3.6", | ||
| "font-awesome": "4.7.0", | ||
| "jquery": "3.7.1", | ||
| "jquery": "4.0.0", |
There was a problem hiding this comment.
❓ QUESTION: jQuery 4 ships an ESM entry point — has the built bundle been verified to still expose the $/jQuery globals?
Details
jQuery 4.0 adds an exports map with a module build (dist-module/jquery.module.js) alongside the CommonJS dist/jquery.js. Both src/Admin/webpack.config.js and bitwarden_license/src/Sso/webpack.config.js match the expose-loader rule by file path:
{
test: require.resolve("jquery"),
loader: "expose-loader",
options: { exposes: ["$", "jQuery"] },
}require.resolve runs under Node (node/require conditions) and resolves to the CommonJS build, while webpack resolves the "jquery" entry using the import/module conditions. If those resolve to different files, the rule silently stops matching and no global is set — webpack still builds successfully, so CI would not catch it.
Impact if that happens: the inline scripts in src/Admin/Views/Shared/_Layout.cshtml (lines 178, 186, 194) and src/Admin/AdminConsole/Views/Providers/_ProviderScripts.cshtml would throw $ is not defined, breaking the toast notifications and the provider delete/link modals.
Suggested verification: run npm run build in src/Admin, load the Admin portal, and confirm window.$, window.jQuery, and toastr are defined and a TempData toast still renders. If the rule no longer matches, pinning the entry/test to the same build (for example require.resolve("jquery/dist/jquery.js") plus the matching entry path) resolves it.
Worth also confirming toastr 2.1.4 (last released 2016, declares jquery: >=1.12.0) still functions, since jQuery 4 removed a set of long-deprecated APIs.

This PR contains the following updates:
3.7.1→4.0.0Release Notes
jquery/jquery (jquery)
v4.0.0Compare Source
Changelog
https://blog.jquery.com/2026/01/17/jquery-4-0-0/
Ajax
processData: trueeven for binary data (ce264e07)headersfor script transport even when cross-domain (#5142, 6d136443)nullas success functions injQuery.get(#4989, 74978b7e)Attributes
.attr( name, false )remove for all non-ARIA attrs (#5388, 063831b6)toggleClass(boolean|undefined)signature (#3388, a4421101)CSS
<col>elements (#5628, eca2a564)selector.jswrapper (53cf7244)offsetHeight( true ), etc. include negative margins (#3982, bce13b72)undefinedfor whitespace-only CSS variable values (#5120) (7eb00196)addClass( array ), compress code (#4998, a338b407)show,hide&togglemethods in the jQuery slim build (297d18dd)Core
$.parseHTMLfromdocument.implementationtoDOMParser(0e123509)src/(#5262, f75daab0)Data
Deferred
getStackHooktogetErrorHook(#5201, 258ca1ec)Deprecated
.hover()using non-deprecated methods (fd6ffc5e)Dimensions
Docs
3.x-stable(d9281061)trac-NUMBERreferences (eb9ceb2f)#NUMBERTrac issue references withtrac-NUMBER(5d5ea015)Effect
Effects
Event
.preventDefault()in beforeunload (7c123dec).on(focus).off(focus)(#4867, e539bac7)Manipulation
Offset
Release
npm publishin the post-release phase (ff1f0eaa)Selector
:has; test both on iPhone & iPad (65e35450)jQuery.expr[ ":" ]/jQuery.expr.filters(329661fd)selector.jsmodule depend onattributes/attr.js(#5379, e06ff088)selector.jsdepenencies from various modules (e8b7db4b)qSAagain (#5177, 09d988b7)uniqueSortchainable method (#5166, 5266f23c):hasifCSS.supports(selector(...))non-compliant (#5098, d153c375)Support
Tests
jQuery.get( String, null-ish, null-ish, String )(05325801)jQuery.get( String, null-ish, null-ish, String )(76687566)hidden="until-found"attr tests from 3.x-stable (3a31866b):hasselector tests with3.x-stable(f2d9fde5)cssSupportsSelectortest (716130e0)Traversing
contents()on<object>s with children in IE (ccbd6b93)contents()on<object>s with children (#4384, 4d865d96)Upgrade
Configuration
📅 Schedule: Branch creation - "every 2nd week starting on the 2 week of the year before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.