fix: compatibility of fs-extra with esm (#4017)

This commit is contained in:
Vben
2024-08-03 09:49:46 +08:00
committed by GitHub
parent bf8a5ffb5d
commit 27ffc9e71b
11 changed files with 78 additions and 33 deletions

View File

@@ -6,9 +6,9 @@ import {
colors,
consola,
findMonorepoRoot,
fs,
getPackages,
gitAdd,
outputJSON,
prettierFormat,
toPosixPath,
} from '@vben/node-utils';
@@ -38,7 +38,7 @@ async function createCodeWorkspace({
const monorepoRoot = findMonorepoRoot();
const outputPath = join(monorepoRoot, CODE_WORKSPACE_FILE);
await fs.outputJSON(outputPath, { folders }, { encoding: 'utf8', spaces });
await outputJSON(outputPath, { folders }, spaces);
await prettierFormat(outputPath);
if (autoCommit) {