Eleventy Fetch v5.0.0
11ty.dev docs for Fetch have been updated for v5.0.0: https://www.11ty.dev/docs/plugins/fetch/
npm install @11ty/eleventy-fetch@5.0.0
- Breaking: requires Node 18+
- Breaking: Use native
fetch()and dropnode-fetchdependency by @uncenter in #37 - Not Breaking: for compatibility this package is still CommonJS (not ESM)
- Support
URLinstance target #41 - Use
AbortSignalfor fetch timeouts #39 - Support custom
functionsource (async-friendly) @doug-wade in #32 - Allow custom filename via
filenameFormatby @chriskirknielsen in #49 - Add prettier @uncenter in #38
- Cache request verbs (e.g. POST versus GET) separately (and request body) by @Zegnat in #34
- Upgrade dependencies to get rid of deprecation warnings by @Zegnat in #46
- Upgrades flat-cache dependency from v3 to v6 (internal API changes)
- Update debug module name Eleventy:Fetch by @uncenter in #40
- Adds support for
type: "xml"(alias for"text") - Adds support for
type: "parsed-xml"#53 returns a JS object via @rgrove’s https://github.com/rgrove/parse-xml - Adds
returnType: "response"option to return (and cache)Responsemetadata, includingurl,status,headers,body. - Adds
requestIdoption to control reuse, de-duping, unique cache keys when caching non-URL sources. Fixes a few more bugs with de-duping internally when HTTP methods and body requests are used for cache keys.