@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.
@@ -2381,7 +2381,7 @@ var GlobSet = class GlobSet extends Schema.Class("GlobSet")(Schema.Struct({ patt
2381
2381
  };
2382
2382
 
2383
2383
  //#endregion
2384
- //#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
2384
+ //#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
2385
2385
  /**
2386
2386
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2387
2387
  * when the format is `"bun"`.
@@ -2403,7 +2403,7 @@ var BunExtension = class extends Schema.Class("BunExtension")({
2403
2403
  }) {};
2404
2404
 
2405
2405
  //#endregion
2406
- //#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
2406
+ //#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
2407
2407
  /**
2408
2408
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2409
2409
  * version ranges.
@@ -2450,7 +2450,7 @@ var CatalogResolver = class CatalogResolver extends Context.Service()("@effected
2450
2450
  };
2451
2451
 
2452
2452
  //#endregion
2453
- //#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
2453
+ //#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
2454
2454
  /**
2455
2455
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2456
2456
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2512,7 +2512,7 @@ var WorkspaceResolver = class WorkspaceResolver extends Context.Service()("@effe
2512
2512
  };
2513
2513
 
2514
2514
  //#endregion
2515
- //#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
2515
+ //#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
2516
2516
  /**
2517
2517
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2518
2518
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2557,7 +2557,7 @@ var CatalogAssemblyError = class extends Schema.TaggedErrorClass()("CatalogAssem
2557
2557
  };
2558
2558
 
2559
2559
  //#endregion
2560
- //#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
2560
+ //#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
2561
2561
  /**
2562
2562
  * The short dependency kind: which dependency map an entry came from, named the
2563
2563
  * way consumers branch on it.
@@ -4067,7 +4067,7 @@ const isComparatorSetSubset = (sub, sup) => {
4067
4067
  };
4068
4068
 
4069
4069
  //#endregion
4070
- //#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
4070
+ //#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
4071
4071
  /**
4072
4072
  * Indicates that a string could not be parsed as a valid dependency specifier.
4073
4073
  *
@@ -4275,7 +4275,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4275
4275
  });
4276
4276
 
4277
4277
  //#endregion
4278
- //#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
4278
+ //#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
4279
4279
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4280
4280
  const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
4281
4281
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
@@ -4329,7 +4329,7 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4329
4329
  });
4330
4330
 
4331
4331
  //#endregion
4332
- //#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
4332
+ //#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
4333
4333
  const MS_PER_MINUTE = 6e4;
4334
4334
  /**
4335
4335
  * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
@@ -4417,7 +4417,9 @@ var ReleaseAgeGate = class ReleaseAgeGate extends Schema.Class("ReleaseAgeGate")
4417
4417
  * Combine partial contributions from multiple sources into one effective
4418
4418
  * gate: **strictest age wins** (the maximum of the contributed ages,
4419
4419
  * clamped to be non-negative) and the exclude sets **union** (deduplicated,
4420
- * insertion order preserved). A contribution's absent field adds nothing; a
4420
+ * lexicographically sorted a canonical wire form, so the combined gate is
4421
+ * deterministic regardless of the order contributions arrive in). A
4422
+ * contribution's absent field adds nothing; a
4421
4423
  * negative or non-finite contributed age is ignored by the clamp. With no
4422
4424
  * contributions (or only empty ones) the result is the inert zero gate
4423
4425
  * (`ageMinutes: 0`, `exclude: []`).
@@ -4431,7 +4433,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends Schema.Class("ReleaseAgeGate")
4431
4433
  static combine(...contributions) {
4432
4434
  const ages = contributions.map((contribution) => contribution.ageMinutes).filter((age) => typeof age === "number" && Number.isFinite(age));
4433
4435
  const ageMinutes = ages.length > 0 ? Math.max(0, ...ages) : 0;
4434
- const exclude = [...new Set(contributions.flatMap((contribution) => contribution.exclude ?? []))];
4436
+ const exclude = [...new Set(contributions.flatMap((contribution) => contribution.exclude ?? []))].sort();
4435
4437
  return ReleaseAgeGate.make({
4436
4438
  ageMinutes,
4437
4439
  exclude
@@ -4498,7 +4500,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends Schema.Class("ReleaseAgeGate")
4498
4500
  };
4499
4501
 
4500
4502
  //#endregion
4501
- //#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
4503
+ //#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
4502
4504
  /**
4503
4505
  * One declared dependency of one workspace importer, as the lockfile records it.
4504
4506
  *
@@ -4509,11 +4511,20 @@ var ReleaseAgeGate = class ReleaseAgeGate extends Schema.Class("ReleaseAgeGate")
4509
4511
  * `ClassifiedSpecifier` (`catalog:` / `workspace:` / range / dist-tag / raw),
4510
4512
  * while encoding round-trips the **exact original string byte-for-byte** — the
4511
4513
  * guarantee a before/after lockfile diff relies on.
4512
- * - `version` — the concrete resolved version, **populated by pnpm only**. pnpm
4513
- * records `{ specifier, version }` per importer dependency; bun and npm record
4514
- * resolved versions on their package entries instead, so for those formats
4515
- * `version` is absent and a consumer joins by `name` against
4516
- * `Lockfile.packages`.
4514
+ * - `version` — the concrete resolved version, **populated by pnpm only**:
4515
+ * comparable across refs and printable. pnpm records `{ specifier, version }`
4516
+ * per importer dependency, and the parser splits pnpm's peer-disambiguation
4517
+ * suffix off into `peerSuffix`, so `version` is always the plain version or
4518
+ * a non-registry resolution (`link:../utils`, `file:...`), passed through
4519
+ * verbatim. bun and npm record resolved versions on their package entries
4520
+ * instead, so for those formats `version` is absent and a consumer joins by
4521
+ * `name` against `Lockfile.packages`.
4522
+ * - `peerSuffix` — pnpm's peer-disambiguation context: the raw parenthesized
4523
+ * chain the lockfile recorded after the version, e.g.
4524
+ * `(effect@4.0.0-beta.101)(ioredis@5.11.1(supports-color@8.1.1))`. Present
4525
+ * only when the lockfile recorded one — never for suffix-free pnpm entries,
4526
+ * and never for the other formats, which do not record peer context per
4527
+ * importer dependency.
4517
4528
  * - `depType` — which dependency map declared it, spelled with `@effected/npm`'s
4518
4529
  * kit-wide `DependencyField` vocabulary.
4519
4530
  *
@@ -4523,11 +4534,12 @@ var ImporterDependency = class extends Schema.Class("ImporterDependency")({
4523
4534
  name: Schema.NonEmptyString,
4524
4535
  specifier: DependencySpecifier.FromString,
4525
4536
  version: Schema.optionalKey(Schema.String),
4537
+ peerSuffix: Schema.optionalKey(Schema.String),
4526
4538
  depType: DependencyField
4527
4539
  }) {};
4528
4540
 
4529
4541
  //#endregion
4530
- //#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
4542
+ //#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
4531
4543
  /**
4532
4544
  * One workspace importer's declared dependencies, as the lockfile records them.
4533
4545
  *
@@ -4552,7 +4564,7 @@ var LockfileImporter = class extends Schema.Class("LockfileImporter")({
4552
4564
  }) {};
4553
4565
 
4554
4566
  //#endregion
4555
- //#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
4567
+ //#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
4556
4568
  const EMPTY_DEPENDENCIES = {};
4557
4569
  /**
4558
4570
  * A package resolved from a lockfile.
@@ -4588,7 +4600,7 @@ var ResolvedPackage = class extends Schema.Class("ResolvedPackage")({
4588
4600
  }) {};
4589
4601
 
4590
4602
  //#endregion
4591
- //#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
4603
+ //#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
4592
4604
  /**
4593
4605
  * A directed dependency edge between two workspace packages as recorded in
4594
4606
  * the lockfile.
@@ -4611,7 +4623,7 @@ var WorkspaceDependency = class extends Schema.Class("WorkspaceDependency")({
4611
4623
  }) {};
4612
4624
 
4613
4625
  //#endregion
4614
- //#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
4626
+ //#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
4615
4627
  /**
4616
4628
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
4617
4629
  * when the format is `"pnpm"`.
@@ -4637,7 +4649,7 @@ var PnpmExtension = class extends Schema.Class("PnpmExtension")({
4637
4649
  }) {};
4638
4650
 
4639
4651
  //#endregion
4640
- //#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
4652
+ //#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
4641
4653
  /**
4642
4654
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
4643
4655
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -4672,7 +4684,7 @@ const FILENAMES = {
4672
4684
  const filenameFor = (format) => FILENAMES[format];
4673
4685
 
4674
4686
  //#endregion
4675
- //#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
4687
+ //#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
4676
4688
  /**
4677
4689
  * The four dependency sections of a manifest, in a stable order — the shared
4678
4690
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -4711,22 +4723,54 @@ const toIntegrityHash = (raw) => {
4711
4723
  };
4712
4724
  const decodeSpecifier = Schema.decodeUnknownExit(DependencySpecifier.FromString);
4713
4725
  /**
4726
+ * Split pnpm's peer-disambiguation suffix off a recorded string: everything
4727
+ * from the first `(` on is suffix, since package names and versions never
4728
+ * contain `(`. Handles both shapes pnpm records — a bare version
4729
+ * (`"1.0.0(effect@4.0.0)"`, importer entries) and a `name@version` snapshot key
4730
+ * (`"fdir@6.5.0(picomatch@4.0.4)"`). A string with no `(` — including
4731
+ * `link:...` / `file:...` resolutions — passes through untouched. So does a
4732
+ * protocol-bearing string (a `:` ahead of the first `(`), where a parenthesis
4733
+ * is path or URL text rather than a peer suffix: pnpm attaches suffixes to
4734
+ * registry versions only. This is the single stripping implementation — do not
4735
+ * hand-roll an `indexOf("(")` split elsewhere.
4736
+ *
4737
+ * @internal
4738
+ */
4739
+ const splitPeerSuffix = (raw) => {
4740
+ const parenIndex = raw.indexOf("(");
4741
+ if (parenIndex === -1) return { plain: raw };
4742
+ if (raw.lastIndexOf(":", parenIndex) !== -1) return { plain: raw };
4743
+ return {
4744
+ plain: raw.slice(0, parenIndex),
4745
+ peerSuffix: raw.slice(parenIndex)
4746
+ };
4747
+ };
4748
+ /**
4714
4749
  * Build one {@link ImporterDependency}, decoding the raw specifier string into
4715
4750
  * the `@effected/npm` `ClassifiedSpecifier` tagged union. Returns `undefined`
4716
4751
  * — a skip, never a throw — when the name is empty or the specifier does not
4717
4752
  * classify (e.g. an empty specifier), per the total-string-surgery discipline.
4718
4753
  *
4754
+ * A pnpm-recorded version is normalized through {@link splitPeerSuffix}: the
4755
+ * `version` field carries the plain version and the split-off peer chain lands
4756
+ * in `peerSuffix`. A version that is *only* a peer chain (empty plain part) is
4757
+ * treated as no concrete version — a skip of both fields, never a throw.
4758
+ *
4719
4759
  * @internal
4720
4760
  */
4721
4761
  const buildImporterDependency = (name, specifier, depType, version) => {
4722
4762
  if (name === "") return void 0;
4723
4763
  const exit = decodeSpecifier(specifier);
4724
4764
  if (Exit.isFailure(exit)) return void 0;
4765
+ const resolved = version !== void 0 && version !== "" ? splitPeerSuffix(version) : void 0;
4725
4766
  return ImporterDependency.make({
4726
4767
  name,
4727
4768
  specifier: exit.value,
4728
4769
  depType,
4729
- ...version !== void 0 && version !== "" ? { version } : {}
4770
+ ...resolved !== void 0 && resolved.plain !== "" ? {
4771
+ version: resolved.plain,
4772
+ ...resolved.peerSuffix !== void 0 ? { peerSuffix: resolved.peerSuffix } : {}
4773
+ } : {}
4730
4774
  });
4731
4775
  };
4732
4776
  /**
@@ -6614,7 +6658,7 @@ var JsoncModifier = class {
6614
6658
  };
6615
6659
 
6616
6660
  //#endregion
6617
- //#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
6661
+ //#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
6618
6662
  const DepRecord$2 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
6619
6663
  const BunWorkspaceEntry = Schema.Struct({
6620
6664
  name: Schema.optionalKey(Schema.String),
@@ -6708,7 +6752,7 @@ const toFields$3 = (raw) => Effect.gen(function* () {
6708
6752
  });
6709
6753
 
6710
6754
  //#endregion
6711
- //#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
6755
+ //#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
6712
6756
  const DepRecord$1 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
6713
6757
  const NpmPackageEntry = Schema.Struct({
6714
6758
  name: Schema.optionalKey(Schema.String),
@@ -6807,7 +6851,7 @@ const toFields$2 = (raw) => Effect.gen(function* () {
6807
6851
  });
6808
6852
 
6809
6853
  //#endregion
6810
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/YamlNode.js
6854
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/YamlNode.js
6811
6855
  /**
6812
6856
  * YAML scalar presentation styles.
6813
6857
  *
@@ -7210,7 +7254,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
7210
7254
  }
7211
7255
 
7212
7256
  //#endregion
7213
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/diagnostics.js
7257
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/diagnostics.js
7214
7258
  /** Error codes emitted by the lexer stage. */
7215
7259
  const YAML_LEX_ERROR_CODES = [
7216
7260
  "UnexpectedCharacter",
@@ -7289,7 +7333,7 @@ function isFatalCode(code) {
7289
7333
  }
7290
7334
 
7291
7335
  //#endregion
7292
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/YamlDiagnostic.js
7336
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/YamlDiagnostic.js
7293
7337
  /**
7294
7338
  * Error codes emitted by the lexer stage.
7295
7339
  *
@@ -7411,7 +7455,7 @@ function lineChar(text, offset) {
7411
7455
  }
7412
7456
 
7413
7457
  //#endregion
7414
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/anchors.js
7458
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/anchors.js
7415
7459
  /**
7416
7460
  * Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
7417
7461
  * Aliases represent references to existing anchored nodes and cannot have their own anchors.
@@ -7505,7 +7549,7 @@ function collectAnchors(node, anchors) {
7505
7549
  }
7506
7550
 
7507
7551
  //#endregion
7508
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/lexer.js
7552
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/lexer.js
7509
7553
  /**
7510
7554
  * Create a new YAML scanner for the given source text.
7511
7555
  *
@@ -8463,7 +8507,7 @@ function lexAll(text) {
8463
8507
  }
8464
8508
 
8465
8509
  //#endregion
8466
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/cst-parser.js
8510
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/cst-parser.js
8467
8511
  /**
8468
8512
  * Hardening: cap CST nesting so hostile inputs cannot overflow the stack
8469
8513
  * while the tree is being BUILT. Set slightly above the composer's
@@ -9176,7 +9220,7 @@ function parseCSTAll(text) {
9176
9220
  }
9177
9221
 
9178
9222
  //#endregion
9179
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/state.js
9223
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/state.js
9180
9224
  let lineStartsText;
9181
9225
  let lineStartsCache = [];
9182
9226
  function getLineStarts(text) {
@@ -9283,7 +9327,7 @@ function exitNesting(state) {
9283
9327
  }
9284
9328
 
9285
9329
  //#endregion
9286
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/tags.js
9330
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/tags.js
9287
9331
  /**
9288
9332
  * Resolve a tag shorthand using the document's %TAG directives.
9289
9333
  * For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
@@ -9370,7 +9414,7 @@ function validateTagHandlesInDocument(docCst, state) {
9370
9414
  }
9371
9415
 
9372
9416
  //#endregion
9373
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/scalars.js
9417
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/scalars.js
9374
9418
  const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
9375
9419
  const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
9376
9420
  const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
@@ -10249,7 +10293,7 @@ function shouldPreserveRaw(rawValue, value) {
10249
10293
  }
10250
10294
 
10251
10295
  //#endregion
10252
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/block.js
10296
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/block.js
10253
10297
  /**
10254
10298
  * Compose a block map from its CST children, with an optional external first key.
10255
10299
  *
@@ -11398,7 +11442,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
11398
11442
  }
11399
11443
 
11400
11444
  //#endregion
11401
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/flow.js
11445
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/flow.js
11402
11446
  /**
11403
11447
  * Validate that flow collection entries are separated by commas.
11404
11448
  *
@@ -11791,7 +11835,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
11791
11835
  }
11792
11836
 
11793
11837
  //#endregion
11794
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/document.js
11838
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/document.js
11795
11839
  /** The flow-composer dispatch wired into every state this module creates. */
11796
11840
  const FLOW = {
11797
11841
  composeFlowMap,
@@ -12458,7 +12502,7 @@ function composeAllDocuments(text, options) {
12458
12502
  }
12459
12503
 
12460
12504
  //#endregion
12461
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/fold.js
12505
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/fold.js
12462
12506
  /**
12463
12507
  * Column-based line folding for a single logical scalar line (YAML 1.2 flow
12464
12508
  * folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
@@ -12695,7 +12739,7 @@ function renderBlockFolded(s, indent) {
12695
12739
  }
12696
12740
 
12697
12741
  //#endregion
12698
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/stringifier.js
12742
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/stringifier.js
12699
12743
  /**
12700
12744
  * Thrown by the stringifier on its failure paths (circular references). The
12701
12745
  * facade catches this and materializes the public stringify error.
@@ -13067,7 +13111,7 @@ function stringifyValue(value, options) {
13067
13111
  }
13068
13112
 
13069
13113
  //#endregion
13070
- //#region ../../node_modules/.pnpm/@effected+yaml@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/yaml/Yaml.js
13114
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/Yaml.js
13071
13115
  /**
13072
13116
  * Options controlling parse behavior. All fields are omissible; absent fields
13073
13117
  * resolve to `strict` `true`, `maxAliasCount` `100` (the alias-based
@@ -13719,7 +13763,7 @@ function deepEqualValues(a, b) {
13719
13763
  }
13720
13764
 
13721
13765
  //#endregion
13722
- //#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
13766
+ //#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
13723
13767
  /**
13724
13768
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
13725
13769
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -13790,7 +13834,7 @@ const selectSoleDocument = (content) => Effect.gen(function* () {
13790
13834
  });
13791
13835
 
13792
13836
  //#endregion
13793
- //#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
13837
+ //#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
13794
13838
  const PnpmImporterDeps = Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({
13795
13839
  specifier: Schema.String,
13796
13840
  version: Schema.String
@@ -13887,8 +13931,7 @@ const toFields$1 = (raw) => Effect.gen(function* () {
13887
13931
  }));
13888
13932
  }
13889
13933
  if (raw.packages) for (const [key, pkg] of Object.entries(raw.packages)) {
13890
- const parenIndex = key.indexOf("(");
13891
- const bare = parenIndex === -1 ? key : key.slice(0, parenIndex);
13934
+ const { plain: bare } = splitPeerSuffix(key);
13892
13935
  const atIndex = bare.lastIndexOf("@");
13893
13936
  if (atIndex <= 0) continue;
13894
13937
  const name = bare.slice(0, atIndex);
@@ -13917,7 +13960,7 @@ const toFields$1 = (raw) => Effect.gen(function* () {
13917
13960
  });
13918
13961
 
13919
13962
  //#endregion
13920
- //#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
13963
+ //#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
13921
13964
  const YarnLockfileRaw = Schema.Record(Schema.String, Schema.Unknown);
13922
13965
  const DepRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
13923
13966
  const YarnEntry = Schema.Struct({
@@ -14041,7 +14084,7 @@ const cleanYarnDeps = (deps) => {
14041
14084
  };
14042
14085
 
14043
14086
  //#endregion
14044
- //#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
14087
+ //#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
14045
14088
  const EMPTY_IMPORTERS = [];
14046
14089
  /**
14047
14090
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -14286,7 +14329,7 @@ var Lockfile = class Lockfile extends Schema.Class("Lockfile")({
14286
14329
  };
14287
14330
 
14288
14331
  //#endregion
14289
- //#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
14332
+ //#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
14290
14333
  /**
14291
14334
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
14292
14335
  * lockfile against: a package name plus the four optional dependency maps.
@@ -14403,7 +14446,7 @@ var LockfileIntegrity = class LockfileIntegrity extends Schema.Class("LockfileIn
14403
14446
  };
14404
14447
 
14405
14448
  //#endregion
14406
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14449
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14407
14450
  /**
14408
14451
  * A resolved dependency entry pairing a package name with its version
14409
14452
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -14468,7 +14511,7 @@ var Dependency = class extends Schema.Class("Dependency")({
14468
14511
  };
14469
14512
 
14470
14513
  //#endregion
14471
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14514
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14472
14515
  /**
14473
14516
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
14474
14517
  *
@@ -16066,7 +16109,7 @@ const SpdxExpression = {
16066
16109
  };
16067
16110
 
16068
16111
  //#endregion
16069
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16112
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16070
16113
  /**
16071
16114
  * Indicates that a string is not a valid SPDX license identifier or expression.
16072
16115
  *
@@ -16102,7 +16145,7 @@ const isValidSpdx = (value) => {
16102
16145
  const SpdxLicense = Schema.String.pipe(Schema.check(Schema.makeFilter((value) => isValidSpdx(value) ? void 0 : "Expected a valid SPDX license expression")), Schema.brand("SpdxLicense"));
16103
16146
 
16104
16147
  //#endregion
16105
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16148
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16106
16149
  const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
16107
16150
  /**
16108
16151
  * The `packageManager` field only ever carries corepack's `<algo>.<hex>`
@@ -16161,7 +16204,7 @@ var PackageManager = class PackageManager extends Schema.Class("PackageManager")
16161
16204
  };
16162
16205
 
16163
16206
  //#endregion
16164
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16207
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16165
16208
  /**
16166
16209
  * Indicates that a string could not be used as a valid npm package name.
16167
16210
  *
@@ -16220,7 +16263,7 @@ const PackageName = Object.assign(Schema.Union([ScopedPackageName, UnscopedPacka
16220
16263
  });
16221
16264
 
16222
16265
  //#endregion
16223
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16266
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16224
16267
  const parsePersonString = (input) => {
16225
16268
  const emailMatch = input.match(/<([^>]+)>/);
16226
16269
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -16364,7 +16407,7 @@ var Person = class Person extends Schema.Class("Person")({
16364
16407
  };
16365
16408
 
16366
16409
  //#endregion
16367
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16410
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16368
16411
  const KEY_INDEX = new Map([
16369
16412
  "$schema",
16370
16413
  "name",
@@ -16588,7 +16631,7 @@ const renderJson = (raw, options) => {
16588
16631
  };
16589
16632
 
16590
16633
  //#endregion
16591
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16634
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16592
16635
  const toHashMap = SchemaTransformation.transform({
16593
16636
  decode: (record) => HashMap.fromIterable(Object.entries(record)),
16594
16637
  encode: (map) => Object.fromEntries(HashMap.toEntries(map))
@@ -16907,7 +16950,7 @@ var Package = class Package extends Schema.Class("Package")({
16907
16950
  };
16908
16951
 
16909
16952
  //#endregion
16910
- //#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
16953
+ //#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
16911
16954
  const EMPTY$1 = Object.freeze(Object.create(null));
16912
16955
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
16913
16956
  /**
@@ -17516,7 +17559,7 @@ const Walker$1 = {
17516
17559
  };
17517
17560
 
17518
17561
  //#endregion
17519
- //#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
17562
+ //#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
17520
17563
  /**
17521
17564
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
17522
17565
  *
@@ -17704,7 +17747,7 @@ var WorkspaceRoot = class WorkspaceRoot extends Context.Service()("@effected/wor
17704
17747
  };
17705
17748
 
17706
17749
  //#endregion
17707
- //#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
17750
+ //#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
17708
17751
  /**
17709
17752
  * Hard ceiling on directories the enumerator will visit for one pattern set.
17710
17753
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -17723,7 +17766,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
17723
17766
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
17724
17767
 
17725
17768
  //#endregion
17726
- //#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
17769
+ //#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
17727
17770
  /** Directory names never descended into. */
17728
17771
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
17729
17772
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -17814,7 +17857,7 @@ var Traversal = class {
17814
17857
  };
17815
17858
 
17816
17859
  //#endregion
17817
- //#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
17860
+ //#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
17818
17861
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
17819
17862
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
17820
17863
  /**
@@ -17885,7 +17928,7 @@ const enumerate = (root, globs, options) => Effect.gen(function* () {
17885
17928
  });
17886
17929
 
17887
17930
  //#endregion
17888
- //#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
17931
+ //#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
17889
17932
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
17890
17933
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
17891
17934
  const pnpmPatternsOf = (document) => {
@@ -17943,7 +17986,7 @@ const readPatterns = (root) => Effect.gen(function* () {
17943
17986
  });
17944
17987
 
17945
17988
  //#endregion
17946
- //#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
17989
+ //#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
17947
17990
  /**
17948
17991
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
17949
17992
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -18378,7 +18421,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends Context.Service()("@ef
18378
18421
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
18379
18422
 
18380
18423
  //#endregion
18381
- //#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
18424
+ //#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
18382
18425
  /**
18383
18426
  * Raised when the workspace dependency graph cannot be topologically ordered
18384
18427
  * because it contains a cycle.
@@ -18614,7 +18657,7 @@ const kahn = (edges) => {
18614
18657
  };
18615
18658
 
18616
18659
  //#endregion
18617
- //#region ../../node_modules/.pnpm/@effected+git@0.4.2_effect@4.0.0-beta.101/node_modules/@effected/git/GitCommand.js
18660
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/GitCommand.js
18618
18661
  /**
18619
18662
  * Builds a `git` `ChildProcess.StandardCommand` with the argv this package
18620
18663
  * classifies against.
@@ -19034,7 +19077,7 @@ const GitCommand = {
19034
19077
  };
19035
19078
 
19036
19079
  //#endregion
19037
- //#region ../../node_modules/.pnpm/@effected+git@0.4.2_effect@4.0.0-beta.101/node_modules/@effected/git/internal/run.js
19080
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/internal/run.js
19038
19081
  /**
19039
19082
  * Spawns `command` and collects its stdout, stderr, and exit code as a single
19040
19083
  * triple.
@@ -19062,7 +19105,7 @@ const runCollected = (command) => Effect.scoped(Effect.gen(function* () {
19062
19105
  }));
19063
19106
 
19064
19107
  //#endregion
19065
- //#region ../../node_modules/.pnpm/@effected+git@0.4.2_effect@4.0.0-beta.101/node_modules/@effected/git/Git.js
19108
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/Git.js
19066
19109
  /** git's own ceiling: a run that has not answered in 30s is not going to. */
19067
19110
  const GIT_TIMEOUT = Duration.seconds(30);
19068
19111
  /**
@@ -19949,6 +19992,12 @@ const make = (spawner) => {
19949
19992
  };
19950
19993
  };
19951
19994
  /**
19995
+ * The default for every {@link Git.makeTest} method a test did not stub: a
19996
+ * defect naming the method, so an unexercised call fails loudly instead of
19997
+ * succeeding with a lie or failing with a dishonest typed error.
19998
+ */
19999
+ const notStubbed = (method) => () => 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.`));
20000
+ /**
19952
20001
  * Typed git introspection over core's `ChildProcessSpawner`: read a
19953
20002
  * repository's state at any ref without checking it out, plus the mutating
19954
20003
  * tier (`checkout`, `fetch`, `fetchAny`, `submoduleUpdate`, `submoduleAdd`,
@@ -19971,16 +20020,103 @@ const make = (spawner) => {
19971
20020
  *
19972
20021
  * @public
19973
20022
  */
19974
- var Git = class extends Context.Service()("@effected/git/Git") {
20023
+ var Git = class Git extends Context.Service()("@effected/git/Git") {
19975
20024
  /** Resolves `ChildProcessSpawner` once, at construction — every method's `R` is `never`. */
19976
20025
  static layer = Layer.effect(this, Effect.gen(function* () {
19977
20026
  const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
19978
20027
  return make(spawner);
19979
20028
  }));
20029
+ /**
20030
+ * An in-memory test double of the service shape: stub only the methods the
20031
+ * test exercises, every other method **dies** with a defect naming itself.
20032
+ *
20033
+ * @remarks
20034
+ * Unlike `WorkspaceDiscovery.makeTest`, **no method here has an honest
20035
+ * default** — the shape is twenty-six unrelated git operations, and a
20036
+ * fabricated answer for any of them (an empty tree, a made-up sha, a silent
20037
+ * no-op `checkout`) would leak into consumer logic as fact. So every
20038
+ * unstubbed method fails loudly as a defect
20039
+ * (`Git.makeTest: <name>() was called but not stubbed`) rather than
20040
+ * succeeding with a lie or failing with a dishonest typed error — which is
20041
+ * also what makes the double a proof that a test touches *nothing but* the
20042
+ * methods it stubbed.
20043
+ *
20044
+ * The double deliberately models **none** of the live service's semantics:
20045
+ * no stderr classification, no option-injection guard (an option-like ref a
20046
+ * stub accepts would be refused live), no `LC_ALL=C` pinning, no timeout,
20047
+ * and no `./`-vs-bare path resolution on `show` — a stub answers exactly
20048
+ * what it is told and nothing else. A suite exercising any of those wants
20049
+ * `Git.layer` over a mocked `ChildProcessSpawner` (or real git) instead.
20050
+ *
20051
+ * @example
20052
+ * ```ts
20053
+ * import { Git } from "@effected/git";
20054
+ * import { Effect, Option } from "effect";
20055
+ *
20056
+ * const double = Git.makeTest({
20057
+ * show: (_cwd, _ref, path) =>
20058
+ * Effect.succeed(path === "./package.json" ? Option.some("{}") : Option.none()),
20059
+ * });
20060
+ * // `double.show(...)` answers; `double.status(...)` dies, named.
20061
+ * ```
20062
+ */
20063
+ static makeTest = (overrides = {}) => ({
20064
+ show: notStubbed("show"),
20065
+ lsTree: notStubbed("lsTree"),
20066
+ refExists: notStubbed("refExists"),
20067
+ mergeBase: notStubbed("mergeBase"),
20068
+ changedFiles: notStubbed("changedFiles"),
20069
+ workingChanges: notStubbed("workingChanges"),
20070
+ revParse: notStubbed("revParse"),
20071
+ checkout: notStubbed("checkout"),
20072
+ fetch: notStubbed("fetch"),
20073
+ fetchAny: notStubbed("fetchAny"),
20074
+ submoduleUpdate: notStubbed("submoduleUpdate"),
20075
+ submoduleAdd: notStubbed("submoduleAdd"),
20076
+ sparseCheckoutSet: notStubbed("sparseCheckoutSet"),
20077
+ configSet: notStubbed("configSet"),
20078
+ add: notStubbed("add"),
20079
+ nameStatus: notStubbed("nameStatus"),
20080
+ unstagedChanges: notStubbed("unstagedChanges"),
20081
+ stagedChanges: notStubbed("stagedChanges"),
20082
+ untrackedFiles: notStubbed("untrackedFiles"),
20083
+ defaultBranch: notStubbed("defaultBranch"),
20084
+ currentBranch: notStubbed("currentBranch"),
20085
+ repoRoot: notStubbed("repoRoot"),
20086
+ configGet: notStubbed("configGet"),
20087
+ remoteUrl: notStubbed("remoteUrl"),
20088
+ commitInfo: notStubbed("commitInfo"),
20089
+ status: notStubbed("status"),
20090
+ ...overrides
20091
+ });
20092
+ /**
20093
+ * The test layer: {@link Git.makeTest} behind `Layer.succeed`, so a suite
20094
+ * provides only the methods it exercises.
20095
+ *
20096
+ * @remarks
20097
+ * A parameterized layer factory mints a **fresh reference per call**, and
20098
+ * layers memoize by reference — bind the result to a `const` and reuse it
20099
+ * rather than calling `layerTest(...)` at each composition site.
20100
+ *
20101
+ * @example
20102
+ * ```ts
20103
+ * import { Git, LsTreeEntry } from "@effected/git";
20104
+ * import { Effect } from "effect";
20105
+ *
20106
+ * const TestGit = Git.layerTest({
20107
+ * lsTree: () =>
20108
+ * Effect.succeed([
20109
+ * LsTreeEntry.make({ mode: "100644", type: "blob", oid: "0".repeat(40), path: "package.json" }),
20110
+ * ]),
20111
+ * });
20112
+ * // program.pipe(Effect.provide(TestGit))
20113
+ * ```
20114
+ */
20115
+ static layerTest = (overrides = {}) => Layer.succeed(Git, Git.makeTest(overrides));
19980
20116
  };
19981
20117
 
19982
20118
  //#endregion
19983
- //#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
20119
+ //#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
19984
20120
  /**
19985
20121
  * Which git refs to compare, and whether to fold in the working tree.
19986
20122
  *
@@ -20262,7 +20398,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
20262
20398
  }
20263
20399
 
20264
20400
  //#endregion
20265
- //#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
20401
+ //#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
20266
20402
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
20267
20403
  const inlineCatalogs = (manifest) => {
20268
20404
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -20327,7 +20463,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
20327
20463
  };
20328
20464
 
20329
20465
  //#endregion
20330
- //#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
20466
+ //#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
20331
20467
  /** Whether `value` is a non-null, non-array object. */
20332
20468
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
20333
20469
  /**
@@ -20514,7 +20650,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends Context.Service(
20514
20650
  };
20515
20651
 
20516
20652
  //#endregion
20517
- //#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
20653
+ //#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
20518
20654
  /**
20519
20655
  * The four package managers this package understands.
20520
20656
  *
@@ -20757,7 +20893,7 @@ var PackageManagerDetector = class PackageManagerDetector extends Context.Servic
20757
20893
  };
20758
20894
 
20759
20895
  //#endregion
20760
- //#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
20896
+ //#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
20761
20897
  /**
20762
20898
  * Raised when the workspace's lockfile cannot be read off disk.
20763
20899
  *
@@ -20780,6 +20916,8 @@ var LockfileReadError = class extends Schema.TaggedErrorClass()("LockfileReadErr
20780
20916
  return `Cannot read ${this.format} lockfile at ${this.lockfilePath}`;
20781
20917
  }
20782
20918
  };
20919
+ /** A defect naming the unstubbed test-double method — a test-wiring mistake, not a typed failure. */
20920
+ const unstubbed$2 = (method) => Effect.die(/* @__PURE__ */ new Error(`LockfileReader.makeTest: ${method}() was called but not stubbed — pass a \`${method}\` override.`));
20783
20921
  /**
20784
20922
  * Reads and parses the workspace's lockfile.
20785
20923
  *
@@ -20865,10 +21003,78 @@ var LockfileReader = class LockfileReader extends Context.Service()("@effected/w
20865
21003
  * `const` and reuse it.
20866
21004
  */
20867
21005
  static layer = (options) => Layer.effect(LockfileReader, LockfileReader.make(options));
21006
+ /**
21007
+ * A test double satisfying the full {@link LockfileReaderShape} with no
21008
+ * filesystem, root walk, or package-manager detection.
21009
+ *
21010
+ * @remarks
21011
+ * There is **no honest default lockfile**: an empty one that looks like a
21012
+ * legitimate answer is indistinguishable from "this workspace resolves
21013
+ * nothing" — the silent-empty failure class this package documents on the
21014
+ * live paths — so `read` **dies** with an instructive defect until stubbed.
21015
+ *
21016
+ * The one derivation mirrors `WorkspaceDiscovery.makeTest`'s
21017
+ * derived-from-the-primary rule: when a `read` override is supplied,
21018
+ * `resolvedVersion` answers as the live service does — the **first** entry
21019
+ * of `lockfile.packagesNamed(name)` in lockfile order, `Option.none()` on a
21020
+ * miss — so the two stay consistent by construction. `integrity` is **not**
21021
+ * derivable: the live method compares the lockfile against the workspace
21022
+ * manifests discovery enumerates, and the double has no discovery to ask, so
21023
+ * it dies unless stubbed.
21024
+ *
21025
+ * `refresh` defaults to `Effect.void` honestly: the live contract is "drop
21026
+ * the memoized read so the next call re-reads", and this double memoizes
21027
+ * nothing — every `read()` call re-invokes the override — so there is
21028
+ * nothing to drop and the no-op is truthful, the same reasoning as
21029
+ * `WorkspaceDiscovery.makeTest`'s `refresh`.
21030
+ *
21031
+ * @example
21032
+ * ```ts
21033
+ * import { Lockfile } from "@effected/lockfiles";
21034
+ * import { LockfileReader } from "@effected/workspaces";
21035
+ * import { Effect } from "effect";
21036
+ *
21037
+ * const double = LockfileReader.makeTest({
21038
+ * read: () =>
21039
+ * Effect.succeed(
21040
+ * Lockfile.make({ format: "pnpm", lockfileVersion: "9.0", packages: [], workspaceDependencies: [] }),
21041
+ * ),
21042
+ * });
21043
+ * // `resolvedVersion` now answers consistently from that lockfile.
21044
+ * ```
21045
+ */
21046
+ static makeTest = (overrides = {}) => {
21047
+ const read = overrides.read;
21048
+ return {
21049
+ read: () => unstubbed$2("read"),
21050
+ resolvedVersion: read !== void 0 ? (packageName) => Effect.map(read(), (lockfile) => Option.fromUndefinedOr(lockfile.packagesNamed(packageName)[0])) : () => unstubbed$2("resolvedVersion"),
21051
+ integrity: () => unstubbed$2("integrity"),
21052
+ refresh: () => Effect.void,
21053
+ ...overrides
21054
+ };
21055
+ };
21056
+ /**
21057
+ * The test layer: {@link LockfileReader.makeTest} behind `Layer.succeed`, so
21058
+ * a suite provides only the methods it exercises.
21059
+ *
21060
+ * @remarks
21061
+ * A parameterized layer factory mints a **fresh reference per call**, and
21062
+ * layers memoize by reference — bind the result to a `const` and reuse it
21063
+ * rather than calling `layerTest(...)` at each composition site.
21064
+ *
21065
+ * @example
21066
+ * ```ts
21067
+ * import { LockfileReader } from "@effected/workspaces";
21068
+ *
21069
+ * const TestLockfiles = LockfileReader.layerTest();
21070
+ * // program.pipe(Effect.provide(TestLockfiles)) — dies loudly if touched.
21071
+ * ```
21072
+ */
21073
+ static layerTest = (overrides = {}) => Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
20868
21074
  };
20869
21075
 
20870
21076
  //#endregion
20871
- //#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
21077
+ //#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
20872
21078
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
20873
21079
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
20874
21080
  /**
@@ -20969,7 +21175,94 @@ var PublishabilityDetector = class PublishabilityDetector extends Context.Servic
20969
21175
  };
20970
21176
 
20971
21177
  //#endregion
20972
- //#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
21178
+ //#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
21179
+ /**
21180
+ * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
21181
+ *
21182
+ * pnpm records an importer version as the resolved version followed by the peer
21183
+ * 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))`.
21184
+ * `@effected/lockfiles` stores that string verbatim (its `packages:` key parser
21185
+ * strips the suffix; the importer entries deliberately keep it), so the raw
21186
+ * value must never reach a consumer's dependency table — it would render the
21187
+ * whole parenthesized chain as the "version" a dependency moved to.
21188
+ *
21189
+ * Everything from the first `(` is dropped; a version with no suffix passes
21190
+ * through untouched.
21191
+ */
21192
+ const stripPeerSuffix = (version) => {
21193
+ const paren = version.indexOf("(");
21194
+ return paren === -1 ? version : version.slice(0, paren);
21195
+ };
21196
+ /**
21197
+ * Whether a recorded importer version is a concrete version usable as a
21198
+ * resolution answer.
21199
+ *
21200
+ * A `link:` / `file:` entry records a filesystem edge rather than a version, and
21201
+ * an empty string is pnpm's "specifier only, nothing installed" marker. Both
21202
+ * would be worse than no answer at all: the fallback exists to report a concrete
21203
+ * version movement, and reporting `link:../foo` as a version is noise a
21204
+ * changeset would carry into release notes.
21205
+ */
21206
+ const isConcreteVersion = (version) => version.length > 0 && !version.startsWith("link:") && !version.startsWith("file:");
21207
+ /**
21208
+ * Build the importer-path → dependency-name → version index a snapshot uses to
21209
+ * answer `catalog:` specifiers its catalog set cannot resolve.
21210
+ *
21211
+ * @remarks
21212
+ * Keyed by **name only** within each importer, deliberately across every
21213
+ * dependency field. The bug this fixes is a peer declared `catalog:effect:peers`
21214
+ * whose importer records no `peerDependencies` entry at all — pnpm writes peer
21215
+ * declarations into the importer block only when they are also installed, so the
21216
+ * concrete version lives on the package's `devDependencies` row for the same
21217
+ * name. Joining by name across fields is what finds it; joining by field, or by
21218
+ * matching the recorded specifier, would not.
21219
+ *
21220
+ * Only pnpm populates importer versions; bun and npm record resolved versions on
21221
+ * their package entries instead, so those formats yield an empty index and the
21222
+ * fallback is inert for them.
21223
+ */
21224
+ const importerVersionsOf = (lockfile) => {
21225
+ const index = Object.create(null);
21226
+ for (const importer of lockfile.importers) {
21227
+ const versions = Object.create(null);
21228
+ for (const dependency of importer.dependencies) {
21229
+ const recorded = dependency.version;
21230
+ if (recorded === void 0) continue;
21231
+ const version = stripPeerSuffix(recorded);
21232
+ if (!isConcreteVersion(version)) continue;
21233
+ versions[dependency.name] ??= version;
21234
+ }
21235
+ index[importer.path] = versions;
21236
+ }
21237
+ return index;
21238
+ };
21239
+ /**
21240
+ * The version every importer agrees `dependency` resolved to, or `undefined`
21241
+ * when they disagree or none record it.
21242
+ *
21243
+ * @remarks
21244
+ * The unambiguity rule is what makes a workspace-wide answer safe from a
21245
+ * snapshot method that receives no importer context. Two packages in one
21246
+ * monorepo may legitimately hold different versions of the same dependency; in
21247
+ * that case there is no single correct answer, so this yields nothing and the
21248
+ * caller keeps today's behavior (no row) rather than inventing a wrong one.
21249
+ */
21250
+ const unanimousVersionOf = (index, dependency) => {
21251
+ let agreed;
21252
+ for (const versions of Object.values(index)) {
21253
+ const version = versions[dependency];
21254
+ if (version === void 0) continue;
21255
+ if (agreed === void 0) {
21256
+ agreed = version;
21257
+ continue;
21258
+ }
21259
+ if (agreed !== version) return void 0;
21260
+ }
21261
+ return agreed;
21262
+ };
21263
+
21264
+ //#endregion
21265
+ //#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
20973
21266
  /**
20974
21267
  * An immutable, fully-normalized catalog collection — the one catalog
20975
21268
  * resolution semantic in the package.
@@ -21245,6 +21538,8 @@ const validatePnpmWorkspaceCatalogs = (document) => {
21245
21538
  catalogs: "catalogs"
21246
21539
  }));
21247
21540
  };
21541
+ /** A defect naming the unstubbed test-double method — a test-wiring mistake, not a typed failure. */
21542
+ const unstubbed$1 = (method) => Effect.die(/* @__PURE__ */ new Error(`WorkspaceCatalogs.makeTest: ${method}() was called but not stubbed — pass a \`${method}\` override.`));
21248
21543
  /**
21249
21544
  * Assembles a workspace's catalogs, package-manager-aware.
21250
21545
  *
@@ -21288,7 +21583,15 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
21288
21583
  }));
21289
21584
  const assemble = Effect.gen(function* () {
21290
21585
  const root = yield* Effect.suspend(() => roots.find(options?.cwd ?? process.cwd()));
21291
- const fromLockfile = yield* lockfiles.read().pipe(Effect.map(CatalogSet.fromLockfile), Effect.catch((_failure) => Effect.succeed(CatalogSet.empty())));
21586
+ const lockfileOutputs = yield* lockfiles.read().pipe(Effect.map((lockfile) => ({
21587
+ catalogs: CatalogSet.fromLockfile(lockfile),
21588
+ importerVersions: importerVersionsOf(lockfile)
21589
+ })), Effect.catch((_failure) => Effect.succeed({
21590
+ catalogs: CatalogSet.empty(),
21591
+ importerVersions: {}
21592
+ })));
21593
+ const fromLockfile = lockfileOutputs.catalogs;
21594
+ const importerVersions = lockfileOutputs.importerVersions;
21292
21595
  const workspaceYaml = path.join(root, "pnpm-workspace.yaml");
21293
21596
  const hasPnpmWorkspace = yield* probeExists(workspaceYaml);
21294
21597
  let inline;
@@ -21316,7 +21619,8 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
21316
21619
  const manifestPath = path.join(root, "package.json");
21317
21620
  if (!(yield* probeExists(manifestPath))) return {
21318
21621
  catalogs: fromLockfile,
21319
- releaseAgeGate: ReleaseAgeGate.combine()
21622
+ releaseAgeGate: ReleaseAgeGate.combine(),
21623
+ importerVersions
21320
21624
  };
21321
21625
  const text = yield* fs.readFileString(manifestPath).pipe(Effect.mapError((cause) => new CatalogAssemblyError({
21322
21626
  source: "manifest",
@@ -21335,7 +21639,8 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
21335
21639
  }));
21336
21640
  return {
21337
21641
  catalogs: assembled,
21338
- releaseAgeGate
21642
+ releaseAgeGate,
21643
+ importerVersions
21339
21644
  };
21340
21645
  });
21341
21646
  const [resolveOnce, invalidate] = yield* Effect.cachedInvalidateWithTTL(assemble, Duration.infinity);
@@ -21349,6 +21654,9 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
21349
21654
  }),
21350
21655
  releaseAgeGate: Effect.fn("WorkspaceCatalogs.releaseAgeGate")(function* () {
21351
21656
  return (yield* memo).releaseAgeGate;
21657
+ }),
21658
+ importerVersions: Effect.fn("WorkspaceCatalogs.importerVersions")(function* () {
21659
+ return (yield* memo).importerVersions;
21352
21660
  })
21353
21661
  };
21354
21662
  });
@@ -21375,6 +21683,70 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
21375
21683
  */
21376
21684
  static layerWithConfigDependencies = (options) => Layer.effect(WorkspaceCatalogs, WorkspaceCatalogs.make(options)).pipe(Layer.provide(ConfigDependencyHooks.layerLive));
21377
21685
  /**
21686
+ * A test double satisfying the full {@link WorkspaceCatalogsShape} with no
21687
+ * filesystem, lockfile read, or hook replay.
21688
+ *
21689
+ * @remarks
21690
+ * There is **no honest default catalog set**: an empty `CatalogSet` that
21691
+ * looks like a legitimate answer is the "every dependency looks newly added"
21692
+ * failure class the live assembler hard-fails to prevent, so every method
21693
+ * **dies** with an instructive defect until stubbed — a test-wiring mistake
21694
+ * fails loudly as a defect rather than succeeding with a lie or failing with
21695
+ * a dishonest typed error.
21696
+ *
21697
+ * The one derivation mirrors `WorkspaceDiscovery.makeTest`'s
21698
+ * derived-from-the-primary rule: when a `set` override is supplied,
21699
+ * `resolveSpecifier` answers from that `CatalogSet`'s own
21700
+ * {@link CatalogSet.resolveSpecifier} — exactly what the live service runs
21701
+ * over its assembled set — so the two stay consistent by construction.
21702
+ * `releaseAgeGate` and `importerVersions` are **not** derivable from a
21703
+ * catalog set (the gate comes from release-age keys and hook contributions,
21704
+ * the importer index from the lockfile's importer blocks — neither is in a
21705
+ * `CatalogSet`) and always die unless stubbed.
21706
+ *
21707
+ * @example
21708
+ * ```ts
21709
+ * import { CatalogSet, WorkspaceCatalogs } from "@effected/workspaces";
21710
+ * import { Effect } from "effect";
21711
+ *
21712
+ * const double = WorkspaceCatalogs.makeTest({
21713
+ * set: () => Effect.succeed(CatalogSet.fromCatalogs({ default: { effect: "4.0.0" } })),
21714
+ * });
21715
+ * // `resolveSpecifier` now answers consistently from that set.
21716
+ * ```
21717
+ */
21718
+ static makeTest = (overrides = {}) => {
21719
+ const set = overrides.set;
21720
+ return {
21721
+ set: () => unstubbed$1("set"),
21722
+ resolveSpecifier: set !== void 0 ? (dependency, specifier) => Effect.map(set(), (catalogs) => catalogs.resolveSpecifier(dependency, specifier)) : () => unstubbed$1("resolveSpecifier"),
21723
+ releaseAgeGate: () => unstubbed$1("releaseAgeGate"),
21724
+ importerVersions: () => unstubbed$1("importerVersions"),
21725
+ ...overrides
21726
+ };
21727
+ };
21728
+ /**
21729
+ * The test layer: {@link WorkspaceCatalogs.makeTest} behind `Layer.succeed`,
21730
+ * so a suite provides only the methods it exercises.
21731
+ *
21732
+ * @remarks
21733
+ * A parameterized layer factory mints a **fresh reference per call**, and
21734
+ * layers memoize by reference — bind the result to a `const` and reuse it
21735
+ * rather than calling `layerTest(...)` at each composition site.
21736
+ *
21737
+ * @example
21738
+ * ```ts
21739
+ * import { CatalogSet, WorkspaceCatalogs } from "@effected/workspaces";
21740
+ * import { Effect } from "effect";
21741
+ *
21742
+ * const TestCatalogs = WorkspaceCatalogs.layerTest({
21743
+ * set: () => Effect.succeed(CatalogSet.empty()),
21744
+ * });
21745
+ * // program.pipe(Effect.provide(TestCatalogs))
21746
+ * ```
21747
+ */
21748
+ static layerTest = (overrides = {}) => Layer.succeed(WorkspaceCatalogs, WorkspaceCatalogs.makeTest(overrides));
21749
+ /**
21378
21750
  * The real implementation of `@effected/npm`'s `CatalogResolver` contract —
21379
21751
  * the one `@effected/package-json` declares but cannot fill.
21380
21752
  *
@@ -21400,7 +21772,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
21400
21772
  };
21401
21773
 
21402
21774
  //#endregion
21403
- //#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
21775
+ //#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
21404
21776
  const EMPTY = Object.freeze(Object.create(null));
21405
21777
  const DependencyMap = Schema.Record(Schema.String, Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed(EMPTY)), Schema.withConstructorDefault(Effect.succeed(EMPTY)));
21406
21778
  /**
@@ -21484,7 +21856,19 @@ var WorkspaceStateSnapshot = class extends Schema.Class("WorkspaceStateSnapshot"
21484
21856
  /** Every workspace package captured at this moment. */
21485
21857
  packages: Schema.Array(PackageStateSnapshot),
21486
21858
  /** The catalog set assembled at this moment. */
21487
- catalogs: CatalogSet
21859
+ catalogs: CatalogSet,
21860
+ /**
21861
+ * Each importer's dependency-name → resolved-version map, as the manager's
21862
+ * lockfile recorded it at this moment.
21863
+ *
21864
+ * @remarks
21865
+ * Defaults to `{}`, so a `WorkspaceStateSnapshot` serialized before this field
21866
+ * existed still decodes — and an empty index simply makes the `catalog:`
21867
+ * fallback in {@link WorkspaceStateSnapshot.resolve} inert, which is exactly
21868
+ * the behavior those older values were captured under. Only pnpm records
21869
+ * importer versions; bun and npm yield an empty index.
21870
+ */
21871
+ importerVersions: Schema.optionalKey(Schema.Record(Schema.String, Schema.Record(Schema.String, Schema.String)))
21488
21872
  }) {
21489
21873
  #versionIndex;
21490
21874
  #packageIndex;
@@ -21519,16 +21903,62 @@ var WorkspaceStateSnapshot = class extends Schema.Class("WorkspaceStateSnapshot"
21519
21903
  * unparseable string — is `Option.none()`, because there is no indirection to
21520
21904
  * resolve. Total.
21521
21905
  *
21906
+ * A `catalog:` specifier the catalog set cannot resolve falls back to this
21907
+ * snapshot's `importerVersions` — but only to a version
21908
+ * **every** importer recording that dependency agrees on. A catalog injected
21909
+ * by a config-dependency pnpmfile hook appears in no committed catalog source,
21910
+ * so without this fallback both sides of a before/after diff resolve it to the
21911
+ * same raw string and a real version movement produces no row. When importers
21912
+ * disagree there is no single correct answer, so this stays `Option.none()`
21913
+ * rather than inventing one; {@link WorkspaceStateSnapshot.resolveIn} answers
21914
+ * precisely for callers that know which importer is asking.
21915
+ *
21522
21916
  * @param dependency - The dependency's package name (what `workspace:` /
21523
21917
  * `catalog:` resolve for).
21524
21918
  * @param specifier - The raw specifier string.
21525
21919
  */
21526
21920
  resolve(dependency, specifier) {
21921
+ return this.#resolveWith(dependency, specifier, () => Option.fromUndefinedOr(unanimousVersionOf(this.importerVersions ?? {}, dependency)));
21922
+ }
21923
+ /**
21924
+ * The concrete range or version a specifier resolved to AS OF this snapshot,
21925
+ * scoped to the importer that declared it.
21926
+ *
21927
+ * @remarks
21928
+ * Identical to {@link WorkspaceStateSnapshot.resolve} except in how an
21929
+ * unresolvable `catalog:` specifier falls back: this consults **only**
21930
+ * `importerPath`'s own recorded versions, so a monorepo whose packages hold
21931
+ * different versions of one dependency still gets an exact answer where
21932
+ * `resolve` must abstain. Prefer this whenever the caller knows the importer —
21933
+ * a consumer iterating `packages` has `relativePath` in hand, which is the
21934
+ * importer key (`"."` for the root package).
21935
+ *
21936
+ * An unknown `importerPath`, or one recording nothing for `dependency`, is
21937
+ * `Option.none()`. Total.
21938
+ *
21939
+ * @param importerPath - The importer's path relative to the workspace root,
21940
+ * `"."` for the root package — `PackageStateSnapshot.relativePath`.
21941
+ * @param dependency - The dependency's package name.
21942
+ * @param specifier - The raw specifier string.
21943
+ */
21944
+ resolveIn(importerPath, dependency, specifier) {
21945
+ return this.#resolveWith(dependency, specifier, () => Option.fromUndefinedOr(this.importerVersions?.[importerPath]?.[dependency]));
21946
+ }
21947
+ /**
21948
+ * The shared resolution path: classify, answer from the captured state, and
21949
+ * consult `onUnresolvedCatalog` only for a `catalog:` specifier the catalog set
21950
+ * could not answer. A plain range is already its own answer and must keep
21951
+ * resolving to `Option.none()` so the caller falls back to the raw string.
21952
+ */
21953
+ #resolveWith(dependency, specifier, onUnresolvedCatalog) {
21527
21954
  const exit = Schema.decodeUnknownExit(DependencySpecifier.FromString)(specifier);
21528
21955
  if (!Exit.isSuccess(exit)) return Option.none();
21529
21956
  const classified = exit.value;
21530
21957
  switch (classified._tag) {
21531
- case "catalog": return this.catalogs.rangeOf(dependency, classified.name);
21958
+ case "catalog": {
21959
+ const fromCatalogs = this.catalogs.rangeOf(dependency, classified.name);
21960
+ return Option.isSome(fromCatalogs) ? fromCatalogs : onUnresolvedCatalog();
21961
+ }
21532
21962
  case "workspace": return Option.fromUndefinedOr(this.#versions().get(dependency));
21533
21963
  default: return Option.none();
21534
21964
  }
@@ -21566,7 +21996,7 @@ var WorkspaceStateSnapshot = class extends Schema.Class("WorkspaceStateSnapshot"
21566
21996
  };
21567
21997
 
21568
21998
  //#endregion
21569
- //#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
21999
+ //#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
21570
22000
  /** Whether `value` is a non-null, non-array object. */
21571
22001
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
21572
22002
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -21620,6 +22050,13 @@ const bunInlineCatalogs = (manifest) => {
21620
22050
  catalogs: workspaces.catalogs
21621
22051
  });
21622
22052
  };
