@savvy-web/silk 1.3.7 → 1.3.9

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 (36) hide show
  1. package/changesets-changelog.cjs +70165 -72721
  2. package/changesets-changelog.d.cts +1130 -938
  3. package/changesets-changelog.d.ts +1130 -938
  4. package/changesets-markdownlint.cjs +70165 -72721
  5. package/changesets-markdownlint.d.cts +1130 -938
  6. package/changesets-markdownlint.d.ts +1130 -938
  7. package/package.json +4 -4
  8. package/packages/silk-effects/dist/dev/pkg/changesets/errors.cjs +45 -0
  9. package/packages/silk-effects/dist/dev/pkg/changesets/errors.js +44 -1
  10. package/packages/silk-effects/dist/dev/pkg/changesets/index.cjs +16 -21
  11. package/packages/silk-effects/dist/dev/pkg/changesets/index.js +8 -11
  12. package/packages/silk-effects/dist/dev/pkg/changesets/services/branch-analyzer.cjs +2 -1
  13. package/packages/silk-effects/dist/dev/pkg/changesets/services/branch-analyzer.js +2 -1
  14. package/packages/silk-effects/dist/dev/pkg/changesets/services/config-inspector.cjs +7 -7
  15. package/packages/silk-effects/dist/dev/pkg/changesets/services/config-inspector.js +4 -4
  16. package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.cjs +159 -115
  17. package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.js +157 -113
  18. package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.cjs +105 -81
  19. package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.js +105 -81
  20. package/packages/silk-effects/dist/dev/pkg/changesets/utils/dep-diff.cjs +81 -47
  21. package/packages/silk-effects/dist/dev/pkg/changesets/utils/dep-diff.js +81 -47
  22. package/packages/silk-effects/dist/dev/pkg/changesets/utils/git.cjs +51 -0
  23. package/packages/silk-effects/dist/dev/pkg/changesets/utils/git.js +51 -0
  24. package/packages/silk-effects/dist/dev/pkg/changesets/utils/publishability.cjs +16 -4
  25. package/packages/silk-effects/dist/dev/pkg/changesets/utils/publishability.js +15 -3
  26. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfig.cjs +2 -1
  27. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfig.js +1 -1
  28. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfigReader.cjs +2 -1
  29. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfigReader.js +1 -1
  30. package/packages/silk-effects/dist/dev/pkg/services/SilkPublishability.cjs +20 -13
  31. package/packages/silk-effects/dist/dev/pkg/services/SilkPublishability.js +10 -4
  32. package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
  33. package/packages/silk-effects/dist/dev/pkg/changesets/services/workspace-snapshot.cjs +0 -162
  34. package/packages/silk-effects/dist/dev/pkg/changesets/services/workspace-snapshot.js +0 -160
  35. package/packages/silk-effects/dist/dev/pkg/changesets/utils/worktree-snapshot.cjs +0 -144
  36. package/packages/silk-effects/dist/dev/pkg/changesets/utils/worktree-snapshot.js +0 -142
@@ -1,7 +1,5 @@
1
1
  import { Context, Effect, Layer, Option, Schema } from "effect";
2
- import { FileSystem } from "@effect/platform";
3
- import { VoidIfEmpty } from "effect/Types";
4
- import { YieldableError } from "effect/Cause";
2
+ import { CommandExecutor, FileSystem, Path } from "@effect/platform";
5
3
  //#region ../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
6
4
  // ## Interfaces
7
5
  /**
@@ -3327,540 +3325,324 @@ interface Catalog {
3327
3325
  readonly [dependencyName: string]: string | undefined;
3328
3326
  }
3329
3327
  //#endregion
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
3328
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/index.d.ts
3329
+ //#region src/errors/CatalogAssemblyError.d.ts
3330
+ /**
3331
+ * Base constant for {@link CatalogAssemblyError}.
3332
+ *
3333
+ * @remarks
3334
+ * Exported for api-extractor DTS bundling — the `_base` symbol from
3335
+ * `Data.TaggedError` must be visible in the generated .d.ts file. Tagged
3336
+ * `@public` because it appears in the `extends` clause of a `@public`
3337
+ * subclass; consumers should construct and catch the subclass, not this
3338
+ * base directly.
3339
+ *
3340
+ * @public
3341
+ */
3342
+ declare const CatalogAssemblyErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
3343
+ readonly _tag: "CatalogAssemblyError";
3344
+ } & Readonly<A>;
3345
+ /**
3346
+ * Raised when assembling the workspace catalog set fails irrecoverably
3347
+ * (e.g. `pnpm-workspace.yaml` unreadable/malformed, default catalog defined twice).
3348
+ * Per-config-dependency hook failures do NOT raise this — they are logged and skipped.
3349
+ *
3350
+ * @public
3337
3351
  */
3338
3352
  declare class CatalogAssemblyError extends CatalogAssemblyErrorBase<{
3339
3353
  readonly source: "manifest" | "config-dependency" | "lockfile";
3340
3354
  readonly reason: string;
3341
3355
  }> {
3342
3356
  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";
3357
+ } //#endregion
3358
+ //#region src/errors/CatalogResolutionError.d.ts
3359
+ /**
3360
+ * Base constant for {@link CatalogResolutionError}.
3361
+ *
3362
+ * @remarks
3363
+ * Exported for api-extractor DTS bundling the `_base` symbol from
3364
+ * `Data.TaggedError` must be visible in the generated .d.ts file. Tagged
3365
+ * `@public` because it appears in the `extends` clause of a `@public`
3366
+ * subclass; consumers should construct and catch the subclass, not this
3367
+ * base directly.
3368
+ *
3369
+ * @public
3370
+ */
3371
+ //#endregion
3372
+ //#region src/errors/GitReadError.d.ts
3373
+ /**
3374
+ * Base constant for {@link GitReadError}.
3375
+ *
3376
+ * @remarks
3377
+ * Exported for api-extractor DTS bundling — the `_base` symbol from
3378
+ * `Data.TaggedError` must be visible in the generated .d.ts file.
3379
+ *
3380
+ * @public
3381
+ */
3382
+ declare const GitReadErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
3383
+ readonly _tag: "GitReadError";
3355
3384
  } & 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;
3385
+ /**
3386
+ * Raised when reading workspace state at a git ref fails irrecoverably
3387
+ * (git unavailable, unknown revision, command failure). A path that simply
3388
+ * does not exist at the ref is NOT an error — readers surface that as
3389
+ * `Option.none`.
3390
+ *
3391
+ * @public
3392
+ */
3393
+ declare class GitReadError extends GitReadErrorBase<{
3394
+ /** The git command that failed, including arguments. */readonly command: string; /** Working directory in which the command was invoked. */
3395
+ readonly cwd: string; /** Human-readable failure reason — typically captured stderr. */
3366
3396
  readonly reason: string;
3367
3397
  }> {
3368
3398
  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";
3399
+ } //#endregion
3400
+ //#region src/errors/LockfileIntegrityError.d.ts
3401
+ /**
3402
+ * Base constant for {@link LockfileIntegrityError}.
3403
+ *
3404
+ * @remarks
3405
+ * Exported for api-extractor DTS bundling the `_base` symbol from
3406
+ * `Data.TaggedError` must be visible in the generated .d.ts file. Tagged
3407
+ * `@public` because it appears in the `extends` clause of a `@public`
3408
+ * subclass; consumers should construct and catch the subclass, not this
3409
+ * base directly.
3410
+ *
3411
+ * @public
3412
+ */
3413
+ //#endregion
3414
+ //#region src/errors/PackageJsonParseError.d.ts
3415
+ /**
3416
+ * Base constant for {@link PackageJsonParseError}.
3417
+ *
3418
+ * @remarks
3419
+ * Exported for api-extractor DTS bundling — the `_base` symbol from
3420
+ * `Data.TaggedError` must be visible in the generated .d.ts file. Tagged
3421
+ * `@public` because it appears in the `extends` clause of a `@public`
3422
+ * subclass; consumers should construct and catch the subclass, not this
3423
+ * base directly.
3424
+ *
3425
+ * @public
3426
+ */
3427
+ declare const PackageJsonParseErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
3428
+ readonly _tag: "PackageJsonParseError";
3381
3429
  } & 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;
3400
- /**
3401
- * Result of comparing two WorkspacePackage dependency snapshots.
3402
- * @public
3430
+ /**
3431
+ * Emitted when a package.json file cannot be parsed or validated.
3432
+ *
3433
+ * @remarks
3434
+ * Raised by {@link WorkspaceDiscovery} when a package.json file is found but
3435
+ * contains invalid JSON or does not conform to {@link PackageJsonSchema}. The
3436
+ * `cause` field preserves the underlying parse or schema validation error.
3437
+ *
3438
+ * Fields:
3439
+ * - `filePath` — absolute path to the package.json that failed to parse.
3440
+ * - `cause` the underlying error (JSON syntax error or Schema decode failure).
3441
+ *
3442
+ * @example Catching the error
3443
+ * ```typescript
3444
+ * import { Effect } from "effect";
3445
+ * import type { PackageJsonParseError } from "workspaces-effect";
3446
+ * import { WorkspaceDiscovery, WorkspaceDiscoveryLive } from "workspaces-effect";
3447
+ *
3448
+ * const program = Effect.gen(function* () {
3449
+ * const discovery = yield* WorkspaceDiscovery;
3450
+ * return yield* discovery.discover("/workspace/root");
3451
+ * }).pipe(
3452
+ * Effect.catchTag("PackageJsonParseError", (e) =>
3453
+ * Effect.logError(`Bad package.json at ${e.filePath}`).pipe(
3454
+ * Effect.map(() => [])
3455
+ * )
3456
+ * )
3457
+ * );
3458
+ * ```
3459
+ *
3460
+ * @public
3403
3461
  */
3404
- declare interface DependencyDiff {
3405
- readonly added: Record<string, string>;
3406
- readonly removed: Record<string, string>;
3407
- readonly changed: Record<string, {
3408
- readonly from: string;
3409
- readonly to: string;
3410
- }>;
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";
3462
+ declare class PackageJsonParseError extends PackageJsonParseErrorBase<{
3463
+ readonly filePath: string;
3455
3464
  readonly cause: unknown;
3456
3465
  }> {
3457
3466
  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";
3467
+ } //#endregion
3468
+ //#region src/errors/PackageManagerDetectionError.d.ts
3469
+ /**
3470
+ * Base constant for {@link PackageManagerDetectionError}.
3471
+ *
3472
+ * @remarks
3473
+ * Exported for api-extractor DTS bundling the `_base` symbol from
3474
+ * `Data.TaggedError` must be visible in the generated .d.ts file. Tagged
3475
+ * `@public` because it appears in the `extends` clause of a `@public`
3476
+ * subclass; consumers should construct and catch the subclass, not this
3477
+ * base directly.
3478
+ *
3479
+ * @public
3480
+ */
3481
+ //#endregion
3482
+ //#region src/errors/PackageNotFoundError.d.ts
3483
+ /**
3484
+ * Base constant for {@link PackageNotFoundError}.
3485
+ *
3486
+ * @remarks
3487
+ * Exported for api-extractor DTS bundling — the `_base` symbol from
3488
+ * `Data.TaggedError` must be visible in the generated .d.ts file. Tagged
3489
+ * `@public` because it appears in the `extends` clause of a `@public`
3490
+ * subclass; consumers should construct and catch the subclass, not this
3491
+ * base directly.
3492
+ *
3493
+ * @public
3494
+ */
3495
+ declare const PackageNotFoundErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
3496
+ readonly _tag: "PackageNotFoundError";
3518
3497
  } & 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
- }
3528
- /**
3529
- * Emitted when a package.json file cannot be parsed or validated.
3530
- *
3531
- * @remarks
3532
- * Raised by {@link WorkspaceDiscovery} when a package.json file is found but
3533
- * contains invalid JSON or does not conform to {@link PackageJsonSchema}. The
3534
- * `cause` field preserves the underlying parse or schema validation error.
3535
- *
3536
- * Fields:
3537
- * - `filePath` absolute path to the package.json that failed to parse.
3538
- * - `cause` the underlying error (JSON syntax error or Schema decode failure).
3539
- *
3540
- * @example Catching the error
3541
- * ```typescript
3542
- * import { Effect } from "effect";
3543
- * import type { PackageJsonParseError } from "workspaces-effect";
3544
- * import { WorkspaceDiscovery, WorkspaceDiscoveryLive } from "workspaces-effect";
3545
- *
3546
- * const program = Effect.gen(function* () {
3547
- * const discovery = yield* WorkspaceDiscovery;
3548
- * return yield* discovery.discover("/workspace/root");
3549
- * }).pipe(
3550
- * Effect.catchTag("PackageJsonParseError", (e) =>
3551
- * Effect.logError(`Bad package.json at ${e.filePath}`).pipe(
3552
- * Effect.map(() => [])
3553
- * )
3554
- * )
3555
- * );
3556
- * ```
3557
- *
3558
- * @public
3498
+ /**
3499
+ * Emitted when a named package is not found in the workspace.
3500
+ *
3501
+ * @remarks
3502
+ * Raised by {@link WorkspaceDiscovery} or {@link DependencyGraph} when a
3503
+ * lookup by package name yields no match. The `available` field lists all
3504
+ * known package names to aid debugging typos or missing packages.
3505
+ *
3506
+ * Fields:
3507
+ * - `name` — the package name that was requested but not found.
3508
+ * - `available` all package names currently known in the workspace.
3509
+ *
3510
+ * @example Catching the error
3511
+ * ```typescript
3512
+ * import { Effect } from "effect";
3513
+ * import type { PackageNotFoundError } from "workspaces-effect";
3514
+ * import { DependencyGraph, DependencyGraphLive } from "workspaces-effect";
3515
+ *
3516
+ * const program = Effect.gen(function* () {
3517
+ * const graph = yield* DependencyGraph;
3518
+ * return yield* graph.dependenciesOf("@my-org/missing-pkg");
3519
+ * }).pipe(
3520
+ * Effect.catchTag("PackageNotFoundError", (e) =>
3521
+ * Effect.logWarning(`"${e.name}" not found. Available: ${e.available.join(", ")}`)
3522
+ * )
3523
+ * );
3524
+ * ```
3525
+ *
3526
+ * @public
3559
3527
  */
