@savvy-web/silk 1.3.5 → 1.3.7

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.
@@ -3298,7 +3298,105 @@ type Label = Label$1;
3298
3298
  type Severity = Severity$1;
3299
3299
  type Plugin<Tree extends Node$3 = Node$3, Option extends unknown = unknown> = (config?: [level: Label | Severity | boolean, option?: Option] | Label | Option | Severity) => ((tree: Tree, file: VFile, next: TransformCallback<Tree>) => undefined) | undefined;
3300
3300
  //#endregion
3301
+ //#region ../../node_modules/.pnpm/@pnpm+catalogs.types@1100.0.0/node_modules/@pnpm/catalogs.types/lib/index.d.ts
3302
+ /**
3303
+ * Catalogs parsed from the pnpm-workspace.yaml file.
3304
+ *
3305
+ * https://github.com/pnpm/rfcs/pull/1
3306
+ */
3307
+ interface Catalogs {
3308
+ /**
3309
+ * The default catalog.
3310
+ *
3311
+ * The default catalog can be defined in 2 ways.
3312
+ *
3313
+ * 1. Users can specify a top-level "catalog" field or,
3314
+ * 2. An explicitly named "default" catalog under the "catalogs" map.
3315
+ *
3316
+ * This field contains either definition. Note that it's an error to define
3317
+ * the default catalog using both options. The parser will fail when reading
3318
+ * the workspace manifest.
3319
+ */
3320
+ readonly default?: Catalog;
3321
+ /**
3322
+ * Named catalogs.
3323
+ */
3324
+ readonly [catalogName: string]: Catalog | undefined;
3325
+ }
3326
+ interface Catalog {
3327
+ readonly [dependencyName: string]: string | undefined;
3328
+ }
3329
+ //#endregion
3301
3330
  //#region ../../node_modules/.pnpm/workspaces-effect@1.2.0_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/index.d.ts
