- Increase the minimum required Node.js version to v18.12.0 matching long-term support releases (#31270). Learn more about Node.js releases.
OPTIONS
requests handled by the preloading middleware are now resolved as window.Response
objects if you explicitly set parse: false
(for consistency with how GET requests are resolved). They used to be resolved as Plain Old JavaScript Objects
.
- Removed
getStablePath
function. Please usenormalizePath
from@wordpress/url
package instead (#35992).``
AbortError
being thrown by the default fetch handler can now be caught and handled separately in user-land. Add documentation about aborting a request (#32530).
- Drop support for Internet Explorer 11 (#31110). Learn more at https://make.wordpress.org/core/2021/04/22/ie-11-support-phase-out-plan/.
- Increase the minimum Node.js version to v12 matching Long Term Support releases (#31270). Learn more at https://nodejs.org/en/about/releases/.
OPTIONS
requests which are handled by the preloading middleware are no longer resolved as unparsed responses unless you explicitly setparse: false
, for consistency with other request methods. If you expect an unparsed response, add{ parse: false }
to your request options to preserve the previous behavior.
- Align exported type names with the DefinitelyTyped type names and actually export those types.
- Publish TypeScript definitions.
- Added deprecation to
useApiFetch
hook. - Added
@wordpress/deprecation
package to add deprecation notice touseApiFetch
hook.
- Resolves an issue with
createPreloadingMiddleware
where the preloaded data is assumed to be provided with keys matching the internal normalized value.
- A created nonce middleware will no longer automatically listen for
heartbeat.tick
actions. Assign to the newnonce
middleware property instead.
- The function returned by
createNonceMiddleware
includes an assignablenonce
property corresponding to the active nonce to be used. - Default fetch handler can be overridden with a custom fetch handler
- Always request data in the user's locale (#10862).
- Support
per_page=-1
paginated requests.
- Change how required built-ins are polyfilled with Babel 7 (#9171). If you're using an environment that has limited or no support for ES2015+ such as lower versions of IE then using core-js or @babel/polyfill will add support for these methods.