Skip to content

Release 4.5.0 - #642

Merged
kevindb merged 86 commits into
mainfrom
release-4.5.0
Nov 10, 2026
Merged

kevindb merged 86 commits into
mainfrom
release-4.5.0

Conversation

@kevindb

@kevindb kevindb commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Releases 4.5.0. The version is bumped in package.json, package-lock.json, form.jquery.json and the src header, dist is rebuilt, and docs/metrics.md has a 4.5.0 column. After the merge, tagging v4.5.0 on the merge commit publishes it to npm.

CodeQL alert 10 (the target lookup, which moved to src/iframe-transport.js in the module split) is dismissed as "won't fix", like alert 7 before it: target and iframeTarget are trusted options. 4.6.0 looks their strings up only as selectors.

No breaking changes are intended. Behavior changes only where the old behavior was a bug or differed from native form submission. Details are in docs/research/4x-behavior-changes.md.

src/jquery.form.js is split into modules. Rollup still emits the same three dist files, and the surface tests check the script tag, AMD, ESM and CommonJS entry points.

 src/
-└── jquery.form.js           # 1606 lines, everything
+├── jquery.form.js           # $.fn entry points
+├── options.js               # option normalization
+├── submission.js            # one submission, picks a transport
+├── xhr-transport.js
+├── iframe-transport.js      # iframe adapter
+├── iframe-post.js
+├── iframe-lifecycle.js
+├── iframe-response.js
+├── successful-controls.js   # formToArray and $.fieldValue
+├── submitter.js
+├── form-members.js          # reads form members that controls can shadow
+├── form-attributes.js
+├── ajax-form.js             # ajaxForm binding and delegation
+└── diagnostics.js           # debug log and deprecation warnings

New, additive:

Fixes cover the transports (request method, url, data strings, beforeSend veto on FormData uploads, uploadProgress), the iframe upload lifecycle (event order, settling exactly once, restoring the form's attributes), and serialization (controls named like form members, disabled fieldsets, semantic form ownership, resetForm matching native reset, SubmitEvent.submitter).

Evidence

  • Before (main, 4.4.0): 244 tests plus 1 expected failure; one 1606-line source file.
    After (this branch, locally): npm test: 912 passed, 2 expected failures, 1 skipped; coverage 100% on statements, branches, functions and lines. The suite passes on jQuery 1.7.2 (886 passed, 14 skipped), 3.7.1 (899) and 4.0.0 (900). npm audit: 0 vulnerabilities. The custom CodeQL queries report 0 results on this tree, and still flag each 4.4.0 advisory sink when it is reopened in the new modules.

Merge Danger

Door: two-way

The merge can be reverted. Publishing 4.5.0 to npm afterwards cannot be undone.

Blast Radius: consumers

Code that relied on a fixed bug may notice: for example method now wins over type on every transport, false as the url submits to the form's action, this in callbacks is the caller's context, resetForm keeps checkbox and hidden values as a native reset does, and disabled fieldset contents are no longer sent.

🤖 Generated with Claude Code

Moves tests only; the full test names match on jQuery 1.7.2, 3.7.1 and 4.0.0.
ADR-0001: the same three dist files and factory; only the directive moves to the factory top.
A control named parentNode now throws a clear error instead of hanging.
Completes #380: no leaked encoding attribute, enctype, method or absolute action.
The parentNode, tag name and element checks move to form-members.js with the other form member reads.
… clk_y

A private store holds the submitter; the expandos are still written when possible and read as a fallback.
Uses SubmitEvent.submitter for outside buttons (form attribute) and requestSubmit(button); a captured click wins.
ajaxSubmit encodes selected files by name, never [object File] (XHR-77, D-03).
clearInputs, attr2, the DOM-not-ready ajaxForm queue, the automatic iframe transport and jQuery before 3.5 each warn once per page.
Comment thread src/iframe-transport.js Dismissed
@kevindb
kevindb marked this pull request as ready for review November 10, 2026 23:31
@kevindb
kevindb merged commit 4e4a73c into main Nov 10, 2026
8 checks passed
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.

2 participants