@lerna-lite/core
Advanced tools
Comparing version 2.7.1 to 2.7.2
@@ -7,2 +7,3 @@ import { cosmiconfigSync, defaultLoaders } from 'cosmiconfig'; | ||
import log from 'npmlog'; | ||
import { writeFileSync } from 'node:fs'; | ||
import { basename, dirname, join, normalize, resolve as pathResolve } from 'node:path'; | ||
@@ -174,3 +175,11 @@ import pMap from 'p-map'; | ||
serializeConfig() { | ||
return writeJsonFile(this.rootConfigLocation, this.config, { indent: 2, detectIndent: true }).then(() => this.rootConfigLocation); | ||
if (this.rootConfigLocation.endsWith('lerna.json5')) { | ||
return new Promise((resolve) => { | ||
writeFileSync(this.rootConfigLocation, JSON5.stringify(this.config, { space: 2 })); | ||
resolve(this.rootConfigLocation); | ||
}); | ||
} | ||
else { | ||
return writeJsonFile(this.rootConfigLocation, this.config, { indent: 2, detectIndent: true }).then(() => this.rootConfigLocation); | ||
} | ||
} | ||
@@ -177,0 +186,0 @@ } |
{ | ||
"name": "@lerna-lite/core", | ||
"description": "Lerna-Lite core implementation module", | ||
"version": "2.7.1", | ||
"version": "2.7.2", | ||
"publishConfig": { | ||
@@ -71,3 +71,3 @@ "access": "public" | ||
}, | ||
"gitHead": "6736842179eac30ea0df3bc9db67e581230d1c4c" | ||
"gitHead": "db6118c9af466baadf63a22220ad2ae4f3eb77cb" | ||
} |
Sorry, the diff of this file is not supported yet
222082
3302