@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.
@@ -419,7 +419,7 @@ const trimTrailingSlashes = (s) => {
419
419
  return s.slice(0, end);
420
420
  };
421
421
  //#endregion
422
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/limits.js
422
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/limits.js
423
423
  /** Hard cap on pattern length. Upstream minimatch's MAX_PATTERN_LENGTH (64KB). */
424
424
  const MAX_PATTERN_LENGTH = 1024 * 64;
425
425
  /** Default brace-expansion output budget. Upstream brace-expansion's EXPANSION_MAX. */
@@ -453,7 +453,7 @@ const assertCap = (name, value) => {
453
453
  return value;
454
454
  };
455
455
  //#endregion
456
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/unescape.js
456
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/unescape.js
457
457
  /**
458
458
  * Un-escape a string that has been escaped with `escape`.
459
459
  *
@@ -476,11 +476,11 @@ const unescapePattern = (s, { windowsPathsNoEscape = false, magicalBraces = true
476
476
  return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
477
477
  };
478
478
  //#endregion
479
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/types.js
479
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/types.js
480
480
  /** The globstar marker in a compiled pattern set. */
481
481
  const GLOBSTAR = Symbol("globstar **");
482
482
  //#endregion
483
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/escape.js
483
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/escape.js
484
484
  /**
485
485
  * Escape all magic characters in a glob pattern.
486
486
  *
@@ -498,13 +498,13 @@ const escapePattern = (s, { windowsPathsNoEscape = false, magicalBraces = false
498
498
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
499
499
  };
500
500
  //#endregion
501
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/assertValidPattern.js
501
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/assertValidPattern.js
502
502
  const assertValidPattern = (pattern) => {
503
503
  if (typeof pattern !== "string") throw new TypeError("invalid pattern");
504
504
  if (pattern.length > 65536) throw new GuardExceeded("PatternTooLong", MAX_PATTERN_LENGTH, pattern.length);
505
505
  };
506
506
  //#endregion
507
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpressions.js
507
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpressions.js
508
508
  const posixClasses = {
509
509
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
510
510
  "[:alpha:]": ["\\p{L}\\p{Nl}", true],
@@ -627,7 +627,7 @@ const parseClass = (glob, position) => {
627
627
  ];
628
628
  };
629
629
  //#endregion
630
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/ast.js
630
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/ast.js
631
631
  const types = /* @__PURE__ */ new Set([
632
632
  "!",
633
633
  "?",
@@ -1144,7 +1144,7 @@ var AST = class AST {
1144
1144
  }
1145
1145
  };
1146
1146
  //#endregion
1147
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/balancedMatch.js
1147
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/balancedMatch.js
1148
1148
  const maybeMatch = (reg, str) => {
1149
1149
  const m = str.match(reg);
1150
1150
  return m ? m[0] : null;
@@ -1202,7 +1202,7 @@ const range = (a, b, str) => {
1202
1202
  return result;
1203
1203
  };
1204
1204
  //#endregion
1205
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpansion.js
1205
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpansion.js
1206
1206
  const escSlash = `\0SLASH${Math.random()}\0`;
1207
1207
  const escOpen = `\0OPEN${Math.random()}\0`;
1208
1208
  const escClose = `\0CLOSE${Math.random()}\0`;
@@ -1349,7 +1349,7 @@ function expand_(str, max, isTopInput, depth) {
1349
1349
  }
1350
1350
  }
1351
1351
  //#endregion
1352
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/minimatch.js
1352
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/minimatch.js
1353
1353
  const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
1354
1354
  const starDotExtTest = (ext) => (f) => !f.startsWith(".") && f.endsWith(ext);
1355
1355
  const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
@@ -1920,7 +1920,7 @@ var Minimatch = class {
1920
1920
  }
1921
1921
  };
1922
1922
  //#endregion
1923
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobPattern.js
1923
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobPattern.js
1924
1924
  /**
1925
1925
  * Typed failure raised when a glob pattern trips a compile-time guard:
1926
1926
  * over-length, brace-expansion budget exhaustion, or nesting past the depth
@@ -2049,17 +2049,30 @@ var GlobPattern = class GlobPattern extends effect.Schema.Class("GlobPattern")(e
2049
2049
  return this.#engine;
2050
2050
  }
2051
2051
  /**
2052
- * Compile a pattern under the given options — the package's fallible
2053
- * boundary. Guard trips (over-length, expansion budget, nesting depth)
2054
- * fail typed with {@link GlobPatternError}; invalid options never reach
2055
- * here (they throw at `GlobPatternOptions.make`, a wiring defect).
2052
+ * Compile a pattern under the given options, synchronously — the package's
2053
+ * fallible boundary in its primitive form. Compilation is pure
2054
+ * string→predicate work with no IO, no services and no async step, so the
2055
+ * sync form is the real primitive and {@link GlobPattern.compile} is
2056
+ * derived from it.
2057
+ *
2058
+ * Total: never throws for pattern input. Guard trips (over-length,
2059
+ * expansion budget, nesting depth) come back as a `Result` failure holding
2060
+ * {@link GlobPatternError}; invalid *options* never reach here (they throw
2061
+ * at `GlobPatternOptions.make`, a wiring defect).
2056
2062
  *
2057
2063
  * The pattern must also compile under DEFAULT options, whatever the
2058
2064
  * effective options are — permissive options (say `nobrace` over a brace
2059
2065
  * bomb) do not admit a defaults-rejected pattern; the same typed error
2060
2066
  * surfaces instead.
2067
+ *
2068
+ * @remarks
2069
+ * For synchronous call sites that cannot host an Effect — a lint-staged
2070
+ * handler, a config predicate — this removes the
2071
+ * `Effect.runSync(Effect.result(...))` escape hatch: pair it with
2072
+ * `Result.isSuccess` and read `.success` directly. Effect call sites should
2073
+ * prefer {@link GlobPattern.compile}, which carries the tracing span.
2061
2074
  */
