semantic-release-npm-workspaces-monorepo
Version:
Help you use semantic-release with npm workspaces
14 lines (13 loc) • 372 B
JavaScript
import { cacheStoragePath } from './config.js';
import fs from 'fs/promises';
export async function readCacheStorage() {
try {
return JSON.parse(await fs.readFile(cacheStoragePath, 'utf-8'));
}
catch {
return {};
}
}
export async function writeCacheStorage(data) {
await fs.writeFile(cacheStoragePath, JSON.stringify(data, null, 2));
}