@codluv/versionguard 0.1.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.
- package/LICENSE +21 -0
- package/README.md +357 -0
- package/dist/calver.d.ts +245 -0
- package/dist/calver.d.ts.map +1 -0
- package/dist/changelog.d.ts +83 -0
- package/dist/changelog.d.ts.map +1 -0
- package/dist/chunks/index-DPBYoIRi.js +1568 -0
- package/dist/chunks/index-DPBYoIRi.js.map +1 -0
- package/dist/cli.d.ts +60 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +312 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +95 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/feedback/index.d.ts +141 -0
- package/dist/feedback/index.d.ts.map +1 -0
- package/dist/fix/index.d.ts +140 -0
- package/dist/fix/index.d.ts.map +1 -0
- package/dist/hooks.d.ts +98 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/index.d.ts +123 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/project.d.ts +144 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/semver.d.ts +191 -0
- package/dist/semver.d.ts.map +1 -0
- package/dist/sync.d.ts +71 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/tag/index.d.ts +180 -0
- package/dist/tag/index.d.ts.map +1 -0
- package/dist/types.d.ts +510 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +90 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared public types for version parsing, validation, and configuration.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Supported versioning strategies.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
* @since 0.1.0
|
|
11
|
+
* @forgeIgnore E020
|
|
12
|
+
*/
|
|
13
|
+
export type VersioningType = 'semver' | 'calver';
|
|
14
|
+
/**
|
|
15
|
+
* Supported calendar version string layouts.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
* @since 0.1.0
|
|
19
|
+
* @forgeIgnore E020
|
|
20
|
+
*/
|
|
21
|
+
export type CalVerFormat = 'YYYY.MM.DD' | 'YYYY.MM.PATCH' | 'YY.M.PATCH' | 'YYYY.0M.0D';
|
|
22
|
+
/**
|
|
23
|
+
* Configures CalVer validation rules.
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
* @since 0.1.0
|
|
27
|
+
* @forgeIgnore E020
|
|
28
|
+
*/
|
|
29
|
+
export interface CalVerConfig {
|
|
30
|
+
/**
|
|
31
|
+
* Calendar format used when parsing and validating versions.
|
|
32
|
+
*/
|
|
33
|
+
format: CalVerFormat;
|
|
34
|
+
/**
|
|
35
|
+
* Rejects versions that point to a future date.
|
|
36
|
+
*
|
|
37
|
+
* @defaultValue true
|
|
38
|
+
*/
|
|
39
|
+
preventFutureDates: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Describes a search-and-replace pattern used during version synchronization.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
* @since 0.1.0
|
|
46
|
+
* @forgeIgnore E020
|
|
47
|
+
*/
|
|
48
|
+
export interface SyncPattern {
|
|
49
|
+
/**
|
|
50
|
+
* Regular expression string used to locate a version value.
|
|
51
|
+
*/
|
|
52
|
+
regex: string;
|
|
53
|
+
/**
|
|
54
|
+
* Replacement template applied when a match is updated.
|
|
55
|
+
*/
|
|
56
|
+
template: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Configures files and patterns that should stay in sync with the canonical version.
|
|
60
|
+
*
|
|
61
|
+
* @public
|
|
62
|
+
* @since 0.1.0
|
|
63
|
+
* @forgeIgnore E020
|
|
64
|
+
*/
|
|
65
|
+
export interface SyncConfig {
|
|
66
|
+
/**
|
|
67
|
+
* File globs or paths that should be scanned for version updates.
|
|
68
|
+
*/
|
|
69
|
+
files: string[];
|
|
70
|
+
/**
|
|
71
|
+
* Replacement patterns applied to matching files.
|
|
72
|
+
*/
|
|
73
|
+
patterns: SyncPattern[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Controls changelog validation behavior.
|
|
77
|
+
*
|
|
78
|
+
* @public
|
|
79
|
+
* @since 0.1.0
|
|
80
|
+
* @forgeIgnore E020
|
|
81
|
+
*/
|
|
82
|
+
export interface ChangelogConfig {
|
|
83
|
+
/**
|
|
84
|
+
* Enables changelog validation.
|
|
85
|
+
*
|
|
86
|
+
* @defaultValue false
|
|
87
|
+
*/
|
|
88
|
+
enabled: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Path to the changelog file to inspect.
|
|
91
|
+
*/
|
|
92
|
+
file: string;
|
|
93
|
+
/**
|
|
94
|
+
* Treats changelog problems as hard failures.
|
|
95
|
+
*
|
|
96
|
+
* @defaultValue false
|
|
97
|
+
*/
|
|
98
|
+
strict: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Requires an entry for the current version.
|
|
101
|
+
*
|
|
102
|
+
* @defaultValue false
|
|
103
|
+
*/
|
|
104
|
+
requireEntry: boolean;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Toggles each supported git hook integration.
|
|
108
|
+
*
|
|
109
|
+
* @public
|
|
110
|
+
* @since 0.1.0
|
|
111
|
+
* @forgeIgnore E020
|
|
112
|
+
*/
|
|
113
|
+
export interface GitHooksConfig {
|
|
114
|
+
/**
|
|
115
|
+
* Enables validation during the `pre-commit` hook.
|
|
116
|
+
*
|
|
117
|
+
* @defaultValue false
|
|
118
|
+
*/
|
|
119
|
+
'pre-commit': boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Enables validation during the `pre-push` hook.
|
|
122
|
+
*
|
|
123
|
+
* @defaultValue false
|
|
124
|
+
*/
|
|
125
|
+
'pre-push': boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Enables follow-up tasks after a tag is created.
|
|
128
|
+
*
|
|
129
|
+
* @defaultValue false
|
|
130
|
+
*/
|
|
131
|
+
'post-tag': boolean;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Configures git-related enforcement.
|
|
135
|
+
*
|
|
136
|
+
* @public
|
|
137
|
+
* @since 0.1.0
|
|
138
|
+
* @forgeIgnore E020
|
|
139
|
+
*/
|
|
140
|
+
export interface GitConfig {
|
|
141
|
+
/**
|
|
142
|
+
* Hook toggles used by the CLI and validation workflow.
|
|
143
|
+
*/
|
|
144
|
+
hooks: GitHooksConfig;
|
|
145
|
+
/**
|
|
146
|
+
* Fails validation when required hooks are missing.
|
|
147
|
+
*
|
|
148
|
+
* @defaultValue false
|
|
149
|
+
*/
|
|
150
|
+
enforceHooks: boolean;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Configures the active versioning mode.
|
|
154
|
+
*
|
|
155
|
+
* @public
|
|
156
|
+
* @since 0.1.0
|
|
157
|
+
* @forgeIgnore E020
|
|
158
|
+
*/
|
|
159
|
+
export interface VersioningConfig {
|
|
160
|
+
/**
|
|
161
|
+
* Versioning strategy used for the project.
|
|
162
|
+
*/
|
|
163
|
+
type: VersioningType;
|
|
164
|
+
/**
|
|
165
|
+
* CalVer-specific settings when `type` is `'calver'`.
|
|
166
|
+
*
|
|
167
|
+
* @defaultValue undefined
|
|
168
|
+
*/
|
|
169
|
+
calver?: CalVerConfig;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Top-level configuration consumed by versionguard.
|
|
173
|
+
*
|
|
174
|
+
* @public
|
|
175
|
+
* @since 0.1.0
|
|
176
|
+
* @forgeIgnore E020
|
|
177
|
+
*/
|
|
178
|
+
export interface VersionGuardConfig {
|
|
179
|
+
/**
|
|
180
|
+
* Active versioning settings.
|
|
181
|
+
*/
|
|
182
|
+
versioning: VersioningConfig;
|
|
183
|
+
/**
|
|
184
|
+
* Synchronization settings for mirrored version strings.
|
|
185
|
+
*/
|
|
186
|
+
sync: SyncConfig;
|
|
187
|
+
/**
|
|
188
|
+
* Changelog validation settings.
|
|
189
|
+
*/
|
|
190
|
+
changelog: ChangelogConfig;
|
|
191
|
+
/**
|
|
192
|
+
* Git enforcement settings.
|
|
193
|
+
*/
|
|
194
|
+
git: GitConfig;
|
|
195
|
+
/**
|
|
196
|
+
* Files or patterns excluded from validation.
|
|
197
|
+
*/
|
|
198
|
+
ignore: string[];
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Parsed semantic version components.
|
|
202
|
+
*
|
|
203
|
+
* @public
|
|
204
|
+
* @since 0.1.0
|
|
205
|
+
* @forgeIgnore E020
|
|
206
|
+
*/
|
|
207
|
+
export interface SemVer {
|
|
208
|
+
/**
|
|
209
|
+
* Major version number.
|
|
210
|
+
*/
|
|
211
|
+
major: number;
|
|
212
|
+
/**
|
|
213
|
+
* Minor version number.
|
|
214
|
+
*/
|
|
215
|
+
minor: number;
|
|
216
|
+
/**
|
|
217
|
+
* Patch version number.
|
|
218
|
+
*/
|
|
219
|
+
patch: number;
|
|
220
|
+
/**
|
|
221
|
+
* Ordered prerelease identifiers.
|
|
222
|
+
*
|
|
223
|
+
* @defaultValue []
|
|
224
|
+
*/
|
|
225
|
+
prerelease: string[];
|
|
226
|
+
/**
|
|
227
|
+
* Ordered build metadata identifiers.
|
|
228
|
+
*
|
|
229
|
+
* @defaultValue []
|
|
230
|
+
*/
|
|
231
|
+
build: string[];
|
|
232
|
+
/**
|
|
233
|
+
* Original version string.
|
|
234
|
+
*/
|
|
235
|
+
raw: string;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Parsed calendar version components.
|
|
239
|
+
*
|
|
240
|
+
* @public
|
|
241
|
+
* @since 0.1.0
|
|
242
|
+
* @forgeIgnore E020
|
|
243
|
+
*/
|
|
244
|
+
export interface CalVer {
|
|
245
|
+
/**
|
|
246
|
+
* Four-digit year value.
|
|
247
|
+
*/
|
|
248
|
+
year: number;
|
|
249
|
+
/**
|
|
250
|
+
* Month value from 1 through 12.
|
|
251
|
+
*/
|
|
252
|
+
month: number;
|
|
253
|
+
/**
|
|
254
|
+
* Day-of-month value when the selected format includes a day token.
|
|
255
|
+
*
|
|
256
|
+
* @defaultValue undefined
|
|
257
|
+
*/
|
|
258
|
+
day?: number;
|
|
259
|
+
/**
|
|
260
|
+
* Patch counter when the selected format includes a patch token.
|
|
261
|
+
*
|
|
262
|
+
* @defaultValue undefined
|
|
263
|
+
*/
|
|
264
|
+
patch?: number;
|
|
265
|
+
/**
|
|
266
|
+
* Source format used to interpret the raw string.
|
|
267
|
+
*/
|
|
268
|
+
format: CalVerFormat;
|
|
269
|
+
/**
|
|
270
|
+
* Original version string.
|
|
271
|
+
*/
|
|
272
|
+
raw: string;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Parsed semantic version result wrapper.
|
|
276
|
+
*
|
|
277
|
+
* @public
|
|
278
|
+
* @since 0.1.0
|
|
279
|
+
* @forgeIgnore E020
|
|
280
|
+
*/
|
|
281
|
+
export interface ParsedSemVer {
|
|
282
|
+
/**
|
|
283
|
+
* Discriminator for semantic version results.
|
|
284
|
+
*/
|
|
285
|
+
type: 'semver';
|
|
286
|
+
/**
|
|
287
|
+
* Parsed semantic version value.
|
|
288
|
+
*/
|
|
289
|
+
version: SemVer;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Parsed calendar version result wrapper.
|
|
293
|
+
*
|
|
294
|
+
* @public
|
|
295
|
+
* @since 0.1.0
|
|
296
|
+
* @forgeIgnore E020
|
|
297
|
+
*/
|
|
298
|
+
export interface ParsedCalVer {
|
|
299
|
+
/**
|
|
300
|
+
* Discriminator for calendar version results.
|
|
301
|
+
*/
|
|
302
|
+
type: 'calver';
|
|
303
|
+
/**
|
|
304
|
+
* Parsed calendar version value.
|
|
305
|
+
*/
|
|
306
|
+
version: CalVer;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Union of supported parsed version payloads.
|
|
310
|
+
*
|
|
311
|
+
* @public
|
|
312
|
+
* @since 0.1.0
|
|
313
|
+
* @forgeIgnore E020
|
|
314
|
+
*/
|
|
315
|
+
export type ParsedVersion = ParsedSemVer | ParsedCalVer;
|
|
316
|
+
/**
|
|
317
|
+
* Describes a single validation problem.
|
|
318
|
+
*
|
|
319
|
+
* @public
|
|
320
|
+
* @since 0.1.0
|
|
321
|
+
* @forgeIgnore E020
|
|
322
|
+
*/
|
|
323
|
+
export interface ValidationError {
|
|
324
|
+
/**
|
|
325
|
+
* Source file associated with the error when available.
|
|
326
|
+
*
|
|
327
|
+
* @defaultValue undefined
|
|
328
|
+
*/
|
|
329
|
+
file?: string;
|
|
330
|
+
/**
|
|
331
|
+
* One-based source line associated with the error when available.
|
|
332
|
+
*
|
|
333
|
+
* @defaultValue undefined
|
|
334
|
+
*/
|
|
335
|
+
line?: number;
|
|
336
|
+
/**
|
|
337
|
+
* Human-readable validation message.
|
|
338
|
+
*/
|
|
339
|
+
message: string;
|
|
340
|
+
/**
|
|
341
|
+
* Severity of the reported problem.
|
|
342
|
+
*/
|
|
343
|
+
severity: 'error' | 'warning';
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Result returned by version parsing and validation helpers.
|
|
347
|
+
*
|
|
348
|
+
* @public
|
|
349
|
+
* @since 0.1.0
|
|
350
|
+
* @forgeIgnore E020
|
|
351
|
+
*/
|
|
352
|
+
export interface ValidationResult {
|
|
353
|
+
/**
|
|
354
|
+
* Indicates whether validation completed without errors.
|
|
355
|
+
*/
|
|
356
|
+
valid: boolean;
|
|
357
|
+
/**
|
|
358
|
+
* Collected validation issues.
|
|
359
|
+
*/
|
|
360
|
+
errors: ValidationError[];
|
|
361
|
+
/**
|
|
362
|
+
* Parsed version details when validation succeeds.
|
|
363
|
+
*
|
|
364
|
+
* @defaultValue undefined
|
|
365
|
+
*/
|
|
366
|
+
version?: ParsedVersion;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Describes a single in-file version replacement.
|
|
370
|
+
*
|
|
371
|
+
* @public
|
|
372
|
+
* @since 0.1.0
|
|
373
|
+
* @forgeIgnore E020
|
|
374
|
+
*/
|
|
375
|
+
export interface SyncChange {
|
|
376
|
+
/**
|
|
377
|
+
* One-based line number where the replacement occurred.
|
|
378
|
+
*/
|
|
379
|
+
line: number;
|
|
380
|
+
/**
|
|
381
|
+
* Previously matched value.
|
|
382
|
+
*/
|
|
383
|
+
oldValue: string;
|
|
384
|
+
/**
|
|
385
|
+
* Replacement value written to the file.
|
|
386
|
+
*/
|
|
387
|
+
newValue: string;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Reports the result of synchronizing a single file.
|
|
391
|
+
*
|
|
392
|
+
* @public
|
|
393
|
+
* @since 0.1.0
|
|
394
|
+
* @forgeIgnore E020
|
|
395
|
+
*/
|
|
396
|
+
export interface SyncResult {
|
|
397
|
+
/**
|
|
398
|
+
* File that was inspected or updated.
|
|
399
|
+
*/
|
|
400
|
+
file: string;
|
|
401
|
+
/**
|
|
402
|
+
* Indicates whether the file content changed.
|
|
403
|
+
*/
|
|
404
|
+
updated: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* Detailed replacements applied within the file.
|
|
407
|
+
*/
|
|
408
|
+
changes: SyncChange[];
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Reports a discovered version mismatch.
|
|
412
|
+
*
|
|
413
|
+
* @public
|
|
414
|
+
* @since 0.1.0
|
|
415
|
+
* @forgeIgnore E020
|
|
416
|
+
*/
|
|
417
|
+
export interface VersionMismatch {
|
|
418
|
+
/**
|
|
419
|
+
* File containing the mismatched value.
|
|
420
|
+
*/
|
|
421
|
+
file: string;
|
|
422
|
+
/**
|
|
423
|
+
* One-based line number of the mismatch.
|
|
424
|
+
*/
|
|
425
|
+
line: number;
|
|
426
|
+
/**
|
|
427
|
+
* Version string found in the file.
|
|
428
|
+
*/
|
|
429
|
+
found: string;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Combined result from a full project validation run.
|
|
433
|
+
*
|
|
434
|
+
* @public
|
|
435
|
+
* @since 0.1.0
|
|
436
|
+
* @forgeIgnore E020
|
|
437
|
+
*/
|
|
438
|
+
export interface FullValidationResult {
|
|
439
|
+
/**
|
|
440
|
+
* Indicates whether all checks passed.
|
|
441
|
+
*/
|
|
442
|
+
valid: boolean;
|
|
443
|
+
/**
|
|
444
|
+
* Canonical version string used for validation.
|
|
445
|
+
*/
|
|
446
|
+
version: string;
|
|
447
|
+
/**
|
|
448
|
+
* Indicates whether the root version string is valid.
|
|
449
|
+
*/
|
|
450
|
+
versionValid: boolean;
|
|
451
|
+
/**
|
|
452
|
+
* Indicates whether synchronized files are in sync.
|
|
453
|
+
*/
|
|
454
|
+
syncValid: boolean;
|
|
455
|
+
/**
|
|
456
|
+
* Indicates whether changelog checks passed.
|
|
457
|
+
*/
|
|
458
|
+
changelogValid: boolean;
|
|
459
|
+
/**
|
|
460
|
+
* Human-readable validation failures collected during the run.
|
|
461
|
+
*/
|
|
462
|
+
errors: string[];
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Reports whether a project is ready to pass VersionGuard checks.
|
|
466
|
+
*
|
|
467
|
+
* @packageDocumentation
|
|
468
|
+
* @public
|
|
469
|
+
* @since 0.1.0
|
|
470
|
+
* @forgeIgnore E020
|
|
471
|
+
*/
|
|
472
|
+
export interface DoctorReport {
|
|
473
|
+
/**
|
|
474
|
+
* Indicates whether all doctor checks passed.
|
|
475
|
+
*/
|
|
476
|
+
ready: boolean;
|
|
477
|
+
/**
|
|
478
|
+
* Package version resolved from `package.json`.
|
|
479
|
+
*/
|
|
480
|
+
version: string;
|
|
481
|
+
/**
|
|
482
|
+
* Indicates whether the package version matches the configured scheme.
|
|
483
|
+
*/
|
|
484
|
+
versionValid: boolean;
|
|
485
|
+
/**
|
|
486
|
+
* Indicates whether synced files match the package version.
|
|
487
|
+
*/
|
|
488
|
+
syncValid: boolean;
|
|
489
|
+
/**
|
|
490
|
+
* Indicates whether changelog validation passed.
|
|
491
|
+
*/
|
|
492
|
+
changelogValid: boolean;
|
|
493
|
+
/**
|
|
494
|
+
* Indicates whether the current working directory is inside a Git repository.
|
|
495
|
+
*/
|
|
496
|
+
gitRepository: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Indicates whether VersionGuard-managed Git hooks are installed.
|
|
499
|
+
*/
|
|
500
|
+
hooksInstalled: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* Indicates whether `git status --porcelain` reports a clean worktree.
|
|
503
|
+
*/
|
|
504
|
+
worktreeClean: boolean;
|
|
505
|
+
/**
|
|
506
|
+
* Human-readable validation and readiness errors.
|
|
507
|
+
*/
|
|
508
|
+
errors: string[];
|
|
509
|
+
}
|
|
510
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,eAAe,GAAG,YAAY,GAAG,YAAY,CAAC;AAExF;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IAErB;;;;OAIG;IACH,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,WAAW,EAAE,CAAC;CAC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
|
2
|
+
"name": "@codluv/versionguard",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Strict versioning enforcement for SemVer and CalVer with git hooks, changelog validation, and file sync from package.json",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"versionguard": "dist/cli.js"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/kryptobaseddev/versionguard.git"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/kryptobaseddev/versionguard#readme",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/kryptobaseddev/versionguard/issues"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "vite build && tsc -p tsconfig.build.json",
|
|
27
|
+
"dev": "vite build --watch",
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"forge:check": "forge-ts check",
|
|
30
|
+
"forge:test": "forge-ts test",
|
|
31
|
+
"forge:build": "forge-ts build",
|
|
32
|
+
"forge:docs:init": "forge-ts init docs",
|
|
33
|
+
"forge:doctor": "forge-ts doctor",
|
|
34
|
+
"lint": "npm run lint:biome && npm run lint:eslint",
|
|
35
|
+
"lint:biome": "biome check .",
|
|
36
|
+
"lint:eslint": "eslint .",
|
|
37
|
+
"format": "biome format --write .",
|
|
38
|
+
"test": "vitest run --coverage",
|
|
39
|
+
"test:watch": "vitest",
|
|
40
|
+
"prepare": "npm run build",
|
|
41
|
+
"changeset": "changeset",
|
|
42
|
+
"version-packages": "changeset version",
|
|
43
|
+
"release": "npm run build && changeset publish"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"semver",
|
|
47
|
+
"calver",
|
|
48
|
+
"versioning",
|
|
49
|
+
"git-hooks",
|
|
50
|
+
"changelog",
|
|
51
|
+
"version-sync",
|
|
52
|
+
"release",
|
|
53
|
+
"version-guard",
|
|
54
|
+
"package-version",
|
|
55
|
+
"keep-a-changelog"
|
|
56
|
+
],
|
|
57
|
+
"author": "kryptobaseddev",
|
|
58
|
+
"license": "MIT",
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"chalk": "^5.6.2",
|
|
64
|
+
"commander": "^12.0.0",
|
|
65
|
+
"glob": "^10.3.0",
|
|
66
|
+
"js-yaml": "^4.1.0"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@biomejs/biome": "^2.2.4",
|
|
70
|
+
"@changesets/changelog-github": "^0.6.0",
|
|
71
|
+
"@changesets/cli": "^2.30.0",
|
|
72
|
+
"@eslint/js": "^9.37.0",
|
|
73
|
+
"@forge-ts/cli": "0.19.4",
|
|
74
|
+
"@types/js-yaml": "^4.0.9",
|
|
75
|
+
"@types/node": "^24.6.0",
|
|
76
|
+
"@vitest/coverage-v8": "^4.0.7",
|
|
77
|
+
"eslint": "^9.37.0",
|
|
78
|
+
"husky": "^9.1.7",
|
|
79
|
+
"typescript": "^5.9.3",
|
|
80
|
+
"typescript-eslint": "^8.46.1",
|
|
81
|
+
"vite": "^7.1.7",
|
|
82
|
+
"vitest": "^4.0.7"
|
|
83
|
+
},
|
|
84
|
+
"engines": {
|
|
85
|
+
"node": ">=22.0.0"
|
|
86
|
+
},
|
|
87
|
+
"files": [
|
|
88
|
+
"dist/"
|
|
89
|
+
]
|
|
90
|
+
}
|