@savvy-web/silk 3.2.1 → 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.
@@ -2357,7 +2357,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2357
2357
  }
2358
2358
  };
2359
2359
  //#endregion
2360
- //#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/BunExtension.js
2360
+ //#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/BunExtension.js
2361
2361
  /**
2362
2362
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2363
2363
  * when the format is `"bun"`.
@@ -2378,7 +2378,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
2378
2378
  trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
2379
2379
  }) {};
2380
2380
  //#endregion
2381
- //#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/CatalogResolver.js
2381
+ //#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/CatalogResolver.js
2382
2382
  /**
2383
2383
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2384
2384
  * version ranges.
@@ -2424,7 +2424,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
2424
2424
  static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
2425
2425
  };
2426
2426
  //#endregion
2427
- //#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/WorkspaceResolver.js
2427
+ //#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/WorkspaceResolver.js
2428
2428
  /**
2429
2429
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2430
2430
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2485,7 +2485,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
2485
2485
  static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
2486
2486
  };
2487
2487
  //#endregion
2488
- //#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/CatalogAssemblyError.js
2488
+ //#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/CatalogAssemblyError.js
2489
2489
  /**
2490
2490
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2491
2491
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2529,7 +2529,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
2529
2529
  }
2530
2530
  };
2531
2531
  //#endregion
2532
- //#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/DependencySection.js
2532
+ //#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/DependencySection.js
2533
2533
  /**
2534
2534
  * The short dependency kind: which dependency map an entry came from, named the
2535
2535
  * way consumers branch on it.
@@ -4030,7 +4030,7 @@ const isComparatorSetSubset = (sub, sup) => {
4030
4030
  return true;
4031
4031
  };
4032
4032
  //#endregion
4033
- //#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/DependencySpecifier.js
4033
+ //#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/DependencySpecifier.js
4034
4034
  /**
4035
4035
  * Indicates that a string could not be parsed as a valid dependency specifier.
4036
4036
  *
@@ -4237,7 +4237,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4237
4237
  FromString: fromString
4238
4238
  });
4239
4239
  //#endregion
4240
- //#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/IntegrityHash.js
4240
+ //#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/IntegrityHash.js
4241
4241
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4242
4242
  const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
4243
4243
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
@@ -4290,7 +4290,7 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4290
4290
  decode: decode$2
4291
4291
  });
4292
4292
  //#endregion
4293
- //#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/ReleaseAgeGate.js
4293
+ //#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/ReleaseAgeGate.js
4294
4294
  const MS_PER_MINUTE = 6e4;
4295
4295
  /**
4296
4296
  * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
@@ -4378,7 +4378,9 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
4378
4378
  * Combine partial contributions from multiple sources into one effective
4379
4379
  * gate: **strictest age wins** (the maximum of the contributed ages,
4380
4380
  * clamped to be non-negative) and the exclude sets **union** (deduplicated,
4381
- * insertion order preserved). A contribution's absent field adds nothing; a
4381
+ * lexicographically sorted a canonical wire form, so the combined gate is
4382
+ * deterministic regardless of the order contributions arrive in). A
4383
+ * contribution's absent field adds nothing; a
4382
4384
  * negative or non-finite contributed age is ignored by the clamp. With no
4383
4385
  * contributions (or only empty ones) the result is the inert zero gate
4384
4386
  * (`ageMinutes: 0`, `exclude: []`).
@@ -4392,7 +4394,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
4392
4394
  static combine(...contributions) {
4393
4395
  const ages = contributions.map((contribution) => contribution.ageMinutes).filter((age) => typeof age === "number" && Number.isFinite(age));
4394
4396
  const ageMinutes = ages.length > 0 ? Math.max(0, ...ages) : 0;
4395
- const exclude = [...new Set(contributions.flatMap((contribution) => contribution.exclude ?? []))];
4397
+ const exclude = [...new Set(contributions.flatMap((contribution) => contribution.exclude ?? []))].sort();
4396
4398
  return ReleaseAgeGate.make({
4397
4399
  ageMinutes,
4398
4400
  exclude
@@ -4458,7 +4460,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
4458
4460
  }
4459
4461
  };
4460
4462
  //#endregion
4461
- //#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/ImporterDependency.js
4463
+ //#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/ImporterDependency.js
4462
4464
  /**
4463
4465
  * One declared dependency of one workspace importer, as the lockfile records it.
4464
4466
  *
@@ -4469,11 +4471,20 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
4469
4471
  * `ClassifiedSpecifier` (`catalog:` / `workspace:` / range / dist-tag / raw),
4470
4472
  * while encoding round-trips the **exact original string byte-for-byte** — the
4471
4473
  * guarantee a before/after lockfile diff relies on.
4472
- * - `version` — the concrete resolved version, **populated by pnpm only**. pnpm
4473
- * records `{ specifier, version }` per importer dependency; bun and npm record
4474
- * resolved versions on their package entries instead, so for those formats
4475
- * `version` is absent and a consumer joins by `name` against
4476
- * `Lockfile.packages`.
4474
+ * - `version` — the concrete resolved version, **populated by pnpm only**:
4475
+ * comparable across refs and printable. pnpm records `{ specifier, version }`
4476
+ * per importer dependency, and the parser splits pnpm's peer-disambiguation
4477
+ * suffix off into `peerSuffix`, so `version` is always the plain version or
4478
+ * a non-registry resolution (`link:../utils`, `file:...`), passed through
4479
+ * verbatim. bun and npm record resolved versions on their package entries
4480
+ * instead, so for those formats `version` is absent and a consumer joins by
4481
+ * `name` against `Lockfile.packages`.
4482
+ * - `peerSuffix` — pnpm's peer-disambiguation context: the raw parenthesized
4483
+ * chain the lockfile recorded after the version, e.g.
4484
+ * `(effect@4.0.0-beta.101)(ioredis@5.11.1(supports-color@8.1.1))`. Present
4485
+ * only when the lockfile recorded one — never for suffix-free pnpm entries,
4486
+ * and never for the other formats, which do not record peer context per
4487
+ * importer dependency.
4477
4488
  * - `depType` — which dependency map declared it, spelled with `@effected/npm`'s
4478
4489
  * kit-wide `DependencyField` vocabulary.
4479
4490
  *
@@ -4483,10 +4494,11 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
4483
4494
  name: effect.Schema.NonEmptyString,
4484
4495
  specifier: DependencySpecifier.FromString,
4485
4496
  version: effect.Schema.optionalKey(effect.Schema.String),
4497
+ peerSuffix: effect.Schema.optionalKey(effect.Schema.String),
4486
4498
  depType: DependencyField
4487
4499
  }) {};
4488
4500
  //#endregion
4489
- //#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/LockfileImporter.js
4501
+ //#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/LockfileImporter.js
4490
4502
  /**
4491
4503
  * One workspace importer's declared dependencies, as the lockfile records them.
4492
4504
  *
@@ -4510,7 +4522,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
4510
4522
  dependencies: effect.Schema.Array(ImporterDependency)
4511
4523
  }) {};
4512
4524
  //#endregion
4513
- //#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/ResolvedPackage.js
4525
+ //#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/ResolvedPackage.js
4514
4526
  const EMPTY_DEPENDENCIES = {};
4515
4527
  /**
4516
4528
  * A package resolved from a lockfile.
@@ -4545,7 +4557,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
4545
4557
  dependencies: effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY_DEPENDENCIES)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY_DEPENDENCIES)))
4546
4558
  }) {};
4547
4559
  //#endregion
4548
- //#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/WorkspaceDependency.js
4560
+ //#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/WorkspaceDependency.js
4549
4561
  /**
4550
4562
  * A directed dependency edge between two workspace packages as recorded in
4551
4563
  * the lockfile.
@@ -4567,7 +4579,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
4567
4579
  constraint: effect.Schema.String
4568
4580
  }) {};
4569
4581
  //#endregion
4570
- //#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/PnpmExtension.js
4582
+ //#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/PnpmExtension.js
4571
4583
  /**
4572
4584
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
4573
4585
  * when the format is `"pnpm"`.
@@ -4592,7 +4604,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
4592
4604
  }))
4593
4605
  }) {};
4594
4606
  //#endregion
4595
- //#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/LockfileFormat.js
4607
+ //#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/LockfileFormat.js
4596
4608
  /**
4597
4609
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
4598
4610
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -4626,7 +4638,7 @@ const FILENAMES = {
4626
4638
  */
4627
4639
  const filenameFor = (format) => FILENAMES[format];
4628
4640
  //#endregion
4629
- //#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/internal/shared.js
4641
+ //#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/internal/shared.js
4630
4642
  /**
4631
4643
  * The four dependency sections of a manifest, in a stable order — the shared
4632
4644
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -4665,22 +4677,54 @@ const toIntegrityHash = (raw) => {
4665
4677
  };
4666
4678
  const decodeSpecifier = effect.Schema.decodeUnknownExit(DependencySpecifier.FromString);
4667
4679
  /**
4680
+ * Split pnpm's peer-disambiguation suffix off a recorded string: everything
4681
+ * from the first `(` on is suffix, since package names and versions never
4682
+ * contain `(`. Handles both shapes pnpm records — a bare version
4683
+ * (`"1.0.0(effect@4.0.0)"`, importer entries) and a `name@version` snapshot key
4684
+ * (`"fdir@6.5.0(picomatch@4.0.4)"`). A string with no `(` — including
4685
+ * `link:...` / `file:...` resolutions — passes through untouched. So does a
4686
+ * protocol-bearing string (a `:` ahead of the first `(`), where a parenthesis
4687
+ * is path or URL text rather than a peer suffix: pnpm attaches suffixes to
4688
+ * registry versions only. This is the single stripping implementation — do not
4689
+ * hand-roll an `indexOf("(")` split elsewhere.
4690
+ *
4691
+ * @internal
4692
+ */
4693
+ const splitPeerSuffix = (raw) => {
4694
+ const parenIndex = raw.indexOf("(");
4695
+ if (parenIndex === -1) return { plain: raw };
4696
+ if (raw.lastIndexOf(":", parenIndex) !== -1) return { plain: raw };
4697
+ return {
4698
+ plain: raw.slice(0, parenIndex),
4699
+ peerSuffix: raw.slice(parenIndex)
4700
+ };
4701
+ };
4702
+ /**
4668
4703
  * Build one {@link ImporterDependency}, decoding the raw specifier string into
4669
4704
  * the `@effected/npm` `ClassifiedSpecifier` tagged union. Returns `undefined`
4670
4705
  * — a skip, never a throw — when the name is empty or the specifier does not
4671
4706
  * classify (e.g. an empty specifier), per the total-string-surgery discipline.
4672
4707
  *
4708
+ * A pnpm-recorded version is normalized through {@link splitPeerSuffix}: the
4709
+ * `version` field carries the plain version and the split-off peer chain lands
4710
+ * in `peerSuffix`. A version that is *only* a peer chain (empty plain part) is
4711
+ * treated as no concrete version — a skip of both fields, never a throw.
4712
+ *
4673
4713
  * @internal
4674
4714
  */
