@woltz/rich-domain 1.2.4 → 1.3.0

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.
Files changed (72) hide show
  1. package/dist/aggregate-changes.d.ts +56 -14
  2. package/dist/aggregate-changes.d.ts.map +1 -1
  3. package/dist/aggregate-changes.js +102 -22
  4. package/dist/aggregate-changes.js.map +1 -1
  5. package/dist/base-entity.d.ts +1 -1
  6. package/dist/base-entity.d.ts.map +1 -1
  7. package/dist/base-entity.js +11 -8
  8. package/dist/base-entity.js.map +1 -1
  9. package/dist/change-tracker.d.ts +1 -0
  10. package/dist/change-tracker.d.ts.map +1 -1
  11. package/dist/change-tracker.js +41 -27
  12. package/dist/change-tracker.js.map +1 -1
  13. package/dist/criteria.d.ts +7 -15
  14. package/dist/criteria.d.ts.map +1 -1
  15. package/dist/criteria.js +99 -76
  16. package/dist/criteria.js.map +1 -1
  17. package/dist/entity-schema-registry.d.ts +133 -3
  18. package/dist/entity-schema-registry.d.ts.map +1 -1
  19. package/dist/entity-schema-registry.js +155 -4
  20. package/dist/entity-schema-registry.js.map +1 -1
  21. package/dist/paginated-result.d.ts +4 -4
  22. package/dist/paginated-result.d.ts.map +1 -1
  23. package/dist/paginated-result.js +6 -20
  24. package/dist/paginated-result.js.map +1 -1
  25. package/dist/types/change-tracker.d.ts +30 -0
  26. package/dist/types/change-tracker.d.ts.map +1 -1
  27. package/dist/types/criteria.d.ts +1 -4
  28. package/dist/types/criteria.d.ts.map +1 -1
  29. package/dist/types/domain.d.ts +2 -0
  30. package/dist/types/domain.d.ts.map +1 -1
  31. package/dist/types/utils.d.ts +2 -2
  32. package/dist/utils/helpers.d.ts +1 -0
  33. package/dist/utils/helpers.d.ts.map +1 -1
  34. package/dist/utils/helpers.js +23 -0
  35. package/dist/utils/helpers.js.map +1 -1
  36. package/dist/value-object.d.ts +1 -1
  37. package/dist/value-object.js +1 -1
  38. package/package.json +17 -3
  39. package/src/aggregate-changes.ts +133 -24
  40. package/src/base-entity.ts +13 -8
  41. package/src/change-tracker.ts +107 -38
  42. package/src/criteria.ts +151 -109
  43. package/src/entity-schema-registry.ts +253 -6
  44. package/src/paginated-result.ts +10 -30
  45. package/src/types/change-tracker.ts +31 -0
  46. package/src/types/criteria.ts +1 -4
  47. package/src/types/domain.ts +2 -0
  48. package/src/types/utils.ts +2 -2
  49. package/src/utils/helpers.ts +28 -0
  50. package/src/value-object.ts +1 -1
  51. package/.versionrc.json +0 -21
  52. package/CHANGELOG.md +0 -163
  53. package/tests/aggregate-changes.test.ts +0 -284
  54. package/tests/criteria.test.ts +0 -716
  55. package/tests/depth/deep-tracking.test.ts +0 -554
  56. package/tests/domain-events.test.ts +0 -431
  57. package/tests/entity-equality.test.ts +0 -464
  58. package/tests/entity-schema-registry.test.ts +0 -382
  59. package/tests/entity-validation.test.ts +0 -252
  60. package/tests/history-tracker.spec.ts +0 -439
  61. package/tests/id.test.ts +0 -338
  62. package/tests/load-test/data.json +0 -347211
  63. package/tests/load-test/entities.ts +0 -97
  64. package/tests/load-test/generate-data.ts +0 -81
  65. package/tests/load-test/lead-to-domain.mapper.ts +0 -24
  66. package/tests/load-test/load.test.ts +0 -38
  67. package/tests/repository.test.ts +0 -635
  68. package/tests/to-json.test.ts +0 -99
  69. package/tests/utils.ts +0 -290
  70. package/tests/value-object-validation.test.ts +0 -219
  71. package/tests/value-objects.test.ts +0 -80
  72. package/tsconfig.json +0 -9
@@ -1,6 +1,47 @@
1
1
  import { Entity } from "./entity";
2
2
  import { ValueObject } from "./value-object";
