A fix release for the files in the package. No API change. jQuery 1.7.2 or later is still supported.
Fixes
src/jquery.form.jsis the classic build again, as in 4.3.0. In 4.3.0 that file was the package'smainand its only unminified classic build, so projects copy it, concatenate it or//= requireit by path. 4.4.0 replaced it with the ES module source (import jQuery from "jquery"), so a<script>tag rejected it andajaxForm()andajaxSubmit()were undefined. The 4.4.0 notes did not say so. It is now a copy ofdist/jquery.form.js, in the npm package and in the git tag that Bower, Composer and jsDelivr's/gh/URLs install from.main(dist/jquery.form.js) andmodule(dist/jquery.form.mjs) are unchanged, sorequire,importand bundlers load the same files as in 4.6.0.- cdnjs serves the classic build at
jquery.form.jsagain. cdnjs copies bothdist/andsrc/from the git tag into one folder, sohttps://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.6.0/jquery.form.jsis the ES module source. In 4.6.1 the two files are identical.jquery.form.min.js, the file the docs link, was correct in every version.
Packaging
- A bundler that imports
jquery-form/src/jquery.form.jsgets the classic build, as with 4.3.0. webpack runs its AMD branch and registers the plugin; esbuild and Vite treat it as CommonJS and get the(root, jQuery)factory without running it. Importjquery-forminstead, which loadsdist/jquery.form.mjs, as it has since 4.4.0. - The ES module sources moved to
src/esm/in the repository and are no longer in the npm package. Nothing pointed at them:moduleis the builtdist/jquery.form.mjs. If you imported a file undersrc/other thanjquery.form.js, importjquery-forminstead.
Testing
- CI now runs the suite and the end-to-end tests on jQuery 1.7.2, 1.12.4, 3.7.1, 4.0.0 and 4.1.0, in Chromium, Firefox and WebKit.
- New tests pin patterns that Drupal, Backdrop, Plone, Concrete CMS, OpenSourcePOS and Review Board rely on: a submit button set on
form.clk,extraDataadded inbeforeSend, controls changed inbeforeSerialize,ajaxSubmit(fn),formToArray(true)as$.ajaxdata, and the module build sharing the page's jQuery.
Full changelog: v4.6.0...v4.6.1