@savvy-web/silk 3.2.2 → 3.2.3

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.
@@ -3296,7 +3296,7 @@ type Label = Label$1;
3296
3296
  type Severity = Severity$1;
3297
3297
  type Plugin<Tree extends Node$3 = Node$3, Option extends unknown = unknown> = (config?: [level: Label | Severity | boolean, option?: Option] | Label | Option | Severity) => ((tree: Tree, file: VFile, next: TransformCallback<Tree>) => undefined) | undefined;
3298
3298
  //#endregion
3299
- //#region ../../node_modules/.pnpm/@effected+git@0.4.2_effect@4.0.0-beta.101/node_modules/@effected/git/index.d.ts
3299
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/index.d.ts
3300
3300
  //#region src/Git.d.ts
3301
3301
  declare const GitCommandError_base: Schema.Class<GitCommandError, Schema.TaggedStruct<"GitCommandError", {
3302
3302
  /**
@@ -3648,6 +3648,65 @@ declare const Git_base: Context.ServiceClass<Git, "@effected/git/Git", GitShape>
3648
3648
  declare class Git extends Git_base {
3649
3649
  /** Resolves `ChildProcessSpawner` once, at construction — every method's `R` is `never`. */
3650
3650
  static readonly layer: Layer.Layer<Git, never, ChildProcessSpawner.ChildProcessSpawner>;
3651
+ /**
3652
+ * An in-memory test double of the service shape: stub only the methods the
3653
+ * test exercises, every other method **dies** with a defect naming itself.
3654
+ *
3655
+ * @remarks
3656
+ * Unlike `WorkspaceDiscovery.makeTest`, **no method here has an honest
3657
+ * default** — the shape is twenty-six unrelated git operations, and a
3658
+ * fabricated answer for any of them (an empty tree, a made-up sha, a silent
3659
+ * no-op `checkout`) would leak into consumer logic as fact. So every
3660
+ * unstubbed method fails loudly as a defect
3661
+ * (`Git.makeTest: <name>() was called but not stubbed`) rather than
3662
+ * succeeding with a lie or failing with a dishonest typed error — which is
3663
+ * also what makes the double a proof that a test touches *nothing but* the
3664
+ * methods it stubbed.
3665
+ *
3666
+ * The double deliberately models **none** of the live service's semantics:
3667
+ * no stderr classification, no option-injection guard (an option-like ref a
3668
+ * stub accepts would be refused live), no `LC_ALL=C` pinning, no timeout,
3669
+ * and no `./`-vs-bare path resolution on `show` — a stub answers exactly
3670
+ * what it is told and nothing else. A suite exercising any of those wants
3671
+ * `Git.layer` over a mocked `ChildProcessSpawner` (or real git) instead.
3672
+ *
3673
+ * @example
3674
+ * ```ts
3675
+ * import { Git } from "@effected/git";
3676
+ * import { Effect, Option } from "effect";
3677
+ *
3678
+ * const double = Git.makeTest({
3679
+ * show: (_cwd, _ref, path) =>
3680
+ * Effect.succeed(path === "./package.json" ? Option.some("{}") : Option.none()),
3681
+ * });
3682
+ * // `double.show(...)` answers; `double.status(...)` dies, named.
3683
+ * ```
3684
+ */
3685
+ static readonly makeTest: (overrides?: Partial<GitShape>) => GitShape;
3686
+ /**
3687
+ * The test layer: {@link Git.makeTest} behind `Layer.succeed`, so a suite
3688
+ * provides only the methods it exercises.
3689
+ *
3690
+ * @remarks
3691
+ * A parameterized layer factory mints a **fresh reference per call**, and
3692
+ * layers memoize by reference — bind the result to a `const` and reuse it
3693
+ * rather than calling `layerTest(...)` at each composition site.
3694
+ *
3695
+ * @example
3696
+ * ```ts
3697
+ * import { Git, LsTreeEntry } from "@effected/git";
3698
+ * import { Effect } from "effect";
3699
+ *
3700
+ * const TestGit = Git.layerTest({
3701
+ * lsTree: () =>
3702
+ * Effect.succeed([
3703
+ * LsTreeEntry.make({ mode: "100644", type: "blob", oid: "0".repeat(40), path: "package.json" }),
3704
+ * ]),
3705
+ * });
3706
+ * // program.pipe(Effect.provide(TestGit))
3707
+ * ```
3708
+ */
3709
+ static readonly layerTest: (overrides?: Partial<GitShape>) => Layer.Layer<Git>;
3651
3710
  }
