opral / inlang-message-sdk

0 stars 0 forks source link

`messages.getAll.subscribe` changed callback is not triggered when a message is removed #67

Closed LorisSigrist closed 1 month ago

LorisSigrist commented 1 month ago

Context

When removing a message from, let's say, a en.json file the message-changed callback is not triggered. In paraglide's case this leads to a desync between the messages & the compiled output.

This has caused some of the user reports about reactivity not working as expected

Proposal

Trigger the callback

jldec commented 1 month ago

@martin.lysk1 could you take a look at this please?
(are we missing a test for removed messages?)

martin-lysk commented 1 month ago

Discussed this briefly with @LorisSigrist this morning. Definitely a blindspot in our coverage. I will look into it asap