@savvy-web/silk 3.7.9 → 3.7.11

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.
@@ -2335,7 +2335,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2335
2335
  }
2336
2336
  };
2337
2337
  //#endregion
2338
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/BunExtension.js
2338
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/BunExtension.js
2339
2339
  /**
2340
2340
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2341
2341
  * when the format is `"bun"`.
@@ -2356,7 +2356,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
2356
2356
  trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
2357
2357
  }) {};
2358
2358
  //#endregion
2359
- //#region ../../node_modules/.pnpm/@effected+npm@0.10.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/CatalogResolver.js
2359
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/CatalogResolver.js
2360
2360
  /**
2361
2361
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2362
2362
  * version ranges.
@@ -2402,7 +2402,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
2402
2402
  static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
2403
2403
  };
2404
2404
  //#endregion
2405
- //#region ../../node_modules/.pnpm/@effected+npm@0.10.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/WorkspaceResolver.js
2405
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/WorkspaceResolver.js
2406
2406
  /**
2407
2407
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2408
2408
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2463,7 +2463,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
2463
2463
  static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
2464
2464
  };
2465
2465
  //#endregion
2466
- //#region ../../node_modules/.pnpm/@effected+npm@0.10.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/CatalogAssemblyError.js
2466
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/CatalogAssemblyError.js
2467
2467
  /**
2468
2468
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2469
2469
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2507,7 +2507,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedError()("CatalogAss
2507
2507
  }
2508
2508
  };
2509
2509
  //#endregion
2510
- //#region ../../node_modules/.pnpm/@effected+npm@0.10.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/DependencySection.js
2510
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/DependencySection.js
2511
2511
  /**
2512
2512
  * The short dependency kind: which dependency map an entry came from, named the
2513
2513
  * way consumers branch on it.
@@ -2647,13 +2647,13 @@ const advance$1 = (s) => {
2647
2647
  return ch;
2648
2648
  }
2649
2649
  };
2650
- const isDigit$2 = (ch) => ch >= "0" && ch <= "9";
2650
+ const isDigit$3 = (ch) => ch >= "0" && ch <= "9";
2651
2651
  const isLetter = (ch) => ch >= "a" && ch <= "z" || ch >= "A" && ch <= "Z";
2652
- const isIdentChar = (ch) => isDigit$2(ch) || isLetter(ch) || ch === "-";
2652
+ const isIdentChar = (ch) => isDigit$3(ch) || isLetter(ch) || ch === "-";
2653
2653
  const atEnd$1 = (s) => s.pos >= s.len;
2654
2654
  const peekDigit = (s) => {
2655
2655
  const ch = peek$1(s);
2656
- return ch !== void 0 && isDigit$2(ch);
2656
+ return ch !== void 0 && isDigit$3(ch);
2657
2657
  };
2658
2658
  const peekIdentChar = (s) => {
2659
2659
  const ch = peek$1(s);
@@ -2662,7 +2662,7 @@ const peekIdentChar = (s) => {
2662
2662
  const parseNumericIdentifier = (s) => {
2663
2663
  const start = s.pos;
2664
2664
  const first = peek$1(s);
2665
- if (first === void 0 || !isDigit$2(first)) return fail(s);
2665
+ if (first === void 0 || !isDigit$3(first)) return fail(s);
2666
2666
  let digits = "";
2667
2667
  while (peekDigit(s)) digits += advance$1(s);
2668
2668
  if (digits.length > 1 && digits[0] === "0") {
@@ -2684,7 +2684,7 @@ const parsePrereleaseIdentifier = (s) => {
2684
2684
  if (first === void 0 || !isIdentChar(first)) return fail(s);
2685
2685
  while (peekIdentChar(s)) {
2686
2686
  const ch = advance$1(s) ?? "";
2687
- if (!isDigit$2(ch)) hasNonDigit = true;
2687
+ if (!isDigit$3(ch)) hasNonDigit = true;
2688
2688
  token += ch;
2689
2689
  }
2690
2690
  if (token.length === 0) return fail(s);
@@ -4122,7 +4122,7 @@ const isComparatorSetSubset = (sub, sup) => {
4122
4122
  return true;
4123
4123
  };
4124
4124
  //#endregion
4125
- //#region ../../node_modules/.pnpm/@effected+npm@0.10.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/DependencySpecifier.js
4125
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/DependencySpecifier.js
4126
4126
  /**
4127
4127
  * Indicates that a string could not be parsed as a valid dependency specifier.
4128
4128
  *
@@ -4329,7 +4329,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4329
4329
  FromString: fromString
4330
4330
  });
4331
4331
  //#endregion
4332
- //#region ../../node_modules/.pnpm/@effected+npm@0.10.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/IntegrityHash.js
4332
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/IntegrityHash.js
4333
4333
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4334
4334
  const COREPACK_RE = /^(sha1|sha224|sha256|sha384|sha512)\.[0-9a-f]+$/;
4335
4335
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
@@ -4381,12 +4381,109 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4381
4381
  algorithmOf,
4382
4382
  decode: decode$2
4383
4383
  });
4384
+ const corepackRestricted = brandedIntegrity.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
4385
+ const BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
4386
+ const decodeBase64 = (value) => {
4387
+ const firstPad = value.indexOf("=");
4388
+ const body = firstPad === -1 ? value : value.slice(0, firstPad);
4389
+ const padding = firstPad === -1 ? "" : value.slice(firstPad);
4390
+ if (padding !== "" && padding !== "=" && padding !== "==") return void 0;
4391
+ const remainder = body.length % 4;
4392
+ if (body.length === 0 || remainder === 1) return void 0;
4393
+ if (padding.length > 0 && padding.length !== (4 - remainder) % 4) return void 0;
4394
+ let buffer = 0;
4395
+ let bits = 0;
4396
+ const bytes = [];
4397
+ for (const char of body) {
4398
+ const sextet = BASE64_ALPHABET.indexOf(char);
4399
+ if (sextet < 0) return void 0;
4400
+ buffer = buffer << 6 | sextet;
4401
+ bits += 6;
4402
+ if (bits >= 8) {
4403
+ bits -= 8;
4404
+ bytes.push(buffer >>> bits & 255);
4405
+ }
4406
+ }
4407
+ if ((buffer & (1 << bits) - 1) !== 0) return void 0;
4408
+ return bytes;
4409
+ };
4410
+ const encodeBase64 = (bytes) => {
4411
+ let out = "";
4412
+ for (let index = 0; index < bytes.length; index += 3) {
4413
+ const b0 = bytes[index] ?? 0;
4414
+ const b1 = bytes[index + 1];
4415
+ const b2 = bytes[index + 2];
4416
+ const buffer = b0 << 16 | (b1 ?? 0) << 8 | (b2 ?? 0);
4417
+ out += BASE64_ALPHABET.charAt(buffer >>> 18 & 63);
4418
+ out += BASE64_ALPHABET.charAt(buffer >>> 12 & 63);
4419
+ out += b1 === void 0 ? "=" : BASE64_ALPHABET.charAt(buffer >>> 6 & 63);
4420
+ out += b2 === void 0 ? "=" : BASE64_ALPHABET.charAt(buffer & 63);
4421
+ }
4422
+ return out;
4423
+ };
4424
+ const hexOfBytes = (bytes) => bytes.map((byte) => byte.toString(16).padStart(2, "0")).join("");
4425
+ const bytesOfHex = (hex) => {
4426
+ const bytes = [];
4427
+ for (let index = 0; index < hex.length; index += 2) bytes.push(Number.parseInt(hex.slice(index, index + 2), 16));
4428
+ return bytes;
4429
+ };
4430
+ const SHA512_SRI_PREFIX = "sha512-";
4431
+ const SHA512_COREPACK_PREFIX = "sha512.";
4432
+ const SHA512_DIGEST_BYTES = 64;
4433
+ const COREPACK_SHA512_RE = /^sha512\.[0-9a-f]{128}$/;
4434
+ const unwrapJsonQuotes = (value) => value.length >= 2 && value.startsWith("\"") && value.endsWith("\"") ? value.slice(1, -1) : value;
4435
+ const corepackOfSri = (input) => {
4436
+ const value = unwrapJsonQuotes(input);
4437
+ if (!value.startsWith(SHA512_SRI_PREFIX)) return void 0;
4438
+ const bytes = decodeBase64(value.slice(7));
4439
+ if (bytes === void 0 || bytes.length !== SHA512_DIGEST_BYTES) return void 0;
4440
+ return `${SHA512_COREPACK_PREFIX}${hexOfBytes(bytes)}`;
4441
+ };
4442
+ const sriOfCorepack = (value) => COREPACK_SHA512_RE.test(value) ? `${SHA512_SRI_PREFIX}${encodeBase64(bytesOfHex(value.slice(7)))}` : void 0;
4443
+ const corepackFromSri = effect.Schema.String.pipe(effect.Schema.decodeTo(corepackRestricted, effect.SchemaTransformation.transformOrFail({
4444
+ decode: (input) => {
4445
+ const corepack = corepackOfSri(input);
4446
+ return corepack === void 0 ? effect.Effect.fail(new effect.SchemaIssue.InvalidValue({ message: `Expected an SRI sha512-<base64> integrity hash carrying a 64-byte digest, got "${input}"` }, input)) : effect.Effect.succeed(corepack);
4447
+ },
4448
+ encode: (value) => {
4449
+ const sri = sriOfCorepack(value);
4450
+ return sri === void 0 ? effect.Effect.fail(new effect.SchemaIssue.InvalidValue({ message: `Expected a corepack sha512.<128-hex-digit> integrity hash, got "${value}"` }, value)) : effect.Effect.succeed(sri);
4451
+ }
4452
+ })));
4453
+ /**
4454
+ * Indicates that a string could not be converted from npm's SRI form to the
4455
+ * corepack integrity form.
4456
+ *
4457
+ * Raised by {@link (CorepackIntegrityHash:variable)}'s `fromSri`. The offending
4458
+ * string is preserved on `input`. Only a canonical `sha512-<base64>` value
4459
+ * carrying a 64-byte digest converts — corepack pins accept nothing weaker
4460
+ * than sha512, so a sha256/sha1 SRI hash, malformed base64, a wrong-length
4461
+ * digest and an already-corepack-form input all raise this error.
4462
+ *
4463
+ * @public
4464
+ */
4465
+ var InvalidSriIntegrityHashError = class extends effect.Schema.TaggedError()("InvalidSriIntegrityHashError", {
4466
+ /** The raw input string that failed conversion. */
4467
+ input: effect.Schema.String }) {
4468
+ get message() {
4469
+ return `Invalid SRI integrity hash "${this.input}": expected a sha512-<base64> value carrying a 64-byte digest (corepack accepts only sha512)`;
4470
+ }
4471
+ };
4472
+ const fromSri = (input) => effect.Schema.decodeUnknownEffect(corepackFromSri)(input).pipe(effect.Effect.mapError(() => new InvalidSriIntegrityHashError({ input })));
4384
4473
  /**
4385
4474
  * {@link (IntegrityHash:variable)} narrowed to the corepack `<algo>.<hex>` form
4386
4475
  * — `sha512.deadbeef`, and corepack's own sha224 default pins
4387
4476
  * (`sha224.877304e3…`). An SRI (`sha512-<base64>`) or yarn (`10c0/<hex>`)
4388
4477
  * hash, both valid `IntegrityHash` values, fails this schema.
4389
4478
  *
4479
+ * The schema value also carries the SRI bridge: the `FromSri` codec decodes
4480
+ * npm's `sha512-<base64>` form (what `NpmRegistry.version()` returns, with one
4481
+ * layer of JSON quotes tolerated) into the corepack form, and `fromSri` is its
4482
+ * `Effect` convenience, failing with a typed
4483
+ * {@link InvalidSriIntegrityHashError}. The conversion is deliberately one-way
4484
+ * and sha512-only — corepack pins accept nothing weaker, so a sha256/sha1 SRI
4485
+ * hash fails typed rather than minting a pin corepack would reject.
4486
+ *
4390
4487
  * @remarks
4391
4488
  * The corepack pin tail (`<name>@<version>+<integrity>`) is the one place the
4392
4489
  * kit meets this form, and two schemas name it: `PackageManagerPin.integrity`
@@ -4432,7 +4529,10 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4432
4529
  *
4433
4530
  * @public
4434
4531
  */