22053
+ /** The contribution of an absent or malformed lockfile: nothing, on both counts. */
22054
+ const EMPTY_LOCKFILE_RECORD = {
22055
+ catalogs: CatalogSet.empty(),
22056
+ importerVersions: {}
22057
+ };
22058
+ /** A defect naming the unstubbed test-double method — a test-wiring mistake, not a typed failure. */
22059
+ const unstubbed = (method) => Effect.die(/* @__PURE__ */ new Error(`WorkspaceSnapshots.makeTest: ${method}() was called but not stubbed — pass a \`${method}\` override.`));
21623
22060
  /**
21624
22061
  * Reads workspace state at a git ref with no checkout, and the live worktree.
21625
22062
  *
@@ -21652,10 +22089,17 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
21652
22089
  const roots = yield* WorkspaceRoot;
21653
22090
  const discovery = yield* WorkspaceDiscovery;
21654
22091
  const catalogsService = yield* WorkspaceCatalogs;
21655
- /** The catalog set a manager's lockfile records at the ref, or empty when absent/malformed. */
21656
- const lockfileCatalogs = (root, ref, format) => git.show(root, ref, `./${filenameFor(format)}`).pipe(Effect.flatMap((content) => Option.match(content, {
21657
- onNone: () => Effect.succeed(CatalogSet.empty()),
21658
- onSome: (text) => Lockfile.parse(text, { format }).pipe(Effect.map(CatalogSet.fromLockfile), Effect.catch(() => Effect.succeed(CatalogSet.empty())))
22092
+ /**
22093
+ * What a manager's lockfile records at the ref: its catalog set and its
22094
+ * importer versions, from ONE parse. Empty on both counts when the
22095
+ * lockfile is absent or malformed.
22096
+ */
22097
+ const lockfileRecord = (root, ref, format) => git.show(root, ref, `./${filenameFor(format)}`).pipe(Effect.flatMap((content) => Option.match(content, {
22098
+ onNone: () => Effect.succeed(EMPTY_LOCKFILE_RECORD),
22099
+ onSome: (text) => Lockfile.parse(text, { format }).pipe(Effect.map((lockfile) => ({
22100
+ catalogs: CatalogSet.fromLockfile(lockfile),
22101
+ importerVersions: importerVersionsOf(lockfile)
22102
+ })), Effect.catch(() => Effect.succeed(EMPTY_LOCKFILE_RECORD)))
21659
22103
  })));
21660
22104
  const computeAt = (root, ref) => Effect.gen(function* () {
21661
22105
  const pnpmWorkspaceText = yield* git.show(root, ref, "./pnpm-workspace.yaml");
@@ -21666,7 +22110,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
21666
22110
  });
21667
22111
  let patterns;
21668
22112
  let inline;
21669
- let fromLockfile;
22113
+ let recorded;
21670
22114
  if (Option.isSome(pnpmWorkspaceText)) {
21671
22115
  const pnpmPatterns = pnpmPatternsOf(yield* Yaml.parse(pnpmWorkspaceText.value).pipe(Effect.mapError((cause) => new CatalogAssemblyError({
21672
22116
  source: "manifest",
@@ -21675,13 +22119,13 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
21675
22119
  }))));
21676
22120
  patterns = pnpmPatterns.length > 0 ? pnpmPatterns : manifestPatternsOf(rootManifest);
21677
22121
  inline = yield* CatalogSet.fromWorkspaceYaml(pnpmWorkspaceText.value);
21678
- fromLockfile = yield* lockfileCatalogs(root, ref, "pnpm");
22122
+ recorded = yield* lockfileRecord(root, ref, "pnpm");
21679
22123
  } else {
21680
22124
  patterns = manifestPatternsOf(rootManifest);
21681
22125
  inline = bunInlineCatalogs(rootManifest);
21682
- fromLockfile = yield* lockfileCatalogs(root, ref, "bun");
22126
+ recorded = yield* lockfileRecord(root, ref, "bun");
21683
22127
  }
21684
- const catalogs = CatalogSet.merge(fromLockfile, inline);
22128
+ const catalogs = CatalogSet.merge(recorded.catalogs, inline);
21685
22129
  const globs = yield* GlobSet.compile(patterns).pipe(Effect.mapError((error) => new CatalogAssemblyError({
21686
22130
  source: "manifest",
21687
22131
  path: error.pattern,
@@ -21708,7 +22152,8 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
21708
22152
  for (const member of members) if (Option.isSome(member)) packages.push(member.value);
21709
22153
  return WorkspaceStateSnapshot.make({
21710
22154
  packages,
21711
- catalogs
22155
+ catalogs,
22156
+ importerVersions: recorded.importerVersions
21712
22157
  });
21713
22158
  });
21714
22159
  const atCaches = /* @__PURE__ */ new Map();
@@ -21732,6 +22177,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
21732
22177
  worktree: Effect.fn("WorkspaceSnapshots.worktree")(function* () {
21733
22178
  const packages = yield* discovery.listPackages();
21734
22179
  const catalogs = yield* catalogsService.set();
22180
+ const importerVersions = yield* catalogsService.importerVersions();
21735
22181
  const snapshotPackages = packages.map((pkg) => PackageStateSnapshot.make({
21736
22182
  name: pkg.name,
21737
22183
  version: pkg.version,
@@ -21743,7 +22189,8 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
21743
22189
  }));
21744
22190
  return WorkspaceStateSnapshot.make({
21745
22191
  packages: snapshotPackages,
21746
- catalogs
22192
+ catalogs,
22193
+ importerVersions
21747
22194
  });
21748
22195
  })
21749
22196
  };
@@ -21756,10 +22203,70 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
21756
22203
  * `const` and reuse it, or layer memoization does not apply.
21757
22204
  */
21758
22205
  static layer = (options) => Layer.effect(WorkspaceSnapshots, WorkspaceSnapshots.make(options));
22206
+ /**
22207
+ * A test double satisfying the full {@link WorkspaceSnapshotsShape} with no
22208
+ * git, filesystem, discovery, or catalog assembly.
22209
+ *
22210
+ * @remarks
22211
+ * There are **no honest defaults and no derivations** here: `at(ref)` and
22212
+ * `worktree()` are two independent reads of two different sources (a git ref
22213
+ * vs. the live tree), so neither can be honestly derived from the other, and
22214
+ * a fabricated empty {@link WorkspaceStateSnapshot} on either side of a
22215
+ * before/after diff reads as every dependency newly added or removed — the
22216
+ * exact silent-empty failure class this package documents on the live paths.
22217
+ * Both methods therefore **die** with an instructive defect until stubbed; a
22218
+ * test-wiring mistake fails loudly as a defect rather than succeeding with a
22219
+ * lie.
22220
+ *
22221
+ * @example
22222
+ * ```ts
22223
+ * import { CatalogSet, WorkspaceSnapshots, WorkspaceStateSnapshot } from "@effected/workspaces";
22224
+ * import { Effect } from "effect";
22225
+ *
22226
+ * const empty = WorkspaceStateSnapshot.make({
22227
+ * packages: [],
22228
+ * catalogs: CatalogSet.empty(),
22229
+ * importerVersions: {},
22230
+ * });
22231
+ * const double = WorkspaceSnapshots.makeTest({
22232
+ * at: () => Effect.succeed(empty),
22233
+ * worktree: () => Effect.succeed(empty),
22234
+ * });
22235
+ * ```
22236
+ */
22237
+ static makeTest = (overrides = {}) => ({
22238
+ at: () => unstubbed("at"),
22239
+ worktree: () => unstubbed("worktree"),
22240
+ ...overrides
22241
+ });
22242
+ /**
22243
+ * The test layer: {@link WorkspaceSnapshots.makeTest} behind `Layer.succeed`,
22244
+ * so a suite provides only the methods it exercises.
22245
+ *
22246
+ * @remarks
22247
+ * A parameterized layer factory mints a **fresh reference per call**, and
22248
+ * layers memoize by reference — bind the result to a `const` and reuse it
22249
+ * rather than calling `layerTest(...)` at each composition site.
22250
+ *
22251
+ * @example
22252
+ * ```ts
22253
+ * import { CatalogSet, WorkspaceSnapshots, WorkspaceStateSnapshot } from "@effected/workspaces";
22254
+ * import { Effect } from "effect";
22255
+ *
22256
+ * const TestSnapshots = WorkspaceSnapshots.layerTest({
22257
+ * worktree: () =>
22258
+ * Effect.succeed(
22259
+ * WorkspaceStateSnapshot.make({ packages: [], catalogs: CatalogSet.empty(), importerVersions: {} }),
22260
+ * ),
22261
+ * });
22262
+ * // program.pipe(Effect.provide(TestSnapshots))
22263
+ * ```
22264
+ */
22265
+ static layerTest = (overrides = {}) => Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
21759
22266
  };
21760
22267
 
21761
22268
  //#endregion
21762
- //#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
22269
+ //#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
21763
22270
  /**
21764
22271
  * Every service that needs only a filesystem: root, package-manager detection,
21765
22272
  * discovery, lockfile reading, catalogs and publishability.
@@ -43647,6 +44154,80 @@ function isUint8Array(value) {
43647
44154
  //#endregion
43648
44155
  //#region ../silk-effects/dist/dev/pkg/changesets/utils/remark-pipeline.js
43649
44156
  /**
44157
+ * Marker set on the `data` of a text node whose value must be written to
44158
+ * markdown verbatim rather than escaped.
44159
+ *
44160
+ * @remarks
44161
+ * `remark-stringify` escapes any character that could open a markdown
44162
+ * construct. Inside a dependency table that is always wrong: with
44163
+ * `remark-gfm` enabled `~` is the strikethrough delimiter, so the specifier
44164
+ * `~0.2.1` is written as `\~0.2.1`, and `_` in a package name becomes `\_`.
44165
+ * The corruption compounds on every re-serialization, and dependency-table
44166
+ * cells round-trip through consolidation and PR-body reconstruction.
44167
+ *
44168
+ * The marker is deliberately narrow. It is set only by the dependency-table
44169
+ * cell builder, whose cell vocabulary is closed — package name, dependency
44170
+ * type, action, version specifier, and the em-dash sentinel — and none of
44171
+ * those can legitimately carry markdown. Prose elsewhere in a changeset keeps
44172
+ * the default escaping.
44173
+ *
44174
+ * @internal
44175
+ */
44176
+ const LITERAL_TEXT_MARKER = "silkLiteralText";
44177
+ /**
44178
+ * Mark a text node so {@link createRemarkProcessor} writes it verbatim.
44179
+ *
44180
+ * @param value - The literal cell text
44181
+ * @returns An MDAST `Text` node carrying the literal marker
44182
+ *
44183
+ * @internal
44184
+ */
44185
+ function literalText(value) {
44186
+ return {
44187
+ type: "text",
44188
+ value,
44189
+ data: { [LITERAL_TEXT_MARKER]: true }
44190
+ };
44191
+ }
44192
+ /**
44193
+ * Whether a text node was marked by {@link literalText}.
44194
+ *
44195
+ * @internal
44196
+ */
44197
+ function isLiteralText(node) {
44198
+ return node.data?.[LITERAL_TEXT_MARKER] === true;
44199
+ }
44200
+ /**
44201
+ * Escape the two characters that would otherwise corrupt the table grid.
44202
+ *
44203
+ * @remarks
44204
+ * A `|` would close the cell early and a `\` would be read as an escape
44205
+ * introducer, so both are escaped to keep the written cell parseable back to
44206
+ * its exact input. Every other character is emitted as-is. Because parsing
44207
+ * consumes the backslash, a value that already carries a legacy `\~` from the
44208
+ * old escaping path re-parses to its clean form rather than accumulating
44209
+ * another layer.
44210
+ *
44211
+ * @internal
44212
+ */
44213
+ function escapeCellLiteral(value) {
44214
+ return value.replace(/[\\|]/g, "\\$&");
44215
+ }
44216
+ /**
44217
+ * `mdast-util-to-markdown` handler overrides used by the shared processor.
44218
+ *
44219
+ * @remarks
44220
+ * Replaces the default `text` handler — which is `state.safe(node.value, info)`
44221
+ * — with one that bypasses escaping for nodes marked by {@link literalText}
44222
+ * and delegates to the default behavior for everything else.
44223
+ *
44224
+ * @internal
44225
+ */
44226
+ const literalTextHandlers = { text: (node, _parent, state, info) => {
44227
+ const text = node;
44228
+ return isLiteralText(text) ? escapeCellLiteral(text.value) : state.safe(text.value, info);
44229
+ } };
44230
+ /**
43650
44231
  * Create a unified processor configured with remark-parse, remark-gfm,
43651
44232
  * and remark-stringify.
43652
44233
  *
@@ -43654,7 +44235,8 @@ function isUint8Array(value) {
43654
44235
  * Each call creates a fresh processor instance. The plugin chain is:
43655
44236
  * 1. `remark-parse` — markdown to MDAST
43656
44237
  * 2. `remark-gfm` — GitHub Flavored Markdown extensions (tables, etc.)
43657
- * 3. `remark-stringify` — MDAST back to markdown
44238
+ * 3. `remark-stringify` — MDAST back to markdown, with the
44239
+ * {@link literalText} handler override
43658
44240
  *
43659
44241
  * @privateRemarks
43660
44242
  * Return type is intentionally inferred because the unified `Processor`
@@ -43665,7 +44247,7 @@ function isUint8Array(value) {
43665
44247
  * @internal
43666
44248
  */
43667
44249
  function createRemarkProcessor() {
43668
- return unified().use(remarkParse).use(remarkGfm).use(remarkStringify);
44250
+ return unified().use(remarkParse).use(remarkGfm).use(remarkStringify, { handlers: literalTextHandlers });
43669
44251
  }
43670
44252
  /**
43671
44253
  * Parse a markdown string into an MDAST AST synchronously.
@@ -44177,6 +44759,12 @@ function parseDependencyTable(table) {
44177
44759
  /**
44178
44760
  * Create a table cell with a text node.
44179
44761
  *
44762
+ * @remarks
44763
+ * The cell text is marked literal, so stringification writes it verbatim
44764
+ * instead of escaping characters that could open a markdown construct. See
44765
+ * {@link literalText} — without it `~0.2.1` is written as `\~0.2.1` and
44766
+ * `some_pkg` as `some\_pkg`.
44767
+ *
44180
44768
  * @param text - The cell text content
44181
44769
  * @returns An MDAST `TableCell` node
44182
44770
  *
@@ -44185,10 +44773,7 @@ function parseDependencyTable(table) {
44185
44773
  function makeCell(text) {
44186
44774
  return {
44187
44775
  type: "tableCell",
44188
- children: [{
44189
- type: "text",
44190
- value: text
44191
- }]
44776
+ children: [literalText(text)]
44192
44777
  };
44193
44778
  }
44194
44779
  /**
@@ -44263,11 +44848,10 @@ function serializeDependencyTable(rows) {
44263
44848
  * @internal
44264
44849
  */
44265
44850
  function serializeDependencyTableToMarkdown(rows) {
44266
- const tree = {
44851
+ return stringifyMarkdown({
44267
44852
  type: "root",
44268
44853
  children: [serializeDependencyTable(rows)]
44269
- };
44270
- return unified().use(remarkGfm).use(remarkStringify).stringify(tree).trim();
44854
+ }).trim();
44271
44855
  }
44272
44856
  /**
44273
44857
  * Sort priority for dependency actions: removed first, then updated, then added.
@@ -47054,20 +47638,25 @@ function readRawPackageJson(fs, pkgDir) {
47054
47638
  }
47055
47639
  /**
47056
47640
  * Build resolved scopes from the discovered workspace packages, keeping only
47057
- * those that are a release surface (declare publishConfig that yields at least
47058
- * one publish target). Used both when `.changeset/config.json` declares no
47059
- * explicit `packages` record AND to augment an explicit record with the
47060
- * remaining workspace packages it does not list (so the record annotates the
47061
- * listed packages without shrinking the release surface). The changeset
47062
- * `ignore` list is intentionally NOT consulted here an ignored package still
47063
- * declares publishConfig and remains a valid changeset target.
47064
- */
47065
- function buildFallbackScopes(fs, workspaces) {
47641
+ * those that are a release surface: a package that declares publishConfig
47642
+ * yielding at least one publish target, OR when the changeset config sets
47643
+ * `privatePackages.version: true` (`versionPrivate`) any workspace package
47644
+ * at all, since changesets versions private packages too in that mode (#360:
47645
+ * a private single-root repo with `privatePackages.version: true` previously
47646
+ * produced an empty release surface and left every file unmapped). Used both
47647
+ * when `.changeset/config.json` declares no explicit `packages` record AND to
47648
+ * augment an explicit record with the remaining workspace packages it does
47649
+ * not list (so the record annotates the listed packages without shrinking the
47650
+ * release surface). The changeset `ignore` list is intentionally NOT
47651
+ * consulted here — an ignored package still declares publishConfig and
47652
+ * remains a valid changeset target.
47653
+ */
47654
+ function buildFallbackScopes(fs, workspaces, versionPrivate) {
47066
47655
  return Effect.forEach(workspaces, (ws) => Effect.gen(function* () {
47067
47656
  const raw = yield* readRawPackageJson(fs, ws.path);
47068
47657
  if (raw === null) return [];
47069
47658
  const binding = yield* readTargetsBinding(fs, ws.path);
47070
- if (SilkPublishability.detect(ws.name, raw, binding).length === 0) return [];
47659
+ if (SilkPublishability.detect(ws.name, raw, binding).length === 0 && !versionPrivate) return [];
47071
47660
  return [{
47072
47661
  name: ws.name,
47073
47662
  workspaceDir: ws.path,
@@ -47173,6 +47762,8 @@ function makeShape$3(reader, discovery, fs) {
47173
47762
  version: w.version
47174
47763
  }));
47175
47764
  const hasExplicitPackages = Object.keys(decodedOptions.packages ?? {}).length > 0;
47765
+ const privatePackages = config.privatePackages;
47766
+ const versionPrivate = privatePackages !== void 0 && privatePackages !== false && privatePackages.version === true;
47176
47767
  let scopes;
47177
47768
  if (hasExplicitPackages) {
47178
47769
  const explicitScopes = yield* buildResolvedScopes({
@@ -47188,9 +47779,9 @@ function makeShape$3(reader, discovery, fs) {
47188
47779
  throw e;
47189
47780
  }
47190
47781
  const explicitNames = new Set(explicitScopes.map((s) => s.name));
47191
- const discoveredScopes = yield* buildFallbackScopes(fs, workspaces.filter((w) => !explicitNames.has(w.name)));
47782
+ const discoveredScopes = yield* buildFallbackScopes(fs, workspaces.filter((w) => !explicitNames.has(w.name)), versionPrivate);
47192
47783
  scopes = [...explicitScopes, ...discoveredScopes];
47193
- } else scopes = yield* buildFallbackScopes(fs, workspaces);
47784
+ } else scopes = yield* buildFallbackScopes(fs, workspaces, versionPrivate);
47194
47785
  const inspected = {
47195
47786
  configPath,
47196
47787
  projectDir,
@@ -47224,12 +47815,19 @@ function makeShape$3(reader, discovery, fs) {
47224
47815
  function classifyOne(inspected, path) {
47225
47816
  const abs = resolve(inspected.projectDir, path);
47226
47817
  let bestWorkspace = null;
47227
- for (const s of inspected.packages) if (isInside(s.workspaceDir, abs)) {
47228
- const depth = s.workspaceDir.length;
47229
- if (!bestWorkspace || depth > bestWorkspace.depth) bestWorkspace = {
47230
- pkg: s.name,
47231
- depth
47232
- };
47818
+ let rootScope = null;
47819
+ for (const s of inspected.packages) {
47820
+ if (s.workspaceDir === inspected.projectDir) {
47821
+ rootScope = s.name;
47822
+ continue;
47823
+ }
47824
+ if (isInside(s.workspaceDir, abs)) {
47825
+ const depth = s.workspaceDir.length;
47826
+ if (!bestWorkspace || depth > bestWorkspace.depth) bestWorkspace = {
47827
+ pkg: s.name,
47828
+ depth
47829
+ };
47830
+ }
47233
47831
  }
47234
47832
  if (bestWorkspace) return {
47235
47833
  path,
@@ -47256,6 +47854,11 @@ function classifyOne(inspected, path) {
47256
47854
  glob: vf.glob
47257
47855
  }
47258
47856
  };
47857
+ if (rootScope && isInside(inspected.projectDir, abs)) return {
47858
+ path,
47859
+ package: rootScope,
47860
+ reason: "workspace"
47861
+ };
47259
47862
  return {
47260
47863
  path,
47261
47864
  package: null,
@@ -47495,10 +48098,23 @@ const DEP_TYPE_MAP = [
47495
48098
  ["optionalDependencies", "optionalDependency"]
47496
48099
  ];
47497
48100
  /**
47498
- * Resolve a specifier against the snapshot it belongs to, falling back to
47499
- * the raw specifier string when the snapshot cannot resolve it.
47500
- */
47501
- const resolveOrRaw = (snapshot, dep, spec) => Option.getOrElse(snapshot.resolve(dep, spec), () => spec);
48101
+ * Resolve a specifier against the snapshot it belongs to, scoped to the
48102
+ * importer that declared it, falling back to the raw specifier string when
48103
+ * the snapshot cannot resolve it.
48104
+ *
48105
+ * @remarks
48106
+ * Uses `resolveIn` rather than the workspace-wide `resolve`. Both consult the
48107
+ * ref's own lockfile importer entries when a `catalog:` specifier is not in the
48108
+ * catalog set — which is what makes hook-injected catalogs (`catalog:effect:peers`,
48109
+ * injected by a config-dependency pnpmfile and recorded in neither
48110
+ * `pnpm-workspace.yaml` nor the lockfile's `catalogs:` block) resolvable at all.
48111
+ * The workspace-wide form abstains whenever two importers disagree on a
48112
+ * dependency's version, which in a multi-package repo reproduces the original
48113
+ * defect: both sides fall back to the identical raw specifier, compare equal,
48114
+ * and emit no row. Scoping to the declaring importer answers precisely where
48115
+ * the workspace-wide form cannot.
48116
+ */
48117
+ const resolveOrRaw = (snapshot, importerPath, dep, spec) => Option.getOrElse(snapshot.resolveIn(importerPath, dep, spec), () => spec);
47502
48118
  /**
47503
48119
  * Drop no-net-change field moves: the same dependency removed from one field
47504
48120
  * and added to another with an equal resolved version (e.g. a dep promoted
@@ -47543,13 +48159,15 @@ function computeWorkspaceDependencyDiffs(before, after) {
47543
48159
  for (const afterPkg of after.packages) {
47544
48160
  const beforePkg = Option.getOrNull(before.package(afterPkg.name));
47545
48161
  const rows = [];
48162
+ const afterImporter = afterPkg.relativePath;
48163
+ const beforeImporter = beforePkg?.relativePath ?? afterImporter;
47546
48164
  for (const [field, type] of DEP_TYPE_MAP) {
47547
48165
  const beforeRecord = beforePkg?.[field] ?? {};
47548
48166
  const afterRecord = afterPkg[field];
47549
48167
  const seen = /* @__PURE__ */ new Set();
47550
48168
  for (const [name, beforeSpec] of Object.entries(beforeRecord)) {
47551
48169
  seen.add(name);
47552
- const from = resolveOrRaw(before, name, beforeSpec);
48170
+ const from = resolveOrRaw(before, beforeImporter, name, beforeSpec);
47553
48171
  const afterSpec = afterRecord[name];
47554
48172
  if (afterSpec === void 0) {
47555
48173
  rows.push({
@@ -47561,7 +48179,7 @@ function computeWorkspaceDependencyDiffs(before, after) {
47561
48179
  });
47562
48180
  continue;
47563
48181
  }
47564
- const to = resolveOrRaw(after, name, afterSpec);
48182
+ const to = resolveOrRaw(after, afterImporter, name, afterSpec);
47565
48183
  if (from !== to) rows.push({
47566
48184
  dependency: name,
47567
48185
  type,
@@ -47577,7 +48195,7 @@ function computeWorkspaceDependencyDiffs(before, after) {
47577
48195
  type,
47578
48196
  action: "added",
47579
48197
  from: EM_DASH$1,
47580
- to: resolveOrRaw(after, name, afterSpec)
48198
+ to: resolveOrRaw(after, afterImporter, name, afterSpec)
47581
48199
  });
47582
48200
  }
47583
48201
  }
@@ -65886,8 +66504,38 @@ function getHeadingLevel(heading) {
65886
66504
  return sequence ? sequence.text.length : 0;
65887
66505
  }
65888
66506
  /**
66507
+ * CommonMark backslash escapes: a backslash is literal unless it precedes an
66508
+ * ASCII punctuation character, in which case the pair denotes that character.
66509
+ */
66510
+ const BACKSLASH_ESCAPE_RE = /\\([!-/:-@[-`{-~])/g;
66511
+ /**
66512
+ * Resolve CommonMark backslash escapes in raw micromark source text.
66513
+ *
66514
+ * @remarks
66515
+ * Every rule in this directory has a sibling remark implementation that reads
66516
+ * the parsed mdast tree, where the parser has already resolved escapes, via
66517
+ * `mdast-util-to-string`. Micromark tokens instead carry RAW source. Comparing
66518
+ * raw text against a value the parsed form would produce makes the two
66519
+ * implementations of one documented rule disagree about the same file
66520
+ * (issue #367).
66521
+ *
66522
+ * Applied at the shared extractors below so both implementations judge the
66523
+ * value a reader actually sees, rather than per-rule where the next extractor
66524
+ * added would silently reintroduce the split.
66525
+ *
66526
+ * @internal
66527
+ */
66528
+ function unescapeMarkdown(raw) {
66529
+ return raw.replace(BACKSLASH_ESCAPE_RE, "$1");
66530
+ }
66531
+ /**
65889
66532
  * Get the plain text content of an `atxHeading` token.
65890
66533
  *
66534
+ * @remarks
66535
+ * Escape-resolved, so a heading compares equal to the same heading as the
66536
+ * remark rules see it. `getHeadingLevel` needs no equivalent — it counts
66537
+ * sequence characters rather than reading text.
66538
+ *
65891
66539
  * @param heading - The `atxHeading` micromark token
65892
66540
  * @returns The heading text, or empty string if no text token found
65893
66541
  *
@@ -65895,7 +66543,7 @@ function getHeadingLevel(heading) {
65895
66543
  */
65896
66544
  function getHeadingText(heading) {
65897
66545
  const textToken = heading.children.find((c) => c.type === "atxHeadingText");
65898
- return textToken ? textToken.text : "";
66546
+ return textToken ? unescapeMarkdown(textToken.text) : "";
65899
66547
  }
65900
66548
 
65901
66549
  //#endregion
@@ -66022,13 +66670,13 @@ const EXPECTED_HEADERS = [
66022
66670
  * The `tableContent` token has a `.text` property with the cell value.
66023
66671
  *
66024
66672
  * @param cell - A GFM table cell token (header or data)
66025
- * @returns The trimmed text content of the cell, or an empty string
66673
+ * @returns The trimmed, escape-resolved text content of the cell, or an empty string
66026
66674
  *
66027
66675
  * @internal
66028
66676
  */
66029
66677
  function getCellText(cell) {
66030
66678
  const content = cell.children.find((c) => c.type === "tableContent");
66031
- return content ? content.text.trim() : "";
66679
+ return content ? unescapeMarkdown(content.text.trim()) : "";
66032
66680
  }
66033
66681
  /**
66034
66682
  * Extract all cell texts from a `tableRow` token.