3
3
  import { Id } from "./id";
4
+ import { ConfigurationError } from "./exceptions";
5
+ import { levenshteinDistance } from "./utils/helpers";
6
+
7
+ /**
8
+ * Type of collection relationship.
9
+ * - 'owned': Parent owns the children (1:N). Delete parent = delete children.
10
+ * - 'reference': Parent references existing entities (N:N). Delete parent = unlink only.
11
+ */
12
+ export type CollectionType = "owned" | "reference";
13
+
14
+ /**
15
+ * Configuration for a collection (1:N or N:N relationship).
16
+ */
17
+ export interface CollectionConfig {
18
+ /**
19
+ * Type of relationship.
20
+ * - 'owned': Children are created/deleted with the parent (default for 1:N)
21
+ * - 'reference': Only the link is created/removed (for N:N)
22
+ * @default 'owned'
23
+ */
24
+ type: CollectionType;
25
+
26
+ /**
27
+ * Target entity name (required for 'reference' type).
28
+ * @example 'Tag'
29
+ */
30
+ entity?: string;
31
+
32
+ /**
33
+ * Junction table configuration (optional, for ORMs that need it like Drizzle).
34
+ * Prisma handles this automatically, so it's optional.
35
+ */
36
+ junction?: {
37
+ /** Junction table name (e.g., 'post_tags', '_PostToTag') */
38
+ table: string;
39
+ /** FK field pointing to the source entity (e.g., 'post_id') */
40
+ sourceKey: string;
41
+ /** FK field pointing to the target entity (e.g., 'tag_id') */
42
+ targetKey: string;
43
+ };
44
+ }
4
45
 
5
46
  /**
6
47
  * Mapping schema for a domain entity.
@@ -17,7 +58,7 @@ export interface EntitySchema {
17
58
  */
18
59
  fields?: Record<string, string>;
19
60
  /**
20
- * FK configuration for parent relation.
61
+ * FK configuration for parent relation (1:N owned).
21
62
  */
22
63
  parentFk?: {
23
64
  /** Name of the FK field in the database (e.g., 'author_id') */
@@ -25,6 +66,18 @@ export interface EntitySchema {
25
66
  /** Name of the parent entity (e.g., 'User') */
26
67
  parentEntity: string;
27
68
  };
69
+ /**
70
+ * Collection configurations for this entity's relations.
71
+ * Key is the property name in the domain entity.
72
+ * @example
73
+ * ```typescript
74
+ * collections: {
75
+ * comments: { type: 'owned' },
76
+ * tags: { type: 'reference', entity: 'Tag' }
77
+ * }
78
+ * ```
79
+ */
80
+ collections?: Record<string, CollectionConfig>;
28
81
  }
29
82
 
30
83
  /**
@@ -50,11 +103,15 @@ export interface MappedEntityData {
50
103
  * table: 'blog_posts',
51
104
  * fields: { content: 'post_content' },
52
105
  * parentFk: { field: 'author_id', parentEntity: 'User' },
106
+ * collections: {
107
+ * comments: { type: 'owned' },
108
+ * tags: { type: 'reference', entity: 'Tag' }
109
+ * }
53
110
  * });
54
111
  *
55
112
  * const table = registry.getTable('Post'); // 'blog_posts'
56
- * const mapped = registry.mapFields('User', { email: 'test@test.com' });
57
- * // { user_email: 'test@test.com' }
113
+ * const tagConfig = registry.getCollectionConfig('Post', 'tags');
114
+ * // { type: 'reference', entity: 'Tag' }
58
115
  * ```
59
116
  */
