hermex 2.0.0-beta.8 → 2.0.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/dist/cli.mjs +169 -68
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +20 -2
- package/dist/index.mjs +13 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -263,12 +263,22 @@ interface AvailableUpgrade {
|
|
|
263
263
|
releasedDaysAgo: number;
|
|
264
264
|
semverBump: SemverBump;
|
|
265
265
|
level: UpgradeLevel;
|
|
266
|
+
thresholdDays: number;
|
|
266
267
|
isLatest?: boolean;
|
|
267
268
|
}
|
|
269
|
+
/** An upgrade candidate that hasn't yet breached its bump tier's age threshold. */
|
|
270
|
+
interface PendingUpgrade {
|
|
271
|
+
version: string;
|
|
272
|
+
semverBump: SemverBump;
|
|
273
|
+
releasedDaysAgo: number;
|
|
274
|
+
thresholdDays: number;
|
|
275
|
+
daysRemaining: number;
|
|
276
|
+
}
|
|
268
277
|
interface ReleaseAgeEntry {
|
|
269
278
|
installedVersion: string;
|
|
270
279
|
upgrades: AvailableUpgrade[];
|
|
271
280
|
worstLevel: UpgradeLevel | null;
|
|
281
|
+
pendingUpgrade?: PendingUpgrade;
|
|
272
282
|
deprecated?: string;
|
|
273
283
|
latestVersion?: string;
|
|
274
284
|
latestReleasedDaysAgo?: number;
|
|
@@ -320,7 +330,7 @@ interface VersusResult {
|
|
|
320
330
|
//#endregion
|
|
321
331
|
//#region src/rules/shared.d.ts
|
|
322
332
|
interface RuleViolation {
|
|
323
|
-
type: 'detect_files' | 'require_files' | '
|
|
333
|
+
type: 'detect_files' | 'require_files' | 'require_packages' | 'require_scripts' | 'require_package_fields' | 'forbid_package_fields' | 'engine_version' | 'codeowners';
|
|
324
334
|
severity: 'error' | 'warn' | 'info';
|
|
325
335
|
patterns: string[];
|
|
326
336
|
message?: string;
|
|
@@ -339,6 +349,14 @@ interface BannedPackageViolation {
|
|
|
339
349
|
}
|
|
340
350
|
//#endregion
|
|
341
351
|
//#region src/index.d.ts
|
|
352
|
+
/**
|
|
353
|
+
* Identity helper for authoring `hermex.config.ts` with full type inference
|
|
354
|
+
* and autocomplete — mirrors the same `defineConfig` convention used by
|
|
355
|
+
* Vite, ESLint's flat config, and Vitest. Returns its argument unchanged;
|
|
356
|
+
* `loadConfig` (`src/config/loader.ts`) accepts a plain object default
|
|
357
|
+
* export either way, so this is purely a DX affordance, not a requirement.
|
|
358
|
+
*/
|
|
359
|
+
declare function defineConfig(config: HermexConfigInput): HermexConfigInput;
|
|
342
360
|
/** Shape of a single entry in `components` — same as `ComponentUsage`, but with `files` as an array (JSON has no `Set`) */
|
|
343
361
|
interface HermexScanComponent extends Omit<ComponentUsage, 'files'> {
|
|
344
362
|
files: string[];
|
|
@@ -360,4 +378,4 @@ interface HermexScanResult {
|
|
|
360
378
|
bannedPackageViolations: BannedPackageViolation[];
|
|
361
379
|
}
|
|
362
380
|
//#endregion
|
|
363
|
-
export { type BannedPackageViolation, type CodeownersRule, type ComponentUsage, type EngineVersionRule, type HermexConfig, type HermexConfigInput, HermexScanComponent, HermexScanResult, type OutputConfig, type PackageDistribution, type PackageFieldRule, type PackagesConfig, type PatternCount, type ReleaseAgeConfig, type ReleaseAgeThresholds, type RuleConfig, type RuleSeverity, type RuleViolation, type RulesConfig, type VersusConfig, type VersusEntry, type VersusResult };
|
|
381
|
+
export { type BannedPackageViolation, type CodeownersRule, type ComponentUsage, type EngineVersionRule, type HermexConfig, type HermexConfigInput, HermexScanComponent, HermexScanResult, type OutputConfig, type PackageDistribution, type PackageFieldRule, type PackagesConfig, type PatternCount, type ReleaseAgeConfig, type ReleaseAgeThresholds, type RuleConfig, type RuleSeverity, type RuleViolation, type RulesConfig, type VersusConfig, type VersusEntry, type VersusResult, defineConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
/**
|
|
3
|
+
* Identity helper for authoring `hermex.config.ts` with full type inference
|
|
4
|
+
* and autocomplete — mirrors the same `defineConfig` convention used by
|
|
5
|
+
* Vite, ESLint's flat config, and Vitest. Returns its argument unchanged;
|
|
6
|
+
* `loadConfig` (`src/config/loader.ts`) accepts a plain object default
|
|
7
|
+
* export either way, so this is purely a DX affordance, not a requirement.
|
|
8
|
+
*/
|
|
9
|
+
function defineConfig(config) {
|
|
10
|
+
return config;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { defineConfig };
|