3560
- declare class PackageJsonParseError extends PackageJsonParseErrorBase<{
3561
- readonly filePath: string;
3562
- readonly cause: unknown;
3528
+ declare class PackageNotFoundError extends PackageNotFoundErrorBase<{
3529
+ readonly name: string;
3530
+ readonly available: ReadonlyArray<string>;
3563
3531
  }> {
3564
3532
  get message(): string;
3565
- }
3566
- /**
3567
- * Base constant for {@link PackageJsonParseError}.
3568
- *
3569
- * @privateRemarks
3570
- * Exported for api-extractor DTS bundling — the `_base` symbol from
3571
- * `Data.TaggedError` must be visible in the generated .d.ts file.
3572
- *
3573
- * @internal
3574
- */
3575
- declare const PackageJsonParseErrorBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
3576
- readonly _tag: "PackageJsonParseError";
3533
+ } //#endregion
3534
+ //#region src/errors/WorkspaceDiscoveryError.d.ts
3535
+ /**
3536
+ * Base constant for {@link WorkspaceDiscoveryError}.
3537
+ *
3538
+ * @remarks
3539
+ * Exported for api-extractor DTS bundling the `_base` symbol from
3540
+ * `Data.TaggedError` must be visible in the generated .d.ts file. Tagged
3541
+ * `@public` because it appears in the `extends` clause of a `@public`
3542
+ * subclass; consumers should construct and catch the subclass, not this
3543
+ * base directly.
3544
+ *
3545
+ * @public
3546
+ */
3547
+ declare const WorkspaceDiscoveryErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
3548
+ readonly _tag: "WorkspaceDiscoveryError";
3577
3549
  } & Readonly<A>;
3578
- /**
3579
- * Minimal package.json schema for workspace discovery.
3580
- *
3581
- * @remarks
3582
- * Captures only the fields needed by workspace tooling — name, version,
3583
- * private flag, workspace patterns, dependency maps, the `packageManager`
3584
- * field (used by Corepack), and `publishConfig`. Unknown fields are silently
3585
- * ignored during decode.
3586
- *
3587
- * Fields:
3588
- * - `name` — the package name.
3589
- * - `version` — the package version string.
3590
- * - `private` — whether the package is private (not published).
3591
- * - `workspaces` workspace glob patterns (array or object form).
3592
- * - `dependencies` — production dependency map.
3593
- * - `devDependencies` development dependency map.
3594
- * - `peerDependencies` peer dependency map.
3595
- * - `packageManager` Corepack package manager spec (e.g., `"pnpm@9.1.0"`).
3596
- * - `publishConfig` — publishing configuration overrides.
3597
- *
3598
- * @example Decoding a package.json
3599
- * ```typescript
3600
- * import { Schema } from "effect";
3601
- * import { PackageJsonSchema } from "workspaces-effect";
3602
- *
3603
- * const pkg = Schema.decodeUnknownSync(PackageJsonSchema)({
3604
- * name: "@my-org/app",
3605
- * version: "1.0.0",
3606
- * workspaces: ["packages/*"],
3607
- * });
3608
- * ```
3609
- *
3610
- * @public
3550
+ /**
3551
+ * Emitted when workspace package discovery fails.
3552
+ *
3553
+ * @remarks
3554
+ * Raised by {@link WorkspaceDiscovery} when glob expansion of workspace
3555
+ * patterns or subsequent package.json reads fail. This can occur if patterns
3556
+ * in pnpm-workspace.yaml or the root package.json `workspaces` field resolve
3557
+ * to invalid or inaccessible directories.
3558
+ *
3559
+ * Fields:
3560
+ * - `root` — the workspace root path where discovery was attempted.
3561
+ * - `reason` — human-readable explanation of what went wrong.
3562
+ *
3563
+ * @example Catching the error
3564
+ * ```typescript
3565
+ * import { Effect } from "effect";
3566
+ * import type { WorkspaceDiscoveryError } from "workspaces-effect";
3567
+ * import { WorkspaceDiscovery, WorkspaceDiscoveryLive } from "workspaces-effect";
3568
+ *
3569
+ * const program = Effect.gen(function* () {
3570
+ * const discovery = yield* WorkspaceDiscovery;
3571
+ * return yield* discovery.discover("/workspace/root");
3572
+ * }).pipe(
3573
+ * Effect.catchTag("WorkspaceDiscoveryError", (e) =>
3574
+ * Effect.succeed(`Discovery failed at ${e.root}: ${e.reason}`)
3575
+ * )
3576
+ * );
3577
+ * ```
3578
+ *
3579
+ * @public
3611
3580
  */
3612
- declare const PackageJsonSchema: Schema.Struct<{
3613
- name: Schema.optional<typeof Schema.String>;
3614
- version: Schema.optional<typeof Schema.String>;
3615
- private: Schema.optional<typeof Schema.Boolean>;
3616
- workspaces: Schema.optional<Schema.Union<[Schema.Array$<typeof Schema.String>, Schema.Struct<{
3617
- packages: Schema.Array$<typeof Schema.String>;
3618
- }>]>>;
3619
- dependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
3620
- devDependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
3621
- peerDependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
3622
- optionalDependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
3623
- packageManager: Schema.optional<typeof Schema.String>;
3624
- publishConfig: Schema.optional<typeof PublishConfig>;
3625
- }>;
3626
- /**
3627
- * TypeScript type for the {@link PackageJsonSchema} schema.
3628
- *
3629
- * @public
3630
- */
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;
3581
+ declare class WorkspaceDiscoveryError extends WorkspaceDiscoveryErrorBase<{
3582
+ readonly root: string;
3664
3583
  readonly reason: string;
3665
3584
  }> {
3666
3585
  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";
3586
+ } //#endregion
3587
+ //#region src/errors/WorkspaceRootNotFoundError.d.ts
3588
+ /**
3589
+ * Base constant for {@link WorkspaceRootNotFoundError}.
3590
+ *
3591
+ * @remarks
3592
+ * Exported for api-extractor DTS bundling the `_base` symbol from
3593
+ * `Data.TaggedError` must be visible in the generated .d.ts file. Tagged
3594
+ * `@public` because it appears in the `extends` clause of a `@public`
3595
+ * subclass; consumers should construct and catch the subclass, not this
3596
+ * base directly.
3597
+ *
3598
+ * @public
3599
+ */
3600
+ declare const WorkspaceRootNotFoundErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
3601
+ readonly _tag: "WorkspaceRootNotFoundError";
3679
3602
  } & Readonly<A>;
3680
- /**
3681
- * Emitted when a named package is not found in the workspace.
3682
- *
3683
- * @remarks
3684
- * Raised by {@link WorkspaceDiscovery} or {@link DependencyGraph} when a
3685
- * lookup by package name yields no match. The `available` field lists all
3686
- * known package names to aid debugging typos or missing packages.
3687
- *
3688
- * Fields:
3689
- * - `name` — the package name that was requested but not found.
3690
- * - `available` — all package names currently known in the workspace.
3691
- *
3692
- * @example Catching the error
3693
- * ```typescript
3694
- * import { Effect } from "effect";
3695
- * import type { PackageNotFoundError } from "workspaces-effect";
3696
- * import { DependencyGraph, DependencyGraphLive } from "workspaces-effect";
3697
- *
3698
- * const program = Effect.gen(function* () {
3699
- * const graph = yield* DependencyGraph;
3700
- * return yield* graph.dependenciesOf("@my-org/missing-pkg");
3701
- * }).pipe(
3702
- * Effect.catchTag("PackageNotFoundError", (e) =>
3703
- * Effect.logWarning(`"${e.name}" not found. Available: ${e.available.join(", ")}`)
3704
- * )
3705
- * );
3706
- * ```
3707
- *
3708
- * @public
3603
+ /**
3604
+ * Emitted when no workspace root can be found from the search path.
3605
+ *
3606
+ * @remarks
3607
+ * Raised by {@link WorkspaceRoot} when directory traversal from the search path
3608
+ * to the filesystem root finds no workspace markers (pnpm-workspace.yaml or
3609
+ * package.json with workspaces field).
3610
+ *
3611
+ * Fields:
3612
+ * - `searchPath` — the absolute path from which upward traversal started.
3613
+ * - `reason` — human-readable explanation of why no root was found.
3614
+ *
3615
+ * @example Catching the error
3616
+ * ```typescript
3617
+ * import { Effect } from "effect";
3618
+ * import type { WorkspaceRootNotFoundError } from "workspaces-effect";
3619
+ * import { WorkspaceRoot, WorkspaceRootLive } from "workspaces-effect";
3620
+ *
3621
+ * const program = Effect.gen(function* () {
3622
+ * const root = yield* WorkspaceRoot;
3623
+ * return yield* root.find("/some/path");
3624
+ * }).pipe(
3625
+ * Effect.catchTag("WorkspaceRootNotFoundError", (e) =>
3626
+ * Effect.succeed(`Fallback: ${e.searchPath}`)
3627
+ * )
3628
+ * );
3629
+ * ```
3630
+ *
3631
+ * @public
3709
3632
  */
3710
- declare class PackageNotFoundError extends PackageNotFoundErrorBase<{
3711
- readonly name: string;
3712
- readonly available: ReadonlyArray<string>;
3633
+ declare class WorkspaceRootNotFoundError extends WorkspaceRootNotFoundErrorBase<{
3634
+ readonly searchPath: string;
3635
+ readonly reason: string;
3713
3636
  }> {
3714
3637
  get message(): string;
3715
- }
3716
- /**
3717
- * Base constant for {@link PackageNotFoundError}.
3718
- *
3719
- * @privateRemarks
3720
- * Exported for api-extractor DTS bundling — the `_base` symbol from
3721
- * `Data.TaggedError` must be visible in the generated .d.ts file.
3722
- *
3723
- * @internal
3724
- */
3725
- declare const PackageNotFoundErrorBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
3726
- readonly _tag: "PackageNotFoundError";
3727
- } & Readonly<A>;
3728
- /**
3729
- * Service for detecting whether a workspace package is publishable and
3730
- * identifying its publish targets (npm, GitHub Packages, etc.).
3731
- *
3732
- * Inspects `package.json` fields such as `private`, `publishConfig`, and
3733
- * `repository` to determine publishability and target registries.
3734
- *
3735
- * @remarks
3736
- * PublishabilityDetector is part of the Configuration and Lockfiles service
3737
- * group. It is a pure service with no dependencies on other services — it
3738
- * operates solely on the {@link WorkspacePackage} data and the workspace root
3739
- * path passed to it.
3740
- *
3741
- * A package is considered publishable when `private` is not `true` and it has a
3742
- * `name` and `version`. The returned {@link PublishTarget} array describes where
3743
- * the package would be published (e.g., npmjs.org, GitHub Packages) based on
3744
- * `publishConfig.registry` and other signals.
3745
- *
3746
- * The live layer (`PublishabilityDetectorLive`) is a pure layer with no
3747
- * dependencies — it can be provided standalone or via `WorkspacesLive` /
3748
- * `WorkspacesFullLive`.
3749
- *
3750
- * @privateRemarks
3751
- * Uses the class-based `Context.Tag` pattern. The internal tag identifier is
3752
- * `@spencerbeggs/workspaces-effect/PublishabilityDetector`. Since this service
3753
- * has no dependencies, the layer is constructed with `Layer.succeed` rather than
3754
- * `Layer.effect`.
3755
- *
3756
- * @example Checking publishability of all packages
3757
- * ```typescript
3758
- * import { Effect } from "effect";
3759
- * import { NodeContext } from "@effect/platform-node";
3760
- * import { PublishabilityDetector, WorkspaceDiscovery, WorkspacesLive } from "workspaces-effect";
3761
- *
3762
- * const program = Effect.gen(function* () {
3763
- * const discovery = yield* WorkspaceDiscovery;
3764
- * const publishability = yield* PublishabilityDetector;
3765
- * const packages = yield* discovery.listPackages();
3766
- *
3767
- * for (const pkg of packages) {
3768
- * const targets = yield* publishability.detect(pkg, "/path/to/monorepo");
3769
- * if (targets.length > 0) {
3770
- * console.log(`${pkg.name} publishes to:`, targets.map((t) => t.registry));
3771
- * } else {
3772
- * console.log(`${pkg.name} is not publishable`);
3773
- * }
3774
- * }
3775
- * });
3776
- *
3777
- * Effect.runPromise(
3778
- * program.pipe(
3779
- * Effect.provide(WorkspacesLive),
3780
- * Effect.provide(NodeContext.layer),
3781
- * )
3782
- * );
3783
- * ```
3784
- *
3785
- * @public
3786
- */
3787
- declare class PublishabilityDetector extends PublishabilityDetector_base {}
3788
- declare const PublishabilityDetector_base: Context.TagClass<PublishabilityDetector, "@spencerbeggs/workspaces-effect/PublishabilityDetector", {
3789
- /**
3790
- * Detect publish targets for a workspace package.
3791
- *
3792
- * Analyzes the package's `package.json` fields to determine if and where
3793
- * it can be published.
3794
- *
3795
- * @param pkg - The {@link WorkspacePackage} to analyze.
3796
- * @param root - Absolute path to the workspace root directory.
3797
- * @returns An Effect that succeeds with a readonly array of
3798
- * {@link PublishTarget} records. An empty array indicates the package is
3799
- * not publishable. Never fails.
3800
- */
3801
- readonly detect: (pkg: WorkspacePackage, root: string) => Effect.Effect<ReadonlyArray<PublishTarget>>;
3802
- }>;
3803
- /**
3804
- * Live layer for the {@link PublishabilityDetector} service.
3805
- *
3806
- * Determines whether a workspace package is publishable to npm based
3807
- * on its `private` flag and `publishConfig` settings.
3808
- *
3809
- * @remarks
3810
- * This layer is pure -- it has no dependencies on `FileSystem`, `Path`, or
3811
- * any other platform services. It uses `Layer.succeed` rather than
3812
- * `Layer.effect`. Custom layers can override by providing their own
3813
- * `Layer` for `PublishabilityDetector`.
3814
- *
3815
- * @privateRemarks
3816
- * Builds a single {@link PublishTarget} from `publishConfig` fields,
3817
- * defaulting to the public npm registry when no registry is specified.
3818
- *
3819
- * @example
3820
- * ```typescript
3821
- * import { Effect } from "effect";
3822
- * import { PublishabilityDetector, PublishabilityDetectorLive } from "workspaces-effect";
3823
- * import { WorkspacePackage } from "workspaces-effect";
3824
- *
3825
- * const program = Effect.gen(function* () {
3826
- * const detector = yield* PublishabilityDetector;
3827
- * const targets = yield* detector.detect(somePackage, "/path/to/root");
3828
- * return targets;
3829
- * });
3830
- *
3831
- * Effect.runPromise(
3832
- * program.pipe(Effect.provide(PublishabilityDetectorLive))
3833
- * );
3834
- * ```
3835
- *
3836
- * @public
3837
- */
3838
- /**
3839
- * Schema for the `publishConfig` field in package.json.
3840
- *
3841
- * @remarks
3842
- * Captures the subset of `publishConfig` properties relevant to workspace
3843
- * tooling: registry selection, access control, and publish directory override.
3844
- *
3845
- * Fields:
3846
- * - `access` — `"public"` or `"restricted"` (scoped package visibility).
3847
- * - `registry` — custom registry URL for publishing.
3848
- * - `directory` — subdirectory to publish instead of the package root.
3849
- *
3850
- * @example Decoding publishConfig
3851
- * ```typescript
3852
- * import { Schema } from "effect";
3853
- * import { PublishConfig } from "workspaces-effect";
3854
- *
3855
- * const config = new PublishConfig({
3856
- * access: "public",
3857
- * registry: "https://registry.npmjs.org",
3858
- * });
3859
- * ```
3860
- *
3861
- * @public
3638
+ } //#endregion
3639
+ //#region src/layers/catalog/resolve.d.ts
3640
+ /**
3641
+ * Minimal shape of a `package.json` manifest needed to resolve catalog and
3642
+ * workspace specifiers.
3643
+ *
3644
+ * @public
3862
3645
  */
