@savvy-web/silk 3.0.2 → 3.0.4

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.
@@ -56,7 +56,6 @@ let module$1 = require("module");
56
56
  let semver_classes_range_js = require("semver/classes/range.js");
57
57
  semver_classes_range_js = __toESM(semver_classes_range_js, 1);
58
58
  let node_child_process = require("node:child_process");
59
- node_child_process = __toESM(node_child_process, 1);
60
59
  let node_stream_promises = require("node:stream/promises");
61
60
  let node_stream = require("node:stream");
62
61
  let node_readline = require("node:readline");
@@ -424,7 +423,7 @@ const trimTrailingSlashes = (s) => {
424
423
  return s.slice(0, end);
425
424
  };
426
425
  //#endregion
427
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/internal/limits.js
426
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/limits.js
428
427
  /** Hard cap on pattern length. Upstream minimatch's MAX_PATTERN_LENGTH (64KB). */
429
428
  const MAX_PATTERN_LENGTH = 1024 * 64;
430
429
  /** Default brace-expansion output budget. Upstream brace-expansion's EXPANSION_MAX. */
@@ -458,7 +457,7 @@ const assertCap = (name, value) => {
458
457
  return value;
459
458
  };
460
459
  //#endregion
461
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/internal/unescape.js
460
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/unescape.js
462
461
  /**
463
462
  * Un-escape a string that has been escaped with `escape`.
464
463
  *
@@ -481,11 +480,11 @@ const unescapePattern = (s, { windowsPathsNoEscape = false, magicalBraces = true
481
480
  return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
482
481
  };
483
482
  //#endregion
484
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/internal/types.js
483
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/types.js
485
484
  /** The globstar marker in a compiled pattern set. */
486
485
  const GLOBSTAR = Symbol("globstar **");
487
486
  //#endregion
488
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/internal/escape.js
487
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/escape.js
489
488
  /**
490
489
  * Escape all magic characters in a glob pattern.
491
490
  *
@@ -503,13 +502,13 @@ const escapePattern = (s, { windowsPathsNoEscape = false, magicalBraces = false
503
502
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
504
503
  };
505
504
  //#endregion
506
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/internal/assertValidPattern.js
505
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/assertValidPattern.js
507
506
  const assertValidPattern = (pattern) => {
508
507
  if (typeof pattern !== "string") throw new TypeError("invalid pattern");
509
508
  if (pattern.length > 65536) throw new GuardExceeded("PatternTooLong", MAX_PATTERN_LENGTH, pattern.length);
510
509
  };
511
510
  //#endregion
512
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/internal/braceExpressions.js
511
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpressions.js
513
512
  const posixClasses = {
514
513
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
515
514
  "[:alpha:]": ["\\p{L}\\p{Nl}", true],
@@ -632,7 +631,7 @@ const parseClass = (glob, position) => {
632
631
  ];
633
632
  };
634
633
  //#endregion
635
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/internal/ast.js
634
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/ast.js
636
635
  const types = /* @__PURE__ */ new Set([
637
636
  "!",
638
637
  "?",
@@ -1149,7 +1148,7 @@ var AST = class AST {
1149
1148
  }
1150
1149
  };
1151
1150
  //#endregion
1152
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/internal/balancedMatch.js
1151
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/balancedMatch.js
1153
1152
  const maybeMatch = (reg, str) => {
1154
1153
  const m = str.match(reg);
1155
1154
  return m ? m[0] : null;
@@ -1207,7 +1206,7 @@ const range = (a, b, str) => {
1207
1206
  return result;
1208
1207
  };
1209
1208
  //#endregion
1210
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/internal/braceExpansion.js
1209
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpansion.js
1211
1210
  const escSlash = `\0SLASH${Math.random()}\0`;
1212
1211
  const escOpen = `\0OPEN${Math.random()}\0`;
1213
1212
  const escClose = `\0CLOSE${Math.random()}\0`;
@@ -1354,7 +1353,7 @@ function expand_(str, max, isTopInput, depth) {
1354
1353
  }
1355
1354
  }
1356
1355
  //#endregion
1357
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/internal/minimatch.js
1356
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/minimatch.js
1358
1357
  const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
1359
1358
  const starDotExtTest = (ext) => (f) => !f.startsWith(".") && f.endsWith(ext);
1360
1359
  const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
@@ -1925,7 +1924,7 @@ var Minimatch = class {
1925
1924
  }
1926
1925
  };
1927
1926
  //#endregion
1928
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/GlobPattern.js
1927
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobPattern.js
1929
1928
  /**
1930
1929
  * Typed failure raised when a glob pattern trips a compile-time guard:
1931
1930
  * over-length, brace-expansion budget exhaustion, or nesting past the depth
@@ -2177,7 +2176,7 @@ var GlobPattern = class GlobPattern extends effect.Schema.Class("GlobPattern")(e
2177
2176
  })));
2178
2177
  };
2179
2178
  //#endregion
2180
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.1_effect@4.0.0-beta.98/node_modules/@effected/glob/GlobSet.js
2179
+ //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobSet.js
2181
2180
  const exclusionTarget = (pattern) => pattern.startsWith("!") ? pattern.slice(1) : void 0;
2182
2181
  const allCompileUnderDefaults = (patterns) => {
2183
2182
  for (const pattern of patterns) {
@@ -2305,7 +2304,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2305
2304
  }
2306
2305
  };
2307
2306
  //#endregion
2308
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/BunExtension.js
2307
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/BunExtension.js
2309
2308
  /**
2310
2309
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2311
2310
  * when the format is `"bun"`.
@@ -2326,7 +2325,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
2326
2325
  trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
2327
2326
  }) {};
2328
2327
  //#endregion
2329
- //#region ../../node_modules/.pnpm/@effected+npm@0.2.0_@effected+semver@0.1.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/npm/CatalogResolver.js
2328
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/CatalogResolver.js
2330
2329
  /**
2331
2330
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2332
2331
  * version ranges.
@@ -2372,7 +2371,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
2372
2371
  static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
2373
2372
  };
2374
2373
  //#endregion
2375
- //#region ../../node_modules/.pnpm/@effected+npm@0.2.0_@effected+semver@0.1.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/npm/WorkspaceResolver.js
2374
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/WorkspaceResolver.js
2376
2375
  /**
2377
2376
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2378
2377
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2433,7 +2432,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
2433
2432
  static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
2434
2433
  };
2435
2434
  //#endregion
2436
- //#region ../../node_modules/.pnpm/@effected+npm@0.2.0_@effected+semver@0.1.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/npm/CatalogAssemblyError.js
2435
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/CatalogAssemblyError.js
2437
2436
  /**
2438
2437
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2439
2438
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2477,7 +2476,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
2477
2476
  }
2478
2477
  };
2479
2478
  //#endregion
2480
- //#region ../../node_modules/.pnpm/@effected+npm@0.2.0_@effected+semver@0.1.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/npm/DependencySection.js
2479
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/DependencySection.js
2481
2480
  /**
2482
2481
  * The short dependency kind: which dependency map an entry came from, named the
2483
2482
  * way consumers branch on it.
@@ -2509,7 +2508,7 @@ Object.fromEntries(Object.entries({
2509
2508
  optional: "optionalDependencies"
2510
2509
  }).map(([kind, field]) => [field, kind]));
2511
2510
  //#endregion
2512
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.0_effect@4.0.0-beta.98/node_modules/@effected/semver/internal/desugar.js
2511
+ //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/desugar.js
2513
2512
  const sv = (major, minor, patch, prerelease = [], build = []) => ({
2514
2513
  major,
2515
2514
  minor,
@@ -2598,7 +2597,7 @@ const desugarHyphen = (lower, upper) => {
2598
2597
  return [comp(">=", lowerVersion)];
2599
2598
  };
2600
2599
  //#endregion
2601
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.0_effect@4.0.0-beta.98/node_modules/@effected/semver/internal/grammar.js
2600
+ //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/grammar.js
2602
2601
  /** Private control-flow exception; never escapes the entry points. */
