Skip to content

Commit d40e906

Browse files
authored
feat(migrate): detect indentation of package.json (#438)
1 parent bbc7d04 commit d40e906

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/migrate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ async function migratePackageJson(dryRun?: boolean): Promise<boolean> {
111111
return false
112112
}
113113

114-
const pkgStr = `${JSON.stringify(pkg, null, 2)}\n`
114+
const pkgStr = `${JSON.stringify(pkg, null, pkgRaw.includes('\t') ? '\t' : 2)}\n`
115115
if (dryRun) {
116116
const { createPatch } = await import('diff')
117117
globalLogger.info('[dry-run] package.json:')

0 commit comments

Comments
 (0)