Comparing version 13.0.1 to 13.0.2
import chalk from 'chalk-template'; | ||
import { Context, Effect, flow, pipe } from 'effect'; | ||
import { isObject } from 'tightrope/guard/is-object.js'; | ||
import { isUndefined } from 'tightrope/guard/is-undefined.js'; | ||
import { logIgnoredSize } from '../bin-lint-semver-ranges/lint-semver-ranges.js'; | ||
@@ -76,3 +74,2 @@ import { logMissingLocalVersion, logMissingSnappedToMismatch, logSameRangeMismatch, logUnsupportedMismatch, } from '../bin-list-mismatches/list-mismatches.js'; | ||
} | ||
yield* $(removeEmptyObjects(ctx)); | ||
return ctx; | ||
@@ -89,18 +86,2 @@ }), Effect.flatMap(writeIfChanged), Effect.catchTags({ | ||
} | ||
/** Remove empty objects such as `{"dependencies": {}}` left after deleting */ | ||
function removeEmptyObjects(ctx) { | ||
return Effect.sync(() => { | ||
ctx.packageJsonFiles.forEach(file => { | ||
const contents = file.jsonFile.contents; | ||
Object.keys(contents).forEach(key => { | ||
const value = contents[key]; | ||
if (isObject(value) && | ||
value && | ||
Object.values(value).every(isUndefined)) { | ||
delete contents[key]; | ||
} | ||
}); | ||
}); | ||
}); | ||
} | ||
export function logAlreadyValidSize(amount) { | ||
@@ -107,0 +88,0 @@ const msg = chalk `${padStart(amount)} {green ${ICON.tick}} already valid`; |
{ | ||
"name": "syncpack", | ||
"description": "Consistent dependency versions in large JavaScript Monorepos", | ||
"version": "13.0.1", | ||
"version": "13.0.2", | ||
"author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)", | ||
@@ -6,0 +6,0 @@ "bin": { |
@@ -10,3 +10,3 @@ # syncpack | ||
> [!TIP] | ||
> 🦀 A Rust rewrite is available to try at [`npm install -g syncpack@14.0.0-alpha.1`](https://github.com/JamieMason/syncpack/releases/tag/14.0.0-alpha.1) | ||
> 🦀 A Rust rewrite is available to try at [`npm install -g syncpack@alpha`](https://github.com/JamieMason/syncpack/releases?q=14.0.0) | ||
@@ -13,0 +13,0 @@ ## Installation |
286604
6468