60
117
  export class EntitySchemaRegistry {
@@ -93,14 +150,24 @@ export class EntitySchemaRegistry {
93
150
  getSchema(entity: string): EntitySchema {
94
151
  const schema = this.schemas.get(entity);
95
152
  if (!schema) {
96
- throw new Error(
153
+ throw new ConfigurationError(
97
154
  `EntitySchemaRegistry: No schema registered for entity '${entity}'. ` +
98
- `Available entities: ${Array.from(this.schemas.keys()).join(", ") || "none"}`
155
+ `Available entities: ${
156
+ Array.from(this.schemas.keys()).join(", ") || "none"
157
+ }`
99
158
  );
100
159
  }
101
160
  return schema;
102
161
  }
103
162
 
163
+ /**
164
+ * Tries to get the schema of an entity, returns null if not found.
165
+ * @param entity - Entity name.
166
+ */
167
+ tryGetSchema(entity: string): EntitySchema | null {
168
+ return this.schemas.get(entity) ?? null;
169
+ }
170
+
104
171
  /**
105
172
  * Checks if an entity is registered.
106
173
  * @param entity - Entity name.
@@ -212,6 +279,104 @@ export class EntitySchemaRegistry {
212
279
  return schema.parentFk?.field ?? null;
213
280
  }
214
281
 
282
+ /**
283
+ * Gets the collection configuration for a specific field.
284
+ *
285
+ * @param entity - Parent entity name (e.g., 'Post')
286
+ * @param fieldName - Collection field name (e.g., 'tags')
287
+ * @returns CollectionConfig or null if not configured
288
+ *
289
+ * @example
290
+ * ```typescript
291
+ * const config = registry.getCollectionConfig('Post', 'tags');
292
+ * if (config?.type === 'reference') {
293
+ * // Handle N:N relation - use connect/disconnect
294
+ * } else {
295
+ * // Handle 1:N relation - use create/delete
296
+ * }
297
+ * ```
298
+ */
299
+ getCollectionConfig(
300
+ entity: string,
301
+ fieldName: string
302
+ ): CollectionConfig | null {
303
+ const schema = this.tryGetSchema(entity);
304
+ if (!schema?.collections) return null;
305
+ return schema.collections[fieldName] ?? null;
306
+ }
307
+
308
+ /**
309
+ * Checks if a collection is a reference type (N:N).
310
+ *
311
+ * @param entity - Parent entity name
312
+ * @param fieldName - Collection field name
313
+ * @returns true if the collection is a reference (N:N), false otherwise
314
+ *
315
+ * @example
316
+ * ```typescript
317
+ * if (registry.isReferenceCollection('Post', 'tags')) {
318
+ * // Use connect/disconnect instead of create/delete
319
+ * }
320
+ * ```
321
+ */
322
+ isReferenceCollection(entity: string, fieldName: string): boolean {
323
+ const config = this.getCollectionConfig(entity, fieldName);
324
+ return config?.type === "reference";
325
+ }
326
+
327
+ /**
328
+ * Checks if a collection is owned (1:N).
329
+ * Returns true if explicitly configured as 'owned' or if not configured at all.
330
+ *
331
+ * @param entity - Parent entity name
332
+ * @param fieldName - Collection field name
333
+ * @returns true if the collection is owned (1:N), false if reference
334
+ */
335
+ isOwnedCollection(entity: string, fieldName: string): boolean {
336
+ const config = this.getCollectionConfig(entity, fieldName);
337
+ // Default to owned if not configured
338
+ return config?.type !== "reference";
339
+ }
340
+
341
+ /**
342
+ * Gets all collections configured for an entity.
343
+ *
344
+ * @param entity - Entity name
345
+ * @returns Record of field names to collection configs, or empty object
346
+ */
347
+ getCollections(entity: string): Record<string, CollectionConfig> {
348
+ const schema = this.tryGetSchema(entity);
349
+ return schema?.collections ?? {};
350
+ }
351
+
352
+ /**
353
+ * Gets all reference (N:N) collections for an entity.
354
+ *
355
+ * @param entity - Entity name
356
+ * @returns Array of field names that are reference collections
357
+ */
358
+ getReferenceCollections(entity: string): string[] {
359
+ const collections = this.getCollections(entity);
360
+ return Object.entries(collections)
361
+ .filter(([_, config]) => config.type === "reference")
362
+ .map(([field]) => field);
363
+ }
364
+
365
+ /**
366
+ * Gets the junction table configuration for a reference collection.
367
+ *
368
+ * @param entity - Parent entity name
369
+ * @param fieldName - Collection field name
370
+ * @returns Junction config or null
371
+ */
372
+ getJunctionConfig(
373
+ entity: string,
374
+ fieldName: string
375
+ ): CollectionConfig["junction"] | null {
376
+ const config = this.getCollectionConfig(entity, fieldName);
377
+ return config?.junction ?? null;
378
+ }
379
+
215
380
  /**
216
381
  * Lists all registered entities.
217
382
  */
@@ -234,7 +399,12 @@ export class EntitySchemaRegistry {
234
399
  if (Array.isArray(value)) return true;
235
400
  if (value instanceof Entity) return true;
236
401
  if (value instanceof ValueObject) return true;
237
- if (typeof value === 'object' && value.id && typeof value.id === 'object' && 'value' in value.id) {
402
+ if (
403
+ typeof value === "object" &&
404
+ value.id &&
405
+ typeof value.id === "object" &&
406
+ "value" in value.id
407
+ ) {
238
408
  return true;
239
409
  }
240
410
  return false;
@@ -252,4 +422,81 @@ export class EntitySchemaRegistry {
252
422
  }
253
423
  return value;
254
424
  }
425
+
426
+ /**
427
+ * Validates that a relation field exists in the entity's collections.
428
+ *
429
+ * @param entity - Parent entity name
430
+ * @param relationField - Relation field to validate
431
+ * @throws ConfigurationError if the field doesn't exist
432
+ *
433
+ */
434
+ public validateRelationField(entity: string, relationField: string): void {
435
+ const schema = this.tryGetSchema(entity);
436
+
437
+ const uuidPattern =
438
+ /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
439
+
440
+ if (uuidPattern.test(entity)) {
441
+ throw new ConfigurationError(
442
+ `EntitySchemaRegistry: Received an ID '${entity}' instead of an entity name. ` +
443
+ `This usually means 'parentEntity' is not being set correctly in the ChangeTracker. ` +
444
+ `Check that addDelete/addCreate are receiving the entity NAME (e.g., 'Post'), not the ID.`
445
+ );
446
+ }
447
+
448
+ if (!schema) {
449
+ throw new ConfigurationError(
450
+ `EntitySchemaRegistry: Cannot validate relation '${relationField}' - ` +
451
+ `entity '${entity}' is not registered. ` +
452
+ `Available entities: ${
453
+ this.getRegisteredEntities().join(", ") || "none"
454
+ }`
455
+ );
456
+ }
457
+
458
+ const collections = schema.collections ?? {};
459
+ const availableCollections = Object.keys(collections);
460
+
461
+ if (availableCollections.length === 0) {
462
+ throw new ConfigurationError(
463
+ `EntitySchemaRegistry: Entity '${entity}' has no collections configured, ` +
464
+ `but received operation for relation '${relationField}'. ` +
465
+ `Did you forget to configure collections in the schema?`
466
+ );
467
+ }
468
+
469
+ if (!collections[relationField]) {
470
+ const suggestions = this.findSimilarNames(
471
+ relationField,
472
+ availableCollections
473
+ );
474
+ const suggestionText =
475
+ suggestions.length > 0
476
+ ? ` Did you mean: '${suggestions.join("' or '")}'?`
477
+ : "";
478
+
479
+ throw new ConfigurationError(
480
+ `EntitySchemaRegistry: Unknown relation '${relationField}' for entity '${entity}'. ` +
481
+ `Available collections: ${availableCollections.join(
482
+ ", "
483
+ )}.${suggestionText}`
484
+ );
485
+ }
486
+ }
487
+
488
+ private findSimilarNames(input: string, candidates: string[]): string[] {
489
+ return candidates
490
+ .map((candidate) => ({
491
+ name: candidate,
492
+ distance: levenshteinDistance(
493
+ input.toLowerCase(),
494
+ candidate.toLowerCase()
495
+ ),
496
+ }))
497
+ .filter(({ distance }) => distance <= 3)
498
+ .sort((a, b) => a.distance - b.distance)
499
+ .slice(0, 2)
500
+ .map(({ name }) => name);
501
+ }
255
502
  }
@@ -4,10 +4,10 @@ import type { Pagination, PaginationMeta, Filter } from "./types";
4
4
 
5
5
  /**
6
6
  * Infers the JSON result type from T
7
- * - If T has toJson(), returns its return type
7
+ * - If T has toJSON(), returns its return type
8
8
  * - Otherwise returns T as-is
9
9
  */
10
- type InferJsonResult<T> = T extends { toJson(): infer R } ? R : T;
10
+ type InferJsonResult<T> = T extends { toJSON(): infer R } ? R : T;
11
11
 
12
12
  /**
13
13
  * Type for the serialized result of PaginatedResult.toJSON()
@@ -58,18 +58,6 @@ export class PaginatedResult<T> {
58
58
  let result = [...items];
59
59
  let total = result.length;
60
60
 
61
- const search = criteria.getSearch();
62
- if (search) {
63
- result = result.filter((item) => {
64
- return search.fields.some((field) => {
65
- return String(getNestedValue(item, field))
66
- .toLowerCase()
67
- .includes(search.value.trim().toLowerCase());
68
- });
69
- });
70
- total = result.length;
71
- }
72
-
73
61
  for (const filter of criteria.getFilters()) {
74
62
  result = result.filter((item) => applyFilter(item, filter));
75
63
  total = result.length;
@@ -89,25 +77,17 @@ export class PaginatedResult<T> {
89
77
  }
90
78
 
91
79
  const pagination = criteria.getPagination();
92
- if (pagination && !criteria.hasSearch()) {
93
- result = result.slice(
94
- pagination.offset,
95
- pagination.offset + pagination.limit
96
- );
97
- return PaginatedResult.create(result, pagination, total);
98
- }
99
-
100
- return PaginatedResult.create(
101
- result,
102
- { page: 1, limit: result.length, offset: 0 },
103
- total
80
+ result = result.slice(
81
+ pagination.offset,
82
+ pagination.offset + pagination.limit
104
83
  );
84
+ return PaginatedResult.create(result, pagination, total);
105
85
  }
106
86
 
107
87
  /**
108
88
  * Converts the result to JSON, deeply serializing all entities/aggregates/value objects
109
- * - Entities/Aggregates → calls toJson() recursively
110
- * - Value Objects → calls toJson()
89
+ * - Entities/Aggregates → calls toJSON() recursively
90
+ * - Value Objects → calls toJSON()
111
91
  * - Id → converts to string
112
92
  * - Arrays → maps recursively
113
93
  * - Plain objects → serializes properties recursively
@@ -134,8 +114,8 @@ export class PaginatedResult<T> {
134
114
  return obj.map((item) => this.deepSerialize(item));
135
115
  }
136
116
 
137
- if (obj && typeof obj.toJson === "function") {
138
- return obj.toJson();
117
+ if (obj && typeof obj.toJSON === "function") {
118
+ return obj.toJSON();
139
119
  }
140
120
 
141
121
  if (typeof obj === "object") {
@@ -9,6 +9,8 @@ export interface BaseOperation {
9
9
  entity: string;
10
10
  /** Depth in the aggregate tree (0 = root, 1 = direct children, etc.) */
11
11
  depth: number;
12
+ /** Name of the relation field in the parent entity (e.g., 'tags', 'comments') */
13
+ relationField?: string;
12
14
  }
13
15
 
14
16
  /**
@@ -46,6 +48,10 @@ export interface DeleteOperation<T = any> extends BaseOperation {
46
48
  id: string;
47
49
  /** Entity data (for reference) */
48
50
  data: T;
51
+ /** Parent entity name */
52
+ parentEntity?: string;
53
+ /** Parent ID */
54
+ parentId?: string;
49
55
  }
50
56
 
51
57
  /**
@@ -64,6 +70,10 @@ export interface BatchCreateItem<T = any> {
64
70
  data: T;
65
71
  /** Parent ID (for FK) */
66
72
  parentId?: string;
73
+ /** Parent entity name */
74
+ parentEntity?: string;
75
+ /** Relation field name */
76
+ relationField?: string;
67
77
  }
