Refactor: use ROOT_DIR

This commit is contained in:
SukkaW
2025-01-10 20:22:30 +08:00
parent 57dc1b6787
commit 8340a0f4f5
6 changed files with 12 additions and 8 deletions

View File

@@ -5,8 +5,9 @@ import picocolors from 'picocolors';
import { Cache } from './cache-filesystem';
import { createMemoize } from 'foxts/serialized-memo';
import type { MemoizeStorageProvider } from 'foxts/serialized-memo';
import { ROOT_DIR } from '../constants/dir';
const fsMemoCache = new Cache({ cachePath: path.resolve(__dirname, '../../.cache'), tableName: 'fs_memo_cache' });
const fsMemoCache = new Cache({ cachePath: path.join(ROOT_DIR, '.cache'), tableName: 'fs_memo_cache' });
const fsMemoCacheProvider: MemoizeStorageProvider = {
has(key) {