fix(install): cache all exports of JSR packages listed in `deno.json`
Fixes #26498.
This was a sort of intentional decision originally, as I wanted to avoid caching extra files that may not be needed. It seems like that behavior is unintuitive, so I propose we cache all of the exports of listed jsr packages when you run a bare deno install.
LGTM, but I wonder if there's a way someone could express in their deno.json to only cache certain exports or for package authors to say "don't cache this export by default, require an explicit opt-in"
Wouldn't the user only be caching the dependencies actually used in the code of an imported library and not everything in their deno.json or jsr.json?
If somebody forked a lib and wanted to only cache the dependencies used in the code, they could do deno install --entrypoint <mod.ts>. But it makes sense that doing deno install caches literally every dependency listed in the import map.
Good point! I forgot about that.