texasranger
texasranger16mo ago

Why does `deno test` add an older version of the `std` library to my deno.lock?

My testing files do not reference std/0.165 and my import-map.json is pinned to std/0.177. When I use deno run everything works fine. When I use deno test for some reason std/0.165 is added to my deno.lock file and then I get errors about core.runMicrotasks is not a function. How do I keep deno test from adding an older version of std to the deno.lock file?
7 Replies
texasranger
texasranger16mo ago
Running rm -rf $HOME/Library/Caches/deno fixed it. Why did I have to do that though?
ioB
ioB16mo ago
weird... @crowlkats any ideas?
crowlKats
crowlKats16mo ago
i am unsure, thats really strange deno doesnt add std deps itself
texasranger
texasranger16mo ago
my tests do not load/add any extra dependencies which would differ from deno run
KyleJune
KyleJune16mo ago
Maybe one of your non std dependencies depend on std@0.165.0
texasranger
texasranger16mo ago
I don't know -- again, once I cleared the cache the issue went away
KyleJune
KyleJune16mo ago
Strange.