@savvy-web/silk 3.0.4 → 3.0.5

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.
@@ -423,7 +423,7 @@ const trimTrailingSlashes = (s) => {
423
423
  return s.slice(0, end);
424
424
  };
425
425
  //#endregion
426
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/limits.js
426
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/limits.js
427
427
  /** Hard cap on pattern length. Upstream minimatch's MAX_PATTERN_LENGTH (64KB). */
428
428
  const MAX_PATTERN_LENGTH = 1024 * 64;
429
429
  /** Default brace-expansion output budget. Upstream brace-expansion's EXPANSION_MAX. */
@@ -457,7 +457,7 @@ const assertCap = (name, value) => {
457
457
  return value;
458
458
  };
459
459
  //#endregion
460
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/unescape.js
460
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/unescape.js
461
461
  /**
462
462
  * Un-escape a string that has been escaped with `escape`.
463
463
  *
@@ -480,11 +480,11 @@ const unescapePattern = (s, { windowsPathsNoEscape = false, magicalBraces = true
480
480
  return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
481
481
  };
482
482
  //#endregion
483
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/types.js
483
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/types.js
484
484
  /** The globstar marker in a compiled pattern set. */
485
485
  const GLOBSTAR = Symbol("globstar **");
486
486
  //#endregion
487
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/escape.js
487
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/escape.js
488
488
  /**
489
489
  * Escape all magic characters in a glob pattern.
490
490
  *
@@ -502,13 +502,13 @@ const escapePattern = (s, { windowsPathsNoEscape = false, magicalBraces = false
502
502
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
503
503
  };
504
504
  //#endregion
505
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/assertValidPattern.js
505
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/assertValidPattern.js
506
506
  const assertValidPattern = (pattern) => {
507
507
  if (typeof pattern !== "string") throw new TypeError("invalid pattern");
508
508
  if (pattern.length > 65536) throw new GuardExceeded("PatternTooLong", MAX_PATTERN_LENGTH, pattern.length);
509
509
  };
510
510
  //#endregion
511
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpressions.js
511
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpressions.js
512
512
  const posixClasses = {
513
513
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
514
514
  "[:alpha:]": ["\\p{L}\\p{Nl}", true],
@@ -631,7 +631,7 @@ const parseClass = (glob, position) => {
631
631
  ];
632
632
  };
633
633
  //#endregion
634
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/ast.js
634
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/ast.js
635
635
  const types = /* @__PURE__ */ new Set([
636
636
  "!",
637
637
  "?",
@@ -1148,7 +1148,7 @@ var AST = class AST {
1148
1148
  }
1149
1149
  };
1150
1150
  //#endregion
1151
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/balancedMatch.js
1151
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/balancedMatch.js
1152
1152
  const maybeMatch = (reg, str) => {
1153
1153
  const m = str.match(reg);
1154
1154
  return m ? m[0] : null;
@@ -1206,7 +1206,7 @@ const range = (a, b, str) => {
1206
1206
  return result;
1207
1207
  };
1208
1208
  //#endregion
1209
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpansion.js
1209
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpansion.js
1210
1210
  const escSlash = `\0SLASH${Math.random()}\0`;
1211
1211
  const escOpen = `\0OPEN${Math.random()}\0`;
1212
1212
  const escClose = `\0CLOSE${Math.random()}\0`;
@@ -1353,7 +1353,7 @@ function expand_(str, max, isTopInput, depth) {
1353
1353
  }
1354
1354
  }
1355
1355
  //#endregion
1356
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/minimatch.js
1356
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/minimatch.js
1357
1357
  const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
1358
1358
  const starDotExtTest = (ext) => (f) => !f.startsWith(".") && f.endsWith(ext);
1359
1359
  const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
@@ -1924,7 +1924,7 @@ var Minimatch = class {
1924
1924
  }
1925
1925
  };
1926
1926
  //#endregion
1927
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobPattern.js
1927
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobPattern.js
1928
1928
  /**
1929
1929
  * Typed failure raised when a glob pattern trips a compile-time guard:
1930
1930
  * over-length, brace-expansion budget exhaustion, or nesting past the depth
@@ -2053,17 +2053,30 @@ var GlobPattern = class GlobPattern extends effect.Schema.Class("GlobPattern")(e
2053
2053
  return this.#engine;
2054
2054
  }
2055
2055
  /**
2056
- * Compile a pattern under the given options — the package's fallible
2057
- * boundary. Guard trips (over-length, expansion budget, nesting depth)
2058
- * fail typed with {@link GlobPatternError}; invalid options never reach
2059
- * here (they throw at `GlobPatternOptions.make`, a wiring defect).
2056
+ * Compile a pattern under the given options, synchronously — the package's
2057
+ * fallible boundary in its primitive form. Compilation is pure
2058
+ * string→predicate work with no IO, no services and no async step, so the
2059
+ * sync form is the real primitive and {@link GlobPattern.compile} is
2060
+ * derived from it.
2061
+ *
2062
+ * Total: never throws for pattern input. Guard trips (over-length,
2063
+ * expansion budget, nesting depth) come back as a `Result` failure holding
2064
+ * {@link GlobPatternError}; invalid *options* never reach here (they throw
2065
+ * at `GlobPatternOptions.make`, a wiring defect).
2060
2066
  *
2061
2067
  * The pattern must also compile under DEFAULT options, whatever the
2062
2068
  * effective options are — permissive options (say `nobrace` over a brace
2063
2069
  * bomb) do not admit a defaults-rejected pattern; the same typed error
2064
2070
  * surfaces instead.
2071
+ *
2072
+ * @remarks
2073
+ * For synchronous call sites that cannot host an Effect — a lint-staged
2074
+ * handler, a config predicate — this removes the
2075
+ * `Effect.runSync(Effect.result(...))` escape hatch: pair it with
2076
+ * `Result.isSuccess` and read `.success` directly. Effect call sites should
2077
+ * prefer {@link GlobPattern.compile}, which carries the tracing span.
2065
2078
  */