3863
- declare class PublishConfig extends PublishConfig_base {}
3864
3646
  declare const PublishConfig_base: Schema.Class<PublishConfig, {
3865
3647
  access: Schema.optional<Schema.Literal<["public", "restricted"]>>;
3866
3648
  registry: Schema.optional<typeof Schema.String>;
@@ -3884,261 +3666,213 @@ declare const PublishConfig_base: Schema.Class<PublishConfig, {
3884
3666
  } & {
3885
3667
  readonly tag?: string | undefined;
3886
3668
  }, {}, {}>;
3887
- /**
3888
- * A single publish target for a workspace package.
3889
- *
3890
- * @remarks
3891
- * Represents the resolved publishing configuration for a workspace package,
3892
- * combining defaults with any overrides from the package's `publishConfig`
3893
- * field. Used to determine where and how each package should be published.
3894
- *
3895
- * Fields:
3896
- * - `name` — the package name (non-empty string).
3897
- * - `registry` — the target registry URL (e.g., `"https://registry.npmjs.org"`).
3898
- * - `directory` — the directory to publish (empty string means the package root).
3899
- * - `access` — `"public"` or `"restricted"` (scoped package visibility).
3900
- * - `provenance` — whether to publish with provenance attestation (defaults to `false`).
3901
- *
3902
- * @example Creating a PublishTarget
3903
- * ```typescript
3904
- * import { PublishTarget } from "workspaces-effect";
3905
- *
3906
- * const target = new PublishTarget({
3907
- * name: "@my-org/utils",
3908
- * registry: "https://registry.npmjs.org",
3909
- * directory: "dist/npm",
3910
- * access: "public",
3911
- * });
3912
- * ```
3913
- *
3914
- * @public
3915
- */
3916
- declare class PublishTarget extends PublishTarget_base {}
3917
- declare const PublishTarget_base: Schema.Class<PublishTarget, {
3669
+ /**
3670
+ * Schema for the `publishConfig` field in package.json.
3671
+ *
3672
+ * @remarks
3673
+ * Captures the subset of `publishConfig` properties relevant to workspace
3674
+ * tooling: registry selection, access control, and publish directory override.
3675
+ *
3676
+ * Fields:
3677
+ * - `access` — `"public"` or `"restricted"` (scoped package visibility).
3678
+ * - `registry` — custom registry URL for publishing.
3679
+ * - `directory` — subdirectory to publish instead of the package root.
3680
+ *
3681
+ * @example Decoding publishConfig
3682
+ * ```typescript
3683
+ * import { Schema } from "effect";
3684
+ * import { PublishConfig } from "workspaces-effect";
3685
+ *
3686
+ * const config = new PublishConfig({
3687
+ * access: "public",
3688
+ * registry: "https://registry.npmjs.org",
3689
+ * });
3690
+ * ```
3691
+ *
3692
+ * @public
3693
+ */
3694
+ declare class PublishConfig extends PublishConfig_base {}
3695
+ /**
3696
+ * Type alias for the decoded shape of {@link PublishConfig}.
3697
+ *
3698
+ * @public
3699
+ */
3700
+ /**
3701
+ * Minimal package.json schema for workspace discovery.
3702
+ *
3703
+ * @remarks
3704
+ * Captures only the fields needed by workspace tooling — name, version,
3705
+ * private flag, workspace patterns, dependency maps, the `packageManager`
3706
+ * field (used by Corepack), and `publishConfig`. Unknown fields are silently
3707
+ * ignored during decode.
3708
+ *
3709
+ * Fields:
3710
+ * - `name` — the package name.
3711
+ * - `version` — the package version string.
3712
+ * - `private` — whether the package is private (not published).
3713
+ * - `workspaces` — workspace glob patterns (array or object form).
3714
+ * - `dependencies` — production dependency map.
3715
+ * - `devDependencies` — development dependency map.
3716
+ * - `peerDependencies` — peer dependency map.
3717
+ * - `packageManager` — Corepack package manager spec (e.g., `"pnpm@9.1.0"`).
3718
+ * - `publishConfig` — publishing configuration overrides.
3719
+ *
3720
+ * @example Decoding a package.json
3721
+ * ```typescript
3722
+ * import { Schema } from "effect";
3723
+ * import { PackageJsonSchema } from "workspaces-effect";
3724
+ *
3725
+ * const pkg = Schema.decodeUnknownSync(PackageJsonSchema)({
3726
+ * name: "@my-org/app",
3727
+ * version: "1.0.0",
3728
+ * workspaces: ["packages/*"],
3729
+ * });
3730
+ * ```
3731
+ *
3732
+ * @public
3733
+ */
3734
+ declare const PackageJsonSchema: Schema.Struct<{
3735
+ name: Schema.optional<typeof Schema.String>;
3736
+ version: Schema.optional<typeof Schema.String>;
3737
+ private: Schema.optional<typeof Schema.Boolean>;
3738
+ workspaces: Schema.optional<Schema.Union<[Schema.Array$<typeof Schema.String>, Schema.Struct<{
3739
+ packages: Schema.Array$<typeof Schema.String>;
3740
+ }>]>>;
3741
+ dependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
3742
+ devDependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
3743
+ peerDependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
3744
+ optionalDependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
3745
+ packageManager: Schema.optional<typeof Schema.String>;
3746
+ publishConfig: Schema.optional<typeof PublishConfig>;
3747
+ }>;
3748
+ /**
3749
+ * TypeScript type for the {@link PackageJsonSchema} schema.
3750
+ *
3751
+ * @public
3752
+ */
3753
+ type PackageJsonType = Schema.Schema.Type<typeof PackageJsonSchema>;
3754
+ /**
3755
+ * Result of comparing two WorkspacePackage dependency snapshots.
3756
+ * @public
3757
+ */
3758
+ interface DependencyDiff {
3759
+ readonly added: Record<string, string>;
3760
+ readonly removed: Record<string, string>;
3761
+ readonly changed: Record<string, {
3762
+ readonly from: string;
3763
+ readonly to: string;
3764
+ }>;
3765
+ }
3766
+ declare const WorkspacePackage_base: Schema.Class<WorkspacePackage, {
3918
3767
  name: typeof Schema.NonEmptyString;
3919
- registry: typeof Schema.NonEmptyString;
3920
- directory: typeof Schema.String;
3921
- access: Schema.Literal<["public", "restricted"]>;
3922
- provenance: Schema.optionalWith<typeof Schema.Boolean, {
3768
+ version: typeof Schema.String;
3769
+ path: typeof Schema.NonEmptyString;
3770
+ packageJsonPath: typeof Schema.NonEmptyString;
3771
+ relativePath: typeof Schema.String;
3772
+ private: Schema.optionalWith<typeof Schema.Boolean, {
3923
3773
  default: () => false;
3924
3774
  }>;
3775
+ dependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
3776
+ default: () => {};
3777
+ }>;
3778
+ devDependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
3779
+ default: () => {};
3780
+ }>;
3781
+ peerDependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
3782
+ default: () => {};
3783
+ }>;
3784
+ optionalDependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
3785
+ default: () => {};
3786
+ }>;
3787
+ publishConfig: Schema.optional<typeof PublishConfig>;
3925
3788
  }, Schema.Struct.Encoded<{
3926
3789
  name: typeof Schema.NonEmptyString;
3927
- registry: typeof Schema.NonEmptyString;
3928
- directory: typeof Schema.String;
3929
- access: Schema.Literal<["public", "restricted"]>;
3930
- provenance: Schema.optionalWith<typeof Schema.Boolean, {
3790
+ version: typeof Schema.String;
3791
+ path: typeof Schema.NonEmptyString;
3792
+ packageJsonPath: typeof Schema.NonEmptyString;
3793
+ relativePath: typeof Schema.String;
3794
+ private: Schema.optionalWith<typeof Schema.Boolean, {
3931
3795
  default: () => false;
3932
3796
  }>;
3797
+ dependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
3798
+ default: () => {};
3799
+ }>;
3800
+ devDependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
3801
+ default: () => {};
3802
+ }>;
3803
+ peerDependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
3804
+ default: () => {};
3805
+ }>;
3806
+ optionalDependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
3807
+ default: () => {};
3808
+ }>;
3809
+ publishConfig: Schema.optional<typeof PublishConfig>;
3933
3810
  }>, never, {
3934
- readonly provenance?: boolean;
3811
+ readonly publishConfig?: PublishConfig | undefined;
3935
3812
  } & {
3936
- readonly access: "public" | "restricted";
3813
+ readonly dependencies?: {
3814
+ readonly [x: string]: string;
3815
+ } | undefined;
3937
3816
  } & {
3938
- readonly directory: string;
3817
+ readonly devDependencies?: {
3818
+ readonly [x: string]: string;
3819
+ } | undefined;
3820
+ } & {
3821
+ readonly optionalDependencies?: {
3822
+ readonly [x: string]: string;
3823
+ } | undefined;
3824
+ } & {
3825
+ readonly peerDependencies?: {
3826
+ readonly [x: string]: string;
3827
+ } | undefined;
3828
+ } & {
3829
+ readonly private?: boolean | undefined;
3939
3830
  } & {
3940
3831
  readonly name: string;
3941
3832
  } & {
3942
- readonly registry: string;
3833
+ readonly packageJsonPath: string;
3834
+ } & {
3835
+ readonly path: string;
3836
+ } & {
3837
+ readonly relativePath: string;
3838
+ } & {
3839
+ readonly version: string;
3943
3840
  }, {}, {}>;