2062
- static compile = effect.Effect.fn("GlobPattern.compile")(function* (source, options) {
2075
+ static compileResult(source, options) {
2063
2076
  const engineOptions = toEngineOptions(options);
2064
2077
  try {
2065
2078
  new Minimatch(source, {});
@@ -2067,16 +2080,30 @@ var GlobPattern = class GlobPattern extends effect.Schema.Class("GlobPattern")(e
2067
2080
  const pattern = new GlobPattern({ source });
2068
2081
  pattern.#engine = engine;
2069
2082
  pattern.#engineOptions = engineOptions;
2070
- return pattern;
2083
+ return effect.Result.succeed(pattern);
2071
2084
  } catch (e) {
2072
- if (isGuardExceeded(e)) return yield* new GlobPatternError({
2085
+ if (isGuardExceeded(e)) return effect.Result.fail(new GlobPatternError({
2073
2086
  pattern: source,
2074
2087
  reason: e.reason,
2075
2088
  limit: e.limit,
2076
2089
  actual: e.actual
2077
- });
2090
+ }));
2078
2091
  throw e;
2079
2092
  }
2093
+ }
2094
+ /**
2095
+ * Compile a pattern under the given options — the package's fallible
2096
+ * boundary, and the form Effect call sites should reach for. Guard trips
2097
+ * (over-length, expansion budget, nesting depth) fail typed with
2098
+ * {@link GlobPatternError}; invalid options never reach here (they throw at
2099
+ * `GlobPatternOptions.make`, a wiring defect).
2100
+ *
2101
+ * Defined in terms of {@link GlobPattern.compileResult} — synchronous
2102
+ * callers can use that variant directly. Same semantics, same errors; this
2103
+ * form adds only the `GlobPattern.compile` tracing span.
2104
+ */
2105
+ static compile = effect.Effect.fn("GlobPattern.compile")(function* (source, options) {
2106
+ return yield* effect.Effect.fromResult(GlobPattern.compileResult(source, options));
2080
2107
  });
2081
2108
  /**
2082
2109
  * Whether `candidate` matches this pattern. Total: never throws, never
@@ -2172,7 +2199,7 @@ var GlobPattern = class GlobPattern extends effect.Schema.Class("GlobPattern")(e
2172
2199
  })));
2173
2200
  };
2174
2201
  //#endregion
2175
- //#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobSet.js
2202
+ //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobSet.js
2176
2203
  const exclusionTarget = (pattern) => pattern.startsWith("!") ? pattern.slice(1) : void 0;
2177
2204
  const allCompileUnderDefaults = (patterns) => {
2178
2205
  for (const pattern of patterns) {
@@ -2247,27 +2274,53 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2247
2274
  return this.#literalSet;
2248
2275
  }
2249
2276
  /**
2250
- * Compile a pattern set — with {@link GlobPattern.compile}, the package's
2251
- * only other fallible boundary. Fails typed on the FIRST uncompilable
2252
- * member, with the error's `pattern` field naming the offending source
2253
- * pattern (bang included for exclusions).
2277
+ * Compile a pattern set, synchronously the primitive form, mirroring
2278
+ * {@link GlobPattern.compileResult}. Set compilation is pure
2279
+ * string→predicate work with no IO and no async step, so the sync form is
2280
+ * the real primitive and {@link GlobSet.compile} is derived from it.
2281
+ *
2282
+ * Total: never throws for pattern input. Fails on the FIRST uncompilable
2283
+ * member, coming back as a `Result` failure whose {@link GlobPatternError}
2284
+ * names the offending source pattern in `pattern` (bang included for
2285
+ * exclusions).
2286
+ *
2287
+ * @remarks
2288
+ * For synchronous call sites that cannot host an Effect — a lint-staged
2289
+ * handler, a config predicate — this removes the
2290
+ * `Effect.runSync(Effect.result(...))` escape hatch: pair it with
2291
+ * `Result.isSuccess` and read `.success` directly. Effect call sites should
2292
+ * prefer {@link GlobSet.compile}, which carries the tracing span.
2254
2293
  */
2255
- static compile = effect.Effect.fn("GlobSet.compile")(function* (patterns) {
2294
+ static compileResult(patterns) {
2256
2295
  for (const pattern of patterns) {
2257
2296
  const target = exclusionTarget(pattern) ?? pattern;
2258
2297
  try {
2259
2298
  new Minimatch(target, {});
2260
2299
  } catch (e) {
2261
- if (isGuardExceeded(e)) return yield* new GlobPatternError({
2300
+ if (isGuardExceeded(e)) return effect.Result.fail(new GlobPatternError({
2262
2301
  pattern,
2263
2302
  reason: e.reason,
2264
2303
  limit: e.limit,
2265
2304
  actual: e.actual
2266
- });
2305
+ }));
2267
2306
  throw e;
2268
2307
  }
2269
2308
  }
2270
- return new GlobSet({ patterns });
2309
+ return effect.Result.succeed(new GlobSet({ patterns }));
2310
+ }
2311
+ /**
2312
+ * Compile a pattern set — with {@link GlobPattern.compile}, the package's
2313
+ * only other fallible boundary, and the form Effect call sites should reach
2314
+ * for. Fails typed on the FIRST uncompilable member, with the error's
2315
+ * `pattern` field naming the offending source pattern (bang included for
2316
+ * exclusions).
2317
+ *
2318
+ * Defined in terms of {@link GlobSet.compileResult} — synchronous callers
2319
+ * can use that variant directly. Same semantics, same errors; this form
2320
+ * adds only the `GlobSet.compile` tracing span.
2321
+ */
2322
+ static compile = effect.Effect.fn("GlobSet.compile")(function* (patterns) {
2323
+ return yield* effect.Effect.fromResult(GlobSet.compileResult(patterns));
2271
2324
  });
2272
2325
  /**
2273
2326
  * Whether `candidate` matches the set: some include accepts it (literal
@@ -2300,7 +2353,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2300
2353
  }
2301
2354
  };
2302
2355
  //#endregion
2303
- //#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
2356
+ //#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
2304
2357
  /**
2305
2358
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2306
2359
  * when the format is `"bun"`.
@@ -2321,7 +2374,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
2321
2374
  trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
2322
2375
  }) {};
2323
2376
  //#endregion
2324
- //#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
2377
+ //#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
2325
2378
  /**
2326
2379
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2327
2380
  * version ranges.
@@ -2367,7 +2420,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
2367
2420
  static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
2368
2421
  };
2369
2422
  //#endregion
2370
- //#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
2423
+ //#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
2371
2424
  /**
2372
2425
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2373
2426
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2428,7 +2481,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
2428
2481
  static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
2429
2482
  };
2430
2483
  //#endregion
2431
- //#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
2484
+ //#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
2432
2485
  /**
2433
2486
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2434
2487
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2472,7 +2525,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
2472
2525
  }
2473
2526
  };
2474
2527
  //#endregion
2475
- //#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
2528
+ //#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
2476
2529
  /**
2477
2530
  * The short dependency kind: which dependency map an entry came from, named the
2478
2531
  * way consumers branch on it.
@@ -2504,7 +2557,7 @@ Object.fromEntries(Object.entries({
2504
2557
  optional: "optionalDependencies"
2505
2558
  }).map(([kind, field]) => [field, kind]));
2506
2559
  //#endregion
2507
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/desugar.js
2560
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/desugar.js
2508
2561
  const sv = (major, minor, patch, prerelease = [], build = []) => ({
2509
2562
  major,
2510
2563
  minor,
@@ -2593,7 +2646,7 @@ const desugarHyphen = (lower, upper) => {
2593
2646
  return [comp(">=", lowerVersion)];
2594
2647
  };
2595
2648
  //#endregion
2596
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/grammar.js
2649
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/grammar.js
2597
2650
  /** Private control-flow exception; never escapes the entry points. */
2598
2651
  var ParseFailure = class {
2599
2652
  position;
@@ -2988,7 +3041,7 @@ const formatComparator = (c) => {
2988
3041
  /** Print comparator sets as `a b || c d`. */
2989
3042
  const formatRange = (sets) => sets.map((set) => set.map(formatComparator).join(" ")).join(" || ");
2990
3043
  //#endregion
2991
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/order.js
3044
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/order.js
2992
3045
  /**
2993
3046
  * Compare two prerelease identifiers per SemVer 2.0.0 §11: numeric
2994
3047
  * identifiers always have lower precedence than alphanumeric ones; numerics
@@ -3041,7 +3094,7 @@ const compareBuild = (a, b) => {
3041
3094
  return 0;
3042
3095
  };
3043
3096
  //#endregion
3044
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/SemVer.js
3097
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/SemVer.js
3045
3098
  /**
3046
3099
  * Indicates that a string could not be parsed as a valid SemVer 2.0.0 version.
3047
3100
  *
@@ -3122,23 +3175,57 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3122
3175
  encode: (parts) => effect.Effect.succeed(formatVersion(parts))
3123
3176
  })));
3124
3177
  /**
3125
- * Parse a strict SemVer 2.0.0 version string.
3178
+ * Parse a strict SemVer 2.0.0 version string, synchronously, returning a
3179
+ * `Result` instead of an `Effect`.
3126
3180
  *
3127
3181
  * Rejects `v`/`V` prefixes, `=` prefixes, leading zeros on numeric
3128
3182
  * identifiers and partially consumed input.
3129
3183
  *
3184
+ * @remarks
3185
+ * {@link SemVer.parse} is defined in terms of this function; the two never
3186
+ * diverge. Reach for the `Effect` variant inside Effect code — it carries
3187
+ * the `SemVer.parse` tracing span — and for this one at synchronous
3188
+ * boundaries.
3189
+ *
3190
+ * @example
3191
+ * ```ts
3192
+ * import { SemVer } from "@effected/semver";
3193
+ * import { Result } from "effect";
3194
+ *
3195
+ * const ok = SemVer.parseResult("1.2.3");
3196
+ * if (Result.isSuccess(ok)) {
3197
+ * console.log(ok.success.major); // => 1
3198
+ * }
3199
+ *
3200
+ * const bad = SemVer.parseResult("v1.2.3");
3201
+ * if (Result.isFailure(bad)) {
3202
+ * console.log(bad.failure._tag); // => "InvalidVersionError"
3203
+ * }
3204
+ * ```
3205
+ *
3130
3206
  * @param input - the version string to parse
3131
- * @returns the parsed {@link SemVer}. Fails with {@link InvalidVersionError}
3132
- * when `input` is not a valid version string.
3207
+ * @returns a `Result` succeeding with the parsed {@link SemVer}, or failing
3208
+ * with {@link InvalidVersionError} when `input` is not a valid version
3209
+ * string.
3133
3210
  */
3134
- static parse = effect.Effect.fn("SemVer.parse")(function* (input) {
3211
+ static parseResult(input) {
3135
3212
  const result = parseVersion(input);
3136
- if (!result.ok) return yield* new InvalidVersionError({
3213
+ if (!result.ok) return effect.Result.fail(new InvalidVersionError({
3137
3214
  input: result.input,
3138
3215
  position: result.position
3139
- });
3140
- return SemVer.make(result.value);
3141
- });
3216
+ }));
3217
+ return effect.Result.succeed(SemVer.make(result.value));
3218
+ }
3219
+ /**
3220
+ * Parse a strict SemVer 2.0.0 version string. Defined in terms of
3221
+ * {@link SemVer.parseResult} — synchronous callers can use that variant
3222
+ * directly.
3223
+ *
3224
+ * @param input - the version string to parse
3225
+ * @returns the parsed {@link SemVer}. Fails with {@link InvalidVersionError}
3226
+ * when `input` is not a valid version string.
3227
+ */
3228
+ static parse = effect.Effect.fn("SemVer.parse")((input) => effect.Effect.fromResult(SemVer.parseResult(input)));
3142
3229
  /**
3143
3230
  * Positional convenience constructor: `SemVer.of(1, 2, 3)`.
3144
3231
  *
@@ -3442,7 +3529,7 @@ var SemVerBump = class {
3442
3529
  }
3443
3530
  };
3444
3531
  //#endregion
3445
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/Comparator.js
3532
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/Comparator.js
3446
3533
  /**
3447
3534
  * Indicates that a string could not be parsed as a single comparator.
3448
3535
  *
@@ -3509,18 +3596,52 @@ var Comparator = class Comparator extends effect.Schema.Class("Comparator")({
3509
3596
  },
3510
3597
  encode: (parts) => effect.Effect.succeed(formatComparator(parts))
3511
3598
  })));
3512
- /** Parse a comparator string (e.g. `">=1.2.3"`). */
3513
- static parse = effect.Effect.fn("Comparator.parse")(function* (input) {
3599
+ /**
3600
+ * Parse a comparator string (e.g. `">=1.2.3"`), synchronously, returning a
3601
+ * `Result` instead of an `Effect`.
3602
+ *
3603
+ * @remarks
3604
+ * {@link Comparator.parse} is defined in terms of this function; the two
3605
+ * never diverge. Reach for the `Effect` variant inside Effect code — it
3606
+ * carries the `Comparator.parse` tracing span — and for this one at
3607
+ * synchronous boundaries.
3608
+ *
3609
+ * @example
3610
+ * ```ts
3611
+ * import { Comparator } from "@effected/semver";
3612
+ * import { Result } from "effect";
3613
+ *
3614
+ * const ok = Comparator.parseResult(">=1.2.3");
3615
+ * if (Result.isSuccess(ok)) {
3616
+ * console.log(ok.success.operator); // => ">="
3617
+ * }
3618
+ * ```
3619
+ *
3620
+ * @param input - the comparator string to parse
3621
+ * @returns a `Result` succeeding with the parsed {@link Comparator}, or
3622
+ * failing with {@link InvalidComparatorError}.
3623
+ */
3624
+ static parseResult(input) {
3514
3625
  const result = parseComparator(input);
3515
- if (!result.ok) return yield* new InvalidComparatorError({
3626
+ if (!result.ok) return effect.Result.fail(new InvalidComparatorError({
3516
3627
  input: result.input,
3517
3628
  position: result.position
3518
- });
3519
- return Comparator.make({
3629
+ }));
3630
+ return effect.Result.succeed(Comparator.make({
3520
3631
  operator: result.value.operator,
3521
3632
  version: SemVer.make(result.value.version)
3522
- });
3523
- });
3633
+ }));
3634
+ }
3635
+ /**
3636
+ * Parse a comparator string (e.g. `">=1.2.3"`). Defined in terms of
3637
+ * {@link Comparator.parseResult} — synchronous callers can use that variant
3638
+ * directly.
3639
+ *
3640
+ * @param input - the comparator string to parse
3641
+ * @returns the parsed {@link Comparator}. Fails with
3642
+ * {@link InvalidComparatorError}.
3643
+ */
3644
+ static parse = effect.Effect.fn("Comparator.parse")((input) => effect.Effect.fromResult(Comparator.parseResult(input)));
3524
3645
  /** Test whether a version satisfies this comparator. */
3525
3646
  test(version) {
3526
3647
  const cmp = version.compare(this.version);
@@ -3542,7 +3663,7 @@ var Comparator = class Comparator extends effect.Schema.Class("Comparator")({
3542
3663
  }
3543
3664
  };
3544
3665
  //#endregion
3545
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/normalize.js
3666
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/normalize.js
3546
3667
  const operatorWeight = (op) => {
3547
3668
  switch (op) {
3548
3669
  case ">=": return 0;
@@ -3573,7 +3694,7 @@ const normalizeComparatorSet = (set) => sortComparators(removeDuplicates(set));
3573
3694
  /** Normalize every comparator set in a range: sort and deduplicate each independently. */
3574
3695
  const normalizeSets = (sets) => sets.map(normalizeComparatorSet);
3575
3696
  //#endregion
3576
- //#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/Range.js
3697
+ //#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/Range.js
3577
3698
  /**
3578
3699
  * Indicates that a string could not be parsed as a range expression.
3579
3700
  *
@@ -3633,18 +3754,51 @@ sets: effect.Schema.Array(effect.Schema.Array(Comparator)) }) {
3633
3754
  },
3634
3755
  encode: (parts) => effect.Effect.succeed(formatRange(parts.sets))
3635
3756
  })));
3636
- /** Parse a range expression and normalize its comparator sets. */
3637
- static parse = effect.Effect.fn("Range.parse")(function* (input) {
3757
+ /**
3758
+ * Parse a range expression and normalize its comparator sets,
3759
+ * synchronously, returning a `Result` instead of an `Effect`.
3760
+ *
3761
+ * @remarks
3762
+ * {@link Range.parse} is defined in terms of this function; the two never
3763
+ * diverge. Reach for the `Effect` variant inside Effect code — it carries
3764
+ * the `Range.parse` tracing span — and for this one at synchronous
3765
+ * boundaries.
3766
+ *
3767
+ * @example
3768
+ * ```ts
3769
+ * import { Range } from "@effected/semver";
3770
+ * import { Result } from "effect";
3771
+ *
3772
+ * const ok = Range.parseResult("^1.0.0");
3773
+ * if (Result.isSuccess(ok)) {
3774
+ * console.log(ok.success.toString()); // => ">=1.0.0 <2.0.0-0"
3775
+ * }
3776
+ * ```
3777
+ *
3778
+ * @param input - the range expression to parse
3779
+ * @returns a `Result` succeeding with the parsed {@link Range}, or failing
3780
+ * with {@link InvalidRangeError}.
3781
+ */
3782
+ static parseResult(input) {
3638
3783
  const result = parseRange$1(input);
3639
- if (!result.ok) return yield* new InvalidRangeError({
3784
+ if (!result.ok) return effect.Result.fail(new InvalidRangeError({
3640
3785
  input: result.input,
3641
3786
  position: result.position
3642
- });
3643
- return Range.make({ sets: normalizeSets(result.value).map((set) => set.map((c) => Comparator.make({
3787
+ }));
3788
+ return effect.Result.succeed(Range.make({ sets: normalizeSets(result.value).map((set) => set.map((c) => Comparator.make({
3644
3789
  operator: c.operator,
3645
3790
  version: SemVer.make(c.version)
3646
- }))) });
3647
- });
3791
+ }))) }));
3792
+ }
3793
+ /**
3794
+ * Parse a range expression and normalize its comparator sets. Defined in
3795
+ * terms of {@link Range.parseResult} — synchronous callers can use that
3796
+ * variant directly.
3797
+ *
3798
+ * @param input - the range expression to parse
3799
+ * @returns the parsed {@link Range}. Fails with {@link InvalidRangeError}.
3800
+ */
3801
+ static parse = effect.Effect.fn("Range.parse")((input) => effect.Effect.fromResult(Range.parseResult(input)));
3648
3802
  /**
3649
3803
  * Test whether a version satisfies a range; see {@link Range.test} for the
3650
3804
  * prerelease matching rule. Dual API.
@@ -3671,19 +3825,49 @@ sets: effect.Schema.Array(effect.Schema.Array(Comparator)) }) {
3671
3825
  static union = effect.Function.dual(2, (self, that) => Range.make({ sets: [...self.sets, ...that.sets] }));
3672
3826
  /**
3673
3827
  * Intersect two ranges via a cross-product of their comparator sets,
3674
- * keeping only satisfiable combinations. Fails with
3828
+ * keeping only satisfiable combinations, synchronously, returning a
3829
+ * `Result` instead of an `Effect`. Fails with
3675
3830
  * {@link UnsatisfiableConstraintError} when no satisfiable set remains —
3676
3831
  * an honest typed failure instead of an unsatisfiable range. Dual API.
3832
+ *
3833
+ * @remarks
3834
+ * {@link Range.intersect} is defined in terms of this function; the two
3835
+ * never diverge. Reach for the `Effect` variant inside Effect code — it
3836
+ * carries the `Range.intersect` tracing span — and for this one at
3837
+ * synchronous boundaries.
3838
+ *
3839
+ * @example
3840
+ * ```ts
3841
+ * import { Range } from "@effected/semver";
3842
+ * import { Result } from "effect";
3843
+ *
3844
+ * const a = Result.getOrThrow(Range.parseResult("^1.0.0"));
3845
+ * const b = Result.getOrThrow(Range.parseResult(">=1.5.0"));
3846
+ * const merged = Range.intersectResult(a, b);
3847
+ * if (Result.isSuccess(merged)) {
3848
+ * console.log(merged.success.toString()); // => ">=1.0.0 <2.0.0-0 >=1.5.0"
3849
+ * }
3850
+ * ```
3677
3851
  */
3678
- static intersect = effect.Function.dual(2, effect.Effect.fn("Range.intersect")(function* (self, that) {
3852
+ static intersectResult = effect.Function.dual(2, (self, that) => {
3679
3853
  const candidates = [];
3680
3854
  for (const setA of self.sets) for (const setB of that.sets) {
3681
3855
  const merged = [...setA, ...setB];
3682
3856
  if (isSetSatisfiable(merged)) candidates.push(merged);
3683
3857
  }
3684
- if (candidates.length === 0) return yield* new UnsatisfiableConstraintError({ constraints: [self, that] });
3685
- return Range.make({ sets: candidates });
3686
- }));
3858
+ if (candidates.length === 0) return effect.Result.fail(new UnsatisfiableConstraintError({ constraints: [self, that] }));
3859
+ return effect.Result.succeed(Range.make({ sets: candidates }));
3860
+ });
3861
+ /**
3862
+ * Intersect two ranges via a cross-product of their comparator sets,
3863
+ * keeping only satisfiable combinations. Fails with
3864
+ * {@link UnsatisfiableConstraintError} when no satisfiable set remains —
3865
+ * an honest typed failure instead of an unsatisfiable range. Dual API.
3866
+ *
3867
+ * Defined in terms of {@link Range.intersectResult} — synchronous callers
3868
+ * can use that variant directly.
3869
+ */
3870
+ static intersect = effect.Function.dual(2, effect.Effect.fn("Range.intersect")((self, that) => effect.Effect.fromResult(Range.intersectResult(self, that))));
3687
3871
  /**
3688
3872
  * Check whether every version matched by `sub` is also matched by `sup`.
3689
3873
  * Dual API.
@@ -3842,7 +4026,7 @@ const isComparatorSetSubset = (sub, sup) => {
3842
4026
  return true;
3843
4027
  };
3844
4028
  //#endregion
3845
- //#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
4029
+ //#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
3846
4030
  /**
3847
4031
  * Indicates that a string could not be parsed as a valid dependency specifier.
3848
4032
  *
@@ -4049,7 +4233,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4049
4233
  FromString: fromString
4050
4234
  });
4051
4235
  //#endregion
4052
- //#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
4236
+ //#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
4053
4237
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4054
4238
  const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
4055
4239
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
@@ -4102,7 +4286,7 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4102
4286
  decode: decode$2
4103
4287
  });
4104
4288
  //#endregion
4105
- //#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
4289
+ //#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
4106
4290
  /**
4107
4291
  * One declared dependency of one workspace importer, as the lockfile records it.
4108
4292
  *
@@ -4130,7 +4314,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
4130
4314
  depType: DependencyField
4131
4315
  }) {};
4132
4316
  //#endregion
4133
- //#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
4317
+ //#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
4134
4318
  /**
4135
4319
  * One workspace importer's declared dependencies, as the lockfile records them.
4136
4320
  *
@@ -4154,7 +4338,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
4154
4338
  dependencies: effect.Schema.Array(ImporterDependency)
4155
4339
  }) {};
4156
4340
  //#endregion
4157
- //#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
4341
+ //#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
4158
4342
  const EMPTY_DEPENDENCIES = {};
4159
4343
  /**
4160
4344
  * A package resolved from a lockfile.
@@ -4189,7 +4373,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
4189
4373
  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)))
4190
4374
  }) {};
4191
4375
  //#endregion
4192
- //#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
4376
+ //#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
4193
4377
  /**
4194
4378
  * A directed dependency edge between two workspace packages as recorded in
4195
4379
  * the lockfile.
@@ -4211,7 +4395,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
4211
4395
  constraint: effect.Schema.String
4212
4396
  }) {};
4213
4397
  //#endregion
4214
- //#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
4398
+ //#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
4215
4399
  /**
4216
4400
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
4217
4401
  * when the format is `"pnpm"`.
@@ -4236,7 +4420,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
4236
4420
  }))
4237
4421
  }) {};
4238
4422
  //#endregion
4239
- //#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
4423
+ //#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
4240
4424
  /**
4241
4425
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
4242
4426
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -4270,7 +4454,7 @@ const FILENAMES = {
4270
4454
  */
4271
4455
  const filenameFor = (format) => FILENAMES[format];
4272
4456
  //#endregion
4273
- //#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
4457
+ //#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
4274
4458
  /**
4275
4459
  * The four dependency sections of a manifest, in a stable order — the shared
4276
4460
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -4396,7 +4580,7 @@ const extractWorkspaceDeps = (workspaces, workspaceNames) => {
4396
4580
  return deps;
4397
4581
  };
4398
4582
  //#endregion
4399
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncNode.js
4583
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncNode.js
4400
4584
  /**
4401
4585
  * Discriminator values for JSONC AST node types: the JSON value types
4402
4586
  * (`string`/`number`/`boolean`/`null`), the structural types
@@ -4571,7 +4755,7 @@ function evaluateNode(node, depth) {
4571
4755
  }
4572
4756
  }
4573
4757
  //#endregion
4574
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/scanner.js
4758
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/scanner.js
4575
4759
  const isWhitespace = (ch) => ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch === 65279;
4576
4760
  const isLineBreak$1 = (ch) => ch === 10 || ch === 13 || ch === 8232 || ch === 8233;
4577
4761
  const isDigit$1 = (ch) => ch >= 48 && ch <= 57;
@@ -4867,7 +5051,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
4867
5051
  };
4868
5052
  };
4869
5053
  //#endregion
4870
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/skip.js
5054
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/skip.js
4871
5055
  /**
4872
5056
  * Iteratively consume the value beginning at the cursor's current token and
4873
5057
  * return its tight end offset (excludes trailing whitespace/comments).
@@ -4897,7 +5081,7 @@ const skipBalancedValue = (cursor) => {
4897
5081
  return end;
4898
5082
  };
4899
5083
  //#endregion
4900
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/parser.js
5084
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/parser.js
4901
5085
  /**
4902
5086
  * The public parse-error code vocabulary. The facade builds its `@public`
4903
5087
  * `JsoncParseErrorCode` schema from this array; the parser produces these codes
@@ -5310,7 +5494,7 @@ const parseTree$2 = (text, flags) => {
5310
5494
  };
5311
5495
  };
5312
5496
  //#endregion
5313
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/Jsonc.js
5497
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/Jsonc.js
5314
5498
  /**
5315
5499
  * The single public parse-error code vocabulary, appearing as the `code` field
5316
5500
  * of {@link JsoncParseErrorDetail}.
@@ -5535,9 +5719,57 @@ var Jsonc = class Jsonc {
5535
5719
  */
5536
5720
  static parse = effect.Effect.fn("Jsonc.parse")((text, options) => effect.Effect.fromResult(Jsonc.parseResult(text, options)));
5537
5721
  /**
5722
+ * Parse JSONC into an immutable {@link JsoncNode} AST, synchronously,
5723
+ * returning a `Result` instead of an `Effect`. `Option.none()` for empty
5724
+ * input (with `allowEmptyContent`); the aggregate {@link JsoncParseError}
5725
+ * for malformed input. Pure — parsing is fundamentally synchronous, so
5726
+ * non-Effect consumers (a plain config loader, a build script) can call
5727
+ * this directly instead of wrapping
5728
+ * `Effect.runSync(Effect.result(Jsonc.parseTree(text)))`.
5729
+ *
5730
+ * @remarks
5731
+ * {@link Jsonc.parseTree} is defined in terms of this function; the two
5732
+ * never diverge. Reach for the `Effect` variant inside Effect code — it
5733
+ * carries the `Jsonc.parseTree` tracing span — and for this one at
5734
+ * synchronous boundaries.
5735
+ *
5736
+ * @example
5737
+ * ```ts
5738
+ * import { Jsonc } from "@effected/jsonc";
5739
+ * import { Option, Result } from "effect";
5740
+ *
5741
+ * const ok = Jsonc.parseTreeResult('{ "port": 3000 // dev\n }');
5742
+ * if (Result.isSuccess(ok) && Option.isSome(ok.success)) {
5743
+ * console.log(ok.success.value.type); // => "object"
5744
+ * }
5745
+ *
5746
+ * const bad = Jsonc.parseTreeResult("{ bad }");
5747
+ * if (Result.isFailure(bad)) {
5748
+ * console.log(bad.failure._tag); // => "JsoncParseError"
5749
+ * }
5750
+ * ```
5751
+ *
5752
+ * @param text - The JSONC source to parse.
5753
+ * @param options - Optional {@link JsoncParseOptions}; defaults apply for
5754
+ * omitted fields.
5755
+ * @returns A `Result` succeeding with `Option.some(root)` (or
5756
+ * `Option.none()` for empty input), or failing with the aggregate
5757
+ * {@link JsoncParseError}.
5758
+ */
5759
+ static parseTreeResult(text, options) {
5760
+ const { root, errors } = parseTree$2(text, toFlags(options));
5761
+ if (errors.length > 0) return effect.Result.fail(new JsoncParseError({
5762
+ errors: toDetails(text, errors),
5763
+ input: text
5764
+ }));
5765
+ return effect.Result.succeed(root !== void 0 ? effect.Option.some(root) : effect.Option.none());
5766
+ }
5767
+ /**
5538
5768
  * Parse JSONC into an immutable {@link JsoncNode} AST. `Option.none()` for
5539
5769
  * empty input (with `allowEmptyContent`); the aggregate
5540
- * {@link JsoncParseError} for malformed input.
5770
+ * {@link JsoncParseError} for malformed input. Defined in terms of
5771
+ * {@link Jsonc.parseTreeResult} — synchronous callers can use that variant
5772
+ * directly.
5541
5773
  *
5542
5774
  * @param text - The JSONC source to parse.
5543
5775
  * @param options - Optional {@link JsoncParseOptions}; defaults apply for
@@ -5546,14 +5778,7 @@ var Jsonc = class Jsonc {
5546
5778
  * `Option.none()` for empty input), or fails with the aggregate
5547
5779
  * {@link JsoncParseError}.
5548
5780
  */
5549
- static parseTree = effect.Effect.fn("Jsonc.parseTree")(function* (text, options) {
5550
- const { root, errors } = parseTree$2(text, toFlags(options));
5551
- if (errors.length > 0) return yield* new JsoncParseError({
5552
- errors: toDetails(text, errors),
5553
- input: text
5554
- });
5555
- return root !== void 0 ? effect.Option.some(root) : effect.Option.none();
5556
- });
5781
+ static parseTree = effect.Effect.fn("Jsonc.parseTree")((text, options) => effect.Effect.fromResult(Jsonc.parseTreeResult(text, options)));
5557
5782
  /**
5558
5783
  * Stringify a plain JavaScript value as JSON text, synchronously, returning
5559
5784
  * a `Result` instead of an `Effect`. With no options the output is
@@ -5873,7 +6098,7 @@ var JsoncEdit = class extends effect.Schema.Class("JsoncEdit")({
5873
6098
  }
5874
6099
  };
5875
6100
  //#endregion
5876
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/navigate.js
6101
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/navigate.js
5877
6102
  /**
5878
6103
  * Resolve `path` against `text`, returning where the target is (or where it
5879
6104
  * would be inserted). `path` must be non-empty — the whole-document case is
@@ -6000,7 +6225,7 @@ function navigate(text, path) {
6000
6225
  return { _tag: "NoOp" };
6001
6226
  }
6002
6227
  //#endregion
6003
- //#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncModifier.js
6228
+ //#region ../../node_modules/.pnpm/@effected+jsonc@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncModifier.js
6004
6229
  /**
6005
6230
  * Raised when `JsoncModifier.modify` cannot navigate the requested path: the
6006
6231
  * value at `depth` is not the container kind (`expected`) the next path segment
@@ -6128,7 +6353,7 @@ var JsoncModifier = class {
6128
6353
  });
6129
6354
  };
6130
6355
  //#endregion
6131
- //#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
6356
+ //#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
6132
6357
  const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6133
6358
  const BunWorkspaceEntry = effect.Schema.Struct({
6134
6359
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6221,7 +6446,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
6221
6446
  };
6222
6447
  });
6223
6448
  //#endregion
6224
- //#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
6449
+ //#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
6225
6450
  const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6226
6451
  const NpmPackageEntry = effect.Schema.Struct({
6227
6452
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6319,7 +6544,7 @@ const toFields$2 = (raw) => effect.Effect.gen(function* () {
6319
6544
  };
6320
6545
  });
6321
6546
  //#endregion
6322
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlNode.js
6547
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlNode.js
6323
6548
  /**
6324
6549
  * YAML scalar presentation styles.
6325
6550
  *
@@ -6339,6 +6564,16 @@ const ScalarStyle = effect.Schema.Literals([
6339
6564
  */
6340
6565
  const CollectionStyle = effect.Schema.Literals(["block", "flow"]);
6341
6566
  /**
6567
+ * Quote characters available to the stringifier's plain-scalar fallback: the
6568
+ * style a `plain`-styled scalar is rendered in when it turns out to require
6569
+ * quoting. Referenced by the `quoteStyle` field of `YamlStringifyOptions`;
6570
+ * unlike `ScalarStyle` it is a stringify-option vocabulary, never a property
6571
+ * of a composed node.
6572
+ *
6573
+ * @public
6574
+ */
6575
+ const QuoteStyle = effect.Schema.Literals(["single", "double"]);
6576
+ /**
6342
6577
  * Block-scalar chomping indicators (`-` strip, default clip, `+` keep).
6343
6578
  * Referenced by the {@link YamlScalar} `chomp` field schema.
6344
6579
  *
@@ -6711,7 +6946,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
6711
6946
  return null;
6712
6947
  }
6713
6948
  //#endregion
6714
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/diagnostics.js
6949
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/diagnostics.js
6715
6950
  /** Error codes emitted by the lexer stage. */
6716
6951
  const YAML_LEX_ERROR_CODES = [
6717
6952
  "UnexpectedCharacter",
@@ -6789,7 +7024,7 @@ function isFatalCode(code) {
6789
7024
  return FATAL_CODES.has(code);
6790
7025
  }
6791
7026
  //#endregion
6792
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlDiagnostic.js
7027
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlDiagnostic.js
6793
7028
  /**
6794
7029
  * Error codes emitted by the lexer stage.
6795
7030
  *
@@ -6910,7 +7145,7 @@ function lineChar(text, offset) {
6910
7145
  };
6911
7146
  }
6912
7147
  //#endregion
6913
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/anchors.js
7148
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/anchors.js
6914
7149
  /**
6915
7150
  * Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
6916
7151
  * Aliases represent references to existing anchored nodes and cannot have their own anchors.
@@ -7003,7 +7238,7 @@ function collectAnchors(node, anchors) {
7003
7238
  }
7004
7239
  }
7005
7240
  //#endregion
7006
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/lexer.js
7241
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/lexer.js
7007
7242
  /**
7008
7243
  * Create a new YAML scanner for the given source text.
7009
7244
  *
@@ -7960,7 +8195,7 @@ function lexAll(text) {
7960
8195
  return tokens;
7961
8196
  }
7962
8197
  //#endregion
7963
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/cst-parser.js
8198
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/cst-parser.js
7964
8199
  /**
7965
8200
  * Hardening: cap CST nesting so hostile inputs cannot overflow the stack
7966
8201
  * while the tree is being BUILT. Set slightly above the composer's
@@ -8672,7 +8907,7 @@ function parseCSTAll(text) {
8672
8907
  return parseDocuments(lexAll(text), text);
8673
8908
  }
8674
8909
  //#endregion
8675
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/state.js
8910
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/state.js
8676
8911
  let lineStartsText;
8677
8912
  let lineStartsCache = [];
8678
8913
  function getLineStarts(text) {
@@ -8778,7 +9013,7 @@ function exitNesting(state) {
8778
9013
  state.depth--;
8779
9014
  }
8780
9015
  //#endregion
8781
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/tags.js
9016
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/tags.js
8782
9017
  /**
8783
9018
  * Resolve a tag shorthand using the document's %TAG directives.
8784
9019
  * For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
@@ -8864,7 +9099,7 @@ function validateTagHandlesInDocument(docCst, state) {
8864
9099
  }
8865
9100
  }
8866
9101
  //#endregion
8867
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/scalars.js
9102
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/scalars.js
8868
9103
  const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
8869
9104
  const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
8870
9105
  const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
@@ -9742,7 +9977,7 @@ function shouldPreserveRaw(rawValue, value) {
9742
9977
  return false;
9743
9978
  }
9744
9979
  //#endregion
9745
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/block.js
9980
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/block.js
9746
9981
  /**
9747
9982
  * Compose a block map from its CST children, with an optional external first key.
9748
9983
  *
@@ -10890,7 +11125,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
10890
11125
  return map;
10891
11126
  }
10892
11127
  //#endregion
10893
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/flow.js
11128
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/flow.js
10894
11129
  /**
10895
11130
  * Validate that flow collection entries are separated by commas.
10896
11131
  *
@@ -11282,7 +11517,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
11282
11517
  return seq;
11283
11518
  }
11284
11519
  //#endregion
11285
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/document.js
11520
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/document.js
11286
11521
  /** The flow-composer dispatch wired into every state this module creates. */
11287
11522
  const FLOW = {
11288
11523
  composeFlowMap,
@@ -11948,7 +12183,7 @@ function composeAllDocuments(text, options) {
11948
12183
  };
11949
12184
  }
11950
12185
  //#endregion
11951
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/fold.js
12186
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/fold.js
11952
12187
  /**
11953
12188
  * Column-based line folding for a single logical scalar line (YAML 1.2 flow
11954
12189
  * folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
@@ -12184,7 +12419,7 @@ function renderBlockFolded(s, indent) {
12184
12419
  return `>${indentIndicator}${chomp}\n${outputLines.join("\n")}`;
12185
12420
  }
12186
12421
  //#endregion
12187
- //#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/stringifier.js
12422
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.5.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/stringifier.js
12188
12423
  /**
12189
12424
  * Thrown by the stringifier on its failure paths (circular references). The
12190
12425
  * facade catches this and materializes the public stringify error.
@@ -12290,7 +12525,10 @@ function requiresQuoting(s, ignoreType = false) {
12290
12525
  if (s.includes(" #") || s.includes(" #")) return true;
12291
12526
  const last = s[s.length - 1];
12292
12527
  if (last === " " || last === " ") return true;
12293
- for (let i = 0; i < s.length; i++) if (isControlChar(s.charCodeAt(i))) return true;
12528
+ for (let i = 0; i < s.length; i++) {
12529
+ const code = s.charCodeAt(i);
12530
+ if (code === 9 || code === 13 || isControlChar(code)) return true;
12531
+ }
12294
12532
  return false;
12295
12533
  }
12296
12534
  /**
@@ -12347,11 +12585,13 @@ function renderSingleQuoted(s) {
12347
12585
  *
12348
12586
  * Multi-line strings are routed to block styles regardless of the requested
12349
12587
  * style (except double-quoted). For single-line strings, plain style delegates
12350
- * to {@link requiresQuoting} and falls back to double-quoted when the value
12351
- * would be ambiguous. Block literal and block folded styles are always
12352
- * accepted for single-line strings even though the output is unusual.
12588
+ * to {@link requiresQuoting} and falls back to `quoteStyle` (single-quoted by
12589
+ * default, double-quoted when the caller asked for it) or to double-quoted
12590
+ * regardless when the value needs YAML escapes single quotes cannot express.
12591
+ * Block literal and block folded styles are always accepted for single-line
12592
+ * strings even though the output is unusual.
12353
12593
  */
12354
- function renderString(s, style, indent, ignoreType = false, canonical = false, explicitChomp, parentPosition) {
12594
+ function renderString(s, style, indent, ignoreType = false, canonical = false, explicitChomp, parentPosition, quoteStyle = "single") {
12355
12595
  if (s.includes("\n")) {
12356
12596
  let hasControl = false;
12357
12597
  for (let i = 0; i < s.length; i++) {
@@ -12385,7 +12625,7 @@ function renderString(s, style, indent, ignoreType = false, canonical = false, e
12385
12625
  if (requiresQuoting(s, ignoreType)) {
12386
12626
  if (s.includes(" ") || s.includes("\r")) return renderDoubleQuoted(s, canonical);
12387
12627
  for (let i = 0; i < s.length; i++) if (isControlChar(s.charCodeAt(i))) return renderDoubleQuoted(s, canonical);
12388
- return renderSingleQuoted(s);
12628
+ return quoteStyle === "double" ? renderDoubleQuoted(s, canonical) : renderSingleQuoted(s);
12389
12629
  }
12390
12630
  return s;
12391
12631
  case "single-quoted": return renderSingleQuoted(s);
@@ -12425,6 +12665,7 @@ function createContext(options) {
12425
12665
  defaultCollectionStyle: options?.defaultCollectionStyle ?? "block",
12426
12666
  sortKeys: options?.sortKeys ?? false,
12427
12667
  indentSequences: options?.indentSequences ?? false,
12668
+ quoteStyle: options?.quoteStyle ?? "single",
12428
12669
  forceDefaultStyles: options?.forceDefaultStyles ?? false,
12429
12670
  seen: /* @__PURE__ */ new Set()
12430
12671
  };
@@ -12444,7 +12685,7 @@ function stringifyLines(value, ctx, depth, allowFold = true) {
12444
12685
  if (typeof value === "bigint") return [value.toString()];
12445
12686
  if (typeof value === "string") {
12446
12687
  const indentStr = " ".repeat(ctx.indent);
12447
- const rendered = renderString(value, ctx.defaultScalarStyle, indentStr, false, ctx.forceDefaultStyles);
12688
+ const rendered = renderString(value, ctx.defaultScalarStyle, indentStr, false, ctx.forceDefaultStyles, void 0, void 0, ctx.quoteStyle);
12448
12689
  return (allowFold && ctx.lineWidth > 0 ? foldRenderedScalar(rendered, indentStr, ctx.lineWidth) : rendered).split("\n");
12449
12690
  }
12450
12691
  if (Array.isArray(value)) {
@@ -12509,10 +12750,11 @@ function stringifyObjectLines(obj, ctx, depth) {
12509
12750
  const keys = Object.keys(obj);
12510
12751
  if (keys.length === 0) return ["{}"];
12511
12752
  if (ctx.sortKeys) keys.sort();
12753
+ const renderPlainKey = (k) => renderString(k, "plain", "", false, false, void 0, void 0, ctx.quoteStyle);
12512
12754
  if (ctx.defaultCollectionStyle === "flow") return [`{${keys.map((k) => {
12513
- return `${renderString(k, "plain", "")}: ${stringifyLines(obj[k], ctx, depth + 1, false).join(" ")}`;
12755
+ return `${renderPlainKey(k)}: ${stringifyLines(obj[k], ctx, depth + 1, false).join(" ")}`;
12514
12756
  }).join(", ")}}`];
12515
- const renderKey = (k) => k.includes("\n") ? renderDoubleQuoted(k, ctx.forceDefaultStyles) : renderString(k, "plain", "");
12757
+ const renderKey = (k) => k.includes("\n") ? renderDoubleQuoted(k, ctx.forceDefaultStyles) : renderPlainKey(k);
12516
12758
  const pad = " ".repeat(ctx.indent);
12517
12759
  const lines = [];
12518
12760
  for (const k of keys) {
@@ -12560,7 +12802,7 @@ effect.Schema.Class("YamlStringifyOptions")({
12560
12802
  * (`>`) scalars at approximately that column, never block-literal (`|`).
12561
12803
  *
12562
12804
  * Takes effect only through {@link Yaml.stringify} and
12563
- * {@link Yaml.stringifySync} — the two entry points that accept these
12805
+ * {@link Yaml.stringifyResult} — the two entry points that accept these
12564
12806
  * options on the value path. The schema factories ({@link Yaml.fromString},
12565
12807
  * {@link Yaml.schema}, {@link Yaml.YamlFromString}) encode with default
12566
12808
  * stringify options (`lineWidth` `0`), so their output never folds. The
@@ -12573,6 +12815,17 @@ effect.Schema.Class("YamlStringifyOptions")({
12573
12815
  defaultCollectionStyle: effect.Schema.optionalKey(CollectionStyle),
12574
12816
  sortKeys: effect.Schema.optionalKey(effect.Schema.Boolean),
12575
12817
  indentSequences: effect.Schema.optionalKey(effect.Schema.Boolean),
12818
+ /**
12819
+ * Quote style used when a `plain`-styled scalar requires quoting. Default
12820
+ * `"single"` — the released byte-compatible behavior. `"double"` renders
12821
+ * the same scalars double-quoted instead, matching the `yaml` npm
12822
+ * package's `singleQuote: false` output.
12823
+ *
12824
+ * Affects only the plain fallback: scalars that need no quoting stay
12825
+ * plain, and an explicit `defaultScalarStyle` of `"single-quoted"` or
12826
+ * `"double-quoted"` is unaffected.
12827
+ */
12828
+ quoteStyle: effect.Schema.optionalKey(QuoteStyle),
12576
12829
  finalNewline: effect.Schema.optionalKey(effect.Schema.Boolean),
12577
12830
  forceDefaultStyles: effect.Schema.optionalKey(effect.Schema.Boolean)
12578
12831
  });
@@ -12622,6 +12875,7 @@ const toStringifyInput = (options) => options === void 0 ? {} : {
12622
12875
  defaultCollectionStyle: options.defaultCollectionStyle,
12623
12876
  sortKeys: options.sortKeys,
12624
12877
  indentSequences: options.indentSequences,
12878
+ quoteStyle: options.quoteStyle,
12625
12879
  finalNewline: options.finalNewline,
12626
12880
  forceDefaultStyles: options.forceDefaultStyles
12627
12881
  };
@@ -12679,7 +12933,7 @@ const stringifyDefectToError = (defect, value) => {
12679
12933
  * mode (fatal diagnostics, duplicate keys, a "billion laughs" blow-up) yields
12680
12934
  * a `Failure` carrying a typed {@link YamlParseError} — never a throw.
12681
12935
  */
12682
- const parseSyncImpl = (text, options) => {
12936
+ const parseResultImpl = (text, options) => {
12683
12937
  const doc = composeFirstDocument(text, toParseInput(options));
12684
12938
  const failures = failureRecords(doc, options?.uniqueKeys ?? true);
12685
12939
  if (failures.length > 0) return effect.Result.fail(new YamlParseError({
@@ -12700,7 +12954,7 @@ const parseSyncImpl = (text, options) => {
12700
12954
  * recursion budget yields a `Failure` carrying a typed {@link YamlStringifyError},
12701
12955
  * never a thrown defect.
12702
12956
  */
12703
- const stringifySyncImpl = (value, options) => {
12957
+ const stringifyResultImpl = (value, options) => {
12704
12958
  try {
12705
12959
  return effect.Result.succeed(stringifyValue(value, toStringifyInput(options)));
12706
12960
  } catch (defect) {
@@ -12777,17 +13031,11 @@ var Yaml = class Yaml {
12777
13031
  * resolved size grows exponentially relative to `maxAliasCount`) also
12778
13032
  * fails through {@link YamlParseError} with an `AliasCountExceeded`
12779
13033
  * diagnostic, never as an unhandled defect.
13034
+ *
13035
+ * Defined in terms of {@link Yaml.parseResult} — synchronous callers can
13036
+ * use that variant directly.
12780
13037
  */
12781
- static parse = effect.Effect.fn("Yaml.parse")(function* (text, options) {
12782
- const doc = composeFirstDocument(text, toParseInput(options));
12783
- const failures = failureRecords(doc, options?.uniqueKeys ?? true);
12784
- if (failures.length > 0) return yield* new YamlParseError({
12785
- diagnostics: toDiagnostics(text, failures),
12786
- input: text
12787
- });
12788
- const anchors = /* @__PURE__ */ new Map();
12789
- return yield* extractDocumentValue(doc.contents, anchors, options?.maxAliasCount ?? 100, text);
12790
- });
13038
+ static parse = effect.Effect.fn("Yaml.parse")((text, options) => effect.Effect.fromResult(Yaml.parseResult(text, options)));
12791
13039
  /**
12792
13040
  * Parse a multi-document YAML stream into an array of plain JavaScript
12793
13041
  * values (one per document, in order). Any fatal diagnostic in any
@@ -12820,6 +13068,15 @@ var Yaml = class Yaml {
12820
13068
  * or on a value nested deeper than the stringifier's recursion budget
12821
13069
  * (`NestingDepthExceeded`) — both surface through the typed error channel
12822
13070
  * rather than as an unhandled stack-overflow defect.
13071
+ *
13072
+ * @remarks
13073
+ * A `"<<"` object key is emitted **quoted** (`'<<': …`). This is the
13074
+ * opposite of the document path ({@link YamlFormat.format} and
13075
+ * `YamlDocument#stringify`), which leaves a parsed plain `<<` key unquoted
13076
+ * so it keeps its merge-key meaning, and the asymmetry is deliberate: a
13077
+ * `"<<"` key on a plain JavaScript object is an ordinary string key that
13078
+ * never carried merge semantics, so emitting it plain would silently turn
13079
+ * ordinary data into a merge directive.
12823
13080
  */
12824
13081
  static stringify = effect.Effect.fn("Yaml.stringify")(function* (value, options) {
12825
13082
  return yield* stringifyOrFail(value, options);
@@ -12827,8 +13084,14 @@ var Yaml = class Yaml {
12827
13084
  /**
12828
13085
  * Synchronous single-document parse, returning a `Result` instead of
12829
13086
  * an `Effect`. A pure escape hatch for config-time callers that cannot
12830
- * `await` an Effect (a `vitest.config.ts` is the motivating case): it runs
12831
- * the same engine as {@link Yaml.parse} inline.
13087
+ * `await` an Effect (a `vitest.config.ts` is the motivating case).
13088
+ *
13089
+ * @remarks
13090
+ * This is the package's single parse path. {@link Yaml.parse} is defined in
13091
+ * terms of it (`Effect.fromResult` behind the named span), so the two
13092
+ * variants cannot diverge. Reach for the `Effect` variant inside Effect
13093
+ * code — it carries the `Yaml.parse` tracing span — and for this one at
13094
+ * synchronous boundaries.
12832
13095
  *
12833
13096
  * Preserves the package contract — malformed and adversarial input fails
12834
13097
  * typed, never as a defect. Fatal diagnostics, duplicate keys and a
@@ -12840,7 +13103,7 @@ var Yaml = class Yaml {
12840
13103
  * import { Yaml } from "@effected/yaml";
12841
13104
  * import { Result } from "effect";
12842
13105
  *
12843
- * const result = Yaml.parseSync("name: Alice\nage: 30");
13106
+ * const result = Yaml.parseResult("name: Alice\nage: 30");
12844
13107
  * if (Result.isSuccess(result)) {
12845
13108
  * result.success; // { name: "Alice", age: 30 }
12846
13109
  * } else {
@@ -12850,8 +13113,8 @@ var Yaml = class Yaml {
12850
13113
  *
12851
13114
  * @public
12852
13115
  */
12853
- static parseSync(text, options) {
12854
- return parseSyncImpl(text, options);
13116
+ static parseResult(text, options) {
13117
+ return parseResultImpl(text, options);
12855
13118
  }
12856
13119
  /**
12857
13120
  * Synchronous stringify, returning a `Result` instead of an `Effect`.
@@ -12868,7 +13131,7 @@ var Yaml = class Yaml {
12868
13131
  * import { Yaml } from "@effected/yaml";
12869
13132
  * import { Result } from "effect";
12870
13133
  *
12871
- * const result = Yaml.stringifySync({ name: "Alice" });
13134
+ * const result = Yaml.stringifyResult({ name: "Alice" });
12872
13135
  * if (Result.isFailure(result)) {
12873
13136
  * result.failure; // YamlStringifyError
12874
13137
  * } else {
@@ -12878,8 +13141,8 @@ var Yaml = class Yaml {
12878
13141
  *
12879
13142
  * @public
12880
13143
  */
12881
- static stringifySync(value, options) {
12882
- return stringifySyncImpl(value, options);
13144
+ static stringifyResult(value, options) {
13145
+ return stringifyResultImpl(value, options);
12883
13146
  }
12884
13147
  /**
12885
13148
  * Strip comments from YAML text. Without `replaceCh`, comment characters
@@ -13105,7 +13368,7 @@ function deepEqualValues(a, b) {
13105
13368
  return false;
13106
13369
  }
13107
13370
  //#endregion
13108
- //#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
13371
+ //#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
13109
13372
  /**
13110
13373
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
13111
13374
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -13175,7 +13438,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
13175
13438
  };
13176
13439
  });
13177
13440
  //#endregion
13178
- //#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
13441
+ //#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
13179
13442
  const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
13180
13443
  specifier: effect.Schema.String,
13181
13444
  version: effect.Schema.String
@@ -13301,7 +13564,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
13301
13564
  };
13302
13565
  });
13303
13566
  //#endregion
13304
- //#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
13567
+ //#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
13305
13568
  const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
13306
13569
  const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
13307
13570
  const YarnEntry = effect.Schema.Struct({
@@ -13424,7 +13687,7 @@ const cleanYarnDeps = (deps) => {
13424
13687
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
13425
13688
  };
13426
13689
  //#endregion
13427
- //#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
13690
+ //#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
13428
13691
  const EMPTY_IMPORTERS = [];
13429
13692
  /**
13430
13693
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -13668,7 +13931,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
13668
13931
  }
13669
13932
  };
13670
13933
  //#endregion
13671
- //#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
13934
+ //#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
13672
13935
  /**
13673
13936
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
13674
13937
  * lockfile against: a package name plus the four optional dependency maps.
@@ -13784,7 +14047,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
13784
14047
  }
13785
14048
  };
13786
14049
  //#endregion
13787
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Dependency.js
14050
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Dependency.js
13788
14051
  /**
13789
14052
  * A resolved dependency entry pairing a package name with its version
13790
14053
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -13848,7 +14111,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
13848
14111
  }
13849
14112
  };
13850
14113
  //#endregion
13851
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/DevEngines.js
14114
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/DevEngines.js
13852
14115
  /**
13853
14116
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
13854
14117
  *
@@ -14873,7 +15136,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14873
15136
  };
14874
15137
  }));
14875
15138
  //#endregion
14876
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/License.js
15139
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/License.js
14877
15140
  var import_spdx_expression_parse = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
14878
15141
  var scan = require_scan$1();
14879
15142
  var parse = require_parse$2();
@@ -14920,7 +15183,7 @@ const isValidSpdx = (value) => {
14920
15183
  */
14921
15184
  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"));
14922
15185
  //#endregion
14923
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageManager.js
15186
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageManager.js
14924
15187
  const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
14925
15188
  /**
14926
15189
  * The `packageManager` field only ever carries corepack's `<algo>.<hex>`
@@ -14978,7 +15241,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
14978
15241
  }
14979
15242
  };
14980
15243
  //#endregion
14981
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageName.js
15244
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageName.js
14982
15245
  /**
14983
15246
  * Indicates that a string could not be used as a valid npm package name.
14984
15247
  *
@@ -15036,7 +15299,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
15036
15299
  isScoped
15037
15300
  });
15038
15301
  //#endregion
15039
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Person.js
15302
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Person.js
15040
15303
  const parsePersonString = (input) => {
15041
15304
  const emailMatch = input.match(/<([^>]+)>/);
15042
15305
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -15050,8 +15313,56 @@ const parsePersonString = (input) => {
15050
15313
  ...urlMatch !== null ? { url: urlMatch[1] } : {}
15051
15314
  });
15052
15315
  };
15316
+ const serializePerson = (person) => {
15317
+ let result = person.name;
15318
+ if (person.email !== void 0) result += ` <${person.email}>`;
15319
+ if (person.url !== void 0) result += ` (${person.url})`;
15320
+ return result;
15321
+ };
15322
+ const wireForms = /* @__PURE__ */ new WeakMap();
15323
+ const rememberWire = (person, wire) => {
15324
+ wireForms.set(person, wire);
15325
+ return person;
15326
+ };
15327
+ const KNOWN_KEYS = /* @__PURE__ */ new Set([
15328
+ "name",
15329
+ "email",
15330
+ "url"
15331
+ ]);
15332
+ const sameRest = (a, b) => JSON.stringify(a ?? {}) === JSON.stringify(b ?? {});
15333
+ const isFaithful = (wire, person) => {
15334
+ if (typeof wire === "string") {
15335
+ const parsed = parsePersonString(wire);
15336
+ return parsed.name === person.name && parsed.email === person.email && parsed.url === person.url;
15337
+ }
15338
+ const rest = restOf(wire);
15339
+ return wire.name === person.name && wire.email === person.email && wire.url === person.url && sameRest(rest, person.rest);
15340
+ };
15341
+ const PersonFields = effect.Schema.Struct({
15342
+ name: effect.Schema.String,
15343
+ email: effect.Schema.optionalKey(effect.Schema.String),
15344
+ url: effect.Schema.optionalKey(effect.Schema.String)
15345
+ });
15346
+ const decodePersonFields = effect.Schema.decodeUnknownEffect(PersonFields);
15347
+ const restOf = (raw) => {
15348
+ const rest = {};
15349
+ for (const [key, value] of Object.entries(raw)) if (!KNOWN_KEYS.has(key)) rest[key] = value;
15350
+ return rest;
15351
+ };
15352
+ const encodePersonObject = (person) => {
15353
+ const wire = wireForms.get(person);
15354
+ if (wire !== void 0 && typeof wire !== "string" && isFaithful(wire, person)) return wire;
15355
+ const known = { name: person.name };
15356
+ if (person.email !== void 0) known.email = person.email;
15357
+ if (person.url !== void 0) known.url = person.url;
15358
+ return {
15359
+ ...person.rest ?? {},
15360
+ ...known
15361
+ };
15362
+ };
15053
15363
  /**
15054
- * A structured person object with `name` and optional `email` / `url`.
15364
+ * A structured person object with `name`, optional `email` / `url`, and a
15365
+ * `rest` catch-all preserving any additional keys across a read/write cycle.
15055
15366
  *
15056
15367
  * @public
15057
15368
  */
@@ -15061,29 +15372,77 @@ var Person = class Person extends effect.Schema.Class("Person")({
15061
15372
  /** The optional email address. */
15062
15373
  email: effect.Schema.optionalKey(effect.Schema.String),
15063
15374
  /** The optional homepage URL. */
15064
- url: effect.Schema.optionalKey(effect.Schema.String)
15375
+ url: effect.Schema.optionalKey(effect.Schema.String),
15376
+ /** Any additional keys, preserved verbatim and flattened back on encode. */
15377
+ rest: effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown))
15065
15378
  }) {
15379
+ /**
15380
+ * The object wire codec: an open JSON object ↔ a {@link Person}, partitioning
15381
+ * unknown keys into `rest` and flattening them back on encode so the on-disk
15382
+ * shape never carries a literal `rest` key.
15383
+ */
15384
+ static schema = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown).pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(Person), effect.SchemaTransformation.transformOrFail({
15385
+ decode: (raw) => decodePersonFields(raw).pipe(effect.Effect.mapError((error) => error.issue), effect.Effect.map((fields) => {
15386
+ const rest = restOf(raw);
15387
+ return rememberWire(Person.make({
15388
+ ...fields,
15389
+ ...Object.keys(rest).length > 0 ? { rest } : {}
15390
+ }), raw);
15391
+ })),
15392
+ encode: (person) => effect.Effect.succeed(encodePersonObject(person))
15393
+ })));
15066
15394
  /**
15067
15395
  * Schema transformation between the `"Name <email> (url)"` shorthand string
15068
- * and a {@link Person}.
15396
+ * and a {@link Person}. Decoding remembers the input text so that encoding
15397
+ * reproduces it verbatim; see {@link Person.wireStringOf}.
15069
15398
  */
15070
15399
  static FromString = effect.Schema.String.pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(Person), effect.SchemaTransformation.transform({
15071
- decode: (input) => parsePersonString(input),
15400
+ decode: (input) => rememberWire(parsePersonString(input), input),
15072
15401
  encode: (person) => {
15073
- let result = person.name;
15074
- if (person.email !== void 0) result += ` <${person.email}>`;
15075
- if (person.url !== void 0) result += ` (${person.url})`;
15076
- return result;
15402
+ const wire = wireForms.get(person);
15403
+ return typeof wire === "string" && isFaithful(wire, person) ? wire : serializePerson(person);
15077
15404
  }
15078
15405
  })));
15079
15406
  /**
15080
15407
  * The `author` / `contributors` value: either the shorthand string or the
15081
15408
  * structured object, always decoded to a {@link Person}.
15409
+ *
15410
+ * The wire form is preserved across a round trip — a person read from the
15411
+ * shorthand string encodes back to that string, byte for byte, and one read
15412
+ * from an object encodes back to an object with its unknown keys intact.
15413
+ * Formatting a manifest therefore never rewrites one legal encoding into the
15414
+ * other.
15415
+ *
15416
+ * Provenance belongs to the instance, so a person that is *rebuilt* (rather
15417
+ * than carried through unchanged) has none and encodes in the canonical
15418
+ * object form. Editing an unrelated field of the surrounding `Package`
15419
+ * carries the same person instance through and preserves its encoding.
15082
15420
  */
15083
- static FromValue = effect.Schema.Union([Person, Person.FromString]);
15421
+ static FromValue = effect.Schema.Union([Person.schema, effect.Schema.String]).pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(Person), effect.SchemaTransformation.transform({
15422
+ decode: (input) => typeof input === "string" ? rememberWire(parsePersonString(input), input) : input,
15423
+ encode: (person) => {
15424
+ const wire = wireForms.get(person);
15425
+ return typeof wire === "string" && isFaithful(wire, person) ? wire : person;
15426
+ }
15427
+ })));
15428
+ /**
15429
+ * The shorthand text this person was decoded from, when it was decoded from
15430
+ * the string form and still matches its fields; `None` for a person built
15431
+ * from an object or by hand.
15432
+ *
15433
+ * Exposed so callers can tell which encoding a manifest used without
15434
+ * re-reading the file.
15435
+ *
15436
+ * @param person - the person to inspect
15437
+ * @returns the original shorthand text, or `None`
15438
+ */
15439
+ static wireStringOf(person) {
15440
+ const wire = wireForms.get(person);
15441
+ return typeof wire === "string" && isFaithful(wire, person) ? effect.Option.some(wire) : effect.Option.none();
15442
+ }
15084
15443
  };
15085
15444
  //#endregion
15086
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/internal/format.js
15445
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/internal/format.js
15087
15446
  const KEY_INDEX = new Map([
15088
15447
  "$schema",
15089
15448
  "name",
@@ -15306,7 +15665,7 @@ const renderJson = (raw, options) => {
15306
15665
  return options.newline ? `${json}\n` : json;
15307
15666
  };
15308
15667
  //#endregion
15309
- //#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Package.js
15668
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Package.js
15310
15669
  const toHashMap = effect.SchemaTransformation.transform({
15311
15670
  decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
15312
15671
  encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
@@ -15624,7 +15983,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
15624
15983
  }
15625
15984
  };
15626
15985
  //#endregion
15627
- //#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
15986
+ //#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
15628
15987
  const EMPTY$1 = Object.freeze(Object.create(null));
15629
15988
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
15630
15989
  /**
@@ -15699,10 +16058,12 @@ var WorkspaceManifestError = class extends effect.Schema.TaggedErrorClass()("Wor
15699
16058
  * path: "/repo/packages/utils",
15700
16059
  * packageJsonPath: "/repo/packages/utils/package.json",
15701
16060
  * relativePath: "packages/utils",
16061
+ * workspaceRoot: "/repo",
15702
16062
  * });
15703
16063
  *
15704
16064
  * pkg.isRootWorkspace; // false
15705
16065
  * pkg.unscopedName; // "utils"
16066
+ * pkg.workspaceRoot; // "/repo"
15706
16067
  * ```
15707
16068
  *
15708
16069
  * @public
@@ -15718,6 +16079,21 @@ var WorkspacePackage = class WorkspacePackage extends effect.Schema.Class("Works
15718
16079
  packageJsonPath: effect.Schema.NonEmptyString,
15719
16080
  /** POSIX path relative to the workspace root; `"."` for the root package. */
15720
16081
  relativePath: effect.Schema.String,
16082
+ /**
16083
+ * Absolute path to the workspace root this package was discovered under.
16084
+ *
16085
+ * @remarks
16086
+ * Carried, not derived. Whoever built this value already knew the root —
16087
+ * `WorkspaceDiscovery` resolved it before enumerating, and the sync entry
16088
+ * point is handed it — so dropping it forced every consumer into per-package
16089
+ * root arithmetic (counting `relativePath` segments and re-ascending that
16090
+ * many `..`). That reconstruction is exact only while `path` and
16091
+ * `relativePath` agree, and it re-derives something the kit never had to
16092
+ * lose.
16093
+ *
16094
+ * For the root package this equals `path`, and `relativePath` is `"."`.
16095
+ */
16096
+ workspaceRoot: effect.Schema.NonEmptyString,
15721
16097
  /** Whether the package is marked private. */
15722
16098
  private: effect.Schema.Boolean.pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(false)), effect.Schema.withConstructorDefault(effect.Effect.succeed(false))),
15723
16099
  /** Production dependencies. */
@@ -15886,7 +16262,7 @@ var WorkspacePackage = class WorkspacePackage extends effect.Schema.Class("Works
15886
16262
  }
15887
16263
  };
15888
16264
  //#endregion
15889
- //#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
16265
+ //#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
15890
16266
  /**
15891
16267
  * Typed failure raised by {@link descend}: a directory mid-walk was unreadable
15892
16268
  * (under `onUnreadable: "fail"`), or the walk descended past `maxDepth`. Depth
@@ -16021,7 +16397,97 @@ const descend = effect.Effect.fn("Walker.descend")(function* (pattern, options)
16021
16397
  return results;
16022
16398
  });
16023
16399
  //#endregion
16024
- //#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
16400
+ //#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
16401
+ /**
16402
+ * Typed failure raised by {@link compileAndExpand}: the single error the
16403
+ * compile+expand recipe fails with, so a caller catches one tag rather than
16404
+ * folding two error channels by hand.
16405
+ *
16406
+ * @remarks
16407
+ * One tag, two genuinely different causes — "your pattern is malformed" and
16408
+ * "that directory is unreadable" are different problems with different fixes,
16409
+ * so `cause` keeps the underlying typed error intact
16410
+ * rather than flattening it into a string. Discriminate on `cause._tag`
16411
+ * (`"GlobPatternError"` vs `"DescendError"`), or read
16412
+ * {@link GlobExpansionError.stage} when only the phase matters; either way the
16413
+ * original payload — a guard's `limit`/`actual`, a descent's `path` — is still
16414
+ * there. `cause` is also the native `Error` cause, so error chaining and
16415
+ * stack-printing work without extra wiring.
16416
+ *
16417
+ * @public
16418
+ */
16419
+ var GlobExpansionError = class extends effect.Schema.TaggedErrorClass()("GlobExpansionError", {
16420
+ /** The glob pattern's source text, as handed to {@link compileAndExpand}. */
16421
+ pattern: effect.Schema.String,
16422
+ /** The underlying typed failure, intact: a compile guard trip or a descent failure. */
16423
+ cause: effect.Schema.Union([GlobPatternError, DescendError])
16424
+ }) {
16425
+ /**
16426
+ * Which phase failed — `"compile"` when the pattern itself was rejected,
16427
+ * `"descend"` when the filesystem walk failed. A convenience over
16428
+ * `cause._tag` for callers that only need the phase.
16429
+ */
16430
+ get stage() {
16431
+ return this.cause._tag === "GlobPatternError" ? "compile" : "descend";
16432
+ }
16433
+ get message() {
16434
+ const shown = this.pattern.length > 64 ? `${this.pattern.slice(0, 64)}…` : this.pattern;
16435
+ return `glob expansion of ${JSON.stringify(shown)} failed during ${this.stage}: ${this.cause.message}`;
16436
+ }
16437
+ };
16438
+ /**
16439
+ * Compile a glob pattern and expand it against the filesystem in one call:
16440
+ * matching FILE paths relative to `options.cwd`, POSIX separators, sorted.
16441
+ *
16442
+ * @remarks
16443
+ * The recipe form of {@link descend}. Everything `descend` documents about
16444
+ * traversal holds unchanged — the literal fast-path, the negated-pattern walk
16445
+ * from `cwd`, files-only matching, symlink and prune handling, `maxDepth`,
16446
+ * `onUnreadable` — because this delegates to it. What this adds is the seam:
16447
+ * the pattern arrives as a string, and both failure modes arrive as one
16448
+ * {@link GlobExpansionError} with the underlying error preserved in `cause`.
16449
+ *
16450
+ * A missing base directory, a pattern that climbs above `cwd`, and a pattern
16451
+ * that simply matches nothing are all an EMPTY result, not a failure — zero
16452
+ * matches is a normal glob answer. Only a rejected pattern or a failed walk
16453
+ * produces an error.
16454
+ *
16455
+ * `FileSystem` and `Path` stay in the `R` channel and are **deliberately not
16456
+ * provided here**, even though hand-providing them is the friction this
16457
+ * recipe otherwise removes. `FileSystem` cannot be provided — a library that
16458
+ * picks its own filesystem cannot be tested against a fixture tree. Given
16459
+ * that, providing `Path` internally would not save the caller a layer (they
16460
+ * still supply `FileSystem`), and it would actively break win32: the walk
16461
+ * would join paths POSIX-style against a caller's win32 filesystem. The
16462
+ * consumer's platform layer stays the single place that choice is made.
16463
+ * Provide both once at the application boundary, not per call site.
16464
+ *
16465
+ * @example
16466
+ * ```ts
16467
+ * import { compileAndExpand } from "@effected/walker"
16468
+ * import { GlobPatternOptions } from "@effected/glob"
16469
+ *
16470
+ * const files = yield* compileAndExpand("packages/*​/src/**​/*.ts", {
16471
+ * cwd: "/repo",
16472
+ * glob: GlobPatternOptions.make({ dot: true })
16473
+ * })
16474
+ * ```
16475
+ *
16476
+ * @public
16477
+ */
16478
+ const compileAndExpand = effect.Effect.fn("Walker.compileAndExpand")(function* (pattern, options) {
16479
+ const compiled = GlobPattern.compileResult(pattern, options.glob);
16480
+ if (effect.Result.isFailure(compiled)) return yield* new GlobExpansionError({
16481
+ pattern,
16482
+ cause: compiled.failure
16483
+ });
16484
+ return yield* descend(compiled.success, options).pipe(effect.Effect.mapError((cause) => new GlobExpansionError({
16485
+ pattern,
16486
+ cause
16487
+ })));
16488
+ });
16489
+ //#endregion
16490
+ //#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
16025
16491
  /**
16026
16492
  * Ascend from `start` toward the filesystem root, yielding each directory,
16027
16493
  * nearest first.
@@ -16035,17 +16501,28 @@ const descend = effect.Effect.fn("Walker.descend")(function* (pattern, options)
16035
16501
  * Bounded twice over: `dirname` is a fixpoint at the root, and `maxDepth` guards
16036
16502
  * a pathological `Path` implementation that never reaches one.
16037
16503
  *
16504
+ * `stopAt` is compared in normalized form — see {@link AscendOptions.stopAt}.
16505
+ * Raw string equality made the ceiling fail OPEN: an unnormalized ceiling
16506
+ * matched nothing and the ascent ran silently to the filesystem root, which is
16507
+ * the unbounded walk the option exists to prevent, with no error to notice it
16508
+ * by. A relative ceiling **dies** for the same reason — resolving one against
16509
+ * `process.cwd()` would reintroduce the silent-wrong-walk failure through a
16510
+ * different door. See {@link AscendOptions.stopAt} for why that is a defect
16511
+ * rather than a typed error; the error channel stays `never`.
16512
+ *
16038
16513
  * @public
16039
16514
  */
16040
16515
  const ascend = (start, options) => effect.Effect.gen(function* () {
16041
16516
  const path = yield* effect.Path.Path;
16042
16517
  const maxDepth = options?.maxDepth ?? 256;
16043
16518
  if (!Number.isInteger(maxDepth) || maxDepth < 1) return yield* effect.Effect.die(/* @__PURE__ */ new Error(`Walker.ascend: maxDepth must be a positive integer, received ${maxDepth}`));
16519
+ 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)})`));
16520
+ const ceiling = options?.stopAt === void 0 ? void 0 : path.resolve(options.stopAt);
16044
16521
  const dirs = [];
16045
16522
  let current = start;
16046
16523
  for (let depth = 0; depth < maxDepth; depth++) {
16047
16524
  dirs.push(current);
16048
- if (options?.stopAt !== void 0 && current === options.stopAt) break;
16525
+ if (ceiling !== void 0 && (current === ceiling || path.resolve(current) === ceiling)) break;
16049
16526
  const parent = path.dirname(current);
16050
16527
  if (parent === current) break;
16051
16528
  current = parent;
@@ -16111,7 +16588,7 @@ const Walker$1 = {
16111
16588
  findRoot: findRoot$1
16112
16589
  };
16113
16590
  //#endregion
16114
- //#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
16591
+ //#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
16115
16592
  /**
16116
16593
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
16117
16594
  *
@@ -16131,11 +16608,22 @@ var WorkspaceRootNotFoundError = class extends effect.Schema.TaggedErrorClass()(
16131
16608
  /** The directory the ascent started from. */
16132
16609
  searchPath: effect.Schema.String,
16133
16610
  /** The marker filenames probed at each ancestor. */
16134
- markers: effect.Schema.Array(effect.Schema.String)
16611
+ markers: effect.Schema.Array(effect.Schema.String),
16612
+ /**
16613
+ * The resolved ceiling the ascent was bounded by, when one was supplied.
16614
+ *
16615
+ * @remarks
16616
+ * Absent means the ascent ran to the filesystem root. Its presence is what
16617
+ * lets a caller tell "there is no workspace root anywhere above me" from
16618
+ * "there is none below the ceiling I set" — two failures that otherwise
16619
+ * render identically.
16620
+ */
16621
+ stopAt: effect.Schema.optionalKey(effect.Schema.String)
16135
16622
  }) {
16136
- /** Renders the search path and probed markers into a one-line message. */
16623
+ /** Renders the search path, probed markers and any ceiling into a one-line message. */
16137
16624
  get message() {
16138
- return `No workspace root above ${this.searchPath} (looked for ${this.markers.join(", ")})`;
16625
+ const bound = this.stopAt === void 0 ? "" : ` up to ${this.stopAt}`;
16626
+ return `No workspace root above ${this.searchPath}${bound} (looked for ${this.markers.join(", ")})`;
16139
16627
  }
16140
16628
  };
16141
16629
  /**
@@ -16158,6 +16646,12 @@ const isWorkspaceRoot = (dir) => effect.Effect.gen(function* () {
16158
16646
  }).pipe(effect.Effect.orElseSucceed(() => ({})));
16159
16647
  return parsed.workspaces !== void 0 && parsed.workspaces !== null;
16160
16648
  });
16649
+ /** Whether `descendant` is `ancestor` itself or lies beneath it, on POSIX or win32 separators. */
16650
+ const isAtOrBelow = (descendant, ancestor) => {
16651
+ if (descendant === ancestor) return true;
16652
+ const prefix = ancestor.endsWith("/") || ancestor.endsWith("\\") ? ancestor : `${ancestor}/`;
16653
+ return descendant.startsWith(prefix) || descendant.startsWith(prefix.replace(/\/$/, "\\"));
16654
+ };
16161
16655
  /**
16162
16656
  * Locates the workspace root by ascending from a starting directory.
16163
16657
  *
@@ -16172,6 +16666,20 @@ const isWorkspaceRoot = (dir) => effect.Effect.gen(function* () {
16172
16666
  * });
16173
16667
  * ```
16174
16668
  *
16669
+ * @example
16670
+ * Bounded: an unmarked fixture directory fails typed instead of escaping into
16671
+ * the enclosing repository.
16672
+ *
16673
+ * ```ts
16674
+ * import { WorkspaceRoot } from "@effected/workspaces";
16675
+ * import { Effect } from "effect";
16676
+ *
16677
+ * const program = Effect.gen(function* () {
16678
+ * const roots = yield* WorkspaceRoot;
16679
+ * return yield* roots.find("/tmp/fixture/packages/a", { stopAt: "/tmp/fixture" });
16680
+ * });
16681
+ * ```
16682
+ *
16175
16683
  * @public
16176
16684
  */
16177
16685
  var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effected/workspaces/WorkspaceRoot") {
@@ -16179,24 +16687,95 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
16179
16687
  static make = effect.Effect.gen(function* () {
16180
16688
  const fs = yield* effect.FileSystem.FileSystem;
16181
16689
  const path = yield* effect.Path.Path;
16182
- const find = effect.Effect.fn("WorkspaceRoot.find")(function* (cwd) {
16690
+ const find = effect.Effect.fn("WorkspaceRoot.find")(function* (cwd, options) {
16183
16691
  const start = path.resolve(cwd);
16184
- const chain = yield* Walker$1.ascend(start);
16692
+ const ceiling = options?.stopAt === void 0 ? void 0 : path.resolve(options.stopAt);
16693
+ const chain = yield* Walker$1.ascend(start, {
16694
+ ...ceiling === void 0 ? {} : { stopAt: ceiling },
16695
+ ...options?.maxDepth === void 0 ? {} : { maxDepth: options.maxDepth }
16696
+ });
16185
16697
  const found = yield* Walker$1.findRoot(chain, isWorkspaceRoot);
16186
16698
  if (effect.Option.isNone(found)) return yield* effect.Effect.fail(new WorkspaceRootNotFoundError({
16187
16699
  searchPath: start,
16188
- markers: WORKSPACE_MARKERS
16700
+ markers: WORKSPACE_MARKERS,
16701
+ ...ceiling === void 0 ? {} : { stopAt: ceiling }
16189
16702
  }));
16190
16703
  yield* effect.Effect.logDebug("Workspace root found").pipe(effect.Effect.annotateLogs("workspace.root", found.value));
16191
16704
  return found.value;
16192
16705
  });
16193
- return { find: (cwd) => find(cwd).pipe(effect.Effect.provideService(effect.FileSystem.FileSystem, fs), effect.Effect.provideService(effect.Path.Path, path)) };
16706
+ return { find: (cwd, options) => find(cwd, options).pipe(effect.Effect.provideService(effect.FileSystem.FileSystem, fs), effect.Effect.provideService(effect.Path.Path, path)) };
16194
16707
  });
16195
16708
  /** The live layer. */
16196
16709
  static layer = effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.make);
16710
+ /**
16711
+ * A test double resolving every `find` to `root`, with no filesystem.
16712
+ *
16713
+ * @remarks
16714
+ * The nine-copies-of-a-four-line-mock case — a `Layer.succeed` over a `find`
16715
+ * that ignores its arguments and succeeds with a fixed root is what consumers
16716
+ * were writing by hand. The difference is that this double **honours
16717
+ * `stopAt`**: a hand-rolled `find` that ignores the ceiling makes a bounded
16718
+ * call pass under test and fail against the live service, which is the
16719
+ * failure mode the option exists to catch. A `root` above the ceiling fails
16720
+ * here exactly as it would live, with the same
16721
+ * {@link WorkspaceRootNotFoundError}.
16722
+ *
16723
+ * The ceiling is `path.resolve`d through the injected `Path` service before
16724
+ * the comparison, exactly as the live `make` path does — so a `stopAt`
16725
+ * carrying `..` segments bounds the double identically to the live service,
16726
+ * not by raw string. This is why `makeTest` yields an `Effect` requiring
16727
+ * `Path`: it captures the service once at construction, the same shape as
16728
+ * `make`. Consumers reach for {@link WorkspaceRoot.layerTest}, which provides
16729
+ * `Path.layer` internally, so the requirement never surfaces at their call
16730
+ * site.
16731
+ *
16732
+ * `maxDepth` is deliberately NOT modelled: the double does not walk, so it has
16733
+ * no depth to cap, and pretending otherwise would encode a fiction. A suite
16734
+ * exercising the depth guard wants the live service over a fixture tree.
16735
+ *
16736
+ * @param root - The root every unbounded `find` resolves to.
16737
+ */
16738
+ static makeTest = (root) => effect.Effect.gen(function* () {
16739
+ const path = yield* effect.Path.Path;
16740
+ return { find: (cwd, options) => options?.stopAt !== void 0 && !isAtOrBelow(root, path.resolve(options.stopAt)) ? effect.Effect.fail(new WorkspaceRootNotFoundError({
16741
+ searchPath: cwd,
16742
+ markers: WORKSPACE_MARKERS,
16743
+ stopAt: options.stopAt
16744
+ })) : effect.Effect.succeed(root) };
16745
+ });
16746
+ /**
16747
+ * The test layer: {@link WorkspaceRoot.makeTest} with `Path.layer` provided.
16748
+ *
16749
+ * @remarks
16750
+ * `makeTest` requires `Path` to normalize the `stopAt` ceiling; this layer
16751
+ * supplies core's `Path.layer` internally, so the requirement never reaches a
16752
+ * consumer — the published type stays `Layer.Layer<WorkspaceRoot>`.
16753
+ *
16754
+ * A parameterized layer factory mints a **fresh reference per call**, and
16755
+ * layers memoize by reference — bind the result to a `const` and reuse it
16756
+ * rather than calling `layerTest(...)` at each composition site.
16757
+ *
16758
+ * Pair it with `WorkspaceDiscovery.layerTest` to stand up the whole discovery
16759
+ * path without a filesystem; between them there is nothing left for a
16760
+ * module-level mock of `@effected/workspaces` to do, and a provided layer
16761
+ * keeps the service graph — and its typed errors — intact.
16762
+ *
16763
+ * @example
16764
+ * ```ts
16765
+ * import { WorkspaceDiscovery, WorkspaceRoot } from "@effected/workspaces";
16766
+ * import { Effect } from "effect";
16767
+ *
16768
+ * const TestRoot = WorkspaceRoot.layerTest("/repo");
16769
+ * const TestDiscovery = WorkspaceDiscovery.layerTest({
16770
+ * listPackages: () => Effect.succeed([]),
16771
+ * });
16772
+ * // program.pipe(Effect.provide(TestRoot), Effect.provide(TestDiscovery))
16773
+ * ```
16774
+ */
16775
+ static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
16197
16776
  };
16198
16777
  //#endregion
16199
- //#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
16778
+ //#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
16200
16779
  /**
16201
16780
  * Hard ceiling on directories the enumerator will visit for one pattern set.
16202
16781
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -16214,7 +16793,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
16214
16793
  */
16215
16794
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
16216
16795
  //#endregion
16217
- //#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
16796
+ //#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
16218
16797
  /** Directory names never descended into. */
16219
16798
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
16220
16799
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -16304,7 +16883,7 @@ var Traversal = class {
16304
16883
  }
16305
16884
  };
16306
16885
  //#endregion
16307
- //#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
16886
+ //#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
16308
16887
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
16309
16888
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
16310
16889
  /**
@@ -16374,7 +16953,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
16374
16953
  return results;
16375
16954
  });
16376
16955
  //#endregion
16377
- //#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
16956
+ //#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
16378
16957
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
16379
16958
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
16380
16959
  const pnpmPatternsOf = (document) => {
@@ -16431,7 +17010,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
16431
17010
  return manifestPatternsOf(manifest);
16432
17011
  });
16433
17012
  //#endregion
16434
- //#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
17013
+ //#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
16435
17014
  /**
16436
17015
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
16437
17016
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -16609,6 +17188,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
16609
17188
  path: directory,
16610
17189
  packageJsonPath,
16611
17190
  relativePath,
17191
+ workspaceRoot: root,
16612
17192
  manifestRecord: raw,
16613
17193
  ...typeof raw.private === "boolean" ? { private: raw.private } : {},
16614
17194
  ...isStringRecord$2(raw.dependencies) ? { dependencies: raw.dependencies } : {},
@@ -16766,6 +17346,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
16766
17346
  * path: "/repo/packages/utils",
16767
17347
  * packageJsonPath: "/repo/packages/utils/package.json",
16768
17348
  * relativePath: "packages/utils",
17349
+ * workspaceRoot: "/repo",
16769
17350
  * }),
16770
17351
  * ]),
16771
17352
  * });
@@ -16863,7 +17444,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
16863
17444
  };
16864
17445
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
16865
17446
  //#endregion
16866
- //#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
17447
+ //#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
16867
17448
  /**
16868
17449
  * Raised when the workspace dependency graph cannot be topologically ordered
16869
17450
  * because it contains a cycle.
@@ -18461,7 +19042,7 @@ var Git = class extends effect.Context.Service()("@effected/git/Git") {
18461
19042
  }));
18462
19043
  };
18463
19044
  //#endregion
18464
- //#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
19045
+ //#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
18465
19046
  /**
18466
19047
  * Which git refs to compare, and whether to fold in the working tree.
18467
19048
  *
@@ -18713,7 +19294,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
18713
19294
  };
18714
19295
  }
18715
19296
  //#endregion
18716
- //#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
19297
+ //#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
18717
19298
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
18718
19299
  const inlineCatalogs = (manifest) => {
18719
19300
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -18777,7 +19358,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
18777
19358
  });
18778
19359
  };
18779
19360
  //#endregion
18780
- //#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
19361
+ //#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
18781
19362
  /** Whether `value` is a non-null, non-array object. */
18782
19363
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
18783
19364
  /**
@@ -18871,9 +19452,13 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
18871
19452
  * `hooks`-source `CatalogAssemblyError`, never a silent skip.
18872
19453
  *
18873
19454
  * @remarks
18874
- * Node-coupled by design the `node:fs` / `node:path` / `node:url` imports are
18875
- * the sanctioned Node-only overlay, matching the other seams here. Only ever
18876
- * wired by `WorkspaceCatalogs.layerWithConfigDependencies`.
19455
+ * Runtime-coupled by design, not node-exclusive. The `import()` below loads
19456
+ * **and executes** a config dependency's pnpmfile in-process code execution,
19457
+ * not IO, so no `FileSystem` / `Path` service abstracts it. The `node:path` and
19458
+ * `node:url` imports (`join`, `pathToFileURL`) exist only to build the URL that
19459
+ * `import()` consumes; node and bun both implement those builtins and dynamic
19460
+ * import, so this layer runs on either runtime. Only ever wired by
19461
+ * `WorkspaceCatalogs.layerWithConfigDependencies`.
18877
19462
  */
18878
19463
  static layerLive = effect.Layer.succeed(ConfigDependencyHooks, { inject: (root, configDependencies, seed) => effect.Effect.gen(function* () {
18879
19464
  const names = Object.keys(configDependencies);
@@ -18922,7 +19507,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
18922
19507
  }) });
18923
19508
  };
18924
19509
  //#endregion
18925
- //#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
19510
+ //#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
18926
19511
  /**
18927
19512
  * The four package managers this package understands.
18928
19513
  *
@@ -19164,7 +19749,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
19164
19749
  static layer = effect.Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
19165
19750
  };
19166
19751
  //#endregion
19167
- //#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
19752
+ //#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
19168
19753
  /**
19169
19754
  * Raised when the workspace's lockfile cannot be read off disk.
19170
19755
  *
@@ -19274,7 +19859,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
19274
19859
  static layer = (options) => effect.Layer.effect(LockfileReader, LockfileReader.make(options));
19275
19860
  };
19276
19861
  //#endregion
19277
- //#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
19862
+ //#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
19278
19863
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
19279
19864
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
19280
19865
  /**
@@ -19374,7 +19959,7 @@ var PublishabilityDetector = class PublishabilityDetector extends effect.Context
19374
19959
  }) });
19375
19960
  };
19376
19961
  //#endregion
19377
- //#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
19962
+ //#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
19378
19963
  /**
19379
19964
  * An immutable, fully-normalized catalog collection — the one catalog
19380
19965
  * resolution semantic in the package.
@@ -19758,7 +20343,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
19758
20343
  }));
19759
20344
  };
19760
20345
  //#endregion
19761
- //#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
20346
+ //#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
19762
20347
  const EMPTY = Object.freeze(Object.create(null));
19763
20348
  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)));
19764
20349
  /**
@@ -19923,7 +20508,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
19923
20508
  }
19924
20509
  };
19925
20510
  //#endregion
19926
- //#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
20511
+ //#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
19927
20512
  /** Whether `value` is a non-null, non-array object. */
19928
20513
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
19929
20514
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -20115,7 +20700,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
20115
20700
  static layer = (options) => effect.Layer.effect(WorkspaceSnapshots, WorkspaceSnapshots.make(options));
20116
20701
  };
20117
20702
  //#endregion
20118
- //#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
20703
+ //#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
20119
20704
  /**
20120
20705
  * Every service that needs only a filesystem: root, package-manager detection,
20121
20706
  * discovery, lockfile reading, catalogs and publishability.
@@ -20483,34 +21068,15 @@ effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
20483
21068
  }) };
20484
21069
  }));
20485
21070
  /**
20486
- * The workspace root a package was discovered against, derived from its own
20487
- * coordinates: `relativePath` is the package directory relative to the
20488
- * discovery root (POSIX, `"."` for the root package), so ascending one level
20489
- * per path segment from `pkg.path` lands exactly on that root.
20490
- *
20491
- * @remarks
20492
- * Derivation is deliberate — probing the filesystem for workspace markers
20493
- * (`WorkspaceRoot.find`) can walk PAST the intended root when that root
20494
- * carries no marker (a fixture tree, a bare directory) and land on an
20495
- * enclosing workspace, silently swapping in that outer root's
20496
- * `.changeset/config.json` and dropping the ignore/mode gating (the #209
20497
- * regression class). The discovery root needs no probing: whoever built the
20498
- * `WorkspacePackage` already knew it.
20499
- */
20500
- const packageRoot = (pkg) => {
20501
- const segments = pkg.relativePath.split("/").filter((segment) => segment !== "" && segment !== ".");
20502
- return segments.length === 0 ? pkg.path : (0, node_path.join)(pkg.path, ...segments.map(() => ".."));
20503
- };
20504
- /**
20505
21071
  * Ignore-aware override of `PublishabilityDetector`. `detect` short-circuits to `[]`
20506
21072
  * for changeset-ignored packages, then dispatches on `ChangesetConfig.mode`:
20507
21073
  * `none` → `[]`; `silk` → `SilkPublishability.detect`; `vanilla` → the library default.
20508
21074
  *
20509
21075
  * @remarks Requires `FileSystem` and {@link ChangesetConfig} at build.
20510
21076
  * The kit's `detect` contract no longer receives the workspace root, so the changeset
20511
- * lookups derive it per package from the package's own discovery coordinates
20512
- * (`pkg.path` ascended by `pkg.relativePath` — never a filesystem marker walk,
20513
- * which could escape an unmarked root and read the wrong `.changeset/config.json`).
21077
+ * lookups read it from `pkg.workspaceRoot` the discovery root the package was found
21078
+ * against, never a filesystem marker walk, which could escape an unmarked root and read
21079
+ * the wrong `.changeset/config.json`.
20514
21080
  *
20515
21081
  * @since 0.4.0
20516
21082
  * @public
@@ -20520,7 +21086,7 @@ const PublishabilityDetectorAdaptiveLive = effect.Layer.effect(PublishabilityDet
20520
21086
  const config = yield* ChangesetConfig;
20521
21087
  const vanilla = yield* effect.Effect.provide(PublishabilityDetector, PublishabilityDetector.layer);
20522
21088
  return { detect: (pkg) => effect.Effect.gen(function* () {
20523
- const root = packageRoot(pkg);
21089
+ const root = pkg.workspaceRoot;
20524
21090
  if (yield* config.isIgnored(pkg.name, root)) return [];
20525
21091
  const mode = yield* config.mode(root);
20526
21092
  if (mode === "none") return [];
@@ -45093,25 +45659,15 @@ function normalizeLegacyOptions(options, configPath) {
45093
45659
  };
45094
45660
  }
45095
45661
  /** Match dotfiles, mirroring the former tinyglobby `dot: true` behavior. */
45096
- const GLOB_OPTIONS = GlobPatternOptions.make({ dot: true });
45662
+ const GLOB_OPTIONS$1 = GlobPatternOptions.make({ dot: true });
45097
45663
  /**
45098
- * Compile `glob` via `@effected/glob`, folding a compile-guard trip
45099
- * (over-length pattern, brace-expansion budget, nesting depth) into a
45100
- * {@link ConfigurationError} naming the offending glob on the typed channel.
45101
- */
45102
- function compileGlob(glob) {
45103
- return GlobPattern.compile(glob, GLOB_OPTIONS).pipe(effect.Effect.mapError((error) => new ConfigurationError({
45104
- field: "glob",
45105
- reason: `Invalid glob pattern ${JSON.stringify(glob)}: ${error.message}`
45106
- })));
45107
- }
45108
45664
  /**
45109
45665
  * Pure attribution helper: does `glob` (under this service's `dot: true`
45110
45666
  * semantics) match the repo-relative POSIX path `rel`? An uncompilable
45111
45667
  * pattern matches nothing.
45112
45668
  */
45113
45669
  function globMatchesRel(glob, rel) {
45114
- const result = effect.Effect.runSync(effect.Effect.result(GlobPattern.compile(glob, GLOB_OPTIONS)));
45670
+ const result = GlobPattern.compileResult(glob, GLOB_OPTIONS$1);
45115
45671
  return effect.Result.isSuccess(result) && result.success.matches(rel);
45116
45672
  }
45117
45673
  /**
@@ -45127,13 +45683,14 @@ function globMatchesRel(glob, rel) {
45127
45683
  * module already speaks POSIX-relative match paths).
45128
45684
  */
45129
45685
  function materializeGlob(glob, cwd) {
45130
- return compileGlob(glob).pipe(effect.Effect.flatMap((pattern) => descend(pattern, {
45686
+ return compileAndExpand(glob, {
45131
45687
  cwd,
45132
- onUnreadable: "skip"
45688
+ onUnreadable: "skip",
45689
+ glob: GLOB_OPTIONS$1
45133
45690
  }).pipe(effect.Effect.mapError((error) => new ConfigurationError({
45134
45691
  field: "glob",
45135
- reason: `Failed to materialize glob ${JSON.stringify(glob)}: ${error.message}`
45136
- })), effect.Effect.provide(effect.Path.layer))));
45692
+ reason: error.stage === "compile" ? `Invalid glob pattern ${JSON.stringify(glob)}: ${error.cause.message}` : `Failed to materialize glob ${JSON.stringify(glob)}: ${error.cause.message}`
45693
+ })), effect.Effect.provide(effect.Path.layer));
45137
45694
  }
45138
45695
  /**
45139
45696
  * Determine whether `child` is the same directory as `parent` or sits inside
@@ -46835,19 +47392,29 @@ var VersionFiles = class VersionFiles {
46835
47392
  }
46836
47393
  };
46837
47394
  /**
47395
+ * Match dotfiles, matching `ConfigInspector`'s glob dialect.
47396
+ *
47397
+ * @remarks
47398
+ * This module previously compiled with minimatch DEFAULTS while
47399
+ * `ConfigInspector` compiled with `dot: true`, so a wildcard segment matching
47400
+ * a dotted directory was attributed to a package but never materialized (or
47401
+ * the reverse). The two paths must agree: attribution and materialization
47402
+ * answer the same question about the same glob.
47403
+ */
47404
+ const GLOB_OPTIONS = GlobPatternOptions.make({ dot: true });
47405
+ /**
46838
47406
  * Expand a glob pattern against the filesystem, returning matching FILE paths
46839
47407
  * relative to `cwd` (POSIX separators), sorted by relative path.
46840
47408
  *
46841
47409
  * @remarks
46842
- * The walk is `@effected/walker`'s `descend` (literal fast path,
47410
+ * The walk is `@effected/walker`'s `compileAndExpand` (literal fast path,
46843
47411
  * `enumerationPrefix` bounding, `node_modules`/`.git` pruning), with
46844
47412
  * `onUnreadable: "skip"` preserving this module's silent-skip policy for
46845
- * unreadable directories. Matching semantics are minimatch DEFAULTS via the
46846
- * compiled pattern notably, wildcards do not match dotfiles, same as the
46847
- * previous `tinyglobby` defaults. An uncompilable pattern expands to no
46848
- * matches. `descend`'s `Path` requirement is satisfied internally with the
46849
- * core POSIX `Path.layer` this module already speaks POSIX relative match
46850
- * paths and node-bound absolute paths throughout.
47413
+ * unreadable directories. Matching semantics are {@link GLOB_OPTIONS}
47414
+ * wildcards DO match dotfiles, aligning this module with `ConfigInspector`. An
47415
+ * uncompilable pattern expands to no matches. The `Path` requirement is
47416
+ * satisfied internally with the core POSIX `Path.layer` this module already
47417
+ * speaks POSIX relative match paths and node-bound absolute paths throughout.
46851
47418
  *
46852
47419
  * @param source - The glob pattern, repo-relative
46853
47420
  * @param cwd - Absolute directory the pattern is resolved against
@@ -46856,13 +47423,11 @@ var VersionFiles = class VersionFiles {
46856
47423
  * @internal
46857
47424
  */
46858
47425
  function expandGlob(source, cwd) {
46859
- return effect.Effect.option(GlobPattern.compile(source)).pipe(effect.Effect.flatMap(effect.Option.match({
46860
- onNone: () => effect.Effect.succeed([]),
46861
- onSome: (pattern) => descend(pattern, {
46862
- cwd,
46863
- onUnreadable: "skip"
46864
- })
46865
- })), effect.Effect.provide(effect.Path.layer));
47426
+ return compileAndExpand(source, {
47427
+ cwd,
47428
+ onUnreadable: "skip",
47429
+ glob: GLOB_OPTIONS
47430
+ }).pipe(effect.Effect.catch((error) => error.stage === "compile" ? effect.Effect.succeed([]) : effect.Effect.fail(error)), effect.Effect.provide(effect.Path.layer));
46866
47431
  }
46867
47432
  /**
46868
47433
  * Read the `version` field from a `package.json` in the given directory.