4675
4715
  const buildImporterDependency = (name, specifier, depType, version) => {
4676
4716
  if (name === "") return void 0;
4677
4717
  const exit = decodeSpecifier(specifier);
4678
4718
  if (effect.Exit.isFailure(exit)) return void 0;
4719
+ const resolved = version !== void 0 && version !== "" ? splitPeerSuffix(version) : void 0;
4679
4720
  return ImporterDependency.make({
4680
4721
  name,
4681
4722
  specifier: exit.value,
4682
4723
  depType,
4683
- ...version !== void 0 && version !== "" ? { version } : {}
4724
+ ...resolved !== void 0 && resolved.plain !== "" ? {
4725
+ version: resolved.plain,
4726
+ ...resolved.peerSuffix !== void 0 ? { peerSuffix: resolved.peerSuffix } : {}
4727
+ } : {}
4684
4728
  });
4685
4729
  };
4686
4730
  /**
@@ -6525,7 +6569,7 @@ var JsoncModifier = class {
6525
6569
  });
6526
6570
  };
6527
6571
  //#endregion
6528
- //#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/internal/bun.js
6572
+ //#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/internal/bun.js
6529
6573
  const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6530
6574
  const BunWorkspaceEntry = effect.Schema.Struct({
6531
6575
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6618,7 +6662,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
6618
6662
  };
6619
6663
  });
6620
6664
  //#endregion
6621
- //#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/internal/npm.js
6665
+ //#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/internal/npm.js
6622
6666
  const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6623
6667
  const NpmPackageEntry = effect.Schema.Struct({
6624
6668
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6716,7 +6760,7 @@ const toFields$2 = (raw) => effect.Effect.gen(function* () {
6716
6760
  };
6717
6761
  });
6718
6762
  //#endregion
6719
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/YamlNode.js
6763
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/YamlNode.js
6720
6764
  /**
6721
6765
  * YAML scalar presentation styles.
6722
6766
  *
@@ -7118,7 +7162,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
7118
7162
  return null;
7119
7163
  }
7120
7164
  //#endregion
7121
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/diagnostics.js
7165
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/diagnostics.js
7122
7166
  /** Error codes emitted by the lexer stage. */
7123
7167
  const YAML_LEX_ERROR_CODES = [
7124
7168
  "UnexpectedCharacter",
@@ -7196,7 +7240,7 @@ function isFatalCode(code) {
7196
7240
  return FATAL_CODES.has(code);
7197
7241
  }
7198
7242
  //#endregion
7199
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/YamlDiagnostic.js
7243
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/YamlDiagnostic.js
7200
7244
  /**
7201
7245
  * Error codes emitted by the lexer stage.
7202
7246
  *
@@ -7317,7 +7361,7 @@ function lineChar(text, offset) {
7317
7361
  };
7318
7362
  }
7319
7363
  //#endregion
7320
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/anchors.js
7364
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/anchors.js
7321
7365
  /**
7322
7366
  * Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
7323
7367
  * Aliases represent references to existing anchored nodes and cannot have their own anchors.
@@ -7410,7 +7454,7 @@ function collectAnchors(node, anchors) {
7410
7454
  }
7411
7455
  }
7412
7456
  //#endregion
7413
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/lexer.js
7457
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/lexer.js
7414
7458
  /**
7415
7459
  * Create a new YAML scanner for the given source text.
7416
7460
  *
@@ -8367,7 +8411,7 @@ function lexAll(text) {
8367
8411
  return tokens;
8368
8412
  }
8369
8413
  //#endregion
8370
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/cst-parser.js
8414
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/cst-parser.js
8371
8415
  /**
8372
8416
  * Hardening: cap CST nesting so hostile inputs cannot overflow the stack
8373
8417
  * while the tree is being BUILT. Set slightly above the composer's
@@ -9079,7 +9123,7 @@ function parseCSTAll(text) {
9079
9123
  return parseDocuments(lexAll(text), text);
9080
9124
  }
9081
9125
  //#endregion
9082
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/state.js
9126
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/state.js
9083
9127
  let lineStartsText;
9084
9128
  let lineStartsCache = [];
9085
9129
  function getLineStarts(text) {
@@ -9185,7 +9229,7 @@ function exitNesting(state) {
9185
9229
  state.depth--;
9186
9230
  }
9187
9231
  //#endregion
9188
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/tags.js
9232
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/tags.js
9189
9233
  /**
9190
9234
  * Resolve a tag shorthand using the document's %TAG directives.
9191
9235
  * For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
@@ -9271,7 +9315,7 @@ function validateTagHandlesInDocument(docCst, state) {
9271
9315
  }
9272
9316
  }
9273
9317
  //#endregion
9274
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/scalars.js
9318
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/scalars.js
9275
9319
  const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
9276
9320
  const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
9277
9321
  const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
@@ -10149,7 +10193,7 @@ function shouldPreserveRaw(rawValue, value) {
10149
10193
  return false;
10150
10194
  }
10151
10195
  //#endregion
10152
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/block.js
10196
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/block.js
10153
10197
  /**
10154
10198
  * Compose a block map from its CST children, with an optional external first key.
10155
10199
  *
@@ -11297,7 +11341,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
11297
11341
  return map;
11298
11342
  }
11299
11343
  //#endregion
11300
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/flow.js
11344
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/flow.js
11301
11345
  /**
11302
11346
  * Validate that flow collection entries are separated by commas.
11303
11347
  *
@@ -11689,7 +11733,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
11689
11733
  return seq;
11690
11734
  }
11691
11735
  //#endregion
11692
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/document.js
11736
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/document.js
11693
11737
  /** The flow-composer dispatch wired into every state this module creates. */
11694
11738
  const FLOW = {
11695
11739
  composeFlowMap,
@@ -12355,7 +12399,7 @@ function composeAllDocuments(text, options) {
12355
12399
  };
12356
12400
  }
12357
12401
  //#endregion
12358
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/fold.js
12402
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/fold.js
12359
12403
  /**
12360
12404
  * Column-based line folding for a single logical scalar line (YAML 1.2 flow
12361
12405
  * folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
@@ -12591,7 +12635,7 @@ function renderBlockFolded(s, indent) {
12591
12635
  return `>${indentIndicator}${chomp}\n${outputLines.join("\n")}`;
12592
12636
  }
12593
12637
  //#endregion
12594
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/stringifier.js
12638
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/stringifier.js
12595
12639
  /**
12596
12640
  * Thrown by the stringifier on its failure paths (circular references). The
12597
12641
  * facade catches this and materializes the public stringify error.
@@ -13540,7 +13584,7 @@ function deepEqualValues(a, b) {
13540
13584
  return false;
13541
13585
  }
13542
13586
  //#endregion
13543
- //#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/internal/documents.js
13587
+ //#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/internal/documents.js
13544
13588
  /**
13545
13589
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
13546
13590
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -13610,7 +13654,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
13610
13654
  };
13611
13655
  });
13612
13656
  //#endregion
13613
- //#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/internal/pnpm.js
13657
+ //#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/internal/pnpm.js
13614
13658
  const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
13615
13659
  specifier: effect.Schema.String,
13616
13660
  version: effect.Schema.String
@@ -13707,8 +13751,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
13707
13751
  }));
13708
13752
  }
13709
13753
  if (raw.packages) for (const [key, pkg] of Object.entries(raw.packages)) {
13710
- const parenIndex = key.indexOf("(");
13711
- const bare = parenIndex === -1 ? key : key.slice(0, parenIndex);
13754
+ const { plain: bare } = splitPeerSuffix(key);
13712
13755
  const atIndex = bare.lastIndexOf("@");
13713
13756
  if (atIndex <= 0) continue;
13714
13757
  const name = bare.slice(0, atIndex);
@@ -13736,7 +13779,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
13736
13779
  };
13737
13780
  });
13738
13781
  //#endregion
13739
- //#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/internal/yarn.js
13782
+ //#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/internal/yarn.js
13740
13783
  const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
13741
13784
  const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
13742
13785
  const YarnEntry = effect.Schema.Struct({
@@ -13859,7 +13902,7 @@ const cleanYarnDeps = (deps) => {
13859
13902
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
13860
13903
  };
13861
13904
  //#endregion
13862
- //#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/Lockfile.js
13905
+ //#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/Lockfile.js
13863
13906
  const EMPTY_IMPORTERS = [];
13864
13907
  /**
13865
13908
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -14103,7 +14146,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
14103
14146
  }
14104
14147
  };
14105
14148
  //#endregion
14106
- //#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/LockfileIntegrity.js
14149
+ //#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/LockfileIntegrity.js
14107
14150
  /**
14108
14151
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
14109
14152
  * lockfile against: a package name plus the four optional dependency maps.
@@ -14219,7 +14262,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
14219
14262
  }
14220
14263
  };
14221
14264
  //#endregion
14222
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14265
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14223
14266
  /**
14224
14267
  * A resolved dependency entry pairing a package name with its version
14225
14268
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -14283,7 +14326,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
14283
14326
  }
14284
14327
  };
14285
14328
  //#endregion
14286
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14329
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14287
14330
  /**
14288
14331
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
14289
14332
  *
@@ -15838,7 +15881,7 @@ effect.Schema.String.pipe(effect.Schema.decodeTo(SpdxExpressionUnion, effect.Sch
15838
15881
  encode: (expression) => effect.Effect.succeed(serialize$1(expression))
15839
15882
  })));
15840
15883
  //#endregion
15841
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
15884
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
15842
15885
  /**
15843
15886
  * Indicates that a string is not a valid SPDX license identifier or expression.
15844
15887
  *
@@ -15873,7 +15916,7 @@ const isValidSpdx = (value) => {
15873
15916
  */
15874
15917
  const SpdxLicense = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isValidSpdx(value) ? void 0 : "Expected a valid SPDX license expression")), effect.Schema.brand("SpdxLicense"));
15875
15918
  //#endregion
15876
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
15919
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
15877
15920
  const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
