Add options to all/upsert; all() now returns AllOperationResult
This release extends the all and upsert operations with optional parameters and updates the all() return type to include metadata. It also updates dependencies and adjusts the CI test workflow triggers.
Breaking Changes
- all() return type changed from an array of items to AllOperationResult (items + metadata) (src/ops/all.ts). Update any code that expects an array to use result.items instead (commit: Extend all/upsert ops to support options/locations and update dependencies).
New Features & Improvements
- all() now accepts an optional allOptions?: AllOptions and forwards it to the underlying toWrap.all(). Options are included in logging and operation context (src/ops/all.ts).
- upsert() now supports optional locations?: LocKeyArray and options?: UpdateOptions (src/ops/upsert.ts):
- When the item is not found, ops.create() is called with { locations } when provided (or { key } otherwise).
- When updating an existing item, ops.update() forwards the provided options.
Testing Improvements
- tests/ops/all.test.ts updated to mock and assert AllOperationResult (items + metadata) and to pass undefined for options when not provided (commit: Extend all/upsert ops to support options/locations and update dependencies).
Dependencies
- Bumped:
- @fjell/core to ^4.4.64
- @fjell/logging to ^4.4.59
- @fjell/registry to ^4.4.70
- @fjell/common-config to ^1.1.31
(package.json)
CI/Workflow
- Stopped running the test workflow on pull_request events; push triggers remain for main, working, and feature/** (commit: Stop running test workflow on pull_request events).
Version
- package.json version set to 4.4.73 (commit: Release 4.4.73).