vsrepo 2.7.1 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ All notable changes to this project will be documented in this file.
6
6
 
7
7
  ---
8
8
 
9
+ ## [2.7.2] - 2026-09-29
10
+
11
+ ### Fixed
12
+ - Corrects the typing of the `VSRepoAdapter` `merge` to correctly return `Promise<(K & T) | null>`, correctly aligning with the behavior of the `VSRepository` `merge` which returns `null` when not found.
13
+
14
+ ## [2.7.2] - 2026-09-29 (Português)
15
+
16
+ ### Corrigido
17
+ - Corrige a tipagem do método `merge` do `VSRepoAdapter` para retornar corretamente `Promise<(K & T) | null>`, alinhando corretamente ao comportamento do `merge` do `VSRepository` que retorna `null` quando não encontrado
18
+
9
19
  ## [2.7.1] - 2026-09-28
10
20
 
11
21
  ### Fixed
@@ -66,7 +66,7 @@ export declare abstract class VSRepoAdapter<T> {
66
66
  * Fetches a single record matching `where` and returns it deep-merged, in
67
67
  * memory, with the provided object — does **not** persist anything.
68
68
  */
69
- abstract merge<K>(where: VSRepoWhere<T>, obj: DeepPartial<T>, options?: AdapterMethodOptions<T>): Promise<K & T>;
69
+ abstract merge<K extends DeepPartial<T>>(where: VSRepoWhere<T>, obj: K, options?: AdapterMethodOptions<T>): Promise<(K & T) | null>;
70
70
  /** Creates a record if none matches `where`, otherwise updates it. */
71
71
  abstract upsert(where: VSRepoWhere<T>, create: DeepPartial<T>, update: DeepPartial<T>, options?: AdapterMethodOptions<T>): Promise<T>;
72
72
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vsrepo",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "ORM-agnostic repository pattern library",
5
5
  "homepage": "https://github.com/jaobrabo123/VSRepository#readme",
6
6
  "repository": {