3331
+ /**
3332
+ * Raised when assembling the workspace catalog set fails irrecoverably
3333
+ * (e.g. `pnpm-workspace.yaml` unreadable/malformed, default catalog defined twice).
3334
+ * Per-config-dependency hook failures do NOT raise this — they are logged and skipped.
3335
+ *
3336
+ * @public
3337
+ */
3338
+ declare class CatalogAssemblyError extends CatalogAssemblyErrorBase<{
3339
+ readonly source: "manifest" | "config-dependency" | "lockfile";
3340
+ readonly reason: string;
3341
+ }> {
3342
+ get message(): string;
3343
+ }
3344
+ /**
3345
+ * Base constant for {@link CatalogAssemblyError}.
3346
+ *
3347
+ * @privateRemarks
3348
+ * Exported for api-extractor DTS bundling — the `_base` symbol from
3349
+ * `Data.TaggedError` must be visible in the generated .d.ts file.
3350
+ *
3351
+ * @internal
3352
+ */
3353
+ declare const CatalogAssemblyErrorBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
3354
+ readonly _tag: "CatalogAssemblyError";
3355
+ } & Readonly<A>;
3356
+ /**
3357
+ * Raised when a `catalog:`/`workspace:` specifier in a manifest cannot be resolved
3358
+ * (unknown catalog, catalog misconfiguration, or unresolvable workspace reference).
3359
+ *
3360
+ * @public
3361
+ */
3362
+ declare class CatalogResolutionError extends CatalogResolutionErrorBase<{
3363
+ readonly field: string;
3364
+ readonly dependency: string;
3365
+ readonly specifier: string;
3366
+ readonly reason: string;
3367
+ }> {
3368
+ get message(): string;
3369
+ }
3370
+ /**
3371
+ * Base constant for {@link CatalogResolutionError}.
3372
+ *
3373
+ * @privateRemarks
3374
+ * Exported for api-extractor DTS bundling — the `_base` symbol from
3375
+ * `Data.TaggedError` must be visible in the generated .d.ts file.
3376
+ *
3377
+ * @internal
3378
+ */
3379
+ declare const CatalogResolutionErrorBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
3380
+ readonly _tag: "CatalogResolutionError";
3381
+ } & Readonly<A>;
3382
+ /**
3383
+ * Resolves a workspace's catalogs and rewrites catalog:/workspace: specifiers.
3384
+ *
3385
+ * @remarks
3386
+ * Assembles the complete catalog set — inline `pnpm-workspace.yaml` catalogs,
3387
+ * catalogs injected by config dependencies (via pnpmfile `updateConfig` replay),
3388
+ * and lockfile catalogs — without depending on the transient workspace-state file.
3389
+ *
3390
+ * @public
3391
+ */
3392
+ declare class CatalogResolver extends CatalogResolver_base {}
3393
+ declare const CatalogResolver_base: Context.TagClass<CatalogResolver, "@spencerbeggs/workspaces-effect/CatalogResolver", {
3394
+ /** The complete assembled catalog set for the workspace (cached). */readonly catalogs: () => Effect.Effect<Catalogs, CatalogResolverError>; /** Rewrite all catalog:/workspace: specifiers in a manifest to concrete specs. */
3395
+ readonly resolve: (manifest: ManifestLike) => Effect.Effect<ManifestLike, CatalogResolverError | CatalogResolutionError>; /** Resolve a single dependency specifier; None when no rewrite is needed. */
3396
+ readonly resolveSpecifier: (dependency: string, specifier: string) => Effect.Effect<Option.Option<string>, CatalogResolverError | CatalogResolutionError>;
3397
+ }>;
3398
+ /** Errors surfaced by CatalogResolver methods (assembly defers I/O to first call). */
3399
+ declare type CatalogResolverError = CatalogAssemblyError | LockfileInitError;
3302
3400
  /**
3303
3401
  * Result of comparing two WorkspacePackage dependency snapshots.
3304
3402
  * @public
@@ -3311,6 +3409,122 @@ declare interface DependencyDiff {
3311
3409
  readonly to: string;
3312
3410
  }>;
3313
3411
  }
3412
+ /**
3413
+ * Union of errors that may surface from {@link LockfileReader} method calls
3414
+ * because the live layer defers workspace-root discovery, package-manager
3415
+ * detection, and lockfile read/parse to the first invocation.
3416
+ *
3417
+ * @public
3418
+ */
3419
+ declare type LockfileInitError = WorkspaceRootNotFoundError | PackageManagerDetectionError | LockfileReadError | LockfileParseError;
3420
+ /**
3421
+ * Emitted when a lockfile exists but cannot be parsed.
3422
+ *
3423
+ * @remarks
3424
+ * Raised by {@link LockfileReader} when the lockfile is successfully read from
3425
+ * disk but its contents cannot be parsed into the expected format. Each package
3426
+ * manager has a different lockfile format (YAML for pnpm, JSON for npm/bun,
3427
+ * custom format for yarn Berry).
3428
+ *
3429
+ * Fields:
3430
+ * - `lockfilePath` — absolute path to the lockfile that failed to parse.
3431
+ * - `format` — the package manager format that was attempted (`"pnpm"`, `"npm"`, `"yarn"`, or `"bun"`).
3432
+ * - `cause` — the underlying parse error.
3433
+ *
3434
+ * @example Catching the error
3435
+ * ```typescript
3436
+ * import { Effect } from "effect";
3437
+ * import type { LockfileParseError } from "workspaces-effect";
3438
+ * import { LockfileReader, LockfileReaderLive } from "workspaces-effect";
3439
+ *
3440
+ * const program = Effect.gen(function* () {
3441
+ * const reader = yield* LockfileReader;
3442
+ * return yield* reader.read("/workspace/root");
3443
+ * }).pipe(
3444
+ * Effect.catchTag("LockfileParseError", (e) =>
3445
+ * Effect.logError(`Cannot parse ${e.format} lockfile at ${e.lockfilePath}`)
3446
+ * )
3447
+ * );
3448
+ * ```
3449
+ *
3450
+ * @public
3451
+ */
3452
+ declare class LockfileParseError extends LockfileParseErrorBase<{
3453
+ readonly lockfilePath: string;
3454
+ readonly format: "pnpm" | "npm" | "yarn" | "bun";
3455
+ readonly cause: unknown;
3456
+ }> {
3457
+ get message(): string;
3458
+ }
3459
+ /**
3460
+ * Base constant for {@link LockfileParseError}.
3461
+ *
3462
+ * @privateRemarks
3463
+ * Exported for api-extractor DTS bundling — the `_base` symbol from
3464
+ * `Data.TaggedError` must be visible in the generated .d.ts file.
3465
+ *
3466
+ * @internal
3467
+ */
3468
+ declare const LockfileParseErrorBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
3469
+ readonly _tag: "LockfileParseError";
3470
+ } & Readonly<A>;
3471
+ /**
3472
+ * Emitted when a lockfile cannot be read from disk.
3473
+ *
3474
+ * @remarks
3475
+ * Raised by {@link LockfileReader} when the expected lockfile for the detected
3476
+ * package manager (e.g., `pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`,
3477
+ * `bun.lock`) does not exist or cannot be read due to filesystem permissions.
3478
+ *
3479
+ * Fields:
3480
+ * - `lockfilePath` — absolute path to the lockfile that could not be read.
3481
+ * - `reason` — human-readable explanation (e.g., "file not found", "permission denied").
3482
+ *
3483
+ * @example Catching the error
3484
+ * ```typescript
3485
+ * import { Effect } from "effect";
3486
+ * import type { LockfileReadError } from "workspaces-effect";
3487
+ * import { LockfileReader, LockfileReaderLive } from "workspaces-effect";
3488
+ *
3489
+ * const program = Effect.gen(function* () {
3490
+ * const reader = yield* LockfileReader;
3491
+ * return yield* reader.read("/workspace/root");
3492
+ * }).pipe(
3493
+ * Effect.catchTag("LockfileReadError", (e) =>
3494
+ * Effect.logWarning(`No lockfile at ${e.lockfilePath}: ${e.reason}`)
3495
+ * )
3496
+ * );
3497
+ * ```
3498
+ *
3499
+ * @public
3500
+ */
3501
+ declare class LockfileReadError extends LockfileReadErrorBase<{
3502
+ readonly lockfilePath: string;
3503
+ readonly reason: string;
3504
+ }> {
3505
+ get message(): string;
3506
+ }
3507
+ /**
3508
+ * Base constant for {@link LockfileReadError}.
3509
+ *
3510
+ * @privateRemarks
3511
+ * Exported for api-extractor DTS bundling — the `_base` symbol from
3512
+ * `Data.TaggedError` must be visible in the generated .d.ts file.
3513
+ *
3514
+ * @internal
3515
+ */
3516
+ declare const LockfileReadErrorBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
3517
+ readonly _tag: "LockfileReadError";
3518
+ } & Readonly<A>;
3519
+ declare interface ManifestLike {
3520
+ readonly name: string;
3521
+ readonly version: string;
3522
+ dependencies?: Record<string, string>;
3523
+ devDependencies?: Record<string, string>;
3524
+ peerDependencies?: Record<string, string>;
3525
+ optionalDependencies?: Record<string, string>;
3526
+ [k: string]: unknown;
3527
+ }
3314
3528
  /**
3315
3529
  * Emitted when a package.json file cannot be parsed or validated.
3316
3530
  *
@@ -3415,6 +3629,54 @@ declare const PackageJsonSchema: Schema.Struct<{
3415
3629
  * @public
3416
3630
  */
3417
3631
  declare type PackageJsonType = Schema.Schema.Type<typeof PackageJsonSchema>;