15878
15921
  /**
15879
15922
  * The `packageManager` field only ever carries corepack's `<algo>.<hex>`
@@ -15931,7 +15974,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
15931
15974
  }
15932
15975
  };
15933
15976
  //#endregion
15934
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
15977
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
15935
15978
  /**
15936
15979
  * Indicates that a string could not be used as a valid npm package name.
15937
15980
  *
@@ -15989,7 +16032,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
15989
16032
  isScoped
15990
16033
  });
15991
16034
  //#endregion
15992
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16035
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
15993
16036
  const parsePersonString = (input) => {
15994
16037
  const emailMatch = input.match(/<([^>]+)>/);
15995
16038
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -16132,7 +16175,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
16132
16175
  }
16133
16176
  };
16134
16177
  //#endregion
16135
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16178
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16136
16179
  const KEY_INDEX = new Map([
16137
16180
  "$schema",
16138
16181
  "name",
@@ -16355,7 +16398,7 @@ const renderJson = (raw, options) => {
16355
16398
  return options.newline ? `${json}\n` : json;
16356
16399
  };
16357
16400
  //#endregion
16358
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16401
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16359
16402
  const toHashMap = effect.SchemaTransformation.transform({
16360
16403
  decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
16361
16404
  encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
@@ -16673,7 +16716,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
16673
16716
  }
16674
16717
  };
16675
16718
  //#endregion
16676
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspacePackage.js
16719
+ //#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/WorkspacePackage.js
16677
16720
  const EMPTY$1 = Object.freeze(Object.create(null));
16678
16721
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
16679
16722
  /**
@@ -17278,7 +17321,7 @@ const Walker$1 = {
17278
17321
  findRoot: findRoot$1
17279
17322
  };
17280
17323
  //#endregion
17281
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceRoot.js
17324
+ //#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/WorkspaceRoot.js
17282
17325
  /**
17283
17326
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
17284
17327
  *
@@ -17465,7 +17508,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
17465
17508
  static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
17466
17509
  };
17467
17510
  //#endregion
17468
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/limits.js
17511
+ //#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/internal/limits.js
17469
17512
  /**
17470
17513
  * Hard ceiling on directories the enumerator will visit for one pattern set.
17471
17514
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -17483,7 +17526,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
17483
17526
  */
17484
17527
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
17485
17528
  //#endregion
17486
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/traverse.js
17529
+ //#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/internal/traverse.js
17487
17530
  /** Directory names never descended into. */
17488
17531
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
17489
17532
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -17573,7 +17616,7 @@ var Traversal = class {
17573
17616
  }
17574
17617
  };
17575
17618
  //#endregion
17576
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/enumerate.js
17619
+ //#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/internal/enumerate.js
17577
17620
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
17578
17621
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
17579
17622
  /**
@@ -17643,7 +17686,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
17643
17686
  return results;
17644
17687
  });
17645
17688
  //#endregion
17646
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/patterns.js
17689
+ //#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/internal/patterns.js
17647
17690
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
17648
17691
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
17649
17692
  const pnpmPatternsOf = (document) => {
@@ -17700,7 +17743,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
17700
17743
  return manifestPatternsOf(manifest);
17701
17744
  });
17702
17745
  //#endregion
17703
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceDiscovery.js
17746
+ //#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/WorkspaceDiscovery.js
17704
17747
  /**
17705
17748
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
17706
17749
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -18134,7 +18177,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
18134
18177
  };
18135
18178
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
18136
18179
  //#endregion
18137
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/DependencyGraph.js
18180
+ //#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/DependencyGraph.js
18138
18181
  /**
18139
18182
  * Raised when the workspace dependency graph cannot be topologically ordered
18140
18183
  * because it contains a cycle.
@@ -18369,7 +18412,7 @@ const kahn = (edges) => {
18369
18412
  };
18370
18413
  };
18371
18414
  //#endregion
18372
- //#region ../../node_modules/.pnpm/@effected+git@0.4.2_effect@4.0.0-beta.101/node_modules/@effected/git/GitCommand.js
18415
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/GitCommand.js
18373
18416
  /**
18374
18417
  * Builds a `git` `ChildProcess.StandardCommand` with the argv this package
18375
18418
  * classifies against.
@@ -18788,7 +18831,7 @@ const GitCommand = {
18788
18831
  status
18789
18832
  };
18790
18833
  //#endregion
18791
- //#region ../../node_modules/.pnpm/@effected+git@0.4.2_effect@4.0.0-beta.101/node_modules/@effected/git/internal/run.js
18834
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/internal/run.js
18792
18835
  /**
18793
18836
  * Spawns `command` and collects its stdout, stderr, and exit code as a single
18794
18837
  * triple.
@@ -18815,7 +18858,7 @@ const runCollected = (command) => effect.Effect.scoped(effect.Effect.gen(functio
18815
18858
  };
18816
18859
  }));
18817
18860
  //#endregion
18818
- //#region ../../node_modules/.pnpm/@effected+git@0.4.2_effect@4.0.0-beta.101/node_modules/@effected/git/Git.js
18861
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/Git.js
18819
18862
  /** git's own ceiling: a run that has not answered in 30s is not going to. */
18820
18863
  const GIT_TIMEOUT = effect.Duration.seconds(30);
18821
18864
  /**
@@ -19702,6 +19745,12 @@ const make = (spawner) => {
19702
19745
  };
19703
19746
  };
19704
19747
  /**
19748
+ * The default for every {@link Git.makeTest} method a test did not stub: a
19749
+ * defect naming the method, so an unexercised call fails loudly instead of
19750
+ * succeeding with a lie or failing with a dishonest typed error.
19751
+ */
19752
+ const notStubbed = (method) => () => effect.Effect.die(/* @__PURE__ */ new Error(`Git.makeTest: ${method}() was called but not stubbed — no honest default exists for a test double; pass a \`${method}\` override.`));
19753
+ /**
19705
19754
  * Typed git introspection over core's `ChildProcessSpawner`: read a
19706
19755
  * repository's state at any ref without checking it out, plus the mutating
19707
19756
  * tier (`checkout`, `fetch`, `fetchAny`, `submoduleUpdate`, `submoduleAdd`,
@@ -19724,15 +19773,102 @@ const make = (spawner) => {
19724
19773
  *
19725
19774
  * @public
19726
19775
  */
19727
- var Git = class extends effect.Context.Service()("@effected/git/Git") {
19776
+ var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
19728
19777
  /** Resolves `ChildProcessSpawner` once, at construction — every method's `R` is `never`. */
19729
19778
  static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
19730
19779
  const spawner = yield* effect_unstable_process.ChildProcessSpawner.ChildProcessSpawner;
19731
19780
  return make(spawner);
19732
19781
  }));
19782
+ /**
19783
+ * An in-memory test double of the service shape: stub only the methods the
19784
+ * test exercises, every other method **dies** with a defect naming itself.
19785
+ *
19786
+ * @remarks
19787
+ * Unlike `WorkspaceDiscovery.makeTest`, **no method here has an honest
19788
+ * default** — the shape is twenty-six unrelated git operations, and a
19789
+ * fabricated answer for any of them (an empty tree, a made-up sha, a silent
19790
+ * no-op `checkout`) would leak into consumer logic as fact. So every
19791
+ * unstubbed method fails loudly as a defect
19792
+ * (`Git.makeTest: <name>() was called but not stubbed`) rather than
19793
+ * succeeding with a lie or failing with a dishonest typed error — which is
19794
+ * also what makes the double a proof that a test touches *nothing but* the
19795
+ * methods it stubbed.
19796
+ *
19797
+ * The double deliberately models **none** of the live service's semantics:
19798
+ * no stderr classification, no option-injection guard (an option-like ref a
19799
+ * stub accepts would be refused live), no `LC_ALL=C` pinning, no timeout,
19800
+ * and no `./`-vs-bare path resolution on `show` — a stub answers exactly
19801
+ * what it is told and nothing else. A suite exercising any of those wants
19802
+ * `Git.layer` over a mocked `ChildProcessSpawner` (or real git) instead.
19803
+ *
19804
+ * @example
19805
+ * ```ts
19806
+ * import { Git } from "@effected/git";
19807
+ * import { Effect, Option } from "effect";
19808
+ *
19809
+ * const double = Git.makeTest({
19810
+ * show: (_cwd, _ref, path) =>
19811
+ * Effect.succeed(path === "./package.json" ? Option.some("{}") : Option.none()),
19812
+ * });
19813
+ * // `double.show(...)` answers; `double.status(...)` dies, named.
19814
+ * ```
19815
+ */
19816
+ static makeTest = (overrides = {}) => ({
19817
+ show: notStubbed("show"),
19818
+ lsTree: notStubbed("lsTree"),
19819
+ refExists: notStubbed("refExists"),
19820
+ mergeBase: notStubbed("mergeBase"),
19821
+ changedFiles: notStubbed("changedFiles"),
19822
+ workingChanges: notStubbed("workingChanges"),
19823
+ revParse: notStubbed("revParse"),
19824
+ checkout: notStubbed("checkout"),
19825
+ fetch: notStubbed("fetch"),
19826
+ fetchAny: notStubbed("fetchAny"),
19827
+ submoduleUpdate: notStubbed("submoduleUpdate"),
19828
+ submoduleAdd: notStubbed("submoduleAdd"),
19829
+ sparseCheckoutSet: notStubbed("sparseCheckoutSet"),
19830
+ configSet: notStubbed("configSet"),
19831
+ add: notStubbed("add"),
19832
+ nameStatus: notStubbed("nameStatus"),
19833
+ unstagedChanges: notStubbed("unstagedChanges"),
19834
+ stagedChanges: notStubbed("stagedChanges"),
19835
+ untrackedFiles: notStubbed("untrackedFiles"),
19836
+ defaultBranch: notStubbed("defaultBranch"),
19837
+ currentBranch: notStubbed("currentBranch"),
19838
+ repoRoot: notStubbed("repoRoot"),
19839
+ configGet: notStubbed("configGet"),
19840
+ remoteUrl: notStubbed("remoteUrl"),
19841
+ commitInfo: notStubbed("commitInfo"),
19842
+ status: notStubbed("status"),
19843
+ ...overrides
19844
+ });
19845
+ /**
19846
+ * The test layer: {@link Git.makeTest} behind `Layer.succeed`, so a suite
19847
+ * provides only the methods it exercises.
19848
+ *
19849
+ * @remarks
19850
+ * A parameterized layer factory mints a **fresh reference per call**, and
19851
+ * layers memoize by reference — bind the result to a `const` and reuse it
19852
+ * rather than calling `layerTest(...)` at each composition site.
19853
+ *
19854
+ * @example
19855
+ * ```ts
19856
+ * import { Git, LsTreeEntry } from "@effected/git";
19857
+ * import { Effect } from "effect";
19858
+ *
19859
+ * const TestGit = Git.layerTest({
19860
+ * lsTree: () =>
19861
+ * Effect.succeed([
19862
+ * LsTreeEntry.make({ mode: "100644", type: "blob", oid: "0".repeat(40), path: "package.json" }),
19863
+ * ]),
19864
+ * });
19865
+ * // program.pipe(Effect.provide(TestGit))
19866
+ * ```
19867
+ */
19868
+ static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
19733
19869
  };
