diff --git a/.changeset/strange-crabs-battle.md b/.changeset/strange-crabs-battle.md new file mode 100644 index 0000000..595a998 --- /dev/null +++ b/.changeset/strange-crabs-battle.md @@ -0,0 +1,5 @@ +--- +"remark-shiki-twoslash": patch +--- + +Moves the cache folder to correctly live inside inside node_modules diff --git a/packages/remark-shiki-twoslash/src/caching.ts b/packages/remark-shiki-twoslash/src/caching.ts index 3b4a80b..9e58b5f 100644 --- a/packages/remark-shiki-twoslash/src/caching.ts +++ b/packages/remark-shiki-twoslash/src/caching.ts @@ -31,7 +31,7 @@ export const cachedTwoslashCall = ( const getNmCache = () => { if (__dirname.includes("node_modules")) { - return join(__dirname.split("node_modules")[0], ".cache", "twoslash") + return join(__dirname.split("node_modules")[0], "node_modules", ".cache", "twoslash") } else { return join(__dirname, "..", "..", ".cache", "twoslash"); }