3632
+ /**
3633
+ * Emitted when the package manager type cannot be determined.
3634
+ *
3635
+ * @remarks
3636
+ * Raised by {@link PackageManagerDetector} when heuristics (lockfile presence,
3637
+ * `packageManager` field in root package.json) fail to identify a single
3638
+ * package manager for the workspace.
3639
+ *
3640
+ * Fields:
3641
+ * - `searchPath` — the workspace root path that was inspected.
3642
+ * - `reason` — human-readable explanation of the detection failure.
3643
+ *
3644
+ * @example Catching the error
3645
+ * ```typescript
3646
+ * import { Effect } from "effect";
3647
+ * import type { PackageManagerDetectionError } from "workspaces-effect";
3648
+ * import { PackageManagerDetector, PackageManagerDetectorLive } from "workspaces-effect";
3649
+ *
3650
+ * const program = Effect.gen(function* () {
3651
+ * const detector = yield* PackageManagerDetector;
3652
+ * return yield* detector.detect("/workspace/root");
3653
+ * }).pipe(
3654
+ * Effect.catchTag("PackageManagerDetectionError", (e) =>
3655
+ * Effect.succeed(`Could not detect PM at ${e.searchPath}: ${e.reason}`)
3656
+ * )
3657
+ * );
3658
+ * ```
3659
+ *
3660
+ * @public
3661
+ */
3662
+ declare class PackageManagerDetectionError extends PackageManagerDetectionErrorBase<{
3663
+ readonly searchPath: string;
3664
+ readonly reason: string;
3665
+ }> {
3666
+ get message(): string;
3667
+ }
3668
+ /**
3669
+ * Base constant for {@link PackageManagerDetectionError}.
3670
+ *
3671
+ * @privateRemarks
3672
+ * Exported for api-extractor DTS bundling — the `_base` symbol from
3673
+ * `Data.TaggedError` must be visible in the generated .d.ts file.
3674
+ *
3675
+ * @internal
3676
+ */
3677
+ declare const PackageManagerDetectionErrorBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
3678
+ readonly _tag: "PackageManagerDetectionError";
3679
+ } & Readonly<A>;
3418
3680
  /**
3419
3681
  * Emitted when a named package is not found in the workspace.
3420
3682
  *
@@ -4027,6 +4289,54 @@ declare const WorkspacePackage_base: Schema.Class<WorkspacePackage, {
4027
4289
  *
4028
4290
  * @public
4029
4291
  */
4292
+ /**
4293
+ * Emitted when no workspace root can be found from the search path.
4294
+ *
4295
+ * @remarks
4296
+ * Raised by {@link WorkspaceRoot} when directory traversal from the search path
4297
+ * to the filesystem root finds no workspace markers (pnpm-workspace.yaml or
4298
+ * package.json with workspaces field).
4299
+ *
4300
+ * Fields:
4301
+ * - `searchPath` — the absolute path from which upward traversal started.
4302
+ * - `reason` — human-readable explanation of why no root was found.
4303
+ *
4304
+ * @example Catching the error
4305
+ * ```typescript
4306
+ * import { Effect } from "effect";
4307
+ * import type { WorkspaceRootNotFoundError } from "workspaces-effect";
4308
+ * import { WorkspaceRoot, WorkspaceRootLive } from "workspaces-effect";
4309
+ *
4310
+ * const program = Effect.gen(function* () {
4311
+ * const root = yield* WorkspaceRoot;
4312
+ * return yield* root.find("/some/path");
4313
+ * }).pipe(
4314
+ * Effect.catchTag("WorkspaceRootNotFoundError", (e) =>
4315
+ * Effect.succeed(`Fallback: ${e.searchPath}`)
4316
+ * )
4317
+ * );
4318
+ * ```
4319
+ *
4320
+ * @public
4321
+ */
4322
+ declare class WorkspaceRootNotFoundError extends WorkspaceRootNotFoundErrorBase<{
4323
+ readonly searchPath: string;
4324
+ readonly reason: string;
4325
+ }> {
4326
+ get message(): string;
4327
+ }
4328
+ /**
4329
+ * Base constant for {@link WorkspaceRootNotFoundError}.
4330
+ *
4331
+ * @privateRemarks
4332
+ * Exported for api-extractor DTS bundling — the `_base` symbol from
4333
+ * `Data.TaggedError` must be visible in the generated .d.ts file.
4334
+ *
4335
+ * @internal
4336
+ */
4337
+ declare const WorkspaceRootNotFoundErrorBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
4338
+ readonly _tag: "WorkspaceRootNotFoundError";
4339
+ } & Readonly<A>;
4030
4340
  //#endregion
4031
4341
  //#region ../silk-effects/dist/dev/pkg/index.d.ts
4032
4342
  //#region \0rolldown/runtime.js
