Repository navigation
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
As of version 4.4.0,
src/jquery.form.jsin thejquery-formpackage is an ES module: it starts withimport jQuery from "jquery";and ends withexport default jQuery;. In 4.3.0, the same file was the UMD build.Because
jquery-formis registered as a classic script, browsers reject the file withCannot use import statement outside a module, andajaxForm()andajaxSubmit()are not defined for plugins and themes that enqueue it.This copies
dist/jquery.form.jsinstead. That is the package's UMD build (itsmainentry), which matches the format shipped before 4.4.0. The existing minify step and the script registration don't need to change.Follow-up to r65541.
Testing
Each file was loaded as a classic script after jQuery in headless Chromium:
ajaxForm/ajaxSubmitnode_modules/jquery-form/src/jquery.form.js(before)undefinedCannot use import statement outside a modulebuild/wp-includes/js/jquery/jquery.form.js(after)functionbuild/wp-includes/js/jquery/jquery.form.min.js(after)functionThe built
jquery.form.jsis identical to the package'sdist/jquery.form.js, and neither built file contains animportorexportstatement.Trac ticket: Core-66711
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Verifying the reported cause, making the change, testing the built files in a browser, and drafting this description. Changes were reviewed by me.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.
🤖 Generated with Claude Code