Deno remote module cache vs CI pipeline: forcing revalidation of unversioned HTTPS imports without --reload wiping everything
0 reputation · 12 Oct 2021, 07:36 UTC
0 reputation · 12 Oct 2021, 07:36 UTC
A Deno service imports a handful of remote modules over plain HTTPS URLs (not a versioned registry like deno.land/x with @ tags). Locally and in CI, Deno caches these downloads under DENO_DIR keyed by URL, so once a URL is fetched it is not requested again on later runs. The upstream occasionally publishes fixes at the same URL, and the cached copy keeps being used, which is the stale-result behavior I need to design around.
Running with --reload and no arguments re-fetches every remote dependency, which is slow in CI and can silently pull breaking upstream changes from unrelated modules. A lockfile verifies integrity of recorded bytes but says nothing about freshness. Vendoring would work but changes the team's review workflow, so I would prefer to keep remote imports. Assume a current Deno 2.x runtime; flag behavior should be verified against the installed version.
--reload=https://example.com/mod.ts) the intended way to refresh one stale module while leaving the rest of DENO_DIR untouched, and does it propagate to that module's own remote transitive imports?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.