4435
- const CorepackIntegrityHash = brandedIntegrity.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
4532
+ const CorepackIntegrityHash = Object.assign(corepackRestricted, {
4533
+ FromSri: corepackFromSri,
4534
+ fromSri
4535
+ });
4436
4536
  effect.Schema.Literals([
4437
4537
  "npm",
4438
4538
  "pnpm",
@@ -5299,7 +5399,7 @@ var Run = class {
5299
5399
  static REDACTED = "***";
5300
5400
  };
5301
5401
  //#endregion
5302
- //#region ../../node_modules/.pnpm/@effected+npm@0.10.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/ReleaseAgeGate.js
5402
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/ReleaseAgeGate.js
5303
5403
  const MS_PER_MINUTE = 6e4;
5304
5404
  /**
5305
5405
  * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
@@ -5469,7 +5569,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
5469
5569
  }
5470
5570
  };
5471
5571
  //#endregion
5472
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/ImporterDependency.js
5572
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/ImporterDependency.js
5473
5573
  /**
5474
5574
  * One declared dependency of one workspace importer, as the lockfile records it.
5475
5575
  *
@@ -5507,7 +5607,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
5507
5607
  depType: DependencyField
5508
5608
  }) {};
5509
5609
  //#endregion
5510
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/LockfileImporter.js
5610
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/LockfileImporter.js
5511
5611
  /**
5512
5612
  * One workspace importer's declared dependencies, as the lockfile records them.
5513
5613
  *
@@ -5531,7 +5631,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
5531
5631
  dependencies: effect.Schema.Array(ImporterDependency)
5532
5632
  }) {};
5533
5633
  //#endregion
5534
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/ResolvedPackage.js
5634
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/ResolvedPackage.js
5535
5635
  const EMPTY_DEPENDENCIES = {};
5536
5636
  /**
5537
5637
  * A package resolved from a lockfile.
@@ -5566,7 +5666,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
5566
5666
  dependencies: effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY_DEPENDENCIES)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY_DEPENDENCIES)))
5567
5667
  }) {};
5568
5668
  //#endregion
5569
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/WorkspaceDependency.js
5669
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/WorkspaceDependency.js
5570
5670
  /**
5571
5671
  * A directed dependency edge between two workspace packages as recorded in
5572
5672
  * the lockfile.
@@ -5588,7 +5688,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
5588
5688
  constraint: effect.Schema.String
5589
5689
  }) {};
5590
5690
  //#endregion
5591
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/PnpmExtension.js
5691
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/PnpmExtension.js
5592
5692
  /**
5593
5693
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
5594
5694
  * when the format is `"pnpm"`.
@@ -5613,7 +5713,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
5613
5713
  }))
5614
5714
  }) {};
5615
5715
  //#endregion
5616
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/LockfileFormat.js
5716
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/LockfileFormat.js
5617
5717
  /**
5618
5718
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
5619
5719
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -5651,7 +5751,7 @@ const FILENAMES = {
5651
5751
  */
5652
5752
  const filenameFor = (format) => FILENAMES[format][0];
5653
5753
  //#endregion
5654
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/internal/shared.js
5754
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/shared.js
5655
5755
  /**
5656
5756
  * The four dependency sections of a manifest, in a stable order — the shared
5657
5757
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -5987,7 +6087,7 @@ function evaluateNode(node, depth) {
5987
6087
  //#region ../../node_modules/.pnpm/@effected+jsonc@0.7.0_effect@4.0.0-rc.109/node_modules/@effected/jsonc/internal/scanner.js
5988
6088
  const isWhitespace = (ch) => ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch === 65279;
5989
6089
  const isLineBreak$1 = (ch) => ch === 10 || ch === 13 || ch === 8232 || ch === 8233;
5990
- const isDigit$1 = (ch) => ch >= 48 && ch <= 57;
6090
+ const isDigit$2 = (ch) => ch >= 48 && ch <= 57;
5991
6091
  /**
5992
6092
  * Create a stateful {@link Scanner} for the given JSONC string.
5993
6093
  *
@@ -6085,31 +6185,31 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
6085
6185
  if (text.charCodeAt(pos) === 45) pos++;
6086
6186
  if (text.charCodeAt(pos) === 48) pos++;
6087
6187
  else {
6088
- if (!isDigit$1(text.charCodeAt(pos))) {
6188
+ if (!isDigit$2(text.charCodeAt(pos))) {
6089
6189
  tokenError = "UnexpectedEndOfNumber";
6090
6190
  return text.substring(start, pos);
6091
6191
  }
6092
6192
  pos++;
6093
- while (pos < len && isDigit$1(text.charCodeAt(pos))) pos++;
6193
+ while (pos < len && isDigit$2(text.charCodeAt(pos))) pos++;
6094
6194
  }
6095
6195
  if (pos < len && text.charCodeAt(pos) === 46) {
6096
6196
  pos++;
6097
- if (!isDigit$1(text.charCodeAt(pos))) {
6197
+ if (!isDigit$2(text.charCodeAt(pos))) {
6098
6198
  tokenError = "UnexpectedEndOfNumber";
6099
6199
  return text.substring(start, pos);
6100
6200
  }
6101
6201
  pos++;
6102
- while (pos < len && isDigit$1(text.charCodeAt(pos))) pos++;
6202
+ while (pos < len && isDigit$2(text.charCodeAt(pos))) pos++;
6103
6203
  }
6104
6204
  if (pos < len && (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101)) {
6105
6205
  pos++;
6106
6206
  if (pos < len && (text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45)) pos++;
6107
- if (!isDigit$1(text.charCodeAt(pos))) {
6207
+ if (!isDigit$2(text.charCodeAt(pos))) {
6108
6208
  tokenError = "UnexpectedEndOfNumber";
6109
6209
  return text.substring(start, pos);
6110
6210
  }
6111
6211
  pos++;
6112
- while (pos < len && isDigit$1(text.charCodeAt(pos))) pos++;
6212
+ while (pos < len && isDigit$2(text.charCodeAt(pos))) pos++;
6113
6213
  }
6114
6214
  return text.substring(start, pos);
6115
6215
  };
@@ -6215,7 +6315,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
6215
6315
  return token;
6216
6316
  }
6217
6317
  case 45:
6218
- if (pos + 1 < len && isDigit$1(text.charCodeAt(pos + 1))) {
6318
+ if (pos + 1 < len && isDigit$2(text.charCodeAt(pos + 1))) {
6219
6319
  tokenValue = scanNumber();
6220
6320
  token = "Number";
6221
6321
  return token;
@@ -6226,7 +6326,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
6226
6326
  tokenError = "InvalidSymbol";
6227
6327
  return token;
6228
6328
  default:
6229
- if (isDigit$1(ch)) {
6329
+ if (isDigit$2(ch)) {
6230
6330
  tokenValue = scanNumber();
6231
6331
  token = "Number";
6232
6332
  return token;
@@ -7580,7 +7680,7 @@ var JsoncModifier = class {
7580
7680
  });
7581
7681
  };
7582
7682
  //#endregion
7583
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/internal/bun.js
7683
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/bun.js
7584
7684
  const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
7585
7685
  const BunWorkspaceEntry = effect.Schema.Struct({
7586
7686
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -7673,7 +7773,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
7673
7773
  };
7674
7774
  });
7675
7775
  //#endregion
7676
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/internal/npm.js
7776
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/npm.js
7677
7777
  const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
7678
7778
  const NpmPackageEntry = effect.Schema.Struct({
7679
7779
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -15450,7 +15550,7 @@ function deepEqualValues(a, b) {
15450
15550
  return false;
15451
15551
  }
15452
15552
  //#endregion
15453
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/internal/documents.js
15553
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/documents.js
15454
15554
  /**
15455
15555
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
15456
15556
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -15520,7 +15620,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
15520
15620
  };
15521
15621
  });
15522
15622
  //#endregion
15523
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/internal/pnpm.js
15623
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/pnpm.js
15524
15624
  const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
15525
15625
  specifier: effect.Schema.String,
15526
15626
  version: effect.Schema.String
@@ -15645,7 +15745,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
15645
15745
  };
15646
15746
  });
15647
15747
  //#endregion
15648
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/internal/yarn.js
15748
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/yarn.js
15649
15749
  const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
15650
15750
  const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
15651
15751
  const YarnEntry = effect.Schema.Struct({
@@ -15768,7 +15868,7 @@ const cleanYarnDeps = (deps) => {
15768
15868
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
15769
15869
  };
15770
15870
  //#endregion
15771
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/Lockfile.js
15871
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/Lockfile.js
15772
15872
  const EMPTY_IMPORTERS = [];
15773
15873
  /**
15774
15874
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -16012,7 +16112,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
16012
16112
  }
16013
16113
  };
16014
16114
  //#endregion
16015
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.10_ff0fb68daff5c4399291b91de5fa8e66/node_modules/@effected/lockfiles/LockfileIntegrity.js
16115
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/LockfileIntegrity.js
16016
16116
  /**
16017
16117
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
16018
16118
  * lockfile against: a package name plus the four optional dependency maps.
@@ -16128,7 +16228,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
16128
16228
  }
16129
16229
  };
16130
16230
  //#endregion
16131
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/Dependency.js
16231
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Dependency.js
16132
16232
  /**
16133
16233
  * A resolved dependency entry pairing a package name with its version
16134
16234
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -16192,7 +16292,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
16192
16292
  }
16193
16293
  };
16194
16294
  //#endregion
16195
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/DevEngines.js
16295
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/DevEngines.js
16196
16296
  /**
16197
16297
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
16198
16298
  *
@@ -16230,7 +16330,7 @@ const DevEnginesSchema = effect.Schema.Struct({
16230
16330
  libc: effect.Schema.optionalKey(DevEngineOrArray)
16231
16331
  });
16232
16332
  //#endregion
16233
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/licenseIds.js
16333
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/licenseIds.js
16234
16334
  /** @internal */
16235
16335
  const ACTIVE_LICENSE_IDS = [
16236
16336
  "0BSD",
@@ -16963,7 +17063,7 @@ const LICENSE_IDS = new Set(ACTIVE_LICENSE_IDS);
16963
17063
  /** @internal */
16964
17064
  const DEPRECATED_LICENSE_IDS = new Set(DEPRECATED_LICENSE_ID_LIST);
16965
17065
  //#endregion
16966
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/License.js
17066
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/License.js
16967
17067
  /**
16968
17068
  * Indicates that a string is not a valid SPDX expression fragment: an
16969
17069
  * unrecognized license or exception identifier, or a malformed
@@ -17132,7 +17232,7 @@ var License = class License extends effect.Schema.Class("License")({
17132
17232
  }
17133
17233
  };
17134
17234
  //#endregion
17135
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/exceptions.js
17235
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/exceptions.js
17136
17236
  /** @internal */
17137
17237
  const ACTIVE_EXCEPTION_IDS = [
17138
17238
  "389-exception",
@@ -17209,7 +17309,7 @@ const EXCEPTION_IDS = new Set(ACTIVE_EXCEPTION_IDS);
17209
17309
  /** @internal */
17210
17310
  const DEPRECATED_EXCEPTION_IDS = new Set(DEPRECATED_EXCEPTION_ID_LIST);
17211
17311
  //#endregion
17212
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/LicenseException.js
17312
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/LicenseException.js
17213
17313
  /**
17214
17314
  * A validated SPDX license-exception identifier: an Effect `Schema.Class` whose
17215
17315
  * `id` is a member of the SPDX exception list. The class doubles as its own
@@ -17329,7 +17429,7 @@ var LicenseException = class LicenseException extends effect.Schema.Class("Licen
17329
17429
  }
17330
17430
  };
17331
17431
  //#endregion
17332
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/parser.js
17432
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/parser.js
17333
17433
  const TOKEN_OPEN_PAREN = 0;
17334
17434
  const TOKEN_CLOSE_PAREN = 1;
17335
17435
  const TOKEN_PLUS = 2;
@@ -17502,6 +17602,7 @@ function parse$2(input) {
17502
17602
  const head = peek();
17503
17603
  if (head === void 0 || head.type !== TOKEN_ID) return void 0;
17504
17604
  const value = head.value;
17605
+ let license;
17505
17606
  if (value.startsWith(DOCUMENT_REF_PREFIX)) {
17506
17607
  pos++;
17507
17608
  if (peek()?.type !== TOKEN_COLON) return void 0;
@@ -17511,27 +17612,32 @@ function parse$2(input) {
17511
17612
  const full = `${value}:${refToken.value}`;
17512
17613
  if (!License.isLicenseRef(full)) return void 0;
17513
17614
  pos++;
17514
- return {
17615
+ license = {
17515
17616
  kind: "licenseRef",
17516
17617
  documentRef: value.slice(12),
17517
17618
  ref: refToken.value.slice(11)
17518
17619
  };
17519
- }
17520
- if (value.startsWith(LICENSE_REF_PREFIX)) {
17620
+ } else if (value.startsWith(LICENSE_REF_PREFIX)) {
17521
17621
  if (!License.isLicenseRef(value)) return void 0;
17522
17622
  pos++;
17523
- return {
17623
+ license = {
17524
17624
  kind: "licenseRef",
17525
17625
  documentRef: void 0,
17526
17626
  ref: value.slice(11)
17527
17627
  };
17528
- }
17529
- if (!License.isKnownId(value)) return void 0;
17530
- pos++;
17531
- let plus = false;
17532
- if (peek()?.type === TOKEN_PLUS) {
17628
+ } else {
17629
+ if (!License.isKnownId(value)) return void 0;
17533
17630
  pos++;
17534
- plus = true;
17631
+ let plus = false;
17632
+ if (peek()?.type === TOKEN_PLUS) {
17633
+ pos++;
17634
+ plus = true;
17635
+ }
17636
+ license = {
17637
+ kind: "license",
17638
+ id: value,
17639
+ plus
17640
+ };
17535
17641
  }
17536
17642
  if (peek()?.type === TOKEN_WITH) {
17537
17643
  pos++;
@@ -17540,25 +17646,18 @@ function parse$2(input) {
17540
17646
  pos++;
17541
17647
  return {
17542
17648
  kind: "with",
17543
- license: {
17544
- id: value,
17545
- plus
17546
- },
17649
+ license,
17547
17650
  exception: exceptionToken.value
17548
17651
  };
17549
17652
  }
17550
- return {
17551
- kind: "license",
17552
- id: value,
17553
- plus
17554
- };
17653
+ return license;
17555
17654
  }
17556
17655
  const node = parseOr();
17557
17656
  if (node === void 0 || pos !== tokens.length) return void 0;
17558
17657
  return node;
17559
17658
  }
17560
17659
  //#endregion
17561
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/SpdxExpression.js
17660
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/SpdxExpression.js
17562
17661
  /**
17563
17662
  * Serialize a tagged SPDX AST node — a class instance OR its encoded POJO — to
17564
17663
  * the canonical, fully-parenthesized SPDX string. This is the single source of
@@ -17615,15 +17714,16 @@ var LicenseRefNode = class extends effect.Schema.TaggedClass()("LicenseRef", {
17615
17714
  }
17616
17715
  };
17617
17716
  /**
17618
- * A `license WITH exception` node. Per the SPDX order of precedence, `WITH`
17619
- * binds only to a simple license (never a reference or a compound expression),
17620
- * so `license` is always a {@link LicenseNode}.
17717
+ * A `license WITH exception` node. Per the SPDX grammar, `WITH` binds to a
17718
+ * simple expression a license identifier (optionally `+`) or a
17719
+ * `LicenseRef`/`DocumentRef` reference never a compound expression, so
17720
+ * `license` is a {@link LicenseNode} or a {@link LicenseRefNode}.
17621
17721
  *
17622
17722
  * @public
17623
17723
  */
17624
17724
  var WithExceptionNode = class extends effect.Schema.TaggedClass()("WithException", {
17625
- /** The license the exception applies to, which may itself carry the `+` marker. */
17626
- license: LicenseNode,
17725
+ /** The license the exception applies to: a simple license (which may carry the `+` marker) or a `LicenseRef` reference. */
17726
+ license: effect.Schema.Union([LicenseNode, LicenseRefNode]),
17627
17727
  /** The SPDX exception short identifier, e.g. `"Bison-exception-2.2"`. */
17628
17728
  exception: effect.Schema.String
17629
17729
  }) {
@@ -17673,21 +17773,21 @@ const SpdxExpressionUnion = effect.Schema.Union([
17673
17773
  AndNode,
17674
17774
  OrNode
17675
17775
  ]);
17776
+ function materializeSimple(raw) {
17777
+ return raw.kind === "license" ? LicenseNode.make({
17778
+ id: raw.id,
17779
+ plus: raw.plus
17780
+ }) : LicenseRefNode.make(raw.documentRef !== void 0 ? {
17781
+ documentRef: raw.documentRef,
17782
+ ref: raw.ref
17783
+ } : { ref: raw.ref });
17784
+ }
17676
17785
  function materialize$1(raw) {
17677
17786
  switch (raw.kind) {
17678
- case "license": return LicenseNode.make({
17679
- id: raw.id,
17680
- plus: raw.plus
17681
- });
17682
- case "licenseRef": return LicenseRefNode.make(raw.documentRef !== void 0 ? {
17683
- documentRef: raw.documentRef,
17684
- ref: raw.ref
17685
- } : { ref: raw.ref });
17787
+ case "license":
17788
+ case "licenseRef": return materializeSimple(raw);
17686
17789
  case "with": return WithExceptionNode.make({
17687
- license: LicenseNode.make({
17688
- id: raw.license.id,
17689
- plus: raw.license.plus
17690
- }),
17790
+ license: materializeSimple(raw.license),
17691
17791
  exception: raw.exception
17692
17792
  });
17693
17793
  case "and": return AndNode.make({
@@ -17747,7 +17847,7 @@ effect.Schema.String.pipe(effect.Schema.decodeTo(SpdxExpressionUnion, effect.Sch
17747
17847
  encode: (expression) => effect.Effect.succeed(serialize$1(expression))
17748
17848
  })));
17749
17849
  //#endregion
17750
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/License.js
17850
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/License.js
17751
17851
  /**
17752
17852
  * Indicates that a string is not a valid SPDX license identifier or expression.
17753
17853
  *
@@ -17782,7 +17882,7 @@ const isValidSpdx = (value) => {
17782
17882
  */
17783
17883
  const SpdxLicense = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isValidSpdx(value) ? void 0 : "Expected a valid SPDX license expression")), effect.Schema.brand("SpdxLicense"));
17784
17884
  //#endregion
17785
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/PackageManager.js
17885
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/PackageManager.js
17786
17886
  const PACKAGE_MANAGER_NAME_RE = /^[a-z]+$/;
17787
17887
  const invalid$1 = (input, message) => effect.Effect.fail(new effect.SchemaIssue.InvalidValue({ message }, input));
17788
17888
  /**
@@ -17893,7 +17993,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
17893
17993
  }
17894
17994
  };
17895
17995
  //#endregion
17896
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/PackageName.js
17996
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/PackageName.js
17897
17997
  /**
17898
17998
  * Indicates that a string could not be used as a valid npm package name.
17899
17999
  *
@@ -17951,7 +18051,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
17951
18051
  isScoped
17952
18052
  });
17953
18053
  //#endregion
17954
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/Person.js
18054
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Person.js
17955
18055
  const parsePersonString = (input) => {
17956
18056
  const emailMatch = input.match(/<([^>]+)>/);
17957
18057
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -18097,7 +18197,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
18097
18197
  }
18098
18198
  };
18099
18199
  //#endregion
18100
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/Repository.js
18200
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Repository.js
18101
18201
  /** The shorthand hosts npm resolves without a scheme. */
18102
18202
  const SHORTHAND_HOSTS = /* @__PURE__ */ new Map([
18103
18203
  ["github", "https://github.com"],
@@ -18272,7 +18372,7 @@ var Bugs = class Bugs extends effect.Schema.Class("Bugs")({
18272
18372
  })));
18273
18373
  };
18274
18374
  //#endregion
18275
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/internal/format.js
18375
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/internal/format.js
18276
18376
  const KEY_INDEX = new Map([
18277
18377
  "$schema",
18278
18378
  "name",
@@ -18507,7 +18607,7 @@ const renderJson = (raw, options) => {
18507
18607
  return options.newline ? `${json}\n` : json;
18508
18608
  };
18509
18609
  //#endregion
18510
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/internal/wire.js
18610
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/internal/wire.js
18511
18611
  const RawJson = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
18512
18612
  /**
18513
18613
  * Build the open-JSON ↔ class wire codec for a `Schema.Class` carrying a
@@ -18538,7 +18638,7 @@ const makeWire = (Class) => {
18538
18638
  })));
18539
18639
  };
18540
18640
  //#endregion
18541
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/Package.js
18641
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Package.js
18542
18642
  const toHashMap = effect.SchemaTransformation.transform({
18543
18643
  decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
18544
18644
  encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
@@ -18825,7 +18925,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
18825
18925
  }
18826
18926
  };
18827
18927
  //#endregion
18828
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspacePackage.js
18928
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspacePackage.js
18829
18929
  const EMPTY$1 = Object.freeze(Object.create(null));
18830
18930
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
18831
18931
  /**
@@ -19423,7 +19523,7 @@ var Walker$1 = class {
19423
19523
  static findRoot = findRoot$1;
19424
19524
  };
19425
19525
  //#endregion
19426
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceRoot.js
19526
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceRoot.js
19427
19527
  /**
19428
19528
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
19429
19529
  *
@@ -19610,7 +19710,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
19610
19710
  static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
19611
19711
  };
19612
19712
  //#endregion
19613
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/limits.js
19713
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/limits.js
19614
19714
  /**
19615
19715
  * Hard ceiling on directories the enumerator will visit for one pattern set.
19616
19716
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -19628,7 +19728,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
19628
19728
  */
19629
19729
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
19630
19730
  //#endregion
19631
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/traverse.js
19731
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/traverse.js
19632
19732
  /** Directory names never descended into. */
19633
19733
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
19634
19734
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -19718,7 +19818,7 @@ var Traversal = class {
19718
19818
  }
19719
19819
  };
19720
19820
  //#endregion
19721
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/enumerate.js
19821
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/enumerate.js
19722
19822
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
19723
19823
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
19724
19824
  /**
@@ -19788,7 +19888,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
19788
19888
  return results;
19789
19889
  });
19790
19890
  //#endregion
19791
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/patterns.js
19891
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/patterns.js
19792
19892
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
19793
19893
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
19794
19894
  const pnpmPatternsOf = (document) => {
@@ -19845,7 +19945,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
19845
19945
  return manifestPatternsOf(manifest);
19846
19946
  });
19847
19947
  //#endregion
19848
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceDiscovery.js
19948
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceDiscovery.js
19849
19949
  /**
19850
19950
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
19851
19951
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -20301,7 +20401,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
20301
20401
  };
20302
20402
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
20303
20403
  //#endregion
20304
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/DependencyGraph.js
20404
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/DependencyGraph.js
20305
20405
  /**
20306
20406
  * Raised when the workspace dependency graph cannot be topologically ordered
20307
20407
  * because it contains a cycle.
@@ -23997,7 +24097,7 @@ var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
23997
24097
  static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
23998
24098
  };
23999
24099
  //#endregion
24000
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/ChangeDetector.js
24100
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/ChangeDetector.js
24001
24101
  /**
24002
24102
  * Which git refs to compare, and whether to fold in the working tree.
24003
24103
  *
@@ -24253,7 +24353,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
24253
24353
  };
24254
24354
  }
24255
24355
  //#endregion
24256
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/catalogs.js
24356
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/catalogs.js
24257
24357
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
24258
24358
  const inlineCatalogs = (manifest) => {
24259
24359
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -24317,7 +24417,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
24317
24417
  });
24318
24418
  };
24319
24419
  //#endregion
24320
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/ConfigDependencyHooks.js
24420
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/ConfigDependencyHooks.js
24321
24421
  /** Whether `value` is a non-null, non-array object. */
24322
24422
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
24323
24423
  /**
@@ -24731,7 +24831,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
24731
24831
  }));
24732
24832
  };
24733
24833
  //#endregion
24734
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/PackageManagerName.js
24834
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/PackageManagerName.js
24735
24835
  /**
24736
24836
  * The four package managers this package understands.
24737
24837
  *
@@ -25106,7 +25206,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
25106
25206
  static layerTest = (overrides = {}) => effect.Layer.succeed(PackageManagerDetector, PackageManagerDetector.makeTest(overrides));
25107
25207
  };
25108
25208
  //#endregion
25109
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/LockfileReader.js
25209
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/LockfileReader.js
25110
25210
  /**
25111
25211
  * Raised when the workspace's lockfile cannot be read off disk.
25112
25212
  *
@@ -25286,7 +25386,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
25286
25386
  static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
25287
25387
  };
25288
25388
  //#endregion
25289
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/Publishability.js
25389
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/Publishability.js
25290
25390
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
25291
25391
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
25292
25392
  /**
@@ -25445,7 +25545,7 @@ var PublishabilityDetector = class extends effect.Context.Service()("@effected/w
25445
25545
  static layerNone = effect.Layer.succeed(this, this.none);
25446
25546
  };
25447
25547
  //#endregion
25448
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/importerVersions.js
25548
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/importerVersions.js
25449
25549
  /**
25450
25550
  * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
25451
25551
  *
@@ -25531,7 +25631,7 @@ const unanimousVersionOf = (index, dependency) => {
25531
25631
  return agreed;
25532
25632
  };
25533
25633
  //#endregion
25534
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceCatalogs.js
25634
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceCatalogs.js
25535
25635
  /**
25536
25636
  * An immutable, fully-normalized catalog collection — the one catalog
25537
25637
  * resolution semantic in the package.
@@ -26058,7 +26158,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
26058
26158
  }));
26059
26159
  };
26060
26160
  //#endregion
26061
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
26161
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
26062
26162
  const EMPTY = Object.freeze(Object.create(null));
26063
26163
  const DependencyMap = effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY)));
26064
26164
  /**
@@ -26281,7 +26381,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
26281
26381
  }
26282
26382
  };
26283
26383
  //#endregion
26284
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceSnapshots.js
26384
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceSnapshots.js
26285
26385
  /** Whether `value` is a non-null, non-array object. */
26286
26386
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
26287
26387
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -26558,7 +26658,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
26558
26658
  static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
26559
26659
  };
26560
26660
  //#endregion
26561
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/Workspaces.js
26661
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/Workspaces.js
26562
26662
  const compose = (options, catalogsFactory) => {
26563
26663
  const roots = WorkspaceRoot.layer;
26564
26664
  const detector = PackageManagerDetector.layer;
@@ -49575,68 +49675,453 @@ function parseCommitMessage(message) {
49575
49675
  return { description: message };
49576
49676
  }
49577
49677
  //#endregion
49578
- //#region ../silk-effects/dist/dev/pkg/changesets/utils/issue-refs.js
49678
+ //#region ../../node_modules/.pnpm/@effected+github-references@0.1.0_effect@4.0.0-rc.109/node_modules/@effected/github-references/IssueReferences.js
49579
49679
  /**
49580
- * Matches "closes #123" or "close: #456, #789" patterns (case-insensitive).
49680
+ * GitHub's closing-keyword issue-reference grammar, as pure functions.
49581
49681
  *
49582
- * Capture group `[1]` contains the comma-separated issue number list.
49682
+ * @remarks
49683
+ * GitHub links an issue to a pull request when the PR's description carries
49684
+ * `<keyword> #<number>` for one of nine documented keywords. Consumers speak
49685
+ * that grammar in two distinct dialects, and this module models exactly those
49686
+ * two — no service, no layer, nothing but strings in and values out:
49687
+ *
49688
+ * - **Inline-in-prose** ({@link harvestIssueReferences}): a reference may appear anywhere in
49689
+ * running text — `"fixes #12 and closes #13"` — with mandatory whitespace
49690
+ * and **no colon**, because that is the spelling GitHub itself scans PR
49691
+ * bodies for. This is the dialect a release pipeline harvests from commit
49692
+ * subjects and PR descriptions.
49693
+ * - **Bare-line** ({@link parseBareLineReference}): the whole line, after trimming, *is*
49694
+ * the reference — `"Closes: #12"` — with an **optional colon**, because a
49695
+ * generated references region writes one reference per line and a colon
49696
+ * reads better there. GitHub does not require the colon; the region format
49697
+ * allows it, so the parser must too. The dialects differ because their
49698
+ * producers do: prose is written by humans for GitHub's scanner, the region
49699
+ * is written by tooling for humans.
49700
+ *
49701
+ * Deliberately out of scope this round: cross-repo references
49702
+ * (`owner/repo#N`) and full-URL references
49703
+ * (`https://github.com/owner/repo/issues/N`). Both are real GitHub spellings;
49704
+ * neither dialect's consumers emit them yet, and guessing at their shape here
49705
+ * would freeze an API nobody has driven.
49706
+ */
49707
+ /**
49708
+ * The nine closing keywords GitHub documents, lowercased.
49583
49709
  *
49584
- * @internal
49710
+ * @public
49585
49711
  */
49586
- const CLOSES_ISSUE_PATTERN = /closes?:?\s*#?(\d+(?:, *#?\d+)*)/i;
49712
+ const CLOSING_KEYWORDS = [
49713
+ "close",
49714
+ "closes",
49715
+ "closed",
49716
+ "fix",
49717
+ "fixes",
49718
+ "fixed",
49719
+ "resolve",
49720
+ "resolves",
49721
+ "resolved"
49722
+ ];
49723
+ /**
49724
+ * Both patterns derive from {@link CLOSING_KEYWORDS} so the constant and the
49725
+ * grammar cannot drift. Alternation order is safe: the regex engine backtracks
49726
+ * through alternatives, so `close` matching inside `closes` fails at the
49727
+ * mandatory `#`-introducer and retries the longer keyword.
49728
+ */
49729
+ const KEYWORDS = CLOSING_KEYWORDS.join("|");
49730
+ new RegExp(`\\b(${KEYWORDS})\\s+#(\\d+)`, "gi");
49731
+ new RegExp(`^(${KEYWORDS}):?[ \\t]+#(\\d+)$`, "i");
49732
+ //#endregion
49733
+ //#region ../../node_modules/.pnpm/@effected+github-references@0.1.0_effect@4.0.0-rc.109/node_modules/@effected/github-references/ClosingList.js
49587
49734
  /**
49588
- * Matches "fixes #123" or "fix: #456, #789" patterns (case-insensitive).
49735
+ * The closing-list dialect: one whole line naming several issues at once.
49589
49736
  *
49590
- * Capture group `[1]` contains the comma-separated issue number list.
49737
+ * @remarks
49738
+ * The third dialect, alongside the two in `IssueReferences`: after trimming,
49739
+ * the **entire** line must be `<keyword>[:] <list>` — keyword
49740
+ * case-insensitive (lowercased to canonical form in the result), colon
49741
+ * optional, and the list one or more `#<digits>` items separated by `,`,
49742
+ * `and`, or the Oxford `, and`. Whitespace inside the line is `[ \t]` only,
49743
+ * so an embedded newline cannot smuggle two lines past a parser whose
49744
+ * contract is one — the same posture as the bare-line pattern. Any trailing
49745
+ * content after the list rejects the line; duplicates are preserved in order,
49746
+ * because whether `#1, #1` means one issue or two is the caller's business.
49747
+ *
49748
+ * Two keyword sets play here. {@link parseClosingList} accepts only the nine
49749
+ * closing keywords and yields a {@link ClosingList}; {@link parseReferenceList}
49750
+ * additionally accepts the non-closing {@link REFERENCE_KEYWORDS} (`ref`,
49751
+ * `refs`, `references`) and reports which set matched via
49752
+ * {@link ReferenceList}'s `closing` flag.
49753
+ *
49754
+ * An item whose digits exceed `Number.MAX_SAFE_INTEGER` rejects the **whole
49755
+ * line**, where `harvestIssueReferences` merely skips the one match. The
49756
+ * asymmetry is deliberate: a harvest drops one reference out of running
49757
+ * prose, but a list line is a single claim about a set of issues, and
49758
+ * returning the parseable subset would misrepresent the line as claiming
49759
+ * less than it does.
49760
+ *
49761
+ * Complexity posture: parsing is a single left-to-right character scan —
49762
+ * this module contains **no regular expressions at all** — so worst-case
49763
+ * time is linear in the line length by construction. There is no
49764
+ * backtracking engine to feed, no polynomial blow-up for a scanner to flag,
49765
+ * and therefore no input truncation.
49766
+ *
49767
+ * Beyond the whole-line parsers, {@link harvestReferenceLists} generalizes
49768
+ * the same list grammar to the inline-in-prose posture — several lists on
49769
+ * one line of running text — and {@link parseClosingLists} /
49770
+ * {@link parseReferenceLists} apply the whole-line parsers per line of a
49771
+ * multi-line text. All of them ride the same character scan; the no-regex
49772
+ * promise above covers every export here.
49773
+ */
49774
+ /**
49775
+ * The non-closing reference keywords the list dialect accepts, lowercased.
49591
49776
  *
49592
- * @internal
49777
+ * @remarks
49778
+ * GitHub does not act on these — they associate without closing — but a
49779
+ * references region writes them, so the parser must read them.
49780
+ *
49781
+ * @public
49593
49782
  */
49594
- const FIXES_ISSUE_PATTERN = /fix(?:es)?:?\s*#?(\d+(?:, *#?\d+)*)/i;
49783
+ const REFERENCE_KEYWORDS = [
49784
+ "ref",
49785
+ "refs",
49786
+ "references"
49787
+ ];
49788
+ /**
49789
+ * Both keyword tables ARE the exported constants — membership sets built from
49790
+ * them once — so the constants and the grammar cannot drift.
49791
+ */
49792
+ const ALL_KEYWORDS = /* @__PURE__ */ new Set([...CLOSING_KEYWORDS, ...REFERENCE_KEYWORDS]);
49793
+ /** Membership test for reporting `closing`, widened once so no call casts. */
49794
+ const CLOSING_SET = new Set(CLOSING_KEYWORDS);
49795
+ const HASH = 35;
49796
+ const COLON = 58;
49797
+ const COMMA = 44;
49798
+ /** `[ \t]` — the only whitespace the dialect admits, per the module remarks. */
49799
+ const isSpaceTab = (code) => code === 32 || code === 9;
49800
+ const isDigit$1 = (code) => code >= 48 && code <= 57;
49801
+ const isAsciiLetter = (code) => code >= 65 && code <= 90 || code >= 97 && code <= 122;
49802
+ /** The index after the run of `[ \t]` starting at `from` (possibly `from` itself). */
49803
+ const skipSpaceTab = (line, from) => {
49804
+ let index = from;
49805
+ while (index < line.length && isSpaceTab(line.charCodeAt(index))) index += 1;
49806
+ return index;
49807
+ };
49595
49808
  /**
49596
- * Matches "refs #123" or "ref: #456, #789" patterns (case-insensitive).
49809
+ * One list item at exactly `from`: `#<digits>` and the index one past it.
49810
+ * Digits exceeding `Number.MAX_SAFE_INTEGER` report `"unsafe"` rather than a
49811
+ * silently rounded issue number, still carrying the index one past the digit
49812
+ * run so a caller can skip the item's extent; the whole-line parsers reject
49813
+ * on it and {@link harvestReferenceLists} abandons the entire candidate —
49814
+ * see the module remarks for why a list never yields a partial reading.
49815
+ * Anything that is not `#<digits>` at all is `undefined`.
49816
+ */
49817
+ const readItem = (line, from) => {
49818
+ if (line.charCodeAt(from) !== HASH) return void 0;
49819
+ const start = from + 1;
49820
+ let index = start;
49821
+ while (index < line.length && isDigit$1(line.charCodeAt(index))) index += 1;
49822
+ if (index === start) return void 0;
49823
+ const value = Number(line.slice(start, index));
49824
+ return Number.isSafeInteger(value) ? {
49825
+ kind: "item",
49826
+ value,
49827
+ next: index
49828
+ } : {
49829
+ kind: "unsafe",
49830
+ next: index
49831
+ };
49832
+ };
49833
+ /**
49834
+ * One separator at exactly `from`: a comma with optional surrounding `[ \t]`
49835
+ * and an optional Oxford `and` (consumed only when its own trailing `[ \t]+`
49836
+ * is present), or a bare `and` requiring `[ \t]+` on both sides. `and` is
49837
+ * lowercase-only — the keyword head is case-insensitive, the separator is
49838
+ * not. Returns the index where the next item must start, or `undefined` when
49839
+ * no separator is present.
49840
+ */
49841
+ const scanSeparator = (line, from) => {
49842
+ const afterLeading = skipSpaceTab(line, from);
49843
+ if (line.charCodeAt(afterLeading) === COMMA) {
49844
+ const afterComma = skipSpaceTab(line, afterLeading + 1);
49845
+ if (line.startsWith("and", afterComma)) {
49846
+ const afterAnd = skipSpaceTab(line, afterComma + 3);
49847
+ if (afterAnd > afterComma + 3) return afterAnd;
49848
+ }
49849
+ return afterComma;
49850
+ }
49851
+ if (afterLeading > from && line.startsWith("and", afterLeading)) {
49852
+ const afterAnd = skipSpaceTab(line, afterLeading + 3);
49853
+ if (afterAnd > afterLeading + 3) return afterAnd;
49854
+ }
49855
+ };
49856
+ /**
49857
+ * The scan walk: item, then separator, then item, until the cursor stands
49858
+ * exactly at the end of the string. Anything else — a malformed item, an
49859
+ * unknown separator, trailing content, an unsafe issue number — is
49860
+ * `undefined`, and the caller rejects the whole line.
49861
+ */
49862
+ const parseItems = (line, from) => {
49863
+ const issueNumbers = [];
49864
+ let cursor = from;
49865
+ for (;;) {
49866
+ const item = readItem(line, cursor);
49867
+ if (item === void 0 || item.kind === "unsafe") return void 0;
49868
+ issueNumbers.push(item.value);
49869
+ cursor = item.next;
49870
+ if (cursor === line.length) return issueNumbers;
49871
+ const next = scanSeparator(line, cursor);
49872
+ if (next === void 0) return void 0;
49873
+ cursor = next;
49874
+ }
49875
+ };
49876
+ /**
49877
+ * The list a whole line carries under either keyword set, or `Option.none()`.
49597
49878
  *
49598
- * Capture group `[1]` contains the comma-separated issue number list.
49879
+ * @remarks
49880
+ * Accepts the nine closing keywords plus {@link REFERENCE_KEYWORDS}, and
49881
+ * reports which set matched in the result's `closing` flag. Grammar,
49882
+ * whole-line posture and the whole-line rejection of unsafe issue numbers
49883
+ * are in the module remarks.
49599
49884
  *
49600
- * @internal
49885
+ * @public
49601
49886
  */
49602
- const REFS_ISSUE_PATTERN = /refs?:?\s*#?(\d+(?:, *#?\d+)*)/i;
49887
+ const parseReferenceList = (line) => {
49888
+ const trimmed = line.trim();
49889
+ let letters = 0;
49890
+ while (letters < trimmed.length && isAsciiLetter(trimmed.charCodeAt(letters))) letters += 1;
49891
+ if (letters === 0) return effect.Option.none();
49892
+ const keyword = trimmed.slice(0, letters).toLowerCase();
49893
+ if (!ALL_KEYWORDS.has(keyword)) return effect.Option.none();
49894
+ let cursor = letters;
49895
+ if (trimmed.charCodeAt(cursor) === COLON) cursor += 1;
49896
+ const afterWhitespace = skipSpaceTab(trimmed, cursor);
49897
+ if (afterWhitespace === cursor) return effect.Option.none();
49898
+ const issueNumbers = parseItems(trimmed, afterWhitespace);
49899
+ if (issueNumbers === void 0) return effect.Option.none();
49900
+ return effect.Option.some({
49901
+ keyword,
49902
+ closing: CLOSING_SET.has(keyword),
49903
+ issueNumbers
49904
+ });
49905
+ };
49603
49906
  /**
49604
- * Pattern for splitting comma-separated issue numbers.
49907
+ * Every reference list a text carries, line by line, across both postures.
49605
49908
  *
49606
- * @internal
49909
+ * @remarks
49910
+ * The trailer/prose interleave consumers otherwise hand-roll: each line is
49911
+ * tried as a whole-line reference list first ({@link parseReferenceList} —
49912
+ * colon-tolerant, per the line dialect), and only a line that is not one is
49913
+ * harvested inline ({@link harvestReferenceLists} — no colon, per the inline
49914
+ * dialect). The preference means a colon-less trailer line contributes its
49915
+ * list exactly once, never once per posture.
49916
+ *
49917
+ * Results carry no offsets, deliberately: this is the line-granular
49918
+ * composition, and a consumer that needs spans uses
49919
+ * {@link harvestReferenceLists} directly. Duplicates are preserved, in
49920
+ * document order.
49921
+ *
49922
+ * @public
49607
49923
  */
49608
- const ISSUE_NUMBER_SPLIT_PATTERN = /, */;
49924
+ const collectReferenceLists = (text) => {
49925
+ const lists = [];
49926
+ for (const line of text.split("\n")) {
49927
+ const whole = parseReferenceList(line);
49928
+ if (effect.Option.isSome(whole)) {
49929
+ lists.push(whole.value);
49930
+ continue;
49931
+ }
49932
+ for (const harvested of harvestReferenceLists(line)) lists.push({
49933
+ keyword: harvested.keyword,
49934
+ closing: harvested.closing,
49935
+ issueNumbers: harvested.issueNumbers
49936
+ });
49937
+ }
49938
+ return lists;
49939
+ };
49940
+ /** `[A-Za-z0-9_]` — the word-boundary alphabet the inline dialects use. */
49941
+ const isWordChar = (code) => isAsciiLetter(code) || isDigit$1(code) || code === 95;
49942
+ /**
49943
+ * The full JavaScript `\s` set, spelled as a predicate so the module keeps
49944
+ * its no-regex promise: ASCII whitespace, NEL-adjacent controls, and the
49945
+ * Unicode space separators. Only the keyword→first-item gap of
49946
+ * {@link harvestReferenceLists} admits this set — everything inside a list
49947
+ * stays `[ \t]`, per the module remarks.
49948
+ */
49949
+ const isAnyWhitespace = (code) => code === 32 || code >= 9 && code <= 13 || code === 160 || code === 5760 || code >= 8192 && code <= 8202 || code === 8232 || code === 8233 || code === 8239 || code === 8287 || code === 12288 || code === 65279;
49950
+ /**
49951
+ * Every reference list found inline in `text`, in document order.
49952
+ *
49953
+ * @remarks
49954
+ * The inline-in-prose posture generalized to lists:
49955
+ * `Closes #123, Fixes #456` in one line of a commit body yields two
49956
+ * single-item lists, where
49957
+ * `harvestIssueReferences` reads only the first reference of each and the
49958
+ * whole-line parsers read neither. The grammar per candidate:
49959
+ *
49960
+ * - The keyword is case-insensitive, drawn from either keyword set,
49961
+ * lowercased to canonical form in the result, with `closing` reported by
49962
+ * set membership. Word boundaries hold on both sides: the characters
49963
+ * immediately before and after the keyword's letter run must not be
49964
+ * `[A-Za-z0-9_]`, so `recloses #1` and `1closes #1` do not match.
49965
+ * - **No colon** — exactly like `harvestIssueReferences`, the colon spelling
49966
+ * belongs to the line dialects ({@link parseReferenceList} and the
49967
+ * bare-line parser), so `closes: #1` inline yields nothing.
49968
+ * - The keyword→first-item gap is any run of whitespace **including
49969
+ * newlines**, mirroring the inline dialect's `\s+`.
49970
+ * - List continuation uses the `,` / `and` / Oxford separators with `[ \t]`
49971
+ * whitespace only, so a list cannot continue past a newline — a later
49972
+ * line makes its own claims.
49973
+ * - Items are `#<digits>`; duplicates are preserved in order.
49974
+ *
49975
+ * A list ends at its last valid item: in `closes #1 and fixes #2` the
49976
+ * ` and ` before `fixes` fails as a separator because what follows is not
49977
+ * `#`, so the text yields `closes: [1]` then `fixes: [2]`. An item past
49978
+ * `Number.MAX_SAFE_INTEGER` anywhere in a candidate skips the **entire**
49979
+ * candidate — never a partial list, for the same reason
49980
+ * {@link parseReferenceList} rejects the whole line — and scanning resumes
49981
+ * after the candidate's scanned extent.
49982
+ *
49983
+ * Like everything in this module, the harvest is a single left-to-right
49984
+ * character scan with no regular expressions, so time stays linear in the
49985
+ * text length and no input is truncated.
49986
+ *
49987
+ * @public
49988
+ */
49989
+ const harvestReferenceLists = (text) => {
49990
+ const lists = [];
49991
+ let index = 0;
49992
+ while (index < text.length) {
49993
+ if (!isAsciiLetter(text.charCodeAt(index))) {
49994
+ index += 1;
49995
+ continue;
49996
+ }
49997
+ const runStart = index;
49998
+ let runEnd = index + 1;
49999
+ while (runEnd < text.length && isAsciiLetter(text.charCodeAt(runEnd))) runEnd += 1;
50000
+ if (runStart > 0 && isWordChar(text.charCodeAt(runStart - 1)) || runEnd < text.length && isWordChar(text.charCodeAt(runEnd))) {
50001
+ index = runEnd;
50002
+ continue;
50003
+ }
50004
+ const keyword = text.slice(runStart, runEnd).toLowerCase();
50005
+ if (!ALL_KEYWORDS.has(keyword)) {
50006
+ index = runEnd;
50007
+ continue;
50008
+ }
50009
+ let cursor = runEnd;
50010
+ while (cursor < text.length && isAnyWhitespace(text.charCodeAt(cursor))) cursor += 1;
50011
+ const first = cursor === runEnd ? void 0 : readItem(text, cursor);
50012
+ if (first === void 0) {
50013
+ index = runEnd;
50014
+ continue;
50015
+ }
50016
+ if (first.kind === "unsafe") {
50017
+ index = first.next;
50018
+ continue;
50019
+ }
50020
+ const issueNumbers = [first.value];
50021
+ let end = first.next;
50022
+ let unsafeNext;
50023
+ for (;;) {
50024
+ const next = scanSeparator(text, end);
50025
+ if (next === void 0) break;
50026
+ const item = readItem(text, next);
50027
+ if (item === void 0) break;
50028
+ if (item.kind === "unsafe") {
50029
+ unsafeNext = item.next;
50030
+ break;
50031
+ }
50032
+ issueNumbers.push(item.value);
50033
+ end = item.next;
50034
+ }
50035
+ if (unsafeNext !== void 0) {
50036
+ index = unsafeNext;
50037
+ continue;
50038
+ }
50039
+ lists.push({
50040
+ keyword,
50041
+ closing: CLOSING_SET.has(keyword),
50042
+ issueNumbers,
50043
+ start: runStart,
50044
+ end
50045
+ });
50046
+ index = end;
50047
+ }
50048
+ return lists;
50049
+ };
50050
+ //#endregion
50051
+ //#region ../../node_modules/.pnpm/@effected+github-references@0.1.0_effect@4.0.0-rc.109/node_modules/@effected/github-references/KeywordFamily.js
50052
+ /**
50053
+ * The projection table IS the totality proof: `Record` over the union of
50054
+ * both keyword types makes a keyword added to either constant without an
50055
+ * entry here fail to compile.
50056
+ */
50057
+ const FAMILIES = {
50058
+ close: "close",
50059
+ closes: "close",
50060
+ closed: "close",
50061
+ fix: "fix",
50062
+ fixes: "fix",
50063
+ fixed: "fix",
50064
+ resolve: "resolve",
50065
+ resolves: "resolve",
50066
+ resolved: "resolve",
50067
+ ref: "ref",
50068
+ refs: "ref",
50069
+ references: "ref"
50070
+ };
49609
50071
  /**
49610
- * Extract issue numbers from a regex match against a commit message.
50072
+ * The family a keyword belongs to.
49611
50073
  *
49612
50074
  * @remarks
49613
- * Truncates the input to 10,000 characters before matching to prevent
49614
- * ReDoS on adversarial input. Strips `#` prefixes from matched numbers.
50075
+ * Total over both keyword sets by construction see the module remarks for
50076
+ * why an explicit record beats a `startsWith` heuristic. `close`, `closes`
50077
+ * and `closed` map to `"close"`; the `fix` and `resolve` conjugations
50078
+ * likewise; `ref`, `refs` and `references` map to `"ref"`. The evidence for
50079
+ * the projection is downstream: categorized harvesters key maps by family,
50080
+ * and each was hand-rolling this collapse.
49615
50081
  *
49616
- * @param pattern - The regex pattern to match (must have a capture group for issue numbers)
49617
- * @param message - The commit message body to search
49618
- * @returns Array of issue number strings (without `#` prefix)
50082
+ * @public
50083
+ */
50084
+ const keywordFamily = (keyword) => FAMILIES[keyword];
50085
+ //#endregion
50086
+ //#region ../silk-effects/dist/dev/pkg/changesets/utils/issue-refs.js
50087
+ /**
50088
+ * The output category each keyword family lands in.
50089
+ *
50090
+ * @remarks
50091
+ * The `resolve` family reads as `closes` since closing is what those keywords
50092
+ * do; the record is total over `KeywordFamily`, so a family the kit adds
50093
+ * without a category here is a type error, never a silent drop.
49619
50094
  *
49620
50095
  * @internal
49621
50096
  */
49622
- function extractIssueNumbers(pattern, message) {
49623
- const safeMessage = message.slice(0, 1e4);
49624
- const match = pattern.exec(safeMessage);
49625
- if (!match?.[1]) return [];
49626
- return match[1].split(ISSUE_NUMBER_SPLIT_PATTERN).map((num) => num.replace("#", "").trim());
50097
+ const CATEGORY_BY_FAMILY = {
50098
+ close: "closes",
50099
+ fix: "fixes",
50100
+ ref: "refs",
50101
+ resolve: "closes"
50102
+ };
50103
+ /** @internal */
50104
+ function categoryOf(list) {
50105
+ return CATEGORY_BY_FAMILY[keywordFamily(list.keyword)];
49627
50106
  }
49628
50107
  /**
49629
50108
  * Parse a commit message for GitHub issue references.
49630
50109
  *
49631
- * Recognizes `Closes`, `Fixes`, and `Refs` keywords with various formats:
49632
- * - `Closes #123`
49633
- * - `Fixes: #456, #789`
49634
- * - `Refs #101`
50110
+ * Recognizes GitHub's closing keywords plus `Ref`/`Refs`/`References` in
50111
+ * both list dialects:
50112
+ * - whole-line trailers — `Closes #123`, `Fixes: #456, #789`, `Refs #101`;
50113
+ * - inline in prose — `This closes #12 in passing`, or several lists on one
50114
+ * line: `Closes #123, Fixes #456`.
49635
50115
  *
49636
50116
  * @remarks
49637
- * Each keyword category is matched independently, so a single commit
49638
- * message can contain references in all three categories. Keywords are
49639
- * case-insensitive and accept both singular and plural forms.
50117
+ * References accumulate in message order: two `Closes` lists contribute to
50118
+ * the same category. Keywords are case-insensitive and the `#` is mandatory.
50119
+ * The colon spelling is line-dialect-only; `collectReferenceLists` owns the
50120
+ * per-line composition (whole-line trailer parse first, inline harvest
50121
+ * otherwise), guaranteeing a trailer line is never double-counted. Malformed
50122
+ * candidates are simply skipped. The kit preserves duplicates by contract;
50123
+ * each category dedupes them here (first occurrence wins), mirroring the
50124
+ * PR-body path, so a repeated reference renders one changelog link.
49640
50125
  *
49641
50126
  * @param commitMessage - The commit message body to parse
49642
50127
  * @returns Categorized issue references with numbers as strings (no `#` prefix)
@@ -49645,20 +50130,23 @@ function extractIssueNumbers(pattern, message) {
49645
50130
  * ```typescript
49646
50131
  * import { parseIssueReferences } from "../utils/issue-refs.js";
49647
50132
  *
49648
- * const refs = parseIssueReferences("feat: add API\n\nCloses #42\nFixes: #17, #23");
50133
+ * const refs = parseIssueReferences("feat: add API\n\nCloses #42, Fixes #17");
49649
50134
  * // refs.closes === ["42"]
49650
- * // refs.fixes === ["17", "23"]
50135
+ * // refs.fixes === ["17"]
49651
50136
  * // refs.refs === []
49652
50137
  * ```
49653
50138
  *
49654
50139
  * @internal
49655
50140
  */
49656
50141
  function parseIssueReferences(commitMessage) {
49657
- return {
49658
- closes: extractIssueNumbers(CLOSES_ISSUE_PATTERN, commitMessage),
49659
- fixes: extractIssueNumbers(FIXES_ISSUE_PATTERN, commitMessage),
49660
- refs: extractIssueNumbers(REFS_ISSUE_PATTERN, commitMessage)
50142
+ const references = {
50143
+ closes: [],
50144
+ fixes: [],
50145
+ refs: []
49661
50146
  };
50147
+ for (const list of collectReferenceLists(commitMessage)) references[categoryOf(list)].push(...list.issueNumbers.map(String));
50148
+ for (const category of Object.keys(references)) references[category] = [...new Set(references[category])];
50149
+ return references;
49662
50150
  }
49663
50151
  //#endregion
49664
50152
  //#region ../silk-effects/dist/dev/pkg/changesets/utils/logger.js