@@ -5585,6 +5895,16 @@ declare const DependencyTableTypeSchema: Schema.Literal<["dependency", "devDepen
5585
5895
  * @public
5586
5896
  */
5587
5897
  type DependencyTableType = typeof DependencyTableTypeSchema.Type;
5898
+ /**
5899
+ * The canonical accepted-value pattern for a dependency-table From/To cell:
5900
+ * the em-dash sentinel (U+2014), a bare/`~`/`^` semver, or — as a last-resort
5901
+ * fallback when a `catalog:`/`workspace:` specifier could not be resolved to a
5902
+ * concrete version — a pnpm protocol string. Non-overlapping alternatives keep
5903
+ * this free of polynomial backtracking (CodeQL).
5904
+ *
5905
+ * @public
5906
+ */
5907
+ declare const VERSION_RE: RegExp;
5588
5908
  /**
5589
5909
  * Version string or em dash (U+2014) sentinel for added/removed entries.
5590
5910
  *
@@ -5857,7 +6177,7 @@ declare class DependencyTable {
5857
6177
  /**
5858
6178
  * Class-based API wrapper for changeset linting.
5859
6179
  *
5860
- * Provides a static class interface that runs all remark-lint rules
6180
+ * Provides a static class interface that runs all five remark-lint rules
5861
6181
  * against changeset markdown files and returns structured diagnostics.
5862
6182
  *
5863
6183
  * @internal
@@ -5871,11 +6191,12 @@ declare class DependencyTable {
5871
6191
  * (file, line, column) for integration with editors, CI reporters, and
5872
6192
  * the Effect CLI's `lint` and `check` commands.
5873
6193
  *
5874
- * The four rules that produce lint messages are:
6194
+ * The five rules that produce lint messages are:
5875
6195
  *
5876
6196
  * - **heading-hierarchy** -- ensures headings follow a valid nesting order
5877
6197
  * - **required-sections** -- checks that mandatory sections are present
5878
6198
  * - **content-structure** -- validates the structure of section content
6199
+ * - **dependency-table-format** -- enforces the machine-generated dependency-table format for `## Dependencies` sections
5879
6200
  * - **uncategorized-content** -- flags content outside recognized section headings
5880
6201
  *
5881
6202
  * @public
@@ -5894,9 +6215,10 @@ interface LintMessage {
5894
6215
  * Identifier of the remark-lint rule that produced this message.
5895
6216
  *
5896
6217
  * @remarks
5897
- * Corresponds to one of the four built-in rules: `"heading-hierarchy"`,
5898
- * `"required-sections"`, `"content-structure"`, or `"uncategorized-content"`.
5899
- * Falls back to `"unknown"` if the underlying vfile message has no rule ID.
6218
+ * Corresponds to one of the five built-in rules: `"heading-hierarchy"`,
6219
+ * `"required-sections"`, `"content-structure"`, `"dependency-table-format"`,
6220
+ * or `"uncategorized-content"`. Falls back to `"unknown"` if the underlying
6221
+ * vfile message has no rule ID.
5900
6222
  */
5901
6223
  rule: string;
5902
6224
  /**
@@ -5929,9 +6251,9 @@ interface LintMessage {
5929
6251
  /**
5930
6252
  * Static class for linting changeset markdown files.
5931
6253
  *
5932
- * Runs the four remark-lint rules (heading-hierarchy, required-sections,
5933
- * content-structure, uncategorized-content) against changeset markdown
5934
- * and returns structured {@link LintMessage} diagnostics.
6254
+ * Runs the five remark-lint rules (heading-hierarchy, required-sections,
6255
+ * content-structure, dependency-table-format, uncategorized-content) against
6256
+ * changeset markdown and returns structured {@link LintMessage} diagnostics.
5935
6257
  *
5936
6258
  * @remarks
5937
6259
  * This class implements the pre-validation layer of the three-layer
@@ -6016,7 +6338,7 @@ declare class ChangesetLinter {
6016
6338
  *
6017
6339
  * @remarks
6018
6340
  * Reads the file synchronously, strips YAML frontmatter, and runs all
6019
- * four lint rules. The file path is preserved in each returned
6341
+ * five lint rules. The file path is preserved in each returned
6020
6342
  * {@link LintMessage} for error reporting.
6021
6343
  *
6022
6344
  * @param filePath - Absolute or relative path to the changeset `.md` file
@@ -6027,7 +6349,7 @@ declare class ChangesetLinter {
6027
6349
  * Validate a markdown string directly.
6028
6350
  *
6029
6351
  * @remarks
6030
- * Strips YAML frontmatter (if present) and runs all four lint rules
6352
+ * Strips YAML frontmatter (if present) and runs all five lint rules
6031
6353
  * against the remaining content. This method is useful for validating
6032
6354
  * changeset content that is already in memory, such as in test suites
6033
6355
  * or editor integrations.
@@ -7453,6 +7775,228 @@ declare const ChangelogServiceBase: Context.TagClass<ChangelogService, "Changelo
7453
7775
  * @public
7454
7776
  */
7455
7777
  declare class ChangelogService extends ChangelogServiceBase {} //#endregion
7778
+ //#region src/changesets/services/workspace-snapshot.d.ts
7779
+ /**
7780
+ * One workspace package as it existed at a specific git ref.
7781
+ *
7782
+ * @public
7783
+ */
7784
+ interface WorkspaceSnapshot {
7785
+ /** Package name from `package.json#name`. */
7786
+ readonly name: string;
7787
+ /** Repo-relative path of the package directory at this ref. */
7788
+ readonly relativePath: string;
7789
+ /** Package version from `package.json#version`. */
7790
+ readonly version: string;
7791
+ /** Declared `dependencies` (raw strings, including `workspace:` / `catalog:` protocols). */
7792
+ readonly dependencies: Readonly<Record<string, string>>;
7793
+ /** Declared `devDependencies`. */
7794
+ readonly devDependencies: Readonly<Record<string, string>>;
7795
+ /** Declared `peerDependencies`. */
7796
+ readonly peerDependencies: Readonly<Record<string, string>>;
7797
+ /** Declared `optionalDependencies`. */
7798
+ readonly optionalDependencies: Readonly<Record<string, string>>;
7799
+ }
7800
+ /**
7801
+ * Effect service interface for reading workspace snapshots.
7802
+ *
7803
+ * @public
7804
+ */
7805
+ interface WorkspaceSnapshotReaderShape {
7806
+ /**
7807
+ * Read every workspace package's snapshot at the given git ref.
7808
+ *
7809
+ * @param cwd - Project root (must be inside a git repo)
7810
+ * @param ref - Any valid git revision spec — branch, tag, SHA, `HEAD~1`, etc.
7811
+ * @returns Effect resolving to one {@link WorkspaceSnapshot} per workspace
7812
+ * package present at that ref, or failing with {@link GitError}
7813
+ */
7814
+ readonly snapshotAt: (cwd: string, ref: string) => Effect.Effect<ReadonlyArray<WorkspaceSnapshot>, GitError>;
7815
+ }
7816
+ /**
7817
+ * @internal
7818
+ */
7819
+ declare const WorkspaceSnapshotReaderBase: Context.TagClass<WorkspaceSnapshotReader, "WorkspaceSnapshotReader", WorkspaceSnapshotReaderShape>;
7820
+ /**
7821
+ * Effect service tag for {@link WorkspaceSnapshotReaderShape}.
7822
+ *
7823
+ * @public
7824
+ */
7825
+ declare class WorkspaceSnapshotReader extends WorkspaceSnapshotReaderBase {}
7826
+ /**
7827
+ * Production layer for {@link WorkspaceSnapshotReader}.
7828
+ *
7829
+ * @public
7830
+ */
7831
+ declare const WorkspaceSnapshotReaderLive: Layer.Layer<WorkspaceSnapshotReader>; //#endregion
7832
+ //#region src/changesets/utils/dep-diff.d.ts
7833
+ /**
7834
+ * A workspace package's worth of dependency-table rows.
7835
+ *
7836
+ * @public
7837
+ */
7838
+ interface WorkspaceDependencyDiff {
7839
+ /** The workspace package whose `package.json` changed. */
7840
+ readonly package: string;
7841
+ /** Repo-relative path of the package directory (taken from the `after` snapshot when available). */
7842
+ readonly relativePath: string;
7843
+ /** One row per dependency change, sorted by the existing `sortDependencyRows` convention. */
7844
+ readonly rows: ReadonlyArray<DependencyTableRow>;
7845
+ }
7846
+ /**
7847
+ * Diff two workspace snapshots and return per-package dependency-table rows.
7848
+ *
7849
+ * @param before - Snapshot at the older ref (typically the merge base). Pass
7850
+ * `null` for workspace packages that did not exist at the older ref — every
7851
+ * declared dep is then reported as `"added"`.
7852
+ * @param after - Snapshot at the newer ref (typically the working tree).
7853
+ * @returns One {@link WorkspaceDependencyDiff} entry per workspace package
7854
+ * that has at least one row. Packages with no changes are omitted.
7855
+ *
7856
+ * @public
7857
+ */
7858
+ declare function computeWorkspaceDependencyDiffs(beforeSnapshots: ReadonlyArray<WorkspaceSnapshot>, afterSnapshots: ReadonlyArray<WorkspaceSnapshot>): ReadonlyArray<WorkspaceDependencyDiff>; //#endregion
7859
+ //#region src/changesets/services/deps-regen.d.ts
7860
+ /**
7861
+ * Resolve protocol From/To cells to concrete versions (raw-string fallback
7862
+ * when unresolved or on resolver error), leave em-dash sentinels untouched,
7863
+ * then optionally drop `devDependency` rows, and re-sort.
7864
+ *
7865
+ * @param diff - One workspace package's dependency-table rows.
7866
+ * @param keepDevDeps - When `true`, retain `devDependency` rows; otherwise
7867
+ * drop them unconditionally (the regen default).
7868
+ * @returns An Effect yielding the transformed {@link WorkspaceDependencyDiff}.
7869
+ *
7870
+ * @public
7871
+ */
7872
+ declare const resolveDiffRows: (diff: WorkspaceDependencyDiff, keepDevDeps?: boolean) => Effect.Effect<WorkspaceDependencyDiff, never, CatalogResolver>;
7873
+ /**
7874
+ * Strict detection of "pure dependency changesets" per the documented
7875
+ * rules: single-package frontmatter, single `## Dependencies` heading,
7876
+ * no other body content beyond that section.
7877
+ *
7878
+ * @param content - Raw `.changeset/*.md` file contents.
7879
+ * @returns `{ isPure, package }` — `isPure` is `true` only for a
7880
+ * single-package, Dependencies-only changeset; `package` is the sole
7881
+ * frontmatter package name (or `null` when not pure).
7882
+ *
7883
+ * @public
7884
+ */
7885
+ declare function isPureDependencyChangeset(content: string): {
7886
+ isPure: boolean;
7887
+ package: string | null;
7888
+ };
7889
+ /**
7890
+ * A complete, side-effect-free regen plan: which stale pure-dependency
7891
+ * changesets to delete, which fresh changesets to write (carrying the
7892
+ * already-resolved diff), and which mixed changesets were left untouched.
7893
+ *
7894
+ * @public
7895
+ */
7896
+ interface RegenPlan {
7897
+ readonly toDelete: ReadonlyArray<{
7898
+ readonly file: string;
7899
+ readonly package: string;
7900
+ }>;
7901
+ readonly toWrite: ReadonlyArray<{
7902
+ readonly file: string;
7903
+ readonly package: string;
7904
+ readonly diff: WorkspaceDependencyDiff;
7905
+ }>;
7906
+ readonly skippedMixed: ReadonlyArray<string>;
7907
+ }
7908
+ /**
7909
+ * The result of applying a {@link RegenPlan}: the files actually deleted
7910
+ * and written, plus the mixed changesets that were skipped.
7911
+ *
7912
+ * @public
7913
+ */
7914
+ interface RegenResult {
7915
+ readonly deleted: ReadonlyArray<string>;
7916
+ readonly written: ReadonlyArray<string>;
7917
+ readonly skippedMixed: ReadonlyArray<string>;
7918
+ }
7919
+ /**
7920
+ * Options for {@link DepsRegenShape.plan}.
7921
+ *
7922
+ * @public
7923
+ */
7924
+ interface DepsRegenOptions {
7925
+ /** Project root (containing `.changeset/`). */
7926
+ readonly cwd: string;
7927
+ /** Override the base branch used to compute the merge-base when `from` is omitted. */
7928
+ readonly base?: string;
7929
+ /** Restrict regeneration to a single workspace package. */
7930
+ readonly package?: string;
7931
+ /**
7932
+ * When `true`, retain `devDependency` rows (the `deps detect` path);
7933
+ * when falsy (the `deps regen` default), drop them unconditionally.
7934
+ * Protocol resolution runs regardless.
7935
+ */
7936
+ readonly includeDevDeps?: boolean;
7937
+ /**
7938
+ * Older ref to diff from. Defaults to `git merge-base <base branch> HEAD`.
7939
+ */
7940
+ readonly from?: string;
7941
+ /**
7942
+ * Newer ref to diff to. Defaults to the working tree (staged + unstaged
7943
+ * + untracked) via {@link snapshotFromWorktree}.
7944
+ */
7945
+ readonly to?: string;
7946
+ }
7947
+ /**
7948
+ * Effect service interface for the deps regen/detect orchestration.
7949
+ *
7950
+ * @public
7951
+ */
7952
+ interface DepsRegenShape {
7953
+ /**
7954
+ * Compute a complete {@link RegenPlan} without touching the filesystem.
7955
+ *
7956
+ * @param options - See {@link DepsRegenOptions}.
7957
+ * @returns An Effect yielding the plan, or failing with {@link GitError}.
7958
+ */
7959
+ readonly plan: (options: DepsRegenOptions) => Effect.Effect<RegenPlan, GitError | WorkspaceDiscoveryError, never>;
7960
+ /**
7961
+ * Apply a {@link RegenPlan}: delete stale changesets, write fresh ones.
7962
+ *
7963
+ * @param plan - The plan produced by {@link DepsRegenShape.plan}.
7964
+ * @returns An Effect yielding a {@link RegenResult}.
7965
+ */
7966
+ readonly execute: (plan: RegenPlan) => Effect.Effect<RegenResult, never, never>;
7967
+ }
7968
+ /**
7969
+ * @internal
7970
+ */
7971
+ declare const DepsRegenBase: Context.TagClass<DepsRegen, "Changesets/DepsRegen", DepsRegenShape>;
7972
+ /**
7973
+ * Effect service tag for {@link DepsRegenShape}.
7974
+ *
7975
+ * @example
7976
+ * ```typescript
7977
+ * import { Effect } from "effect";
7978
+ * import { Changesets } from "@savvy-web/silk-effects";
7979
+ *
7980
+ * const program = Effect.gen(function* () {
7981
+ * const svc = yield* Changesets.DepsRegen;
7982
+ * const plan = yield* svc.plan({ cwd: process.cwd() });
7983
+ * return yield* svc.execute(plan);
7984
+ * });
7985
+ * ```
7986
+ *
7987
+ * @public
7988
+ */
7989
+ declare class DepsRegen extends DepsRegenBase {}
7990
+ /**
7991
+ * Live layer for {@link DepsRegen}.
7992
+ *
7993
+ * Requires {@link WorkspaceSnapshotReader}, {@link ConfigInspector},
7994
+ * `WorkspaceDiscovery`, `CatalogResolver`, and `PublishabilityDetector`
7995
+ * (the last three from `workspaces-effect`).
7996
+ *
7997
+ * @public
7998
+ */
7999
+ declare const DepsRegenLive: Layer.Layer<DepsRegen, never, WorkspaceSnapshotReader | ConfigInspector | WorkspaceDiscovery | CatalogResolver | PublishabilityDetector>; //#endregion
7456
8000
  //#region src/changesets/schemas/release-plan.d.ts
7457
8001
  /** A semantic-version bump level (the `"none"` plan type is filtered out upstream). @public */
7458
8002
  declare const BumpTypeSchema: Schema.Literal<["major", "minor", "patch"]>;
@@ -7565,60 +8109,6 @@ declare function makeReleasePlannerTest(fixed: {
7565
8109
  readonly preview?: ChangesetPreview;
7566
8110
  readonly apply?: AppliedRelease;
7567
8111
  }): Layer.Layer<ReleasePlanner>; //#endregion
7568
- //#region src/changesets/services/workspace-snapshot.d.ts
7569
- /**
7570
- * One workspace package as it existed at a specific git ref.
7571
- *
7572
- * @public
7573
- */
7574
- interface WorkspaceSnapshot {
7575
- /** Package name from `package.json#name`. */
7576
- readonly name: string;
7577
- /** Repo-relative path of the package directory at this ref. */
7578
- readonly relativePath: string;
7579
- /** Package version from `package.json#version`. */
7580
- readonly version: string;
7581
- /** Declared `dependencies` (raw strings, including `workspace:` / `catalog:` protocols). */
7582
- readonly dependencies: Readonly<Record<string, string>>;
7583
- /** Declared `devDependencies`. */
7584
- readonly devDependencies: Readonly<Record<string, string>>;
7585
- /** Declared `peerDependencies`. */
7586
- readonly peerDependencies: Readonly<Record<string, string>>;
7587
- /** Declared `optionalDependencies`. */
7588
- readonly optionalDependencies: Readonly<Record<string, string>>;
7589
- }
7590
- /**
7591
- * Effect service interface for reading workspace snapshots.
7592
- *
7593
- * @public
7594
- */
7595
- interface WorkspaceSnapshotReaderShape {
7596
- /**
7597
- * Read every workspace package's snapshot at the given git ref.
7598
- *
7599
- * @param cwd - Project root (must be inside a git repo)
7600
- * @param ref - Any valid git revision spec — branch, tag, SHA, `HEAD~1`, etc.
7601
- * @returns Effect resolving to one {@link WorkspaceSnapshot} per workspace
7602
- * package present at that ref, or failing with {@link GitError}
7603
- */
7604
- readonly snapshotAt: (cwd: string, ref: string) => Effect.Effect<ReadonlyArray<WorkspaceSnapshot>, GitError>;
7605
- }
7606
- /**
7607
- * @internal
7608
- */
7609
- declare const WorkspaceSnapshotReaderBase: Context.TagClass<WorkspaceSnapshotReader, "WorkspaceSnapshotReader", WorkspaceSnapshotReaderShape>;
7610
- /**
7611
- * Effect service tag for {@link WorkspaceSnapshotReaderShape}.
7612
- *
7613
- * @public
7614
- */
7615
- declare class WorkspaceSnapshotReader extends WorkspaceSnapshotReaderBase {}
7616
- /**
7617
- * Production layer for {@link WorkspaceSnapshotReader}.
7618
- *
7619
- * @public
7620
- */
7621
- declare const WorkspaceSnapshotReaderLive: Layer.Layer<WorkspaceSnapshotReader>; //#endregion
7622
8112
  //#region src/changesets/schemas/changeset.d.ts
7623
8113
  /**
7624
8114
  * Schema for a changeset summary (1--1000 characters).
@@ -8254,33 +8744,6 @@ declare const LegacyVersionFilesSchema: Schema.Array$<Schema.Struct<{
8254
8744
  paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>; /** Workspace package name to source the version from, bypassing path-based resolution. */
8255
8745
  package: Schema.optional<Schema.filter<typeof Schema.String>>;
8256
8746
  }>>; //#endregion
