Skip to content

Conversation

@fratzinger
Copy link
Member

TLDR:
@feathersjs/memory: .update() with a query (resulting in NotFound) updates data instead of preventing the change.

adapter-tests has a test case for .update + id + query but it produces a false positive (at least for @feathersjs/memory). It checks for NotFound but does not safely detect if definitely nothing was changed.

In case of an .update() with a query, the current implementation of @feathersjs/memory changes the data first, stores the changed data and then throws afterwards.

So I included an explicit check in @feathersjs/adapter-tests and fixed it by passing params to the first _.get() in update.

While being at it, I also replaced @feathersjs/commons with native methods (third commit).

@daffl daffl merged commit 4c6caa2 into dove Sep 30, 2025
6 checks passed
@daffl daffl deleted the fix/dove-memory-update-select branch September 30, 2025 19:43
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.

3 participants