19734
19870
  //#endregion
19735
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ChangeDetector.js
19871
+ //#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/ChangeDetector.js
19736
19872
  /**
19737
19873
  * Which git refs to compare, and whether to fold in the working tree.
19738
19874
  *
@@ -19984,7 +20120,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
19984
20120
  };
19985
20121
  }
19986
20122
  //#endregion
19987
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/catalogs.js
20123
+ //#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/internal/catalogs.js
19988
20124
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
19989
20125
  const inlineCatalogs = (manifest) => {
19990
20126
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -20048,7 +20184,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
20048
20184
  });
20049
20185
  };
20050
20186
  //#endregion
20051
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ConfigDependencyHooks.js
20187
+ //#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/ConfigDependencyHooks.js
20052
20188
  /** Whether `value` is a non-null, non-array object. */
20053
20189
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
20054
20190
  /**
@@ -20234,7 +20370,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
20234
20370
  }) });
20235
20371
  };
20236
20372
  //#endregion
20237
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/PackageManagerName.js
20373
+ //#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/PackageManagerName.js
20238
20374
  /**
20239
20375
  * The four package managers this package understands.
20240
20376
  *
@@ -20476,7 +20612,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
20476
20612
  static layer = effect.Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
20477
20613
  };
20478
20614
  //#endregion
20479
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/LockfileReader.js
20615
+ //#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/LockfileReader.js
20480
20616
  /**
20481
20617
  * Raised when the workspace's lockfile cannot be read off disk.
20482
20618
  *
@@ -20499,6 +20635,8 @@ var LockfileReadError = class extends effect.Schema.TaggedErrorClass()("Lockfile
20499
20635
  return `Cannot read ${this.format} lockfile at ${this.lockfilePath}`;
20500
20636
  }
20501
20637
  };
20638
+ /** A defect naming the unstubbed test-double method — a test-wiring mistake, not a typed failure. */
20639
+ const unstubbed$2 = (method) => effect.Effect.die(/* @__PURE__ */ new Error(`LockfileReader.makeTest: ${method}() was called but not stubbed — pass a \`${method}\` override.`));
20502
20640
  /**
20503
20641
  * Reads and parses the workspace's lockfile.
20504
20642
  *
@@ -20584,9 +20722,77 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
20584
20722
  * `const` and reuse it.
20585
20723
  */
20586
20724
  static layer = (options) => effect.Layer.effect(LockfileReader, LockfileReader.make(options));
20725
+ /**
20726
+ * A test double satisfying the full {@link LockfileReaderShape} with no
20727
+ * filesystem, root walk, or package-manager detection.
20728
+ *
20729
+ * @remarks
20730
+ * There is **no honest default lockfile**: an empty one that looks like a
20731
+ * legitimate answer is indistinguishable from "this workspace resolves
20732
+ * nothing" — the silent-empty failure class this package documents on the
20733
+ * live paths — so `read` **dies** with an instructive defect until stubbed.
20734
+ *
20735
+ * The one derivation mirrors `WorkspaceDiscovery.makeTest`'s
20736
+ * derived-from-the-primary rule: when a `read` override is supplied,
20737
+ * `resolvedVersion` answers as the live service does — the **first** entry
20738
+ * of `lockfile.packagesNamed(name)` in lockfile order, `Option.none()` on a
20739
+ * miss — so the two stay consistent by construction. `integrity` is **not**
20740
+ * derivable: the live method compares the lockfile against the workspace
20741
+ * manifests discovery enumerates, and the double has no discovery to ask, so
20742
+ * it dies unless stubbed.
20743
+ *
20744
+ * `refresh` defaults to `Effect.void` honestly: the live contract is "drop
20745
+ * the memoized read so the next call re-reads", and this double memoizes
20746
+ * nothing — every `read()` call re-invokes the override — so there is
20747
+ * nothing to drop and the no-op is truthful, the same reasoning as
20748
+ * `WorkspaceDiscovery.makeTest`'s `refresh`.
20749
+ *
20750
+ * @example
20751
+ * ```ts
20752
+ * import { Lockfile } from "@effected/lockfiles";
20753
+ * import { LockfileReader } from "@effected/workspaces";
20754
+ * import { Effect } from "effect";
20755
+ *
20756
+ * const double = LockfileReader.makeTest({
20757
+ * read: () =>
20758
+ * Effect.succeed(
20759
+ * Lockfile.make({ format: "pnpm", lockfileVersion: "9.0", packages: [], workspaceDependencies: [] }),
20760
+ * ),
20761
+ * });
20762
+ * // `resolvedVersion` now answers consistently from that lockfile.
20763
+ * ```
20764
+ */
20765
+ static makeTest = (overrides = {}) => {
20766
+ const read = overrides.read;
20767
+ return {
20768
+ read: () => unstubbed$2("read"),
20769
+ resolvedVersion: read !== void 0 ? (packageName) => effect.Effect.map(read(), (lockfile) => effect.Option.fromUndefinedOr(lockfile.packagesNamed(packageName)[0])) : () => unstubbed$2("resolvedVersion"),
20770
+ integrity: () => unstubbed$2("integrity"),
20771
+ refresh: () => effect.Effect.void,
20772
+ ...overrides
20773
+ };
20774
+ };
20775
+ /**
20776
+ * The test layer: {@link LockfileReader.makeTest} behind `Layer.succeed`, so
20777
+ * a suite provides only the methods it exercises.
20778
+ *
20779
+ * @remarks
20780
+ * A parameterized layer factory mints a **fresh reference per call**, and
20781
+ * layers memoize by reference — bind the result to a `const` and reuse it
20782
+ * rather than calling `layerTest(...)` at each composition site.
20783
+ *
20784
+ * @example
20785
+ * ```ts
20786
+ * import { LockfileReader } from "@effected/workspaces";
20787
+ *
20788
+ * const TestLockfiles = LockfileReader.layerTest();
20789
+ * // program.pipe(Effect.provide(TestLockfiles)) — dies loudly if touched.
20790
+ * ```
20791
+ */
20792
+ static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
20587
20793
  };
20588
20794
  //#endregion