68
78
 
69
79
  /**
@@ -76,6 +86,16 @@ export interface BatchUpdateItem {
76
86
  changedFields: Record<string, any>;
77
87
  }
78
88
 
89
+ /**
90
+ * Item for batch delete.
91
+ */
92
+ export interface BatchDeleteItem {
93
+ /** Entity ID */
94
+ id: string;
95
+ /** Relation field name */
96
+ relationField?: string;
97
+ }
98
+
79
99
  /**
80
100
  * Grouped and ordered operations for batch execution.
81
101
  */
@@ -87,6 +107,13 @@ export interface BatchOperations {
87
107
  entity: string;
88
108
  depth: number;
89
109
  ids: string[];
110
+ parentId?: string;
111
+ /** Relation field name (for determining owned vs reference) */
112
+ relationField?: string;
113
+ /** Parent entity name */
114
+ parentEntity?: string;
115
+ /** Individual items with their relation fields (when mixed) */
116
+ items?: BatchDeleteItem[];
90
117
  }>;
91
118
 
92
119
  /**
@@ -96,6 +123,10 @@ export interface BatchOperations {
96
123
  entity: string;
97
124
  depth: number;
98
125
  items: BatchCreateItem[];
126
+ /** Relation field name (for determining owned vs reference) */
127
+ relationField?: string;
128
+ /** Parent entity name */
129
+ parentEntity?: string;
99
130
  }>;
