Skip to content

Conversation

@paulRbr
Copy link
Member

@paulRbr paulRbr commented Apr 10, 2025

With the refactoring made on the overlay command in
v2.9.3 we
introduced a bug when removeing elements if the overlay action was
targeting an array.

This was due to the exploded json paths which contains indexes, and
that those index change each time we remove an element.

We've fixed the bug with @AurelDbs by iterating over the list of paths
in a reversed order (we start by the end of the array instead of the
beginning).

Note: once again, thanks @lcawl for reporting this issue! And sorry
for the unexpected behavior 🙂

With the refactoring made on the overlay command in
[v2.9.3](https://github.com/bump-sh/cli/releases/tag/v2.9.3) we
introduced a bug when `remove`ing elements if the overlay action was
targeting an array.

This was due to the exploded json paths which contains indexes, and
that those index change each time we remove an element.

We've fixed the bug with @AurelDbs by iterating over the list of paths
in a reversed order (we start by the end of the array instead of the
beginning).
@paulRbr paulRbr merged commit 4906ea6 into bump-sh:main Apr 10, 2025
9 checks passed
@paulRbr paulRbr deleted the fix-overlay-remove-action branch April 10, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants