try fixing annoying package.json differences
This commit is contained in:
parent
9dbd6f68f3
commit
c4f74fd3ca
1 changed files with 6 additions and 0 deletions
|
|
@ -50,6 +50,12 @@ abstract class UpdatePackageJson @Inject constructor(
|
||||||
val packageJsonContentUpdated =
|
val packageJsonContentUpdated =
|
||||||
jsonMapper
|
jsonMapper
|
||||||
.encodeToString(updatedPackageJson)
|
.encodeToString(updatedPackageJson)
|
||||||
|
|
||||||
|
// change empty arrays/objects, because `npm install` also formats package.json, but
|
||||||
|
// slightly differently to kxs.
|
||||||
|
.replace(": {\n },", ": {},")
|
||||||
|
.replace(": [\n ],", ": [],")
|
||||||
|
|
||||||
.suffixIfNot("\n")
|
.suffixIfNot("\n")
|
||||||
|
|
||||||
logger.debug(packageJsonContentUpdated)
|
logger.debug(packageJsonContentUpdated)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue