@savvy-web/silk 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changesets-changelog.cjs +4429 -7015
- package/changesets-changelog.d.cts +1129 -938
- package/changesets-changelog.d.ts +1129 -938
- package/changesets-markdownlint.cjs +4429 -7015
- package/changesets-markdownlint.d.cts +1129 -938
- package/changesets-markdownlint.d.ts +1129 -938
- package/package.json +4 -4
- package/packages/silk-effects/dist/dev/pkg/changesets/errors.cjs +45 -0
- package/packages/silk-effects/dist/dev/pkg/changesets/errors.js +44 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/index.cjs +16 -21
- package/packages/silk-effects/dist/dev/pkg/changesets/index.js +8 -11
- package/packages/silk-effects/dist/dev/pkg/changesets/services/config-inspector.cjs +4 -4
- package/packages/silk-effects/dist/dev/pkg/changesets/services/config-inspector.js +1 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.cjs +159 -115
- package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.js +157 -113
- package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.cjs +105 -81
- package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.js +105 -81
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/dep-diff.cjs +81 -47
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/dep-diff.js +81 -47
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/git.cjs +51 -0
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/git.js +51 -0
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/publishability.cjs +16 -4
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/publishability.js +15 -3
- package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfig.cjs +2 -1
- package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfig.js +1 -1
- package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfigReader.cjs +2 -1
- package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfigReader.js +1 -1
- package/packages/silk-effects/dist/dev/pkg/services/SilkPublishability.cjs +15 -11
- package/packages/silk-effects/dist/dev/pkg/services/SilkPublishability.js +5 -2
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/services/workspace-snapshot.cjs +0 -162
- package/packages/silk-effects/dist/dev/pkg/changesets/services/workspace-snapshot.js +0 -160
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/worktree-snapshot.cjs +0 -144
- 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@
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
*
|
|
3334
|
-
*
|
|
3335
|
-
*
|
|
3336
|
-
*
|
|
3328
|
+
//#region ../../node_modules/.pnpm/workspaces-effect@2.0.0_@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
|
-
|
|
3346
|
-
*
|
|
3347
|
-
*
|
|
3348
|
-
*
|
|
3349
|
-
*
|
|
3350
|
-
*
|
|
3351
|
-
*
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
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
|
|
3358
|
-
* (
|
|
3359
|
-
*
|
|
3360
|
-
*
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
readonly
|
|
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
|
-
|
|
3372
|
-
*
|
|
3373
|
-
*
|
|
3374
|
-
*
|
|
3375
|
-
*
|
|
3376
|
-
*
|
|
3377
|
-
*
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
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
|
-
*
|
|
3384
|
-
*
|
|
3385
|
-
* @remarks
|
|
3386
|
-
*
|
|
3387
|
-
*
|
|
3388
|
-
*
|
|
3389
|
-
*
|
|
3390
|
-
*
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
}
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
*
|
|
3402
|
-
*
|
|
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
|
|
3405
|
-
readonly
|
|
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
|
-
|
|
3461
|
-
*
|
|
3462
|
-
*
|
|
3463
|
-
*
|
|
3464
|
-
*
|
|
3465
|
-
*
|
|
3466
|
-
*
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
*
|
|
3476
|
-
*
|
|
3477
|
-
*
|
|
3478
|
-
*
|
|
3479
|
-
*
|
|
3480
|
-
*
|
|
3481
|
-
*
|
|
3482
|
-
*
|
|
3483
|
-
*
|
|
3484
|
-
*
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
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
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
*
|
|
3530
|
-
*
|
|
3531
|
-
* @
|
|
3532
|
-
*
|
|
3533
|
-
*
|
|
3534
|
-
*
|
|
3535
|
-
*
|
|
3536
|
-
*
|
|
3537
|
-
*
|
|
3538
|
-
*
|
|
3539
|
-
*
|
|
3540
|
-
*
|
|
3541
|
-
*
|
|
3542
|
-
*
|
|
3543
|
-
*
|
|
3544
|
-
*
|
|
3545
|
-
*
|
|
3546
|
-
*
|
|
3547
|
-
*
|
|
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
|
|
3561
|
-
readonly
|
|
3562
|
-
readonly
|
|
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
|
-
|
|
3568
|
-
*
|
|
3569
|
-
*
|
|
3570
|
-
*
|
|
3571
|
-
*
|
|
3572
|
-
*
|
|
3573
|
-
*
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
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
|
-
*
|
|
3580
|
-
*
|
|
3581
|
-
* @remarks
|
|
3582
|
-
*
|
|
3583
|
-
*
|
|
3584
|
-
*
|
|
3585
|
-
*
|
|
3586
|
-
*
|
|
3587
|
-
* Fields:
|
|
3588
|
-
* - `
|
|
3589
|
-
* - `
|
|
3590
|
-
*
|
|
3591
|
-
*
|
|
3592
|
-
*
|
|
3593
|
-
*
|
|
3594
|
-
*
|
|
3595
|
-
*
|
|
3596
|
-
*
|
|
3597
|
-
*
|
|
3598
|
-
*
|
|
3599
|
-
*
|
|
3600
|
-
*
|
|
3601
|
-
*
|
|
3602
|
-
*
|
|
3603
|
-
*
|
|
3604
|
-
*
|
|
3605
|
-
*
|
|
3606
|
-
*
|
|
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
|
|
3613
|
-
|
|
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
|
-
|
|
3670
|
-
*
|
|
3671
|
-
*
|
|
3672
|
-
*
|
|
3673
|
-
*
|
|
3674
|
-
*
|
|
3675
|
-
*
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
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
|
|
3682
|
-
*
|
|
3683
|
-
* @remarks
|
|
3684
|
-
* Raised by {@link
|
|
3685
|
-
*
|
|
3686
|
-
*
|
|
3687
|
-
*
|
|
3688
|
-
* Fields:
|
|
3689
|
-
* - `
|
|
3690
|
-
* - `
|
|
3691
|
-
*
|
|
3692
|
-
* @example Catching the error
|
|
3693
|
-
* ```typescript
|
|
3694
|
-
* import { Effect } from "effect";
|
|
3695
|
-
* import type {
|
|
3696
|
-
* import {
|
|
3697
|
-
*
|
|
3698
|
-
* const program = Effect.gen(function* () {
|
|
3699
|
-
* const
|
|
3700
|
-
* return yield*
|
|
3701
|
-
* }).pipe(
|
|
3702
|
-
* Effect.catchTag("
|
|
3703
|
-
* Effect.
|
|
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
|
|
3711
|
-
readonly
|
|
3712
|
-
readonly
|
|
3633
|
+
declare class WorkspaceRootNotFoundError extends WorkspaceRootNotFoundErrorBase<{
|
|
3634
|
+
readonly searchPath: string;
|
|
3635
|
+
readonly reason: string;
|
|
3713
3636
|
}> {
|
|
3714
3637
|
get message(): string;
|
|
3715
|
-
}
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
*
|
|
3719
|
-
*
|
|
3720
|
-
*
|
|
3721
|
-
*
|
|
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
|
-
*
|
|
3889
|
-
*
|
|
3890
|
-
* @remarks
|
|
3891
|
-
*
|
|
3892
|
-
*
|
|
3893
|
-
*
|
|
3894
|
-
*
|
|
3895
|
-
*
|
|
3896
|
-
* - `
|
|
3897
|
-
* - `
|
|
3898
|
-
*
|
|
3899
|
-
*
|
|
3900
|
-
*
|
|
3901
|
-
*
|
|
3902
|
-
*
|
|
3903
|
-
*
|
|
3904
|
-
*
|
|
3905
|
-
*
|
|
3906
|
-
*
|
|
3907
|
-
*
|
|
3908
|
-
*
|
|
3909
|
-
*
|
|
3910
|
-
*
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
* @
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
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
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
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
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
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
|
|
3811
|
+
readonly publishConfig?: PublishConfig | undefined;
|
|
3935
3812
|
} & {
|
|
3936
|
-
readonly
|
|
3813
|
+
readonly dependencies?: {
|
|
3814
|
+
readonly [x: string]: string;
|
|
3815
|
+
} | undefined;
|
|
3937
3816
|
} & {
|
|
3938
|
-
readonly
|
|
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
|
|
3833
|
+
readonly packageJsonPath: string;
|
|
3834
|
+
} & {
|
|
3835
|
+
readonly path: string;
|
|
3836
|
+
} & {
|
|
3837
|
+
readonly relativePath: string;
|
|
3838
|
+
} & {
|
|
3839
|
+
readonly version: string;
|
|
3943
3840
|
}, {}, {}>;
|
|
3944
|
-
/**
|
|
3945
|
-
*
|
|
3946
|
-
*
|
|
3947
|
-
*
|
|
3948
|
-
* package
|
|
3949
|
-
*
|
|
3950
|
-
*
|
|
3951
|
-
*
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
*
|
|
3955
|
-
*
|
|
3956
|
-
*
|
|
3957
|
-
*
|
|
3958
|
-
*
|
|
3959
|
-
*
|
|
3960
|
-
*
|
|
3961
|
-
*
|
|
3962
|
-
*
|
|
3963
|
-
*
|
|
3964
|
-
*
|
|
3965
|
-
*
|
|
3966
|
-
*
|
|
3967
|
-
*
|
|
3968
|
-
*
|
|
3969
|
-
*
|
|
3970
|
-
* @
|
|
3971
|
-
*
|
|
3972
|
-
*
|
|
3973
|
-
*
|
|
3974
|
-
*
|
|
3975
|
-
*
|
|
3976
|
-
*
|
|
3977
|
-
*
|
|
3978
|
-
*
|
|
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
|
-
|
|
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,355 @@ 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
|
-
*
|
|
4275
|
-
*
|
|
4276
|
-
* @
|
|
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
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
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 {@link resolve} call. Treat it as read-only -- mutating
|
|
4177
|
+
* it corrupts resolution for the lifetime of this snapshot.
|
|
4178
|
+
*/
|
|
4179
|
+
get versions(): Record<string, string>;
|
|
4180
|
+
/** Find a package snapshot by name (O(1) after the first call). */
|
|
4181
|
+
package(name: string): Option.Option<PackageStateSnapshot>;
|
|
4182
|
+
/**
|
|
4183
|
+
* Resolve a catalog:/workspace: specifier against THIS snapshot.
|
|
4184
|
+
* `Option.none` for plain specifiers and unresolvable references.
|
|
4185
|
+
*/
|
|
4186
|
+
resolve(dependency: string, specifier: string): Option.Option<string>;
|
|
4187
|
+
} //#endregion
|
|
4188
|
+
//#region src/services/PointInTimeWorkspace.d.ts
|
|
4189
|
+
/**
|
|
4190
|
+
* The umbrella error union covering both {@link PointInTimeWorkspace}
|
|
4191
|
+
* methods: {@link PointInTimeAtError} (raised by `at`) unioned with
|
|
4192
|
+
* {@link PointInTimeWorktreeError} (raised by `worktree`).
|
|
4193
|
+
*
|
|
4194
|
+
* @remarks
|
|
4195
|
+
* - {@link GitReadError} — a `git show`/`git ls-tree` invocation failed for a
|
|
4196
|
+
* reason other than "path absent at this ref" (absent paths degrade to
|
|
4197
|
+
* `Option.none`, never an error). `at`-only.
|
|
4198
|
+
* - {@link CatalogAssemblyError} — the `pnpm-workspace.yaml` at the ref (or on
|
|
4199
|
+
* disk) is malformed YAML. A malformed *lockfile* never fails; it degrades to
|
|
4200
|
+
* an empty catalog set.
|
|
4201
|
+
* - {@link WorkspaceRootNotFoundError} — the workspace root could not be
|
|
4202
|
+
* located walking up from `options.cwd` (or `process.cwd()` when omitted).
|
|
4203
|
+
* - {@link WorkspaceDiscoveryError} — `worktree` failed to enumerate the live
|
|
4204
|
+
* packages via `WorkspaceDiscovery`. `worktree`-only.
|
|
4205
|
+
*
|
|
4206
|
+
* @public
|
|
4207
|
+
*/
|
|
4208
|
+
type PointInTimeReadError = PointInTimeAtError | PointInTimeWorktreeError;
|
|
4209
|
+
/**
|
|
4210
|
+
* Options accepted by both {@link PointInTimeWorkspace} methods.
|
|
4211
|
+
*
|
|
4212
|
+
* @public
|
|
4213
|
+
*/
|
|
4214
|
+
interface PointInTimeOptions {
|
|
4215
|
+
/**
|
|
4216
|
+
* Starting directory for workspace-root resolution. The root is found by
|
|
4217
|
+
* walking UP from here (same semantics as `WorkspaceDiscovery`); when
|
|
4218
|
+
* omitted, resolution starts from `process.cwd()`.
|
|
4219
|
+
*/
|
|
4220
|
+
readonly cwd?: string;
|
|
4327
4221
|
}
|
|
4328
|
-
/**
|
|
4329
|
-
*
|
|
4330
|
-
*
|
|
4331
|
-
*
|
|
4332
|
-
*
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4222
|
+
/**
|
|
4223
|
+
* Errors `at` can raise. `at` never enumerates the live filesystem, so
|
|
4224
|
+
* {@link WorkspaceDiscoveryError} cannot occur.
|
|
4225
|
+
*
|
|
4226
|
+
* @public
|
|
4227
|
+
*/
|
|
4228
|
+
type PointInTimeAtError = GitReadError | CatalogAssemblyError | WorkspaceRootNotFoundError;
|
|
4229
|
+
/**
|
|
4230
|
+
* Errors `worktree` can raise. `worktree` never invokes git, so
|
|
4231
|
+
* {@link GitReadError} cannot occur.
|
|
4232
|
+
*
|
|
4233
|
+
* @public
|
|
4234
|
+
*/
|
|
4235
|
+
type PointInTimeWorktreeError = CatalogAssemblyError | WorkspaceRootNotFoundError | WorkspaceDiscoveryError;
|
|
4236
|
+
declare const PointInTimeWorkspace_base: Context.TagClass<PointInTimeWorkspace, "@spencerbeggs/workspaces-effect/PointInTimeWorkspace", {
|
|
4237
|
+
/**
|
|
4238
|
+
* Workspace state as of a git ref.
|
|
4239
|
+
*
|
|
4240
|
+
* Reads `pnpm-workspace.yaml`, `pnpm-lock.yaml`, and each package's
|
|
4241
|
+
* `package.json` at `ref` via `git show`/`git ls-tree`; packages absent at
|
|
4242
|
+
* the ref are skipped. Cached per `(resolved root, ref)`.
|
|
4243
|
+
*
|
|
4244
|
+
* @param ref - Any git ref (SHA, branch, tag) resolvable in the repo.
|
|
4245
|
+
* @param options - Optional {@link PointInTimeOptions}; `options.cwd` is a
|
|
4246
|
+
* starting directory to walk UP from when resolving the workspace root
|
|
4247
|
+
* (same semantics as `WorkspaceDiscovery`) — when omitted, resolution
|
|
4248
|
+
* starts from `process.cwd()`.
|
|
4249
|
+
* @returns An Effect that succeeds with the {@link WorkspaceStateSnapshot}
|
|
4250
|
+
* at the ref, or fails with {@link PointInTimeAtError}.
|
|
4251
|
+
*/
|
|
4252
|
+
readonly at: (ref: string, options?: PointInTimeOptions) => Effect.Effect<WorkspaceStateSnapshot, PointInTimeAtError>;
|
|
4253
|
+
/**
|
|
4254
|
+
* Workspace state of the live working tree (staged + unstaged edits).
|
|
4255
|
+
*
|
|
4256
|
+
* Enumerates packages via `WorkspaceDiscovery` and reads catalogs from the
|
|
4257
|
+
* on-disk `pnpm-workspace.yaml` and `pnpm-lock.yaml`. Uncached.
|
|
4258
|
+
*
|
|
4259
|
+
* @param options - Optional {@link PointInTimeOptions}; `options.cwd` is a
|
|
4260
|
+
* starting directory to walk UP from when resolving the workspace root
|
|
4261
|
+
* (same semantics as `WorkspaceDiscovery`) — when omitted, resolution
|
|
4262
|
+
* starts from `process.cwd()`.
|
|
4263
|
+
* @returns An Effect that succeeds with the live {@link WorkspaceStateSnapshot},
|
|
4264
|
+
* or fails with {@link PointInTimeWorktreeError}.
|
|
4265
|
+
*/
|
|
4266
|
+
readonly worktree: (options?: PointInTimeOptions) => Effect.Effect<WorkspaceStateSnapshot, PointInTimeWorktreeError>;
|
|
4267
|
+
}>;
|
|
4268
|
+
/**
|
|
4269
|
+
* Service for reading a monorepo's workspace state at a specific moment: any
|
|
4270
|
+
* git ref (via `git show`/`git ls-tree`, without checking the ref out) or the
|
|
4271
|
+
* live working tree (via `WorkspaceDiscovery`).
|
|
4272
|
+
*
|
|
4273
|
+
* @remarks
|
|
4274
|
+
* Each snapshot carries that moment's packages plus its assembled pnpm catalog
|
|
4275
|
+
* set, so `catalog:`/`workspace:` specifiers resolve against the state as it
|
|
4276
|
+
* existed *then* — not against the current working tree. Catalog precedence is
|
|
4277
|
+
* lockfile-then-inline (inline `pnpm-workspace.yaml` catalogs win).
|
|
4278
|
+
*
|
|
4279
|
+
* The live layer ({@link PointInTimeWorkspaceLive}) resolves `WorkspaceRoot`,
|
|
4280
|
+
* `WorkspaceDiscovery`, `CommandExecutor`, `FileSystem`, and `Path` at layer
|
|
4281
|
+
* construction so both methods have `R = never`. Use `WorkspacesFullLive` to
|
|
4282
|
+
* get all wiring handled automatically.
|
|
4283
|
+
*
|
|
4284
|
+
* @privateRemarks
|
|
4285
|
+
* Uses the class-based `Context.Tag` pattern. The internal tag identifier is
|
|
4286
|
+
* `@spencerbeggs/workspaces-effect/PointInTimeWorkspace`.
|
|
4287
|
+
*
|
|
4288
|
+
* @see {@link PointInTimeWorkspaceLive} for the live implementation.
|
|
4289
|
+
*
|
|
4290
|
+
* @public
|
|
4291
|
+
*/
|
|
4292
|
+
declare class PointInTimeWorkspace extends PointInTimeWorkspace_base {} //#endregion
|
|
4293
|
+
//#region src/layers/PointInTimeWorkspaceLive.d.ts
|
|
4294
|
+
/**
|
|
4295
|
+
* Convenience type alias for the {@link PointInTimeWorkspaceLive} layer signature.
|
|
4296
|
+
*
|
|
4297
|
+
* @public
|
|
4298
|
+
*/
|
|
4299
|
+
//#endregion
|
|
4300
|
+
//#region src/schemas/publish.d.ts
|
|
4301
|
+
declare const PublishTarget_base: Schema.Class<PublishTarget, {
|
|
4302
|
+
name: typeof Schema.NonEmptyString;
|
|
4303
|
+
registry: typeof Schema.NonEmptyString;
|
|
4304
|
+
directory: typeof Schema.String;
|
|
4305
|
+
access: Schema.Literal<["public", "restricted"]>;
|
|
4306
|
+
provenance: Schema.optionalWith<typeof Schema.Boolean, {
|
|
4307
|
+
default: () => false;
|
|
4308
|
+
}>;
|
|
4309
|
+
}, Schema.Struct.Encoded<{
|
|
4310
|
+
name: typeof Schema.NonEmptyString;
|
|
4311
|
+
registry: typeof Schema.NonEmptyString;
|
|
4312
|
+
directory: typeof Schema.String;
|
|
4313
|
+
access: Schema.Literal<["public", "restricted"]>;
|
|
4314
|
+
provenance: Schema.optionalWith<typeof Schema.Boolean, {
|
|
4315
|
+
default: () => false;
|
|
4316
|
+
}>;
|
|
4317
|
+
}>, never, {
|
|
4318
|
+
readonly provenance?: boolean | undefined;
|
|
4319
|
+
} & {
|
|
4320
|
+
readonly access: "public" | "restricted";
|
|
4321
|
+
} & {
|
|
4322
|
+
readonly directory: string;
|
|
4323
|
+
} & {
|
|
4324
|
+
readonly name: string;
|
|
4325
|
+
} & {
|
|
4326
|
+
readonly registry: string;
|
|
4327
|
+
}, {}, {}>;
|
|
4328
|
+
/**
|
|
4329
|
+
* A single publish target for a workspace package.
|
|
4330
|
+
*
|
|
4331
|
+
* @remarks
|
|
4332
|
+
* Represents the resolved publishing configuration for a workspace package,
|
|
4333
|
+
* combining defaults with any overrides from the package's `publishConfig`
|
|
4334
|
+
* field. Used to determine where and how each package should be published.
|
|
4335
|
+
*
|
|
4336
|
+
* Fields:
|
|
4337
|
+
* - `name` — the package name (non-empty string).
|
|
4338
|
+
* - `registry` — the target registry URL (e.g., `"https://registry.npmjs.org"`).
|
|
4339
|
+
* - `directory` — the directory to publish (empty string means the package root).
|
|
4340
|
+
* - `access` — `"public"` or `"restricted"` (scoped package visibility).
|
|
4341
|
+
* - `provenance` — whether to publish with provenance attestation (defaults to `false`).
|
|
4342
|
+
*
|
|
4343
|
+
* @example Creating a PublishTarget
|
|
4344
|
+
* ```typescript
|
|
4345
|
+
* import { PublishTarget } from "workspaces-effect";
|
|
4346
|
+
*
|
|
4347
|
+
* const target = new PublishTarget({
|
|
4348
|
+
* name: "@my-org/utils",
|
|
4349
|
+
* registry: "https://registry.npmjs.org",
|
|
4350
|
+
* directory: "dist/npm",
|
|
4351
|
+
* access: "public",
|
|
4352
|
+
* });
|
|
4353
|
+
* ```
|
|
4354
|
+
*
|
|
4355
|
+
* @public
|
|
4356
|
+
*/
|
|
4357
|
+
declare class PublishTarget extends PublishTarget_base {} //#endregion
|
|
4358
|
+
//#region src/services/PublishabilityDetector.d.ts
|
|
4359
|
+
declare const PublishabilityDetector_base: Context.TagClass<PublishabilityDetector, "@spencerbeggs/workspaces-effect/PublishabilityDetector", {
|
|
4360
|
+
/**
|
|
4361
|
+
* Detect publish targets for a workspace package.
|
|
4362
|
+
*
|
|
4363
|
+
* Analyzes the package's `package.json` fields to determine if and where
|
|
4364
|
+
* it can be published.
|
|
4365
|
+
*
|
|
4366
|
+
* @param pkg - The {@link WorkspacePackage} to analyze.
|
|
4367
|
+
* @param root - Absolute path to the workspace root directory.
|
|
4368
|
+
* @returns An Effect that succeeds with a readonly array of
|
|
4369
|
+
* {@link PublishTarget} records. An empty array indicates the package is
|
|
4370
|
+
* not publishable. Never fails.
|
|
4371
|
+
*/
|
|
4372
|
+
readonly detect: (pkg: WorkspacePackage, root: string) => Effect.Effect<ReadonlyArray<PublishTarget>>;
|
|
4373
|
+
}>;
|
|
4374
|
+
/**
|
|
4375
|
+
* Service for detecting whether a workspace package is publishable and
|
|
4376
|
+
* identifying its publish targets (npm, GitHub Packages, etc.).
|
|
4377
|
+
*
|
|
4378
|
+
* Inspects `package.json` fields such as `private`, `publishConfig`, and
|
|
4379
|
+
* `repository` to determine publishability and target registries.
|
|
4380
|
+
*
|
|
4381
|
+
* @remarks
|
|
4382
|
+
* PublishabilityDetector is part of the Configuration and Lockfiles service
|
|
4383
|
+
* group. It is a pure service with no dependencies on other services — it
|
|
4384
|
+
* operates solely on the {@link WorkspacePackage} data and the workspace root
|
|
4385
|
+
* path passed to it.
|
|
4386
|
+
*
|
|
4387
|
+
* A package is considered publishable when `private` is not `true` and it has a
|
|
4388
|
+
* `name` and `version`. The returned {@link PublishTarget} array describes where
|
|
4389
|
+
* the package would be published (e.g., npmjs.org, GitHub Packages) based on
|
|
4390
|
+
* `publishConfig.registry` and other signals.
|
|
4391
|
+
*
|
|
4392
|
+
* The live layer (`PublishabilityDetectorLive`) is a pure layer with no
|
|
4393
|
+
* dependencies — it can be provided standalone or via `WorkspacesLive` /
|
|
4394
|
+
* `WorkspacesFullLive`.
|
|
4395
|
+
*
|
|
4396
|
+
* @privateRemarks
|
|
4397
|
+
* Uses the class-based `Context.Tag` pattern. The internal tag identifier is
|
|
4398
|
+
* `@spencerbeggs/workspaces-effect/PublishabilityDetector`. Since this service
|
|
4399
|
+
* has no dependencies, the layer is constructed with `Layer.succeed` rather than
|
|
4400
|
+
* `Layer.effect`.
|
|
4401
|
+
*
|
|
4402
|
+
* @example Checking publishability of all packages
|
|
4403
|
+
* ```typescript
|
|
4404
|
+
* import { Effect } from "effect";
|
|
4405
|
+
* import { NodeContext } from "@effect/platform-node";
|
|
4406
|
+
* import { PublishabilityDetector, WorkspaceDiscovery, WorkspacesLive } from "workspaces-effect";
|
|
4407
|
+
*
|
|
4408
|
+
* const program = Effect.gen(function* () {
|
|
4409
|
+
* const discovery = yield* WorkspaceDiscovery;
|
|
4410
|
+
* const publishability = yield* PublishabilityDetector;
|
|
4411
|
+
* const packages = yield* discovery.listPackages();
|
|
4412
|
+
*
|
|
4413
|
+
* for (const pkg of packages) {
|
|
4414
|
+
* const targets = yield* publishability.detect(pkg, "/path/to/monorepo");
|
|
4415
|
+
* if (targets.length > 0) {
|
|
4416
|
+
* console.log(`${pkg.name} publishes to:`, targets.map((t) => t.registry));
|
|
4417
|
+
* } else {
|
|
4418
|
+
* console.log(`${pkg.name} is not publishable`);
|
|
4419
|
+
* }
|
|
4420
|
+
* }
|
|
4421
|
+
* });
|
|
4422
|
+
*
|
|
4423
|
+
* Effect.runPromise(
|
|
4424
|
+
* program.pipe(
|
|
4425
|
+
* Effect.provide(WorkspacesLive),
|
|
4426
|
+
* Effect.provide(NodeContext.layer),
|
|
4427
|
+
* )
|
|
4428
|
+
* );
|
|
4429
|
+
* ```
|
|
4430
|
+
*
|
|
4431
|
+
* @public
|
|
4432
|
+
*/
|
|
4433
|
+
declare class PublishabilityDetector extends PublishabilityDetector_base {} //#endregion
|
|
4434
|
+
//#region src/layers/PublishabilityDetectorLive.d.ts
|
|
4435
|
+
/**
|
|
4436
|
+
* Live layer for the {@link PublishabilityDetector} service.
|
|
4437
|
+
*
|
|
4438
|
+
* Determines whether a workspace package is publishable to npm based
|
|
4439
|
+
* on its `private` flag and `publishConfig` settings.
|
|
4440
|
+
*
|
|
4441
|
+
* @remarks
|
|
4442
|
+
* This layer is pure -- it has no dependencies on `FileSystem`, `Path`, or
|
|
4443
|
+
* any other platform services. It uses `Layer.succeed` rather than
|
|
4444
|
+
* `Layer.effect`. Custom layers can override by providing their own
|
|
4445
|
+
* `Layer` for `PublishabilityDetector`.
|
|
4446
|
+
*
|
|
4447
|
+
* @privateRemarks
|
|
4448
|
+
* Builds a single {@link PublishTarget} from `publishConfig` fields,
|
|
4449
|
+
* defaulting to the public npm registry when no registry is specified.
|
|
4450
|
+
*
|
|
4451
|
+
* @example
|
|
4452
|
+
* ```typescript
|
|
4453
|
+
* import { Effect } from "effect";
|
|
4454
|
+
* import { PublishabilityDetector, PublishabilityDetectorLive } from "workspaces-effect";
|
|
4455
|
+
* import { WorkspacePackage } from "workspaces-effect";
|
|
4456
|
+
*
|
|
4457
|
+
* const program = Effect.gen(function* () {
|
|
4458
|
+
* const detector = yield* PublishabilityDetector;
|
|
4459
|
+
* const targets = yield* detector.detect(somePackage, "/path/to/root");
|
|
4460
|
+
* return targets;
|
|
4461
|
+
* });
|
|
4462
|
+
*
|
|
4463
|
+
* Effect.runPromise(
|
|
4464
|
+
* program.pipe(Effect.provide(PublishabilityDetectorLive))
|
|
4465
|
+
* );
|
|
4466
|
+
* ```
|
|
4467
|
+
*
|
|
4468
|
+
* @public
|
|
4469
|
+
*/
|
|
4340
4470
|
//#endregion
|
|
4341
4471
|
//#region ../silk-effects/dist/dev/pkg/index.d.ts
|
|
4342
4472
|
//#region \0rolldown/runtime.js
|
|
@@ -6825,6 +6955,53 @@ declare class GitError extends GitErrorBase<{
|
|
|
6825
6955
|
}> {
|
|
6826
6956
|
get message(): string;
|
|
6827
6957
|
}
|
|
6958
|
+
/**
|
|
6959
|
+
* Base class for {@link ChangesetIOError}.
|
|
6960
|
+
*
|
|
6961
|
+
* @privateRemarks
|
|
6962
|
+
* Effect's `Data.TaggedError` creates an anonymous base class that
|
|
6963
|
+
* api-extractor cannot follow without an explicit export.
|
|
6964
|
+
*
|
|
6965
|
+
* @internal
|
|
6966
|
+
*/
|
|
6967
|
+
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 & {
|
|
6968
|
+
readonly _tag: "ChangesetIOError";
|
|
6969
|
+
} & Readonly<A>;
|
|
6970
|
+
/**
|
|
6971
|
+
* Changeset file I/O failure.
|
|
6972
|
+
*
|
|
6973
|
+
* @remarks
|
|
6974
|
+
* Raised by {@link DepsRegen} when reading, writing, listing, or deleting
|
|
6975
|
+
* `.changeset/*.md` files fails. Deletion failures during
|
|
6976
|
+
* {@link DepsRegenShape.execute} are tolerated (stale changesets are
|
|
6977
|
+
* skip-and-continue, so an interrupted run stays safely re-runnable);
|
|
6978
|
+
* read, list, and write failures are loud.
|
|
6979
|
+
*
|
|
6980
|
+
* @example
|
|
6981
|
+
* ```typescript
|
|
6982
|
+
* import { Effect } from "effect";
|
|
6983
|
+
* import { ChangesetIOError } from "@savvy-web/changesets";
|
|
6984
|
+
*
|
|
6985
|
+
* declare const program: Effect.Effect<void, ChangesetIOError>;
|
|
6986
|
+
*
|
|
6987
|
+
* const handled = program.pipe(
|
|
6988
|
+
* Effect.catchTag("ChangesetIOError", (err) =>
|
|
6989
|
+
* Effect.logError(`changeset ${err.operation} failed at ${err.path}: ${err.reason}`)
|
|
6990
|
+
* ),
|
|
6991
|
+
* );
|
|
6992
|
+
* ```
|
|
6993
|
+
*
|
|
6994
|
+
* @see {@link DepsRegen} which produces these errors during plan/execute
|
|
6995
|
+
*
|
|
6996
|
+
* @public
|
|
6997
|
+
*/
|
|
6998
|
+
declare class ChangesetIOError extends ChangesetIOErrorBase<{
|
|
6999
|
+
/** Absolute path of the file or directory the operation targeted. */readonly path: string; /** The failed operation. */
|
|
7000
|
+
readonly operation: "read" | "write" | "delete" | "list"; /** Human-readable failure reason. */
|
|
7001
|
+
readonly reason: string;
|
|
7002
|
+
}> {
|
|
7003
|
+
get message(): string;
|
|
7004
|
+
}
|
|
6828
7005
|
/**
|
|
6829
7006
|
* Base class for {@link ReleasePlanError}.
|
|
6830
7007
|
*
|
|
@@ -7775,60 +7952,50 @@ declare const ChangelogServiceBase: Context.TagClass<ChangelogService, "Changelo
|
|
|
7775
7952
|
* @public
|
|
7776
7953
|
*/
|
|
7777
7954
|
declare class ChangelogService extends ChangelogServiceBase {} //#endregion
|
|
7778
|
-
//#region src/
|
|
7955
|
+
//#region src/services/ChangesetConfig.d.ts
|
|
7779
7956
|
/**
|
|
7780
|
-
*
|
|
7781
|
-
*
|
|
7957
|
+
* Changeset operating mode for a workspace root.
|
|
7782
7958
|
* @public
|
|
7783
7959
|
*/
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
readonly
|
|
7787
|
-
|
|
7788
|
-
readonly
|
|
7789
|
-
|
|
7790
|
-
readonly
|
|
7791
|
-
|
|
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
|
-
}
|
|
7960
|
+
type ChangesetMode = "silk" | "vanilla" | "none";
|
|
7961
|
+
declare const ChangesetConfig_base: Context.TagClass<ChangesetConfig, "@savvy-web/silk-effects/ChangesetConfig", {
|
|
7962
|
+
readonly mode: (root: string) => Effect.Effect<ChangesetMode>;
|
|
7963
|
+
readonly versionPrivate: (root: string) => Effect.Effect<boolean>;
|
|
7964
|
+
readonly ignorePatterns: (root: string) => Effect.Effect<ReadonlyArray<string>>;
|
|
7965
|
+
readonly isIgnored: (name: string, root: string) => Effect.Effect<boolean>;
|
|
7966
|
+
readonly fixed: (root: string) => Effect.Effect<ReadonlyArray<ReadonlyArray<string>>>;
|
|
7967
|
+
}>;
|
|
7800
7968
|
/**
|
|
7801
|
-
*
|
|
7969
|
+
* Accessor service over a workspace root's `.changeset/config.json`.
|
|
7970
|
+
*
|
|
7971
|
+
* @remarks
|
|
7972
|
+
* Reads through {@link ChangesetConfigReader} (FileSystem-based) with a per-root cache.
|
|
7973
|
+
* Every accessor is total (error channel `never`): a missing or unreadable config collapses
|
|
7974
|
+
* to `mode: "none"` and empty/false defaults.
|
|
7802
7975
|
*
|
|
7976
|
+
* @since 0.4.0
|
|
7803
7977
|
* @public
|
|
7804
7978
|
*/
|
|
7805
|
-
|
|
7979
|
+
declare class ChangesetConfig extends ChangesetConfig_base {
|
|
7806
7980
|
/**
|
|
7807
|
-
*
|
|
7981
|
+
* The one ignore matcher: exact name match, or `@scope/*` wildcard.
|
|
7808
7982
|
*
|
|
7809
|
-
* @
|
|
7810
|
-
*
|
|
7811
|
-
* @returns Effect resolving to one {@link WorkspaceSnapshot} per workspace
|
|
7812
|
-
* package present at that ref, or failing with {@link GitError}
|
|
7983
|
+
* `"@scope/*"` matches `"@scope/anything"` (prefix kept includes the trailing slash),
|
|
7984
|
+
* but not the bare scope `"@scope"`.
|
|
7813
7985
|
*/
|
|
7814
|
-
|
|
7986
|
+
static matches(name: string, pattern: string): boolean;
|
|
7815
7987
|
}
|
|
7816
7988
|
/**
|
|
7817
|
-
* @
|
|
7818
|
-
*/
|
|
7819
|
-
declare const WorkspaceSnapshotReaderBase: Context.TagClass<WorkspaceSnapshotReader, "WorkspaceSnapshotReader", WorkspaceSnapshotReaderShape>;
|
|
7820
|
-
/**
|
|
7821
|
-
* Effect service tag for {@link WorkspaceSnapshotReaderShape}.
|
|
7989
|
+
* Live {@link ChangesetConfig} reading via {@link ChangesetConfigReader}, cached per root.
|
|
7822
7990
|
*
|
|
7823
|
-
* @
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
/**
|
|
7827
|
-
* Production layer for {@link WorkspaceSnapshotReader}.
|
|
7991
|
+
* @remarks
|
|
7992
|
+
* Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide
|
|
7993
|
+
* `ChangesetConfigReaderLive` + a platform layer (`NodeContext.layer`).
|
|
7828
7994
|
*
|
|
7995
|
+
* @since 0.4.0
|
|
7829
7996
|
* @public
|
|
7830
7997
|
*/
|
|
7831
|
-
|
|
7998
|
+
//#endregion
|
|
7832
7999
|
//#region src/changesets/utils/dep-diff.d.ts
|
|
7833
8000
|
/**
|
|
7834
8001
|
* A workspace package's worth of dependency-table rows.
|
|
@@ -7838,38 +8005,26 @@ declare const WorkspaceSnapshotReaderLive: Layer.Layer<WorkspaceSnapshotReader>;
|
|
|
7838
8005
|
interface WorkspaceDependencyDiff {
|
|
7839
8006
|
/** The workspace package whose `package.json` changed. */
|
|
7840
8007
|
readonly package: string;
|
|
7841
|
-
/** Repo-relative path of the package directory (taken from the `after` snapshot
|
|
8008
|
+
/** Repo-relative path of the package directory (taken from the `after` snapshot). */
|
|
7842
8009
|
readonly relativePath: string;
|
|
7843
8010
|
/** One row per dependency change, sorted by the existing `sortDependencyRows` convention. */
|
|
7844
8011
|
readonly rows: ReadonlyArray<DependencyTableRow>;
|
|
7845
8012
|
}
|
|
7846
8013
|
/**
|
|
7847
|
-
* Diff two workspace snapshots and return per-package dependency-table rows
|
|
8014
|
+
* Diff two workspace snapshots and return per-package dependency-table rows,
|
|
8015
|
+
* comparing already-resolved specifier values per side.
|
|
7848
8016
|
*
|
|
7849
|
-
* @param before - Snapshot at the older ref (typically the merge base).
|
|
7850
|
-
*
|
|
7851
|
-
* declared dep is then reported as `"added"`.
|
|
8017
|
+
* @param before - Snapshot at the older ref (typically the merge base). A
|
|
8018
|
+
* workspace package absent here reports every declared dep as `"added"`.
|
|
7852
8019
|
* @param after - Snapshot at the newer ref (typically the working tree).
|
|
7853
8020
|
* @returns One {@link WorkspaceDependencyDiff} entry per workspace package
|
|
7854
|
-
* that has at least one row. Packages with no changes are
|
|
8021
|
+
* that has at least one row. Packages with no resolved-value changes are
|
|
8022
|
+
* omitted.
|
|
7855
8023
|
*
|
|
7856
8024
|
* @public
|
|
7857
8025
|
*/
|
|
7858
|
-
declare function computeWorkspaceDependencyDiffs(
|
|
8026
|
+
declare function computeWorkspaceDependencyDiffs(before: WorkspaceStateSnapshot, after: WorkspaceStateSnapshot): ReadonlyArray<WorkspaceDependencyDiff>; //#endregion
|
|
7859
8027
|
//#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
8028
|
/**
|
|
7874
8029
|
* Strict detection of "pure dependency changesets" per the documented
|
|
7875
8030
|
* rules: single-package frontmatter, single `## Dependencies` heading,
|
|
@@ -7940,7 +8095,7 @@ interface DepsRegenOptions {
|
|
|
7940
8095
|
readonly from?: string;
|
|
7941
8096
|
/**
|
|
7942
8097
|
* Newer ref to diff to. Defaults to the working tree (staged + unstaged
|
|
7943
|
-
* + untracked) via
|
|
8098
|
+
* + untracked) via `PointInTimeWorkspace.worktree`.
|
|
7944
8099
|
*/
|
|
7945
8100
|
readonly to?: string;
|
|
7946
8101
|
}
|
|
@@ -7951,19 +8106,27 @@ interface DepsRegenOptions {
|
|
|
7951
8106
|
*/
|
|
7952
8107
|
interface DepsRegenShape {
|
|
7953
8108
|
/**
|
|
7954
|
-
* Compute a complete {@link RegenPlan}
|
|
8109
|
+
* Compute a complete {@link RegenPlan}. Read-only against the filesystem:
|
|
8110
|
+
* only inspects the existing `.changeset/*.md` files to detect
|
|
8111
|
+
* stale/mixed changesets.
|
|
7955
8112
|
*
|
|
7956
8113
|
* @param options - See {@link DepsRegenOptions}.
|
|
7957
|
-
* @returns An Effect yielding the plan, or failing with {@link GitError}
|
|
8114
|
+
* @returns An Effect yielding the plan, or failing with {@link GitError},
|
|
8115
|
+
* `WorkspaceDiscoveryError`, {@link ChangesetIOError} (an unreadable
|
|
8116
|
+
* `.changeset` directory or a genuinely unreadable changeset file list),
|
|
8117
|
+
* or `PointInTimeReadError` (a snapshot read failed for either ref).
|
|
7958
8118
|
*/
|
|
7959
|
-
readonly plan: (options: DepsRegenOptions) => Effect.Effect<RegenPlan, GitError | WorkspaceDiscoveryError, never>;
|
|
8119
|
+
readonly plan: (options: DepsRegenOptions) => Effect.Effect<RegenPlan, GitError | WorkspaceDiscoveryError | ChangesetIOError | PointInTimeReadError, never>;
|
|
7960
8120
|
/**
|
|
7961
|
-
* Apply a {@link RegenPlan}:
|
|
8121
|
+
* Apply a {@link RegenPlan}: write fresh changesets first, then delete
|
|
8122
|
+
* stale ones. Writes fail loudly with {@link ChangesetIOError}; deletion
|
|
8123
|
+
* failures are tolerated (skip-and-continue) so an interrupted run stays
|
|
8124
|
+
* safely re-runnable.
|
|
7962
8125
|
*
|
|
7963
8126
|
* @param plan - The plan produced by {@link DepsRegenShape.plan}.
|
|
7964
8127
|
* @returns An Effect yielding a {@link RegenResult}.
|
|
7965
8128
|
*/
|
|
7966
|
-
readonly execute: (plan: RegenPlan) => Effect.Effect<RegenResult,
|
|
8129
|
+
readonly execute: (plan: RegenPlan) => Effect.Effect<RegenResult, ChangesetIOError, never>;
|
|
7967
8130
|
}
|
|
7968
8131
|
/**
|
|
7969
8132
|
* @internal
|
|
@@ -7990,13 +8153,42 @@ declare class DepsRegen extends DepsRegenBase {}
|
|
|
7990
8153
|
/**
|
|
7991
8154
|
* Live layer for {@link DepsRegen}.
|
|
7992
8155
|
*
|
|
7993
|
-
* Requires
|
|
7994
|
-
* `
|
|
7995
|
-
*
|
|
8156
|
+
* Requires `PointInTimeWorkspace`, `WorkspaceDiscovery`,
|
|
8157
|
+
* `PublishabilityDetector` (all from `workspaces-effect`),
|
|
8158
|
+
* {@link ConfigInspector}, {@link ChangesetConfig}, and
|
|
8159
|
+
* `FileSystem.FileSystem` (resolved once at construction and closed over by
|
|
8160
|
+
* the shape, keeping `plan`/`execute` themselves requirement-free).
|
|
8161
|
+
*
|
|
8162
|
+
* @public
|
|
8163
|
+
*/
|
|
8164
|
+
declare const DepsRegenLive: Layer.Layer<DepsRegen, never, PointInTimeWorkspace | ConfigInspector | WorkspaceDiscovery | PublishabilityDetector | ChangesetConfig | FileSystem.FileSystem>;
|
|
8165
|
+
/**
|
|
8166
|
+
* Batteries-included {@link DepsRegen} layer: silk's opinionated default
|
|
8167
|
+
* composition of the full dependency graph. Only the platform services
|
|
8168
|
+
* remain — note that {@link PointInTimeWorkspace} reads git history, so
|
|
8169
|
+
* this layer genuinely requires `CommandExecutor` in addition to
|
|
8170
|
+
* `FileSystem`/`Path`: provide a git-capable platform layer
|
|
8171
|
+
* (`NodeContext.layer`), not a bare filesystem-only layer.
|
|
8172
|
+
*
|
|
8173
|
+
* Gating uses silk's adaptive publishability detector
|
|
8174
|
+
* ({@link PublishabilityDetectorAdaptiveLive}), so the default semantics
|
|
8175
|
+
* are "versionable minus ignored" — identical to the savvy CLI and MCP
|
|
8176
|
+
* runtimes. Consumers who need to swap any dependency (test detectors,
|
|
8177
|
+
* alternate config sources) should keep composing {@link DepsRegenLive}
|
|
8178
|
+
* directly; this layer is purely additive.
|
|
8179
|
+
*
|
|
8180
|
+
* @example
|
|
8181
|
+
* ```typescript
|
|
8182
|
+
* import { NodeContext } from "@effect/platform-node";
|
|
8183
|
+
* import { Layer } from "effect";
|
|
8184
|
+
* import { Changesets } from "@savvy-web/silk-effects";
|
|
8185
|
+
*
|
|
8186
|
+
* const depsRegen = Changesets.DepsRegenDefault.pipe(Layer.provide(NodeContext.layer));
|
|
8187
|
+
* ```
|
|
7996
8188
|
*
|
|
7997
8189
|
* @public
|
|
7998
8190
|
*/
|
|
7999
|
-
declare const
|
|
8191
|
+
declare const DepsRegenDefault: Layer.Layer<DepsRegen, never, FileSystem.FileSystem | Path.Path | CommandExecutor.CommandExecutor>; //#endregion
|
|
8000
8192
|
//#region src/changesets/schemas/release-plan.d.ts
|
|
8001
8193
|
/** A semantic-version bump level (the `"none"` plan type is filtered out upstream). @public */
|
|
8002
8194
|
declare const BumpTypeSchema: Schema.Literal<["major", "minor", "patch"]>;
|
|
@@ -8096,8 +8288,8 @@ interface ReleasePlannerShape {
|
|
|
8096
8288
|
declare const ReleasePlannerBase: Context.TagClass<ReleasePlanner, "ReleasePlanner", ReleasePlannerShape>;
|
|
8097
8289
|
/** Effect service tag for the release planner. @public */
|
|
8098
8290
|
declare class ReleasePlanner extends ReleasePlannerBase {}
|
|
8099
|
-
/** Production layer. Requires {@link ConfigInspector} (used by `apply`)
|
|
8100
|
-
declare const ReleasePlannerLive: Layer.Layer<ReleasePlanner, never, ConfigInspector>;
|
|
8291
|
+
/** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */
|
|
8292
|
+
declare const ReleasePlannerLive: Layer.Layer<ReleasePlanner, never, ConfigInspector | FileSystem.FileSystem>;
|
|
8101
8293
|
/**
|
|
8102
8294
|
* Test factory — supply fixed results for any subset of methods. Unsupplied
|
|
8103
8295
|
* methods fail with a `ReleasePlanError`.
|
|
@@ -8771,6 +8963,14 @@ declare const LegacyVersionFilesSchema: Schema.Array$<Schema.Struct<{
|
|
|
8771
8963
|
* @internal
|
|
8772
8964
|
*/
|
|
8773
8965
|
declare function serializeDependencyTableToMarkdown(rows: DependencyTableRow[]): string; //#endregion
|
|
8966
|
+
//#region src/changesets/utils/git.d.ts
|
|
8967
|
+
/**
|
|
8968
|
+
* Run `git merge-base <base> HEAD`, returning the SHA. Errors propagate
|
|
8969
|
+
* as {@link GitError}.
|
|
8970
|
+
*
|
|
8971
|
+
* @internal
|
|
8972
|
+
*/
|
|
8973
|
+
declare function gitMergeBase(cwd: string, base: string): Effect.Effect<string, GitError>; //#endregion
|
|
8774
8974
|
//#region src/changesets/utils/publishability.d.ts
|
|
8775
8975
|
/**
|
|
8776
8976
|
* Compute the set of currently-publishable workspace package names.
|
|
@@ -8779,12 +8979,24 @@ declare function serializeDependencyTableToMarkdown(rows: DependencyTableRow[]):
|
|
|
8779
8979
|
* Uses the currently-active {@link SilkPublishability} — wire the
|
|
8780
8980
|
* {@link SilkPublishabilityDetectorLive} layer to get silk semantics.
|
|
8781
8981
|
*
|
|
8982
|
+
* `root` is passed through verbatim to `detector.detect(pkg, root)` for every
|
|
8983
|
+
* package — it must be the project root (the directory containing
|
|
8984
|
+
* `.changeset/`), NOT the individual package's directory. The vanilla
|
|
8985
|
+
* `PublishabilityDetectorLive` and plain `SilkPublishabilityDetectorLive`
|
|
8986
|
+
* both ignore this argument, but the ignore/mode-aware
|
|
8987
|
+
* `PublishabilityDetectorAdaptiveLive` reads `.changeset/config.json`
|
|
8988
|
+
* relative to it, so passing a package subdirectory silently makes every
|
|
8989
|
+
* package resolve to "not publishable". Mirrors
|
|
8990
|
+
* {@link SilkPublishability.listPublishable}, which takes the same
|
|
8991
|
+
* single-root parameter for the same reason.
|
|
8992
|
+
*
|
|
8782
8993
|
* @param packages - The workspace packages to evaluate
|
|
8994
|
+
* @param root - Absolute path to the project root containing `.changeset/`
|
|
8783
8995
|
* @returns An Effect yielding a `Set` of publishable package names
|
|
8784
8996
|
*
|
|
8785
8997
|
* @public
|
|
8786
8998
|
*/
|
|
8787
|
-
declare function listPublishablePackageNames(packages: ReadonlyArray<WorkspacePackage
|
|
8999
|
+
declare function listPublishablePackageNames(packages: ReadonlyArray<WorkspacePackage>, root: string): Effect.Effect<ReadonlySet<string>, never, PublishabilityDetector>; //#endregion
|
|
8788
9000
|
//#region src/changesets/utils/version-files.d.ts
|
|
8789
9001
|
/**
|
|
8790
9002
|
* Result of a single version file update.
|
|
@@ -8989,27 +9201,6 @@ declare class VersionFiles {
|
|
|
8989
9201
|
*/
|
|
8990
9202
|
static processResolvedVersionFiles(scopes: ReadonlyArray<ResolvedPackageScope>, dryRun?: boolean): VersionFileUpdate[];
|
|
8991
9203
|
} //#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
9204
|
//#region ../../node_modules/.pnpm/micromark-util-types@2.0.2/node_modules/micromark-util-types/index.d.ts
|
|
9014
9205
|
/**
|
|
9015
9206
|
* Enum of allowed token types.
|
|
@@ -9662,7 +9853,7 @@ declare const RequiredSectionsRule$2: Plugin<Root, unknown>; //#endregion
|
|
|
9662
9853
|
//#region src/changesets/remark/rules/uncategorized-content.d.ts
|
|
9663
9854
|
declare const UncategorizedContentRule$2: Plugin<Root, unknown>;
|
|
9664
9855
|
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,
|
|
9856
|
+
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
9857
|
} //#endregion
|
|
9667
9858
|
//#region src/commitlint/config/schema.d.ts
|
|
9668
9859
|
/**
|