2603
2602
  var ParseFailure = class {
2604
2603
  position;
@@ -2993,7 +2992,7 @@ const formatComparator = (c) => {
2993
2992
  /** Print comparator sets as `a b || c d`. */
2994
2993
  const formatRange = (sets) => sets.map((set) => set.map(formatComparator).join(" ")).join(" || ");
2995
2994
  //#endregion
2996
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.0_effect@4.0.0-beta.98/node_modules/@effected/semver/internal/order.js
2995
+ //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/order.js
2997
2996
  /**
2998
2997
  * Compare two prerelease identifiers per SemVer 2.0.0 §11: numeric
2999
2998
  * identifiers always have lower precedence than alphanumeric ones; numerics
@@ -3046,7 +3045,7 @@ const compareBuild = (a, b) => {
3046
3045
  return 0;
3047
3046
  };
3048
3047
  //#endregion
3049
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.0_effect@4.0.0-beta.98/node_modules/@effected/semver/SemVer.js
3048
+ //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/SemVer.js
3050
3049
  /**
3051
3050
  * Indicates that a string could not be parsed as a valid SemVer 2.0.0 version.
3052
3051
  *
@@ -3447,7 +3446,7 @@ var SemVerBump = class {
3447
3446
  }
3448
3447
  };
3449
3448
  //#endregion
3450
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.0_effect@4.0.0-beta.98/node_modules/@effected/semver/Comparator.js
3449
+ //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/Comparator.js
3451
3450
  /**
3452
3451
  * Indicates that a string could not be parsed as a single comparator.
3453
3452
  *
@@ -3547,7 +3546,7 @@ var Comparator = class Comparator extends effect.Schema.Class("Comparator")({
3547
3546
  }
3548
3547
  };
3549
3548
  //#endregion
3550
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.0_effect@4.0.0-beta.98/node_modules/@effected/semver/internal/normalize.js
3549
+ //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/normalize.js
3551
3550
  const operatorWeight = (op) => {
3552
3551
  switch (op) {
3553
3552
  case ">=": return 0;
@@ -3578,7 +3577,7 @@ const normalizeComparatorSet = (set) => sortComparators(removeDuplicates(set));
3578
3577
  /** Normalize every comparator set in a range: sort and deduplicate each independently. */
3579
3578
  const normalizeSets = (sets) => sets.map(normalizeComparatorSet);
3580
3579
  //#endregion
3581
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.0_effect@4.0.0-beta.98/node_modules/@effected/semver/Range.js
3580
+ //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/Range.js
3582
3581
  /**
3583
3582
  * Indicates that a string could not be parsed as a range expression.
3584
3583
  *
@@ -3847,7 +3846,7 @@ const isComparatorSetSubset = (sub, sup) => {
3847
3846
  return true;
3848
3847
  };
3849
3848
  //#endregion
3850
- //#region ../../node_modules/.pnpm/@effected+npm@0.2.0_@effected+semver@0.1.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/npm/DependencySpecifier.js
3849
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/DependencySpecifier.js
3851
3850
  /**
3852
3851
  * Indicates that a string could not be parsed as a valid dependency specifier.
3853
3852
  *
@@ -4054,7 +4053,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4054
4053
  FromString: fromString
4055
4054
  });
4056
4055
  //#endregion
4057
- //#region ../../node_modules/.pnpm/@effected+npm@0.2.0_@effected+semver@0.1.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/npm/IntegrityHash.js
4056
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/IntegrityHash.js
4058
4057
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4059
4058
  const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
4060
4059
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
@@ -4107,7 +4106,7 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4107
4106
  decode: decode$2
4108
4107
  });
4109
4108
  //#endregion
4110
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/ImporterDependency.js
4109
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/ImporterDependency.js
4111
4110
  /**
4112
4111
  * One declared dependency of one workspace importer, as the lockfile records it.
4113
4112
  *
@@ -4135,7 +4134,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
4135
4134
  depType: DependencyField
4136
4135
  }) {};
4137
4136
  //#endregion
4138
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/LockfileImporter.js
4137
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/LockfileImporter.js
4139
4138
  /**
4140
4139
  * One workspace importer's declared dependencies, as the lockfile records them.
4141
4140
  *
@@ -4159,7 +4158,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
4159
4158
  dependencies: effect.Schema.Array(ImporterDependency)
4160
4159
  }) {};
4161
4160
  //#endregion
4162
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/ResolvedPackage.js
4161
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/ResolvedPackage.js
4163
4162
  const EMPTY_DEPENDENCIES = {};
4164
4163
  /**
4165
4164
  * A package resolved from a lockfile.
@@ -4194,7 +4193,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
4194
4193
  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)))
4195
4194
  }) {};
4196
4195
  //#endregion
4197
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/WorkspaceDependency.js
4196
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/WorkspaceDependency.js
4198
4197
  /**
4199
4198
  * A directed dependency edge between two workspace packages as recorded in
4200
4199
  * the lockfile.
@@ -4216,7 +4215,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
4216
4215
  constraint: effect.Schema.String
4217
4216
  }) {};
4218
4217
  //#endregion
4219
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/PnpmExtension.js
4218
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/PnpmExtension.js
4220
4219
  /**
4221
4220
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
4222
4221
  * when the format is `"pnpm"`.
@@ -4241,7 +4240,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
4241
4240
  }))
4242
4241
  }) {};
4243
4242
  //#endregion
4244
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/LockfileFormat.js
4243
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/LockfileFormat.js
4245
4244
  /**
4246
4245
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
4247
4246
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -4275,7 +4274,7 @@ const FILENAMES = {
4275
4274
  */
4276
4275
  const filenameFor = (format) => FILENAMES[format];
4277
4276
  //#endregion
4278
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/internal/shared.js
4277
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/shared.js
4279
4278
  /**
4280
4279
  * The four dependency sections of a manifest, in a stable order — the shared
4281
4280
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -4401,7 +4400,7 @@ const extractWorkspaceDeps = (workspaces, workspaceNames) => {
4401
4400
  return deps;
4402
4401
  };
4403
4402
  //#endregion
4404
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.2.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/JsoncNode.js
4403
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncNode.js
4405
4404
  /**
4406
4405
  * Discriminator values for JSONC AST node types: the JSON value types
4407
4406
  * (`string`/`number`/`boolean`/`null`), the structural types
@@ -4576,7 +4575,7 @@ function evaluateNode(node, depth) {
4576
4575
  }
4577
4576
  }
4578
4577
  //#endregion
4579
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.2.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/internal/scanner.js
4578
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/scanner.js
4580
4579
  const isWhitespace = (ch) => ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch === 65279;
4581
4580
  const isLineBreak$1 = (ch) => ch === 10 || ch === 13 || ch === 8232 || ch === 8233;
4582
4581
  const isDigit$1 = (ch) => ch >= 48 && ch <= 57;
@@ -4872,7 +4871,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
4872
4871
  };
4873
4872
  };
4874
4873
  //#endregion
4875
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.2.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/internal/skip.js
4874
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/skip.js
4876
4875
  /**
4877
4876
  * Iteratively consume the value beginning at the cursor's current token and
4878
4877
  * return its tight end offset (excludes trailing whitespace/comments).
@@ -4902,7 +4901,7 @@ const skipBalancedValue = (cursor) => {
4902
4901
  return end;
4903
4902
  };
4904
4903
  //#endregion
4905
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.2.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/internal/parser.js
4904
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/parser.js
4906
4905
  /**
4907
4906
  * The public parse-error code vocabulary. The facade builds its `@public`
4908
4907
  * `JsoncParseErrorCode` schema from this array; the parser produces these codes
@@ -5315,7 +5314,7 @@ const parseTree$2 = (text, flags) => {
5315
5314
  };
5316
5315
  };
5317
5316
  //#endregion
5318
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.2.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/Jsonc.js
5317
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/Jsonc.js
5319
5318
  /**
5320
5319
  * The single public parse-error code vocabulary, appearing as the `code` field
5321
5320
  * of {@link JsoncParseErrorDetail}.
@@ -5360,6 +5359,47 @@ effect.Schema.Class("JsoncParseOptions")({
5360
5359
  allowTrailingComma: effect.Schema.optionalKey(effect.Schema.Boolean),
5361
5360
  allowEmptyContent: effect.Schema.optionalKey(effect.Schema.Boolean)
5362
5361
  });
5362
+ /**
5363
+ * The public stringify-error code vocabulary, appearing as the `code` field of
5364
+ * {@link JsoncStringifyError}:
5365
+ *
5366
+ * - `CircularReference` — the value contains a reference cycle, so no finite
5367
+ * JSON text exists for it.
5368
+ * - `BigIntValue` — the value contains a `bigint` (anywhere, top-level or
5369
+ * nested), which JSON cannot represent.
5370
+ * - `TopLevelUnrepresentable` — the top-level value (`undefined`, a function
5371
+ * or a symbol) serializes to no output at all.
5372
+ *
5373
+ * @public
5374
+ */
5375
+ const JsoncStringifyErrorCode = effect.Schema.Literals([
5376
+ "CircularReference",
5377
+ "BigIntValue",
5378
+ "TopLevelUnrepresentable"
5379
+ ]);
5380
+ effect.Schema.Class("JsoncStringifyOptions")({
5381
+ tabSize: effect.Schema.optionalKey(effect.Schema.Number),
5382
+ insertSpaces: effect.Schema.optionalKey(effect.Schema.Boolean)
5383
+ });
5384
+ /**
5385
+ * Stringification failure: a `JsoncStringifyErrorCode` naming the
5386
+ * failure mode, a human-readable `detail` (the engine's message for thrown
5387
+ * cases — on V8 the circular-reference message includes the offending property
5388
+ * path), and the offending `value`. Raised by {@link Jsonc.stringify},
5389
+ * {@link Jsonc.stringifyResult} and the encode direction of the schema
5390
+ * factories.
5391
+ *
5392
+ * @public
5393
+ */
5394
+ var JsoncStringifyError = class extends effect.Schema.TaggedErrorClass()("JsoncStringifyError", {
5395
+ code: JsoncStringifyErrorCode,
5396
+ detail: effect.Schema.String,
5397
+ value: effect.Schema.Unknown
5398
+ }) {
5399
+ get message() {
5400
+ return `JSONC stringify failed: ${this.code} — ${this.detail}`;
5401
+ }
5402
+ };
5363
5403
  const toFlags = (options) => options === void 0 ? {} : {
5364
5404
  disallowComments: options.disallowComments,
5365
5405
  allowTrailingComma: options.allowTrailingComma,
@@ -5440,9 +5480,56 @@ const deepEqual = (a, b, depth = 0) => {
5440
5480
  var Jsonc = class Jsonc {
5441
5481
  constructor() {}
5442
5482
  /**
5483
+ * Parse JSONC into a plain JavaScript value, synchronously, returning a
5484
+ * `Result` instead of an `Effect`. Same error-recovery semantics as
5485
+ * {@link Jsonc.parse}: every parse error is collected and the failure side
5486
+ * carries one aggregate {@link JsoncParseError}. Pure — parsing is
5487
+ * fundamentally synchronous, so non-Effect consumers (a plain config
5488
+ * loader, a build script) can call this directly instead of wrapping
5489
+ * `Effect.runSync(Effect.result(Jsonc.parse(text)))`.
5490
+ *
5491
+ * @remarks
5492
+ * {@link Jsonc.parse} is defined in terms of this function; the two never
5493
+ * diverge. Reach for the `Effect` variant inside Effect code — it carries
5494
+ * the `Jsonc.parse` tracing span — and for this one at synchronous
5495
+ * boundaries.
5496
+ *
5497
+ * @example
5498
+ * ```ts
5499
+ * import { Jsonc } from "@effected/jsonc";
5500
+ * import { Result } from "effect";
5501
+ *
5502
+ * const ok = Jsonc.parseResult('{ "port": 3000 // dev\n }');
5503
+ * if (Result.isSuccess(ok)) {
5504
+ * console.log(ok.success); // => { port: 3000 }
5505
+ * }
5506
+ *
5507
+ * const bad = Jsonc.parseResult("{ bad }");
5508
+ * if (Result.isFailure(bad)) {
5509
+ * console.log(bad.failure._tag); // => "JsoncParseError"
5510
+ * }
5511
+ * ```
5512
+ *
5513
+ * @param text - The JSONC source to parse.
5514
+ * @param options - Optional {@link JsoncParseOptions}; defaults apply for
5515
+ * omitted fields.
5516
+ * @returns A `Result` succeeding with the decoded value (`unknown`, never
5517
+ * `any`), or failing with the aggregate {@link JsoncParseError}.
5518
+ */
5519
+ static parseResult(text, options) {
5520
+ const { value, errors } = parseValue(text, toFlags(options));
5521
+ if (errors.length > 0) return effect.Result.fail(new JsoncParseError({
5522
+ errors: toDetails(text, errors),
5523
+ input: text
5524
+ }));
5525
+ return effect.Result.succeed(value);
5526
+ }
5527
+ /**
5443
5528
  * Parse JSONC into a plain JavaScript value. Error-recovery parsing:
5444
5529
  * collects every parse error and fails once with the aggregate
5445
- * {@link JsoncParseError}. Returns `unknown`, never `any`.
5530
+ * {@link JsoncParseError}. Returns `unknown`, never `any`. Defined in terms
5531
+ * of {@link Jsonc.parseResult} — synchronous callers can use that variant
5532
+ * directly.
5446
5533
  *
5447
5534
  * @param text - The JSONC source to parse.
5448
5535
  * @param options - Optional {@link JsoncParseOptions}; defaults apply for
@@ -5450,14 +5537,7 @@ var Jsonc = class Jsonc {
5450
5537
  * @returns An `Effect` that succeeds with the decoded value, or fails with
5451
5538
  * the aggregate {@link JsoncParseError}.
5452
5539
  */
5453
- static parse = effect.Effect.fn("Jsonc.parse")(function* (text, options) {
5454
- const { value, errors } = parseValue(text, toFlags(options));
5455
- if (errors.length > 0) return yield* new JsoncParseError({
5456
- errors: toDetails(text, errors),
5457
- input: text
5458
- });
5459
- return value;
5460
- });
5540
+ static parse = effect.Effect.fn("Jsonc.parse")((text, options) => effect.Effect.fromResult(Jsonc.parseResult(text, options)));
5461
5541
  /**
5462
5542
  * Parse JSONC into an immutable {@link JsoncNode} AST. `Option.none()` for
5463
5543
  * empty input (with `allowEmptyContent`); the aggregate
@@ -5479,6 +5559,95 @@ var Jsonc = class Jsonc {
5479
5559
  return root !== void 0 ? effect.Option.some(root) : effect.Option.none();
5480
5560
  });
5481
5561
  /**
5562
+ * Stringify a plain JavaScript value as JSON text, synchronously, returning
5563
+ * a `Result` instead of an `Effect`. With no options the output is
5564
+ * byte-identical to `JSON.stringify(value, null, 2)`.
5565
+ *
5566
+ * Plain JSON emission: JSONC comments exist only in the document/edit layer
5567
+ * (`JsoncNode`, `JsoncEdit`, `JsoncFormatter`), so no comment survives — or
5568
+ * can be produced by — value-level stringification.
5569
+ *
5570
+ * Nested unrepresentable values follow `JSON.stringify`'s documented
5571
+ * semantics: `undefined`, functions and symbols are dropped from objects and
5572
+ * become `null` in arrays. The typed failure channel covers only the cases
5573
+ * where output would be absent or an exception thrown — see
5574
+ * `JsoncStringifyErrorCode`. A throwing `toJSON` method or getter is
5575
+ * caller code failing and rethrows as a defect, never a typed error.
5576
+ *
5577
+ * @remarks
5578
+ * {@link Jsonc.stringify} is defined in terms of this function; the two
5579
+ * never diverge. Reach for the `Effect` variant inside Effect code — it
5580
+ * carries the `Jsonc.stringify` tracing span — and for this one at
5581
+ * synchronous boundaries.
5582
+ *
5583
+ * @example
5584
+ * ```ts
5585
+ * import { Jsonc } from "@effected/jsonc";
5586
+ * import { Result } from "effect";
5587
+ *
5588
+ * const ok = Jsonc.stringifyResult({ port: 3000 });
5589
+ * if (Result.isSuccess(ok)) {
5590
+ * console.log(ok.success); // => '{\n "port": 3000\n}'
5591
+ * }
5592
+ *
5593
+ * const bad = Jsonc.stringifyResult(0n);
5594
+ * if (Result.isFailure(bad)) {
5595
+ * console.log(bad.failure.code); // => "BigIntValue"
5596
+ * }
5597
+ * ```
5598
+ *
5599
+ * @param value - The plain JavaScript value to stringify.
5600
+ * @param options - Optional {@link JsoncStringifyOptions}; defaults apply
5601
+ * for omitted fields.
5602
+ * @returns A `Result` succeeding with the JSON text, or failing with a
5603
+ * {@link JsoncStringifyError}.
5604
+ */
5605
+ static stringifyResult(value, options) {
5606
+ const space = options?.insertSpaces === false ? " " : options?.tabSize ?? 2;
5607
+ let text;
5608
+ try {
5609
+ text = JSON.stringify(value, null, space);
5610
+ } catch (defect) {
5611
+ if (defect instanceof TypeError) {
5612
+ if (/circular|cyclic/i.test(defect.message)) return effect.Result.fail(new JsoncStringifyError({
5613
+ code: "CircularReference",
5614
+ detail: defect.message,
5615
+ value
5616
+ }));
5617
+ if (/bigint/i.test(defect.message)) return effect.Result.fail(new JsoncStringifyError({
5618
+ code: "BigIntValue",
5619
+ detail: defect.message,
5620
+ value
5621
+ }));
5622
+ }
5623
+ throw defect;
5624
+ }
5625
+ if (text === void 0) return effect.Result.fail(new JsoncStringifyError({
5626
+ code: "TopLevelUnrepresentable",
5627
+ detail: "the top-level value (undefined, a function or a symbol) has no JSON representation",
5628
+ value
5629
+ }));
5630
+ return effect.Result.succeed(text);
5631
+ }
5632
+ /**
5633
+ * Stringify a plain JavaScript value as JSON text. With no options the
5634
+ * output is byte-identical to `JSON.stringify(value, null, 2)`. Fails with
5635
+ * {@link JsoncStringifyError} on circular references, `bigint` values and a
5636
+ * top-level value with no JSON representation; nested `undefined`, functions
5637
+ * and symbols follow `JSON.stringify`'s documented semantics (dropped from
5638
+ * objects, `null` in arrays). Comments are a document/edit-layer concern —
5639
+ * value-level stringification never emits them. Defined in terms of
5640
+ * {@link Jsonc.stringifyResult} — synchronous callers can use that variant
5641
+ * directly.
5642
+ *
5643
+ * @param value - The plain JavaScript value to stringify.
5644
+ * @param options - Optional {@link JsoncStringifyOptions}; defaults apply
5645
+ * for omitted fields.
5646
+ * @returns An `Effect` that succeeds with the JSON text, or fails with a
5647
+ * {@link JsoncStringifyError}.
5648
+ */
5649
+ static stringify = effect.Effect.fn("Jsonc.stringify")((value, options) => effect.Effect.fromResult(Jsonc.stringifyResult(value, options)));
5650
+ /**
5482
5651
  * Remove all comments from JSONC, producing valid JSON. Pass a `replaceCh`
5483
5652
  * (e.g. `" "`) to replace each comment character instead of deleting it,
5484
5653
  * keeping all offsets stable (line breaks inside block comments are kept).
@@ -5545,8 +5714,11 @@ var Jsonc = class Jsonc {
5545
5714
  }
5546
5715
  /**
5547
5716
  * A `Schema<unknown, string>` decoding JSONC with the given `options`
5548
- * (defaults when omitted). Encoding is `JSON.stringify` with 2-space indent,
5549
- * so comments do not survive a round-trip encode.
5717
+ * (defaults when omitted). Encoding is {@link Jsonc.stringifyResult} with
5718
+ * default options (2-space indent, byte-identical to
5719
+ * `JSON.stringify(value, null, 2)`), so comments do not survive a
5720
+ * round-trip encode; a {@link JsoncStringifyError} on the encode side
5721
+ * surfaces as a schema issue.
5550
5722
  *
5551
5723
  * @remarks
5552
5724
  * Schema-producing: each call returns a fresh schema whose derivation caches
@@ -5573,7 +5745,7 @@ var Jsonc = class Jsonc {
5573
5745
  }
5574
5746
  return effect.Effect.succeed(value);
5575
5747
  },
5576
- encode: (value) => effect.Effect.succeed(JSON.stringify(value, null, 2))
5748
+ encode: (value) => effect.Effect.fromResult(Jsonc.stringifyResult(value)).pipe(effect.Effect.mapError((error) => new effect.SchemaIssue.InvalidValue(effect.Option.some(value), { message: error.message })))
5577
5749
  })));
5578
5750
  }
5579
5751
  /**
@@ -5599,6 +5771,49 @@ var Jsonc = class Jsonc {
5599
5771
  static schema(target, options) {
5600
5772
  return Jsonc.fromString(options).pipe(effect.Schema.decodeTo(target));
5601
5773
  }
5774
+ /**
5775
+ * Bind a target schema to the JSONC codec once, yielding the composed
5776
+ * schema plus pre-derived `decode`/`encode` directions — the
5777
+ * {@link Jsonc.schema} composition without the generic `Schema` machinery
5778
+ * at every use site. Binds the plain form only: default
5779
+ * {@link JsoncParseOptions} on decode, default stringify options on encode.
5780
+ *
5781
+ * Both directions fail with `Schema.SchemaError`, exactly as
5782
+ * `Schema.decodeEffect`/`Schema.encodeEffect` over {@link Jsonc.schema}
5783
+ * would; the target's decoding/encoding service requirements flow through.
5784
+ *
5785
+ * @remarks
5786
+ * Schema-producing: each call composes a fresh schema and derives both
5787
+ * directions from it. Bind the result to a `const` — that single binding is
5788
+ * the point.
5789
+ *
5790
+ * @example
5791
+ * ```ts
5792
+ * import { Jsonc } from "@effected/jsonc";
5793
+ * import { Effect, Schema } from "effect";
5794
+ *
5795
+ * const Config = Schema.Struct({ port: Schema.Number });
5796
+ * const config = Jsonc.bind(Config);
5797
+ *
5798
+ * const program = Effect.gen(function* () {
5799
+ * const value = yield* config.decode('{ "port": 3000 // dev\n }');
5800
+ * const text = yield* config.encode(value);
5801
+ * return [value, text] as const;
5802
+ * });
5803
+ * ```
5804
+ *
5805
+ * @param target - The domain schema decoded values must satisfy.
5806
+ * @returns A {@link JsoncBoundCodec} carrying the composed schema and its
5807
+ * two pre-bound directions.
5808
+ */
5809
+ static bind(target) {
5810
+ const schema = Jsonc.schema(target);
5811
+ return {
5812
+ schema,
5813
+ decode: effect.Schema.decodeEffect(schema),
5814
+ encode: effect.Schema.encodeEffect(schema)
5815
+ };
5816
+ }
5602
5817
  };
5603
5818
  effect.Schema.Class("JsoncRange")({
5604
5819
  offset: effect.Schema.Number,
@@ -5642,7 +5857,8 @@ var JsoncEdit = class extends effect.Schema.Class("JsoncEdit")({
5642
5857
  /**
5643
5858
  * Apply `edits` to `text`, producing a new string. Edits are applied in
5644
5859
  * reverse-offset order so earlier offsets stay valid; the input `edits`
5645
- * array is not mutated. Pure and total.
5860
+ * array is not mutated. Overlapping edits are a programmer error and throw
5861
+ * as a defect — `JsoncFormatter` never produces them.
5646
5862
  *
5647
5863
  * @param text - The source text to edit.
5648
5864
  * @param edits - The edits to apply, in any order.
@@ -5650,13 +5866,18 @@ var JsoncEdit = class extends effect.Schema.Class("JsoncEdit")({
5650
5866
  */
5651
5867
  static applyAll(text, edits) {
5652
5868
  const sorted = [...edits].sort((a, b) => b.offset - a.offset);
5869
+ for (let i = 0; i + 1 < sorted.length; i++) {
5870
+ const upper = sorted[i];
5871
+ const lower = sorted[i + 1];
5872
+ if (lower.offset + lower.length > upper.offset) throw new Error(`JsoncEdit.applyAll received overlapping edits at offsets ${lower.offset} and ${upper.offset} — overlapping edits are a programmer error`);
5873
+ }
5653
5874
  let result = text;
5654
5875
  for (const edit of sorted) result = result.substring(0, edit.offset) + edit.content + result.substring(edit.offset + edit.length);
5655
5876
  return result;
5656
5877
  }
5657
5878
  };
5658
5879
  //#endregion
5659
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.2.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/internal/navigate.js
5880
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/navigate.js
5660
5881
  /**
5661
5882
  * Resolve `path` against `text`, returning where the target is (or where it
5662
5883
  * would be inserted). `path` must be non-empty — the whole-document case is
@@ -5783,7 +6004,7 @@ function navigate(text, path) {
5783
6004
  return { _tag: "NoOp" };
5784
6005
  }
5785
6006
  //#endregion
5786
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.2.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/JsoncModifier.js
6007
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncModifier.js
5787
6008
  /**
5788
6009
  * Raised when `JsoncModifier.modify` cannot navigate the requested path: the
5789
6010
  * value at `depth` is not the container kind (`expected`) the next path segment
@@ -5911,7 +6132,7 @@ var JsoncModifier = class {
5911
6132
  });
5912
6133
  };
5913
6134
  //#endregion
5914
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/internal/bun.js
6135
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/bun.js
5915
6136
  const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
5916
6137
  const BunWorkspaceEntry = effect.Schema.Struct({
5917
6138
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6004,7 +6225,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
6004
6225
  };
6005
6226
  });
6006
6227
  //#endregion
6007
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/internal/npm.js
6228
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/npm.js
6008
6229
  const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6009
6230
  const NpmPackageEntry = effect.Schema.Struct({
6010
6231
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6102,7 +6323,7 @@ const toFields$2 = (raw) => effect.Effect.gen(function* () {
6102
6323
  };
6103
6324
  });
6104
6325
  //#endregion
6105
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/YamlNode.js
6326
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlNode.js
6106
6327
  /**
6107
6328
  * YAML scalar presentation styles.
6108
6329
  *
@@ -6494,7 +6715,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
6494
6715
  return null;
6495
6716
  }
6496
6717
  //#endregion
6497
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/diagnostics.js
6718
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/diagnostics.js
6498
6719
  /** Error codes emitted by the lexer stage. */
6499
6720
  const YAML_LEX_ERROR_CODES = [
6500
6721
  "UnexpectedCharacter",
@@ -6572,7 +6793,7 @@ function isFatalCode(code) {
6572
6793
  return FATAL_CODES.has(code);
6573
6794
  }
6574
6795
  //#endregion
6575
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/YamlDiagnostic.js
6796
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlDiagnostic.js
6576
6797
  /**
6577
6798
  * Error codes emitted by the lexer stage.
6578
6799
  *
@@ -6693,7 +6914,7 @@ function lineChar(text, offset) {
6693
6914
  };
6694
6915
  }
6695
6916
  //#endregion
6696
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/anchors.js
6917
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/anchors.js
6697
6918
  /**
6698
6919
  * Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
6699
6920
  * Aliases represent references to existing anchored nodes and cannot have their own anchors.
@@ -6786,7 +7007,7 @@ function collectAnchors(node, anchors) {
6786
7007
  }
6787
7008
  }
6788
7009
  //#endregion
6789
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/lexer.js
7010
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/lexer.js
6790
7011
  /**
6791
7012
  * Create a new YAML scanner for the given source text.
6792
7013
  *
@@ -7743,7 +7964,7 @@ function lexAll(text) {
7743
7964
  return tokens;
7744
7965
  }
7745
7966
  //#endregion
7746
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/cst-parser.js
7967
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/cst-parser.js
7747
7968
  /**
7748
7969
  * Hardening: cap CST nesting so hostile inputs cannot overflow the stack
7749
7970
  * while the tree is being BUILT. Set slightly above the composer's
@@ -8455,7 +8676,7 @@ function parseCSTAll(text) {
8455
8676
  return parseDocuments(lexAll(text), text);
8456
8677
  }
8457
8678
  //#endregion
8458
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/state.js
8679
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/state.js
8459
8680
  let lineStartsText;
8460
8681
  let lineStartsCache = [];
8461
8682
  function getLineStarts(text) {
@@ -8561,7 +8782,7 @@ function exitNesting(state) {
8561
8782
  state.depth--;
8562
8783
  }
8563
8784
  //#endregion
8564
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/tags.js
8785
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/tags.js
8565
8786
  /**
8566
8787
  * Resolve a tag shorthand using the document's %TAG directives.
8567
8788
  * For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
@@ -8647,7 +8868,7 @@ function validateTagHandlesInDocument(docCst, state) {
8647
8868
  }
8648
8869
  }
8649
8870
  //#endregion
8650
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/scalars.js
8871
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/scalars.js
8651
8872
  const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
8652
8873
  const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
8653
8874
  const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
@@ -9525,7 +9746,7 @@ function shouldPreserveRaw(rawValue, value) {
9525
9746
  return false;
9526
9747
  }
9527
9748
  //#endregion
9528
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/block.js
9749
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/block.js
9529
9750
  /**
9530
9751
  * Compose a block map from its CST children, with an optional external first key.
9531
9752
  *
@@ -10673,7 +10894,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
10673
10894
  return map;
10674
10895
  }
10675
10896
  //#endregion
10676
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/flow.js
10897
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/flow.js
10677
10898
  /**
10678
10899
  * Validate that flow collection entries are separated by commas.
10679
10900
  *
@@ -11065,7 +11286,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
11065
11286
  return seq;
11066
11287
  }
11067
11288
  //#endregion
11068
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/document.js
11289
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/document.js
11069
11290
  /** The flow-composer dispatch wired into every state this module creates. */
11070
11291
  const FLOW = {
11071
11292
  composeFlowMap,
@@ -11731,7 +11952,7 @@ function composeAllDocuments(text, options) {
11731
11952
  };
11732
11953
  }
11733
11954
  //#endregion
11734
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/fold.js
11955
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/fold.js
11735
11956
  /**
11736
11957
  * Column-based line folding for a single logical scalar line (YAML 1.2 flow
11737
11958
  * folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
@@ -11967,7 +12188,7 @@ function renderBlockFolded(s, indent) {
11967
12188
  return `>${indentIndicator}${chomp}\n${outputLines.join("\n")}`;
11968
12189
  }
11969
12190
  //#endregion
11970
- //#region ../../node_modules/.pnpm/@effected+yaml@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/stringifier.js
12191
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/stringifier.js
11971
12192
  /**
11972
12193
  * Thrown by the stringifier on its failure paths (circular references). The
11973
12194
  * facade catches this and materializes the public stringify error.
@@ -12341,6 +12562,15 @@ effect.Schema.Class("YamlStringifyOptions")({
12341
12562
  * Column at which to fold long scalars. Default `0` (and any value `<= 0`)
12342
12563
  * never wraps; a positive value folds plain, double-quoted and block-folded
12343
12564
  * (`>`) scalars at approximately that column, never block-literal (`|`).
12565
+ *
12566
+ * Takes effect only through {@link Yaml.stringify} and
12567
+ * {@link Yaml.stringifySync} — the two entry points that accept these
12568
+ * options on the value path. The schema factories ({@link Yaml.fromString},
12569
+ * {@link Yaml.schema}, {@link Yaml.YamlFromString}) encode with default
12570
+ * stringify options (`lineWidth` `0`), so their output never folds. The
12571
+ * document/node path — `YamlDocument#stringify` and the `YamlFormat`
12572
+ * helpers built on it — threads the field into its render context but
12573
+ * never reads it, so it is inert there.
12344
12574
  */
12345
12575
  lineWidth: effect.Schema.optionalKey(effect.Schema.Number),
12346
12576
  defaultScalarStyle: effect.Schema.optionalKey(ScalarStyle),
@@ -12447,7 +12677,7 @@ const stringifyDefectToError = (defect, value) => {
12447
12677
  });
12448
12678
  };
12449
12679
  /**
12450
- * Synchronous single-document parse returning a {@link Result}. The pure
12680
+ * Synchronous single-document parse returning a `Result`. The pure
12451
12681
  * engine bypasses the Effect runtime entirely: the composer, the failure
12452
12682
  * collection and the alias-expansion budget all run inline, and every failure
12453
12683
  * mode (fatal diagnostics, duplicate keys, a "billion laughs" blow-up) yields
@@ -12469,7 +12699,7 @@ const parseSyncImpl = (text, options) => {
12469
12699
  }
12470
12700
  };
12471
12701
  /**
12472
- * Synchronous stringify returning a {@link Result}. Mirrors {@link Yaml.stringify}
12702
+ * Synchronous stringify returning a `Result`. Mirrors {@link Yaml.stringify}
12473
12703
  * without the Effect wrapper: a circular reference or a value nested past the
12474
12704
  * recursion budget yields a `Failure` carrying a typed {@link YamlStringifyError},
12475
12705
  * never a thrown defect.
@@ -12599,7 +12829,7 @@ var Yaml = class Yaml {
12599
12829
  return yield* stringifyOrFail(value, options);
12600
12830
  });
12601
12831
  /**
12602
- * Synchronous single-document parse, returning a {@link Result} instead of
12832
+ * Synchronous single-document parse, returning a `Result` instead of
12603
12833
  * an `Effect`. A pure escape hatch for config-time callers that cannot
12604
12834
  * `await` an Effect (a `vitest.config.ts` is the motivating case): it runs
12605
12835
  * the same engine as {@link Yaml.parse} inline.
@@ -12628,7 +12858,7 @@ var Yaml = class Yaml {
12628
12858
  return parseSyncImpl(text, options);
12629
12859
  }
12630
12860
  /**
12631
- * Synchronous stringify, returning a {@link Result} instead of an `Effect`.
12861
+ * Synchronous stringify, returning a `Result` instead of an `Effect`.
12632
12862
  * The pure counterpart to {@link Yaml.stringify} for config-time callers
12633
12863
  * that cannot `await`.
12634
12864
  *
@@ -12782,6 +13012,51 @@ var Yaml = class Yaml {
12782
13012
  static schema(target, options) {
12783
13013
  return Yaml.fromString(options).pipe(effect.Schema.decodeTo(target));
12784
13014
  }
13015
+ /**
13016
+ * Bind a target schema to the YAML codec once, yielding the composed
13017
+ * schema plus pre-derived `decode`/`encode` directions — the
13018
+ * {@link Yaml.schema} composition without the generic `Schema` machinery
13019
+ * at every use site. Binds the plain single-document form only: default
13020
+ * {@link YamlParseOptions} on decode, default stringify options on encode;
13021
+ * for multi-document streams compose over {@link Yaml.allFromString}
13022
+ * directly.
13023
+ *
13024
+ * Both directions fail with `Schema.SchemaError`, exactly as
13025
+ * `Schema.decodeEffect`/`Schema.encodeEffect` over {@link Yaml.schema}
13026
+ * would; the target's decoding/encoding service requirements flow through.
13027
+ *
13028
+ * @remarks
13029
+ * Schema-producing: each call composes a fresh schema and derives both
13030
+ * directions from it. Bind the result to a `const` — that single binding is
13031
+ * the point.
13032
+ *
13033
+ * @example
13034
+ * ```ts
13035
+ * import { Yaml } from "@effected/yaml";
13036
+ * import { Effect, Schema } from "effect";
13037
+ *
13038
+ * const Config = Schema.Struct({ port: Schema.Number });
13039
+ * const config = Yaml.bind(Config);
13040
+ *
13041
+ * const program = Effect.gen(function* () {
13042
+ * const value = yield* config.decode("port: 3000");
13043
+ * const text = yield* config.encode(value);
13044
+ * return [value, text] as const;
13045
+ * });
13046
+ * ```
13047
+ *
13048
+ * @param target - The domain schema decoded values must satisfy.
13049
+ * @returns A {@link YamlBoundCodec} carrying the composed schema and its
13050
+ * two pre-bound directions.
13051
+ */
13052
+ static bind(target) {
13053
+ const schema = Yaml.schema(target);
13054
+ return {
13055
+ schema,
13056
+ decode: effect.Schema.decodeEffect(schema),
13057
+ encode: effect.Schema.encodeEffect(schema)
13058
+ };
13059
+ }
12785
13060
  };
12786
13061
  /**
12787
13062
  * Parse for `equals`/`equalsValue`: any recorded error — fatal or not — or a
@@ -12834,7 +13109,7 @@ function deepEqualValues(a, b) {
12834
13109
  return false;
12835
13110
  }
12836
13111
  //#endregion
12837
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/internal/documents.js
13112
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/documents.js
12838
13113
  /**
12839
13114
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
12840
13115
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -12904,7 +13179,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
12904
13179
  };
12905
13180
  });
12906
13181
  //#endregion
12907
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/internal/pnpm.js
13182
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/pnpm.js
12908
13183
  const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
12909
13184
  specifier: effect.Schema.String,
12910
13185
  version: effect.Schema.String
@@ -13030,7 +13305,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
13030
13305
  };
13031
13306
  });
13032
13307
  //#endregion
13033
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/internal/yarn.js
13308
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/yarn.js
13034
13309
  const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
13035
13310
  const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
13036
13311
  const YarnEntry = effect.Schema.Struct({
@@ -13153,7 +13428,7 @@ const cleanYarnDeps = (deps) => {
13153
13428
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
13154
13429
  };
13155
13430
  //#endregion
13156
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/Lockfile.js
13431
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/Lockfile.js
13157
13432
  const EMPTY_IMPORTERS = [];
13158
13433
  /**
13159
13434
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -13397,7 +13672,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
13397
13672
  }
13398
13673
  };
13399
13674
  //#endregion
13400
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/LockfileIntegrity.js
13675
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/LockfileIntegrity.js
13401
13676
  /**
13402
13677
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
13403
13678
  * lockfile against: a package name plus the four optional dependency maps.
@@ -13513,7 +13788,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
13513
13788
  }
13514
13789
  };
13515
13790
  //#endregion
13516
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/package-json/Dependency.js
13791
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Dependency.js
13517
13792
  /**
13518
13793
  * A resolved dependency entry pairing a package name with its version
13519
13794
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -13577,7 +13852,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
13577
13852
  }
13578
13853
  };
13579
13854
  //#endregion
13580
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/package-json/DevEngines.js
13855
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/DevEngines.js
13581
13856
  /**
13582
13857
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
13583
13858
  *
@@ -14602,7 +14877,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14602
14877
  };
14603
14878
  }));
14604
14879
  //#endregion
14605
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/package-json/License.js
14880
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/License.js
14606
14881
  var import_spdx_expression_parse = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
14607
14882
  var scan = require_scan$1();
14608
14883
  var parse = require_parse$2();
@@ -14649,7 +14924,7 @@ const isValidSpdx = (value) => {
14649
14924
  */
14650
14925
  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"));
14651
14926
  //#endregion
14652
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/package-json/PackageManager.js
14927
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageManager.js
14653
14928
  const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
14654
14929
  /**
14655
14930
  * The `packageManager` field only ever carries corepack's `<algo>.<hex>`
@@ -14707,7 +14982,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
14707
14982
  }
14708
14983
  };
14709
14984
  //#endregion
14710
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/package-json/PackageName.js
14985
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageName.js
14711
14986
  /**
14712
14987
  * Indicates that a string could not be used as a valid npm package name.
14713
14988
  *
@@ -14765,7 +15040,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
14765
15040
  isScoped
14766
15041
  });
14767
15042
  //#endregion
14768
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/package-json/Person.js
15043
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Person.js
14769
15044
  const parsePersonString = (input) => {
14770
15045
  const emailMatch = input.match(/<([^>]+)>/);
14771
15046
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -14812,7 +15087,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
14812
15087
  static FromValue = effect.Schema.Union([Person, Person.FromString]);
14813
15088
  };
14814
15089
  //#endregion
14815
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/package-json/internal/format.js
15090
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/internal/format.js
14816
15091
  const KEY_INDEX = new Map([
14817
15092
  "$schema",
14818
15093
  "name",
@@ -15035,7 +15310,7 @@ const renderJson = (raw, options) => {
15035
15310
  return options.newline ? `${json}\n` : json;
15036
15311
  };
15037
15312
  //#endregion
15038
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/package-json/Package.js
15313
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Package.js
15039
15314
  const toHashMap = effect.SchemaTransformation.transform({
15040
15315
  decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
15041
15316
  encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
@@ -15353,7 +15628,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
15353
15628
  }
15354
15629
  };
15355
15630
  //#endregion
15356
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/WorkspacePackage.js
15631
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspacePackage.js
15357
15632
  const EMPTY$1 = Object.freeze(Object.create(null));
15358
15633
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
15359
15634
  /**
@@ -15615,7 +15890,7 @@ var WorkspacePackage = class WorkspacePackage extends effect.Schema.Class("Works
15615
15890
  }
15616
15891
  };
15617
15892
  //#endregion
15618
- //#region ../../node_modules/.pnpm/@effected+walker@0.2.1_@effected+glob@0.1.1_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/walker/Descend.js
15893
+ //#region ../../node_modules/.pnpm/@effected+walker@0.2.2_@effected+glob@0.1.2_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/walker/Descend.js
15619
15894
  /**
15620
15895
  * Typed failure raised by {@link descend}: a directory mid-walk was unreadable
15621
15896
  * (under `onUnreadable: "fail"`), or the walk descended past `maxDepth`. Depth
@@ -15750,7 +16025,7 @@ const descend = effect.Effect.fn("Walker.descend")(function* (pattern, options)
15750
16025
  return results;
15751
16026
  });
15752
16027
  //#endregion
15753
- //#region ../../node_modules/.pnpm/@effected+walker@0.2.1_@effected+glob@0.1.1_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/walker/Walker.js
16028
+ //#region ../../node_modules/.pnpm/@effected+walker@0.2.2_@effected+glob@0.1.2_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/walker/Walker.js
15754
16029
  /**
15755
16030
  * Ascend from `start` toward the filesystem root, yielding each directory,
15756
16031
  * nearest first.
@@ -15840,7 +16115,7 @@ const Walker$1 = {
15840
16115
  findRoot: findRoot$1
15841
16116
  };
15842
16117
  //#endregion
15843
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/WorkspaceRoot.js
16118
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceRoot.js
15844
16119
  /**
15845
16120
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
15846
16121
  *
@@ -15925,7 +16200,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
15925
16200
  static layer = effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.make);
15926
16201
  };
15927
16202
  //#endregion
15928
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/internal/limits.js
16203
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/limits.js
15929
16204
  /**
15930
16205
  * Hard ceiling on directories the enumerator will visit for one pattern set.
15931
16206
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -15943,7 +16218,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
15943
16218
  */
15944
16219
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
15945
16220
  //#endregion
15946
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/internal/traverse.js
16221
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/traverse.js
15947
16222
  /** Directory names never descended into. */
15948
16223
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
15949
16224
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -16033,7 +16308,7 @@ var Traversal = class {
16033
16308
  }
16034
16309
  };
16035
16310
  //#endregion
16036
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/internal/enumerate.js
16311
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/enumerate.js
16037
16312
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
16038
16313
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
16039
16314
  /**
@@ -16103,7 +16378,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
16103
16378
  return results;
16104
16379
  });
16105
16380
  //#endregion
16106
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/internal/patterns.js
16381
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/patterns.js
16107
16382
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
16108
16383
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
16109
16384
  const pnpmPatternsOf = (document) => {
@@ -16160,7 +16435,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
16160
16435
  return manifestPatternsOf(manifest);
16161
16436
  });
16162
16437
  //#endregion
16163
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/WorkspaceDiscovery.js
16438
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceDiscovery.js
16164
16439
  /**
16165
16440
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
16166
16441
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -16458,6 +16733,109 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
16458
16733
  */
16459
16734
  static layer = (options) => effect.Layer.effect(WorkspaceDiscovery, WorkspaceDiscovery.make(options));
16460
16735
  /**
16736
+ * An in-memory test double of the service shape, with every method
16737
+ * defaulted so a test stubs only what it exercises.
16738
+ *
16739
+ * @remarks
16740
+ * The defaults model an **empty workspace**, and the derived methods run
16741
+ * over the *effective* `listPackages` — the override when one is supplied —
16742
+ * so stubbing only `listPackages` yields a consistent double:
16743
+ *
16744
+ * - `listPackages` — succeeds with `[]`.
16745
+ * - `importerMap` — derived: the packages keyed by `relativePath`.
16746
+ * - `getPackage` — derived: a name lookup that fails with the service's own
16747
+ * typed {@link PackageNotFoundError} on a miss, exactly as the live
16748
+ * implementation does.
16749
+ * - `resolveFile` / `resolveFiles` — derived: longest-prefix ownership over
16750
+ * `pkg.path`, POSIX-terminated (`"/"`); supply a win32 double explicitly
16751
+ * if your fixture paths are win32.
16752
+ * - `refresh` — a no-op (`Effect.void`); there is nothing memoized to drop.
16753
+ * - `info` — **dies** with an explanatory defect. No honest default exists
16754
+ * (a fabricated root path would leak into consumer path logic), so an
16755
+ * unstubbed `info()` call is a test-wiring mistake and fails loudly as a
16756
+ * defect rather than succeeding with a lie or failing with a dishonest
16757
+ * typed error.
16758
+ *
16759
+ * @example
16760
+ * ```ts
16761
+ * import { WorkspaceDiscovery, WorkspacePackage } from "@effected/workspaces";
16762
+ * import { Effect } from "effect";
16763
+ *
16764
+ * const double = WorkspaceDiscovery.makeTest({
16765
+ * listPackages: () =>
16766
+ * Effect.succeed([
16767
+ * WorkspacePackage.make({
16768
+ * name: "@my-org/utils",
16769
+ * version: "1.0.0",
16770
+ * path: "/repo/packages/utils",
16771
+ * packageJsonPath: "/repo/packages/utils/package.json",
16772
+ * relativePath: "packages/utils",
16773
+ * }),
16774
+ * ]),
16775
+ * });
16776
+ * // `getPackage`, `importerMap`, `resolveFile(s)` now answer consistently.
16777
+ * ```
16778
+ */
16779
+ static makeTest = (overrides = {}) => {
16780
+ const listPackages = overrides.listPackages ?? (() => effect.Effect.succeed([]));
16781
+ const ownerOf = (filePath, all) => {
16782
+ let best;
16783
+ let bestLength = 0;
16784
+ for (const pkg of all) {
16785
+ const prefix = pkg.path.endsWith("/") ? pkg.path : `${pkg.path}/`;
16786
+ if (filePath.startsWith(prefix) && prefix.length > bestLength) {
16787
+ best = pkg;
16788
+ bestLength = prefix.length;
16789
+ }
16790
+ }
16791
+ return effect.Option.fromUndefinedOr(best);
16792
+ };
16793
+ return {
16794
+ listPackages,
16795
+ info: () => effect.Effect.die(/* @__PURE__ */ new Error("WorkspaceDiscovery.makeTest: info() was called but not stubbed — no honest default WorkspaceInfo exists for a test double; pass an `info` override.")),
16796
+ importerMap: () => effect.Effect.map(listPackages(), (all) => new Map(all.map((pkg) => [pkg.relativePath, pkg]))),
16797
+ getPackage: (name) => effect.Effect.flatMap(listPackages(), (all) => {
16798
+ const found = all.find((pkg) => pkg.name === name);
16799
+ return found !== void 0 ? effect.Effect.succeed(found) : effect.Effect.fail(new PackageNotFoundError({
16800
+ name,
16801
+ available: all.map((pkg) => pkg.name)
16802
+ }));
16803
+ }),
16804
+ resolveFile: (filePath) => effect.Effect.map(listPackages(), (all) => ownerOf(filePath, all)),
16805
+ resolveFiles: (filePaths) => effect.Effect.map(listPackages(), (all) => {
16806
+ const seen = /* @__PURE__ */ new Map();
16807
+ for (const filePath of filePaths) {
16808
+ const owner = ownerOf(filePath, all);
16809
+ if (effect.Option.isSome(owner)) seen.set(owner.value.name, owner.value);
16810
+ }
16811
+ return [...seen.values()].sort((a, b) => a.name.localeCompare(b.name));
16812
+ }),
16813
+ refresh: () => effect.Effect.void,
16814
+ ...overrides
16815
+ };
16816
+ };
16817
+ /**
16818
+ * The test layer: {@link WorkspaceDiscovery.makeTest} behind
16819
+ * `Layer.succeed`, so a suite provides only the methods it exercises.
16820
+ *
16821
+ * @remarks
16822
+ * A parameterized layer factory mints a **fresh reference per call**, and
16823
+ * layers memoize by reference — bind the result to a `const` and reuse it
16824
+ * rather than calling `layerTest(...)` at each composition site.
16825
+ *
16826
+ * @example
16827
+ * ```ts
16828
+ * import { WorkspaceDiscovery } from "@effected/workspaces";
16829
+ * import { Effect } from "effect";
16830
+ *
16831
+ * const TestDiscovery = WorkspaceDiscovery.layerTest({
16832
+ * listPackages: () => Effect.succeed([]),
16833
+ * });
16834
+ * // program.pipe(Effect.provide(TestDiscovery))
16835
+ * ```
16836
+ */
16837
+ static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceDiscovery, WorkspaceDiscovery.makeTest(overrides));
16838
+ /**
16461
16839
  * The real implementation of `@effected/npm`'s `WorkspaceResolver` contract
16462
16840
  * — the one `@effected/package-json` declares but cannot fill.
16463
16841
  *
@@ -16489,7 +16867,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
16489
16867
  };
16490
16868
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
16491
16869
  //#endregion
16492
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/DependencyGraph.js
16870
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/DependencyGraph.js
16493
16871
  /**
16494
16872
  * Raised when the workspace dependency graph cannot be topologically ordered
16495
16873
  * because it contains a cycle.
@@ -16724,7 +17102,7 @@ const kahn = (edges) => {
16724
17102
  };
16725
17103
  };
16726
17104
  //#endregion
16727
- //#region ../../node_modules/.pnpm/@effected+git@0.4.0_effect@4.0.0-beta.98/node_modules/@effected/git/GitCommand.js
17105
+ //#region ../../node_modules/.pnpm/@effected+git@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/git/GitCommand.js
16728
17106
  /**
16729
17107
  * Builds a `git` `ChildProcess.StandardCommand` with the argv this package
16730
17108
  * classifies against.
@@ -17143,7 +17521,7 @@ const GitCommand = {
17143
17521
  status
17144
17522
  };
17145
17523
  //#endregion
17146
- //#region ../../node_modules/.pnpm/@effected+git@0.4.0_effect@4.0.0-beta.98/node_modules/@effected/git/internal/run.js
17524
+ //#region ../../node_modules/.pnpm/@effected+git@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/git/internal/run.js
17147
17525
  /**
17148
17526
  * Spawns `command` and collects its stdout, stderr, and exit code as a single
17149
17527
  * triple.
@@ -17170,7 +17548,7 @@ const runCollected = (command) => effect.Effect.scoped(effect.Effect.gen(functio
17170
17548
  };
17171
17549
  }));
17172
17550
  //#endregion
17173
- //#region ../../node_modules/.pnpm/@effected+git@0.4.0_effect@4.0.0-beta.98/node_modules/@effected/git/Git.js
17551
+ //#region ../../node_modules/.pnpm/@effected+git@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/git/Git.js
17174
17552
  /** git's own ceiling: a run that has not answered in 30s is not going to. */
17175
17553
  const GIT_TIMEOUT = effect.Duration.seconds(30);
17176
17554
  /**
@@ -17182,7 +17560,7 @@ const GIT_TIMEOUT = effect.Duration.seconds(30);
17182
17560
  * `exitCode` and `stderr` are populated when git actually ran. `detail`
17183
17561
  * carries a human-readable explanation of an absorbed spawn-level
17184
17562
  * `PlatformError` or a per-run timeout — the two cases where git never
17185
- * produced an exit code at all. {@link GitCommandError.kind | `kind`}
17563
+ * produced an exit code at all. `kind`
17186
17564
  * discriminates a pre-spawn guard rejection (`"refused"`) from a genuine git
17187
17565
  * failure (`"failed"`) structurally, so composed retry/fallback logic never has
17188
17566
  * to parse the prose in `message` or `detail`.
@@ -18087,7 +18465,7 @@ var Git = class extends effect.Context.Service()("@effected/git/Git") {
18087
18465
  }));
18088
18466
  };
18089
18467
  //#endregion
18090
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/ChangeDetector.js
18468
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/ChangeDetector.js
18091
18469
  /**
18092
18470
  * Which git refs to compare, and whether to fold in the working tree.
18093
18471
  *
@@ -18339,7 +18717,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
18339
18717
  };
18340
18718
  }
18341
18719
  //#endregion
18342
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/internal/catalogs.js
18720
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/catalogs.js
18343
18721
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
18344
18722
  const inlineCatalogs = (manifest) => {
18345
18723
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -18403,7 +18781,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
18403
18781
  });
18404
18782
  };
18405
18783
  //#endregion
18406
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/ConfigDependencyHooks.js
18784
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/ConfigDependencyHooks.js
18407
18785
  /** Whether `value` is a non-null, non-array object. */
18408
18786
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
18409
18787
  /**
@@ -18548,7 +18926,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
18548
18926
  }) });
18549
18927
  };
18550
18928
  //#endregion
18551
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/PackageManagerName.js
18929
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/PackageManagerName.js
18552
18930
  /**
18553
18931
  * The four package managers this package understands.
18554
18932
  *
@@ -18790,7 +19168,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
18790
19168
  static layer = effect.Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
18791
19169
  };
18792
19170
  //#endregion
18793
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/LockfileReader.js
19171
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/LockfileReader.js
18794
19172
  /**
18795
19173
  * Raised when the workspace's lockfile cannot be read off disk.
18796
19174
  *
@@ -18900,7 +19278,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
18900
19278
  static layer = (options) => effect.Layer.effect(LockfileReader, LockfileReader.make(options));
18901
19279
  };
18902
19280
  //#endregion
18903
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/Publishability.js
19281
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/Publishability.js
18904
19282
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
18905
19283
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
18906
19284
  /**
@@ -19000,7 +19378,7 @@ var PublishabilityDetector = class PublishabilityDetector extends effect.Context
19000
19378
  }) });
19001
19379
  };
19002
19380
  //#endregion
19003
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/WorkspaceCatalogs.js
19381
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceCatalogs.js
19004
19382
  /**
19005
19383
  * An immutable, fully-normalized catalog collection — the one catalog
19006
19384
  * resolution semantic in the package.
@@ -19384,7 +19762,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
19384
19762
  }));
19385
19763
  };
19386
19764
  //#endregion
19387
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
19765
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
19388
19766
  const EMPTY = Object.freeze(Object.create(null));
19389
19767
  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)));
19390
19768
  /**
@@ -19549,7 +19927,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
19549
19927
  }
19550
19928
  };
19551
19929
  //#endregion
19552
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/WorkspaceSnapshots.js
19930
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceSnapshots.js
19553
19931
  /** Whether `value` is a non-null, non-array object. */
19554
19932
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
19555
19933
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -19741,7 +20119,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
19741
20119
  static layer = (options) => effect.Layer.effect(WorkspaceSnapshots, WorkspaceSnapshots.make(options));
19742
20120
  };
19743
20121
  //#endregion
19744
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/Workspaces.js
20122
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/Workspaces.js
19745
20123
  /**
19746
20124
  * Every service that needs only a filesystem: root, package-manager detection,
19747
20125
  * discovery, lockfile reading, catalogs and publishability.
@@ -21518,7 +21896,7 @@ function validateChangesetOptions(input) {
21518
21896
  })));
21519
21897
  }
21520
21898
  //#endregion
21521
- //#region ../../node_modules/.pnpm/@changesets+get-github-info@1.0.0-next.3/node_modules/@changesets/get-github-info/dist/index.mjs
21899
+ //#region ../../node_modules/.pnpm/@changesets+get-github-info@1.0.0-next.4/node_modules/@changesets/get-github-info/dist/index.mjs
21522
21900
  var import_dataloader = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
21523
21901
  /**
21524
21902
  * Copyright (c) 2019-present, GraphQL Foundation
@@ -23272,7 +23650,7 @@ function normalizeIdentifier(value) {
23272
23650
  return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
23273
23651
  }
23274
23652
  //#endregion
23275
- //#region ../../node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.js
23653
+ //#region ../../node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0_supports-color@8.1.1/node_modules/mdast-util-gfm-footnote/lib/index.js
23276
23654
  /**
23277
23655
  * @import {
23278
23656
  * CompileContext,
@@ -23464,7 +23842,7 @@ function mapAll(line, index, blank) {
23464
23842
  return (blank ? "" : " ") + line;
23465
23843
  }
23466
23844
  //#endregion
23467
- //#region ../../node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.js
23845
+ //#region ../../node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0_supports-color@8.1.1/node_modules/mdast-util-gfm-strikethrough/lib/index.js
23468
23846
  /**
23469
23847
  * @typedef {import('mdast').Delete} Delete
23470
23848
  *
@@ -28515,7 +28893,7 @@ function safeBound(value, config) {
28515
28893
  return safe(this, value, config);
28516
28894
  }
28517
28895
  //#endregion
28518
- //#region ../../node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.js
28896
+ //#region ../../node_modules/.pnpm/mdast-util-gfm-table@2.0.0_supports-color@8.1.1/node_modules/mdast-util-gfm-table/lib/index.js
28519
28897
  /**
28520
28898
  * @typedef {import('mdast').InlineCode} InlineCode
28521
28899
  * @typedef {import('mdast').Table} Table
@@ -28779,7 +29157,7 @@ function gfmTableToMarkdown(options) {
28779
29157
  }
28780
29158
  }
28781
29159
  //#endregion
28782
- //#region ../../node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.js
29160
+ //#region ../../node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0_supports-color@8.1.1/node_modules/mdast-util-gfm-task-list-item/lib/index.js
28783
29161
  /**
28784
29162
  * @typedef {import('mdast').ListItem} ListItem
28785
29163
  * @typedef {import('mdast').Paragraph} Paragraph
@@ -28889,7 +29267,7 @@ function listItemWithTaskListItem(node, parent, state, info) {
28889
29267
  }
28890
29268
  }
28891
29269
  //#endregion
28892
- //#region ../../node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.js
29270
+ //#region ../../node_modules/.pnpm/mdast-util-gfm@3.1.0_supports-color@8.1.1/node_modules/mdast-util-gfm/lib/index.js
28893
29271
  /**
28894
29272
  * @import {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'
28895
29273
  * @import {Options} from 'mdast-util-gfm'
@@ -36973,7 +37351,7 @@ function gfm(options) {
36973
37351
  ]);
36974
37352
  }
36975
37353
  //#endregion
36976
- //#region ../../node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js
37354
+ //#region ../../node_modules/.pnpm/remark-gfm@4.0.1_supports-color@8.1.1/node_modules/remark-gfm/lib/index.js
36977
37355
  /**
36978
37356
  * @import {Root} from 'mdast'
36979
37357
  * @import {Options} from 'remark-gfm'
@@ -37004,7 +37382,7 @@ function remarkGfm(options) {
37004
37382
  toMarkdownExtensions.push(gfmToMarkdown(settings));
37005
37383
  }
37006
37384
  //#endregion
37007
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.js
37385
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/content.js
37008
37386
  /**
37009
37387
  * @import {
37010
37388
  * InitialConstruct,
@@ -37071,7 +37449,7 @@ function initializeContent(effects) {
37071
37449
  }
37072
37450
  }
37073
37451
  //#endregion
37074
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.js
37452
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/document.js
37075
37453
  /**
37076
37454
  * @import {
37077
37455
  * Construct,
@@ -37287,7 +37665,7 @@ function tokenizeContainer(effects, ok, nok) {
37287
37665
  return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
37288
37666
  }
37289
37667
  //#endregion
37290
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.js
37668
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/flow.js
37291
37669
  /**
37292
37670
  * @import {
37293
37671
  * InitialConstruct,
@@ -37334,7 +37712,7 @@ function initializeFlow(effects) {
37334
37712
  }
37335
37713
  }
37336
37714
  //#endregion
37337
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.js
37715
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/text.js
37338
37716
  /**
37339
37717
  * @import {
37340
37718
  * Code,
@@ -37511,7 +37889,7 @@ function resolveAllLineSuffixes(events, context) {
37511
37889
  return events;
37512
37890
  }
37513
37891
  //#endregion
37514
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.js
37892
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/constructs.js
37515
37893
  /**
37516
37894
  * @import {Extension} from 'micromark-util-types'
37517
37895
  */
@@ -37589,7 +37967,7 @@ const attentionMarkers = { null: [42, 95] };
37589
37967
  /** @satisfies {Extension['disable']} */
37590
37968
  const disable = { null: [] };
37591
37969
  //#endregion
37592
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.js
37970
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/create-tokenizer.js
37593
37971
  /**
37594
37972
  * @import {
37595
37973
  * Chunk,
@@ -38058,7 +38436,7 @@ function serializeChunks(chunks, expandTabs) {
38058
38436
  return result.join("");
38059
38437
  }
38060
38438
  //#endregion
38061
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.js
38439
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/parse.js
38062
38440
  /**
38063
38441
  * @import {
38064
38442
  * Create,
@@ -38102,7 +38480,7 @@ function parse$1(options) {
38102
38480
  }
38103
38481
  }
38104
38482
  //#endregion
38105
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.js
38483
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/postprocess.js
38106
38484
  /**
38107
38485
  * @import {Event} from 'micromark-util-types'
38108
38486
  */
@@ -38117,7 +38495,7 @@ function postprocess(events) {
38117
38495
  return events;
38118
38496
  }
38119
38497
  //#endregion
38120
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.js
38498
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/preprocess.js
38121
38499
  /**
38122
38500
  * @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'
38123
38501
  */
@@ -38282,7 +38660,7 @@ function index(value) {
38282
38660
  return value && typeof value === "number" ? value : 1;
38283
38661
  }
38284
38662
  //#endregion
38285
- //#region ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.3/node_modules/mdast-util-from-markdown/lib/index.js
38663
+ //#region ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.3_supports-color@8.1.1/node_modules/mdast-util-from-markdown/lib/index.js
38286
38664
  /**
38287
38665
  * @import {
38288
38666
  * Break,
@@ -39248,7 +39626,7 @@ function defaultOnError(left, right) {
39248
39626
  }) + ") is still open");
39249
39627
  }
39250
39628
  //#endregion
39251
- //#region ../../node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.js
39629
+ //#region ../../node_modules/.pnpm/remark-parse@11.0.0_supports-color@8.1.1/node_modules/remark-parse/lib/index.js
39252
39630
  /**
39253
39631
  * @typedef {import('mdast').Root} Root
39254
39632
  * @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions
@@ -57529,7 +57907,7 @@ function validatePackages(packages) {
57529
57907
  }
57530
57908
  }
57531
57909
  //#endregion
57532
- //#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@3.0.0-next.6/node_modules/@changesets/get-dependents-graph/dist/index.mjs
57910
+ //#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@3.0.0-next.7/node_modules/@changesets/get-dependents-graph/dist/index.mjs
57533
57911
  var src_default = new Proxy({}, { get(target, color) {
57534
57912
  target[color] ??= (text) => (0, node_util.styleText)(color, text);
57535
57913
  return target[color];
@@ -57649,14 +58027,14 @@ function getDependentsGraph(packages, opts) {
57649
58027
  return simplifiedDependentsGraph;
57650
58028
  }
57651
58029
  //#endregion
57652
- //#region ../../node_modules/.pnpm/@changesets+should-skip-package@1.0.0-next.6/node_modules/@changesets/should-skip-package/dist/index.mjs
58030
+ //#region ../../node_modules/.pnpm/@changesets+should-skip-package@1.0.0-next.7/node_modules/@changesets/should-skip-package/dist/index.mjs
57653
58031
  function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) {
57654
58032
  if (ignore.includes(packageJson.name)) return true;
57655
58033
  if (packageJson.private && !allowPrivatePackages) return true;
57656
58034
  return !packageJson.version;
57657
58035
  }
57658
58036
  //#endregion
57659
- //#region ../../node_modules/.pnpm/@changesets+config@4.0.0-next.6/node_modules/@changesets/config/dist/index.mjs
58037
+ //#region ../../node_modules/.pnpm/@changesets+config@4.0.0-next.7/node_modules/@changesets/config/dist/index.mjs
57660
58038
  const DEFAULT_CONFIG = {
57661
58039
  lang: void 0,
57662
58040
  message: void 0,
@@ -58568,7 +58946,7 @@ async function readConfig(cwd, packages) {
58568
58946
  packages ??= await getPackages(cwd);
58569
58947
  return validateConfig(JSON.parse(await node_fs_promises.readFile(node_path.join(packages.rootDir, ".changeset", "config.json"), "utf8")), packages);
58570
58948
  }
58571
- var version = "4.0.0-next.6";
58949
+ var version = "4.0.0-next.7";
58572
58950
  const defaultConfig = normalizeWrittenConfig({
58573
58951
  packageNames: [],
58574
58952
  writtenConfig: parse(WrittenConfigSchema, {
@@ -59291,228 +59669,6 @@ function isMetadataYarnClassic(metadataPath) {
59291
59669
  return metadataPath.endsWith(".yarn_integrity");
59292
59670
  }
59293
59671
  //#endregion
59294
- //#region ../../node_modules/.pnpm/@changesets+format@0.1.0/node_modules/@changesets/format/dist/index.js
59295
- /**
59296
- * Traverse upwards from `startDir` to `stopDir` (inclusive), calling `cb` in each directory. If
59297
- * `cb` returns a non-null value, it'll stop and return that value.
59298
- */
59299
- function traverseUpwards(startDir, stopDir, cb) {
59300
- let dir = startDir;
59301
- while (dir) {
59302
- const result = cb(dir);
59303
- if (result !== void 0) return result;
59304
- if (dir === stopDir) break;
59305
- const nextDir = node_path.dirname(dir);
59306
- if (nextDir === dir) break;
59307
- dir = nextDir;
59308
- }
59309
- }
59310
- async function packageManagerExecute(packageManager, args, cwd) {
59311
- const cmd = resolveCommand(packageManager, "execute-local", args) ?? {
59312
- command: "npx",
59313
- args
59314
- };
59315
- return await spawnProcess(cmd.command, cmd.args, cwd);
59316
- }
59317
- async function spawnProcess(command, args, cwd) {
59318
- return new Promise((resolve, reject) => {
59319
- const child = node_child_process.spawn(command, args, { cwd });
59320
- let stderr = "";
59321
- child.stderr.on("data", (data) => {
59322
- stderr += data.toString();
59323
- });
59324
- child.on("exit", (code) => {
59325
- if (code === 0) resolve();
59326
- else reject(/* @__PURE__ */ new Error(`${command} exited with code ${code}. Stderr:\n${stderr}`));
59327
- });
59328
- child.on("error", (err) => {
59329
- reject(err);
59330
- });
59331
- });
59332
- }
59333
- const formatters = {
59334
- prettier: {
59335
- name: "prettier",
59336
- packageName: "prettier",
59337
- configFiles: [
59338
- ".prettierrc",
59339
- ".prettierrc.json",
59340
- ".prettierrc.yml",
59341
- ".prettierrc.yaml",
59342
- ".prettierrc.json5",
59343
- ".prettierrc.js",
59344
- "prettier.config.js",
59345
- ".prettierrc.ts",
59346
- "prettier.config.ts",
59347
- ".prettierrc.mjs",
59348
- "prettier.config.mjs",
59349
- ".prettierrc.mts",
59350
- "prettier.config.mts",
59351
- ".prettierrc.cjs",
59352
- "prettier.config.cjs",
59353
- ".prettierrc.cts",
59354
- "prettier.config.cts",
59355
- ".prettierrc.toml",
59356
- {
59357
- file: "package.json",
59358
- key: "prettier"
59359
- }
59360
- ],
59361
- async format(files, ctx) {
59362
- await packageManagerExecute(await ctx.getPackageManager(), [
59363
- "prettier",
59364
- "--write",
59365
- ...files
59366
- ], ctx.cwd);
59367
- }
59368
- },
59369
- biome: {
59370
- name: "biome",
59371
- packageName: "@biomejs/biome",
59372
- configFiles: [
59373
- "biome.json",
59374
- "biome.jsonc",
59375
- ".biome.json",
59376
- ".biome.jsonc"
59377
- ],
59378
- async format(files, ctx) {
59379
- await packageManagerExecute(await ctx.getPackageManager(), [
59380
- "@biomejs/biome",
59381
- "format",
59382
- "--write",
59383
- ...files
59384
- ], ctx.cwd);
59385
- }
59386
- },
59387
- oxfmt: {
59388
- name: "oxfmt",
59389
- packageName: "oxfmt",
59390
- configFiles: [
59391
- ".oxfmtrc.json",
59392
- ".oxfmtrc.jsonc",
59393
- "oxfmt.config.ts"
59394
- ],
59395
- async format(files, ctx) {
59396
- await packageManagerExecute(await ctx.getPackageManager(), [
59397
- "oxfmt",
59398
- "--write",
59399
- ...files
59400
- ], ctx.cwd);
59401
- }
59402
- },
59403
- deno: {
59404
- name: "deno",
59405
- configFiles: [
59406
- "deno.json",
59407
- "deno.jsonc",
59408
- {
59409
- file: "deno.json",
59410
- key: "fmt"
59411
- }
59412
- ],
59413
- async format(files, ctx) {
59414
- await spawnProcess("deno", ["fmt", ...files], ctx.cwd);
59415
- }
59416
- },
59417
- dprint: {
59418
- name: "dprint",
59419
- packageName: "dprint",
59420
- configFiles: [
59421
- "dprint.json",
59422
- "dprint.jsonc",
59423
- ".dprint.json",
59424
- ".dprint.jsonc"
59425
- ],
59426
- async format(files, ctx) {
59427
- await packageManagerExecute(await ctx.getPackageManager(), [
59428
- "dprint",
59429
- "fmt",
59430
- ...files
59431
- ], ctx.cwd);
59432
- }
59433
- }
59434
- };
59435
- const defaultDetectOrder = Object.freeze([
59436
- "dprint",
59437
- "deno",
59438
- "oxfmt",
59439
- "biome",
59440
- "prettier"
59441
- ]);
59442
- /**
59443
- * Detect the preferred formatter used in the project.
59444
- */
59445
- async function detect(options = {}) {
59446
- const cwd = options.cwd ? node_path.resolve(options.cwd) : process.cwd();
59447
- const stopDir = options.stopDir ? node_path.resolve(cwd, options.stopDir) : void 0;
59448
- const order = options.order ?? defaultDetectOrder;
59449
- let found = traverseUpwards(cwd, stopDir, (dir) => {
59450
- for (const formatterName of order) {
59451
- const formatter = formatters[formatterName];
59452
- for (const configFile of formatter.configFiles) if (typeof configFile === "string") {
59453
- const configFilePath = node_path.join(dir, configFile);
59454
- if (node_fs.existsSync(configFilePath)) return formatter.name;
59455
- } else if (checkConfigFileWithKeyExists(node_path.join(dir, configFile.file), configFile.key)) return formatter.name;
59456
- }
59457
- });
59458
- found ??= traverseUpwards(cwd, stopDir, (dir) => {
59459
- for (const formatterName of order) {
59460
- const formatter = formatters[formatterName];
59461
- if (formatter.packageName) {
59462
- const packagePath = node_path.join(dir, "node_modules", formatter.packageName);
59463
- if (node_fs.existsSync(packagePath)) return formatter.name;
59464
- }
59465
- }
59466
- });
59467
- return found;
59468
- }
59469
- function checkConfigFileWithKeyExists(configFile, key) {
59470
- try {
59471
- const content = node_fs.readFileSync(configFile, "utf-8");
59472
- return key in JSON.parse(content);
59473
- } catch {
59474
- return false;
59475
- }
59476
- }
59477
- /**
59478
- * Format the given patterns with a specified or auto-detected formatter. It returns `true` if a
59479
- * formatter is found and the formatting process passes, otherwise returns `false`.
59480
- */
59481
- async function format$1(patterns, options = {}) {
59482
- const formatterName = options.formatter ?? await detect({
59483
- cwd: options.cwd,
59484
- stopDir: options.stopDir
59485
- });
59486
- if (!formatterName) return false;
59487
- const formatter = formatters[formatterName];
59488
- const ctx = {
59489
- cwd: options.cwd ? node_path.resolve(options.cwd) : process.cwd(),
59490
- async getPackageManager() {
59491
- if (options.packageManager) return options.packageManager;
59492
- return (await detect$1({
59493
- cwd: options.cwd,
59494
- stopDir: options.stopDir
59495
- }))?.agent ?? "npm";
59496
- }
59497
- };
59498
- await formatter.format(patterns, ctx);
59499
- return true;
59500
- }
59501
- //#endregion
59502
- //#region ../../node_modules/.pnpm/@changesets+errors@1.0.0-next.3/node_modules/@changesets/errors/dist/index.mjs
59503
- var GitError = class extends Error {
59504
- code;
59505
- constructor(code, message) {
59506
- super(`${message}, exit code: ${code}`);
59507
- this.code = code;
59508
- }
59509
- };
59510
- var InternalError = class extends Error {
59511
- constructor(message) {
59512
- super(message);
59513
- }
59514
- };
59515
- //#endregion
59516
59672
  //#region ../../node_modules/.pnpm/tinyexec@1.2.4/node_modules/tinyexec/dist/main.mjs
59517
59673
  const h = /^path$/i;
59518
59674
  const g = {
@@ -59839,7 +59995,219 @@ const R = (e, t, n) => {
59839
59995
  };
59840
59996
  const z = R;
59841
59997
  //#endregion
59842
- //#region ../../node_modules/.pnpm/@changesets+git@4.0.0-next.6/node_modules/@changesets/git/dist/index.mjs
59998
+ //#region ../../node_modules/.pnpm/@changesets+format@0.1.1/node_modules/@changesets/format/dist/index.js
59999
+ /**
60000
+ * Traverse upwards from `startDir` to `stopDir` (inclusive), calling `cb` in each directory. If
60001
+ * `cb` returns a non-null value, it'll stop and return that value.
60002
+ */
60003
+ function traverseUpwards(startDir, stopDir, cb) {
60004
+ let dir = startDir;
60005
+ while (dir) {
60006
+ const result = cb(dir);
60007
+ if (result !== void 0) return result;
60008
+ if (dir === stopDir) break;
60009
+ const nextDir = node_path.dirname(dir);
60010
+ if (nextDir === dir) break;
60011
+ dir = nextDir;
60012
+ }
60013
+ }
60014
+ async function packageManagerExecute(packageManager, args, cwd) {
60015
+ const cmd = resolveCommand(packageManager, "execute-local", args) ?? {
60016
+ command: "npx",
60017
+ args
60018
+ };
60019
+ return await spawnProcess(cmd.command, cmd.args, cwd);
60020
+ }
60021
+ async function spawnProcess(command, args, cwd) {
60022
+ await z(command, args, {
60023
+ nodeOptions: { cwd },
60024
+ throwOnError: true
60025
+ });
60026
+ }
60027
+ const formatters = {
60028
+ prettier: {
60029
+ name: "prettier",
60030
+ packageName: "prettier",
60031
+ configFiles: [
60032
+ ".prettierrc",
60033
+ ".prettierrc.json",
60034
+ ".prettierrc.yml",
60035
+ ".prettierrc.yaml",
60036
+ ".prettierrc.json5",
60037
+ ".prettierrc.js",
60038
+ "prettier.config.js",
60039
+ ".prettierrc.ts",
60040
+ "prettier.config.ts",
60041
+ ".prettierrc.mjs",
60042
+ "prettier.config.mjs",
60043
+ ".prettierrc.mts",
60044
+ "prettier.config.mts",
60045
+ ".prettierrc.cjs",
60046
+ "prettier.config.cjs",
60047
+ ".prettierrc.cts",
60048
+ "prettier.config.cts",
60049
+ ".prettierrc.toml",
60050
+ {
60051
+ file: "package.json",
60052
+ key: "prettier"
60053
+ }
60054
+ ],
60055
+ async format(files, ctx) {
60056
+ await packageManagerExecute(await ctx.getPackageManager(), [
60057
+ "prettier",
60058
+ "--write",
60059
+ ...files
60060
+ ], ctx.cwd);
60061
+ }
60062
+ },
60063
+ biome: {
60064
+ name: "biome",
60065
+ packageName: "@biomejs/biome",
60066
+ configFiles: [
60067
+ "biome.json",
60068
+ "biome.jsonc",
60069
+ ".biome.json",
60070
+ ".biome.jsonc"
60071
+ ],
60072
+ async format(files, ctx) {
60073
+ await packageManagerExecute(await ctx.getPackageManager(), [
60074
+ "@biomejs/biome",
60075
+ "format",
60076
+ "--write",
60077
+ ...files
60078
+ ], ctx.cwd);
60079
+ }
60080
+ },
60081
+ oxfmt: {
60082
+ name: "oxfmt",
60083
+ packageName: "oxfmt",
60084
+ configFiles: [
60085
+ ".oxfmtrc.json",
60086
+ ".oxfmtrc.jsonc",
60087
+ "oxfmt.config.ts"
60088
+ ],
60089
+ async format(files, ctx) {
60090
+ await packageManagerExecute(await ctx.getPackageManager(), [
60091
+ "oxfmt",
60092
+ "--write",
60093
+ ...files
60094
+ ], ctx.cwd);
60095
+ }
60096
+ },
60097
+ deno: {
60098
+ name: "deno",
60099
+ configFiles: [
60100
+ "deno.json",
60101
+ "deno.jsonc",
60102
+ {
60103
+ file: "deno.json",
60104
+ key: "fmt"
60105
+ }
60106
+ ],
60107
+ async format(files, ctx) {
60108
+ await spawnProcess("deno", ["fmt", ...files], ctx.cwd);
60109
+ }
60110
+ },
60111
+ dprint: {
60112
+ name: "dprint",
60113
+ packageName: "dprint",
60114
+ configFiles: [
60115
+ "dprint.json",
60116
+ "dprint.jsonc",
60117
+ ".dprint.json",
60118
+ ".dprint.jsonc"
60119
+ ],
60120
+ async format(files, ctx) {
60121
+ await packageManagerExecute(await ctx.getPackageManager(), [
60122
+ "dprint",
60123
+ "fmt",
60124
+ ...files
60125
+ ], ctx.cwd);
60126
+ }
60127
+ }
60128
+ };
60129
+ const defaultDetectOrder = Object.freeze([
60130
+ "dprint",
60131
+ "deno",
60132
+ "oxfmt",
60133
+ "biome",
60134
+ "prettier"
60135
+ ]);
60136
+ /**
60137
+ * Detect the preferred formatter used in the project.
60138
+ */
60139
+ async function detect(options = {}) {
60140
+ const cwd = options.cwd ? node_path.resolve(options.cwd) : process.cwd();
60141
+ const stopDir = options.stopDir ? node_path.resolve(cwd, options.stopDir) : void 0;
60142
+ const order = options.order ?? defaultDetectOrder;
60143
+ let found = traverseUpwards(cwd, stopDir, (dir) => {
60144
+ for (const formatterName of order) {
60145
+ const formatter = formatters[formatterName];
60146
+ for (const configFile of formatter.configFiles) if (typeof configFile === "string") {
60147
+ const configFilePath = node_path.join(dir, configFile);
60148
+ if (node_fs.existsSync(configFilePath)) return formatter.name;
60149
+ } else if (checkConfigFileWithKeyExists(node_path.join(dir, configFile.file), configFile.key)) return formatter.name;
60150
+ }
60151
+ });
60152
+ found ??= traverseUpwards(cwd, stopDir, (dir) => {
60153
+ for (const formatterName of order) {
60154
+ const formatter = formatters[formatterName];
60155
+ if (formatter.packageName) {
60156
+ const packagePath = node_path.join(dir, "node_modules", formatter.packageName);
60157
+ if (node_fs.existsSync(packagePath)) return formatter.name;
60158
+ }
60159
+ }
60160
+ });
60161
+ return found;
60162
+ }
60163
+ function checkConfigFileWithKeyExists(configFile, key) {
60164
+ try {
60165
+ const content = node_fs.readFileSync(configFile, "utf-8");
60166
+ return key in JSON.parse(content);
60167
+ } catch {
60168
+ return false;
60169
+ }
60170
+ }
60171
+ /**
60172
+ * Format the given patterns with a specified or auto-detected formatter. It returns `true` if a
60173
+ * formatter is found and the formatting process passes, otherwise returns `false`.
60174
+ */
60175
+ async function format$1(patterns, options = {}) {
60176
+ const formatterName = options.formatter ?? await detect({
60177
+ cwd: options.cwd,
60178
+ stopDir: options.stopDir
60179
+ });
60180
+ if (!formatterName) return false;
60181
+ const formatter = formatters[formatterName];
60182
+ const ctx = {
60183
+ cwd: options.cwd ? node_path.resolve(options.cwd) : process.cwd(),
60184
+ async getPackageManager() {
60185
+ if (options.packageManager) return options.packageManager;
60186
+ return (await detect$1({
60187
+ cwd: options.cwd,
60188
+ stopDir: options.stopDir
60189
+ }))?.agent ?? "npm";
60190
+ }
60191
+ };
60192
+ await formatter.format(patterns, ctx);
60193
+ return true;
60194
+ }
60195
+ //#endregion
60196
+ //#region ../../node_modules/.pnpm/@changesets+errors@1.0.0-next.4/node_modules/@changesets/errors/dist/index.mjs
60197
+ var GitError = class extends Error {
60198
+ code;
60199
+ constructor(code, message) {
60200
+ super(`${message}, exit code: ${code}`);
60201
+ this.code = code;
60202
+ }
60203
+ };
60204
+ var InternalError = class extends Error {
60205
+ constructor(message) {
60206
+ super(message);
60207
+ }
60208
+ };
60209
+ //#endregion
60210
+ //#region ../../node_modules/.pnpm/@changesets+git@4.0.0-next.7/node_modules/@changesets/git/dist/index.mjs
59843
60211
  async function getDivergedCommit(cwd, ref) {
59844
60212
  const cmd = await z("git", [
59845
60213
  "merge-base",
@@ -61986,7 +62354,7 @@ function applyEdits(text, edits) {
61986
62354
  return text;
61987
62355
  }
61988
62356
  //#endregion
61989
- //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.0.0-next.7/node_modules/@changesets/apply-release-plan/dist/index.mjs
62357
+ //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.0.0-next.8/node_modules/@changesets/apply-release-plan/dist/index.mjs
61990
62358
  /**
61991
62359
  * A simple JSON editing utility that preserves formatting. They specified operation keys
61992
62360
  * must exist in the JSON for this implementation.
@@ -62127,13 +62495,8 @@ const DEPENDENCY_TYPES = [
62127
62495
  "peerDependencies",
62128
62496
  "optionalDependencies"
62129
62497
  ];
62130
- function versionPackage(release, versionsToUpdate, { cwd, updateInternalDependencies, onlyUpdatePeerDependentsWhenOutOfRange, bumpVersionsWithWorkspaceProtocolOnly, snapshot }) {
62498
+ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateInternalDependencies, onlyUpdatePeerDependentsWhenOutOfRange, bumpVersionsWithWorkspaceProtocolOnly, snapshot }) {
62131
62499
  const pkgJsonEdits = [];
62132
- const { newVersion, packageJson } = release;
62133
- pkgJsonEdits.push({
62134
- keys: ["version"],
62135
- value: newVersion
62136
- });
62137
62500
  for (const depType of DEPENDENCY_TYPES) {
62138
62501
  const deps = packageJson[depType];
62139
62502
  if (deps) for (const { name, version, oldVersion, type, dir } of versionsToUpdate) {
@@ -62167,10 +62530,7 @@ function versionPackage(release, versionsToUpdate, { cwd, updateInternalDependen
62167
62530
  }
62168
62531
  }
62169
62532
  }
62170
- return {
62171
- ...release,
62172
- pkgJsonEdits
62173
- };
62533
+ return pkgJsonEdits;
62174
62534
  }
62175
62535
  function getVersionRangeType(versionRange) {
62176
62536
  if (versionRange.charAt(0) === "^") return "^";
@@ -62200,6 +62560,13 @@ async function getFormatter(config, cwd) {
62200
62560
  });
62201
62561
  };
62202
62562
  }
62563
+ async function updatePackageJson(dir, edits) {
62564
+ if (edits.length === 0) return;
62565
+ const pkgJsonPath = node_path.resolve(dir, "package.json");
62566
+ const pkgUpdated = editJson(await node_fs_promises.readFile(pkgJsonPath, "utf8"), edits);
62567
+ await node_fs_promises.writeFile(pkgJsonPath, pkgUpdated);
62568
+ return pkgJsonPath;
62569
+ }
62203
62570
  async function applyReleasePlan(releasePlan, packages, config = defaultConfig, snapshot, contextDir = __dirname) {
62204
62571
  const cwd = packages.rootDir;
62205
62572
  const touchedFiles = [];
@@ -62228,22 +62595,21 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
62228
62595
  type,
62229
62596
  dir: packagesByName.get(name).dir
62230
62597
  }));
62231
- const finalisedRelease = releaseWithChangelogs.map((release) => {
62232
- return versionPackage(release, versionsToUpdate, {
62233
- cwd,
62234
- updateInternalDependencies: config.updateInternalDependencies,
62235
- onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange,
62236
- bumpVersionsWithWorkspaceProtocolOnly: config.bumpVersionsWithWorkspaceProtocolOnly,
62237
- snapshot
62238
- });
62239
- });
62598
+ const dependencyUpdateOptions = {
62599
+ cwd,
62600
+ updateInternalDependencies: config.updateInternalDependencies,
62601
+ onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange,
62602
+ bumpVersionsWithWorkspaceProtocolOnly: config.bumpVersionsWithWorkspaceProtocolOnly,
62603
+ snapshot
62604
+ };
62240
62605
  const filesToFormat = [];
62241
- for (const release of finalisedRelease) {
62242
- const { changelog, pkgJsonEdits, dir, name } = release;
62243
- const pkgJsonPath = node_path.resolve(dir, "package.json");
62244
- const pkgUpdated = editJson(await node_fs_promises.readFile(pkgJsonPath, "utf8"), pkgJsonEdits);
62245
- await node_fs_promises.writeFile(pkgJsonPath, pkgUpdated);
62246
- touchedFiles.push(pkgJsonPath);
62606
+ for (const release of releaseWithChangelogs) {
62607
+ const { changelog, dir, name, newVersion, packageJson } = release;
62608
+ const pkgJsonPath = await updatePackageJson(dir, [{
62609
+ keys: ["version"],
62610
+ value: newVersion
62611
+ }, ...getDependencyVersionEdits(packageJson, versionsToUpdate, dependencyUpdateOptions)]);
62612
+ if (pkgJsonPath) touchedFiles.push(pkgJsonPath);
62247
62613
  if (changelog && changelog.length > 0) {
62248
62614
  const changelogPath = node_path.resolve(dir, "CHANGELOG.md");
62249
62615
  await updateChangelog(changelogPath, changelog, name);
@@ -62251,6 +62617,11 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
62251
62617
  filesToFormat.push(changelogPath);
62252
62618
  }
62253
62619
  }
62620
+ if (packages.rootPackage) {
62621
+ const pkgJsonEdits = getDependencyVersionEdits(packages.rootPackage.packageJson, versionsToUpdate, dependencyUpdateOptions);
62622
+ const pkgJsonPath = await updatePackageJson(packages.rootPackage.dir, pkgJsonEdits);
62623
+ if (pkgJsonPath) touchedFiles.push(pkgJsonPath);
62624
+ }
62254
62625
  if (filesToFormat.length > 0) await (await getFormatter(config.format, cwd))(filesToFormat);
62255
62626
  if (releasePlan.preState == null || releasePlan.preState.mode === "exit") {
62256
62627
  const changesetFolder = node_path.resolve(cwd, ".changeset");
@@ -62341,7 +62712,7 @@ async function updateChangelog(changelogPath, changelog, name) {
62341
62712
  await node_fs_promises.writeFile(changelogPath, newChangelog);
62342
62713
  }
62343
62714
  //#endregion
62344
- //#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@7.0.0-next.7/node_modules/@changesets/assemble-release-plan/dist/index.mjs
62715
+ //#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@7.0.0-next.8/node_modules/@changesets/assemble-release-plan/dist/index.mjs
62345
62716
  function getHighestReleaseType(releases) {
62346
62717
  if (releases.length === 0) throw new Error(`Large internal Changesets error when calculating highest release type in the set of releases. Please contact the maintainers`);
62347
62718
  let highestReleaseType = "none";
@@ -62687,7 +63058,7 @@ function getPreInfo(changesets, packagesByName, config, preState) {
62687
63058
  };
62688
63059
  }
62689
63060
  //#endregion
62690
- //#region ../../node_modules/.pnpm/@changesets+pre@3.0.0-next.6/node_modules/@changesets/pre/dist/index.mjs
63061
+ //#region ../../node_modules/.pnpm/@changesets+pre@3.0.0-next.7/node_modules/@changesets/pre/dist/index.mjs
62691
63062
  async function outputFile(filePath, content) {
62692
63063
  await node_fs_promises.mkdir(node_path.dirname(filePath), { recursive: true });
62693
63064
  await node_fs_promises.writeFile(filePath, content, "utf8");
@@ -62716,7 +63087,7 @@ async function migratePreState(rootDir, preState) {
62716
63087
  return preState;
62717
63088
  }
62718
63089
  //#endregion
62719
- //#region ../../node_modules/.pnpm/@changesets+parse@1.0.0-next.7/node_modules/@changesets/parse/dist/index.mjs
63090
+ //#region ../../node_modules/.pnpm/@changesets+parse@1.0.0-next.8/node_modules/@changesets/parse/dist/index.mjs
62720
63091
  const mdRegex = /\s*---([^]*?)\r?\n\s*---(\s*(?:\n|$)[^]*)/;
62721
63092
  const EXAMPLE_FORMAT = `---\n"package-name": patch\n---`;
62722
63093
  const validVersionTypes = [
@@ -62769,7 +63140,7 @@ YAML error: ${e instanceof Error ? e.message : String(e)}\nFrontmatter content:\
62769
63140
  };
62770
63141
  }
62771
63142
  //#endregion
62772
- //#region ../../node_modules/.pnpm/@changesets+read@1.0.0-next.7/node_modules/@changesets/read/dist/index.mjs
63143
+ //#region ../../node_modules/.pnpm/@changesets+read@1.0.0-next.8/node_modules/@changesets/read/dist/index.mjs
62773
63144
  const ignoredMdFiles = [
62774
63145
  /^README\.md$/i,
62775
63146
  "AGENTS.md",
@@ -62802,7 +63173,7 @@ async function readChangesets(rootDir, sinceRef) {
62802
63173
  return await Promise.all(changesetContents);
62803
63174
  }
62804
63175
  //#endregion
62805
- //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.0-next.7/node_modules/@changesets/get-release-plan/dist/index.mjs
63176
+ //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.0-next.8/node_modules/@changesets/get-release-plan/dist/index.mjs
62806
63177
  async function getReleasePlan(cwd, sinceRef, passedConfig) {
62807
63178
  const packages = await getPackages(cwd);
62808
63179
  const configResult = await readConfig(packages.rootDir, packages);