20589
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Publishability.js
20795
+ //#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/Publishability.js
20590
20796
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
20591
20797
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
20592
20798
  /**
@@ -20686,7 +20892,93 @@ var PublishabilityDetector = class PublishabilityDetector extends effect.Context
20686
20892
  }) });
20687
20893
  };
20688
20894
  //#endregion
20689
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceCatalogs.js
20895
+ //#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/internal/importerVersions.js
20896
+ /**
20897
+ * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
20898
+ *
20899
+ * pnpm records an importer version as the resolved version followed by the peer
20900
+ * context it was resolved under — `4.0.0-beta.101(effect@4.0.0-beta.101)(ioredis@5.11.1(supports-color@8.1.1))`.
20901
+ * `@effected/lockfiles` stores that string verbatim (its `packages:` key parser
20902
+ * strips the suffix; the importer entries deliberately keep it), so the raw
20903
+ * value must never reach a consumer's dependency table — it would render the
20904
+ * whole parenthesized chain as the "version" a dependency moved to.
20905
+ *
20906
+ * Everything from the first `(` is dropped; a version with no suffix passes
20907
+ * through untouched.
20908
+ */
20909
+ const stripPeerSuffix = (version) => {
20910
+ const paren = version.indexOf("(");
20911
+ return paren === -1 ? version : version.slice(0, paren);
20912
+ };
20913
+ /**
20914
+ * Whether a recorded importer version is a concrete version usable as a
20915
+ * resolution answer.
20916
+ *
20917
+ * A `link:` / `file:` entry records a filesystem edge rather than a version, and
20918
+ * an empty string is pnpm's "specifier only, nothing installed" marker. Both
20919
+ * would be worse than no answer at all: the fallback exists to report a concrete
20920
+ * version movement, and reporting `link:../foo` as a version is noise a
20921
+ * changeset would carry into release notes.
20922
+ */
20923
+ const isConcreteVersion = (version) => version.length > 0 && !version.startsWith("link:") && !version.startsWith("file:");
20924
+ /**
20925
+ * Build the importer-path → dependency-name → version index a snapshot uses to
20926
+ * answer `catalog:` specifiers its catalog set cannot resolve.
20927
+ *
20928
+ * @remarks
20929
+ * Keyed by **name only** within each importer, deliberately across every
20930
+ * dependency field. The bug this fixes is a peer declared `catalog:effect:peers`
20931
+ * whose importer records no `peerDependencies` entry at all — pnpm writes peer
20932
+ * declarations into the importer block only when they are also installed, so the
20933
+ * concrete version lives on the package's `devDependencies` row for the same
20934
+ * name. Joining by name across fields is what finds it; joining by field, or by
20935
+ * matching the recorded specifier, would not.
20936
+ *
20937
+ * Only pnpm populates importer versions; bun and npm record resolved versions on
20938
+ * their package entries instead, so those formats yield an empty index and the
20939
+ * fallback is inert for them.
20940
+ */
20941
+ const importerVersionsOf = (lockfile) => {
20942
+ const index = Object.create(null);
20943
+ for (const importer of lockfile.importers) {
20944
+ const versions = Object.create(null);
20945
+ for (const dependency of importer.dependencies) {
20946
+ const recorded = dependency.version;
20947
+ if (recorded === void 0) continue;
20948
+ const version = stripPeerSuffix(recorded);
20949
+ if (!isConcreteVersion(version)) continue;
20950
+ versions[dependency.name] ??= version;
20951
+ }
20952
+ index[importer.path] = versions;
20953
+ }
20954
+ return index;
20955
+ };
20956
+ /**
20957
+ * The version every importer agrees `dependency` resolved to, or `undefined`
20958
+ * when they disagree or none record it.
20959
+ *
20960
+ * @remarks
20961
+ * The unambiguity rule is what makes a workspace-wide answer safe from a
20962
+ * snapshot method that receives no importer context. Two packages in one
20963
+ * monorepo may legitimately hold different versions of the same dependency; in
20964
+ * that case there is no single correct answer, so this yields nothing and the
20965
+ * caller keeps today's behavior (no row) rather than inventing a wrong one.
20966
+ */
20967
+ const unanimousVersionOf = (index, dependency) => {
20968
+ let agreed;
20969
+ for (const versions of Object.values(index)) {
20970
+ const version = versions[dependency];
20971
+ if (version === void 0) continue;
20972
+ if (agreed === void 0) {
20973
+ agreed = version;
20974
+ continue;
20975
+ }
20976
+ if (agreed !== version) return void 0;
20977
+ }
20978
+ return agreed;
20979
+ };
20980
+ //#endregion
20981
+ //#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/WorkspaceCatalogs.js
20690
20982
  /**
20691
20983
  * An immutable, fully-normalized catalog collection — the one catalog
20692
20984
  * resolution semantic in the package.
@@ -20962,6 +21254,8 @@ const validatePnpmWorkspaceCatalogs = (document) => {
20962
21254
  catalogs: "catalogs"
20963
21255
  }));
20964
21256
  };
21257
+ /** A defect naming the unstubbed test-double method — a test-wiring mistake, not a typed failure. */
21258
+ const unstubbed$1 = (method) => effect.Effect.die(/* @__PURE__ */ new Error(`WorkspaceCatalogs.makeTest: ${method}() was called but not stubbed — pass a \`${method}\` override.`));
20965
21259
  /**
20966
21260
  * Assembles a workspace's catalogs, package-manager-aware.
20967
21261
  *
@@ -21005,7 +21299,15 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
21005
21299
  }));
21006
21300
  const assemble = effect.Effect.gen(function* () {
21007
21301
  const root = yield* effect.Effect.suspend(() => roots.find(options?.cwd ?? process.cwd()));
21008
- const fromLockfile = yield* lockfiles.read().pipe(effect.Effect.map(CatalogSet.fromLockfile), effect.Effect.catch((_failure) => effect.Effect.succeed(CatalogSet.empty())));
21302
+ const lockfileOutputs = yield* lockfiles.read().pipe(effect.Effect.map((lockfile) => ({
21303
+ catalogs: CatalogSet.fromLockfile(lockfile),
21304
+ importerVersions: importerVersionsOf(lockfile)
21305
+ })), effect.Effect.catch((_failure) => effect.Effect.succeed({
21306
+ catalogs: CatalogSet.empty(),
21307
+ importerVersions: {}
21308
+ })));
21309
+ const fromLockfile = lockfileOutputs.catalogs;
21310
+ const importerVersions = lockfileOutputs.importerVersions;
21009
21311
  const workspaceYaml = path.join(root, "pnpm-workspace.yaml");
21010
21312
  const hasPnpmWorkspace = yield* probeExists(workspaceYaml);
21011
21313
  let inline;
@@ -21033,7 +21335,8 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
21033
21335
  const manifestPath = path.join(root, "package.json");
21034
21336
  if (!(yield* probeExists(manifestPath))) return {
21035
21337
  catalogs: fromLockfile,
21036
- releaseAgeGate: ReleaseAgeGate.combine()
21338
+ releaseAgeGate: ReleaseAgeGate.combine(),
21339
+ importerVersions
21037
21340
  };
21038
21341
  const text = yield* fs.readFileString(manifestPath).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
21039
21342
  source: "manifest",
@@ -21052,7 +21355,8 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
21052
21355
  }));
21053
21356
  return {
21054
21357
  catalogs: assembled,
21055
- releaseAgeGate
21358
+ releaseAgeGate,
21359
+ importerVersions
21056
21360
  };
21057
21361
  });
21058
21362
  const [resolveOnce, invalidate] = yield* effect.Effect.cachedInvalidateWithTTL(assemble, effect.Duration.infinity);
@@ -21066,6 +21370,9 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
21066
21370
  }),
21067
21371
  releaseAgeGate: effect.Effect.fn("WorkspaceCatalogs.releaseAgeGate")(function* () {
21068
21372
  return (yield* memo).releaseAgeGate;
21373
+ }),
21374
+ importerVersions: effect.Effect.fn("WorkspaceCatalogs.importerVersions")(function* () {
21375
+ return (yield* memo).importerVersions;
21069
21376
  })
21070
21377
  };
21071
21378
  });
@@ -21092,6 +21399,70 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
21092
21399
  */
21093
21400
  static layerWithConfigDependencies = (options) => effect.Layer.effect(WorkspaceCatalogs, WorkspaceCatalogs.make(options)).pipe(effect.Layer.provide(ConfigDependencyHooks.layerLive));
21094
21401
  /**
21402
+ * A test double satisfying the full {@link WorkspaceCatalogsShape} with no
21403
+ * filesystem, lockfile read, or hook replay.
21404
+ *
21405
+ * @remarks
21406
+ * There is **no honest default catalog set**: an empty `CatalogSet` that
21407
+ * looks like a legitimate answer is the "every dependency looks newly added"
21408
+ * failure class the live assembler hard-fails to prevent, so every method
21409
+ * **dies** with an instructive defect until stubbed — a test-wiring mistake
21410
+ * fails loudly as a defect rather than succeeding with a lie or failing with
21411
+ * a dishonest typed error.
21412
+ *
21413
+ * The one derivation mirrors `WorkspaceDiscovery.makeTest`'s
21414
+ * derived-from-the-primary rule: when a `set` override is supplied,
21415
+ * `resolveSpecifier` answers from that `CatalogSet`'s own
21416
+ * {@link CatalogSet.resolveSpecifier} — exactly what the live service runs
21417
+ * over its assembled set — so the two stay consistent by construction.
21418
+ * `releaseAgeGate` and `importerVersions` are **not** derivable from a
21419
+ * catalog set (the gate comes from release-age keys and hook contributions,
21420
+ * the importer index from the lockfile's importer blocks — neither is in a
21421
+ * `CatalogSet`) and always die unless stubbed.
21422
+ *
21423
+ * @example
21424
+ * ```ts
21425
+ * import { CatalogSet, WorkspaceCatalogs } from "@effected/workspaces";
21426
+ * import { Effect } from "effect";
21427
+ *
21428
+ * const double = WorkspaceCatalogs.makeTest({
21429
+ * set: () => Effect.succeed(CatalogSet.fromCatalogs({ default: { effect: "4.0.0" } })),
21430
+ * });
21431
+ * // `resolveSpecifier` now answers consistently from that set.
21432
+ * ```
21433
+ */
21434
+ static makeTest = (overrides = {}) => {
21435
+ const set = overrides.set;
21436
+ return {
21437
+ set: () => unstubbed$1("set"),
21438
+ resolveSpecifier: set !== void 0 ? (dependency, specifier) => effect.Effect.map(set(), (catalogs) => catalogs.resolveSpecifier(dependency, specifier)) : () => unstubbed$1("resolveSpecifier"),
21439
+ releaseAgeGate: () => unstubbed$1("releaseAgeGate"),
21440
+ importerVersions: () => unstubbed$1("importerVersions"),
21441
+ ...overrides
21442
+ };
21443
+ };
21444
+ /**
21445
+ * The test layer: {@link WorkspaceCatalogs.makeTest} behind `Layer.succeed`,
21446
+ * so a suite provides only the methods it exercises.
21447
+ *
21448
+ * @remarks
21449
+ * A parameterized layer factory mints a **fresh reference per call**, and
21450
+ * layers memoize by reference — bind the result to a `const` and reuse it
21451
+ * rather than calling `layerTest(...)` at each composition site.
21452
+ *
21453
+ * @example
21454
+ * ```ts
21455
+ * import { CatalogSet, WorkspaceCatalogs } from "@effected/workspaces";
21456
+ * import { Effect } from "effect";
21457
+ *
21458
+ * const TestCatalogs = WorkspaceCatalogs.layerTest({
21459
+ * set: () => Effect.succeed(CatalogSet.empty()),
21460
+ * });
21461
+ * // program.pipe(Effect.provide(TestCatalogs))
21462
+ * ```
21463
+ */
21464
+ static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceCatalogs, WorkspaceCatalogs.makeTest(overrides));
21465
+ /**
21095
21466
  * The real implementation of `@effected/npm`'s `CatalogResolver` contract —
21096
21467
  * the one `@effected/package-json` declares but cannot fill.
21097
21468
  *
@@ -21116,7 +21487,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
21116
21487
  }));
21117
21488
  };
21118
21489
  //#endregion
21119
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
21490
+ //#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/WorkspaceStateSnapshot.js
21120
21491
  const EMPTY = Object.freeze(Object.create(null));
21121
21492
  const DependencyMap = effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY)));
21122
21493
  /**
@@ -21200,7 +21571,19 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
21200
21571
  /** Every workspace package captured at this moment. */
21201
21572
  packages: effect.Schema.Array(PackageStateSnapshot),
21202
21573
  /** The catalog set assembled at this moment. */
21203
- catalogs: CatalogSet
21574
+ catalogs: CatalogSet,
21575
+ /**
21576
+ * Each importer's dependency-name → resolved-version map, as the manager's
21577
+ * lockfile recorded it at this moment.
21578
+ *
21579
+ * @remarks
21580
+ * Defaults to `{}`, so a `WorkspaceStateSnapshot` serialized before this field
21581
+ * existed still decodes — and an empty index simply makes the `catalog:`
21582
+ * fallback in {@link WorkspaceStateSnapshot.resolve} inert, which is exactly
21583
+ * the behavior those older values were captured under. Only pnpm records
21584
+ * importer versions; bun and npm yield an empty index.
21585
+ */
21586
+ importerVersions: effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Record(effect.Schema.String, effect.Schema.String)))
21204
21587
  }) {
21205
21588
  #versionIndex;
21206
21589
  #packageIndex;
@@ -21235,16 +21618,62 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
21235
21618
  * unparseable string — is `Option.none()`, because there is no indirection to
21236
21619
  * resolve. Total.
21237
21620
  *
21621
+ * A `catalog:` specifier the catalog set cannot resolve falls back to this
21622
+ * snapshot's `importerVersions` — but only to a version
21623
+ * **every** importer recording that dependency agrees on. A catalog injected
21624
+ * by a config-dependency pnpmfile hook appears in no committed catalog source,
21625
+ * so without this fallback both sides of a before/after diff resolve it to the
21626
+ * same raw string and a real version movement produces no row. When importers
21627
+ * disagree there is no single correct answer, so this stays `Option.none()`
21628
+ * rather than inventing one; {@link WorkspaceStateSnapshot.resolveIn} answers
21629
+ * precisely for callers that know which importer is asking.
21630
+ *
21238
21631
  * @param dependency - The dependency's package name (what `workspace:` /
21239
21632
  * `catalog:` resolve for).
