getEngineInfos = async (plugin, forceFetch) => {
  const rootState = getRootState();
  const cached = rootState.getConfig("engines_cache", {}) || {};
  if (cached[plugin.location] && !forceFetch) {
    return cached[plugin.location];
  } else {
    getState().log(5, `Fetching versions for '${plugin.location}'`);
    const pkgInfo = await npmFetch.json(
      `https://registry.npmjs.org/${plugin.location}`,
      getFetchProxyOptions()
    );
    const versions = pkgInfo.versions;
    const newCached = {};
    for (const [k, v] of Object.entries(versions)) {
      newCached[k] = v.engines?.saltcorn
        ? { engines: { saltcorn: v.engines.saltcorn } }
        : {};
    }
    cached[plugin.location] = newCached;
    await rootState.setConfig("engines_cache", { ...cached });
    return newCached;
  }
}
return the cached engine infos or fetch them from npm and update the cache
@param plugin plugin to load