3944
- /**
3945
- * Read and parse a package's package.json from disk.
3946
- *
3947
- * Returns the minimal `PackageJsonType` schema fields. For full raw
3948
- * package.json access, read `pkg.packageJsonPath` directly.
3949
- *
3950
- * Not a dual function takes a single WorkspacePackage argument.
3951
- * Pipeable via `pipe(pkg, readPackageJson)`.
3952
- */
3953
- /**
3954
- * Service for discovering workspace packages in a monorepo.
3955
- *
3956
- * Reads workspace patterns from the PM-specific config (e.g., `pnpm-workspace.yaml`,
3957
- * `package.json` `workspaces` field), resolves glob patterns against the filesystem,
3958
- * and reads each matched `package.json` to produce {@link WorkspacePackage} records.
3959
- *
3960
- * @remarks
3961
- * WorkspaceDiscovery is the last service in the Discovery group and the primary
3962
- * data source for downstream services. DependencyGraph, TopologicalSorter,
3963
- * PackageResolver, and ChangeDetector all depend on the package list it produces.
3964
- *
3965
- * The live layer (`WorkspaceDiscoveryLive`) depends on `WorkspaceRoot` and
3966
- * `PackageManagerDetector`. It requires `FileSystem` and `Path` from
3967
- * `@effect/platform`. Use `WorkspacesLive` or `WorkspacesFullLive` to get all
3968
- * wiring handled automatically.
3969
- *
3970
- * @privateRemarks
3971
- * Uses the class-based `Context.Tag` pattern. The internal tag identifier is
3972
- * `@spencerbeggs/workspaces-effect/WorkspaceDiscovery`. Dependencies (WorkspaceRoot,
3973
- * PackageManagerDetector) are resolved at layer construction time so that service
3974
- * methods have `R = never`.
3975
- *
3976
- * @example Listing all workspace packages
3977
- * ```typescript
3978
- * import { Effect } from "effect";
3979
- * import { NodeContext } from "@effect/platform-node";
3980
- * import { WorkspaceDiscovery, WorkspacesLive } from "workspaces-effect";
3981
- *
3982
- * const program = Effect.gen(function* () {
3983
- * const discovery = yield* WorkspaceDiscovery;
3984
- * const packages = yield* discovery.listPackages();
3985
- * for (const pkg of packages) {
3986
- * console.log(`${pkg.name} @ ${pkg.path}`);
3987
- * }
3988
- * });
3989
- *
3990
- * Effect.runPromise(
3991
- * program.pipe(
3992
- * Effect.provide(WorkspacesLive),
3993
- * Effect.provide(NodeContext.layer),
3994
- * )
3995
- * );
3996
- * ```
3997
- *
3998
- * @public
3999
- */
4000
- declare class WorkspaceDiscovery extends WorkspaceDiscovery_base {}
4001
- declare const WorkspaceDiscovery_base: Context.TagClass<WorkspaceDiscovery, "@spencerbeggs/workspaces-effect/WorkspaceDiscovery", {
4002
- /**
4003
- * List all workspace packages.
4004
- *
4005
- * Resolves workspace glob patterns and reads each matched `package.json`.
4006
- *
4007
- * @param cwd - Optional starting directory. When provided, the workspace
4008
- * root is resolved fresh from `cwd` for this call (results cached per
4009
- * resolved root). When omitted, uses the root that was eagerly resolved
4010
- * from `process.cwd()` at layer construction time.
4011
- * @returns An Effect that succeeds with a readonly array of
4012
- * {@link WorkspacePackage} records, or fails with
4013
- * {@link WorkspaceDiscoveryError} if workspace patterns cannot be resolved.
4014
- */
4015
- readonly listPackages: (cwd?: string) => Effect.Effect<ReadonlyArray<WorkspacePackage>, WorkspaceDiscoveryError>;
4016
- /**
4017
- * Get a specific workspace package by name.
4018
- *
4019
- * @param name - The package name as declared in its `package.json` `name` field.
4020
- * @param cwd - Optional starting directory. See {@link listPackages} for behavior.
4021
- * @returns An Effect that succeeds with the matching {@link WorkspacePackage},
4022
- * or fails with {@link PackageNotFoundError} if no workspace package has that
4023
- * name, or {@link WorkspaceDiscoveryError} if discovery itself fails.
4024
- */
4025
- readonly getPackage: (name: string, cwd?: string) => Effect.Effect<WorkspacePackage, PackageNotFoundError | WorkspaceDiscoveryError>;
4026
- /**
4027
- * Get a map of workspace-relative directory paths to packages.
4028
- *
4029
- * Useful for mapping lockfile importer keys to their workspace packages.
4030
- * Built from `listPackages()` output and inherits its caching.
4031
- *
4032
- * @param cwd - Optional starting directory. See {@link listPackages} for behavior.
4033
- * @returns An Effect that succeeds with a ReadonlyMap keyed by relativePath.
4034
- */
4035
- readonly importerMap: (cwd?: string) => Effect.Effect<ReadonlyMap<string, WorkspacePackage>, WorkspaceDiscoveryError>;
4036
- /**
4037
- * Discard cached discovery results so the next {@link listPackages}
4038
- * (and {@link getPackage} / {@link importerMap}, which build on it)
4039
- * re-reads every `package.json` from disk.
4040
- *
4041
- * @remarks
4042
- * `listPackages` memoizes its result per resolved workspace root for the
4043
- * lifetime of the layer. That cache is correct for a static tree, but a
4044
- * process that mutates `package.json` mid-run — for example running
4045
- * `changeset version` to bump versions and then reading the new versions
4046
- * back — would otherwise observe the pre-mutation snapshot. Call
4047
- * `refresh` after such a mutation to force a re-scan.
4048
- *
4049
- * The resolved workspace root itself is not discarded (the root does not
4050
- * move when package contents change), so the next call pays only the
4051
- * package re-scan, not the root walk. `refresh` clears the cache for
4052
- * every resolved root.
4053
- *
4054
- * @returns An Effect that clears the cache and succeeds with `void`.
4055
- */
4056
- readonly refresh: () => Effect.Effect<void>;
4057
- }>;
4058
- /**
4059
- * Emitted when workspace package discovery fails.
4060
- *
4061
- * @remarks
4062
- * Raised by {@link WorkspaceDiscovery} when glob expansion of workspace
4063
- * patterns or subsequent package.json reads fail. This can occur if patterns
4064
- * in pnpm-workspace.yaml or the root package.json `workspaces` field resolve
4065
- * to invalid or inaccessible directories.
4066
- *
4067
- * Fields:
4068
- * - `root` — the workspace root path where discovery was attempted.
4069
- * - `reason` — human-readable explanation of what went wrong.
4070
- *
4071
- * @example Catching the error
4072
- * ```typescript
4073
- * import { Effect } from "effect";
4074
- * import type { WorkspaceDiscoveryError } from "workspaces-effect";
4075
- * import { WorkspaceDiscovery, WorkspaceDiscoveryLive } from "workspaces-effect";
4076
- *
4077
- * const program = Effect.gen(function* () {
4078
- * const discovery = yield* WorkspaceDiscovery;
4079
- * return yield* discovery.discover("/workspace/root");
4080
- * }).pipe(
4081
- * Effect.catchTag("WorkspaceDiscoveryError", (e) =>
4082
- * Effect.succeed(`Discovery failed at ${e.root}: ${e.reason}`)
4083
- * )
4084
- * );
4085
- * ```
4086
- *
4087
- * @public
4088
- */
4089
- declare class WorkspaceDiscoveryError extends WorkspaceDiscoveryErrorBase<{
4090
- readonly root: string;
4091
- readonly reason: string;
4092
- }> {
4093
- get message(): string;
4094
- }
4095
- /**
4096
- * Base constant for {@link WorkspaceDiscoveryError}.
4097
- *
4098
- * @privateRemarks
4099
- * Exported for api-extractor DTS bundling — the `_base` symbol from
4100
- * `Data.TaggedError` must be visible in the generated .d.ts file.
4101
- *
4102
- * @internal
4103
- */
4104
- declare const WorkspaceDiscoveryErrorBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
4105
- readonly _tag: "WorkspaceDiscoveryError";
4106
- } & Readonly<A>;
4107
- /**
4108
- * A single workspace package within a monorepo.
4109
- *
4110
- * @remarks
4111
- * Produced by {@link WorkspaceDiscovery} for each package found by expanding
4112
- * the workspace glob patterns. Contains the parsed metadata from the
4113
- * package's `package.json` plus its filesystem location.
4114
- *
4115
- * Fields:
4116
- * - `name` — the package name (non-empty string).
4117
- * - `version` — the package version string.
4118
- * - `path` — absolute filesystem path to the package directory.
4119
- * - `packageJsonPath` — absolute path to the package's `package.json` file.
4120
- * - `relativePath` — path relative to the workspace root.
4121
- * - `private` — whether the package is marked private (defaults to `false`).
4122
- * - `dependencies` — production dependency map (defaults to `{}`).
4123
- * - `devDependencies` — development dependency map (defaults to `{}`).
4124
- * - `peerDependencies` — peer dependency map (defaults to `{}`).
4125
- * - `optionalDependencies` — optional dependency map (defaults to `{}`).
4126
- * - `publishConfig` — optional publishing configuration overrides.
4127
- *
4128
- * @example Creating a WorkspacePackage
4129
- * ```typescript
4130
- * import { WorkspacePackage } from "workspaces-effect";
4131
- *
4132
- * const pkg = new WorkspacePackage({
4133
- * name: "@my-org/utils",
4134
- * version: "1.0.0",
4135
- * path: "/workspace/packages/utils",
4136
- * packageJsonPath: "/workspace/packages/utils/package.json",
4137
- * relativePath: "packages/utils",
4138
- * });
4139
- * ```
4140
- *
4141
- * @public
3841
+ /**
3842
+ * A single workspace package within a monorepo.
3843
+ *
3844
+ * @remarks
3845
+ * Produced by {@link WorkspaceDiscovery} for each package found by expanding
3846
+ * the workspace glob patterns. Contains the parsed metadata from the
3847
+ * package's `package.json` plus its filesystem location.
3848
+ *
3849
+ * Fields:
3850
+ * - `name` — the package name (non-empty string).
3851
+ * - `version` the package version string.
3852
+ * - `path` — absolute filesystem path to the package directory.
3853
+ * - `packageJsonPath` absolute path to the package's `package.json` file.
3854
+ * - `relativePath` path relative to the workspace root.
3855
+ * - `private` whether the package is marked private (defaults to `false`).
3856
+ * - `dependencies` — production dependency map (defaults to `{}`).
3857
+ * - `devDependencies` — development dependency map (defaults to `{}`).
3858
+ * - `peerDependencies` peer dependency map (defaults to `{}`).
3859
+ * - `optionalDependencies` optional dependency map (defaults to `{}`).
3860
+ * - `publishConfig` optional publishing configuration overrides.
3861
+ *
3862
+ * @example Creating a WorkspacePackage
3863
+ * ```typescript
3864
+ * import { WorkspacePackage } from "workspaces-effect";
3865
+ *
3866
+ * const pkg = new WorkspacePackage({
3867
+ * name: "@my-org/utils",
3868
+ * version: "1.0.0",
3869
+ * path: "/workspace/packages/utils",
3870
+ * packageJsonPath: "/workspace/packages/utils/package.json",
3871
+ * relativePath: "packages/utils",
3872
+ * });
3873
+ * ```
3874
+ *
3875
+ * @public
4142
3876
  */
4143
3877
  declare class WorkspacePackage extends WorkspacePackage_base {
4144
3878
  get isRootWorkspace(): boolean;
@@ -4153,12 +3887,12 @@ declare class WorkspacePackage extends WorkspacePackage_base {
4153
3887
  hasAnyDependencyOn(name: string): boolean;
4154
3888
  dependencyVersion(name: string): Option.Option<string>;
4155
3889
  matchesDependency(pattern: string): boolean;
4156
- /**
4157
- * Compare two WorkspacePackage dependency snapshots.
4158
- *
4159
- * Compares across all dependency types combined. A dependency that moves
4160
- * between categories (e.g. from `dependencies` to `peerDependencies`) at
4161
- * the same version will not appear in the diff.
3890
+ /**
3891
+ * Compare two WorkspacePackage dependency snapshots.
3892
+ *
3893
+ * Compares across all dependency types combined. A dependency that moves
3894
+ * between categories (e.g. from `dependencies` to `peerDependencies`) at
3895
+ * the same version will not appear in the diff.
4162
3896
  */
4163
3897
  dependencyDiff(other: WorkspacePackage): DependencyDiff;
4164
3898
  static hasDependency: {
@@ -4195,15 +3929,167 @@ declare class WorkspacePackage extends WorkspacePackage_base {
4195
3929
  };
4196
3930
  static readPackageJson: (self: WorkspacePackage) => Effect.Effect<PackageJsonType, PackageJsonParseError, FileSystem.FileSystem>;
4197
3931
  }
4198
- declare const WorkspacePackage_base: Schema.Class<WorkspacePackage, {
3932
+ //#endregion
3933
+ //#region src/services/WorkspaceDiscovery.d.ts
3934
+ declare const WorkspaceDiscovery_base: Context.TagClass<WorkspaceDiscovery, "@spencerbeggs/workspaces-effect/WorkspaceDiscovery", {
3935
+ /**
3936
+ * List all workspace packages.
3937
+ *
3938
+ * Resolves workspace glob patterns and reads each matched `package.json`.
3939
+ *
3940
+ * @param cwd - Optional starting directory. When provided, the workspace
3941
+ * root is resolved fresh from `cwd` for this call (results cached per
3942
+ * resolved root). When omitted, uses the root that was eagerly resolved
3943
+ * from `process.cwd()` at layer construction time.
3944
+ * @returns An Effect that succeeds with a readonly array of
3945
+ * {@link WorkspacePackage} records, or fails with
3946
+ * {@link WorkspaceDiscoveryError} if workspace patterns cannot be resolved.
3947
+ */
3948
+ readonly listPackages: (cwd?: string) => Effect.Effect<ReadonlyArray<WorkspacePackage>, WorkspaceDiscoveryError>;
3949
+ /**
3950
+ * Get a specific workspace package by name.
3951
+ *
3952
+ * @param name - The package name as declared in its `package.json` `name` field.
3953
+ * @param cwd - Optional starting directory. See {@link listPackages} for behavior.
3954
+ * @returns An Effect that succeeds with the matching {@link WorkspacePackage},
3955
+ * or fails with {@link PackageNotFoundError} if no workspace package has that
3956
+ * name, or {@link WorkspaceDiscoveryError} if discovery itself fails.
3957
+ */
3958
+ readonly getPackage: (name: string, cwd?: string) => Effect.Effect<WorkspacePackage, PackageNotFoundError | WorkspaceDiscoveryError>;
3959
+ /**
3960
+ * Get a map of workspace-relative directory paths to packages.
3961
+ *
3962
+ * Useful for mapping lockfile importer keys to their workspace packages.
3963
+ * Built from `listPackages()` output and inherits its caching.
3964
+ *
3965
+ * @param cwd - Optional starting directory. See {@link listPackages} for behavior.
3966
+ * @returns An Effect that succeeds with a ReadonlyMap keyed by relativePath.
3967
+ */
3968
+ readonly importerMap: (cwd?: string) => Effect.Effect<ReadonlyMap<string, WorkspacePackage>, WorkspaceDiscoveryError>;
3969
+ /**
3970
+ * Discard cached discovery results so the next {@link listPackages}
3971
+ * (and {@link getPackage} / {@link importerMap}, which build on it)
3972
+ * re-reads every `package.json` from disk.
3973
+ *
3974
+ * @remarks
3975
+ * `listPackages` memoizes its result per resolved workspace root for the
3976
+ * lifetime of the layer. That cache is correct for a static tree, but a
3977
+ * process that mutates `package.json` mid-run — for example running
3978
+ * `changeset version` to bump versions and then reading the new versions
3979
+ * back — would otherwise observe the pre-mutation snapshot. Call
3980
+ * `refresh` after such a mutation to force a re-scan.
3981
+ *
3982
+ * The resolved workspace root itself is not discarded (the root does not
3983
+ * move when package contents change), so the next call pays only the
3984
+ * package re-scan, not the root walk. `refresh` clears the cache for
3985
+ * every resolved root.
3986
+ *
3987
+ * @returns An Effect that clears the cache and succeeds with `void`.
3988
+ */
3989
+ readonly refresh: () => Effect.Effect<void>;
3990
+ }>;
3991
+ /**
3992
+ * Service for discovering workspace packages in a monorepo.
3993
+ *
3994
+ * Reads workspace patterns from the PM-specific config (e.g., `pnpm-workspace.yaml`,
3995
+ * `package.json` `workspaces` field), resolves glob patterns against the filesystem,
3996
+ * and reads each matched `package.json` to produce {@link WorkspacePackage} records.
3997
+ *
3998
+ * @remarks
3999
+ * WorkspaceDiscovery is the last service in the Discovery group and the primary
4000
+ * data source for downstream services. DependencyGraph, TopologicalSorter,
4001
+ * PackageResolver, and ChangeDetector all depend on the package list it produces.
4002
+ *
4003
+ * The live layer (`WorkspaceDiscoveryLive`) depends on `WorkspaceRoot` and
4004
+ * `PackageManagerDetector`. It requires `FileSystem` and `Path` from
4005
+ * `@effect/platform`. Use `WorkspacesLive` or `WorkspacesFullLive` to get all
4006
+ * wiring handled automatically.
4007
+ *
4008
+ * @privateRemarks
4009
+ * Uses the class-based `Context.Tag` pattern. The internal tag identifier is
4010
+ * `@spencerbeggs/workspaces-effect/WorkspaceDiscovery`. Dependencies (WorkspaceRoot,
4011
+ * PackageManagerDetector) are resolved at layer construction time so that service
4012
+ * methods have `R = never`.
4013
+ *
4014
+ * @example Listing all workspace packages
4015
+ * ```typescript
4016
+ * import { Effect } from "effect";
4017
+ * import { NodeContext } from "@effect/platform-node";
4018
+ * import { WorkspaceDiscovery, WorkspacesLive } from "workspaces-effect";
4019
+ *
4020
+ * const program = Effect.gen(function* () {
4021
+ * const discovery = yield* WorkspaceDiscovery;
4022
+ * const packages = yield* discovery.listPackages();
4023
+ * for (const pkg of packages) {
4024
+ * console.log(`${pkg.name} @ ${pkg.path}`);
4025
+ * }
4026
+ * });
4027
+ *
4028
+ * Effect.runPromise(
4029
+ * program.pipe(
4030
+ * Effect.provide(WorkspacesLive),
4031
+ * Effect.provide(NodeContext.layer),
4032
+ * )
4033
+ * );
4034
+ * ```
4035
+ *
4036
+ * @public
4037
+ */
4038
+ declare class WorkspaceDiscovery extends WorkspaceDiscovery_base {} //#endregion
4039
+ //#region src/services/WorkspaceRoot.d.ts
4040
+ //#endregion
4041
+ //#region src/schemas/CatalogSet.d.ts
4042
+ declare const CatalogSet_base: Schema.Class<CatalogSet, {
4043
+ entries: Schema.Record$<typeof Schema.String, Schema.Record$<typeof Schema.String, typeof Schema.String>>;
4044
+ }, Schema.Struct.Encoded<{
4045
+ entries: Schema.Record$<typeof Schema.String, Schema.Record$<typeof Schema.String, typeof Schema.String>>;
4046
+ }>, never, {
4047
+ readonly entries: {
4048
+ readonly [x: string]: {
4049
+ readonly [x: string]: string;
4050
+ };
4051
+ };
4052
+ }, {}, {}>;
4053
+ /**
4054
+ * An immutable, fully-normalized catalog collection with the one
4055
+ * resolution semantic shared by live and point-in-time resolution.
4056
+ *
4057
+ * @public
4058
+ */
4059
+ declare class CatalogSet extends CatalogSet_base {
4060
+ /** An empty catalog set. */
4061
+ static empty(): CatalogSet;
4062
+ /** Wrap a pnpm `Catalogs` map, dropping undefined entries. */
4063
+ static fromCatalogs(catalogs: Catalogs): CatalogSet;
4064
+ /** Parse the `catalog:`/`catalogs:` sections of a pnpm-workspace.yaml text. */
4065
+ static fromWorkspaceYaml(text: string): Effect.Effect<CatalogSet, CatalogAssemblyError>;
4066
+ /**
4067
+ * Normalize a pnpm lockfile `catalogs:` section — entries are either a
4068
+ * specifier string or a `{ specifier, version }` object.
4069
+ */
4070
+ static fromLockfileCatalogs(raw: unknown): CatalogSet;
4071
+ /** Merge sets; later sets win per dependency within a catalog. */
4072
+ static merge(...sets: ReadonlyArray<CatalogSet>): CatalogSet;
4073
+ /** View as the pnpm `Catalogs` shape. */
4074
+ toCatalogs(): Catalogs;
4075
+ /**
4076
+ * Resolve a `catalog:` specifier to its concrete range. `Option.none`
4077
+ * for non-catalog specifiers and unresolved catalog entries.
4078
+ *
4079
+ * @remarks
4080
+ * Deliberately contrasts with `CatalogResolver.resolveSpecifier`: this
4081
+ * method is catalog-only and returns `Option.none` on unresolvable refs,
4082
+ * whereas the live service also handles `workspace:` specifiers and fails
4083
+ * with a typed `CatalogResolutionError`. Both route through
4084
+ * `resolveManifest`, which is the single resolution semantic.
4085
+ */
4086
+ resolveSpecifier(dependency: string, specifier: string): Option.Option<string>;
4087
+ } //#endregion
4088
+ //#region src/schemas/WorkspaceStateSnapshot.d.ts
4089
+ declare const PackageStateSnapshot_base: Schema.Class<PackageStateSnapshot, {
4199
4090
  name: typeof Schema.NonEmptyString;
4200
4091
  version: typeof Schema.String;
4201
- path: typeof Schema.NonEmptyString;
4202
- packageJsonPath: typeof Schema.NonEmptyString;
4203
4092
  relativePath: typeof Schema.String;
4204
- private: Schema.optionalWith<typeof Schema.Boolean, {
4205
- default: () => false;
4206
- }>;
4207
4093
  dependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
4208
4094
  default: () => {};
4209
4095
  }>;
@@ -4216,16 +4102,10 @@ declare const WorkspacePackage_base: Schema.Class<WorkspacePackage, {
4216
4102
  optionalDependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
4217
4103
  default: () => {};
4218
4104
  }>;
4219
- publishConfig: Schema.optional<typeof PublishConfig>;
4220
4105
  }, Schema.Struct.Encoded<{
4221
4106
  name: typeof Schema.NonEmptyString;
4222
4107
  version: typeof Schema.String;
4223
- path: typeof Schema.NonEmptyString;
4224
- packageJsonPath: typeof Schema.NonEmptyString;
4225
4108
  relativePath: typeof Schema.String;
4226
- private: Schema.optionalWith<typeof Schema.Boolean, {
4227
- default: () => false;
4228
- }>;
4229
4109
  dependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
4230
4110
  default: () => {};
4231
4111
  }>;
@@ -4238,105 +4118,356 @@ declare const WorkspacePackage_base: Schema.Class<WorkspacePackage, {
4238
4118
  optionalDependencies: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.String>, {
4239
4119
  default: () => {};
4240
4120
  }>;
4241
- publishConfig: Schema.optional<typeof PublishConfig>;
4242
4121
  }>, never, {
4243
- readonly publishConfig?: PublishConfig | undefined;
4244
- } & {
4245
4122
  readonly dependencies?: {
4246
4123
  readonly [x: string]: string;
4247
- };
4124
+ } | undefined;
4248
4125
  } & {
4249
4126
  readonly devDependencies?: {
4250
4127
  readonly [x: string]: string;
4251
- };
4128
+ } | undefined;
4252
4129
  } & {
4253
4130
  readonly optionalDependencies?: {
4254
4131
  readonly [x: string]: string;
4255
- };
4132
+ } | undefined;
4256
4133
  } & {
4257
4134
  readonly peerDependencies?: {
4258
4135
  readonly [x: string]: string;
4259
- };
4260
- } & {
4261
- readonly private?: boolean;
4136
+ } | undefined;
4262
4137
  } & {
4263
4138
  readonly name: string;
4264
- } & {
4265
- readonly packageJsonPath: string;
4266
- } & {
4267
- readonly path: string;
4268
4139
  } & {
4269
4140
  readonly relativePath: string;
4270
4141
  } & {
4271
4142
  readonly version: string;
4272
4143
  }, {}, {}>;
4273
- /**
4274
- * Branded non-empty string representing an absolute workspace path.
4275
- *
4276
- * @remarks
4277
- * Applies the `WorkspacePath` brand to `Schema.NonEmptyString`. Used to
4278
- * distinguish workspace directory paths from arbitrary strings in the type
4279
- * system, preventing accidental misuse of unvalidated path values.
4280
- *
4281
- * @example Decoding a workspace path
4282
- * ```typescript
4283
- * import { Schema } from "effect";
4284
- * import { WorkspacePath } from "workspaces-effect";
4285
- *
4286
- * const path = Schema.decodeUnknownSync(WorkspacePath)("/workspace/pkgs/utils");
4287
- * // path: WorkspacePath (branded string)
4288
- * ```
4289
- *
4290
- * @public
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
4144
+ /**
4145
+ * One workspace package as it existed at a point in time.
4146
+ *
4147
+ * @public
4321
4148
  */
4322
- declare class WorkspaceRootNotFoundError extends WorkspaceRootNotFoundErrorBase<{
4323
- readonly searchPath: string;
4324
- readonly reason: string;
4325
- }> {
4326
- get message(): string;
4149
+ declare class PackageStateSnapshot extends PackageStateSnapshot_base {}
4150
+ declare const WorkspaceStateSnapshot_base: Schema.Class<WorkspaceStateSnapshot, {
4151
+ packages: Schema.Array$<typeof PackageStateSnapshot>;
4152
+ catalogs: typeof CatalogSet;
4153
+ }, Schema.Struct.Encoded<{
4154
+ packages: Schema.Array$<typeof PackageStateSnapshot>;
4155
+ catalogs: typeof CatalogSet;
4156
+ }>, never, {
4157
+ readonly catalogs: CatalogSet;
4158
+ } & {
4159
+ readonly packages: readonly PackageStateSnapshot[];
4160
+ }, {}, {}>;
4161
+ /**
4162
+ * The full workspace state at a point in time: every package plus that
4163
+ * moment's assembled catalogs. `resolve` answers "what did this specifier
4164
+ * mean HERE" — catalog: against this snapshot's catalogs, workspace:
4165
+ * against this snapshot's package versions.
4166
+ *
4167
+ * @public
4168
+ */
4169
+ declare class WorkspaceStateSnapshot extends WorkspaceStateSnapshot_base {
4170
+ #private;
4171
+ /**
4172
+ * name → version map for workspace: resolution. Stable reference.
4173
+ *
4174
+ * @remarks
4175
+ * The returned record is this instance's memo, built once and reused by
4176
+ * every subsequent `resolve` call. Treat it as
4177
+ * read-only -- mutating it corrupts resolution for the lifetime of this
4178
+ * snapshot.
4179
+ */
4180
+ get versions(): Record<string, string>;
4181
+ /** Find a package snapshot by name (O(1) after the first call). */
4182
+ package(name: string): Option.Option<PackageStateSnapshot>;
4183
+ /**
4184
+ * Resolve a catalog:/workspace: specifier against THIS snapshot.
4185
+ * `Option.none` for plain specifiers and unresolvable references.
4186
+ */
4187
+ resolve(dependency: string, specifier: string): Option.Option<string>;
4188
+ } //#endregion
4189
+ //#region src/services/PointInTimeWorkspace.d.ts
4190
+ /**
4191
+ * The umbrella error union covering both {@link PointInTimeWorkspace}
4192
+ * methods: {@link PointInTimeAtError} (raised by `at`) unioned with
4193
+ * {@link PointInTimeWorktreeError} (raised by `worktree`).
4194
+ *
4195
+ * @remarks
4196
+ * - {@link GitReadError} — a `git show`/`git ls-tree` invocation failed for a
4197
+ * reason other than "path absent at this ref" (absent paths degrade to
4198
+ * `Option.none`, never an error). `at`-only.
4199
+ * - {@link CatalogAssemblyError} — the `pnpm-workspace.yaml` at the ref (or on
4200
+ * disk) is malformed YAML. A malformed *lockfile* never fails; it degrades to
4201
+ * an empty catalog set.
4202
+ * - {@link WorkspaceRootNotFoundError} — the workspace root could not be
4203
+ * located walking up from `options.cwd` (or `process.cwd()` when omitted).
4204
+ * - {@link WorkspaceDiscoveryError} — `worktree` failed to enumerate the live
4205
+ * packages via `WorkspaceDiscovery`. `worktree`-only.
4206
+ *
4207
+ * @public
4208
+ */
4209
+ type PointInTimeReadError = PointInTimeAtError | PointInTimeWorktreeError;
4210
+ /**
4211
+ * Options accepted by both {@link PointInTimeWorkspace} methods.
4212
+ *
4213
+ * @public
4214
+ */
4215
+ interface PointInTimeOptions {
4216
+ /**
4217
+ * Starting directory for workspace-root resolution. The root is found by
4218
+ * walking UP from here (same semantics as `WorkspaceDiscovery`); when
4219
+ * omitted, resolution starts from `process.cwd()`.
4220
+ */
4221
+ readonly cwd?: string;
4327
4222
  }
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>;
4223
+ /**
4224
+ * Errors `at` can raise. `at` never enumerates the live filesystem, so
4225
+ * {@link WorkspaceDiscoveryError} cannot occur.
4226
+ *
4227
+ * @public
4228
+ */
4229
+ type PointInTimeAtError = GitReadError | CatalogAssemblyError | WorkspaceRootNotFoundError;
4230
+ /**
4231
+ * Errors `worktree` can raise. `worktree` never invokes git, so
4232
+ * {@link GitReadError} cannot occur.
4233
+ *
4234
+ * @public
4235
+ */
4236
+ type PointInTimeWorktreeError = CatalogAssemblyError | WorkspaceRootNotFoundError | WorkspaceDiscoveryError;
4237
+ declare const PointInTimeWorkspace_base: Context.TagClass<PointInTimeWorkspace, "@spencerbeggs/workspaces-effect/PointInTimeWorkspace", {
4238
+ /**
4239
+ * Workspace state as of a git ref.
4240
+ *
4241
+ * Reads `pnpm-workspace.yaml`, `pnpm-lock.yaml`, and each package's
4242
+ * `package.json` at `ref` via `git show`/`git ls-tree`; packages absent at
4243
+ * the ref are skipped. Cached per `(resolved root, ref)`.
4244
+ *
4245
+ * @param ref - Any git ref (SHA, branch, tag) resolvable in the repo.
4246
+ * @param options - Optional {@link PointInTimeOptions}; `options.cwd` is a
4247
+ * starting directory to walk UP from when resolving the workspace root
4248
+ * (same semantics as `WorkspaceDiscovery`) — when omitted, resolution
4249
+ * starts from `process.cwd()`.
4250
+ * @returns An Effect that succeeds with the {@link WorkspaceStateSnapshot}
4251
+ * at the ref, or fails with {@link PointInTimeAtError}.
4252
+ */
4253
+ readonly at: (ref: string, options?: PointInTimeOptions) => Effect.Effect<WorkspaceStateSnapshot, PointInTimeAtError>;
4254
+ /**
4255
+ * Workspace state of the live working tree (staged + unstaged edits).
4256
+ *
4257
+ * Enumerates packages via `WorkspaceDiscovery` and reads catalogs from the
4258
+ * on-disk `pnpm-workspace.yaml` and `pnpm-lock.yaml`. Uncached.
4259
+ *
4260
+ * @param options - Optional {@link PointInTimeOptions}; `options.cwd` is a
4261
+ * starting directory to walk UP from when resolving the workspace root
4262
+ * (same semantics as `WorkspaceDiscovery`) — when omitted, resolution
4263
+ * starts from `process.cwd()`.
4264
+ * @returns An Effect that succeeds with the live {@link WorkspaceStateSnapshot},
4265
+ * or fails with {@link PointInTimeWorktreeError}.
4266
+ */
4267
+ readonly worktree: (options?: PointInTimeOptions) => Effect.Effect<WorkspaceStateSnapshot, PointInTimeWorktreeError>;
4268
+ }>;
4269
+ /**
4270
+ * Service for reading a monorepo's workspace state at a specific moment: any
4271
+ * git ref (via `git show`/`git ls-tree`, without checking the ref out) or the
4272
+ * live working tree (via `WorkspaceDiscovery`).
4273
+ *
4274
+ * @remarks
4275
+ * Each snapshot carries that moment's packages plus its assembled pnpm catalog
4276
+ * set, so `catalog:`/`workspace:` specifiers resolve against the state as it
4277
+ * existed *then* — not against the current working tree. Catalog precedence is
4278
+ * lockfile-then-inline (inline `pnpm-workspace.yaml` catalogs win).
4279
+ *
4280
+ * The live layer ({@link PointInTimeWorkspaceLive}) resolves `WorkspaceRoot`,
4281
+ * `WorkspaceDiscovery`, `CommandExecutor`, `FileSystem`, and `Path` at layer
4282
+ * construction so both methods have `R = never`. Use `WorkspacesFullLive` to
4283
+ * get all wiring handled automatically.
4284
+ *
4285
+ * @privateRemarks
4286
+ * Uses the class-based `Context.Tag` pattern. The internal tag identifier is
4287
+ * `@spencerbeggs/workspaces-effect/PointInTimeWorkspace`.
4288
+ *
4289
+ * @see {@link PointInTimeWorkspaceLive} for the live implementation.
4290
+ *
4291
+ * @public
4292
+ */
4293
+ declare class PointInTimeWorkspace extends PointInTimeWorkspace_base {} //#endregion
4294
+ //#region src/layers/PointInTimeWorkspaceLive.d.ts
4295
+ /**
4296
+ * Convenience type alias for the {@link PointInTimeWorkspaceLive} layer signature.
4297
+ *
4298
+ * @public
4299
+ */
4300
+ //#endregion
4301
+ //#region src/schemas/publish.d.ts
4302
+ declare const PublishTarget_base: Schema.Class<PublishTarget, {
4303
+ name: typeof Schema.NonEmptyString;
4304
+ registry: typeof Schema.NonEmptyString;
4305
+ directory: typeof Schema.String;
4306
+ access: Schema.Literal<["public", "restricted"]>;
4307
+ provenance: Schema.optionalWith<typeof Schema.Boolean, {
4308
+ default: () => false;
4309
+ }>;
4310
+ }, Schema.Struct.Encoded<{
4311
+ name: typeof Schema.NonEmptyString;
4312
+ registry: typeof Schema.NonEmptyString;
4313
+ directory: typeof Schema.String;
4314
+ access: Schema.Literal<["public", "restricted"]>;
4315
+ provenance: Schema.optionalWith<typeof Schema.Boolean, {
4316
+ default: () => false;
4317
+ }>;
4318
+ }>, never, {
4319
+ readonly provenance?: boolean | undefined;
4320
+ } & {
4321
+ readonly access: "public" | "restricted";
4322
+ } & {
4323
+ readonly directory: string;
4324
+ } & {
4325
+ readonly name: string;
4326
+ } & {
4327
+ readonly registry: string;
4328
+ }, {}, {}>;
4329
+ /**
4330
+ * A single publish target for a workspace package.
4331
+ *
4332
+ * @remarks
4333
+ * Represents the resolved publishing configuration for a workspace package,
4334
+ * combining defaults with any overrides from the package's `publishConfig`
4335
+ * field. Used to determine where and how each package should be published.
4336
+ *
4337
+ * Fields:
4338
+ * - `name` — the package name (non-empty string).
4339
+ * - `registry` — the target registry URL (e.g., `"https://registry.npmjs.org"`).
4340
+ * - `directory` — the directory to publish (empty string means the package root).
4341
+ * - `access` — `"public"` or `"restricted"` (scoped package visibility).
4342
+ * - `provenance` — whether to publish with provenance attestation (defaults to `false`).
4343
+ *
4344
+ * @example Creating a PublishTarget
4345
+ * ```typescript
4346
+ * import { PublishTarget } from "workspaces-effect";
4347
+ *
4348
+ * const target = new PublishTarget({
4349
+ * name: "@my-org/utils",
4350
+ * registry: "https://registry.npmjs.org",
4351
+ * directory: "dist/npm",
4352
+ * access: "public",
4353
+ * });
4354
+ * ```
4355
+ *
4356
+ * @public
4357
+ */
4358
+ declare class PublishTarget extends PublishTarget_base {} //#endregion
4359
+ //#region src/services/PublishabilityDetector.d.ts
4360
+ declare const PublishabilityDetector_base: Context.TagClass<PublishabilityDetector, "@spencerbeggs/workspaces-effect/PublishabilityDetector", {
4361
+ /**
4362
+ * Detect publish targets for a workspace package.
4363
+ *
4364
+ * Analyzes the package's `package.json` fields to determine if and where
4365
+ * it can be published.
4366
+ *
4367
+ * @param pkg - The {@link WorkspacePackage} to analyze.
4368
+ * @param root - Absolute path to the workspace root directory.
4369
+ * @returns An Effect that succeeds with a readonly array of
4370
+ * {@link PublishTarget} records. An empty array indicates the package is
4371
+ * not publishable. Never fails.
4372
+ */
4373
+ readonly detect: (pkg: WorkspacePackage, root: string) => Effect.Effect<ReadonlyArray<PublishTarget>>;
4374
+ }>;
4375
+ /**
4376
+ * Service for detecting whether a workspace package is publishable and
4377
+ * identifying its publish targets (npm, GitHub Packages, etc.).
4378
+ *
4379
+ * Inspects `package.json` fields such as `private`, `publishConfig`, and
4380
+ * `repository` to determine publishability and target registries.
4381
+ *
4382
+ * @remarks
4383
+ * PublishabilityDetector is part of the Configuration and Lockfiles service
4384
+ * group. It is a pure service with no dependencies on other services — it
4385
+ * operates solely on the {@link WorkspacePackage} data and the workspace root
4386
+ * path passed to it.
4387
+ *
4388
+ * A package is considered publishable when `private` is not `true` and it has a
4389
+ * `name` and `version`. The returned {@link PublishTarget} array describes where
4390
+ * the package would be published (e.g., npmjs.org, GitHub Packages) based on
4391
+ * `publishConfig.registry` and other signals.
4392
+ *
4393
+ * The live layer (`PublishabilityDetectorLive`) is a pure layer with no
4394
+ * dependencies — it can be provided standalone or via `WorkspacesLive` /
4395
+ * `WorkspacesFullLive`.
4396
+ *
4397
+ * @privateRemarks
4398
+ * Uses the class-based `Context.Tag` pattern. The internal tag identifier is
4399
+ * `@spencerbeggs/workspaces-effect/PublishabilityDetector`. Since this service
4400
+ * has no dependencies, the layer is constructed with `Layer.succeed` rather than
4401
+ * `Layer.effect`.
4402
+ *
4403
+ * @example Checking publishability of all packages
4404
+ * ```typescript
4405
+ * import { Effect } from "effect";
4406
+ * import { NodeContext } from "@effect/platform-node";
4407
+ * import { PublishabilityDetector, WorkspaceDiscovery, WorkspacesLive } from "workspaces-effect";
4408
+ *
4409
+ * const program = Effect.gen(function* () {
4410
+ * const discovery = yield* WorkspaceDiscovery;
4411
+ * const publishability = yield* PublishabilityDetector;
4412
+ * const packages = yield* discovery.listPackages();
4413
+ *
4414
+ * for (const pkg of packages) {
4415
+ * const targets = yield* publishability.detect(pkg, "/path/to/monorepo");
4416
+ * if (targets.length > 0) {
4417
+ * console.log(`${pkg.name} publishes to:`, targets.map((t) => t.registry));
4418
+ * } else {
4419
+ * console.log(`${pkg.name} is not publishable`);
4420
+ * }
4421
+ * }
4422
+ * });
4423
+ *
4424
+ * Effect.runPromise(
4425
+ * program.pipe(
4426
+ * Effect.provide(WorkspacesLive),
4427
+ * Effect.provide(NodeContext.layer),
4428
+ * )
4429
+ * );
4430
+ * ```
4431
+ *
4432
+ * @public
4433
+ */
4434
+ declare class PublishabilityDetector extends PublishabilityDetector_base {} //#endregion
4435
+ //#region src/layers/PublishabilityDetectorLive.d.ts
4436
+ /**
4437
+ * Live layer for the {@link PublishabilityDetector} service.
4438
+ *
4439
+ * Determines whether a workspace package is publishable to npm based
4440
+ * on its `private` flag and `publishConfig` settings.
4441
+ *
4442
+ * @remarks
4443
+ * This layer is pure -- it has no dependencies on `FileSystem`, `Path`, or
4444
+ * any other platform services. It uses `Layer.succeed` rather than
4445
+ * `Layer.effect`. Custom layers can override by providing their own
4446
+ * `Layer` for `PublishabilityDetector`.
4447
+ *
4448
+ * @privateRemarks
4449
+ * Builds a single {@link PublishTarget} from `publishConfig` fields,
4450
+ * defaulting to the public npm registry when no registry is specified.
4451
+ *
4452
+ * @example
4453
+ * ```typescript
4454
+ * import { Effect } from "effect";
4455
+ * import { PublishabilityDetector, PublishabilityDetectorLive } from "workspaces-effect";
4456
+ * import { WorkspacePackage } from "workspaces-effect";
4457
+ *
4458
+ * const program = Effect.gen(function* () {
4459
+ * const detector = yield* PublishabilityDetector;
4460
+ * const targets = yield* detector.detect(somePackage, "/path/to/root");
4461
+ * return targets;
4462
+ * });
4463
+ *
4464
+ * Effect.runPromise(
4465
+ * program.pipe(Effect.provide(PublishabilityDetectorLive))
4466
+ * );
4467
+ * ```
4468
+ *
4469
+ * @public
4470
+ */
4340
4471
  //#endregion
4341
4472
  //#region ../silk-effects/dist/dev/pkg/index.d.ts
4342
4473
  //#region \0rolldown/runtime.js
@@ -6825,6 +6956,53 @@ declare class GitError extends GitErrorBase<{
6825
6956
  }> {
6826
6957
  get message(): string;
6827
6958
  }
6959
+ /**
6960
+ * Base class for {@link ChangesetIOError}.
6961
+ *
6962
+ * @privateRemarks
6963
+ * Effect's `Data.TaggedError` creates an anonymous base class that
6964
+ * api-extractor cannot follow without an explicit export.
6965
+ *
6966
+ * @internal
6967
+ */
6968
+ declare const ChangesetIOErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6969
+ readonly _tag: "ChangesetIOError";
6970
+ } & Readonly<A>;
6971
+ /**
6972
+ * Changeset file I/O failure.
6973
+ *
6974
+ * @remarks
6975
+ * Raised by {@link DepsRegen} when reading, writing, listing, or deleting
6976
+ * `.changeset/*.md` files fails. Deletion failures during
6977
+ * {@link DepsRegenShape.execute} are tolerated (stale changesets are
6978
+ * skip-and-continue, so an interrupted run stays safely re-runnable);
6979
+ * read, list, and write failures are loud.
6980
+ *
6981
+ * @example
6982
+ * ```typescript
6983
+ * import { Effect } from "effect";
6984
+ * import { ChangesetIOError } from "@savvy-web/changesets";
6985
+ *
6986
+ * declare const program: Effect.Effect<void, ChangesetIOError>;
6987
+ *
6988
+ * const handled = program.pipe(
6989
+ * Effect.catchTag("ChangesetIOError", (err) =>
6990
+ * Effect.logError(`changeset ${err.operation} failed at ${err.path}: ${err.reason}`)
6991
+ * ),
6992
+ * );
6993
+ * ```
6994
+ *
6995
+ * @see {@link DepsRegen} which produces these errors during plan/execute
6996
+ *
6997
+ * @public
6998
+ */
6999
+ declare class ChangesetIOError extends ChangesetIOErrorBase<{
7000
+ /** Absolute path of the file or directory the operation targeted. */readonly path: string; /** The failed operation. */
7001
+ readonly operation: "read" | "write" | "delete" | "list"; /** Human-readable failure reason. */
7002
+ readonly reason: string;
7003
+ }> {
7004
+ get message(): string;
7005
+ }
6828
7006
  /**
6829
7007
  * Base class for {@link ReleasePlanError}.
6830
7008
  *
@@ -7775,60 +7953,50 @@ declare const ChangelogServiceBase: Context.TagClass<ChangelogService, "Changelo
7775
7953
  * @public
7776
7954
  */
7777
7955
  declare class ChangelogService extends ChangelogServiceBase {} //#endregion
7778
- //#region src/changesets/services/workspace-snapshot.d.ts
7956
+ //#region src/services/ChangesetConfig.d.ts
7779
7957
  /**
7780
- * One workspace package as it existed at a specific git ref.
7781
- *
7958
+ * Changeset operating mode for a workspace root.
7782
7959
  * @public
7783
7960
  */
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
- }
7961
+ type ChangesetMode = "silk" | "vanilla" | "none";
7962
+ declare const ChangesetConfig_base: Context.TagClass<ChangesetConfig, "@savvy-web/silk-effects/ChangesetConfig", {
7963
+ readonly mode: (root: string) => Effect.Effect<ChangesetMode>;
7964
+ readonly versionPrivate: (root: string) => Effect.Effect<boolean>;
7965
+ readonly ignorePatterns: (root: string) => Effect.Effect<ReadonlyArray<string>>;
7966
+ readonly isIgnored: (name: string, root: string) => Effect.Effect<boolean>;
7967
+ readonly fixed: (root: string) => Effect.Effect<ReadonlyArray<ReadonlyArray<string>>>;
7968
+ }>;
7800
7969
  /**
7801
- * Effect service interface for reading workspace snapshots.
7970
+ * Accessor service over a workspace root's `.changeset/config.json`.
7971
+ *
7972
+ * @remarks
7973
+ * Reads through {@link ChangesetConfigReader} (FileSystem-based) with a per-root cache.
7974
+ * Every accessor is total (error channel `never`): a missing or unreadable config collapses
7975
+ * to `mode: "none"` and empty/false defaults.
7802
7976
  *
7977
+ * @since 0.4.0
7803
7978
  * @public
7804
7979
  */
7805
- interface WorkspaceSnapshotReaderShape {
7980
+ declare class ChangesetConfig extends ChangesetConfig_base {
7806
7981
  /**
7807
- * Read every workspace package's snapshot at the given git ref.
7982
+ * The one ignore matcher: exact name match, or `@scope/*` wildcard.
7808
7983
  *
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}
7984
+ * `"@scope/*"` matches `"@scope/anything"` (prefix kept includes the trailing slash),
7985
+ * but not the bare scope `"@scope"`.
7813
7986
  */
7814
- readonly snapshotAt: (cwd: string, ref: string) => Effect.Effect<ReadonlyArray<WorkspaceSnapshot>, GitError>;
7987
+ static matches(name: string, pattern: string): boolean;
7815
7988
  }
7816
7989
  /**
7817
- * @internal
7818
- */
7819
- declare const WorkspaceSnapshotReaderBase: Context.TagClass<WorkspaceSnapshotReader, "WorkspaceSnapshotReader", WorkspaceSnapshotReaderShape>;
7820
- /**
7821
- * Effect service tag for {@link WorkspaceSnapshotReaderShape}.
7990
+ * Live {@link ChangesetConfig} reading via {@link ChangesetConfigReader}, cached per root.
7822
7991
  *
7823
- * @public
7824
- */
7825
- declare class WorkspaceSnapshotReader extends WorkspaceSnapshotReaderBase {}
7826
- /**
7827
- * Production layer for {@link WorkspaceSnapshotReader}.
7992
+ * @remarks
7993
+ * Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide
7994
+ * `ChangesetConfigReaderLive` + a platform layer (`NodeContext.layer`).
7828
7995
  *
7996
+ * @since 0.4.0
7829
7997
  * @public
7830
7998
  */
7831
- declare const WorkspaceSnapshotReaderLive: Layer.Layer<WorkspaceSnapshotReader>; //#endregion
7999
+ //#endregion
7832
8000
  //#region src/changesets/utils/dep-diff.d.ts
7833
8001
  /**
7834
8002
  * A workspace package's worth of dependency-table rows.
@@ -7838,38 +8006,26 @@ declare const WorkspaceSnapshotReaderLive: Layer.Layer<WorkspaceSnapshotReader>;
7838
8006
  interface WorkspaceDependencyDiff {
7839
8007
  /** The workspace package whose `package.json` changed. */
7840
8008
  readonly package: string;
7841
- /** Repo-relative path of the package directory (taken from the `after` snapshot when available). */
8009
+ /** Repo-relative path of the package directory (taken from the `after` snapshot). */
7842
8010
  readonly relativePath: string;
7843
8011
  /** One row per dependency change, sorted by the existing `sortDependencyRows` convention. */
7844
8012
  readonly rows: ReadonlyArray<DependencyTableRow>;
7845
8013
  }
7846
8014
  /**
7847
- * Diff two workspace snapshots and return per-package dependency-table rows.
8015
+ * Diff two workspace snapshots and return per-package dependency-table rows,
8016
+ * comparing already-resolved specifier values per side.
7848
8017
  *
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"`.
8018
+ * @param before - Snapshot at the older ref (typically the merge base). A
8019
+ * workspace package absent here reports every declared dep as `"added"`.
7852
8020
  * @param after - Snapshot at the newer ref (typically the working tree).
7853
8021
  * @returns One {@link WorkspaceDependencyDiff} entry per workspace package
7854
- * that has at least one row. Packages with no changes are omitted.
8022
+ * that has at least one row. Packages with no resolved-value changes are
8023
+ * omitted.
7855
8024
  *
7856
8025
  * @public
7857
8026
  */
7858
- declare function computeWorkspaceDependencyDiffs(beforeSnapshots: ReadonlyArray<WorkspaceSnapshot>, afterSnapshots: ReadonlyArray<WorkspaceSnapshot>): ReadonlyArray<WorkspaceDependencyDiff>; //#endregion
8027
+ declare function computeWorkspaceDependencyDiffs(before: WorkspaceStateSnapshot, after: WorkspaceStateSnapshot): ReadonlyArray<WorkspaceDependencyDiff>; //#endregion
7859
8028
  //#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
8029
  /**
7874
8030
  * Strict detection of "pure dependency changesets" per the documented
7875
8031
  * rules: single-package frontmatter, single `## Dependencies` heading,
@@ -7940,7 +8096,7 @@ interface DepsRegenOptions {
7940
8096
  readonly from?: string;
7941
8097
  /**
7942
8098
  * Newer ref to diff to. Defaults to the working tree (staged + unstaged
7943
- * + untracked) via {@link snapshotFromWorktree}.
8099
+ * + untracked) via `PointInTimeWorkspace.worktree`.
7944
8100
  */
7945
8101
  readonly to?: string;
7946
8102
  }