21240
21633
  * @param specifier - The raw specifier string.
21241
21634
  */
21242
21635
  resolve(dependency, specifier) {
21636
+ return this.#resolveWith(dependency, specifier, () => effect.Option.fromUndefinedOr(unanimousVersionOf(this.importerVersions ?? {}, dependency)));
21637
+ }
21638
+ /**
21639
+ * The concrete range or version a specifier resolved to AS OF this snapshot,
21640
+ * scoped to the importer that declared it.
21641
+ *
21642
+ * @remarks
21643
+ * Identical to {@link WorkspaceStateSnapshot.resolve} except in how an
21644
+ * unresolvable `catalog:` specifier falls back: this consults **only**
21645
+ * `importerPath`'s own recorded versions, so a monorepo whose packages hold
21646
+ * different versions of one dependency still gets an exact answer where
21647
+ * `resolve` must abstain. Prefer this whenever the caller knows the importer —
21648
+ * a consumer iterating `packages` has `relativePath` in hand, which is the
21649
+ * importer key (`"."` for the root package).
21650
+ *
21651
+ * An unknown `importerPath`, or one recording nothing for `dependency`, is
21652
+ * `Option.none()`. Total.
21653
+ *
21654
+ * @param importerPath - The importer's path relative to the workspace root,
21655
+ * `"."` for the root package — `PackageStateSnapshot.relativePath`.
21656
+ * @param dependency - The dependency's package name.
21657
+ * @param specifier - The raw specifier string.
21658
+ */
21659
+ resolveIn(importerPath, dependency, specifier) {
21660
+ return this.#resolveWith(dependency, specifier, () => effect.Option.fromUndefinedOr(this.importerVersions?.[importerPath]?.[dependency]));
21661
+ }
21662
+ /**
21663
+ * The shared resolution path: classify, answer from the captured state, and
21664
+ * consult `onUnresolvedCatalog` only for a `catalog:` specifier the catalog set
21665
+ * could not answer. A plain range is already its own answer and must keep
21666
+ * resolving to `Option.none()` so the caller falls back to the raw string.
21667
+ */
21668
+ #resolveWith(dependency, specifier, onUnresolvedCatalog) {
21243
21669
  const exit = effect.Schema.decodeUnknownExit(DependencySpecifier.FromString)(specifier);
21244
21670
  if (!effect.Exit.isSuccess(exit)) return effect.Option.none();
21245
21671
  const classified = exit.value;
21246
21672
  switch (classified._tag) {
21247
- case "catalog": return this.catalogs.rangeOf(dependency, classified.name);
21673
+ case "catalog": {
21674
+ const fromCatalogs = this.catalogs.rangeOf(dependency, classified.name);
21675
+ return effect.Option.isSome(fromCatalogs) ? fromCatalogs : onUnresolvedCatalog();
21676
+ }
21248
21677
  case "workspace": return effect.Option.fromUndefinedOr(this.#versions().get(dependency));
21249
21678
  default: return effect.Option.none();
21250
21679
  }
@@ -21281,7 +21710,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
21281
21710
  }
21282
21711
  };
21283
21712
  //#endregion
21284
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceSnapshots.js
21713
+ //#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/WorkspaceSnapshots.js
21285
21714
  /** Whether `value` is a non-null, non-array object. */
21286
21715
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
21287
21716
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -21335,6 +21764,13 @@ const bunInlineCatalogs = (manifest) => {
21335
21764
  catalogs: workspaces.catalogs
21336
21765
  });
21337
21766
  };
21767
+ /** The contribution of an absent or malformed lockfile: nothing, on both counts. */
21768
+ const EMPTY_LOCKFILE_RECORD = {
21769
+ catalogs: CatalogSet.empty(),
21770
+ importerVersions: {}
21771
+ };
21772
+ /** A defect naming the unstubbed test-double method — a test-wiring mistake, not a typed failure. */
21773
+ const unstubbed = (method) => effect.Effect.die(/* @__PURE__ */ new Error(`WorkspaceSnapshots.makeTest: ${method}() was called but not stubbed — pass a \`${method}\` override.`));
21338
21774
  /**
21339
21775
  * Reads workspace state at a git ref with no checkout, and the live worktree.
21340
21776
  *
@@ -21367,10 +21803,17 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
21367
21803
  const roots = yield* WorkspaceRoot;
21368
21804
  const discovery = yield* WorkspaceDiscovery;
21369
21805
  const catalogsService = yield* WorkspaceCatalogs;
21370
- /** The catalog set a manager's lockfile records at the ref, or empty when absent/malformed. */
21371
- const lockfileCatalogs = (root, ref, format) => git.show(root, ref, `./${filenameFor(format)}`).pipe(effect.Effect.flatMap((content) => effect.Option.match(content, {
21372
- onNone: () => effect.Effect.succeed(CatalogSet.empty()),
21373
- onSome: (text) => Lockfile.parse(text, { format }).pipe(effect.Effect.map(CatalogSet.fromLockfile), effect.Effect.catch(() => effect.Effect.succeed(CatalogSet.empty())))
21806
+ /**
21807
+ * What a manager's lockfile records at the ref: its catalog set and its
21808
+ * importer versions, from ONE parse. Empty on both counts when the
21809
+ * lockfile is absent or malformed.
21810
+ */
21811
+ const lockfileRecord = (root, ref, format) => git.show(root, ref, `./${filenameFor(format)}`).pipe(effect.Effect.flatMap((content) => effect.Option.match(content, {
21812
+ onNone: () => effect.Effect.succeed(EMPTY_LOCKFILE_RECORD),
21813
+ onSome: (text) => Lockfile.parse(text, { format }).pipe(effect.Effect.map((lockfile) => ({
21814
+ catalogs: CatalogSet.fromLockfile(lockfile),
21815
+ importerVersions: importerVersionsOf(lockfile)
21816
+ })), effect.Effect.catch(() => effect.Effect.succeed(EMPTY_LOCKFILE_RECORD)))
21374
21817
  })));
21375
21818
  const computeAt = (root, ref) => effect.Effect.gen(function* () {
21376
21819
  const pnpmWorkspaceText = yield* git.show(root, ref, "./pnpm-workspace.yaml");
@@ -21381,7 +21824,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
21381
21824
  });
21382
21825
  let patterns;
21383
21826
  let inline;
21384
- let fromLockfile;
21827
+ let recorded;
21385
21828
  if (effect.Option.isSome(pnpmWorkspaceText)) {
21386
21829
  const pnpmPatterns = pnpmPatternsOf(yield* Yaml.parse(pnpmWorkspaceText.value).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
21387
21830
  source: "manifest",
@@ -21390,13 +21833,13 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
21390
21833
  }))));
21391
21834
  patterns = pnpmPatterns.length > 0 ? pnpmPatterns : manifestPatternsOf(rootManifest);
21392
21835
  inline = yield* CatalogSet.fromWorkspaceYaml(pnpmWorkspaceText.value);
21393
- fromLockfile = yield* lockfileCatalogs(root, ref, "pnpm");
21836
+ recorded = yield* lockfileRecord(root, ref, "pnpm");
21394
21837
  } else {
21395
21838
  patterns = manifestPatternsOf(rootManifest);
21396
21839
  inline = bunInlineCatalogs(rootManifest);
21397
- fromLockfile = yield* lockfileCatalogs(root, ref, "bun");
21840
+ recorded = yield* lockfileRecord(root, ref, "bun");
21398
21841
  }
21399
- const catalogs = CatalogSet.merge(fromLockfile, inline);
21842
+ const catalogs = CatalogSet.merge(recorded.catalogs, inline);
21400
21843
  const globs = yield* GlobSet.compile(patterns).pipe(effect.Effect.mapError((error) => new CatalogAssemblyError({
21401
21844
  source: "manifest",
21402
21845
  path: error.pattern,
@@ -21423,7 +21866,8 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
21423
21866
  for (const member of members) if (effect.Option.isSome(member)) packages.push(member.value);
21424
21867
  return WorkspaceStateSnapshot.make({
21425
21868
  packages,
21426
- catalogs
21869
+ catalogs,
21870
+ importerVersions: recorded.importerVersions
21427
21871
  });
21428
21872
  });
21429
21873
  const atCaches = /* @__PURE__ */ new Map();
@@ -21447,6 +21891,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
21447
21891
  worktree: effect.Effect.fn("WorkspaceSnapshots.worktree")(function* () {
21448
21892
  const packages = yield* discovery.listPackages();
21449
21893
  const catalogs = yield* catalogsService.set();
21894
+ const importerVersions = yield* catalogsService.importerVersions();
21450
21895
  const snapshotPackages = packages.map((pkg) => PackageStateSnapshot.make({
21451
21896
  name: pkg.name,
21452
21897
  version: pkg.version,
@@ -21458,7 +21903,8 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
21458
21903
  }));
21459
21904
  return WorkspaceStateSnapshot.make({
21460
21905
  packages: snapshotPackages,
21461
- catalogs
21906
+ catalogs,
21907
+ importerVersions
21462
21908
  });
21463
21909
  })
21464
21910
  };
@@ -21471,9 +21917,69 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
21471
21917
  * `const` and reuse it, or layer memoization does not apply.
21472
21918
  */
21473
21919
  static layer = (options) => effect.Layer.effect(WorkspaceSnapshots, WorkspaceSnapshots.make(options));
21920
+ /**
21921
+ * A test double satisfying the full {@link WorkspaceSnapshotsShape} with no
21922
+ * git, filesystem, discovery, or catalog assembly.
21923
+ *
21924
+ * @remarks
21925
+ * There are **no honest defaults and no derivations** here: `at(ref)` and
21926
+ * `worktree()` are two independent reads of two different sources (a git ref
21927
+ * vs. the live tree), so neither can be honestly derived from the other, and
21928
+ * a fabricated empty {@link WorkspaceStateSnapshot} on either side of a
21929
+ * before/after diff reads as every dependency newly added or removed — the
21930
+ * exact silent-empty failure class this package documents on the live paths.
21931
+ * Both methods therefore **die** with an instructive defect until stubbed; a
21932
+ * test-wiring mistake fails loudly as a defect rather than succeeding with a
21933
+ * lie.
21934
+ *
21935
+ * @example
21936
+ * ```ts
21937
+ * import { CatalogSet, WorkspaceSnapshots, WorkspaceStateSnapshot } from "@effected/workspaces";
21938
+ * import { Effect } from "effect";
21939
+ *
21940
+ * const empty = WorkspaceStateSnapshot.make({
21941
+ * packages: [],
21942
+ * catalogs: CatalogSet.empty(),
21943
+ * importerVersions: {},
21944
+ * });
21945
+ * const double = WorkspaceSnapshots.makeTest({
21946
+ * at: () => Effect.succeed(empty),
21947
+ * worktree: () => Effect.succeed(empty),
21948
+ * });
21949
+ * ```
21950
+ */
21951
+ static makeTest = (overrides = {}) => ({
21952
+ at: () => unstubbed("at"),
21953
+ worktree: () => unstubbed("worktree"),
21954
+ ...overrides
21955
+ });
21956
+ /**
21957
+ * The test layer: {@link WorkspaceSnapshots.makeTest} behind `Layer.succeed`,
21958
+ * so a suite provides only the methods it exercises.
21959
+ *
21960
+ * @remarks
21961
+ * A parameterized layer factory mints a **fresh reference per call**, and
21962
+ * layers memoize by reference — bind the result to a `const` and reuse it
21963
+ * rather than calling `layerTest(...)` at each composition site.
21964
+ *
21965
+ * @example
21966
+ * ```ts
21967
+ * import { CatalogSet, WorkspaceSnapshots, WorkspaceStateSnapshot } from "@effected/workspaces";
21968
+ * import { Effect } from "effect";
21969
+ *
21970
+ * const TestSnapshots = WorkspaceSnapshots.layerTest({
21971
+ * worktree: () =>
21972
+ * Effect.succeed(
21973
+ * WorkspaceStateSnapshot.make({ packages: [], catalogs: CatalogSet.empty(), importerVersions: {} }),
21974
+ * ),
21975
+ * });
21976
+ * // program.pipe(Effect.provide(TestSnapshots))
21977
+ * ```
21978
+ */
21979
+ static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
21474
21980
  };