3652
3711
  //#endregion
3653
3712
  //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/index.d.ts
@@ -4225,7 +4284,7 @@ declare class UnsatisfiableConstraintError extends UnsatisfiableConstraintError_
4225
4284
  get message(): string;
4226
4285
  }
4227
4286
  //#endregion
4228
- //#region ../../node_modules/.pnpm/@effected+npm@0.3.1_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/index.d.ts
4287
+ //#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/index.d.ts
4229
4288
  //#region src/CatalogAssemblyError.d.ts
4230
4289
  declare const CatalogAssemblyError_base: Schema.Class<CatalogAssemblyError, Schema.TaggedStruct<"CatalogAssemblyError", {
4231
4290
  /**
@@ -4567,7 +4626,9 @@ declare class ReleaseAgeGate extends ReleaseAgeGate_base {
4567
4626
  * Combine partial contributions from multiple sources into one effective
4568
4627
  * gate: **strictest age wins** (the maximum of the contributed ages,
4569
4628
  * clamped to be non-negative) and the exclude sets **union** (deduplicated,
4570
- * insertion order preserved). A contribution's absent field adds nothing; a
4629
+ * lexicographically sorted a canonical wire form, so the combined gate is
4630
+ * deterministic regardless of the order contributions arrive in). A
4631
+ * contribution's absent field adds nothing; a
4571
4632
  * negative or non-finite contributed age is ignored by the clamp. With no
4572
4633
  * contributions (or only empty ones) the result is the inert zero gate
4573
4634
  * (`ageMinutes: 0`, `exclude: []`).
@@ -4791,7 +4852,7 @@ declare class GlobPattern extends GlobPattern_base {
4791
4852
  static readonly FromString: Schema.Codec<GlobPattern, string>;
4792
4853
  }
4793
4854
  //#endregion
4794
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.10_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0_baf93f2c33d0504f713f685ac5710e50/node_modules/@effected/lockfiles/index.d.ts
4855
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/index.d.ts
4795
4856
  //#region src/BunExtension.d.ts
4796
4857
  declare const BunExtension_base: Schema.Class<BunExtension, Schema.Struct<{
4797
4858
  readonly _tag: Schema.tag<"bun">;
@@ -4819,6 +4880,7 @@ declare const ImporterDependency_base: Schema.Class<ImporterDependency, Schema.S
4819
4880
  readonly name: Schema.NonEmptyString;
4820
4881
  readonly specifier: Schema.Codec<ClassifiedSpecifier, string, never, never>;
4821
4882
  readonly version: Schema.optionalKey<Schema.String>;
4883
+ readonly peerSuffix: Schema.optionalKey<Schema.String>;
4822
4884
  readonly depType: Schema.Literals<readonly ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"]>;
4823
4885
  }>, {}>;
4824
4886
  /**
@@ -4831,11 +4893,20 @@ declare const ImporterDependency_base: Schema.Class<ImporterDependency, Schema.S
4831
4893
  * `ClassifiedSpecifier` (`catalog:` / `workspace:` / range / dist-tag / raw),
4832
4894
  * while encoding round-trips the **exact original string byte-for-byte** — the
4833
4895
  * guarantee a before/after lockfile diff relies on.
4834
- * - `version` — the concrete resolved version, **populated by pnpm only**. pnpm
4835
- * records `{ specifier, version }` per importer dependency; bun and npm record
4836
- * resolved versions on their package entries instead, so for those formats
4837
- * `version` is absent and a consumer joins by `name` against
4838
- * `Lockfile.packages`.
4896
+ * - `version` — the concrete resolved version, **populated by pnpm only**:
4897
+ * comparable across refs and printable. pnpm records `{ specifier, version }`
4898
+ * per importer dependency, and the parser splits pnpm's peer-disambiguation
4899
+ * suffix off into `peerSuffix`, so `version` is always the plain version or
4900
+ * a non-registry resolution (`link:../utils`, `file:...`), passed through
4901
+ * verbatim. bun and npm record resolved versions on their package entries
4902
+ * instead, so for those formats `version` is absent and a consumer joins by
4903
+ * `name` against `Lockfile.packages`.
4904
+ * - `peerSuffix` — pnpm's peer-disambiguation context: the raw parenthesized
4905
+ * chain the lockfile recorded after the version, e.g.
4906
+ * `(effect@4.0.0-beta.101)(ioredis@5.11.1(supports-color@8.1.1))`. Present
4907
+ * only when the lockfile recorded one — never for suffix-free pnpm entries,
4908
+ * and never for the other formats, which do not record peer context per
4909
+ * importer dependency.
4839
4910
  * - `depType` — which dependency map declared it, spelled with `@effected/npm`'s
4840
4911
  * kit-wide `DependencyField` vocabulary.
4841
4912
  *
@@ -5211,7 +5282,7 @@ declare class LockfileIntegrity extends LockfileIntegrity_base {
5211
5282
  static compare(lockfile: Lockfile, manifests: ReadonlyArray<WorkspaceManifest>): LockfileIntegrity;
5212
5283
  }
5213
5284
  //#endregion
5214
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/index.d.ts
5285
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/index.d.ts
5215
5286
  //#region src/Dependency.d.ts
5216
5287
  declare const Dependency_base: Schema.Class<Dependency, Schema.Struct<{
5217
5288
  /** The package name. */
@@ -5659,7 +5730,7 @@ declare class Package extends Package_base {
5659
5730
  toJsonString(options?: PackageFormatOptions): string;
5660
5731
  }
5661
5732
  //#endregion
5662
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.7.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/index.d.ts
5733
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/index.d.ts
5663
5734
  //#region src/WorkspacePackage.d.ts
5664
5735
  declare const PublishConfig_base: Schema.Class<PublishConfig, Schema.Struct<{
5665
5736
  /** Scoped-package visibility. Its presence overrides `private`. */
@@ -6636,6 +6707,65 @@ declare class LockfileReader extends LockfileReader_base {
6636
6707
  * `const` and reuse it.
6637
6708
  */
6638
6709
  static readonly layer: (options?: LockfileReaderOptions) => Layer.Layer<LockfileReader, never, WorkspaceRoot | PackageManagerDetector | WorkspaceDiscovery | FileSystem.FileSystem | Path.Path>;
6710
+ /**
6711
+ * A test double satisfying the full {@link LockfileReaderShape} with no
6712
+ * filesystem, root walk, or package-manager detection.
6713
+ *
6714
+ * @remarks
6715
+ * There is **no honest default lockfile**: an empty one that looks like a
6716
+ * legitimate answer is indistinguishable from "this workspace resolves
6717
+ * nothing" — the silent-empty failure class this package documents on the
6718
+ * live paths — so `read` **dies** with an instructive defect until stubbed.
6719
+ *
6720
+ * The one derivation mirrors `WorkspaceDiscovery.makeTest`'s
6721
+ * derived-from-the-primary rule: when a `read` override is supplied,
6722
+ * `resolvedVersion` answers as the live service does — the **first** entry
6723
+ * of `lockfile.packagesNamed(name)` in lockfile order, `Option.none()` on a
6724
+ * miss — so the two stay consistent by construction. `integrity` is **not**
6725
+ * derivable: the live method compares the lockfile against the workspace
6726
+ * manifests discovery enumerates, and the double has no discovery to ask, so
6727
+ * it dies unless stubbed.
6728
+ *
6729
+ * `refresh` defaults to `Effect.void` honestly: the live contract is "drop
6730
+ * the memoized read so the next call re-reads", and this double memoizes
6731
+ * nothing — every `read()` call re-invokes the override — so there is
6732
+ * nothing to drop and the no-op is truthful, the same reasoning as
6733
+ * `WorkspaceDiscovery.makeTest`'s `refresh`.
6734
+ *
6735
+ * @example
6736
+ * ```ts
6737
+ * import { Lockfile } from "@effected/lockfiles";
6738
+ * import { LockfileReader } from "@effected/workspaces";
6739
+ * import { Effect } from "effect";
6740
+ *
6741
+ * const double = LockfileReader.makeTest({
6742
+ * read: () =>
6743
+ * Effect.succeed(
6744
+ * Lockfile.make({ format: "pnpm", lockfileVersion: "9.0", packages: [], workspaceDependencies: [] }),
6745
+ * ),
6746
+ * });
6747
+ * // `resolvedVersion` now answers consistently from that lockfile.
6748
+ * ```
6749
+ */
6750
+ static readonly makeTest: (overrides?: Partial<LockfileReaderShape>) => LockfileReaderShape;
6751
+ /**
6752
+ * The test layer: {@link LockfileReader.makeTest} behind `Layer.succeed`, so
6753
+ * a suite provides only the methods it exercises.
6754
+ *
6755
+ * @remarks
6756
+ * A parameterized layer factory mints a **fresh reference per call**, and
6757
+ * layers memoize by reference — bind the result to a `const` and reuse it
6758
+ * rather than calling `layerTest(...)` at each composition site.
6759
+ *
6760
+ * @example
6761
+ * ```ts
6762
+ * import { LockfileReader } from "@effected/workspaces";
6763
+ *
6764
+ * const TestLockfiles = LockfileReader.layerTest();
6765
+ * // program.pipe(Effect.provide(TestLockfiles)) — dies loudly if touched.
6766
+ * ```
6767
+ */
6768
+ static readonly layerTest: (overrides?: Partial<LockfileReaderShape>) => Layer.Layer<LockfileReader>;
6639
6769
  }
6640
6770
  //#endregion
6641
6771
  //#region src/Publishability.d.ts
@@ -6977,6 +7107,61 @@ declare class WorkspaceCatalogs extends WorkspaceCatalogs_base {
6977
7107
  * Parameterized, so bind it to a `const` and reuse it.
6978
7108
  */
6979
7109
  static readonly layerWithConfigDependencies: (options?: WorkspaceCatalogsOptions) => Layer.Layer<WorkspaceCatalogs, never, WorkspaceRoot | LockfileReader | FileSystem.FileSystem | Path.Path>;
7110
+ /**
7111
+ * A test double satisfying the full {@link WorkspaceCatalogsShape} with no
7112
+ * filesystem, lockfile read, or hook replay.
7113
+ *
7114
+ * @remarks
7115
+ * There is **no honest default catalog set**: an empty `CatalogSet` that
7116
+ * looks like a legitimate answer is the "every dependency looks newly added"
7117
+ * failure class the live assembler hard-fails to prevent, so every method
7118
+ * **dies** with an instructive defect until stubbed — a test-wiring mistake
7119
+ * fails loudly as a defect rather than succeeding with a lie or failing with
7120
+ * a dishonest typed error.
7121
+ *
7122
+ * The one derivation mirrors `WorkspaceDiscovery.makeTest`'s
7123
+ * derived-from-the-primary rule: when a `set` override is supplied,
7124
+ * `resolveSpecifier` answers from that `CatalogSet`'s own
7125
+ * {@link CatalogSet.resolveSpecifier} — exactly what the live service runs
7126
+ * over its assembled set — so the two stay consistent by construction.
7127
+ * `releaseAgeGate` and `importerVersions` are **not** derivable from a
7128
+ * catalog set (the gate comes from release-age keys and hook contributions,
7129
+ * the importer index from the lockfile's importer blocks — neither is in a
7130
+ * `CatalogSet`) and always die unless stubbed.
7131
+ *
7132
+ * @example
7133
+ * ```ts
7134
+ * import { CatalogSet, WorkspaceCatalogs } from "@effected/workspaces";
7135
+ * import { Effect } from "effect";
7136
+ *
7137
+ * const double = WorkspaceCatalogs.makeTest({
7138
+ * set: () => Effect.succeed(CatalogSet.fromCatalogs({ default: { effect: "4.0.0" } })),
7139
+ * });
7140
+ * // `resolveSpecifier` now answers consistently from that set.
7141
+ * ```
7142
+ */
7143
+ static readonly makeTest: (overrides?: Partial<WorkspaceCatalogsShape>) => WorkspaceCatalogsShape;
7144
+ /**
7145
+ * The test layer: {@link WorkspaceCatalogs.makeTest} behind `Layer.succeed`,
7146
+ * so a suite provides only the methods it exercises.
7147
+ *
7148
+ * @remarks
7149
+ * A parameterized layer factory mints a **fresh reference per call**, and
7150
+ * layers memoize by reference — bind the result to a `const` and reuse it
7151
+ * rather than calling `layerTest(...)` at each composition site.
7152
+ *
7153
+ * @example
7154
+ * ```ts
7155
+ * import { CatalogSet, WorkspaceCatalogs } from "@effected/workspaces";
7156
+ * import { Effect } from "effect";
7157
+ *
7158
+ * const TestCatalogs = WorkspaceCatalogs.layerTest({
7159
+ * set: () => Effect.succeed(CatalogSet.empty()),
7160
+ * });
7161
+ * // program.pipe(Effect.provide(TestCatalogs))
7162
+ * ```
7163
+ */
7164
+ static readonly layerTest: (overrides?: Partial<WorkspaceCatalogsShape>) => Layer.Layer<WorkspaceCatalogs>;
6980
7165
  /**
6981
7166
  * The real implementation of `@effected/npm`'s `CatalogResolver` contract —
6982
7167
  * the one `@effected/package-json` declares but cannot fill.
@@ -7252,6 +7437,62 @@ declare class WorkspaceSnapshots extends WorkspaceSnapshots_base {
7252
7437
  * `const` and reuse it, or layer memoization does not apply.
7253
7438
  */
7254
7439
  static readonly layer: (options?: WorkspaceSnapshotsOptions) => Layer.Layer<WorkspaceSnapshots, never, Git | WorkspaceRoot | WorkspaceDiscovery | WorkspaceCatalogs>;
7440
+ /**
7441
+ * A test double satisfying the full {@link WorkspaceSnapshotsShape} with no
7442
+ * git, filesystem, discovery, or catalog assembly.
7443
+ *
7444
+ * @remarks
7445
+ * There are **no honest defaults and no derivations** here: `at(ref)` and
7446
+ * `worktree()` are two independent reads of two different sources (a git ref
7447
+ * vs. the live tree), so neither can be honestly derived from the other, and
7448
+ * a fabricated empty {@link WorkspaceStateSnapshot} on either side of a
7449
+ * before/after diff reads as every dependency newly added or removed — the
7450
+ * exact silent-empty failure class this package documents on the live paths.
7451
+ * Both methods therefore **die** with an instructive defect until stubbed; a
7452
+ * test-wiring mistake fails loudly as a defect rather than succeeding with a
7453
+ * lie.
7454
+ *
7455
+ * @example
7456
+ * ```ts
7457
+ * import { CatalogSet, WorkspaceSnapshots, WorkspaceStateSnapshot } from "@effected/workspaces";
7458
+ * import { Effect } from "effect";
7459
+ *
7460
+ * const empty = WorkspaceStateSnapshot.make({
7461
+ * packages: [],
7462
+ * catalogs: CatalogSet.empty(),
7463
+ * importerVersions: {},
7464
+ * });
7465
+ * const double = WorkspaceSnapshots.makeTest({
7466
+ * at: () => Effect.succeed(empty),
7467
+ * worktree: () => Effect.succeed(empty),
7468
+ * });
7469
+ * ```
7470
+ */
7471
+ static readonly makeTest: (overrides?: Partial<WorkspaceSnapshotsShape>) => WorkspaceSnapshotsShape;
7472
+ /**
7473
+ * The test layer: {@link WorkspaceSnapshots.makeTest} behind `Layer.succeed`,
7474
+ * so a suite provides only the methods it exercises.
7475
+ *
7476
+ * @remarks
7477
+ * A parameterized layer factory mints a **fresh reference per call**, and
7478
+ * layers memoize by reference — bind the result to a `const` and reuse it
7479
+ * rather than calling `layerTest(...)` at each composition site.
7480
+ *
7481
+ * @example
7482
+ * ```ts
7483
+ * import { CatalogSet, WorkspaceSnapshots, WorkspaceStateSnapshot } from "@effected/workspaces";
7484
+ * import { Effect } from "effect";
7485
+ *
7486
+ * const TestSnapshots = WorkspaceSnapshots.layerTest({
7487
+ * worktree: () =>
7488
+ * Effect.succeed(
7489
+ * WorkspaceStateSnapshot.make({ packages: [], catalogs: CatalogSet.empty(), importerVersions: {} }),
7490
+ * ),
7491
+ * });
7492
+ * // program.pipe(Effect.provide(TestSnapshots))
7493
+ * ```
7494
+ */
7495
+ static readonly layerTest: (overrides?: Partial<WorkspaceSnapshotsShape>) => Layer.Layer<WorkspaceSnapshots>;
7255
7496
  }
7256
7497
  //#endregion
7257
7498
  //#region src/Workspaces.d.ts