@e22m4u/js-repository 0.5.6 → 0.5.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e22m4u/js-repository",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Реализация репозитория для работы с базами данных в Node.js",
5
5
  "author": "Mikhail Evstropov <e22m4u@yandex.ru>",
6
6
  "license": "MIT",
@@ -39,9 +39,9 @@
39
39
  "prepare": "husky"
40
40
  },
41
41
  "dependencies": {
42
- "@e22m4u/js-empty-values": "~0.1.1",
42
+ "@e22m4u/js-empty-values": "~0.1.2",
43
43
  "@e22m4u/js-format": "~0.2.0",
44
- "@e22m4u/js-service": "~0.4.0"
44
+ "@e22m4u/js-service": "~0.4.2"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@commitlint/cli": "~20.1.0",
@@ -55,17 +55,17 @@
55
55
  "chai-as-promised": "~8.0.2",
56
56
  "chai-spies": "~1.1.0",
57
57
  "esbuild": "~0.25.10",
58
- "eslint": "~9.36.0",
58
+ "eslint": "~9.37.0",
59
59
  "eslint-config-prettier": "~10.1.8",
60
60
  "eslint-plugin-chai-expect": "~3.1.0",
61
- "eslint-plugin-jsdoc": "~60.6.0",
62
- "eslint-plugin-mocha": "~11.1.0",
61
+ "eslint-plugin-jsdoc": "~61.0.0",
62
+ "eslint-plugin-mocha": "~11.2.0",
63
63
  "husky": "~9.1.7",
64
- "mocha": "~11.7.3",
64
+ "mocha": "~11.7.4",
65
65
  "prettier": "~3.6.2",
66
66
  "rimraf": "~6.0.1",
67
67
  "ts-node": "~10.9.2",
68
68
  "typescript": "~5.9.3",
69
- "typescript-eslint": "~8.45.0"
69
+ "typescript-eslint": "~8.46.0"
70
70
  }
71
71
  }
@@ -68,7 +68,7 @@ export declare class Repository<
68
68
  */
69
69
  replaceById(
70
70
  id: IdType,
71
- data: WithoutId<IdName, FlatData>,
71
+ data: WithoutId<FlatData, IdName>,
72
72
  filter?: ItemFilterClause,
73
73
  ): Promise<FlatData>;
74
74
 
@@ -90,7 +90,7 @@ export declare class Repository<
90
90
  * @param where
91
91
  */
92
92
  patch(
93
- data: PartialWithoutId<IdName, Data>,
93
+ data: PartialWithoutId<Data, IdName>,
94
94
  where?: WhereClause,
95
95
  ): Promise<number>;
96
96
 
@@ -103,7 +103,7 @@ export declare class Repository<
103
103
  */
104
104
  patchById(
105
105
  id: IdType,
106
- data: PartialWithoutId<IdName, Data>,
106
+ data: PartialWithoutId<Data, IdName>,
107
107
  filter?: ItemFilterClause,
108
108
  ): Promise<FlatData>;
109
109
 
@@ -161,16 +161,17 @@ export declare class Repository<
161
161
  /**
162
162
  * Removes id field.
163
163
  */
164
- type WithoutId<IdName extends string, Data extends object> = Flatten<
164
+ type WithoutId<Data extends object, IdName extends string = 'id'> = Flatten<
165
165
  Omit<Data, IdName>
166
166
  >;
167
167
 
168
168
  /**
169
169
  * Makes fields as optional and remove id field.
170
170
  */
171
- type PartialWithoutId<IdName extends string, Data extends object> = Flatten<
172
- Partial<Omit<Data, IdName>>
173
- >;
171
+ type PartialWithoutId<
172
+ Data extends object,
173
+ IdName extends string = 'id',
174
+ > = Flatten<Partial<Omit<Data, IdName>>>;
174
175
 
175
176
  /**
176
177
  * Makes the required id field as optional.