Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: @feathersjs/memory update with query#3617

Merged
daffl merged 4 commits intodovefeathersjs/feathers:dovefrom
fix/dove-memory-update-selectfeathersjs/feathers:fix/dove-memory-update-selectCopy head branch name to clipboard
Sep 30, 2025
Merged

fix: @feathersjs/memory update with query#3617
daffl merged 4 commits intodovefeathersjs/feathers:dovefrom
fix/dove-memory-update-selectfeathersjs/feathers:fix/dove-memory-update-selectCopy head branch name to clipboard

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.