100
131
 
101
132
  /**
@@ -129,10 +129,7 @@ export interface Pagination {
129
129
  offset: number;
130
130
  }
131
131
 
132
- export interface Search<T> {
133
- fields: FieldPath<T>[];
134
- value: string;
135
- }
132
+ export type Search = string;
136
133
 
137
134
  export interface PaginationMeta {
138
135
  page: number;
@@ -14,12 +14,14 @@ export type EntityValidation<T> = DomainValidation<T>;
14
14
  export type VOValidation<T> = DomainValidation<T>;
15
15
 
16
16
  export interface VOHooks<T, E> {
17
+ onBeforeCreate?: (props: T) => void;
17
18
  onBeforeUpdate?: (entity: E, snapshot: T) => boolean;
18
19
  onCreate?: (entity: E) => void;
19
20
  rules?: (entity: E) => void;
20
21
  }
21
22
 
22
23
  export interface EntityHooks<T extends BaseProps, E> {
24
+ onBeforeCreate?: (props: T) => void;
23
25
  onBeforeUpdate?: (entity: E, snapshot: T) => boolean;
24
26
  onCreate?: (entity: E) => void;
25
27
  rules?: (entity: E) => void;
@@ -3,10 +3,10 @@ import { Id } from "../id";
3
3
  export type DeepJsonResult<T> = {
4
4
  [K in keyof T]: T[K] extends Id
5
5
  ? string
6
- : T[K] extends { toJson(): infer U }
6
+ : T[K] extends { toJSON(): infer U }
7
7
  ? U
8
8
  : T[K] extends Array<infer U>
9
- ? U extends { toJson(): infer V }
9
+ ? U extends { toJSON(): infer V }
10
10
  ? V[]
11
11
  : U extends Id
12
12
  ? string[]
@@ -4,3 +4,31 @@ export function parseQueryValue(value: string): any {
4
4
  if (!isNaN(Date.parse(value))) return new Date(value); // Date
5
5
  return value; // string
6
6
  }
7
+
8
+ export function levenshteinDistance(a: string, b: string): number {
9
+ const matrix: number[][] = [];
10
+
11
+ for (let i = 0; i <= b.length; i++) {
12
+ matrix[i] = [i];
13
+ }
14
+
15
+ for (let j = 0; j <= a.length; j++) {
16
+ matrix[0][j] = j;
17
+ }
18
+
19
+ for (let i = 1; i <= b.length; i++) {
20
+ for (let j = 1; j <= a.length; j++) {
21
+ if (b.charAt(i - 1) === a.charAt(j - 1)) {
22
+ matrix[i][j] = matrix[i - 1][j - 1];
23
+ } else {
24
+ matrix[i][j] = Math.min(
25
+ matrix[i - 1][j - 1] + 1, // substitution
26
+ matrix[i][j - 1] + 1, // insertion
27
+ matrix[i - 1][j] + 1 // deletion
28
+ );
29
+ }
30
+ }
31
+ }
32
+
33
+ return matrix[b.length][a.length];
34
+ }
@@ -229,7 +229,7 @@ export abstract class ValueObject<T> {
229
229
  return this.domainEvents.length > 0;
230
230
  }
231
231
 
232
- toJson(): T {
232
+ toJSON(): T {
233
233
  return { ...this.props };
234
234
  }
235
235
 
package/.versionrc.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "types": [
3
- { "type": "feat", "section": "Features" },
4
- { "type": "fix", "section": "Bug Fixes" },
5
- { "type": "chore", "hidden": false, "section": "Chores" },
6
- { "type": "docs", "hidden": false, "section": "Documentation" },
7
- { "type": "style", "hidden": true },
8
- { "type": "refactor", "section": "Refactoring" },
9
- { "type": "perf", "section": "Performance Improvements" },
10
- { "type": "test", "hidden": false, "section": "Tests" }
11
- ],
12
- "commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commit/{{hash}}",
13
- "compareUrlFormat": "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}",
14
- "issueUrlFormat": "{{host}}/{{owner}}/{{repository}}/issues/{{id}}",
15
- "userUrlFormat": "{{host}}/{{user}}",
16
- "releaseCommitMessageFormat": "chore(release): {{currentTag}}",
17
- "issuePrefixes": ["#"],
18
- "skip": {
19
- "changelog": false
20
- }
21
- }