fix: align push diff with experimentalPushAll union semantics#57
Merged
Conversation
- Recompute the deleted set leaf-by-leaf under `experimentalPushAll` + `delete-absent` so it matches what the multi-locale upload will actually do. `detailedDiff` collapses entirely-missing branches into a single undefined at the branch level, which lost the resolution needed to apply union semantics correctly - Skip deleted entries whose path is present in any other local locale — Loco's `format=multi` evaluates `delete-absent` against the union of locales, so union-protected entries won't actually be deleted - Tighten the `allNoOp` guard in `push` to only fail when the diff contains actionable add/update entries. Loco returns "Nothing updated" for successful delete-absent-only pushes too, which previously caused spurious `push: no-op` failures - Improve the no-op error message to point at `loco-cli pull` as a reconciliation step - Split the early-exit branches so the `delete-absent disabled` message no longer fires when the diff is empty Fixes #56
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
experimentalPushAll+delete-absentso the diff matches what the multi-locale upload will actually do.detailedDiffcollapses entirely-missing branches into a singleundefinedat the branch level, which lost the resolution needed to apply union semantics correctly.format=multievaluatesdelete-absentagainst the union of locales, so union-protected entries won't actually be deleted.allNoOpguard inpushto only fail when the diff contains actionable add/update entries. Loco returns "Nothing updated" for successful delete-absent-only pushes too, which previously caused spuriouspush: no-opfailures.loco-cli pullas a reconciliation step.pushso the "delete-absent disabled" message no longer fires when the diff is empty.Test plan
pnpm test— 92 passing, including new coverage for branch-collapsed diffs, union-protected leaves, sibling-leaf retention, and deletion-only push successpnpm lint,pnpm format:check,pnpm buildEverything up to date!instead ofpush: no-opFixes #56