@@ -7951,19 +8107,27 @@ interface DepsRegenOptions {
7951
8107
  */
7952
8108
  interface DepsRegenShape {
7953
8109
  /**
7954
- * Compute a complete {@link RegenPlan} without touching the filesystem.
8110
+ * Compute a complete {@link RegenPlan}. Read-only against the filesystem:
8111
+ * only inspects the existing `.changeset/*.md` files to detect
8112
+ * stale/mixed changesets.
7955
8113
  *
7956
8114
  * @param options - See {@link DepsRegenOptions}.
7957
- * @returns An Effect yielding the plan, or failing with {@link GitError}.
8115
+ * @returns An Effect yielding the plan, or failing with {@link GitError},
8116
+ * `WorkspaceDiscoveryError`, {@link ChangesetIOError} (an unreadable
8117
+ * `.changeset` directory or a genuinely unreadable changeset file list),
8118
+ * or `PointInTimeReadError` (a snapshot read failed for either ref).
7958
8119
  */
7959
- readonly plan: (options: DepsRegenOptions) => Effect.Effect<RegenPlan, GitError | WorkspaceDiscoveryError, never>;
8120
+ readonly plan: (options: DepsRegenOptions) => Effect.Effect<RegenPlan, GitError | WorkspaceDiscoveryError | ChangesetIOError | PointInTimeReadError, never>;
7960
8121
  /**
7961
- * Apply a {@link RegenPlan}: delete stale changesets, write fresh ones.
8122
+ * Apply a {@link RegenPlan}: write fresh changesets first, then delete
8123
+ * stale ones. Writes fail loudly with {@link ChangesetIOError}; deletion
8124
+ * failures are tolerated (skip-and-continue) so an interrupted run stays
8125
+ * safely re-runnable.
7962
8126
  *
7963
8127
  * @param plan - The plan produced by {@link DepsRegenShape.plan}.
7964
8128
  * @returns An Effect yielding a {@link RegenResult}.
7965
8129
  */
7966
- readonly execute: (plan: RegenPlan) => Effect.Effect<RegenResult, never, never>;
8130
+ readonly execute: (plan: RegenPlan) => Effect.Effect<RegenResult, ChangesetIOError, never>;
7967
8131
  }
7968
8132
  /**
7969
8133
  * @internal
@@ -7990,13 +8154,42 @@ declare class DepsRegen extends DepsRegenBase {}
7990
8154
  /**
7991
8155
  * Live layer for {@link DepsRegen}.
7992
8156
  *
7993
- * Requires {@link WorkspaceSnapshotReader}, {@link ConfigInspector},
7994
- * `WorkspaceDiscovery`, `CatalogResolver`, and `PublishabilityDetector`
7995
- * (the last three from `workspaces-effect`).
8157
+ * Requires `PointInTimeWorkspace`, `WorkspaceDiscovery`,
8158
+ * `PublishabilityDetector` (all from `workspaces-effect`),
8159
+ * {@link ConfigInspector}, {@link ChangesetConfig}, and
8160
+ * `FileSystem.FileSystem` (resolved once at construction and closed over by
8161
+ * the shape, keeping `plan`/`execute` themselves requirement-free).
8162
+ *
8163
+ * @public
8164
+ */
8165
+ declare const DepsRegenLive: Layer.Layer<DepsRegen, never, PointInTimeWorkspace | ConfigInspector | WorkspaceDiscovery | PublishabilityDetector | ChangesetConfig | FileSystem.FileSystem>;
8166
+ /**
8167
+ * Batteries-included {@link DepsRegen} layer: silk's opinionated default
8168
+ * composition of the full dependency graph. Only the platform services
8169
+ * remain — note that {@link PointInTimeWorkspace} reads git history, so
8170
+ * this layer genuinely requires `CommandExecutor` in addition to
8171
+ * `FileSystem`/`Path`: provide a git-capable platform layer
8172
+ * (`NodeContext.layer`), not a bare filesystem-only layer.
8173
+ *
8174
+ * Gating uses silk's adaptive publishability detector
8175
+ * ({@link PublishabilityDetectorAdaptiveLive}), so the default semantics
8176
+ * are "versionable minus ignored" — identical to the savvy CLI and MCP
8177
+ * runtimes. Consumers who need to swap any dependency (test detectors,
8178
+ * alternate config sources) should keep composing {@link DepsRegenLive}
8179
+ * directly; this layer is purely additive.
8180
+ *
8181
+ * @example
8182
+ * ```typescript
8183
+ * import { NodeContext } from "@effect/platform-node";
8184
+ * import { Layer } from "effect";
8185
+ * import { Changesets } from "@savvy-web/silk-effects";
8186
+ *
8187
+ * const depsRegen = Changesets.DepsRegenDefault.pipe(Layer.provide(NodeContext.layer));
8188
+ * ```
7996
8189
  *
7997
8190
  * @public
7998
8191
  */
7999
- declare const DepsRegenLive: Layer.Layer<DepsRegen, never, WorkspaceSnapshotReader | ConfigInspector | WorkspaceDiscovery | CatalogResolver | PublishabilityDetector>; //#endregion
8192
+ declare const DepsRegenDefault: Layer.Layer<DepsRegen, never, FileSystem.FileSystem | Path.Path | CommandExecutor.CommandExecutor>; //#endregion
8000
8193
  //#region src/changesets/schemas/release-plan.d.ts
8001
8194
  /** A semantic-version bump level (the `"none"` plan type is filtered out upstream). @public */
8002
8195
  declare const BumpTypeSchema: Schema.Literal<["major", "minor", "patch"]>;
@@ -8096,8 +8289,8 @@ interface ReleasePlannerShape {
8096
8289
  declare const ReleasePlannerBase: Context.TagClass<ReleasePlanner, "ReleasePlanner", ReleasePlannerShape>;
8097
8290
  /** Effect service tag for the release planner. @public */
8098
8291
  declare class ReleasePlanner extends ReleasePlannerBase {}
8099
- /** Production layer. Requires {@link ConfigInspector} (used by `apply`). @public */
8100
- declare const ReleasePlannerLive: Layer.Layer<ReleasePlanner, never, ConfigInspector>;
8292
+ /** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */
8293
+ declare const ReleasePlannerLive: Layer.Layer<ReleasePlanner, never, ConfigInspector | FileSystem.FileSystem>;
8101
8294
  /**
8102
8295
  * Test factory — supply fixed results for any subset of methods. Unsupplied
8103
8296
  * methods fail with a `ReleasePlanError`.
@@ -8771,6 +8964,14 @@ declare const LegacyVersionFilesSchema: Schema.Array$<Schema.Struct<{
8771
8964
  * @internal
8772
8965
  */
8773
8966
  declare function serializeDependencyTableToMarkdown(rows: DependencyTableRow[]): string; //#endregion
8967
+ //#region src/changesets/utils/git.d.ts
8968
+ /**
8969
+ * Run `git merge-base <base> HEAD`, returning the SHA. Errors propagate
8970
+ * as {@link GitError}.
8971
+ *
8972
+ * @internal
8973
+ */
8974
+ declare function gitMergeBase(cwd: string, base: string): Effect.Effect<string, GitError>; //#endregion
8774
8975
  //#region src/changesets/utils/publishability.d.ts
8775
8976
  /**
8776
8977
  * Compute the set of currently-publishable workspace package names.
@@ -8779,12 +8980,24 @@ declare function serializeDependencyTableToMarkdown(rows: DependencyTableRow[]):
8779
8980
  * Uses the currently-active {@link SilkPublishability} — wire the
8780
8981
  * {@link SilkPublishabilityDetectorLive} layer to get silk semantics.
8781
8982
  *
8983
+ * `root` is passed through verbatim to `detector.detect(pkg, root)` for every
8984
+ * package — it must be the project root (the directory containing
8985
+ * `.changeset/`), NOT the individual package's directory. The vanilla
8986
+ * `PublishabilityDetectorLive` and plain `SilkPublishabilityDetectorLive`
8987
+ * both ignore this argument, but the ignore/mode-aware
8988
+ * `PublishabilityDetectorAdaptiveLive` reads `.changeset/config.json`
8989
+ * relative to it, so passing a package subdirectory silently makes every
8990
+ * package resolve to "not publishable". Mirrors
8991
+ * {@link SilkPublishability.listPublishable}, which takes the same
8992
+ * single-root parameter for the same reason.
8993
+ *
8782
8994
  * @param packages - The workspace packages to evaluate
8995
+ * @param root - Absolute path to the project root containing `.changeset/`
8783
8996
  * @returns An Effect yielding a `Set` of publishable package names
8784
8997
  *
8785
8998
  * @public
8786
8999
  */
8787
- declare function listPublishablePackageNames(packages: ReadonlyArray<WorkspacePackage>): Effect.Effect<ReadonlySet<string>, never, PublishabilityDetector>; //#endregion
9000
+ declare function listPublishablePackageNames(packages: ReadonlyArray<WorkspacePackage>, root: string): Effect.Effect<ReadonlySet<string>, never, PublishabilityDetector>; //#endregion
8788
9001
  //#region src/changesets/utils/version-files.d.ts
8789
9002
  /**
8790
9003
  * Result of a single version file update.
@@ -8989,27 +9202,6 @@ declare class VersionFiles {
8989
9202
  */
8990
9203
  static processResolvedVersionFiles(scopes: ReadonlyArray<ResolvedPackageScope>, dryRun?: boolean): VersionFileUpdate[];
8991
9204
  } //#endregion
8992
- //#region src/changesets/utils/worktree-snapshot.d.ts
8993
- /**
8994
- * Run `git merge-base <base> HEAD`, returning the SHA. Errors propagate
8995
- * as {@link GitError}.
8996
- *
8997
- * @internal
8998
- */
8999
- declare function gitMergeBase(cwd: string, base: string): Effect.Effect<string, GitError>;
9000
- /**
9001
- * Read every workspace package's `package.json` from the live working
9002
- * tree, returning {@link WorkspaceSnapshot} entries matching the shape
9003
- * `WorkspaceSnapshotReader.snapshotAt` produces for git refs.
9004
- *
9005
- * @remarks
9006
- * Falls back to root-only when `pnpm-workspace.yaml` is missing or
9007
- * unparseable. Uses `node:fs.readdirSync` for directory expansion
9008
- * (portable across platforms — `execFileSync("ls")` is not).
9009
- *
9010
- * @internal
9011
- */
9012
- declare function snapshotFromWorktree(cwd: string): ReadonlyArray<WorkspaceSnapshot>; //#endregion
9013
9205
  //#region ../../node_modules/.pnpm/micromark-util-types@2.0.2/node_modules/micromark-util-types/index.d.ts
9014
9206
  /**
9015
9207
  * Enum of allowed token types.
@@ -9662,7 +9854,7 @@ declare const RequiredSectionsRule$2: Plugin<Root, unknown>; //#endregion
9662
9854
  //#region src/changesets/remark/rules/uncategorized-content.d.ts
9663
9855
  declare const UncategorizedContentRule$2: Plugin<Root, unknown>;
9664
9856
  declare namespace index_d_exports {
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$2 as ContentStructureRule, ContributorFootnotesPlugin, DeduplicateItemsPlugin, DependencyAction, DependencyActionSchema, DependencyTable, DependencyTableFormatRule$2 as 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$2 as 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$2 as RequiredSectionsRule, ResolvedPackageScope, ResolvedPackageScopeSchema, ResolvedVersionFile, ResolvedVersionFileSchema, SectionCategory, SectionCategorySchema, SilkChangesetPreset, SilkChangesetTransformPreset, SilkChangesetsRules$1 as SilkChangesetsRules, UncategorizedContentRule$2 as UncategorizedContentRule, UrlOrMarkdownLinkSchema, UsernameSchema, VERSION_RE, VersionFileConfig, VersionFileConfigSchema, VersionFileError, VersionFileErrorBase, VersionFileUpdate, VersionFileUpdateRecordSchema, VersionFiles, VersionFilesSchema, VersionOrEmptySchema, VersionType, VersionTypeSchema, WorkspaceDependencyDiff, WorkspaceSnapshot, WorkspaceSnapshotReader, WorkspaceSnapshotReaderBase, WorkspaceSnapshotReaderLive, WorkspaceSnapshotReaderShape, WorkspaceVersion, changelogFunctions, computeWorkspaceDependencyDiffs, gitMergeBase, isPureDependencyChangeset, listPublishablePackageNames, makeBranchAnalyzerTest, makeConfigInspectorTest, makeGitHubTest, makeReleasePlannerTest, resolveDiffRows, serializeDependencyTableToMarkdown, snapshotFromWorktree };
9857
+ export { AggregateDependencyTablesPlugin, AppliedRelease, AppliedReleaseEntrySchema, AppliedReleaseSchema, BranchAnalysis, BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerBase, BranchAnalyzerLive, BranchAnalyzerShape, BranchFileEntry, BranchFileEntrySchema, BumpType, BumpTypeSchema, Categories, Changelog, ChangelogService, ChangelogServiceBase, ChangelogServiceShape, ChangelogTransformer, Changeset, ChangesetIOError, ChangesetIOErrorBase, ChangesetLinter, ChangesetOptions, ChangesetOptionsSchema, ChangesetPreview, ChangesetPreviewSchema, ChangesetSchema, ChangesetSummarySchema, ChangesetValidationError, ChangesetValidationErrorBase, Classification, ClassificationReason, ClassificationReasonSchema, ClassificationSchema, CommitHashSchema, ConfigInspector, ConfigInspectorBase, ConfigInspectorLive, ConfigInspectorShape, ConfigurationError, ConfigurationErrorBase, ContentStructureRule$2 as ContentStructureRule, ContributorFootnotesPlugin, DeduplicateItemsPlugin, DependencyAction, DependencyActionSchema, DependencyTable, DependencyTableFormatRule$2 as DependencyTableFormatRule, DependencyTableRow, DependencyTableRowSchema, DependencyTableSchema, DependencyTableType, DependencyTableTypeSchema, DependencyType, DependencyTypeSchema, DependencyUpdate, DependencyUpdateSchema, DepsRegen, DepsRegenBase, DepsRegenDefault, DepsRegenLive, DepsRegenOptions, DepsRegenShape, FileStatus, FileStatusSchema, GitError, GitErrorBase, GitHubApiError, GitHubApiErrorBase, GitHubCommitInfo, GitHubInfo, GitHubInfoSchema, GitHubLive, GitHubService, GitHubServiceBase, GitHubServiceShape, GlobSchema, HeadingHierarchyRule$2 as 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$2 as RequiredSectionsRule, ResolvedPackageScope, ResolvedPackageScopeSchema, ResolvedVersionFile, ResolvedVersionFileSchema, SectionCategory, SectionCategorySchema, SilkChangesetPreset, SilkChangesetTransformPreset, SilkChangesetsRules$1 as SilkChangesetsRules, UncategorizedContentRule$2 as UncategorizedContentRule, UrlOrMarkdownLinkSchema, UsernameSchema, VERSION_RE, VersionFileConfig, VersionFileConfigSchema, VersionFileError, VersionFileErrorBase, VersionFileUpdate, VersionFileUpdateRecordSchema, VersionFiles, VersionFilesSchema, VersionOrEmptySchema, VersionType, VersionTypeSchema, WorkspaceDependencyDiff, WorkspaceVersion, changelogFunctions, computeWorkspaceDependencyDiffs, gitMergeBase, isPureDependencyChangeset, listPublishablePackageNames, makeBranchAnalyzerTest, makeConfigInspectorTest, makeGitHubTest, makeReleasePlannerTest, serializeDependencyTableToMarkdown };
9666
9858
  } //#endregion
9667
9859
  //#region src/commitlint/config/schema.d.ts
9668
9860
  /**