@savvy-web/silk 3.7.10 → 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.
@@ -2353,7 +2353,7 @@ var GlobSet = class GlobSet extends Schema.Class("GlobSet")(Schema.Struct({ patt
2353
2353
  };
2354
2354
 
2355
2355
  //#endregion
2356
- //#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
2356
+ //#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
2357
2357
  /**
2358
2358
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2359
2359
  * when the format is `"bun"`.
@@ -2375,7 +2375,7 @@ var BunExtension = class extends Schema.Class("BunExtension")({
2375
2375
  }) {};
2376
2376
 
2377
2377
  //#endregion
2378
- //#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
2378
+ //#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
2379
2379
  /**
2380
2380
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2381
2381
  * version ranges.
@@ -2422,7 +2422,7 @@ var CatalogResolver = class CatalogResolver extends Context.Service()("@effected
2422
2422
  };
2423
2423
 
2424
2424
  //#endregion
2425
- //#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
2425
+ //#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
2426
2426
  /**
2427
2427
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2428
2428
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2484,7 +2484,7 @@ var WorkspaceResolver = class WorkspaceResolver extends Context.Service()("@effe
2484
2484
  };
2485
2485
 
2486
2486
  //#endregion
2487
- //#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
2487
+ //#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
2488
2488
  /**
2489
2489
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2490
2490
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2529,7 +2529,7 @@ var CatalogAssemblyError = class extends Schema.TaggedError()("CatalogAssemblyEr
2529
2529
  };
2530
2530
 
2531
2531
  //#endregion
2532
- //#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
2532
+ //#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
2533
2533
  /**
2534
2534
  * The short dependency kind: which dependency map an entry came from, named the
2535
2535
  * way consumers branch on it.
@@ -2672,13 +2672,13 @@ const advance$1 = (s) => {
2672
2672
  return ch;
2673
2673
  }
2674
2674
  };
2675
- const isDigit$2 = (ch) => ch >= "0" && ch <= "9";
2675
+ const isDigit$3 = (ch) => ch >= "0" && ch <= "9";
2676
2676
  const isLetter = (ch) => ch >= "a" && ch <= "z" || ch >= "A" && ch <= "Z";
2677
- const isIdentChar = (ch) => isDigit$2(ch) || isLetter(ch) || ch === "-";
2677
+ const isIdentChar = (ch) => isDigit$3(ch) || isLetter(ch) || ch === "-";
2678
2678
  const atEnd$1 = (s) => s.pos >= s.len;
2679
2679
  const peekDigit = (s) => {
2680
2680
  const ch = peek$1(s);
2681
- return ch !== void 0 && isDigit$2(ch);
2681
+ return ch !== void 0 && isDigit$3(ch);
2682
2682
  };
2683
2683
  const peekIdentChar = (s) => {
2684
2684
  const ch = peek$1(s);
@@ -2687,7 +2687,7 @@ const peekIdentChar = (s) => {
2687
2687
  const parseNumericIdentifier = (s) => {
2688
2688
  const start = s.pos;
2689
2689
  const first = peek$1(s);
2690
- if (first === void 0 || !isDigit$2(first)) return fail(s);
2690
+ if (first === void 0 || !isDigit$3(first)) return fail(s);
2691
2691
  let digits = "";
2692
2692
  while (peekDigit(s)) digits += advance$1(s);
2693
2693
  if (digits.length > 1 && digits[0] === "0") {
@@ -2709,7 +2709,7 @@ const parsePrereleaseIdentifier = (s) => {
2709
2709
  if (first === void 0 || !isIdentChar(first)) return fail(s);
2710
2710
  while (peekIdentChar(s)) {
2711
2711
  const ch = advance$1(s) ?? "";
2712
- if (!isDigit$2(ch)) hasNonDigit = true;
2712
+ if (!isDigit$3(ch)) hasNonDigit = true;
2713
2713
  token += ch;
2714
2714
  }
2715
2715
  if (token.length === 0) return fail(s);
@@ -4153,7 +4153,7 @@ const isComparatorSetSubset = (sub, sup) => {
4153
4153
  };
4154
4154
 
4155
4155
  //#endregion
4156
- //#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
4156
+ //#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
4157
4157
  /**
4158
4158
  * Indicates that a string could not be parsed as a valid dependency specifier.
4159
4159
  *
@@ -4361,7 +4361,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4361
4361
  });
4362
4362
 
4363
4363
  //#endregion
4364
- //#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
4364
+ //#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
4365
4365
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4366
4366
  const COREPACK_RE = /^(sha1|sha224|sha256|sha384|sha512)\.[0-9a-f]+$/;
4367
4367
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
@@ -4413,12 +4413,109 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4413
4413
  algorithmOf,
4414
4414
  decode: decode$2
4415
4415
  });
4416
+ const corepackRestricted = brandedIntegrity.pipe(Schema.check(Schema.makeFilter((value) => isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
4417
+ const BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
4418
+ const decodeBase64 = (value) => {
4419
+ const firstPad = value.indexOf("=");
4420
+ const body = firstPad === -1 ? value : value.slice(0, firstPad);
4421
+ const padding = firstPad === -1 ? "" : value.slice(firstPad);
4422
+ if (padding !== "" && padding !== "=" && padding !== "==") return void 0;
4423
+ const remainder = body.length % 4;
4424
+ if (body.length === 0 || remainder === 1) return void 0;
4425
+ if (padding.length > 0 && padding.length !== (4 - remainder) % 4) return void 0;
4426
+ let buffer = 0;
4427
+ let bits = 0;
4428
+ const bytes = [];
4429
+ for (const char of body) {
4430
+ const sextet = BASE64_ALPHABET.indexOf(char);
4431
+ if (sextet < 0) return void 0;
4432
+ buffer = buffer << 6 | sextet;
4433
+ bits += 6;
4434
+ if (bits >= 8) {
4435
+ bits -= 8;
4436
+ bytes.push(buffer >>> bits & 255);
4437
+ }
4438
+ }
4439
+ if ((buffer & (1 << bits) - 1) !== 0) return void 0;
4440
+ return bytes;
4441
+ };
4442
+ const encodeBase64 = (bytes) => {
4443
+ let out = "";
4444
+ for (let index = 0; index < bytes.length; index += 3) {
4445
+ const b0 = bytes[index] ?? 0;
4446
+ const b1 = bytes[index + 1];
4447
+ const b2 = bytes[index + 2];
4448
+ const buffer = b0 << 16 | (b1 ?? 0) << 8 | (b2 ?? 0);
4449
+ out += BASE64_ALPHABET.charAt(buffer >>> 18 & 63);
4450
+ out += BASE64_ALPHABET.charAt(buffer >>> 12 & 63);
4451
+ out += b1 === void 0 ? "=" : BASE64_ALPHABET.charAt(buffer >>> 6 & 63);
4452
+ out += b2 === void 0 ? "=" : BASE64_ALPHABET.charAt(buffer & 63);
4453
+ }
4454
+ return out;
4455
+ };
4456
+ const hexOfBytes = (bytes) => bytes.map((byte) => byte.toString(16).padStart(2, "0")).join("");
4457
+ const bytesOfHex = (hex) => {
4458
+ const bytes = [];
4459
+ for (let index = 0; index < hex.length; index += 2) bytes.push(Number.parseInt(hex.slice(index, index + 2), 16));
4460
+ return bytes;
4461
+ };
4462
+ const SHA512_SRI_PREFIX = "sha512-";
4463
+ const SHA512_COREPACK_PREFIX = "sha512.";
4464
+ const SHA512_DIGEST_BYTES = 64;
4465
+ const COREPACK_SHA512_RE = /^sha512\.[0-9a-f]{128}$/;
4466
+ const unwrapJsonQuotes = (value) => value.length >= 2 && value.startsWith("\"") && value.endsWith("\"") ? value.slice(1, -1) : value;
4467
+ const corepackOfSri = (input) => {
4468
+ const value = unwrapJsonQuotes(input);
4469
+ if (!value.startsWith(SHA512_SRI_PREFIX)) return void 0;
4470
+ const bytes = decodeBase64(value.slice(7));
4471
+ if (bytes === void 0 || bytes.length !== SHA512_DIGEST_BYTES) return void 0;
4472
+ return `${SHA512_COREPACK_PREFIX}${hexOfBytes(bytes)}`;
4473
+ };
4474
+ const sriOfCorepack = (value) => COREPACK_SHA512_RE.test(value) ? `${SHA512_SRI_PREFIX}${encodeBase64(bytesOfHex(value.slice(7)))}` : void 0;
4475
+ const corepackFromSri = Schema.String.pipe(Schema.decodeTo(corepackRestricted, SchemaTransformation.transformOrFail({
4476
+ decode: (input) => {
4477
+ const corepack = corepackOfSri(input);
4478
+ return corepack === void 0 ? Effect.fail(new SchemaIssue.InvalidValue({ message: `Expected an SRI sha512-<base64> integrity hash carrying a 64-byte digest, got "${input}"` }, input)) : Effect.succeed(corepack);
4479
+ },
4480
+ encode: (value) => {
4481
+ const sri = sriOfCorepack(value);
4482
+ return sri === void 0 ? Effect.fail(new SchemaIssue.InvalidValue({ message: `Expected a corepack sha512.<128-hex-digit> integrity hash, got "${value}"` }, value)) : Effect.succeed(sri);
4483
+ }
4484
+ })));
4485
+ /**
4486
+ * Indicates that a string could not be converted from npm's SRI form to the
4487
+ * corepack integrity form.
4488
+ *
4489
+ * Raised by {@link (CorepackIntegrityHash:variable)}'s `fromSri`. The offending
4490
+ * string is preserved on `input`. Only a canonical `sha512-<base64>` value
4491
+ * carrying a 64-byte digest converts — corepack pins accept nothing weaker
4492
+ * than sha512, so a sha256/sha1 SRI hash, malformed base64, a wrong-length
4493
+ * digest and an already-corepack-form input all raise this error.
4494
+ *
4495
+ * @public
4496
+ */
4497
+ var InvalidSriIntegrityHashError = class extends Schema.TaggedError()("InvalidSriIntegrityHashError", {
4498
+ /** The raw input string that failed conversion. */
4499
+ input: Schema.String }) {
4500
+ get message() {
4501
+ return `Invalid SRI integrity hash "${this.input}": expected a sha512-<base64> value carrying a 64-byte digest (corepack accepts only sha512)`;
4502
+ }
4503
+ };
4504
+ const fromSri = (input) => Schema.decodeUnknownEffect(corepackFromSri)(input).pipe(Effect.mapError(() => new InvalidSriIntegrityHashError({ input })));
4416
4505
  /**
4417
4506
  * {@link (IntegrityHash:variable)} narrowed to the corepack `<algo>.<hex>` form
4418
4507
  * — `sha512.deadbeef`, and corepack's own sha224 default pins
4419
4508
  * (`sha224.877304e3…`). An SRI (`sha512-<base64>`) or yarn (`10c0/<hex>`)
4420
4509
  * hash, both valid `IntegrityHash` values, fails this schema.
4421
4510
  *
4511
+ * The schema value also carries the SRI bridge: the `FromSri` codec decodes
4512
+ * npm's `sha512-<base64>` form (what `NpmRegistry.version()` returns, with one
4513
+ * layer of JSON quotes tolerated) into the corepack form, and `fromSri` is its
4514
+ * `Effect` convenience, failing with a typed
4515
+ * {@link InvalidSriIntegrityHashError}. The conversion is deliberately one-way
4516
+ * and sha512-only — corepack pins accept nothing weaker, so a sha256/sha1 SRI
4517
+ * hash fails typed rather than minting a pin corepack would reject.
4518
+ *
4422
4519
  * @remarks
4423
4520
  * The corepack pin tail (`<name>@<version>+<integrity>`) is the one place the
4424
4521
  * kit meets this form, and two schemas name it: `PackageManagerPin.integrity`
@@ -4464,7 +4561,10 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4464
4561
  *
4465
4562
  * @public
4466
4563
  */
4467
- const CorepackIntegrityHash = brandedIntegrity.pipe(Schema.check(Schema.makeFilter((value) => isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
4564
+ const CorepackIntegrityHash = Object.assign(corepackRestricted, {
4565
+ FromSri: corepackFromSri,
4566
+ fromSri
4567
+ });
4468
4568
 
4469
4569
  //#endregion
4470
4570
  //#region ../../node_modules/.pnpm/@effected+commands@0.5.0_effect@4.0.0-rc.109/node_modules/@effected/commands/LocalExec.js
@@ -5350,7 +5450,7 @@ var Run = class {
5350
5450
  };
5351
5451
 
5352
5452
  //#endregion
5353
- //#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
5453
+ //#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
5354
5454
  const MS_PER_MINUTE = 6e4;
5355
5455
  /**
5356
5456
  * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
@@ -5521,7 +5621,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends Schema.Class("ReleaseAgeGate")
5521
5621
  };
5522
5622
 
5523
5623
  //#endregion
5524
- //#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
5624
+ //#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
5525
5625
  /**
5526
5626
  * One declared dependency of one workspace importer, as the lockfile records it.
5527
5627
  *
@@ -5560,7 +5660,7 @@ var ImporterDependency = class extends Schema.Class("ImporterDependency")({
5560
5660
  }) {};
5561
5661
 
5562
5662
  //#endregion
5563
- //#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
5663
+ //#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
5564
5664
  /**
5565
5665
  * One workspace importer's declared dependencies, as the lockfile records them.
5566
5666
  *
@@ -5585,7 +5685,7 @@ var LockfileImporter = class extends Schema.Class("LockfileImporter")({
5585
5685
  }) {};
5586
5686
 
5587
5687
  //#endregion
5588
- //#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
5688
+ //#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
5589
5689
  const EMPTY_DEPENDENCIES = {};
5590
5690
  /**
5591
5691
  * A package resolved from a lockfile.
@@ -5621,7 +5721,7 @@ var ResolvedPackage = class extends Schema.Class("ResolvedPackage")({
5621
5721
  }) {};
5622
5722
 
5623
5723
  //#endregion
5624
- //#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
5724
+ //#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
5625
5725
  /**
5626
5726
  * A directed dependency edge between two workspace packages as recorded in
5627
5727
  * the lockfile.
@@ -5644,7 +5744,7 @@ var WorkspaceDependency = class extends Schema.Class("WorkspaceDependency")({
5644
5744
  }) {};
5645
5745
 
5646
5746
  //#endregion
5647
- //#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
5747
+ //#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
5648
5748
  /**
5649
5749
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
5650
5750
  * when the format is `"pnpm"`.
@@ -5670,7 +5770,7 @@ var PnpmExtension = class extends Schema.Class("PnpmExtension")({
5670
5770
  }) {};
5671
5771
 
5672
5772
  //#endregion
5673
- //#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
5773
+ //#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
5674
5774
  /**
5675
5775
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
5676
5776
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -5709,7 +5809,7 @@ const FILENAMES = {
5709
5809
  const filenameFor = (format) => FILENAMES[format][0];
5710
5810
 
5711
5811
  //#endregion
5712
- //#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
5812
+ //#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
5713
5813
  /**
5714
5814
  * The four dependency sections of a manifest, in a stable order — the shared
5715
5815
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -6047,7 +6147,7 @@ function evaluateNode(node, depth) {
6047
6147
  //#region ../../node_modules/.pnpm/@effected+jsonc@0.7.0_effect@4.0.0-rc.109/node_modules/@effected/jsonc/internal/scanner.js
6048
6148
  const isWhitespace = (ch) => ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch === 65279;
6049
6149
  const isLineBreak$1 = (ch) => ch === 10 || ch === 13 || ch === 8232 || ch === 8233;
6050
- const isDigit$1 = (ch) => ch >= 48 && ch <= 57;
6150
+ const isDigit$2 = (ch) => ch >= 48 && ch <= 57;
6051
6151
  /**
6052
6152
  * Create a stateful {@link Scanner} for the given JSONC string.
6053
6153
  *
@@ -6145,31 +6245,31 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
6145
6245
  if (text.charCodeAt(pos) === 45) pos++;
6146
6246
  if (text.charCodeAt(pos) === 48) pos++;
6147
6247
  else {
6148
- if (!isDigit$1(text.charCodeAt(pos))) {
6248
+ if (!isDigit$2(text.charCodeAt(pos))) {
6149
6249
  tokenError = "UnexpectedEndOfNumber";
6150
6250
  return text.substring(start, pos);
6151
6251
  }
6152
6252
  pos++;
6153
- while (pos < len && isDigit$1(text.charCodeAt(pos))) pos++;
6253
+ while (pos < len && isDigit$2(text.charCodeAt(pos))) pos++;
6154
6254
  }
6155
6255
  if (pos < len && text.charCodeAt(pos) === 46) {
6156
6256
  pos++;
6157
- if (!isDigit$1(text.charCodeAt(pos))) {
6257
+ if (!isDigit$2(text.charCodeAt(pos))) {
6158
6258
  tokenError = "UnexpectedEndOfNumber";
6159
6259
  return text.substring(start, pos);
6160
6260
  }
6161
6261
  pos++;
6162
- while (pos < len && isDigit$1(text.charCodeAt(pos))) pos++;
6262
+ while (pos < len && isDigit$2(text.charCodeAt(pos))) pos++;
6163
6263
  }
6164
6264
  if (pos < len && (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101)) {
6165
6265
  pos++;
6166
6266
  if (pos < len && (text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45)) pos++;
6167
- if (!isDigit$1(text.charCodeAt(pos))) {
6267
+ if (!isDigit$2(text.charCodeAt(pos))) {
6168
6268
  tokenError = "UnexpectedEndOfNumber";
6169
6269
  return text.substring(start, pos);
6170
6270
  }
6171
6271
  pos++;
6172
- while (pos < len && isDigit$1(text.charCodeAt(pos))) pos++;
6272
+ while (pos < len && isDigit$2(text.charCodeAt(pos))) pos++;
6173
6273
  }
6174
6274
  return text.substring(start, pos);
6175
6275
  };
@@ -6275,7 +6375,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
6275
6375
  return token;
6276
6376
  }
6277
6377
  case 45:
6278
- if (pos + 1 < len && isDigit$1(text.charCodeAt(pos + 1))) {
6378
+ if (pos + 1 < len && isDigit$2(text.charCodeAt(pos + 1))) {
6279
6379
  tokenValue = scanNumber();
6280
6380
  token = "Number";
6281
6381
  return token;
@@ -6286,7 +6386,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
6286
6386
  tokenError = "InvalidSymbol";
6287
6387
  return token;
6288
6388
  default:
6289
- if (isDigit$1(ch)) {
6389
+ if (isDigit$2(ch)) {
6290
6390
  tokenValue = scanNumber();
6291
6391
  token = "Number";
6292
6392
  return token;
@@ -7681,7 +7781,7 @@ var JsoncModifier = class {
7681
7781
  };
7682
7782
 
7683
7783
  //#endregion
7684
- //#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
7784
+ //#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
7685
7785
  const DepRecord$2 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
7686
7786
  const BunWorkspaceEntry = Schema.Struct({
7687
7787
  name: Schema.optionalKey(Schema.String),
@@ -7775,7 +7875,7 @@ const toFields$3 = (raw) => Effect.gen(function* () {
7775
7875
  });
7776
7876
 
7777
7877
  //#endregion
7778
- //#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
7878
+ //#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
7779
7879
  const DepRecord$1 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
7780
7880
  const NpmPackageEntry = Schema.Struct({
7781
7881
  name: Schema.optionalKey(Schema.String),
@@ -15657,7 +15757,7 @@ function deepEqualValues(a, b) {
15657
15757
  }
15658
15758
 
15659
15759
  //#endregion
15660
- //#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
15760
+ //#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
15661
15761
  /**
15662
15762
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
15663
15763
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -15728,7 +15828,7 @@ const selectSoleDocument = (content) => Effect.gen(function* () {
15728
15828
  });
15729
15829
 
15730
15830
  //#endregion
15731
- //#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
15831
+ //#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
15732
15832
  const PnpmImporterDeps = Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({
15733
15833
  specifier: Schema.String,
15734
15834
  version: Schema.String
@@ -15854,7 +15954,7 @@ const toFields$1 = (raw) => Effect.gen(function* () {
15854
15954
  });
15855
15955
 
15856
15956
  //#endregion
15857
- //#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
15957
+ //#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
15858
15958
  const YarnLockfileRaw = Schema.Record(Schema.String, Schema.Unknown);
15859
15959
  const DepRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
15860
15960
  const YarnEntry = Schema.Struct({
@@ -15978,7 +16078,7 @@ const cleanYarnDeps = (deps) => {
15978
16078
  };
15979
16079
 
15980
16080
  //#endregion
15981
- //#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
16081
+ //#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
15982
16082
  const EMPTY_IMPORTERS = [];
15983
16083
  /**
15984
16084
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -16223,7 +16323,7 @@ var Lockfile = class Lockfile extends Schema.Class("Lockfile")({
16223
16323
  };
16224
16324
 
16225
16325
  //#endregion
16226
- //#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
16326
+ //#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
16227
16327
  /**
16228
16328
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
16229
16329
  * lockfile against: a package name plus the four optional dependency maps.
@@ -16340,7 +16440,7 @@ var LockfileIntegrity = class LockfileIntegrity extends Schema.Class("LockfileIn
16340
16440
  };
16341
16441
 
16342
16442
  //#endregion
16343
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/Dependency.js
16443
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Dependency.js
16344
16444
  /**
16345
16445
  * A resolved dependency entry pairing a package name with its version
16346
16446
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -16405,7 +16505,7 @@ var Dependency = class extends Schema.Class("Dependency")({
16405
16505
  };
16406
16506
 
16407
16507
  //#endregion
16408
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/DevEngines.js
16508
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/DevEngines.js
16409
16509
  /**
16410
16510
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
16411
16511
  *
@@ -16444,7 +16544,7 @@ const DevEnginesSchema = Schema.Struct({
16444
16544
  });
16445
16545
 
16446
16546
  //#endregion
16447
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/licenseIds.js
16547
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/licenseIds.js
16448
16548
  /** @internal */
16449
16549
  const ACTIVE_LICENSE_IDS = [
16450
16550
  "0BSD",
@@ -17178,7 +17278,7 @@ const LICENSE_IDS = new Set(ACTIVE_LICENSE_IDS);
17178
17278
  const DEPRECATED_LICENSE_IDS = new Set(DEPRECATED_LICENSE_ID_LIST);
17179
17279
 
17180
17280
  //#endregion
17181
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/License.js
17281
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/License.js
17182
17282
  /**
17183
17283
  * Indicates that a string is not a valid SPDX expression fragment: an
17184
17284
  * unrecognized license or exception identifier, or a malformed
@@ -17348,7 +17448,7 @@ var License = class License extends Schema.Class("License")({
17348
17448
  };
17349
17449
 
17350
17450
  //#endregion
17351
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/exceptions.js
17451
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/exceptions.js
17352
17452
  /** @internal */
17353
17453
  const ACTIVE_EXCEPTION_IDS = [
17354
17454
  "389-exception",
@@ -17426,7 +17526,7 @@ const EXCEPTION_IDS = new Set(ACTIVE_EXCEPTION_IDS);
17426
17526
  const DEPRECATED_EXCEPTION_IDS = new Set(DEPRECATED_EXCEPTION_ID_LIST);
17427
17527
 
17428
17528
  //#endregion
17429
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/LicenseException.js
17529
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/LicenseException.js
17430
17530
  /**
17431
17531
  * A validated SPDX license-exception identifier: an Effect `Schema.Class` whose
17432
17532
  * `id` is a member of the SPDX exception list. The class doubles as its own
@@ -17547,7 +17647,7 @@ var LicenseException = class LicenseException extends Schema.Class("LicenseExcep
17547
17647
  };
17548
17648
 
17549
17649
  //#endregion
17550
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/parser.js
17650
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/parser.js
17551
17651
  const TOKEN_OPEN_PAREN = 0;
17552
17652
  const TOKEN_CLOSE_PAREN = 1;
17553
17653
  const TOKEN_PLUS = 2;
@@ -17720,6 +17820,7 @@ function parse$2(input) {
17720
17820
  const head = peek();
17721
17821
  if (head === void 0 || head.type !== TOKEN_ID) return void 0;
17722
17822
  const value = head.value;
17823
+ let license;
17723
17824
  if (value.startsWith(DOCUMENT_REF_PREFIX)) {
17724
17825
  pos++;
17725
17826
  if (peek()?.type !== TOKEN_COLON) return void 0;
@@ -17729,27 +17830,32 @@ function parse$2(input) {
17729
17830
  const full = `${value}:${refToken.value}`;
17730
17831
  if (!License.isLicenseRef(full)) return void 0;
17731
17832
  pos++;
17732
- return {
17833
+ license = {
17733
17834
  kind: "licenseRef",
17734
17835
  documentRef: value.slice(12),
17735
17836
  ref: refToken.value.slice(11)
17736
17837
  };
17737
- }
17738
- if (value.startsWith(LICENSE_REF_PREFIX)) {
17838
+ } else if (value.startsWith(LICENSE_REF_PREFIX)) {
17739
17839
  if (!License.isLicenseRef(value)) return void 0;
17740
17840
  pos++;
17741
- return {
17841
+ license = {
17742
17842
  kind: "licenseRef",
17743
17843
  documentRef: void 0,
17744
17844
  ref: value.slice(11)
17745
17845
  };
17746
- }
17747
- if (!License.isKnownId(value)) return void 0;
17748
- pos++;
17749
- let plus = false;
17750
- if (peek()?.type === TOKEN_PLUS) {
17846
+ } else {
17847
+ if (!License.isKnownId(value)) return void 0;
17751
17848
  pos++;
17752
- plus = true;
17849
+ let plus = false;
17850
+ if (peek()?.type === TOKEN_PLUS) {
17851
+ pos++;
17852
+ plus = true;
17853
+ }
17854
+ license = {
17855
+ kind: "license",
17856
+ id: value,
17857
+ plus
17858
+ };
17753
17859
  }
17754
17860
  if (peek()?.type === TOKEN_WITH) {
17755
17861
  pos++;
@@ -17758,18 +17864,11 @@ function parse$2(input) {
17758
17864
  pos++;
17759
17865
  return {
17760
17866
  kind: "with",
17761
- license: {
17762
- id: value,
17763
- plus
17764
- },
17867
+ license,
17765
17868
  exception: exceptionToken.value
17766
17869
  };
17767
17870
  }
17768
- return {
17769
- kind: "license",
17770
- id: value,
17771
- plus
17772
- };
17871
+ return license;
17773
17872
  }
17774
17873
  const node = parseOr();
17775
17874
  if (node === void 0 || pos !== tokens.length) return void 0;
@@ -17777,7 +17876,7 @@ function parse$2(input) {
17777
17876
  }
17778
17877
 
17779
17878
  //#endregion
17780
- //#region ../../node_modules/.pnpm/@effected+spdx@0.3.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/SpdxExpression.js
17879
+ //#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/SpdxExpression.js
17781
17880
  /**
17782
17881
  * Serialize a tagged SPDX AST node — a class instance OR its encoded POJO — to
17783
17882
  * the canonical, fully-parenthesized SPDX string. This is the single source of
@@ -17834,15 +17933,16 @@ var LicenseRefNode = class extends Schema.TaggedClass()("LicenseRef", {
17834
17933
  }
17835
17934
  };
17836
17935
  /**
17837
- * A `license WITH exception` node. Per the SPDX order of precedence, `WITH`
17838
- * binds only to a simple license (never a reference or a compound expression),
17839
- * so `license` is always a {@link LicenseNode}.
17936
+ * A `license WITH exception` node. Per the SPDX grammar, `WITH` binds to a
17937
+ * simple expression a license identifier (optionally `+`) or a
17938
+ * `LicenseRef`/`DocumentRef` reference never a compound expression, so
17939
+ * `license` is a {@link LicenseNode} or a {@link LicenseRefNode}.
17840
17940
  *
17841
17941
  * @public
17842
17942
  */
17843
17943
  var WithExceptionNode = class extends Schema.TaggedClass()("WithException", {
17844
- /** The license the exception applies to, which may itself carry the `+` marker. */
17845
- license: LicenseNode,
17944
+ /** The license the exception applies to: a simple license (which may carry the `+` marker) or a `LicenseRef` reference. */
17945
+ license: Schema.Union([LicenseNode, LicenseRefNode]),
17846
17946
  /** The SPDX exception short identifier, e.g. `"Bison-exception-2.2"`. */
17847
17947
  exception: Schema.String
17848
17948
  }) {
@@ -17892,21 +17992,21 @@ const SpdxExpressionUnion = Schema.Union([
17892
17992
  AndNode,
17893
17993
  OrNode
17894
17994
  ]);
17995
+ function materializeSimple(raw) {
17996
+ return raw.kind === "license" ? LicenseNode.make({
17997
+ id: raw.id,
17998
+ plus: raw.plus
17999
+ }) : LicenseRefNode.make(raw.documentRef !== void 0 ? {
18000
+ documentRef: raw.documentRef,
18001
+ ref: raw.ref
18002
+ } : { ref: raw.ref });
18003
+ }
17895
18004
  function materialize$1(raw) {
17896
18005
  switch (raw.kind) {
17897
- case "license": return LicenseNode.make({
17898
- id: raw.id,
17899
- plus: raw.plus
17900
- });
17901
- case "licenseRef": return LicenseRefNode.make(raw.documentRef !== void 0 ? {
17902
- documentRef: raw.documentRef,
17903
- ref: raw.ref
17904
- } : { ref: raw.ref });
18006
+ case "license":
18007
+ case "licenseRef": return materializeSimple(raw);
17905
18008
  case "with": return WithExceptionNode.make({
17906
- license: LicenseNode.make({
17907
- id: raw.license.id,
17908
- plus: raw.license.plus
17909
- }),
18009
+ license: materializeSimple(raw.license),
17910
18010
  exception: raw.exception
17911
18011
  });
17912
18012
  case "and": return AndNode.make({
@@ -18003,7 +18103,7 @@ const SpdxExpression = {
18003
18103
  };
18004
18104
 
18005
18105
  //#endregion
18006
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/License.js
18106
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/License.js
18007
18107
  /**
18008
18108
  * Indicates that a string is not a valid SPDX license identifier or expression.
18009
18109
  *
@@ -18039,7 +18139,7 @@ const isValidSpdx = (value) => {
18039
18139
  const SpdxLicense = Schema.String.pipe(Schema.check(Schema.makeFilter((value) => isValidSpdx(value) ? void 0 : "Expected a valid SPDX license expression")), Schema.brand("SpdxLicense"));
18040
18140
 
18041
18141
  //#endregion
18042
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/PackageManager.js
18142
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/PackageManager.js
18043
18143
  const PACKAGE_MANAGER_NAME_RE = /^[a-z]+$/;
18044
18144
  const invalid$1 = (input, message) => Effect.fail(new SchemaIssue.InvalidValue({ message }, input));
18045
18145
  /**
@@ -18151,7 +18251,7 @@ var PackageManager = class PackageManager extends Schema.Class("PackageManager")
18151
18251
  };
18152
18252
 
18153
18253
  //#endregion
18154
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/PackageName.js
18254
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/PackageName.js
18155
18255
  /**
18156
18256
  * Indicates that a string could not be used as a valid npm package name.
18157
18257
  *
@@ -18210,7 +18310,7 @@ const PackageName = Object.assign(Schema.Union([ScopedPackageName, UnscopedPacka
18210
18310
  });
18211
18311
 
18212
18312
  //#endregion
18213
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/Person.js
18313
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Person.js
18214
18314
  const parsePersonString = (input) => {
18215
18315
  const emailMatch = input.match(/<([^>]+)>/);
18216
18316
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -18357,7 +18457,7 @@ var Person = class Person extends Schema.Class("Person")({
18357
18457
  };
18358
18458
 
18359
18459
  //#endregion
18360
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/Repository.js
18460
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Repository.js
18361
18461
  /** The shorthand hosts npm resolves without a scheme. */
18362
18462
  const SHORTHAND_HOSTS = /* @__PURE__ */ new Map([
18363
18463
  ["github", "https://github.com"],
@@ -18533,7 +18633,7 @@ var Bugs = class Bugs extends Schema.Class("Bugs")({
18533
18633
  };
18534
18634
 
18535
18635
  //#endregion
18536
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/internal/format.js
18636
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/internal/format.js
18537
18637
  const KEY_INDEX = new Map([
18538
18638
  "$schema",
18539
18639
  "name",
@@ -18769,7 +18869,7 @@ const renderJson = (raw, options) => {
18769
18869
  };
18770
18870
 
18771
18871
  //#endregion
18772
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/internal/wire.js
18872
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/internal/wire.js
18773
18873
  const RawJson = Schema.Record(Schema.String, Schema.Unknown);
18774
18874
  /**
18775
18875
  * Build the open-JSON ↔ class wire codec for a `Schema.Class` carrying a
@@ -18801,7 +18901,7 @@ const makeWire = (Class) => {
18801
18901
  };
18802
18902
 
18803
18903
  //#endregion
18804
- //#region ../../node_modules/.pnpm/@effected+package-json@0.10.0_effect@4.0.0-rc.109/node_modules/@effected/package-json/Package.js
18904
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Package.js
18805
18905
  const toHashMap = SchemaTransformation.transform({
18806
18906
  decode: (record) => HashMap.fromIterable(Object.entries(record)),
18807
18907
  encode: (map) => Object.fromEntries(HashMap.toEntries(map))
@@ -19099,7 +19199,7 @@ var Package = class Package extends Schema.Class("Package")({
19099
19199
  };
19100
19200
 
19101
19201
  //#endregion
19102
- //#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
19202
+ //#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
19103
19203
  const EMPTY$1 = Object.freeze(Object.create(null));
19104
19204
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
19105
19205
  /**
@@ -19701,7 +19801,7 @@ var Walker$1 = class {
19701
19801
  };
19702
19802
 
19703
19803
  //#endregion
19704
- //#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
19804
+ //#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
19705
19805
  /**
19706
19806
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
19707
19807
  *
@@ -19889,7 +19989,7 @@ var WorkspaceRoot = class WorkspaceRoot extends Context.Service()("@effected/wor
19889
19989
  };
19890
19990
 
19891
19991
  //#endregion
19892
- //#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
19992
+ //#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
19893
19993
  /**
19894
19994
  * Hard ceiling on directories the enumerator will visit for one pattern set.
19895
19995
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -19908,7 +20008,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
19908
20008
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
19909
20009
 
19910
20010
  //#endregion
19911
- //#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
20011
+ //#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
19912
20012
  /** Directory names never descended into. */
19913
20013
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
19914
20014
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -19999,7 +20099,7 @@ var Traversal = class {
19999
20099
  };
20000
20100
 
20001
20101
  //#endregion
20002
- //#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
20102
+ //#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
20003
20103
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
20004
20104
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
20005
20105
  /**
@@ -20070,7 +20170,7 @@ const enumerate = (root, globs, options) => Effect.gen(function* () {
20070
20170
  });
20071
20171
 
20072
20172
  //#endregion
20073
- //#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
20173
+ //#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
20074
20174
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
20075
20175
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
20076
20176
  const pnpmPatternsOf = (document) => {
@@ -20128,7 +20228,7 @@ const readPatterns = (root) => Effect.gen(function* () {
20128
20228
  });
20129
20229
 
20130
20230
  //#endregion
20131
- //#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
20231
+ //#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
20132
20232
  /**
20133
20233
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
20134
20234
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -20585,7 +20685,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends Context.Service()("@ef
20585
20685
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
20586
20686
 
20587
20687
  //#endregion
20588
- //#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
20688
+ //#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
20589
20689
  /**
20590
20690
  * Raised when the workspace dependency graph cannot be topologically ordered
20591
20691
  * because it contains a cycle.
@@ -24285,7 +24385,7 @@ var Git = class Git extends Context.Service()("@effected/git/Git") {
24285
24385
  };
24286
24386
 
24287
24387
  //#endregion
24288
- //#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
24388
+ //#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
24289
24389
  /**
24290
24390
  * Which git refs to compare, and whether to fold in the working tree.
24291
24391
  *
@@ -24585,7 +24685,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
24585
24685
  }
24586
24686
 
24587
24687
  //#endregion
24588
- //#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
24688
+ //#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
24589
24689
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
24590
24690
  const inlineCatalogs = (manifest) => {
24591
24691
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -24651,7 +24751,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
24651
24751
  };
24652
24752
 
24653
24753
  //#endregion
24654
- //#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
24754
+ //#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
24655
24755
  /** Whether `value` is a non-null, non-array object. */
24656
24756
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
24657
24757
  /**
@@ -25066,7 +25166,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends Context.Service(
25066
25166
  };
25067
25167
 
25068
25168
  //#endregion
25069
- //#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
25169
+ //#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
25070
25170
  /**
25071
25171
  * The four package managers this package understands.
25072
25172
  *
@@ -25442,7 +25542,7 @@ var PackageManagerDetector = class PackageManagerDetector extends Context.Servic
25442
25542
  };
25443
25543
 
25444
25544
  //#endregion
25445
- //#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
25545
+ //#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
25446
25546
  /**
25447
25547
  * Raised when the workspace's lockfile cannot be read off disk.
25448
25548
  *
@@ -25623,7 +25723,7 @@ var LockfileReader = class LockfileReader extends Context.Service()("@effected/w
25623
25723
  };
25624
25724
 
25625
25725
  //#endregion
25626
- //#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
25726
+ //#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
25627
25727
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
25628
25728
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
25629
25729
  /**
@@ -25783,7 +25883,7 @@ var PublishabilityDetector = class extends Context.Service()("@effected/workspac
25783
25883
  };
25784
25884
 
25785
25885
  //#endregion
25786
- //#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
25886
+ //#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
25787
25887
  /**
25788
25888
  * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
25789
25889
  *
@@ -25870,7 +25970,7 @@ const unanimousVersionOf = (index, dependency) => {
25870
25970
  };
25871
25971
 
25872
25972
  //#endregion
25873
- //#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
25973
+ //#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
25874
25974
  /**
25875
25975
  * An immutable, fully-normalized catalog collection — the one catalog
25876
25976
  * resolution semantic in the package.
@@ -26398,7 +26498,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
26398
26498
  };
26399
26499
 
26400
26500
  //#endregion
26401
- //#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
26501
+ //#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
26402
26502
  const EMPTY = Object.freeze(Object.create(null));
26403
26503
  const DependencyMap = Schema.Record(Schema.String, Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed(EMPTY)), Schema.withConstructorDefault(Effect.succeed(EMPTY)));
26404
26504
  /**
@@ -26622,7 +26722,7 @@ var WorkspaceStateSnapshot = class extends Schema.Class("WorkspaceStateSnapshot"
26622
26722
  };
26623
26723
 
26624
26724
  //#endregion
26625
- //#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
26725
+ //#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
26626
26726
  /** Whether `value` is a non-null, non-array object. */
26627
26727
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
26628
26728
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -26900,7 +27000,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
26900
27000
  };
26901
27001
 
26902
27002
  //#endregion
26903
- //#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
27003
+ //#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
26904
27004
  const compose = (options, catalogsFactory) => {
26905
27005
  const roots = WorkspaceRoot.layer;
26906
27006
  const detector = PackageManagerDetector.layer;
@@ -50114,68 +50214,462 @@ function parseCommitMessage(message) {
50114
50214
  }
50115
50215
 
50116
50216
  //#endregion
50117
- //#region ../silk-effects/dist/dev/pkg/changesets/utils/issue-refs.js
50217
+ //#region ../../node_modules/.pnpm/@effected+github-references@0.1.0_effect@4.0.0-rc.109/node_modules/@effected/github-references/IssueReferences.js
50118
50218
  /**
50119
- * Matches "closes #123" or "close: #456, #789" patterns (case-insensitive).
50219
+ * GitHub's closing-keyword issue-reference grammar, as pure functions.
50120
50220
  *
50121
- * Capture group `[1]` contains the comma-separated issue number list.
50221
+ * @remarks
50222
+ * GitHub links an issue to a pull request when the PR's description carries
50223
+ * `<keyword> #<number>` for one of nine documented keywords. Consumers speak
50224
+ * that grammar in two distinct dialects, and this module models exactly those
50225
+ * two — no service, no layer, nothing but strings in and values out:
50226
+ *
50227
+ * - **Inline-in-prose** ({@link harvestIssueReferences}): a reference may appear anywhere in
50228
+ * running text — `"fixes #12 and closes #13"` — with mandatory whitespace
50229
+ * and **no colon**, because that is the spelling GitHub itself scans PR
50230
+ * bodies for. This is the dialect a release pipeline harvests from commit
50231
+ * subjects and PR descriptions.
50232
+ * - **Bare-line** ({@link parseBareLineReference}): the whole line, after trimming, *is*
50233
+ * the reference — `"Closes: #12"` — with an **optional colon**, because a
50234
+ * generated references region writes one reference per line and a colon
50235
+ * reads better there. GitHub does not require the colon; the region format
50236
+ * allows it, so the parser must too. The dialects differ because their
50237
+ * producers do: prose is written by humans for GitHub's scanner, the region
50238
+ * is written by tooling for humans.
50239
+ *
50240
+ * Deliberately out of scope this round: cross-repo references
50241
+ * (`owner/repo#N`) and full-URL references
50242
+ * (`https://github.com/owner/repo/issues/N`). Both are real GitHub spellings;
50243
+ * neither dialect's consumers emit them yet, and guessing at their shape here
50244
+ * would freeze an API nobody has driven.
50245
+ */
50246
+ /**
50247
+ * The nine closing keywords GitHub documents, lowercased.
50122
50248
  *
50123
- * @internal
50249
+ * @public
50250
+ */
50251
+ const CLOSING_KEYWORDS = [
50252
+ "close",
50253
+ "closes",
50254
+ "closed",
50255
+ "fix",
50256
+ "fixes",
50257
+ "fixed",
50258
+ "resolve",
50259
+ "resolves",
50260
+ "resolved"
50261
+ ];
50262
+ /**
50263
+ * Both patterns derive from {@link CLOSING_KEYWORDS} so the constant and the
50264
+ * grammar cannot drift. Alternation order is safe: the regex engine backtracks
50265
+ * through alternatives, so `close` matching inside `closes` fails at the
50266
+ * mandatory `#`-introducer and retries the longer keyword.
50267
+ */
50268
+ const KEYWORDS = CLOSING_KEYWORDS.join("|");
50269
+ /** Inline-in-prose: mandatory whitespace, no colon. */
50270
+ const INLINE_PATTERN = new RegExp(`\\b(${KEYWORDS})\\s+#(\\d+)`, "gi");
50271
+ /**
50272
+ * Bare-line: optional colon, then mandatory same-line whitespace. `[ \t]`
50273
+ * rather than `\s`, so an embedded newline cannot smuggle two lines past a
50274
+ * parser whose contract is one.
50124
50275
  */
50125
- const CLOSES_ISSUE_PATTERN = /closes?:?\s*#?(\d+(?:, *#?\d+)*)/i;
50276
+ const BARE_LINE_PATTERN = new RegExp(`^(${KEYWORDS}):?[ \\t]+#(\\d+)$`, "i");
50277
+
50278
+ //#endregion
50279
+ //#region ../../node_modules/.pnpm/@effected+github-references@0.1.0_effect@4.0.0-rc.109/node_modules/@effected/github-references/ClosingList.js
50126
50280
  /**
50127
- * Matches "fixes #123" or "fix: #456, #789" patterns (case-insensitive).
50281
+ * The closing-list dialect: one whole line naming several issues at once.
50128
50282
  *
50129
- * Capture group `[1]` contains the comma-separated issue number list.
50283
+ * @remarks
50284
+ * The third dialect, alongside the two in `IssueReferences`: after trimming,
50285
+ * the **entire** line must be `<keyword>[:] <list>` — keyword
50286
+ * case-insensitive (lowercased to canonical form in the result), colon
50287
+ * optional, and the list one or more `#<digits>` items separated by `,`,
50288
+ * `and`, or the Oxford `, and`. Whitespace inside the line is `[ \t]` only,
50289
+ * so an embedded newline cannot smuggle two lines past a parser whose
50290
+ * contract is one — the same posture as the bare-line pattern. Any trailing
50291
+ * content after the list rejects the line; duplicates are preserved in order,
50292
+ * because whether `#1, #1` means one issue or two is the caller's business.
50293
+ *
50294
+ * Two keyword sets play here. {@link parseClosingList} accepts only the nine
50295
+ * closing keywords and yields a {@link ClosingList}; {@link parseReferenceList}
50296
+ * additionally accepts the non-closing {@link REFERENCE_KEYWORDS} (`ref`,
50297
+ * `refs`, `references`) and reports which set matched via
50298
+ * {@link ReferenceList}'s `closing` flag.
50299
+ *
50300
+ * An item whose digits exceed `Number.MAX_SAFE_INTEGER` rejects the **whole
50301
+ * line**, where `harvestIssueReferences` merely skips the one match. The
50302
+ * asymmetry is deliberate: a harvest drops one reference out of running
50303
+ * prose, but a list line is a single claim about a set of issues, and
50304
+ * returning the parseable subset would misrepresent the line as claiming
50305
+ * less than it does.
50306
+ *
50307
+ * Complexity posture: parsing is a single left-to-right character scan —
50308
+ * this module contains **no regular expressions at all** — so worst-case
50309
+ * time is linear in the line length by construction. There is no
50310
+ * backtracking engine to feed, no polynomial blow-up for a scanner to flag,
50311
+ * and therefore no input truncation.
50312
+ *
50313
+ * Beyond the whole-line parsers, {@link harvestReferenceLists} generalizes
50314
+ * the same list grammar to the inline-in-prose posture — several lists on
50315
+ * one line of running text — and {@link parseClosingLists} /
50316
+ * {@link parseReferenceLists} apply the whole-line parsers per line of a
50317
+ * multi-line text. All of them ride the same character scan; the no-regex
50318
+ * promise above covers every export here.
50319
+ */
50320
+ /**
50321
+ * The non-closing reference keywords the list dialect accepts, lowercased.
50130
50322
  *
50131
- * @internal
50323
+ * @remarks
50324
+ * GitHub does not act on these — they associate without closing — but a
50325
+ * references region writes them, so the parser must read them.
50326
+ *
50327
+ * @public
50132
50328
  */
50133
- const FIXES_ISSUE_PATTERN = /fix(?:es)?:?\s*#?(\d+(?:, *#?\d+)*)/i;
50329
+ const REFERENCE_KEYWORDS = [
50330
+ "ref",
50331
+ "refs",
50332
+ "references"
50333
+ ];
50334
+ /**
50335
+ * Both keyword tables ARE the exported constants — membership sets built from
50336
+ * them once — so the constants and the grammar cannot drift.
50337
+ */
50338
+ const ALL_KEYWORDS = /* @__PURE__ */ new Set([...CLOSING_KEYWORDS, ...REFERENCE_KEYWORDS]);
50339
+ /** Membership test for reporting `closing`, widened once so no call casts. */
50340
+ const CLOSING_SET = new Set(CLOSING_KEYWORDS);
50341
+ const HASH = 35;
50342
+ const COLON = 58;
50343
+ const COMMA = 44;
50344
+ /** `[ \t]` — the only whitespace the dialect admits, per the module remarks. */
50345
+ const isSpaceTab = (code) => code === 32 || code === 9;
50346
+ const isDigit$1 = (code) => code >= 48 && code <= 57;
50347
+ const isAsciiLetter = (code) => code >= 65 && code <= 90 || code >= 97 && code <= 122;
50348
+ /** The index after the run of `[ \t]` starting at `from` (possibly `from` itself). */
50349
+ const skipSpaceTab = (line, from) => {
50350
+ let index = from;
50351
+ while (index < line.length && isSpaceTab(line.charCodeAt(index))) index += 1;
50352
+ return index;
50353
+ };
50354
+ /**
50355
+ * One list item at exactly `from`: `#<digits>` and the index one past it.
50356
+ * Digits exceeding `Number.MAX_SAFE_INTEGER` report `"unsafe"` rather than a
50357
+ * silently rounded issue number, still carrying the index one past the digit
50358
+ * run so a caller can skip the item's extent; the whole-line parsers reject
50359
+ * on it and {@link harvestReferenceLists} abandons the entire candidate —
50360
+ * see the module remarks for why a list never yields a partial reading.
50361
+ * Anything that is not `#<digits>` at all is `undefined`.
50362
+ */
50363
+ const readItem = (line, from) => {
50364
+ if (line.charCodeAt(from) !== HASH) return void 0;
50365
+ const start = from + 1;
50366
+ let index = start;
50367
+ while (index < line.length && isDigit$1(line.charCodeAt(index))) index += 1;
50368
+ if (index === start) return void 0;
50369
+ const value = Number(line.slice(start, index));
50370
+ return Number.isSafeInteger(value) ? {
50371
+ kind: "item",
50372
+ value,
50373
+ next: index
50374
+ } : {
50375
+ kind: "unsafe",
50376
+ next: index
50377
+ };
50378
+ };
50134
50379
  /**
50135
- * Matches "refs #123" or "ref: #456, #789" patterns (case-insensitive).
50380
+ * One separator at exactly `from`: a comma with optional surrounding `[ \t]`
50381
+ * and an optional Oxford `and` (consumed only when its own trailing `[ \t]+`
50382
+ * is present), or a bare `and` requiring `[ \t]+` on both sides. `and` is
50383
+ * lowercase-only — the keyword head is case-insensitive, the separator is
50384
+ * not. Returns the index where the next item must start, or `undefined` when
50385
+ * no separator is present.
50386
+ */
50387
+ const scanSeparator = (line, from) => {
50388
+ const afterLeading = skipSpaceTab(line, from);
50389
+ if (line.charCodeAt(afterLeading) === COMMA) {
50390
+ const afterComma = skipSpaceTab(line, afterLeading + 1);
50391
+ if (line.startsWith("and", afterComma)) {
50392
+ const afterAnd = skipSpaceTab(line, afterComma + 3);
50393
+ if (afterAnd > afterComma + 3) return afterAnd;
50394
+ }
50395
+ return afterComma;
50396
+ }
50397
+ if (afterLeading > from && line.startsWith("and", afterLeading)) {
50398
+ const afterAnd = skipSpaceTab(line, afterLeading + 3);
50399
+ if (afterAnd > afterLeading + 3) return afterAnd;
50400
+ }
50401
+ };
50402
+ /**
50403
+ * The scan walk: item, then separator, then item, until the cursor stands
50404
+ * exactly at the end of the string. Anything else — a malformed item, an
50405
+ * unknown separator, trailing content, an unsafe issue number — is
50406
+ * `undefined`, and the caller rejects the whole line.
50407
+ */
50408
+ const parseItems = (line, from) => {
50409
+ const issueNumbers = [];
50410
+ let cursor = from;
50411
+ for (;;) {
50412
+ const item = readItem(line, cursor);
50413
+ if (item === void 0 || item.kind === "unsafe") return void 0;
50414
+ issueNumbers.push(item.value);
50415
+ cursor = item.next;
50416
+ if (cursor === line.length) return issueNumbers;
50417
+ const next = scanSeparator(line, cursor);
50418
+ if (next === void 0) return void 0;
50419
+ cursor = next;
50420
+ }
50421
+ };
50422
+ /**
50423
+ * The list a whole line carries under either keyword set, or `Option.none()`.
50136
50424
  *
50137
- * Capture group `[1]` contains the comma-separated issue number list.
50425
+ * @remarks
50426
+ * Accepts the nine closing keywords plus {@link REFERENCE_KEYWORDS}, and
50427
+ * reports which set matched in the result's `closing` flag. Grammar,
50428
+ * whole-line posture and the whole-line rejection of unsafe issue numbers
50429
+ * are in the module remarks.
50138
50430
  *
50139
- * @internal
50431
+ * @public
50140
50432
  */
50141
- const REFS_ISSUE_PATTERN = /refs?:?\s*#?(\d+(?:, *#?\d+)*)/i;
50433
+ const parseReferenceList = (line) => {
50434
+ const trimmed = line.trim();
50435
+ let letters = 0;
50436
+ while (letters < trimmed.length && isAsciiLetter(trimmed.charCodeAt(letters))) letters += 1;
50437
+ if (letters === 0) return Option.none();
50438
+ const keyword = trimmed.slice(0, letters).toLowerCase();
50439
+ if (!ALL_KEYWORDS.has(keyword)) return Option.none();
50440
+ let cursor = letters;
50441
+ if (trimmed.charCodeAt(cursor) === COLON) cursor += 1;
50442
+ const afterWhitespace = skipSpaceTab(trimmed, cursor);
50443
+ if (afterWhitespace === cursor) return Option.none();
50444
+ const issueNumbers = parseItems(trimmed, afterWhitespace);
50445
+ if (issueNumbers === void 0) return Option.none();
50446
+ return Option.some({
50447
+ keyword,
50448
+ closing: CLOSING_SET.has(keyword),
50449
+ issueNumbers
50450
+ });
50451
+ };
50142
50452
  /**
50143
- * Pattern for splitting comma-separated issue numbers.
50453
+ * Every reference list a text carries, line by line, across both postures.
50144
50454
  *
50145
- * @internal
50455
+ * @remarks
50456
+ * The trailer/prose interleave consumers otherwise hand-roll: each line is
50457
+ * tried as a whole-line reference list first ({@link parseReferenceList} —
50458
+ * colon-tolerant, per the line dialect), and only a line that is not one is
50459
+ * harvested inline ({@link harvestReferenceLists} — no colon, per the inline
50460
+ * dialect). The preference means a colon-less trailer line contributes its
50461
+ * list exactly once, never once per posture.
50462
+ *
50463
+ * Results carry no offsets, deliberately: this is the line-granular
50464
+ * composition, and a consumer that needs spans uses
50465
+ * {@link harvestReferenceLists} directly. Duplicates are preserved, in
50466
+ * document order.
50467
+ *
50468
+ * @public
50146
50469
  */
50147
- const ISSUE_NUMBER_SPLIT_PATTERN = /, */;
50470
+ const collectReferenceLists = (text) => {
50471
+ const lists = [];
50472
+ for (const line of text.split("\n")) {
50473
+ const whole = parseReferenceList(line);
50474
+ if (Option.isSome(whole)) {
50475
+ lists.push(whole.value);
50476
+ continue;
50477
+ }
50478
+ for (const harvested of harvestReferenceLists(line)) lists.push({
50479
+ keyword: harvested.keyword,
50480
+ closing: harvested.closing,
50481
+ issueNumbers: harvested.issueNumbers
50482
+ });
50483
+ }
50484
+ return lists;
50485
+ };
50486
+ /** `[A-Za-z0-9_]` — the word-boundary alphabet the inline dialects use. */
50487
+ const isWordChar = (code) => isAsciiLetter(code) || isDigit$1(code) || code === 95;
50488
+ /**
50489
+ * The full JavaScript `\s` set, spelled as a predicate so the module keeps
50490
+ * its no-regex promise: ASCII whitespace, NEL-adjacent controls, and the
50491
+ * Unicode space separators. Only the keyword→first-item gap of
50492
+ * {@link harvestReferenceLists} admits this set — everything inside a list
50493
+ * stays `[ \t]`, per the module remarks.
50494
+ */
50495
+ 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;
50496
+ /**
50497
+ * Every reference list found inline in `text`, in document order.
50498
+ *
50499
+ * @remarks
50500
+ * The inline-in-prose posture generalized to lists:
50501
+ * `Closes #123, Fixes #456` in one line of a commit body yields two
50502
+ * single-item lists, where
50503
+ * `harvestIssueReferences` reads only the first reference of each and the
50504
+ * whole-line parsers read neither. The grammar per candidate:
50505
+ *
50506
+ * - The keyword is case-insensitive, drawn from either keyword set,
50507
+ * lowercased to canonical form in the result, with `closing` reported by
50508
+ * set membership. Word boundaries hold on both sides: the characters
50509
+ * immediately before and after the keyword's letter run must not be
50510
+ * `[A-Za-z0-9_]`, so `recloses #1` and `1closes #1` do not match.
50511
+ * - **No colon** — exactly like `harvestIssueReferences`, the colon spelling
50512
+ * belongs to the line dialects ({@link parseReferenceList} and the
50513
+ * bare-line parser), so `closes: #1` inline yields nothing.
50514
+ * - The keyword→first-item gap is any run of whitespace **including
50515
+ * newlines**, mirroring the inline dialect's `\s+`.
50516
+ * - List continuation uses the `,` / `and` / Oxford separators with `[ \t]`
50517
+ * whitespace only, so a list cannot continue past a newline — a later
50518
+ * line makes its own claims.
50519
+ * - Items are `#<digits>`; duplicates are preserved in order.
50520
+ *
50521
+ * A list ends at its last valid item: in `closes #1 and fixes #2` the
50522
+ * ` and ` before `fixes` fails as a separator because what follows is not
50523
+ * `#`, so the text yields `closes: [1]` then `fixes: [2]`. An item past
50524
+ * `Number.MAX_SAFE_INTEGER` anywhere in a candidate skips the **entire**
50525
+ * candidate — never a partial list, for the same reason
50526
+ * {@link parseReferenceList} rejects the whole line — and scanning resumes
50527
+ * after the candidate's scanned extent.
50528
+ *
50529
+ * Like everything in this module, the harvest is a single left-to-right
50530
+ * character scan with no regular expressions, so time stays linear in the
50531
+ * text length and no input is truncated.
50532
+ *
50533
+ * @public
50534
+ */
50535
+ const harvestReferenceLists = (text) => {
50536
+ const lists = [];
50537
+ let index = 0;
50538
+ while (index < text.length) {
50539
+ if (!isAsciiLetter(text.charCodeAt(index))) {
50540
+ index += 1;
50541
+ continue;
50542
+ }
50543
+ const runStart = index;
50544
+ let runEnd = index + 1;
50545
+ while (runEnd < text.length && isAsciiLetter(text.charCodeAt(runEnd))) runEnd += 1;
50546
+ if (runStart > 0 && isWordChar(text.charCodeAt(runStart - 1)) || runEnd < text.length && isWordChar(text.charCodeAt(runEnd))) {
50547
+ index = runEnd;
50548
+ continue;
50549
+ }
50550
+ const keyword = text.slice(runStart, runEnd).toLowerCase();
50551
+ if (!ALL_KEYWORDS.has(keyword)) {
50552
+ index = runEnd;
50553
+ continue;
50554
+ }
50555
+ let cursor = runEnd;
50556
+ while (cursor < text.length && isAnyWhitespace(text.charCodeAt(cursor))) cursor += 1;
50557
+ const first = cursor === runEnd ? void 0 : readItem(text, cursor);
50558
+ if (first === void 0) {
50559
+ index = runEnd;
50560
+ continue;
50561
+ }
50562
+ if (first.kind === "unsafe") {
50563
+ index = first.next;
50564
+ continue;
50565
+ }
50566
+ const issueNumbers = [first.value];
50567
+ let end = first.next;
50568
+ let unsafeNext;
50569
+ for (;;) {
50570
+ const next = scanSeparator(text, end);
50571
+ if (next === void 0) break;
50572
+ const item = readItem(text, next);
50573
+ if (item === void 0) break;
50574
+ if (item.kind === "unsafe") {
50575
+ unsafeNext = item.next;
50576
+ break;
50577
+ }
50578
+ issueNumbers.push(item.value);
50579
+ end = item.next;
50580
+ }
50581
+ if (unsafeNext !== void 0) {
50582
+ index = unsafeNext;
50583
+ continue;
50584
+ }
50585
+ lists.push({
50586
+ keyword,
50587
+ closing: CLOSING_SET.has(keyword),
50588
+ issueNumbers,
50589
+ start: runStart,
50590
+ end
50591
+ });
50592
+ index = end;
50593
+ }
50594
+ return lists;
50595
+ };
50596
+
50597
+ //#endregion
50598
+ //#region ../../node_modules/.pnpm/@effected+github-references@0.1.0_effect@4.0.0-rc.109/node_modules/@effected/github-references/KeywordFamily.js
50599
+ /**
50600
+ * The projection table IS the totality proof: `Record` over the union of
50601
+ * both keyword types makes a keyword added to either constant without an
50602
+ * entry here fail to compile.
50603
+ */
50604
+ const FAMILIES = {
50605
+ close: "close",
50606
+ closes: "close",
50607
+ closed: "close",
50608
+ fix: "fix",
50609
+ fixes: "fix",
50610
+ fixed: "fix",
50611
+ resolve: "resolve",
50612
+ resolves: "resolve",
50613
+ resolved: "resolve",
50614
+ ref: "ref",
50615
+ refs: "ref",
50616
+ references: "ref"
50617
+ };
50148
50618
  /**
50149
- * Extract issue numbers from a regex match against a commit message.
50619
+ * The family a keyword belongs to.
50150
50620
  *
50151
50621
  * @remarks
50152
- * Truncates the input to 10,000 characters before matching to prevent
50153
- * ReDoS on adversarial input. Strips `#` prefixes from matched numbers.
50622
+ * Total over both keyword sets by construction see the module remarks for
50623
+ * why an explicit record beats a `startsWith` heuristic. `close`, `closes`
50624
+ * and `closed` map to `"close"`; the `fix` and `resolve` conjugations
50625
+ * likewise; `ref`, `refs` and `references` map to `"ref"`. The evidence for
50626
+ * the projection is downstream: categorized harvesters key maps by family,
50627
+ * and each was hand-rolling this collapse.
50628
+ *
50629
+ * @public
50630
+ */
50631
+ const keywordFamily = (keyword) => FAMILIES[keyword];
50632
+
50633
+ //#endregion
50634
+ //#region ../silk-effects/dist/dev/pkg/changesets/utils/issue-refs.js
50635
+ /**
50636
+ * The output category each keyword family lands in.
50154
50637
  *
50155
- * @param pattern - The regex pattern to match (must have a capture group for issue numbers)
50156
- * @param message - The commit message body to search
50157
- * @returns Array of issue number strings (without `#` prefix)
50638
+ * @remarks
50639
+ * The `resolve` family reads as `closes` since closing is what those keywords
50640
+ * do; the record is total over `KeywordFamily`, so a family the kit adds
50641
+ * without a category here is a type error, never a silent drop.
50158
50642
  *
50159
50643
  * @internal
50160
50644
  */
50161
- function extractIssueNumbers(pattern, message) {
50162
- const safeMessage = message.slice(0, 1e4);
50163
- const match = pattern.exec(safeMessage);
50164
- if (!match?.[1]) return [];
50165
- return match[1].split(ISSUE_NUMBER_SPLIT_PATTERN).map((num) => num.replace("#", "").trim());
50645
+ const CATEGORY_BY_FAMILY = {
50646
+ close: "closes",
50647
+ fix: "fixes",
50648
+ ref: "refs",
50649
+ resolve: "closes"
50650
+ };
50651
+ /** @internal */
50652
+ function categoryOf(list) {
50653
+ return CATEGORY_BY_FAMILY[keywordFamily(list.keyword)];
50166
50654
  }
50167
50655
  /**
50168
50656
  * Parse a commit message for GitHub issue references.
50169
50657
  *
50170
- * Recognizes `Closes`, `Fixes`, and `Refs` keywords with various formats:
50171
- * - `Closes #123`
50172
- * - `Fixes: #456, #789`
50173
- * - `Refs #101`
50658
+ * Recognizes GitHub's closing keywords plus `Ref`/`Refs`/`References` in
50659
+ * both list dialects:
50660
+ * - whole-line trailers — `Closes #123`, `Fixes: #456, #789`, `Refs #101`;
50661
+ * - inline in prose — `This closes #12 in passing`, or several lists on one
50662
+ * line: `Closes #123, Fixes #456`.
50174
50663
  *
50175
50664
  * @remarks
50176
- * Each keyword category is matched independently, so a single commit
50177
- * message can contain references in all three categories. Keywords are
50178
- * case-insensitive and accept both singular and plural forms.
50665
+ * References accumulate in message order: two `Closes` lists contribute to
50666
+ * the same category. Keywords are case-insensitive and the `#` is mandatory.
50667
+ * The colon spelling is line-dialect-only; `collectReferenceLists` owns the
50668
+ * per-line composition (whole-line trailer parse first, inline harvest
50669
+ * otherwise), guaranteeing a trailer line is never double-counted. Malformed
50670
+ * candidates are simply skipped. The kit preserves duplicates by contract;
50671
+ * each category dedupes them here (first occurrence wins), mirroring the
50672
+ * PR-body path, so a repeated reference renders one changelog link.
50179
50673
  *
50180
50674
  * @param commitMessage - The commit message body to parse
50181
50675
  * @returns Categorized issue references with numbers as strings (no `#` prefix)
@@ -50184,20 +50678,23 @@ function extractIssueNumbers(pattern, message) {
50184
50678
  * ```typescript
50185
50679
  * import { parseIssueReferences } from "../utils/issue-refs.js";
50186
50680
  *
50187
- * const refs = parseIssueReferences("feat: add API\n\nCloses #42\nFixes: #17, #23");
50681
+ * const refs = parseIssueReferences("feat: add API\n\nCloses #42, Fixes #17");
50188
50682
  * // refs.closes === ["42"]
50189
- * // refs.fixes === ["17", "23"]
50683
+ * // refs.fixes === ["17"]
50190
50684
  * // refs.refs === []
50191
50685
  * ```
50192
50686
  *
50193
50687
  * @internal
50194
50688
  */
50195
50689
  function parseIssueReferences(commitMessage) {
50196
- return {
50197
- closes: extractIssueNumbers(CLOSES_ISSUE_PATTERN, commitMessage),
50198
- fixes: extractIssueNumbers(FIXES_ISSUE_PATTERN, commitMessage),
50199
- refs: extractIssueNumbers(REFS_ISSUE_PATTERN, commitMessage)
50690
+ const references = {
50691
+ closes: [],
50692
+ fixes: [],
50693
+ refs: []
50200
50694
  };
50695
+ for (const list of collectReferenceLists(commitMessage)) references[categoryOf(list)].push(...list.issueNumbers.map(String));
50696
+ for (const category of Object.keys(references)) references[category] = [...new Set(references[category])];
50697
+ return references;
50201
50698
  }
50202
50699
 
50203
50700
  //#endregion