8257
- //#region src/changesets/utils/dep-diff.d.ts
8258
- /**
8259
- * A workspace package's worth of dependency-table rows.
8260
- *
8261
- * @public
8262
- */
8263
- interface WorkspaceDependencyDiff {
8264
- /** The workspace package whose `package.json` changed. */
8265
- readonly package: string;
8266
- /** Repo-relative path of the package directory (taken from the `after` snapshot when available). */
8267
- readonly relativePath: string;
8268
- /** One row per dependency change, sorted by the existing `sortDependencyRows` convention. */
8269
- readonly rows: ReadonlyArray<DependencyTableRow>;
8270
- }
8271
- /**
8272
- * Diff two workspace snapshots and return per-package dependency-table rows.
8273
- *
8274
- * @param before - Snapshot at the older ref (typically the merge base). Pass
8275
- * `null` for workspace packages that did not exist at the older ref — every
8276
- * declared dep is then reported as `"added"`.
8277
- * @param after - Snapshot at the newer ref (typically the working tree).
8278
- * @returns One {@link WorkspaceDependencyDiff} entry per workspace package
8279
- * that has at least one row. Packages with no changes are omitted.
8280
- *
8281
- * @public
8282
- */
8283
- declare function computeWorkspaceDependencyDiffs(beforeSnapshots: ReadonlyArray<WorkspaceSnapshot>, afterSnapshots: ReadonlyArray<WorkspaceSnapshot>): ReadonlyArray<WorkspaceDependencyDiff>; //#endregion
8284
8747
  //#region src/changesets/utils/dependency-table.d.ts