2066
- static compile = effect.Effect.fn("GlobPattern.compile")(function* (source, options) {
2079
+ static compileResult(source, options) {
2067
2080
  const engineOptions = toEngineOptions(options);
2068
2081
  try {
2069
2082
  new Minimatch(source, {});
@@ -2071,16 +2084,30 @@ var GlobPattern = class GlobPattern extends effect.Schema.Class("GlobPattern")(e
2071
2084
  const pattern = new GlobPattern({ source });
2072
2085
  pattern.#engine = engine;
2073
2086
  pattern.#engineOptions = engineOptions;
2074
- return pattern;
2087
+ return effect.Result.succeed(pattern);
2075
2088
  } catch (e) {
2076
- if (isGuardExceeded(e)) return yield* new GlobPatternError({
2089
+ if (isGuardExceeded(e)) return effect.Result.fail(new GlobPatternError({
2077
2090
  pattern: source,
2078
2091
  reason: e.reason,
2079
2092
  limit: e.limit,
2080
2093
  actual: e.actual
2081
- });
2094
+ }));
2082
2095
  throw e;
2083
2096
  }
2097
+ }
2098
+ /**
2099
+ * Compile a pattern under the given options — the package's fallible
2100
+ * boundary, and the form Effect call sites should reach for. Guard trips
2101
+ * (over-length, expansion budget, nesting depth) fail typed with
2102
+ * {@link GlobPatternError}; invalid options never reach here (they throw at
2103
+ * `GlobPatternOptions.make`, a wiring defect).
2104
+ *
2105
+ * Defined in terms of {@link GlobPattern.compileResult} — synchronous
2106
+ * callers can use that variant directly. Same semantics, same errors; this
2107
+ * form adds only the `GlobPattern.compile` tracing span.
2108
+ */
2109
+ static compile = effect.Effect.fn("GlobPattern.compile")(function* (source, options) {
2110
+ return yield* effect.Effect.fromResult(GlobPattern.compileResult(source, options));
2084
2111
  });
2085
2112
  /**
2086
2113
  * Whether `candidate` matches this pattern. Total: never throws, never
@@ -2176,7 +2203,7 @@ var GlobPattern = class GlobPattern extends effect.Schema.Class("GlobPattern")(e
2176
2203
  })));
2177
2204
  };
2178
2205
  //#endregion
2179
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobSet.js
2206
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobSet.js
2180
2207
  const exclusionTarget = (pattern) => pattern.startsWith("!") ? pattern.slice(1) : void 0;
2181
2208
  const allCompileUnderDefaults = (patterns) => {
2182
2209
  for (const pattern of patterns) {
@@ -2251,27 +2278,53 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2251
2278
  return this.#literalSet;
2252
2279
  }
2253
2280
  /**
2254
- * Compile a pattern set — with {@link GlobPattern.compile}, the package's
2255
- * only other fallible boundary. Fails typed on the FIRST uncompilable
2256
- * member, with the error's `pattern` field naming the offending source
2257
- * pattern (bang included for exclusions).
2281
+ * Compile a pattern set, synchronously the primitive form, mirroring
2282
+ * {@link GlobPattern.compileResult}. Set compilation is pure
2283
+ * string→predicate work with no IO and no async step, so the sync form is
2284
+ * the real primitive and {@link GlobSet.compile} is derived from it.
2285
+ *
2286
+ * Total: never throws for pattern input. Fails on the FIRST uncompilable
2287
+ * member, coming back as a `Result` failure whose {@link GlobPatternError}
2288
+ * names the offending source pattern in `pattern` (bang included for
2289
+ * exclusions).
2290
+ *
2291
+ * @remarks
2292
+ * For synchronous call sites that cannot host an Effect — a lint-staged
2293
+ * handler, a config predicate — this removes the
2294
+ * `Effect.runSync(Effect.result(...))` escape hatch: pair it with
2295
+ * `Result.isSuccess` and read `.success` directly. Effect call sites should
2296
+ * prefer {@link GlobSet.compile}, which carries the tracing span.
2258
2297
  */
2259
- static compile = effect.Effect.fn("GlobSet.compile")(function* (patterns) {
2298
+ static compileResult(patterns) {
2260
2299
  for (const pattern of patterns) {
2261
2300
  const target = exclusionTarget(pattern) ?? pattern;
2262
2301
  try {
2263
2302
  new Minimatch(target, {});
2264
2303
  } catch (e) {
2265
- if (isGuardExceeded(e)) return yield* new GlobPatternError({
2304
+ if (isGuardExceeded(e)) return effect.Result.fail(new GlobPatternError({
2266
2305
  pattern,
2267
2306
  reason: e.reason,
2268
2307
  limit: e.limit,
2269
2308
  actual: e.actual
2270
- });
2309
+ }));
2271
2310
  throw e;
2272
2311
  }
2273
2312
  }
2274
- return new GlobSet({ patterns });
2313
+ return effect.Result.succeed(new GlobSet({ patterns }));
2314
+ }
2315
+ /**
2316
+ * Compile a pattern set — with {@link GlobPattern.compile}, the package's
2317
+ * only other fallible boundary, and the form Effect call sites should reach
2318
+ * for. Fails typed on the FIRST uncompilable member, with the error's
2319
+ * `pattern` field naming the offending source pattern (bang included for
2320
+ * exclusions).
2321
+ *
2322
+ * Defined in terms of {@link GlobSet.compileResult} — synchronous callers
2323
+ * can use that variant directly. Same semantics, same errors; this form
2324
+ * adds only the `GlobSet.compile` tracing span.
2325
+ */
2326
+ static compile = effect.Effect.fn("GlobSet.compile")(function* (patterns) {
2327
+ return yield* effect.Effect.fromResult(GlobSet.compileResult(patterns));
2275
2328
  });
2276
2329
  /**
2277
2330
  * Whether `candidate` matches the set: some include accepts it (literal
@@ -2304,7 +2357,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2304
2357
  }
2305
2358
  };
2306
2359
  //#endregion
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
2360
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/BunExtension.js
2308
2361
  /**
2309
2362
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2310
2363
  * when the format is `"bun"`.
@@ -2325,7 +2378,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
2325
2378
  trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
2326
2379
  }) {};
2327
2380
  //#endregion
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
2381
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.3_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/CatalogResolver.js
2329
2382
  /**
2330
2383
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2331
2384
  * version ranges.
@@ -2371,7 +2424,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
2371
2424
  static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
2372
2425
  };
2373
2426
  //#endregion
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
2427
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.3_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/WorkspaceResolver.js
2375
2428
  /**
2376
2429
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2377
2430
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2432,7 +2485,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
2432
2485
  static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
2433
2486
  };
2434
2487
  //#endregion
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
2488
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.3_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/CatalogAssemblyError.js
2436
2489
  /**
2437
2490
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2438
2491
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2476,7 +2529,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
2476
2529
  }
2477
2530
  };
2478
2531
  //#endregion
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
2532
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.3_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/DependencySection.js
2480
2533
  /**
2481
2534
  * The short dependency kind: which dependency map an entry came from, named the
2482
2535
  * way consumers branch on it.
@@ -2508,7 +2561,7 @@ Object.fromEntries(Object.entries({
2508
2561
  optional: "optionalDependencies"
2509
2562
  }).map(([kind, field]) => [field, kind]));
2510
2563
  //#endregion
2511
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/desugar.js
2564
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/desugar.js
2512
2565
  const sv = (major, minor, patch, prerelease = [], build = []) => ({
2513
2566
  major,
2514
2567
  minor,
@@ -2597,7 +2650,7 @@ const desugarHyphen = (lower, upper) => {
2597
2650
  return [comp(">=", lowerVersion)];
2598
2651
  };
2599
2652
  //#endregion
2600
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/grammar.js
2653
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/grammar.js
2601
2654
  /** Private control-flow exception; never escapes the entry points. */
2602
2655
  var ParseFailure = class {
2603
2656
  position;
@@ -2992,7 +3045,7 @@ const formatComparator = (c) => {
2992
3045
  /** Print comparator sets as `a b || c d`. */
2993
3046
  const formatRange = (sets) => sets.map((set) => set.map(formatComparator).join(" ")).join(" || ");
2994
3047
  //#endregion
2995
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/order.js
3048
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/order.js
2996
3049
  /**
2997
3050
  * Compare two prerelease identifiers per SemVer 2.0.0 §11: numeric
2998
3051
  * identifiers always have lower precedence than alphanumeric ones; numerics
@@ -3045,7 +3098,7 @@ const compareBuild = (a, b) => {
3045
3098
  return 0;
3046
3099
  };
3047
3100
  //#endregion
3048
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/SemVer.js
3101
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/SemVer.js
3049
3102
  /**
3050
3103
  * Indicates that a string could not be parsed as a valid SemVer 2.0.0 version.
3051
3104
  *
@@ -3126,23 +3179,57 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3126
3179
  encode: (parts) => effect.Effect.succeed(formatVersion(parts))
3127
3180
  })));
3128
3181
  /**
3129
- * Parse a strict SemVer 2.0.0 version string.
3182
+ * Parse a strict SemVer 2.0.0 version string, synchronously, returning a
3183
+ * `Result` instead of an `Effect`.
3130
3184
  *
3131
3185
  * Rejects `v`/`V` prefixes, `=` prefixes, leading zeros on numeric
3132
3186
  * identifiers and partially consumed input.
3133
3187
  *
3188
+ * @remarks
3189
+ * {@link SemVer.parse} is defined in terms of this function; the two never
3190
+ * diverge. Reach for the `Effect` variant inside Effect code — it carries
3191
+ * the `SemVer.parse` tracing span — and for this one at synchronous
3192
+ * boundaries.
3193
+ *
3194
+ * @example
3195
+ * ```ts
3196
+ * import { SemVer } from "@effected/semver";
3197
+ * import { Result } from "effect";
3198
+ *
3199
+ * const ok = SemVer.parseResult("1.2.3");
3200
+ * if (Result.isSuccess(ok)) {
3201
+ * console.log(ok.success.major); // => 1
3202
+ * }
3203
+ *
3204
+ * const bad = SemVer.parseResult("v1.2.3");
3205
+ * if (Result.isFailure(bad)) {
3206
+ * console.log(bad.failure._tag); // => "InvalidVersionError"
3207
+ * }
3208
+ * ```
3209
+ *
3134
3210
  * @param input - the version string to parse
3135
- * @returns the parsed {@link SemVer}. Fails with {@link InvalidVersionError}
3136
- * when `input` is not a valid version string.
3211
+ * @returns a `Result` succeeding with the parsed {@link SemVer}, or failing
3212
+ * with {@link InvalidVersionError} when `input` is not a valid version
3213
+ * string.
3137
3214
  */
3138
- static parse = effect.Effect.fn("SemVer.parse")(function* (input) {
3215
+ static parseResult(input) {
3139
3216
  const result = parseVersion(input);
3140
- if (!result.ok) return yield* new InvalidVersionError({
3217
+ if (!result.ok) return effect.Result.fail(new InvalidVersionError({
3141
3218
  input: result.input,
3142
3219
  position: result.position
3143
- });
3144
- return SemVer.make(result.value);
3145
- });
3220
+ }));
3221
+ return effect.Result.succeed(SemVer.make(result.value));
3222
+ }
3223
+ /**
3224
+ * Parse a strict SemVer 2.0.0 version string. Defined in terms of
3225
+ * {@link SemVer.parseResult} — synchronous callers can use that variant
3226
+ * directly.
3227
+ *
3228
+ * @param input - the version string to parse
3229
+ * @returns the parsed {@link SemVer}. Fails with {@link InvalidVersionError}
3230
+ * when `input` is not a valid version string.
3231
+ */
3232
+ static parse = effect.Effect.fn("SemVer.parse")((input) => effect.Effect.fromResult(SemVer.parseResult(input)));
3146
3233
  /**
3147
3234
  * Positional convenience constructor: `SemVer.of(1, 2, 3)`.
3148
3235
  *
@@ -3446,7 +3533,7 @@ var SemVerBump = class {
3446
3533
  }
3447
3534
  };
3448
3535
  //#endregion
3449
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/Comparator.js
3536
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/Comparator.js
3450
3537
  /**
3451
3538
  * Indicates that a string could not be parsed as a single comparator.
3452
3539
  *
@@ -3513,18 +3600,52 @@ var Comparator = class Comparator extends effect.Schema.Class("Comparator")({
3513
3600
  },
3514
3601
  encode: (parts) => effect.Effect.succeed(formatComparator(parts))
3515
3602
  })));
3516
- /** Parse a comparator string (e.g. `">=1.2.3"`). */
3517
- static parse = effect.Effect.fn("Comparator.parse")(function* (input) {
3603
+ /**
3604
+ * Parse a comparator string (e.g. `">=1.2.3"`), synchronously, returning a
3605
+ * `Result` instead of an `Effect`.
3606
+ *
3607
+ * @remarks
3608
+ * {@link Comparator.parse} is defined in terms of this function; the two
3609
+ * never diverge. Reach for the `Effect` variant inside Effect code — it
3610
+ * carries the `Comparator.parse` tracing span — and for this one at
3611
+ * synchronous boundaries.
3612
+ *
3613
+ * @example
3614
+ * ```ts
3615
+ * import { Comparator } from "@effected/semver";
3616
+ * import { Result } from "effect";
3617
+ *
3618
+ * const ok = Comparator.parseResult(">=1.2.3");
3619
+ * if (Result.isSuccess(ok)) {
3620
+ * console.log(ok.success.operator); // => ">="
3621
+ * }
3622
+ * ```
3623
+ *
3624
+ * @param input - the comparator string to parse
3625
+ * @returns a `Result` succeeding with the parsed {@link Comparator}, or
3626
+ * failing with {@link InvalidComparatorError}.
3627
+ */
3628
+ static parseResult(input) {
3518
3629
  const result = parseComparator(input);
3519
- if (!result.ok) return yield* new InvalidComparatorError({
3630
+ if (!result.ok) return effect.Result.fail(new InvalidComparatorError({
3520
3631
  input: result.input,
3521
3632
  position: result.position
3522
- });
3523
- return Comparator.make({
3633
+ }));
3634
+ return effect.Result.succeed(Comparator.make({
3524
3635
  operator: result.value.operator,
3525
3636
  version: SemVer.make(result.value.version)
3526
- });
3527
- });
3637
+ }));
3638
+ }
3639
+ /**
3640
+ * Parse a comparator string (e.g. `">=1.2.3"`). Defined in terms of
3641
+ * {@link Comparator.parseResult} — synchronous callers can use that variant
3642
+ * directly.
3643
+ *
3644
+ * @param input - the comparator string to parse
3645
+ * @returns the parsed {@link Comparator}. Fails with
3646
+ * {@link InvalidComparatorError}.
3647
+ */
3648
+ static parse = effect.Effect.fn("Comparator.parse")((input) => effect.Effect.fromResult(Comparator.parseResult(input)));
3528
3649
  /** Test whether a version satisfies this comparator. */
3529
3650
  test(version) {
3530
3651
  const cmp = version.compare(this.version);
@@ -3546,7 +3667,7 @@ var Comparator = class Comparator extends effect.Schema.Class("Comparator")({
3546
3667
  }
3547
3668
  };
3548
3669
  //#endregion
3549
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/normalize.js
3670
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/normalize.js
3550
3671
  const operatorWeight = (op) => {
3551
3672
  switch (op) {
3552
3673
  case ">=": return 0;
@@ -3577,7 +3698,7 @@ const normalizeComparatorSet = (set) => sortComparators(removeDuplicates(set));
3577
3698
  /** Normalize every comparator set in a range: sort and deduplicate each independently. */
3578
3699
  const normalizeSets = (sets) => sets.map(normalizeComparatorSet);
3579
3700
  //#endregion
3580
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/Range.js
3701
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/Range.js
3581
3702
  /**
3582
3703
  * Indicates that a string could not be parsed as a range expression.
3583
3704
  *
@@ -3637,18 +3758,51 @@ sets: effect.Schema.Array(effect.Schema.Array(Comparator)) }) {
3637
3758
  },
3638
3759
  encode: (parts) => effect.Effect.succeed(formatRange(parts.sets))
3639
3760
  })));
3640
- /** Parse a range expression and normalize its comparator sets. */
3641
- static parse = effect.Effect.fn("Range.parse")(function* (input) {
3761
+ /**
3762
+ * Parse a range expression and normalize its comparator sets,
3763
+ * synchronously, returning a `Result` instead of an `Effect`.
3764
+ *
3765
+ * @remarks
3766
+ * {@link Range.parse} is defined in terms of this function; the two never
3767
+ * diverge. Reach for the `Effect` variant inside Effect code — it carries
3768
+ * the `Range.parse` tracing span — and for this one at synchronous
3769
+ * boundaries.
3770
+ *
3771
+ * @example
3772
+ * ```ts
3773
+ * import { Range } from "@effected/semver";
3774
+ * import { Result } from "effect";
3775
+ *
3776
+ * const ok = Range.parseResult("^1.0.0");
3777
+ * if (Result.isSuccess(ok)) {
3778
+ * console.log(ok.success.toString()); // => ">=1.0.0 <2.0.0-0"
3779
+ * }
3780
+ * ```
3781
+ *
3782
+ * @param input - the range expression to parse
3783
+ * @returns a `Result` succeeding with the parsed {@link Range}, or failing
3784
+ * with {@link InvalidRangeError}.
3785
+ */
3786
+ static parseResult(input) {
3642
3787
  const result = parseRange$1(input);
3643
- if (!result.ok) return yield* new InvalidRangeError({
3788
+ if (!result.ok) return effect.Result.fail(new InvalidRangeError({
3644
3789
  input: result.input,
3645
3790
  position: result.position
3646
- });
3647
- return Range.make({ sets: normalizeSets(result.value).map((set) => set.map((c) => Comparator.make({
3791
+ }));
3792
+ return effect.Result.succeed(Range.make({ sets: normalizeSets(result.value).map((set) => set.map((c) => Comparator.make({
3648
3793
  operator: c.operator,
3649
3794
  version: SemVer.make(c.version)
3650
- }))) });
3651
- });
3795
+ }))) }));
3796
+ }
3797
+ /**
3798
+ * Parse a range expression and normalize its comparator sets. Defined in
3799
+ * terms of {@link Range.parseResult} — synchronous callers can use that
3800
+ * variant directly.
3801
+ *
3802
+ * @param input - the range expression to parse
3803
+ * @returns the parsed {@link Range}. Fails with {@link InvalidRangeError}.
3804
+ */
3805
+ static parse = effect.Effect.fn("Range.parse")((input) => effect.Effect.fromResult(Range.parseResult(input)));
3652
3806
  /**
3653
3807
  * Test whether a version satisfies a range; see {@link Range.test} for the
3654
3808
  * prerelease matching rule. Dual API.
@@ -3675,19 +3829,49 @@ sets: effect.Schema.Array(effect.Schema.Array(Comparator)) }) {
3675
3829
  static union = effect.Function.dual(2, (self, that) => Range.make({ sets: [...self.sets, ...that.sets] }));
3676
3830
  /**
3677
3831
  * Intersect two ranges via a cross-product of their comparator sets,
3678
- * keeping only satisfiable combinations. Fails with
3832
+ * keeping only satisfiable combinations, synchronously, returning a
3833
+ * `Result` instead of an `Effect`. Fails with
3679
3834
  * {@link UnsatisfiableConstraintError} when no satisfiable set remains —
3680
3835
  * an honest typed failure instead of an unsatisfiable range. Dual API.
3836
+ *
3837
+ * @remarks
3838
+ * {@link Range.intersect} is defined in terms of this function; the two
3839
+ * never diverge. Reach for the `Effect` variant inside Effect code — it
3840
+ * carries the `Range.intersect` tracing span — and for this one at
3841
+ * synchronous boundaries.
3842
+ *
3843
+ * @example
3844
+ * ```ts
3845
+ * import { Range } from "@effected/semver";
3846
+ * import { Result } from "effect";
3847
+ *
3848
+ * const a = Result.getOrThrow(Range.parseResult("^1.0.0"));
3849
+ * const b = Result.getOrThrow(Range.parseResult(">=1.5.0"));
3850
+ * const merged = Range.intersectResult(a, b);
3851
+ * if (Result.isSuccess(merged)) {
3852
+ * console.log(merged.success.toString()); // => ">=1.0.0 <2.0.0-0 >=1.5.0"
3853
+ * }
3854
+ * ```
3681
3855
  */
3682
- static intersect = effect.Function.dual(2, effect.Effect.fn("Range.intersect")(function* (self, that) {
3856
+ static intersectResult = effect.Function.dual(2, (self, that) => {
3683
3857
  const candidates = [];
3684
3858
  for (const setA of self.sets) for (const setB of that.sets) {
3685
3859
  const merged = [...setA, ...setB];
3686
3860
  if (isSetSatisfiable(merged)) candidates.push(merged);
3687
3861
  }
3688
- if (candidates.length === 0) return yield* new UnsatisfiableConstraintError({ constraints: [self, that] });
3689
- return Range.make({ sets: candidates });
3690
- }));
3862
+ if (candidates.length === 0) return effect.Result.fail(new UnsatisfiableConstraintError({ constraints: [self, that] }));
3863
+ return effect.Result.succeed(Range.make({ sets: candidates }));
3864
+ });
3865
+ /**
3866
+ * Intersect two ranges via a cross-product of their comparator sets,
3867
+ * keeping only satisfiable combinations. Fails with
3868
+ * {@link UnsatisfiableConstraintError} when no satisfiable set remains —
3869
+ * an honest typed failure instead of an unsatisfiable range. Dual API.
3870
+ *
3871
+ * Defined in terms of {@link Range.intersectResult} — synchronous callers
3872
+ * can use that variant directly.
3873
+ */
3874
+ static intersect = effect.Function.dual(2, effect.Effect.fn("Range.intersect")((self, that) => effect.Effect.fromResult(Range.intersectResult(self, that))));
3691
3875
  /**
3692
3876
  * Check whether every version matched by `sub` is also matched by `sup`.
3693
3877
  * Dual API.
@@ -3846,7 +4030,7 @@ const isComparatorSetSubset = (sub, sup) => {
3846
4030
  return true;
3847
4031
  };
3848
4032
  //#endregion
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
4033
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.3_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/DependencySpecifier.js
3850
4034
  /**
3851
4035
  * Indicates that a string could not be parsed as a valid dependency specifier.
3852
4036
  *
@@ -4053,7 +4237,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4053
4237
  FromString: fromString
4054
4238
  });
4055
4239
  //#endregion
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
4240
+ //#region ../../node_modules/.pnpm/@effected+npm@0.2.3_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/IntegrityHash.js
4057
4241
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4058
4242
  const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
4059
4243
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
@@ -4106,7 +4290,7 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4106
4290
  decode: decode$2
4107
4291
  });
4108
4292
  //#endregion
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
4293
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/ImporterDependency.js
4110
4294
  /**
4111
4295
  * One declared dependency of one workspace importer, as the lockfile records it.
4112
4296
  *
@@ -4134,7 +4318,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
4134
4318
  depType: DependencyField
4135
4319
  }) {};
4136
4320
  //#endregion
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
4321
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/LockfileImporter.js
4138
4322
  /**
4139
4323
  * One workspace importer's declared dependencies, as the lockfile records them.
4140
4324
  *
@@ -4158,7 +4342,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
4158
4342
  dependencies: effect.Schema.Array(ImporterDependency)
4159
4343
  }) {};
4160
4344
  //#endregion
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
4345
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/ResolvedPackage.js
4162
4346
  const EMPTY_DEPENDENCIES = {};
4163
4347
  /**
4164
4348
  * A package resolved from a lockfile.
@@ -4193,7 +4377,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
4193
4377
  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)))
4194
4378
  }) {};
4195
4379
  //#endregion
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
4380
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/WorkspaceDependency.js
4197
4381
  /**
4198
4382
  * A directed dependency edge between two workspace packages as recorded in
4199
4383
  * the lockfile.
@@ -4215,7 +4399,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
4215
4399
  constraint: effect.Schema.String
4216
4400
  }) {};
4217
4401
  //#endregion
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
4402
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/PnpmExtension.js
4219
4403
  /**
4220
4404
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
4221
4405
  * when the format is `"pnpm"`.
@@ -4240,7 +4424,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
4240
4424
  }))
4241
4425
  }) {};
4242
4426
  //#endregion
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
4427
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/LockfileFormat.js
4244
4428
  /**
4245
4429
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
4246
4430
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -4274,7 +4458,7 @@ const FILENAMES = {
4274
4458
  */
4275
4459
  const filenameFor = (format) => FILENAMES[format];
4276
4460
  //#endregion
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
4461
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/internal/shared.js
4278
4462
  /**
4279
4463
  * The four dependency sections of a manifest, in a stable order — the shared
4280
4464
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -4400,7 +4584,7 @@ const extractWorkspaceDeps = (workspaces, workspaceNames) => {
4400
4584
  return deps;
4401
4585
  };
4402
4586
  //#endregion
4403
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncNode.js
4587
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncNode.js
4404
4588
  /**
4405
4589
  * Discriminator values for JSONC AST node types: the JSON value types
4406
4590
  * (`string`/`number`/`boolean`/`null`), the structural types
@@ -4575,7 +4759,7 @@ function evaluateNode(node, depth) {
4575
4759
  }
4576
4760
  }
4577
4761
  //#endregion
4578
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/scanner.js
4762
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/scanner.js
4579
4763
  const isWhitespace = (ch) => ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch === 65279;
4580
4764
  const isLineBreak$1 = (ch) => ch === 10 || ch === 13 || ch === 8232 || ch === 8233;
4581
4765
  const isDigit$1 = (ch) => ch >= 48 && ch <= 57;
@@ -4871,7 +5055,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
4871
5055
  };
4872
5056
  };
4873
5057
  //#endregion
4874
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/skip.js
5058
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/skip.js
4875
5059
  /**
4876
5060
  * Iteratively consume the value beginning at the cursor's current token and
4877
5061
  * return its tight end offset (excludes trailing whitespace/comments).
@@ -4901,7 +5085,7 @@ const skipBalancedValue = (cursor) => {
4901
5085
  return end;
4902
5086
  };
4903
5087
  //#endregion
4904
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/parser.js
5088
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/parser.js
4905
5089
  /**
4906
5090
  * The public parse-error code vocabulary. The facade builds its `@public`
4907
5091
  * `JsoncParseErrorCode` schema from this array; the parser produces these codes
@@ -5314,7 +5498,7 @@ const parseTree$2 = (text, flags) => {
5314
5498
  };
5315
5499
  };
5316
5500
  //#endregion
5317
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/Jsonc.js
5501
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/Jsonc.js
5318
5502
  /**
5319
5503
  * The single public parse-error code vocabulary, appearing as the `code` field
5320
5504
  * of {@link JsoncParseErrorDetail}.
@@ -5539,9 +5723,57 @@ var Jsonc = class Jsonc {
5539
5723
  */
5540
5724
  static parse = effect.Effect.fn("Jsonc.parse")((text, options) => effect.Effect.fromResult(Jsonc.parseResult(text, options)));
5541
5725
  /**
5726
+ * Parse JSONC into an immutable {@link JsoncNode} AST, synchronously,
5727
+ * returning a `Result` instead of an `Effect`. `Option.none()` for empty
5728
+ * input (with `allowEmptyContent`); the aggregate {@link JsoncParseError}
5729
+ * for malformed input. Pure — parsing is fundamentally synchronous, so
5730
+ * non-Effect consumers (a plain config loader, a build script) can call
5731
+ * this directly instead of wrapping
5732
+ * `Effect.runSync(Effect.result(Jsonc.parseTree(text)))`.
5733
+ *
5734
+ * @remarks
5735
+ * {@link Jsonc.parseTree} is defined in terms of this function; the two
5736
+ * never diverge. Reach for the `Effect` variant inside Effect code — it
5737
+ * carries the `Jsonc.parseTree` tracing span — and for this one at
5738
+ * synchronous boundaries.
5739
+ *
5740
+ * @example
5741
+ * ```ts
5742
+ * import { Jsonc } from "@effected/jsonc";
5743
+ * import { Option, Result } from "effect";
5744
+ *
5745
+ * const ok = Jsonc.parseTreeResult('{ "port": 3000 // dev\n }');
5746
+ * if (Result.isSuccess(ok) && Option.isSome(ok.success)) {
5747
+ * console.log(ok.success.value.type); // => "object"
5748
+ * }
5749
+ *
5750
+ * const bad = Jsonc.parseTreeResult("{ bad }");
5751
+ * if (Result.isFailure(bad)) {
5752
+ * console.log(bad.failure._tag); // => "JsoncParseError"
5753
+ * }
5754
+ * ```
5755
+ *
5756
+ * @param text - The JSONC source to parse.
5757
+ * @param options - Optional {@link JsoncParseOptions}; defaults apply for
5758
+ * omitted fields.
5759
+ * @returns A `Result` succeeding with `Option.some(root)` (or
5760
+ * `Option.none()` for empty input), or failing with the aggregate
5761
+ * {@link JsoncParseError}.
5762
+ */
5763
+ static parseTreeResult(text, options) {
5764
+ const { root, errors } = parseTree$2(text, toFlags(options));
5765
+ if (errors.length > 0) return effect.Result.fail(new JsoncParseError({
5766
+ errors: toDetails(text, errors),
5767
+ input: text
5768
+ }));
5769
+ return effect.Result.succeed(root !== void 0 ? effect.Option.some(root) : effect.Option.none());
5770
+ }
5771
+ /**
5542
5772
  * Parse JSONC into an immutable {@link JsoncNode} AST. `Option.none()` for
5543
5773
  * empty input (with `allowEmptyContent`); the aggregate
5544
- * {@link JsoncParseError} for malformed input.
5774
+ * {@link JsoncParseError} for malformed input. Defined in terms of
5775
+ * {@link Jsonc.parseTreeResult} — synchronous callers can use that variant
5776
+ * directly.
5545
5777
  *
5546
5778
  * @param text - The JSONC source to parse.
5547
5779
  * @param options - Optional {@link JsoncParseOptions}; defaults apply for
@@ -5550,14 +5782,7 @@ var Jsonc = class Jsonc {
5550
5782
  * `Option.none()` for empty input), or fails with the aggregate
5551
5783
  * {@link JsoncParseError}.
5552
5784
  */
5553
- static parseTree = effect.Effect.fn("Jsonc.parseTree")(function* (text, options) {
5554
- const { root, errors } = parseTree$2(text, toFlags(options));
5555
- if (errors.length > 0) return yield* new JsoncParseError({
5556
- errors: toDetails(text, errors),
5557
- input: text
5558
- });
5559
- return root !== void 0 ? effect.Option.some(root) : effect.Option.none();
5560
- });
5785
+ static parseTree = effect.Effect.fn("Jsonc.parseTree")((text, options) => effect.Effect.fromResult(Jsonc.parseTreeResult(text, options)));
5561
5786
  /**
5562
5787
  * Stringify a plain JavaScript value as JSON text, synchronously, returning
5563
5788
  * a `Result` instead of an `Effect`. With no options the output is
@@ -5877,7 +6102,7 @@ var JsoncEdit = class extends effect.Schema.Class("JsoncEdit")({
5877
6102
  }
5878
6103
  };
5879
6104
  //#endregion
5880
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/navigate.js
6105
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/navigate.js
5881
6106
  /**
5882
6107
  * Resolve `path` against `text`, returning where the target is (or where it
5883
6108
  * would be inserted). `path` must be non-empty — the whole-document case is
@@ -6004,7 +6229,7 @@ function navigate(text, path) {
6004
6229
  return { _tag: "NoOp" };
6005
6230
  }
6006
6231
  //#endregion
6007
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncModifier.js
6232
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncModifier.js
6008
6233
  /**
6009
6234
  * Raised when `JsoncModifier.modify` cannot navigate the requested path: the
6010
6235
  * value at `depth` is not the container kind (`expected`) the next path segment
@@ -6132,7 +6357,7 @@ var JsoncModifier = class {
6132
6357
  });
6133
6358
  };
6134
6359
  //#endregion
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
6360
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/internal/bun.js
6136
6361
  const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6137
6362
  const BunWorkspaceEntry = effect.Schema.Struct({
6138
6363
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6225,7 +6450,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
6225
6450
  };
6226
6451
  });
6227
6452
  //#endregion
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
6453
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/internal/npm.js
6229
6454
  const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6230
6455
  const NpmPackageEntry = effect.Schema.Struct({
6231
6456
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6323,7 +6548,7 @@ const toFields$2 = (raw) => effect.Effect.gen(function* () {
6323
6548
  };
6324
6549
  });
6325
6550
  //#endregion
6326
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlNode.js
6551
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlNode.js
6327
6552
  /**
6328
6553
  * YAML scalar presentation styles.
6329
6554
  *
@@ -6343,6 +6568,16 @@ const ScalarStyle = effect.Schema.Literals([
6343
6568
  */
6344
6569
  const CollectionStyle = effect.Schema.Literals(["block", "flow"]);
6345
6570
  /**
6571
+ * Quote characters available to the stringifier's plain-scalar fallback: the
6572
+ * style a `plain`-styled scalar is rendered in when it turns out to require
6573
+ * quoting. Referenced by the `quoteStyle` field of `YamlStringifyOptions`;
6574
+ * unlike `ScalarStyle` it is a stringify-option vocabulary, never a property
6575
+ * of a composed node.
6576
+ *
6577
+ * @public
6578
+ */
6579
+ const QuoteStyle = effect.Schema.Literals(["single", "double"]);
6580
+ /**
6346
6581
  * Block-scalar chomping indicators (`-` strip, default clip, `+` keep).
6347
6582
  * Referenced by the {@link YamlScalar} `chomp` field schema.
6348
6583
  *
@@ -6715,7 +6950,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
6715
6950
  return null;
6716
6951
  }
6717
6952
  //#endregion
6718
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/diagnostics.js
6953
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/diagnostics.js
6719
6954
  /** Error codes emitted by the lexer stage. */
6720
6955
  const YAML_LEX_ERROR_CODES = [
6721
6956
  "UnexpectedCharacter",
@@ -6793,7 +7028,7 @@ function isFatalCode(code) {
6793
7028
  return FATAL_CODES.has(code);
6794
7029
  }
6795
7030
  //#endregion
6796
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlDiagnostic.js
7031
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlDiagnostic.js
6797
7032
  /**
6798
7033
  * Error codes emitted by the lexer stage.
6799
7034
  *
@@ -6914,7 +7149,7 @@ function lineChar(text, offset) {
6914
7149
  };
6915
7150
  }
6916
7151
  //#endregion
6917
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/anchors.js
7152
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/anchors.js
6918
7153
  /**
6919
7154
  * Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
6920
7155
  * Aliases represent references to existing anchored nodes and cannot have their own anchors.
@@ -7007,7 +7242,7 @@ function collectAnchors(node, anchors) {
7007
7242
  }
7008
7243
  }
7009
7244
  //#endregion
7010
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/lexer.js
7245
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/lexer.js
7011
7246
  /**
7012
7247
  * Create a new YAML scanner for the given source text.
7013
7248
  *
@@ -7964,7 +8199,7 @@ function lexAll(text) {
7964
8199
  return tokens;
7965
8200
  }
7966
8201
  //#endregion
7967
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/cst-parser.js
8202
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/cst-parser.js
7968
8203
  /**
7969
8204
  * Hardening: cap CST nesting so hostile inputs cannot overflow the stack
7970
8205
  * while the tree is being BUILT. Set slightly above the composer's
@@ -8676,7 +8911,7 @@ function parseCSTAll(text) {
8676
8911
  return parseDocuments(lexAll(text), text);
8677
8912
  }
8678
8913
  //#endregion
8679
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/state.js
8914
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/state.js
8680
8915
  let lineStartsText;
8681
8916
  let lineStartsCache = [];
8682
8917
  function getLineStarts(text) {
@@ -8782,7 +9017,7 @@ function exitNesting(state) {
8782
9017
  state.depth--;
8783
9018
  }
8784
9019
  //#endregion
8785
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/tags.js
9020
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/tags.js
8786
9021
  /**
8787
9022
  * Resolve a tag shorthand using the document's %TAG directives.
8788
9023
  * For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
@@ -8868,7 +9103,7 @@ function validateTagHandlesInDocument(docCst, state) {
8868
9103
  }
8869
9104
  }
8870
9105
  //#endregion
8871
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/scalars.js
9106
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/scalars.js
8872
9107
  const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
8873
9108
  const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
8874
9109
  const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
@@ -9746,7 +9981,7 @@ function shouldPreserveRaw(rawValue, value) {
9746
9981
  return false;
9747
9982
  }
9748
9983
  //#endregion
9749
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/block.js
9984
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/block.js
9750
9985
  /**
9751
9986
  * Compose a block map from its CST children, with an optional external first key.
9752
9987
  *
@@ -10894,7 +11129,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
10894
11129
  return map;
10895
11130
  }
10896
11131
  //#endregion
10897
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/flow.js
11132
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/flow.js
10898
11133
  /**
10899
11134
  * Validate that flow collection entries are separated by commas.
10900
11135
  *
@@ -11286,7 +11521,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
11286
11521
  return seq;
11287
11522
  }
11288
11523
  //#endregion
11289
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/document.js
11524
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/document.js
11290
11525
  /** The flow-composer dispatch wired into every state this module creates. */
11291
11526
  const FLOW = {
11292
11527
  composeFlowMap,
@@ -11952,7 +12187,7 @@ function composeAllDocuments(text, options) {
11952
12187
  };
11953
12188
  }
11954
12189
  //#endregion
11955
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/fold.js
12190
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/fold.js
11956
12191
  /**
11957
12192
  * Column-based line folding for a single logical scalar line (YAML 1.2 flow
11958
12193
  * folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
@@ -12188,7 +12423,7 @@ function renderBlockFolded(s, indent) {
12188
12423
  return `>${indentIndicator}${chomp}\n${outputLines.join("\n")}`;
12189
12424
  }
12190
12425
  //#endregion
12191
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/stringifier.js
12426
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/stringifier.js
12192
12427
  /**
12193
12428
  * Thrown by the stringifier on its failure paths (circular references). The
12194
12429
  * facade catches this and materializes the public stringify error.
@@ -12294,7 +12529,10 @@ function requiresQuoting(s, ignoreType = false) {
12294
12529
  if (s.includes(" #") || s.includes(" #")) return true;
12295
12530
  const last = s[s.length - 1];
12296
12531
  if (last === " " || last === " ") return true;
12297
- for (let i = 0; i < s.length; i++) if (isControlChar(s.charCodeAt(i))) return true;
12532
+ for (let i = 0; i < s.length; i++) {
12533
+ const code = s.charCodeAt(i);
12534
+ if (code === 9 || code === 13 || isControlChar(code)) return true;
12535
+ }
12298
12536
  return false;
12299
12537
  }
12300
12538
  /**
@@ -12351,11 +12589,13 @@ function renderSingleQuoted(s) {
12351
12589
  *
12352
12590
  * Multi-line strings are routed to block styles regardless of the requested
12353
12591
  * style (except double-quoted). For single-line strings, plain style delegates
12354
- * to {@link requiresQuoting} and falls back to double-quoted when the value
12355
- * would be ambiguous. Block literal and block folded styles are always
12356
- * accepted for single-line strings even though the output is unusual.
12592
+ * to {@link requiresQuoting} and falls back to `quoteStyle` (single-quoted by
12593
+ * default, double-quoted when the caller asked for it) or to double-quoted
12594
+ * regardless when the value needs YAML escapes single quotes cannot express.
12595
+ * Block literal and block folded styles are always accepted for single-line
12596
+ * strings even though the output is unusual.
12357
12597
  */
12358
- function renderString(s, style, indent, ignoreType = false, canonical = false, explicitChomp, parentPosition) {
12598
+ function renderString(s, style, indent, ignoreType = false, canonical = false, explicitChomp, parentPosition, quoteStyle = "single") {
12359
12599
  if (s.includes("\n")) {
12360
12600
  let hasControl = false;
12361
12601
  for (let i = 0; i < s.length; i++) {
@@ -12389,7 +12629,7 @@ function renderString(s, style, indent, ignoreType = false, canonical = false, e
12389
12629
  if (requiresQuoting(s, ignoreType)) {
12390
12630
  if (s.includes(" ") || s.includes("\r")) return renderDoubleQuoted(s, canonical);
12391
12631
  for (let i = 0; i < s.length; i++) if (isControlChar(s.charCodeAt(i))) return renderDoubleQuoted(s, canonical);
12392
- return renderSingleQuoted(s);
12632
+ return quoteStyle === "double" ? renderDoubleQuoted(s, canonical) : renderSingleQuoted(s);
12393
12633
  }
12394
12634
  return s;
12395
12635
  case "single-quoted": return renderSingleQuoted(s);
@@ -12429,6 +12669,7 @@ function createContext(options) {
12429
12669
  defaultCollectionStyle: options?.defaultCollectionStyle ?? "block",
12430
12670
  sortKeys: options?.sortKeys ?? false,
12431
12671
  indentSequences: options?.indentSequences ?? false,
12672
+ quoteStyle: options?.quoteStyle ?? "single",
12432
12673
  forceDefaultStyles: options?.forceDefaultStyles ?? false,
12433
12674
  seen: /* @__PURE__ */ new Set()
12434
12675
  };
@@ -12448,7 +12689,7 @@ function stringifyLines(value, ctx, depth, allowFold = true) {
12448
12689
  if (typeof value === "bigint") return [value.toString()];
12449
12690
  if (typeof value === "string") {
12450
12691
  const indentStr = " ".repeat(ctx.indent);
12451
- const rendered = renderString(value, ctx.defaultScalarStyle, indentStr, false, ctx.forceDefaultStyles);
12692
+ const rendered = renderString(value, ctx.defaultScalarStyle, indentStr, false, ctx.forceDefaultStyles, void 0, void 0, ctx.quoteStyle);
12452
12693
  return (allowFold && ctx.lineWidth > 0 ? foldRenderedScalar(rendered, indentStr, ctx.lineWidth) : rendered).split("\n");
12453
12694
  }
12454
12695
  if (Array.isArray(value)) {
@@ -12513,10 +12754,11 @@ function stringifyObjectLines(obj, ctx, depth) {
12513
12754
  const keys = Object.keys(obj);
12514
12755
  if (keys.length === 0) return ["{}"];
12515
12756
  if (ctx.sortKeys) keys.sort();
12757
+ const renderPlainKey = (k) => renderString(k, "plain", "", false, false, void 0, void 0, ctx.quoteStyle);
12516
12758
  if (ctx.defaultCollectionStyle === "flow") return [`{${keys.map((k) => {
12517
- return `${renderString(k, "plain", "")}: ${stringifyLines(obj[k], ctx, depth + 1, false).join(" ")}`;
12759
+ return `${renderPlainKey(k)}: ${stringifyLines(obj[k], ctx, depth + 1, false).join(" ")}`;
12518
12760
  }).join(", ")}}`];
12519
- const renderKey = (k) => k.includes("\n") ? renderDoubleQuoted(k, ctx.forceDefaultStyles) : renderString(k, "plain", "");
12761
+ const renderKey = (k) => k.includes("\n") ? renderDoubleQuoted(k, ctx.forceDefaultStyles) : renderPlainKey(k);
12520
12762
  const pad = " ".repeat(ctx.indent);
12521
12763
  const lines = [];
12522
12764
  for (const k of keys) {
@@ -12564,7 +12806,7 @@ effect.Schema.Class("YamlStringifyOptions")({
12564
12806
  * (`>`) scalars at approximately that column, never block-literal (`|`).
12565
12807
  *
12566
12808
  * Takes effect only through {@link Yaml.stringify} and
12567
- * {@link Yaml.stringifySync} — the two entry points that accept these
12809
+ * {@link Yaml.stringifyResult} — the two entry points that accept these
12568
12810
  * options on the value path. The schema factories ({@link Yaml.fromString},
12569
12811
  * {@link Yaml.schema}, {@link Yaml.YamlFromString}) encode with default
12570
12812
  * stringify options (`lineWidth` `0`), so their output never folds. The
@@ -12577,6 +12819,17 @@ effect.Schema.Class("YamlStringifyOptions")({
12577
12819
  defaultCollectionStyle: effect.Schema.optionalKey(CollectionStyle),
12578
12820
  sortKeys: effect.Schema.optionalKey(effect.Schema.Boolean),
12579
12821
  indentSequences: effect.Schema.optionalKey(effect.Schema.Boolean),
12822
+ /**
12823
+ * Quote style used when a `plain`-styled scalar requires quoting. Default
12824
+ * `"single"` — the released byte-compatible behavior. `"double"` renders
12825
+ * the same scalars double-quoted instead, matching the `yaml` npm
12826
+ * package's `singleQuote: false` output.
12827
+ *
12828
+ * Affects only the plain fallback: scalars that need no quoting stay
12829
+ * plain, and an explicit `defaultScalarStyle` of `"single-quoted"` or
12830
+ * `"double-quoted"` is unaffected.
12831
+ */
12832
+ quoteStyle: effect.Schema.optionalKey(QuoteStyle),
12580
12833
  finalNewline: effect.Schema.optionalKey(effect.Schema.Boolean),
12581
12834
  forceDefaultStyles: effect.Schema.optionalKey(effect.Schema.Boolean)
12582
12835
  });
@@ -12626,6 +12879,7 @@ const toStringifyInput = (options) => options === void 0 ? {} : {
12626
12879
  defaultCollectionStyle: options.defaultCollectionStyle,
12627
12880
  sortKeys: options.sortKeys,
12628
12881
  indentSequences: options.indentSequences,
12882
+ quoteStyle: options.quoteStyle,
12629
12883
  finalNewline: options.finalNewline,
12630
12884
  forceDefaultStyles: options.forceDefaultStyles
12631
12885
  };
@@ -12683,7 +12937,7 @@ const stringifyDefectToError = (defect, value) => {
12683
12937
  * mode (fatal diagnostics, duplicate keys, a "billion laughs" blow-up) yields
12684
12938
  * a `Failure` carrying a typed {@link YamlParseError} — never a throw.
12685
12939
  */
12686
- const parseSyncImpl = (text, options) => {
12940
+ const parseResultImpl = (text, options) => {
12687
12941
  const doc = composeFirstDocument(text, toParseInput(options));
12688
12942
  const failures = failureRecords(doc, options?.uniqueKeys ?? true);
12689
12943
  if (failures.length > 0) return effect.Result.fail(new YamlParseError({
@@ -12704,7 +12958,7 @@ const parseSyncImpl = (text, options) => {
12704
12958
  * recursion budget yields a `Failure` carrying a typed {@link YamlStringifyError},
12705
12959
  * never a thrown defect.
12706
12960
  */
12707
- const stringifySyncImpl = (value, options) => {
12961
+ const stringifyResultImpl = (value, options) => {
12708
12962
  try {
12709
12963
  return effect.Result.succeed(stringifyValue(value, toStringifyInput(options)));
12710
12964
  } catch (defect) {
@@ -12781,17 +13035,11 @@ var Yaml = class Yaml {
12781
13035
  * resolved size grows exponentially relative to `maxAliasCount`) also
12782
13036
  * fails through {@link YamlParseError} with an `AliasCountExceeded`
12783
13037
  * diagnostic, never as an unhandled defect.
13038
+ *
13039
+ * Defined in terms of {@link Yaml.parseResult} — synchronous callers can
13040
+ * use that variant directly.
12784
13041
  */
12785
- static parse = effect.Effect.fn("Yaml.parse")(function* (text, options) {
12786
- const doc = composeFirstDocument(text, toParseInput(options));
12787
- const failures = failureRecords(doc, options?.uniqueKeys ?? true);
12788
- if (failures.length > 0) return yield* new YamlParseError({
12789
- diagnostics: toDiagnostics(text, failures),
12790
- input: text
12791
- });
12792
- const anchors = /* @__PURE__ */ new Map();
12793
- return yield* extractDocumentValue(doc.contents, anchors, options?.maxAliasCount ?? 100, text);
12794
- });
13042
+ static parse = effect.Effect.fn("Yaml.parse")((text, options) => effect.Effect.fromResult(Yaml.parseResult(text, options)));
12795
13043
  /**
12796
13044
  * Parse a multi-document YAML stream into an array of plain JavaScript
12797
13045
  * values (one per document, in order). Any fatal diagnostic in any
@@ -12824,6 +13072,15 @@ var Yaml = class Yaml {
12824
13072
  * or on a value nested deeper than the stringifier's recursion budget
12825
13073
  * (`NestingDepthExceeded`) — both surface through the typed error channel
12826
13074
  * rather than as an unhandled stack-overflow defect.
13075
+ *
13076
+ * @remarks
13077
+ * A `"<<"` object key is emitted **quoted** (`'<<': …`). This is the
13078
+ * opposite of the document path ({@link YamlFormat.format} and
13079
+ * `YamlDocument#stringify`), which leaves a parsed plain `<<` key unquoted
13080
+ * so it keeps its merge-key meaning, and the asymmetry is deliberate: a
13081
+ * `"<<"` key on a plain JavaScript object is an ordinary string key that
13082
+ * never carried merge semantics, so emitting it plain would silently turn
13083
+ * ordinary data into a merge directive.
12827
13084
  */
12828
13085
  static stringify = effect.Effect.fn("Yaml.stringify")(function* (value, options) {
12829
13086
  return yield* stringifyOrFail(value, options);
@@ -12831,8 +13088,14 @@ var Yaml = class Yaml {
12831
13088
  /**
12832
13089
  * Synchronous single-document parse, returning a `Result` instead of
12833
13090
  * an `Effect`. A pure escape hatch for config-time callers that cannot
12834
- * `await` an Effect (a `vitest.config.ts` is the motivating case): it runs
12835
- * the same engine as {@link Yaml.parse} inline.
13091
+ * `await` an Effect (a `vitest.config.ts` is the motivating case).
13092
+ *
13093
+ * @remarks
13094
+ * This is the package's single parse path. {@link Yaml.parse} is defined in
13095
+ * terms of it (`Effect.fromResult` behind the named span), so the two
13096
+ * variants cannot diverge. Reach for the `Effect` variant inside Effect
13097
+ * code — it carries the `Yaml.parse` tracing span — and for this one at
13098
+ * synchronous boundaries.
12836
13099
  *
12837
13100
  * Preserves the package contract — malformed and adversarial input fails
12838
13101
  * typed, never as a defect. Fatal diagnostics, duplicate keys and a
@@ -12844,7 +13107,7 @@ var Yaml = class Yaml {
12844
13107
  * import { Yaml } from "@effected/yaml";
12845
13108
  * import { Result } from "effect";
12846
13109
  *
12847
- * const result = Yaml.parseSync("name: Alice\nage: 30");
13110
+ * const result = Yaml.parseResult("name: Alice\nage: 30");
12848
13111
  * if (Result.isSuccess(result)) {
12849
13112
  * result.success; // { name: "Alice", age: 30 }
12850
13113
  * } else {
@@ -12854,8 +13117,8 @@ var Yaml = class Yaml {
12854
13117
  *
12855
13118
  * @public
12856
13119
  */
12857
- static parseSync(text, options) {
12858
- return parseSyncImpl(text, options);
13120
+ static parseResult(text, options) {
13121
+ return parseResultImpl(text, options);
12859
13122
  }
12860
13123
  /**
12861
13124
  * Synchronous stringify, returning a `Result` instead of an `Effect`.
@@ -12872,7 +13135,7 @@ var Yaml = class Yaml {
12872
13135
  * import { Yaml } from "@effected/yaml";
12873
13136
  * import { Result } from "effect";
12874
13137
  *
12875
- * const result = Yaml.stringifySync({ name: "Alice" });
13138
+ * const result = Yaml.stringifyResult({ name: "Alice" });
12876
13139
  * if (Result.isFailure(result)) {
12877
13140
  * result.failure; // YamlStringifyError
12878
13141
  * } else {
@@ -12882,8 +13145,8 @@ var Yaml = class Yaml {
12882
13145
  *
12883
13146
  * @public
12884
13147
  */
12885
- static stringifySync(value, options) {
12886
- return stringifySyncImpl(value, options);
13148
+ static stringifyResult(value, options) {
13149
+ return stringifyResultImpl(value, options);
12887
13150
  }
12888
13151
  /**
12889
13152
  * Strip comments from YAML text. Without `replaceCh`, comment characters
@@ -13109,7 +13372,7 @@ function deepEqualValues(a, b) {
13109
13372
  return false;
13110
13373
  }
13111
13374
  //#endregion
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
13375
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/internal/documents.js
13113
13376
  /**
13114
13377
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
13115
13378
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -13179,7 +13442,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
13179
13442
  };
13180
13443
  });
13181
13444
  //#endregion
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
13445
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/internal/pnpm.js
13183
13446
  const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
13184
13447
  specifier: effect.Schema.String,
13185
13448
  version: effect.Schema.String
@@ -13305,7 +13568,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
13305
13568
  };
13306
13569
  });
13307
13570
  //#endregion
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
13571
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/internal/yarn.js
13309
13572
  const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
13310
13573
  const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
13311
13574
  const YarnEntry = effect.Schema.Struct({
@@ -13428,7 +13691,7 @@ const cleanYarnDeps = (deps) => {
13428
13691
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
13429
13692
  };
13430
13693
  //#endregion
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
13694
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/Lockfile.js
13432
13695
  const EMPTY_IMPORTERS = [];
13433
13696
  /**
13434
13697
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -13672,7 +13935,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
13672
13935
  }
13673
13936
  };
13674
13937
  //#endregion
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
13938
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/LockfileIntegrity.js
13676
13939
  /**
13677
13940
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
13678
13941
  * lockfile against: a package name plus the four optional dependency maps.
@@ -13788,7 +14051,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
13788
14051
  }
13789
14052
  };
13790
14053
  //#endregion
13791
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Dependency.js
14054
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Dependency.js
13792
14055
  /**
13793
14056
  * A resolved dependency entry pairing a package name with its version
13794
14057
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -13852,7 +14115,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
13852
14115
  }
13853
14116
  };
13854
14117
  //#endregion
13855
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/DevEngines.js
14118
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/DevEngines.js
13856
14119
  /**
13857
14120
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
13858
14121
  *
@@ -14877,7 +15140,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14877
15140
  };
14878
15141
  }));
14879
15142
  //#endregion
14880
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/License.js
15143
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/License.js
14881
15144
  var import_spdx_expression_parse = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
14882
15145
  var scan = require_scan$1();
14883
15146
  var parse = require_parse$2();
@@ -14924,7 +15187,7 @@ const isValidSpdx = (value) => {
14924
15187
  */
14925
15188
  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"));
14926
15189
  //#endregion
14927
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageManager.js
15190
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageManager.js
14928
15191
  const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
14929
15192
  /**
14930
15193
  * The `packageManager` field only ever carries corepack's `<algo>.<hex>`
@@ -14982,7 +15245,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
14982
15245
  }
14983
15246
  };
14984
15247
  //#endregion
14985
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageName.js
15248
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageName.js
14986
15249
  /**
14987
15250
  * Indicates that a string could not be used as a valid npm package name.
14988
15251
  *
@@ -15040,7 +15303,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
15040
15303
  isScoped
15041
15304
  });
15042
15305
  //#endregion
15043
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Person.js
15306
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Person.js
15044
15307
  const parsePersonString = (input) => {
15045
15308
  const emailMatch = input.match(/<([^>]+)>/);
15046
15309
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -15054,8 +15317,56 @@ const parsePersonString = (input) => {
15054
15317
  ...urlMatch !== null ? { url: urlMatch[1] } : {}
15055
15318
  });
15056
15319
  };
15320
+ const serializePerson = (person) => {
15321
+ let result = person.name;
15322
+ if (person.email !== void 0) result += ` <${person.email}>`;
15323
+ if (person.url !== void 0) result += ` (${person.url})`;
15324
+ return result;
15325
+ };
15326
+ const wireForms = /* @__PURE__ */ new WeakMap();
15327
+ const rememberWire = (person, wire) => {
15328
+ wireForms.set(person, wire);
15329
+ return person;
15330
+ };
15331
+ const KNOWN_KEYS = /* @__PURE__ */ new Set([
15332
+ "name",
15333
+ "email",
15334
+ "url"
15335
+ ]);
15336
+ const sameRest = (a, b) => JSON.stringify(a ?? {}) === JSON.stringify(b ?? {});
15337
+ const isFaithful = (wire, person) => {
15338
+ if (typeof wire === "string") {
15339
+ const parsed = parsePersonString(wire);
15340
+ return parsed.name === person.name && parsed.email === person.email && parsed.url === person.url;
15341
+ }
15342
+ const rest = restOf(wire);
15343
+ return wire.name === person.name && wire.email === person.email && wire.url === person.url && sameRest(rest, person.rest);
15344
+ };
15345
+ const PersonFields = effect.Schema.Struct({
15346
+ name: effect.Schema.String,
15347
+ email: effect.Schema.optionalKey(effect.Schema.String),
15348
+ url: effect.Schema.optionalKey(effect.Schema.String)
15349
+ });
15350
+ const decodePersonFields = effect.Schema.decodeUnknownEffect(PersonFields);
15351
+ const restOf = (raw) => {
15352
+ const rest = {};
15353
+ for (const [key, value] of Object.entries(raw)) if (!KNOWN_KEYS.has(key)) rest[key] = value;
15354
+ return rest;
15355
+ };
15356
+ const encodePersonObject = (person) => {
15357
+ const wire = wireForms.get(person);
15358
+ if (wire !== void 0 && typeof wire !== "string" && isFaithful(wire, person)) return wire;
15359
+ const known = { name: person.name };
15360
+ if (person.email !== void 0) known.email = person.email;
15361
+ if (person.url !== void 0) known.url = person.url;
15362
+ return {
15363
+ ...person.rest ?? {},
15364
+ ...known
15365
+ };
15366
+ };
15057
15367
  /**
15058
- * A structured person object with `name` and optional `email` / `url`.
15368
+ * A structured person object with `name`, optional `email` / `url`, and a
15369
+ * `rest` catch-all preserving any additional keys across a read/write cycle.
15059
15370
  *
15060
15371
  * @public
15061
15372
  */
@@ -15065,29 +15376,77 @@ var Person = class Person extends effect.Schema.Class("Person")({
15065
15376
  /** The optional email address. */
15066
15377
  email: effect.Schema.optionalKey(effect.Schema.String),
15067
15378
  /** The optional homepage URL. */
15068
- url: effect.Schema.optionalKey(effect.Schema.String)
15379
+ url: effect.Schema.optionalKey(effect.Schema.String),
15380
+ /** Any additional keys, preserved verbatim and flattened back on encode. */
15381
+ rest: effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown))
15069
15382
  }) {
15383
+ /**
15384
+ * The object wire codec: an open JSON object ↔ a {@link Person}, partitioning
15385
+ * unknown keys into `rest` and flattening them back on encode so the on-disk
15386
+ * shape never carries a literal `rest` key.
15387
+ */
15388
+ static schema = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown).pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(Person), effect.SchemaTransformation.transformOrFail({
15389
+ decode: (raw) => decodePersonFields(raw).pipe(effect.Effect.mapError((error) => error.issue), effect.Effect.map((fields) => {
15390
+ const rest = restOf(raw);
15391
+ return rememberWire(Person.make({
15392
+ ...fields,
15393
+ ...Object.keys(rest).length > 0 ? { rest } : {}
15394
+ }), raw);
15395
+ })),
15396
+ encode: (person) => effect.Effect.succeed(encodePersonObject(person))
15397
+ })));
15070
15398
  /**
15071
15399
  * Schema transformation between the `"Name <email> (url)"` shorthand string
15072
- * and a {@link Person}.
15400
+ * and a {@link Person}. Decoding remembers the input text so that encoding
15401
+ * reproduces it verbatim; see {@link Person.wireStringOf}.
15073
15402
  */
15074
15403
  static FromString = effect.Schema.String.pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(Person), effect.SchemaTransformation.transform({
15075
- decode: (input) => parsePersonString(input),
15404
+ decode: (input) => rememberWire(parsePersonString(input), input),
15076
15405
  encode: (person) => {
15077
- let result = person.name;
15078
- if (person.email !== void 0) result += ` <${person.email}>`;
15079
- if (person.url !== void 0) result += ` (${person.url})`;
15080
- return result;
15406
+ const wire = wireForms.get(person);
15407
+ return typeof wire === "string" && isFaithful(wire, person) ? wire : serializePerson(person);
15081
15408
  }
15082
15409
  })));
15083
15410
  /**
15084
15411
  * The `author` / `contributors` value: either the shorthand string or the
15085
15412
  * structured object, always decoded to a {@link Person}.
15413
+ *
15414
+ * The wire form is preserved across a round trip — a person read from the
15415
+ * shorthand string encodes back to that string, byte for byte, and one read
15416
+ * from an object encodes back to an object with its unknown keys intact.
15417
+ * Formatting a manifest therefore never rewrites one legal encoding into the
15418
+ * other.
15419
+ *
15420
+ * Provenance belongs to the instance, so a person that is *rebuilt* (rather
15421
+ * than carried through unchanged) has none and encodes in the canonical
15422
+ * object form. Editing an unrelated field of the surrounding `Package`
15423
+ * carries the same person instance through and preserves its encoding.
15086
15424
  */
15087
- static FromValue = effect.Schema.Union([Person, Person.FromString]);
15425
+ static FromValue = effect.Schema.Union([Person.schema, effect.Schema.String]).pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(Person), effect.SchemaTransformation.transform({
15426
+ decode: (input) => typeof input === "string" ? rememberWire(parsePersonString(input), input) : input,
15427
+ encode: (person) => {
15428
+ const wire = wireForms.get(person);
15429
+ return typeof wire === "string" && isFaithful(wire, person) ? wire : person;
15430
+ }
15431
+ })));
15432
+ /**
15433
+ * The shorthand text this person was decoded from, when it was decoded from
15434
+ * the string form and still matches its fields; `None` for a person built
15435
+ * from an object or by hand.
15436
+ *
15437
+ * Exposed so callers can tell which encoding a manifest used without
15438
+ * re-reading the file.
15439
+ *
15440
+ * @param person - the person to inspect
15441
+ * @returns the original shorthand text, or `None`
15442
+ */
15443
+ static wireStringOf(person) {
15444
+ const wire = wireForms.get(person);
15445
+ return typeof wire === "string" && isFaithful(wire, person) ? effect.Option.some(wire) : effect.Option.none();
15446
+ }
15088
15447
  };
15089
15448
  //#endregion
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
15449
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/internal/format.js
15091
15450
  const KEY_INDEX = new Map([
15092
15451
  "$schema",
15093
15452
  "name",
@@ -15310,7 +15669,7 @@ const renderJson = (raw, options) => {
15310
15669
  return options.newline ? `${json}\n` : json;
15311
15670
  };
15312
15671
  //#endregion
15313
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Package.js
15672
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Package.js
15314
15673
  const toHashMap = effect.SchemaTransformation.transform({
15315
15674
  decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
15316
15675
  encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
@@ -15628,7 +15987,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
15628
15987
  }
15629
15988
  };
15630
15989
  //#endregion
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
15990
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspacePackage.js
15632
15991
  const EMPTY$1 = Object.freeze(Object.create(null));
15633
15992
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
15634
15993
  /**
@@ -15703,10 +16062,12 @@ var WorkspaceManifestError = class extends effect.Schema.TaggedErrorClass()("Wor
15703
16062
  * path: "/repo/packages/utils",
15704
16063
  * packageJsonPath: "/repo/packages/utils/package.json",
15705
16064
  * relativePath: "packages/utils",
16065
+ * workspaceRoot: "/repo",
15706
16066
  * });
15707
16067
  *
15708
16068
  * pkg.isRootWorkspace; // false
15709
16069
  * pkg.unscopedName; // "utils"
16070
+ * pkg.workspaceRoot; // "/repo"
15710
16071
  * ```
15711
16072
  *
15712
16073
  * @public
@@ -15722,6 +16083,21 @@ var WorkspacePackage = class WorkspacePackage extends effect.Schema.Class("Works
15722
16083
  packageJsonPath: effect.Schema.NonEmptyString,
15723
16084
  /** POSIX path relative to the workspace root; `"."` for the root package. */
15724
16085
  relativePath: effect.Schema.String,
16086
+ /**
16087
+ * Absolute path to the workspace root this package was discovered under.
16088
+ *
16089
+ * @remarks
16090
+ * Carried, not derived. Whoever built this value already knew the root —
16091
+ * `WorkspaceDiscovery` resolved it before enumerating, and the sync entry
16092
+ * point is handed it — so dropping it forced every consumer into per-package
16093
+ * root arithmetic (counting `relativePath` segments and re-ascending that
16094
+ * many `..`). That reconstruction is exact only while `path` and
16095
+ * `relativePath` agree, and it re-derives something the kit never had to
16096
+ * lose.
16097
+ *
16098
+ * For the root package this equals `path`, and `relativePath` is `"."`.
16099
+ */
16100
+ workspaceRoot: effect.Schema.NonEmptyString,
15725
16101
  /** Whether the package is marked private. */
15726
16102
  private: effect.Schema.Boolean.pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(false)), effect.Schema.withConstructorDefault(effect.Effect.succeed(false))),
15727
16103
  /** Production dependencies. */
@@ -15890,7 +16266,7 @@ var WorkspacePackage = class WorkspacePackage extends effect.Schema.Class("Works
15890
16266
  }
15891
16267
  };
15892
16268
  //#endregion
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
16269
+ //#region ../../node_modules/.pnpm/@effected+walker@0.3.1_@effected+glob@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/walker/Descend.js
15894
16270
  /**
15895
16271
  * Typed failure raised by {@link descend}: a directory mid-walk was unreadable
15896
16272
  * (under `onUnreadable: "fail"`), or the walk descended past `maxDepth`. Depth
@@ -16025,7 +16401,97 @@ const descend = effect.Effect.fn("Walker.descend")(function* (pattern, options)
16025
16401
  return results;
16026
16402
  });
16027
16403
  //#endregion
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
16404
+ //#region ../../node_modules/.pnpm/@effected+walker@0.3.1_@effected+glob@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/walker/Expand.js
16405
+ /**
16406
+ * Typed failure raised by {@link compileAndExpand}: the single error the
16407
+ * compile+expand recipe fails with, so a caller catches one tag rather than
16408
+ * folding two error channels by hand.
16409
+ *
16410
+ * @remarks
16411
+ * One tag, two genuinely different causes — "your pattern is malformed" and
16412
+ * "that directory is unreadable" are different problems with different fixes,
16413
+ * so `cause` keeps the underlying typed error intact
16414
+ * rather than flattening it into a string. Discriminate on `cause._tag`
16415
+ * (`"GlobPatternError"` vs `"DescendError"`), or read
16416
+ * {@link GlobExpansionError.stage} when only the phase matters; either way the
16417
+ * original payload — a guard's `limit`/`actual`, a descent's `path` — is still
16418
+ * there. `cause` is also the native `Error` cause, so error chaining and
16419
+ * stack-printing work without extra wiring.
16420
+ *
16421
+ * @public
16422
+ */
16423
+ var GlobExpansionError = class extends effect.Schema.TaggedErrorClass()("GlobExpansionError", {
16424
+ /** The glob pattern's source text, as handed to {@link compileAndExpand}. */
16425
+ pattern: effect.Schema.String,
16426
+ /** The underlying typed failure, intact: a compile guard trip or a descent failure. */
16427
+ cause: effect.Schema.Union([GlobPatternError, DescendError])
16428
+ }) {
16429
+ /**
16430
+ * Which phase failed — `"compile"` when the pattern itself was rejected,
16431
+ * `"descend"` when the filesystem walk failed. A convenience over
16432
+ * `cause._tag` for callers that only need the phase.
16433
+ */
16434
+ get stage() {
16435
+ return this.cause._tag === "GlobPatternError" ? "compile" : "descend";
16436
+ }
16437
+ get message() {
16438
+ const shown = this.pattern.length > 64 ? `${this.pattern.slice(0, 64)}…` : this.pattern;
16439
+ return `glob expansion of ${JSON.stringify(shown)} failed during ${this.stage}: ${this.cause.message}`;
16440
+ }
16441
+ };
16442
+ /**
16443
+ * Compile a glob pattern and expand it against the filesystem in one call:
16444
+ * matching FILE paths relative to `options.cwd`, POSIX separators, sorted.
16445
+ *
16446
+ * @remarks
16447
+ * The recipe form of {@link descend}. Everything `descend` documents about
16448
+ * traversal holds unchanged — the literal fast-path, the negated-pattern walk
16449
+ * from `cwd`, files-only matching, symlink and prune handling, `maxDepth`,
16450
+ * `onUnreadable` — because this delegates to it. What this adds is the seam:
16451
+ * the pattern arrives as a string, and both failure modes arrive as one
16452
+ * {@link GlobExpansionError} with the underlying error preserved in `cause`.
16453
+ *
16454
+ * A missing base directory, a pattern that climbs above `cwd`, and a pattern
16455
+ * that simply matches nothing are all an EMPTY result, not a failure — zero
16456
+ * matches is a normal glob answer. Only a rejected pattern or a failed walk
16457
+ * produces an error.
16458
+ *
16459
+ * `FileSystem` and `Path` stay in the `R` channel and are **deliberately not
16460
+ * provided here**, even though hand-providing them is the friction this
16461
+ * recipe otherwise removes. `FileSystem` cannot be provided — a library that
16462
+ * picks its own filesystem cannot be tested against a fixture tree. Given
16463
+ * that, providing `Path` internally would not save the caller a layer (they
16464
+ * still supply `FileSystem`), and it would actively break win32: the walk
16465
+ * would join paths POSIX-style against a caller's win32 filesystem. The
16466
+ * consumer's platform layer stays the single place that choice is made.
16467
+ * Provide both once at the application boundary, not per call site.
16468
+ *
16469
+ * @example
16470
+ * ```ts
16471
+ * import { compileAndExpand } from "@effected/walker"
16472
+ * import { GlobPatternOptions } from "@effected/glob"
16473
+ *
16474
+ * const files = yield* compileAndExpand("packages/*​/src/**​/*.ts", {
16475
+ * cwd: "/repo",
16476
+ * glob: GlobPatternOptions.make({ dot: true })
16477
+ * })
16478
+ * ```
16479
+ *
16480
+ * @public
16481
+ */
16482
+ const compileAndExpand = effect.Effect.fn("Walker.compileAndExpand")(function* (pattern, options) {
16483
+ const compiled = GlobPattern.compileResult(pattern, options.glob);
16484
+ if (effect.Result.isFailure(compiled)) return yield* new GlobExpansionError({
16485
+ pattern,
16486
+ cause: compiled.failure
16487
+ });
16488
+ return yield* descend(compiled.success, options).pipe(effect.Effect.mapError((cause) => new GlobExpansionError({
16489
+ pattern,
16490
+ cause
16491
+ })));
16492
+ });
16493
+ //#endregion
16494
+ //#region ../../node_modules/.pnpm/@effected+walker@0.3.1_@effected+glob@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/walker/Walker.js
16029
16495
  /**
16030
16496
  * Ascend from `start` toward the filesystem root, yielding each directory,
16031
16497
  * nearest first.
@@ -16039,17 +16505,28 @@ const descend = effect.Effect.fn("Walker.descend")(function* (pattern, options)
16039
16505
  * Bounded twice over: `dirname` is a fixpoint at the root, and `maxDepth` guards
16040
16506
  * a pathological `Path` implementation that never reaches one.
16041
16507
  *
16508
+ * `stopAt` is compared in normalized form — see {@link AscendOptions.stopAt}.
16509
+ * Raw string equality made the ceiling fail OPEN: an unnormalized ceiling
16510
+ * matched nothing and the ascent ran silently to the filesystem root, which is
16511
+ * the unbounded walk the option exists to prevent, with no error to notice it
16512
+ * by. A relative ceiling **dies** for the same reason — resolving one against
16513
+ * `process.cwd()` would reintroduce the silent-wrong-walk failure through a
16514
+ * different door. See {@link AscendOptions.stopAt} for why that is a defect
16515
+ * rather than a typed error; the error channel stays `never`.
16516
+ *
16042
16517
  * @public
16043
16518
  */
16044
16519
  const ascend = (start, options) => effect.Effect.gen(function* () {
16045
16520
  const path = yield* effect.Path.Path;
16046
16521
  const maxDepth = options?.maxDepth ?? 256;
16047
16522
  if (!Number.isInteger(maxDepth) || maxDepth < 1) return yield* effect.Effect.die(/* @__PURE__ */ new Error(`Walker.ascend: maxDepth must be a positive integer, received ${maxDepth}`));
16523
+ if (options?.stopAt !== void 0 && !path.isAbsolute(options.stopAt)) return yield* effect.Effect.die(/* @__PURE__ */ new Error(`Walker.ascend: stopAt must be an absolute path, received ${JSON.stringify(options.stopAt)} (ascending from ${JSON.stringify(start)})`));
16524
+ const ceiling = options?.stopAt === void 0 ? void 0 : path.resolve(options.stopAt);
16048
16525
  const dirs = [];
16049
16526
  let current = start;
16050
16527
  for (let depth = 0; depth < maxDepth; depth++) {
16051
16528
  dirs.push(current);
16052
- if (options?.stopAt !== void 0 && current === options.stopAt) break;
16529
+ if (ceiling !== void 0 && (current === ceiling || path.resolve(current) === ceiling)) break;
16053
16530
  const parent = path.dirname(current);
16054
16531
  if (parent === current) break;
16055
16532
  current = parent;
@@ -16115,7 +16592,7 @@ const Walker$1 = {
16115
16592
  findRoot: findRoot$1
16116
16593
  };
16117
16594
  //#endregion
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
16595
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceRoot.js
16119
16596
  /**
16120
16597
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
16121
16598
  *
@@ -16135,11 +16612,22 @@ var WorkspaceRootNotFoundError = class extends effect.Schema.TaggedErrorClass()(
16135
16612
  /** The directory the ascent started from. */
16136
16613
  searchPath: effect.Schema.String,
16137
16614
  /** The marker filenames probed at each ancestor. */
16138
- markers: effect.Schema.Array(effect.Schema.String)
16615
+ markers: effect.Schema.Array(effect.Schema.String),
16616
+ /**
16617
+ * The resolved ceiling the ascent was bounded by, when one was supplied.
16618
+ *
16619
+ * @remarks
16620
+ * Absent means the ascent ran to the filesystem root. Its presence is what
16621
+ * lets a caller tell "there is no workspace root anywhere above me" from
16622
+ * "there is none below the ceiling I set" — two failures that otherwise
16623
+ * render identically.
16624
+ */
16625
+ stopAt: effect.Schema.optionalKey(effect.Schema.String)
16139
16626
  }) {
16140
- /** Renders the search path and probed markers into a one-line message. */
16627
+ /** Renders the search path, probed markers and any ceiling into a one-line message. */
16141
16628
  get message() {
16142
- return `No workspace root above ${this.searchPath} (looked for ${this.markers.join(", ")})`;
16629
+ const bound = this.stopAt === void 0 ? "" : ` up to ${this.stopAt}`;
16630
+ return `No workspace root above ${this.searchPath}${bound} (looked for ${this.markers.join(", ")})`;
16143
16631
  }
16144
16632
  };
16145
16633
  /**
@@ -16162,6 +16650,12 @@ const isWorkspaceRoot = (dir) => effect.Effect.gen(function* () {
16162
16650
  }).pipe(effect.Effect.orElseSucceed(() => ({})));
16163
16651
  return parsed.workspaces !== void 0 && parsed.workspaces !== null;
16164
16652
  });
16653
+ /** Whether `descendant` is `ancestor` itself or lies beneath it, on POSIX or win32 separators. */
16654
+ const isAtOrBelow = (descendant, ancestor) => {
16655
+ if (descendant === ancestor) return true;
16656
+ const prefix = ancestor.endsWith("/") || ancestor.endsWith("\\") ? ancestor : `${ancestor}/`;
16657
+ return descendant.startsWith(prefix) || descendant.startsWith(prefix.replace(/\/$/, "\\"));
16658
+ };
16165
16659
  /**
16166
16660
  * Locates the workspace root by ascending from a starting directory.
16167
16661
  *
@@ -16176,6 +16670,20 @@ const isWorkspaceRoot = (dir) => effect.Effect.gen(function* () {
16176
16670
  * });
16177
16671
  * ```
16178
16672
  *
16673
+ * @example
16674
+ * Bounded: an unmarked fixture directory fails typed instead of escaping into
16675
+ * the enclosing repository.
16676
+ *
16677
+ * ```ts
16678
+ * import { WorkspaceRoot } from "@effected/workspaces";
16679
+ * import { Effect } from "effect";
16680
+ *
16681
+ * const program = Effect.gen(function* () {
16682
+ * const roots = yield* WorkspaceRoot;
16683
+ * return yield* roots.find("/tmp/fixture/packages/a", { stopAt: "/tmp/fixture" });
16684
+ * });
16685
+ * ```
16686
+ *
16179
16687
  * @public
16180
16688
  */
16181
16689
  var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effected/workspaces/WorkspaceRoot") {
@@ -16183,24 +16691,95 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
16183
16691
  static make = effect.Effect.gen(function* () {
16184
16692
  const fs = yield* effect.FileSystem.FileSystem;
16185
16693
  const path = yield* effect.Path.Path;
16186
- const find = effect.Effect.fn("WorkspaceRoot.find")(function* (cwd) {
16694
+ const find = effect.Effect.fn("WorkspaceRoot.find")(function* (cwd, options) {
16187
16695
  const start = path.resolve(cwd);
16188
- const chain = yield* Walker$1.ascend(start);
16696
+ const ceiling = options?.stopAt === void 0 ? void 0 : path.resolve(options.stopAt);
16697
+ const chain = yield* Walker$1.ascend(start, {
16698
+ ...ceiling === void 0 ? {} : { stopAt: ceiling },
16699
+ ...options?.maxDepth === void 0 ? {} : { maxDepth: options.maxDepth }
16700
+ });
16189
16701
  const found = yield* Walker$1.findRoot(chain, isWorkspaceRoot);
16190
16702
  if (effect.Option.isNone(found)) return yield* effect.Effect.fail(new WorkspaceRootNotFoundError({
16191
16703
  searchPath: start,
16192
- markers: WORKSPACE_MARKERS
16704
+ markers: WORKSPACE_MARKERS,
16705
+ ...ceiling === void 0 ? {} : { stopAt: ceiling }
16193
16706
  }));
16194
16707
  yield* effect.Effect.logDebug("Workspace root found").pipe(effect.Effect.annotateLogs("workspace.root", found.value));
16195
16708
  return found.value;
16196
16709
  });
16197
- return { find: (cwd) => find(cwd).pipe(effect.Effect.provideService(effect.FileSystem.FileSystem, fs), effect.Effect.provideService(effect.Path.Path, path)) };
16710
+ return { find: (cwd, options) => find(cwd, options).pipe(effect.Effect.provideService(effect.FileSystem.FileSystem, fs), effect.Effect.provideService(effect.Path.Path, path)) };
16198
16711
  });
16199
16712
  /** The live layer. */
16200
16713
  static layer = effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.make);
16714
+ /**
16715
+ * A test double resolving every `find` to `root`, with no filesystem.
16716
+ *
16717
+ * @remarks
16718
+ * The nine-copies-of-a-four-line-mock case — a `Layer.succeed` over a `find`
16719
+ * that ignores its arguments and succeeds with a fixed root is what consumers
16720
+ * were writing by hand. The difference is that this double **honours
16721
+ * `stopAt`**: a hand-rolled `find` that ignores the ceiling makes a bounded
16722
+ * call pass under test and fail against the live service, which is the
16723
+ * failure mode the option exists to catch. A `root` above the ceiling fails
16724
+ * here exactly as it would live, with the same
16725
+ * {@link WorkspaceRootNotFoundError}.
16726
+ *
16727
+ * The ceiling is `path.resolve`d through the injected `Path` service before
16728
+ * the comparison, exactly as the live `make` path does — so a `stopAt`
16729
+ * carrying `..` segments bounds the double identically to the live service,
16730
+ * not by raw string. This is why `makeTest` yields an `Effect` requiring
16731
+ * `Path`: it captures the service once at construction, the same shape as
16732
+ * `make`. Consumers reach for {@link WorkspaceRoot.layerTest}, which provides
16733
+ * `Path.layer` internally, so the requirement never surfaces at their call
16734
+ * site.
16735
+ *
16736
+ * `maxDepth` is deliberately NOT modelled: the double does not walk, so it has
16737
+ * no depth to cap, and pretending otherwise would encode a fiction. A suite
16738
+ * exercising the depth guard wants the live service over a fixture tree.
16739
+ *
16740
+ * @param root - The root every unbounded `find` resolves to.
16741
+ */
16742
+ static makeTest = (root) => effect.Effect.gen(function* () {
16743
+ const path = yield* effect.Path.Path;
16744
+ return { find: (cwd, options) => options?.stopAt !== void 0 && !isAtOrBelow(root, path.resolve(options.stopAt)) ? effect.Effect.fail(new WorkspaceRootNotFoundError({
16745
+ searchPath: cwd,
16746
+ markers: WORKSPACE_MARKERS,
16747
+ stopAt: options.stopAt
16748
+ })) : effect.Effect.succeed(root) };
16749
+ });
16750
+ /**
16751
+ * The test layer: {@link WorkspaceRoot.makeTest} with `Path.layer` provided.
16752
+ *
16753
+ * @remarks
16754
+ * `makeTest` requires `Path` to normalize the `stopAt` ceiling; this layer
16755
+ * supplies core's `Path.layer` internally, so the requirement never reaches a
16756
+ * consumer — the published type stays `Layer.Layer<WorkspaceRoot>`.
16757
+ *
16758
+ * A parameterized layer factory mints a **fresh reference per call**, and
16759
+ * layers memoize by reference — bind the result to a `const` and reuse it
16760
+ * rather than calling `layerTest(...)` at each composition site.
16761
+ *
16762
+ * Pair it with `WorkspaceDiscovery.layerTest` to stand up the whole discovery
16763
+ * path without a filesystem; between them there is nothing left for a
16764
+ * module-level mock of `@effected/workspaces` to do, and a provided layer
16765
+ * keeps the service graph — and its typed errors — intact.
16766
+ *
16767
+ * @example
16768
+ * ```ts
16769
+ * import { WorkspaceDiscovery, WorkspaceRoot } from "@effected/workspaces";
16770
+ * import { Effect } from "effect";
16771
+ *
16772
+ * const TestRoot = WorkspaceRoot.layerTest("/repo");
16773
+ * const TestDiscovery = WorkspaceDiscovery.layerTest({
16774
+ * listPackages: () => Effect.succeed([]),
16775
+ * });
16776
+ * // program.pipe(Effect.provide(TestRoot), Effect.provide(TestDiscovery))
16777
+ * ```
16778
+ */
16779
+ static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
16201
16780
  };
16202
16781
  //#endregion
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
16782
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/limits.js
16204
16783
  /**
16205
16784
  * Hard ceiling on directories the enumerator will visit for one pattern set.
16206
16785
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -16218,7 +16797,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
16218
16797
  */
16219
16798
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
16220
16799
  //#endregion
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
16800
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/traverse.js
16222
16801
  /** Directory names never descended into. */
16223
16802
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
16224
16803
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -16308,7 +16887,7 @@ var Traversal = class {
16308
16887
  }
16309
16888
  };
16310
16889
  //#endregion
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
16890
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/enumerate.js
16312
16891
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
16313
16892
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
16314
16893
  /**
@@ -16378,7 +16957,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
16378
16957
  return results;
16379
16958
  });
16380
16959
  //#endregion
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
16960
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/patterns.js
16382
16961
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
16383
16962
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
16384
16963
  const pnpmPatternsOf = (document) => {
@@ -16435,7 +17014,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
16435
17014
  return manifestPatternsOf(manifest);
16436
17015
  });
16437
17016
  //#endregion
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
17017
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceDiscovery.js
16439
17018
  /**
16440
17019
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
16441
17020
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -16613,6 +17192,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
16613
17192
  path: directory,
16614
17193
  packageJsonPath,
16615
17194
  relativePath,
17195
+ workspaceRoot: root,
16616
17196
  manifestRecord: raw,
16617
17197
  ...typeof raw.private === "boolean" ? { private: raw.private } : {},
16618
17198
  ...isStringRecord$2(raw.dependencies) ? { dependencies: raw.dependencies } : {},
@@ -16770,6 +17350,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
16770
17350
  * path: "/repo/packages/utils",
16771
17351
  * packageJsonPath: "/repo/packages/utils/package.json",
16772
17352
  * relativePath: "packages/utils",
17353
+ * workspaceRoot: "/repo",
16773
17354
  * }),
16774
17355
  * ]),
16775
17356
  * });
@@ -16867,7 +17448,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
16867
17448
  };
16868
17449
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
16869
17450
  //#endregion
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
17451
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/DependencyGraph.js
16871
17452
  /**
16872
17453
  * Raised when the workspace dependency graph cannot be topologically ordered
16873
17454
  * because it contains a cycle.
@@ -18465,7 +19046,7 @@ var Git = class extends effect.Context.Service()("@effected/git/Git") {
18465
19046
  }));
18466
19047
  };
18467
19048
  //#endregion
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
19049
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/ChangeDetector.js
18469
19050
  /**
18470
19051
  * Which git refs to compare, and whether to fold in the working tree.
18471
19052
  *
@@ -18717,7 +19298,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
18717
19298
  };
18718
19299
  }
18719
19300
  //#endregion
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
19301
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/catalogs.js
18721
19302
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
18722
19303
  const inlineCatalogs = (manifest) => {
18723
19304
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -18781,7 +19362,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
18781
19362
  });
18782
19363
  };
18783
19364
  //#endregion
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
19365
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/ConfigDependencyHooks.js
18785
19366
  /** Whether `value` is a non-null, non-array object. */
18786
19367
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
18787
19368
  /**
@@ -18875,9 +19456,13 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
18875
19456
  * `hooks`-source `CatalogAssemblyError`, never a silent skip.
18876
19457
  *
18877
19458
  * @remarks
18878
- * Node-coupled by design the `node:fs` / `node:path` / `node:url` imports are
18879
- * the sanctioned Node-only overlay, matching the other seams here. Only ever
18880
- * wired by `WorkspaceCatalogs.layerWithConfigDependencies`.
19459
+ * Runtime-coupled by design, not node-exclusive. The `import()` below loads
19460
+ * **and executes** a config dependency's pnpmfile in-process code execution,
19461
+ * not IO, so no `FileSystem` / `Path` service abstracts it. The `node:path` and
19462
+ * `node:url` imports (`join`, `pathToFileURL`) exist only to build the URL that
19463
+ * `import()` consumes; node and bun both implement those builtins and dynamic
19464
+ * import, so this layer runs on either runtime. Only ever wired by
19465
+ * `WorkspaceCatalogs.layerWithConfigDependencies`.
18881
19466
  */
18882
19467
  static layerLive = effect.Layer.succeed(ConfigDependencyHooks, { inject: (root, configDependencies, seed) => effect.Effect.gen(function* () {
18883
19468
  const names = Object.keys(configDependencies);
@@ -18926,7 +19511,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
18926
19511
  }) });
18927
19512
  };
18928
19513
  //#endregion
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
19514
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/PackageManagerName.js
18930
19515
  /**
18931
19516
  * The four package managers this package understands.
18932
19517
  *
@@ -19168,7 +19753,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
19168
19753
  static layer = effect.Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
19169
19754
  };
19170
19755
  //#endregion
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
19756
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/LockfileReader.js
19172
19757
  /**
19173
19758
  * Raised when the workspace's lockfile cannot be read off disk.
19174
19759
  *
@@ -19278,7 +19863,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
19278
19863
  static layer = (options) => effect.Layer.effect(LockfileReader, LockfileReader.make(options));
19279
19864
  };
19280
19865
  //#endregion
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
19866
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/Publishability.js
19282
19867
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
19283
19868
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
19284
19869
  /**
@@ -19378,7 +19963,7 @@ var PublishabilityDetector = class PublishabilityDetector extends effect.Context
19378
19963
  }) });
19379
19964
  };
19380
19965
  //#endregion
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
19966
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceCatalogs.js
19382
19967
  /**
19383
19968
  * An immutable, fully-normalized catalog collection — the one catalog
19384
19969
  * resolution semantic in the package.
@@ -19762,7 +20347,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
19762
20347
  }));
19763
20348
  };
19764
20349
  //#endregion
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
20350
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
19766
20351
  const EMPTY = Object.freeze(Object.create(null));
19767
20352
  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)));
19768
20353
  /**
@@ -19927,7 +20512,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
19927
20512
  }
19928
20513
  };
19929
20514
  //#endregion
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
20515
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceSnapshots.js
19931
20516
  /** Whether `value` is a non-null, non-array object. */
19932
20517
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
19933
20518
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -20119,7 +20704,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
20119
20704
  static layer = (options) => effect.Layer.effect(WorkspaceSnapshots, WorkspaceSnapshots.make(options));
20120
20705
  };
20121
20706
  //#endregion
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
20707
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/Workspaces.js
20123
20708
  /**
20124
20709
  * Every service that needs only a filesystem: root, package-manager detection,
20125
20710
  * discovery, lockfile reading, catalogs and publishability.
@@ -20487,34 +21072,15 @@ effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
20487
21072
  }) };
20488
21073
  }));
20489
21074
  /**
20490
- * The workspace root a package was discovered against, derived from its own
20491
- * coordinates: `relativePath` is the package directory relative to the
20492
- * discovery root (POSIX, `"."` for the root package), so ascending one level
20493
- * per path segment from `pkg.path` lands exactly on that root.
20494
- *
20495
- * @remarks
20496
- * Derivation is deliberate — probing the filesystem for workspace markers
20497
- * (`WorkspaceRoot.find`) can walk PAST the intended root when that root
20498
- * carries no marker (a fixture tree, a bare directory) and land on an
20499
- * enclosing workspace, silently swapping in that outer root's
20500
- * `.changeset/config.json` and dropping the ignore/mode gating (the #209
20501
- * regression class). The discovery root needs no probing: whoever built the
20502
- * `WorkspacePackage` already knew it.
20503
- */
20504
- const packageRoot = (pkg) => {
20505
- const segments = pkg.relativePath.split("/").filter((segment) => segment !== "" && segment !== ".");
20506
- return segments.length === 0 ? pkg.path : (0, node_path.join)(pkg.path, ...segments.map(() => ".."));
20507
- };
20508
- /**
20509
21075
  * Ignore-aware override of `PublishabilityDetector`. `detect` short-circuits to `[]`
20510
21076
  * for changeset-ignored packages, then dispatches on `ChangesetConfig.mode`:
20511
21077
  * `none` → `[]`; `silk` → `SilkPublishability.detect`; `vanilla` → the library default.
20512
21078
  *
20513
21079
  * @remarks Requires `FileSystem` and {@link ChangesetConfig} at build.
20514
21080
  * The kit's `detect` contract no longer receives the workspace root, so the changeset
20515
- * lookups derive it per package from the package's own discovery coordinates
20516
- * (`pkg.path` ascended by `pkg.relativePath` — never a filesystem marker walk,
20517
- * which could escape an unmarked root and read the wrong `.changeset/config.json`).
21081
+ * lookups read it from `pkg.workspaceRoot` the discovery root the package was found
21082
+ * against, never a filesystem marker walk, which could escape an unmarked root and read
21083
+ * the wrong `.changeset/config.json`.
20518
21084
  *
20519
21085
  * @since 0.4.0
20520
21086
  * @public
@@ -20524,7 +21090,7 @@ const PublishabilityDetectorAdaptiveLive = effect.Layer.effect(PublishabilityDet
20524
21090
  const config = yield* ChangesetConfig;
20525
21091
  const vanilla = yield* effect.Effect.provide(PublishabilityDetector, PublishabilityDetector.layer);
20526
21092
  return { detect: (pkg) => effect.Effect.gen(function* () {
20527
- const root = packageRoot(pkg);
21093
+ const root = pkg.workspaceRoot;
20528
21094
  if (yield* config.isIgnored(pkg.name, root)) return [];
20529
21095
  const mode = yield* config.mode(root);
20530
21096
  if (mode === "none") return [];
@@ -45097,25 +45663,15 @@ function normalizeLegacyOptions(options, configPath) {
45097
45663
  };
45098
45664
  }
45099
45665
  /** Match dotfiles, mirroring the former tinyglobby `dot: true` behavior. */
45100
- const GLOB_OPTIONS = GlobPatternOptions.make({ dot: true });
45666
+ const GLOB_OPTIONS$1 = GlobPatternOptions.make({ dot: true });
45101
45667
  /**
45102
- * Compile `glob` via `@effected/glob`, folding a compile-guard trip
45103
- * (over-length pattern, brace-expansion budget, nesting depth) into a
45104
- * {@link ConfigurationError} naming the offending glob on the typed channel.
45105
- */
45106
- function compileGlob(glob) {
45107
- return GlobPattern.compile(glob, GLOB_OPTIONS).pipe(effect.Effect.mapError((error) => new ConfigurationError({
45108
- field: "glob",
45109
- reason: `Invalid glob pattern ${JSON.stringify(glob)}: ${error.message}`
45110
- })));
45111
- }
45112
45668
  /**
45113
45669
  * Pure attribution helper: does `glob` (under this service's `dot: true`
45114
45670
  * semantics) match the repo-relative POSIX path `rel`? An uncompilable
45115
45671
  * pattern matches nothing.
45116
45672
  */
45117
45673
  function globMatchesRel(glob, rel) {
45118
- const result = effect.Effect.runSync(effect.Effect.result(GlobPattern.compile(glob, GLOB_OPTIONS)));
45674
+ const result = GlobPattern.compileResult(glob, GLOB_OPTIONS$1);
45119
45675
  return effect.Result.isSuccess(result) && result.success.matches(rel);
45120
45676
  }
45121
45677
  /**
@@ -45131,13 +45687,14 @@ function globMatchesRel(glob, rel) {
45131
45687
  * module already speaks POSIX-relative match paths).
45132
45688
  */
45133
45689
  function materializeGlob(glob, cwd) {
45134
- return compileGlob(glob).pipe(effect.Effect.flatMap((pattern) => descend(pattern, {
45690
+ return compileAndExpand(glob, {
45135
45691
  cwd,
45136
- onUnreadable: "skip"
45692
+ onUnreadable: "skip",
45693
+ glob: GLOB_OPTIONS$1
45137
45694
  }).pipe(effect.Effect.mapError((error) => new ConfigurationError({
45138
45695
  field: "glob",
45139
- reason: `Failed to materialize glob ${JSON.stringify(glob)}: ${error.message}`
45140
- })), effect.Effect.provide(effect.Path.layer))));
45696
+ reason: error.stage === "compile" ? `Invalid glob pattern ${JSON.stringify(glob)}: ${error.cause.message}` : `Failed to materialize glob ${JSON.stringify(glob)}: ${error.cause.message}`
45697
+ })), effect.Effect.provide(effect.Path.layer));
45141
45698
  }
45142
45699
  /**
45143
45700
  * Determine whether `child` is the same directory as `parent` or sits inside
@@ -46839,19 +47396,29 @@ var VersionFiles = class VersionFiles {
46839
47396
  }
46840
47397
  };
46841
47398
  /**
47399
+ * Match dotfiles, matching `ConfigInspector`'s glob dialect.
47400
+ *
47401
+ * @remarks
47402
+ * This module previously compiled with minimatch DEFAULTS while
47403
+ * `ConfigInspector` compiled with `dot: true`, so a wildcard segment matching
47404
+ * a dotted directory was attributed to a package but never materialized (or
47405
+ * the reverse). The two paths must agree: attribution and materialization
47406
+ * answer the same question about the same glob.
47407
+ */
47408
+ const GLOB_OPTIONS = GlobPatternOptions.make({ dot: true });
47409
+ /**
46842
47410
  * Expand a glob pattern against the filesystem, returning matching FILE paths
46843
47411
  * relative to `cwd` (POSIX separators), sorted by relative path.
46844
47412
  *
46845
47413
  * @remarks
46846
- * The walk is `@effected/walker`'s `descend` (literal fast path,
47414
+ * The walk is `@effected/walker`'s `compileAndExpand` (literal fast path,
46847
47415
  * `enumerationPrefix` bounding, `node_modules`/`.git` pruning), with
46848
47416
  * `onUnreadable: "skip"` preserving this module's silent-skip policy for
46849
- * unreadable directories. Matching semantics are minimatch DEFAULTS via the
46850
- * compiled pattern notably, wildcards do not match dotfiles, same as the
46851
- * previous `tinyglobby` defaults. An uncompilable pattern expands to no
46852
- * matches. `descend`'s `Path` requirement is satisfied internally with the
46853
- * core POSIX `Path.layer` this module already speaks POSIX relative match
46854
- * paths and node-bound absolute paths throughout.
47417
+ * unreadable directories. Matching semantics are {@link GLOB_OPTIONS}
47418
+ * wildcards DO match dotfiles, aligning this module with `ConfigInspector`. An
47419
+ * uncompilable pattern expands to no matches. The `Path` requirement is
47420
+ * satisfied internally with the core POSIX `Path.layer` this module already
47421
+ * speaks POSIX relative match paths and node-bound absolute paths throughout.
46855
47422
  *
46856
47423
  * @param source - The glob pattern, repo-relative
46857
47424
  * @param cwd - Absolute directory the pattern is resolved against
@@ -46860,13 +47427,11 @@ var VersionFiles = class VersionFiles {
46860
47427
  * @internal
46861
47428
  */
46862
47429
  function expandGlob(source, cwd) {
46863
- return effect.Effect.option(GlobPattern.compile(source)).pipe(effect.Effect.flatMap(effect.Option.match({
46864
- onNone: () => effect.Effect.succeed([]),
46865
- onSome: (pattern) => descend(pattern, {
46866
- cwd,
46867
- onUnreadable: "skip"
46868
- })
46869
- })), effect.Effect.provide(effect.Path.layer));
47430
+ return compileAndExpand(source, {
47431
+ cwd,
47432
+ onUnreadable: "skip",
47433
+ glob: GLOB_OPTIONS
47434
+ }).pipe(effect.Effect.catch((error) => error.stage === "compile" ? effect.Effect.succeed([]) : effect.Effect.fail(error)), effect.Effect.provide(effect.Path.layer));
46870
47435
  }
46871
47436
  /**
46872
47437
  * Read the `version` field from a `package.json` in the given directory.