21475
21981
  //#endregion
21476
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Workspaces.js
21982
+ //#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/Workspaces.js
21477
21983
  /**
21478
21984
  * Every service that needs only a filesystem: root, package-manager detection,
21479
21985
  * discovery, lockfile reading, catalogs and publishability.
@@ -43164,6 +43670,80 @@ function isUint8Array(value) {
43164
43670
  //#endregion
43165
43671
  //#region ../silk-effects/dist/dev/pkg/changesets/utils/remark-pipeline.js
43166
43672
  /**
43673
+ * Marker set on the `data` of a text node whose value must be written to
43674
+ * markdown verbatim rather than escaped.
43675
+ *
43676
+ * @remarks
43677
+ * `remark-stringify` escapes any character that could open a markdown
43678
+ * construct. Inside a dependency table that is always wrong: with
43679
+ * `remark-gfm` enabled `~` is the strikethrough delimiter, so the specifier
43680
+ * `~0.2.1` is written as `\~0.2.1`, and `_` in a package name becomes `\_`.
43681
+ * The corruption compounds on every re-serialization, and dependency-table
43682
+ * cells round-trip through consolidation and PR-body reconstruction.
43683
+ *
43684
+ * The marker is deliberately narrow. It is set only by the dependency-table
43685
+ * cell builder, whose cell vocabulary is closed — package name, dependency
43686
+ * type, action, version specifier, and the em-dash sentinel — and none of
43687
+ * those can legitimately carry markdown. Prose elsewhere in a changeset keeps
43688
+ * the default escaping.
43689
+ *
43690
+ * @internal
43691
+ */
43692
+ const LITERAL_TEXT_MARKER = "silkLiteralText";
43693
+ /**
43694
+ * Mark a text node so {@link createRemarkProcessor} writes it verbatim.
43695
+ *
43696
+ * @param value - The literal cell text
43697
+ * @returns An MDAST `Text` node carrying the literal marker
43698
+ *
43699
+ * @internal
43700
+ */
43701
+ function literalText(value) {
43702
+ return {
43703
+ type: "text",
43704
+ value,
43705
+ data: { [LITERAL_TEXT_MARKER]: true }
43706
+ };
43707
+ }
43708
+ /**
43709
+ * Whether a text node was marked by {@link literalText}.
43710
+ *
43711
+ * @internal
43712
+ */
43713
+ function isLiteralText(node) {
43714
+ return node.data?.[LITERAL_TEXT_MARKER] === true;
43715
+ }
43716
+ /**
43717
+ * Escape the two characters that would otherwise corrupt the table grid.
43718
+ *
43719
+ * @remarks
43720
+ * A `|` would close the cell early and a `\` would be read as an escape
43721
+ * introducer, so both are escaped to keep the written cell parseable back to
43722
+ * its exact input. Every other character is emitted as-is. Because parsing
43723
+ * consumes the backslash, a value that already carries a legacy `\~` from the
43724
+ * old escaping path re-parses to its clean form rather than accumulating
43725
+ * another layer.
43726
+ *
43727
+ * @internal
43728
+ */
43729
+ function escapeCellLiteral(value) {
43730
+ return value.replace(/[\\|]/g, "\\$&");
43731
+ }
43732
+ /**
43733
+ * `mdast-util-to-markdown` handler overrides used by the shared processor.
43734
+ *
43735
+ * @remarks
43736
+ * Replaces the default `text` handler — which is `state.safe(node.value, info)`
43737
+ * — with one that bypasses escaping for nodes marked by {@link literalText}
43738
+ * and delegates to the default behavior for everything else.
43739
+ *
43740
+ * @internal
43741
+ */
43742
+ const literalTextHandlers = { text: (node, _parent, state, info) => {
43743
+ const text = node;
43744
+ return isLiteralText(text) ? escapeCellLiteral(text.value) : state.safe(text.value, info);
43745
+ } };
43746
+ /**
43167
43747
  * Create a unified processor configured with remark-parse, remark-gfm,
43168
43748
  * and remark-stringify.
43169
43749
  *
@@ -43171,7 +43751,8 @@ function isUint8Array(value) {
43171
43751
  * Each call creates a fresh processor instance. The plugin chain is:
43172
43752
  * 1. `remark-parse` — markdown to MDAST
43173
43753
  * 2. `remark-gfm` — GitHub Flavored Markdown extensions (tables, etc.)
43174
- * 3. `remark-stringify` — MDAST back to markdown
43754
+ * 3. `remark-stringify` — MDAST back to markdown, with the
43755
+ * {@link literalText} handler override
43175
43756
  *
43176
43757
  * @privateRemarks
43177
43758
  * Return type is intentionally inferred because the unified `Processor`
@@ -43182,7 +43763,7 @@ function isUint8Array(value) {
43182
43763
  * @internal
43183
43764
  */
43184
43765
  function createRemarkProcessor() {
43185
- return unified().use(remarkParse).use(remarkGfm).use(remarkStringify);
43766
+ return unified().use(remarkParse).use(remarkGfm).use(remarkStringify, { handlers: literalTextHandlers });
43186
43767
  }
43187
43768
  /**
43188
43769
  * Parse a markdown string into an MDAST AST synchronously.
@@ -43690,6 +44271,12 @@ function parseDependencyTable(table) {
43690
44271
  /**
43691
44272
  * Create a table cell with a text node.
43692
44273
  *
44274
+ * @remarks
44275
+ * The cell text is marked literal, so stringification writes it verbatim
44276
+ * instead of escaping characters that could open a markdown construct. See
44277
+ * {@link literalText} — without it `~0.2.1` is written as `\~0.2.1` and
44278
+ * `some_pkg` as `some\_pkg`.
44279
+ *
43693
44280
  * @param text - The cell text content
43694
44281
  * @returns An MDAST `TableCell` node
43695
44282
  *
@@ -43698,10 +44285,7 @@ function parseDependencyTable(table) {
43698
44285
  function makeCell(text) {
43699
44286
  return {
43700
44287
  type: "tableCell",
43701
- children: [{
43702
- type: "text",
43703
- value: text
43704
- }]
44288
+ children: [literalText(text)]
43705
44289
  };
43706
44290
  }
43707
44291
  /**
@@ -43776,11 +44360,10 @@ function serializeDependencyTable(rows) {
43776
44360
  * @internal
43777
44361
  */
43778
44362
  function serializeDependencyTableToMarkdown(rows) {
43779
- const tree = {
44363
+ return stringifyMarkdown({
43780
44364
  type: "root",
43781
44365
  children: [serializeDependencyTable(rows)]
43782
- };
43783
- return unified().use(remarkGfm).use(remarkStringify).stringify(tree).trim();
44366
+ }).trim();
43784
44367
  }