8285
8748
  /**
8286
8749
  * Serialize dependency table rows to a markdown table string.
@@ -9199,7 +9662,7 @@ declare const RequiredSectionsRule: Plugin<Root, unknown>; //#endregion
9199
9662
  //#region src/changesets/remark/rules/uncategorized-content.d.ts
9200
9663
  declare const UncategorizedContentRule: Plugin<Root, unknown>;
9201
9664
  declare namespace index_d_exports {
9202
- export { AggregateDependencyTablesPlugin, AppliedRelease, AppliedReleaseEntrySchema, AppliedReleaseSchema, BranchAnalysis, BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerBase, BranchAnalyzerLive, BranchAnalyzerShape, BranchFileEntry, BranchFileEntrySchema, BumpType, BumpTypeSchema, Categories, Changelog, ChangelogService, ChangelogServiceBase, ChangelogServiceShape, ChangelogTransformer, Changeset, ChangesetLinter, ChangesetOptions, ChangesetOptionsSchema, ChangesetPreview, ChangesetPreviewSchema, ChangesetSchema, ChangesetSummarySchema, ChangesetValidationError, ChangesetValidationErrorBase, Classification, ClassificationReason, ClassificationReasonSchema, ClassificationSchema, CommitHashSchema, ConfigInspector, ConfigInspectorBase, ConfigInspectorLive, ConfigInspectorShape, ConfigurationError, ConfigurationErrorBase, ContentStructureRule, ContributorFootnotesPlugin, DeduplicateItemsPlugin, DependencyAction, DependencyActionSchema, DependencyTable, DependencyTableFormatRule, DependencyTableRow, DependencyTableRowSchema, DependencyTableSchema, DependencyTableType, DependencyTableTypeSchema, DependencyType, DependencyTypeSchema, DependencyUpdate, DependencyUpdateSchema, FileStatus, FileStatusSchema, GitError, GitErrorBase, GitHubApiError, GitHubApiErrorBase, GitHubCommitInfo, GitHubInfo, GitHubInfoSchema, GitHubLive, GitHubService, GitHubServiceBase, GitHubServiceShape, GlobSchema, HeadingHierarchyRule, InspectedConfig, InspectedConfigSchema, IssueLinkRefsPlugin, IssueNumberSchema, JsonPathSchema, LegacyVersionFileConfig, LegacyVersionFileConfigSchema, LegacyVersionFilesSchema, LintMessage, MarkdownLive, MarkdownParseError, MarkdownParseErrorBase, MarkdownService, MarkdownServiceBase, MarkdownServiceShape, ContentStructureRule$1 as MarkdownlintContentStructureRule, DependencyTableFormatRule$1 as MarkdownlintDependencyTableFormatRule, HeadingHierarchyRule$1 as MarkdownlintHeadingHierarchyRule, RequiredSectionsRule$1 as MarkdownlintRequiredSectionsRule, UncategorizedContentRule$1 as MarkdownlintUncategorizedContentRule, MergeSectionsPlugin, NonEmptyString, NormalizeFormatPlugin, PackageScope, PackageScopeSchema, PackagesRecordSchema, PendingChangeset, PendingChangesetSchema, PositiveInteger, PreviewRelease, PreviewReleaseSchema, ReleasePlanError, ReleasePlanErrorBase, ReleasePlanner, ReleasePlannerBase, ReleasePlannerLive, ReleasePlannerShape, ReorderSectionsPlugin, RepoSchema, RequiredSectionsRule, ResolvedPackageScope, ResolvedPackageScopeSchema, ResolvedVersionFile, ResolvedVersionFileSchema, SectionCategory, SectionCategorySchema, SilkChangesetPreset, SilkChangesetTransformPreset, SilkChangesetsRules, UncategorizedContentRule, UrlOrMarkdownLinkSchema, UsernameSchema, VersionFileConfig, VersionFileConfigSchema, VersionFileError, VersionFileErrorBase, VersionFileUpdate, VersionFileUpdateRecordSchema, VersionFiles, VersionFilesSchema, VersionOrEmptySchema, VersionType, VersionTypeSchema, WorkspaceDependencyDiff, WorkspaceSnapshot, WorkspaceSnapshotReader, WorkspaceSnapshotReaderBase, WorkspaceSnapshotReaderLive, WorkspaceSnapshotReaderShape, WorkspaceVersion, changelogFunctions$1 as changelogFunctions, computeWorkspaceDependencyDiffs, gitMergeBase, listPublishablePackageNames, makeBranchAnalyzerTest, makeConfigInspectorTest, makeGitHubTest, makeReleasePlannerTest, serializeDependencyTableToMarkdown, snapshotFromWorktree };
9665
+ export { AggregateDependencyTablesPlugin, AppliedRelease, AppliedReleaseEntrySchema, AppliedReleaseSchema, BranchAnalysis, BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerBase, BranchAnalyzerLive, BranchAnalyzerShape, BranchFileEntry, BranchFileEntrySchema, BumpType, BumpTypeSchema, Categories, Changelog, ChangelogService, ChangelogServiceBase, ChangelogServiceShape, ChangelogTransformer, Changeset, ChangesetLinter, ChangesetOptions, ChangesetOptionsSchema, ChangesetPreview, ChangesetPreviewSchema, ChangesetSchema, ChangesetSummarySchema, ChangesetValidationError, ChangesetValidationErrorBase, Classification, ClassificationReason, ClassificationReasonSchema, ClassificationSchema, CommitHashSchema, ConfigInspector, ConfigInspectorBase, ConfigInspectorLive, ConfigInspectorShape, ConfigurationError, ConfigurationErrorBase, ContentStructureRule, ContributorFootnotesPlugin, DeduplicateItemsPlugin, DependencyAction, DependencyActionSchema, DependencyTable, DependencyTableFormatRule, DependencyTableRow, DependencyTableRowSchema, DependencyTableSchema, DependencyTableType, DependencyTableTypeSchema, DependencyType, DependencyTypeSchema, DependencyUpdate, DependencyUpdateSchema, DepsRegen, DepsRegenBase, DepsRegenLive, DepsRegenOptions, DepsRegenShape, FileStatus, FileStatusSchema, GitError, GitErrorBase, GitHubApiError, GitHubApiErrorBase, GitHubCommitInfo, GitHubInfo, GitHubInfoSchema, GitHubLive, GitHubService, GitHubServiceBase, GitHubServiceShape, GlobSchema, HeadingHierarchyRule, InspectedConfig, InspectedConfigSchema, IssueLinkRefsPlugin, IssueNumberSchema, JsonPathSchema, LegacyVersionFileConfig, LegacyVersionFileConfigSchema, LegacyVersionFilesSchema, LintMessage, MarkdownLive, MarkdownParseError, MarkdownParseErrorBase, MarkdownService, MarkdownServiceBase, MarkdownServiceShape, ContentStructureRule$1 as MarkdownlintContentStructureRule, DependencyTableFormatRule$1 as MarkdownlintDependencyTableFormatRule, HeadingHierarchyRule$1 as MarkdownlintHeadingHierarchyRule, RequiredSectionsRule$1 as MarkdownlintRequiredSectionsRule, UncategorizedContentRule$1 as MarkdownlintUncategorizedContentRule, MergeSectionsPlugin, NonEmptyString, NormalizeFormatPlugin, PackageScope, PackageScopeSchema, PackagesRecordSchema, PendingChangeset, PendingChangesetSchema, PositiveInteger, PreviewRelease, PreviewReleaseSchema, RegenPlan, RegenResult, ReleasePlanError, ReleasePlanErrorBase, ReleasePlanner, ReleasePlannerBase, ReleasePlannerLive, ReleasePlannerShape, ReorderSectionsPlugin, RepoSchema, RequiredSectionsRule, ResolvedPackageScope, ResolvedPackageScopeSchema, ResolvedVersionFile, ResolvedVersionFileSchema, SectionCategory, SectionCategorySchema, SilkChangesetPreset, SilkChangesetTransformPreset, SilkChangesetsRules, UncategorizedContentRule, UrlOrMarkdownLinkSchema, UsernameSchema, VERSION_RE, VersionFileConfig, VersionFileConfigSchema, VersionFileError, VersionFileErrorBase, VersionFileUpdate, VersionFileUpdateRecordSchema, VersionFiles, VersionFilesSchema, VersionOrEmptySchema, VersionType, VersionTypeSchema, WorkspaceDependencyDiff, WorkspaceSnapshot, WorkspaceSnapshotReader, WorkspaceSnapshotReaderBase, WorkspaceSnapshotReaderLive, WorkspaceSnapshotReaderShape, WorkspaceVersion, changelogFunctions$1 as changelogFunctions, computeWorkspaceDependencyDiffs, gitMergeBase, isPureDependencyChangeset, listPublishablePackageNames, makeBranchAnalyzerTest, makeConfigInspectorTest, makeGitHubTest, makeReleasePlannerTest, resolveDiffRows, serializeDependencyTableToMarkdown, snapshotFromWorktree };
9203
9666
  } //#endregion
9204
9667
  //#region src/commitlint/config/schema.d.ts
9205
9668
  /**