github jquery-form/form v4.6.1
4.6.1

one hour ago

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.js is the classic build again, as in 4.3.0. In 4.3.0 that file was the package's main and its only unminified classic build, so projects copy it, concatenate it or //= require it by path. 4.4.0 replaced it with the ES module source (import jQuery from "jquery"), so a <script> tag rejected it and ajaxForm() and ajaxSubmit() were undefined. The 4.4.0 notes did not say so. It is now a copy of dist/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) and module (dist/jquery.form.mjs) are unchanged, so require, import and bundlers load the same files as in 4.6.0.
  • cdnjs serves the classic build at jquery.form.js again. cdnjs copies both dist/ and src/ from the git tag into one folder, so https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.6.0/jquery.form.js is 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.js gets 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. Import jquery-form instead, which loads dist/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: module is the built dist/jquery.form.mjs. If you imported a file under src/ other than jquery.form.js, import jquery-form instead.

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, extraData added in beforeSend, controls changed in beforeSerialize, ajaxSubmit(fn), formToArray(true) as $.ajax data, and the module build sharing the page's jQuery.

Full changelog: v4.6.0...v4.6.1

Don't miss a new form release

NewReleases is sending notifications on new releases.