43785
44368
  /**
43786
44369
  * Sort priority for dependency actions: removed first, then updated, then added.
@@ -46534,20 +47117,25 @@ function readRawPackageJson(fs, pkgDir) {
46534
47117
  }
46535
47118
  /**
46536
47119
  * Build resolved scopes from the discovered workspace packages, keeping only
46537
- * those that are a release surface (declare publishConfig that yields at least
46538
- * one publish target). Used both when `.changeset/config.json` declares no
46539
- * explicit `packages` record AND to augment an explicit record with the
46540
- * remaining workspace packages it does not list (so the record annotates the
46541
- * listed packages without shrinking the release surface). The changeset
46542
- * `ignore` list is intentionally NOT consulted here an ignored package still
46543
- * declares publishConfig and remains a valid changeset target.
46544
- */
46545
- function buildFallbackScopes(fs, workspaces) {
47120
+ * those that are a release surface: a package that declares publishConfig
47121
+ * yielding at least one publish target, OR when the changeset config sets
47122
+ * `privatePackages.version: true` (`versionPrivate`) any workspace package
47123
+ * at all, since changesets versions private packages too in that mode (#360:
47124
+ * a private single-root repo with `privatePackages.version: true` previously
47125
+ * produced an empty release surface and left every file unmapped). Used both
47126
+ * when `.changeset/config.json` declares no explicit `packages` record AND to
47127
+ * augment an explicit record with the remaining workspace packages it does
47128
+ * not list (so the record annotates the listed packages without shrinking the
47129
+ * release surface). The changeset `ignore` list is intentionally NOT
47130
+ * consulted here — an ignored package still declares publishConfig and
47131
+ * remains a valid changeset target.
47132
+ */
47133
+ function buildFallbackScopes(fs, workspaces, versionPrivate) {
46546
47134
  return effect.Effect.forEach(workspaces, (ws) => effect.Effect.gen(function* () {
46547
47135
  const raw = yield* readRawPackageJson(fs, ws.path);
46548
47136
  if (raw === null) return [];
46549
47137
  const binding = yield* readTargetsBinding(fs, ws.path);
46550
- if (SilkPublishability.detect(ws.name, raw, binding).length === 0) return [];
47138
+ if (SilkPublishability.detect(ws.name, raw, binding).length === 0 && !versionPrivate) return [];
46551
47139
  return [{
46552
47140
  name: ws.name,
46553
47141
  workspaceDir: ws.path,
@@ -46653,6 +47241,8 @@ function makeShape$3(reader, discovery, fs) {
46653
47241
  version: w.version
46654
47242
  }));
46655
47243
  const hasExplicitPackages = Object.keys(decodedOptions.packages ?? {}).length > 0;
47244
+ const privatePackages = config.privatePackages;
47245
+ const versionPrivate = privatePackages !== void 0 && privatePackages !== false && privatePackages.version === true;
46656
47246
  let scopes;
46657
47247
  if (hasExplicitPackages) {
46658
47248
  const explicitScopes = yield* buildResolvedScopes({
@@ -46668,9 +47258,9 @@ function makeShape$3(reader, discovery, fs) {
46668
47258
  throw e;
46669
47259
  }
46670
47260
  const explicitNames = new Set(explicitScopes.map((s) => s.name));
46671
- const discoveredScopes = yield* buildFallbackScopes(fs, workspaces.filter((w) => !explicitNames.has(w.name)));
47261
+ const discoveredScopes = yield* buildFallbackScopes(fs, workspaces.filter((w) => !explicitNames.has(w.name)), versionPrivate);
46672
47262
  scopes = [...explicitScopes, ...discoveredScopes];
46673
- } else scopes = yield* buildFallbackScopes(fs, workspaces);
47263
+ } else scopes = yield* buildFallbackScopes(fs, workspaces, versionPrivate);
46674
47264
  const inspected = {
46675
47265
  configPath,
46676
47266
  projectDir,
@@ -46704,12 +47294,19 @@ function makeShape$3(reader, discovery, fs) {
46704
47294
  function classifyOne(inspected, path) {
46705
47295
  const abs = (0, node_path.resolve)(inspected.projectDir, path);
46706
47296
  let bestWorkspace = null;
46707
- for (const s of inspected.packages) if (isInside(s.workspaceDir, abs)) {
46708
- const depth = s.workspaceDir.length;
46709
- if (!bestWorkspace || depth > bestWorkspace.depth) bestWorkspace = {
46710
- pkg: s.name,
46711
- depth
46712
- };
47297
+ let rootScope = null;
47298
+ for (const s of inspected.packages) {
47299
+ if (s.workspaceDir === inspected.projectDir) {
47300
+ rootScope = s.name;
47301
+ continue;
47302
+ }
47303
+ if (isInside(s.workspaceDir, abs)) {
47304
+ const depth = s.workspaceDir.length;
47305
+ if (!bestWorkspace || depth > bestWorkspace.depth) bestWorkspace = {
47306
+ pkg: s.name,
47307
+ depth
47308
+ };
47309
+ }
46713
47310
  }
46714
47311
  if (bestWorkspace) return {
46715
47312
  path,
@@ -46736,6 +47333,11 @@ function classifyOne(inspected, path) {
46736
47333
  glob: vf.glob
46737
47334
  }
46738
47335
  };
47336
+ if (rootScope && isInside(inspected.projectDir, abs)) return {
47337
+ path,
47338
+ package: rootScope,
47339
+ reason: "workspace"
47340
+ };
46739
47341
  return {
46740
47342
  path,
46741
47343
  package: null,
@@ -46972,10 +47574,23 @@ const DEP_TYPE_MAP = [
46972
47574
  ["optionalDependencies", "optionalDependency"]
46973
47575
  ];
46974
47576
  /**
46975
- * Resolve a specifier against the snapshot it belongs to, falling back to
46976
- * the raw specifier string when the snapshot cannot resolve it.
46977
- */
46978
- const resolveOrRaw = (snapshot, dep, spec) => effect.Option.getOrElse(snapshot.resolve(dep, spec), () => spec);
47577
+ * Resolve a specifier against the snapshot it belongs to, scoped to the
47578
+ * importer that declared it, falling back to the raw specifier string when
47579
+ * the snapshot cannot resolve it.
47580
+ *
47581
+ * @remarks
47582
+ * Uses `resolveIn` rather than the workspace-wide `resolve`. Both consult the
47583
+ * ref's own lockfile importer entries when a `catalog:` specifier is not in the
47584
+ * catalog set — which is what makes hook-injected catalogs (`catalog:effect:peers`,
47585
+ * injected by a config-dependency pnpmfile and recorded in neither
47586
+ * `pnpm-workspace.yaml` nor the lockfile's `catalogs:` block) resolvable at all.
47587
+ * The workspace-wide form abstains whenever two importers disagree on a
47588
+ * dependency's version, which in a multi-package repo reproduces the original
47589
+ * defect: both sides fall back to the identical raw specifier, compare equal,
47590
+ * and emit no row. Scoping to the declaring importer answers precisely where
47591
+ * the workspace-wide form cannot.
47592
+ */
47593
+ const resolveOrRaw = (snapshot, importerPath, dep, spec) => effect.Option.getOrElse(snapshot.resolveIn(importerPath, dep, spec), () => spec);
46979
47594
  /**
46980
47595
  * Drop no-net-change field moves: the same dependency removed from one field
46981
47596
  * and added to another with an equal resolved version (e.g. a dep promoted
@@ -47020,13 +47635,15 @@ function computeWorkspaceDependencyDiffs(before, after) {
47020
47635
  for (const afterPkg of after.packages) {
47021
47636
  const beforePkg = effect.Option.getOrNull(before.package(afterPkg.name));
47022
47637
  const rows = [];
47638
+ const afterImporter = afterPkg.relativePath;
47639
+ const beforeImporter = beforePkg?.relativePath ?? afterImporter;
47023
47640
  for (const [field, type] of DEP_TYPE_MAP) {
47024
47641
  const beforeRecord = beforePkg?.[field] ?? {};
47025
47642
  const afterRecord = afterPkg[field];
47026
47643
  const seen = /* @__PURE__ */ new Set();
47027
47644
  for (const [name, beforeSpec] of Object.entries(beforeRecord)) {
47028
47645
  seen.add(name);
47029
- const from = resolveOrRaw(before, name, beforeSpec);
47646
+ const from = resolveOrRaw(before, beforeImporter, name, beforeSpec);
47030
47647
  const afterSpec = afterRecord[name];
47031
47648
  if (afterSpec === void 0) {
47032
47649
  rows.push({
@@ -47038,7 +47655,7 @@ function computeWorkspaceDependencyDiffs(before, after) {
47038
47655
  });
47039
47656
  continue;
47040
47657
  }
47041
- const to = resolveOrRaw(after, name, afterSpec);
47658
+ const to = resolveOrRaw(after, afterImporter, name, afterSpec);
47042
47659
  if (from !== to) rows.push({
47043
47660
  dependency: name,
47044
47661
  type,
@@ -47054,7 +47671,7 @@ function computeWorkspaceDependencyDiffs(before, after) {
47054
47671
  type,
47055
47672
  action: "added",
47056
47673
  from: EM_DASH$1,
47057
- to: resolveOrRaw(after, name, afterSpec)
47674
+ to: resolveOrRaw(after, afterImporter, name, afterSpec)
47058
47675
  });
47059
47676
  }
47060
47677
  }
@@ -65200,8 +65817,38 @@ function getHeadingLevel(heading) {
65200
65817
  return sequence ? sequence.text.length : 0;
65201
65818
  }
65202
65819
  /**
65820
+ * CommonMark backslash escapes: a backslash is literal unless it precedes an
65821
+ * ASCII punctuation character, in which case the pair denotes that character.
65822
+ */
65823
+ const BACKSLASH_ESCAPE_RE = /\\([!-/:-@[-`{-~])/g;
65824
+ /**
65825
+ * Resolve CommonMark backslash escapes in raw micromark source text.
65826
+ *
65827
+ * @remarks
65828
+ * Every rule in this directory has a sibling remark implementation that reads
65829
+ * the parsed mdast tree, where the parser has already resolved escapes, via
65830
+ * `mdast-util-to-string`. Micromark tokens instead carry RAW source. Comparing
65831
+ * raw text against a value the parsed form would produce makes the two
65832
+ * implementations of one documented rule disagree about the same file
65833
+ * (issue #367).
65834
+ *
65835
+ * Applied at the shared extractors below so both implementations judge the
65836
+ * value a reader actually sees, rather than per-rule where the next extractor
65837
+ * added would silently reintroduce the split.
65838
+ *
65839
+ * @internal
65840
+ */
65841
+ function unescapeMarkdown(raw) {
65842
+ return raw.replace(BACKSLASH_ESCAPE_RE, "$1");
65843
+ }
65844
+ /**
65203
65845
  * Get the plain text content of an `atxHeading` token.
65204
65846
  *
65847
+ * @remarks
65848
+ * Escape-resolved, so a heading compares equal to the same heading as the
65849
+ * remark rules see it. `getHeadingLevel` needs no equivalent — it counts
65850
+ * sequence characters rather than reading text.
65851
+ *
65205
65852
  * @param heading - The `atxHeading` micromark token
65206
65853
  * @returns The heading text, or empty string if no text token found
65207
65854
  *
@@ -65209,7 +65856,7 @@ function getHeadingLevel(heading) {
65209
65856
  */
65210
65857
  function getHeadingText(heading) {
65211
65858
  const textToken = heading.children.find((c) => c.type === "atxHeadingText");
65212
- return textToken ? textToken.text : "";
65859
+ return textToken ? unescapeMarkdown(textToken.text) : "";
65213
65860
  }
65214
65861
  //#endregion
65215
65862
  //#region ../silk-effects/dist/dev/pkg/changesets/markdownlint/rules/content-structure.js
@@ -65334,13 +65981,13 @@ const EXPECTED_HEADERS = [
65334
65981
  * The `tableContent` token has a `.text` property with the cell value.
65335
65982
  *
65336
65983
  * @param cell - A GFM table cell token (header or data)
65337
- * @returns The trimmed text content of the cell, or an empty string
65984
+ * @returns The trimmed, escape-resolved text content of the cell, or an empty string
65338
65985
  *
65339
65986
  * @internal
65340
65987
  */
65341
65988
  function getCellText(cell) {
65342
65989
  const content = cell.children.find((c) => c.type === "tableContent");
65343
- return content ? content.text.trim() : "";
65990
+ return content ? unescapeMarkdown(content.text.trim()) : "";
65344
65991
  }
65345
65992
  /**
65346
65993
  * Extract all cell texts from a `tableRow` token.