Eleventy Fetch v5.0.2
- Improved advanced API (you might not need this). Existing default export creates an instance and couples data fetching together. This release adds a
Fetchnamed export to create a Fetch instance without fetching data automatically. Works with the concurrency queue. Use thequeue()method to fetch data.
import CachedFetch, { Fetch } from "@11ty/eleventy-fetch";
let data = await CachedFetch(source, options);
// is the same as:
let inst = Fetch(source, options);
let data = await inst.queue();- Adds
wasLastFetchCacheHit()onFetchinstances, used to solve bug with Eleventy Image disk cache 11ty/image#146 - Improved efficiency: Adds top level instance cache and a few internal caches to avoid duplicate
fetchor file systemreadcalls. - Adds internal directory manager to avoid duplicate
fs.mkdircalls - Improved debug logs
Full Changelog: v5.0.1...v5.0.2