@savvy-web/silk 3.2.9 → 3.3.0

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.
@@ -25,7 +25,7 @@ var __copyProps = (to, from, except, desc) => {
25
25
  }
26
26
  return to;
27
27
  };
28
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp$1(target, "default", {
29
29
  value: mod,
30
30
  enumerable: true
31
31
  }) : target, mod));
@@ -212,7 +212,7 @@ function isSilkChangelog(changelog) {
212
212
  * const reader = yield* ChangesetConfigReader;
213
213
  * return yield* reader.read(process.cwd());
214
214
  * }).pipe(
215
- * Effect.provide(ChangesetConfigReaderLive),
215
+ * Effect.provide(ChangesetConfigReader.layer),
216
216
  * Effect.provide(NodeServices.layer),
217
217
  * )
218
218
  * );
@@ -221,64 +221,65 @@ function isSilkChangelog(changelog) {
221
221
  * @since 0.1.0
222
222
  * @public
223
223
  */
224
- var ChangesetConfigReader = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfigReader") {};
225
- /**
226
- * Live implementation of {@link ChangesetConfigReader}.
227
- *
228
- * @remarks
229
- * Requires the core `FileSystem` service. Provide `NodeServices.layer` (or
230
- * `NodeFileSystem.layer`) from `@effect/platform-node` to satisfy this dependency.
231
- *
232
- * @since 0.1.0
233
- * @public
234
- */
235
- const ChangesetConfigReaderLive = effect.Layer.effect(ChangesetConfigReader, effect.Effect.gen(function* () {
236
- const fs = yield* effect.FileSystem.FileSystem;
237
- const read = (root) => {
238
- const configPath = `${root}/.changeset/config.json`;
239
- return effect.Effect.gen(function* () {
240
- if (!(yield* fs.exists(configPath).pipe(effect.Effect.mapError(
241
- /* v8 ignore next 4 -- error path requires fs.exists to fail */
242
- (cause) => new ChangesetConfigError({
243
- path: configPath,
244
- reason: String(cause)
245
- })
246
- )))) return yield* effect.Effect.fail(new ChangesetConfigError({
247
- path: configPath,
248
- reason: "File not found"
249
- }));
250
- const raw = yield* fs.readFileString(configPath).pipe(effect.Effect.mapError(
251
- /* v8 ignore next 4 -- error path requires fs.readFileString to fail */
252
- (cause) => new ChangesetConfigError({
253
- path: configPath,
254
- reason: String(cause)
255
- })
256
- ));
257
- const parsed = yield* effect.Effect.try({
258
- try: () => JSON.parse(raw),
259
- catch: (cause) => new ChangesetConfigError({
224
+ var ChangesetConfigReader = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfigReader") {
225
+ /**
226
+ * Production implementation of {@link ChangesetConfigReader}.
227
+ *
228
+ * @remarks
229
+ * Requires the core `FileSystem` service. Provide `NodeServices.layer` (or
230
+ * `NodeFileSystem.layer`) from `@effect/platform-node` to satisfy this dependency.
231
+ *
232
+ * @since 0.1.0
233
+ * @public
234
+ */
235
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
236
+ const fs = yield* effect.FileSystem.FileSystem;
237
+ const read = (root) => {
238
+ const configPath = `${root}/.changeset/config.json`;
239
+ return effect.Effect.gen(function* () {
240
+ if (!(yield* fs.exists(configPath).pipe(effect.Effect.mapError(
241
+ /* v8 ignore next 4 -- error path requires fs.exists to fail */
242
+ (cause) => new ChangesetConfigError({
243
+ path: configPath,
244
+ reason: String(cause)
245
+ })
246
+ )))) return yield* effect.Effect.fail(new ChangesetConfigError({
260
247
  path: configPath,
261
- reason: `Invalid JSON: ${String(cause)}`
262
- })
248
+ reason: "File not found"
249
+ }));
250
+ const raw = yield* fs.readFileString(configPath).pipe(effect.Effect.mapError(
251
+ /* v8 ignore next 4 -- error path requires fs.readFileString to fail */
252
+ (cause) => new ChangesetConfigError({
253
+ path: configPath,
254
+ reason: String(cause)
255
+ })
256
+ ));
257
+ const parsed = yield* effect.Effect.try({
258
+ try: () => JSON.parse(raw),
259
+ catch: (cause) => new ChangesetConfigError({
260
+ path: configPath,
261
+ reason: `Invalid JSON: ${String(cause)}`
262
+ })
263
+ });
264
+ if (isSilkChangelog(parsed.changelog)) return yield* effect.Schema.decodeUnknownEffect(SilkChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
265
+ /* v8 ignore next 4 -- error path requires schema decode failure */
266
+ (cause) => new ChangesetConfigError({
267
+ path: configPath,
268
+ reason: `Schema decode failed: ${String(cause)}`
269
+ })
270
+ ));
271
+ return yield* effect.Schema.decodeUnknownEffect(ChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
272
+ /* v8 ignore next 4 -- error path requires schema decode failure */
273
+ (cause) => new ChangesetConfigError({
274
+ path: configPath,
275
+ reason: `Schema decode failed: ${String(cause)}`
276
+ })
277
+ ));
263
278
  });
264
- if (isSilkChangelog(parsed.changelog)) return yield* effect.Schema.decodeUnknownEffect(SilkChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
265
- /* v8 ignore next 4 -- error path requires schema decode failure */
266
- (cause) => new ChangesetConfigError({
267
- path: configPath,
268
- reason: `Schema decode failed: ${String(cause)}`
269
- })
270
- ));
271
- return yield* effect.Schema.decodeUnknownEffect(ChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
272
- /* v8 ignore next 4 -- error path requires schema decode failure */
273
- (cause) => new ChangesetConfigError({
274
- path: configPath,
275
- reason: `Schema decode failed: ${String(cause)}`
276
- })
277
- ));
278
- });
279
- };
280
- return { read };
281
- }));
279
+ };
280
+ return { read };
281
+ }));
282
+ };
282
283
  //#endregion
283
284
  //#region ../silk-effects/dist/dev/pkg/errors/PublishTargetBindingError.js
284
285
  /**
@@ -307,6 +308,7 @@ var PublishTargetBindingError = class extends effect.Data.TaggedError("PublishTa
307
308
  };
308
309
  //#endregion
309
310
  //#region ../silk-effects/dist/dev/pkg/services/ChangesetConfig.js
311
+ const isSilk = (cfg) => "_isSilk" in cfg && cfg._isSilk === true;
310
312
  /**
311
313
  * Accessor service over a workspace root's `.changeset/config.json`.
312
314
  *
@@ -318,7 +320,7 @@ var PublishTargetBindingError = class extends effect.Data.TaggedError("PublishTa
318
320
  * @since 0.4.0
319
321
  * @public
320
322
  */
321
- var ChangesetConfig = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfig") {
323
+ var ChangesetConfig = class ChangesetConfig extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfig") {
322
324
  /**
323
325
  * The one ignore matcher: exact name match, or `@scope/*` wildcard.
324
326
  *
@@ -332,55 +334,54 @@ var ChangesetConfig = class extends effect.Context.Service()("@savvy-web/silk-ef
332
334
  }
333
335
  return name === pattern;
334
336
  }
337
+ /**
338
+ * Production layer for {@link ChangesetConfig}, reading via {@link ChangesetConfigReader}, cached per root.
339
+ *
340
+ * @remarks
341
+ * Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide
342
+ * `ChangesetConfigReader.layer` + a platform layer (`NodeServices.layer`).
343
+ *
344
+ * @since 0.4.0
345
+ * @public
346
+ */
347
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
348
+ const reader = yield* ChangesetConfigReader;
349
+ const cache = /* @__PURE__ */ new Map();
350
+ const read = (root) => effect.Effect.gen(function* () {
351
+ const hit = cache.get(root);
352
+ if (hit !== void 0) return hit;
353
+ const result = yield* reader.read(root).pipe(effect.Effect.option);
354
+ cache.set(root, result);
355
+ return result;
356
+ });
357
+ return {
358
+ mode: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
359
+ onNone: () => "none",
360
+ onSome: (cfg) => isSilk(cfg) ? "silk" : "vanilla"
361
+ }))),
362
+ versionPrivate: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
363
+ onNone: () => false,
364
+ onSome: (cfg) => {
365
+ const pp = cfg.privatePackages;
366
+ return pp !== void 0 && pp !== false && pp.version === true;
367
+ }
368
+ }))),
369
+ ignorePatterns: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
370
+ onNone: () => [],
371
+ onSome: (cfg) => cfg.ignore ?? []
372
+ }))),
373
+ isIgnored: (name, root) => read(root).pipe(effect.Effect.map(effect.Option.match({
374
+ onNone: () => false,
375
+ onSome: (cfg) => (cfg.ignore ?? []).some((p) => ChangesetConfig.matches(name, p))
376
+ }))),
377
+ fixed: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
378
+ onNone: () => [],
379
+ onSome: (cfg) => cfg.fixed ?? []
380
+ }))),
381
+ refresh: () => effect.Effect.sync(() => cache.clear())
382
+ };
383
+ }));
335
384
  };
336
- const isSilk = (cfg) => "_isSilk" in cfg && cfg._isSilk === true;
337
- /**
338
- * Live {@link ChangesetConfig} reading via {@link ChangesetConfigReader}, cached per root.
339
- *
340
- * @remarks
341
- * Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide
342
- * `ChangesetConfigReaderLive` + a platform layer (`NodeServices.layer`).
343
- *
344
- * @since 0.4.0
345
- * @public
346
- */
347
- const ChangesetConfigLive = effect.Layer.effect(ChangesetConfig, effect.Effect.gen(function* () {
348
- const reader = yield* ChangesetConfigReader;
349
- const cache = /* @__PURE__ */ new Map();
350
- const read = (root) => effect.Effect.gen(function* () {
351
- const hit = cache.get(root);
352
- if (hit !== void 0) return hit;
353
- const result = yield* reader.read(root).pipe(effect.Effect.option);
354
- cache.set(root, result);
355
- return result;
356
- });
357
- return {
358
- mode: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
359
- onNone: () => "none",
360
- onSome: (cfg) => isSilk(cfg) ? "silk" : "vanilla"
361
- }))),
362
- versionPrivate: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
363
- onNone: () => false,
364
- onSome: (cfg) => {
365
- const pp = cfg.privatePackages;
366
- return pp !== void 0 && pp !== false && pp.version === true;
367
- }
368
- }))),
369
- ignorePatterns: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
370
- onNone: () => [],
371
- onSome: (cfg) => cfg.ignore ?? []
372
- }))),
373
- isIgnored: (name, root) => read(root).pipe(effect.Effect.map(effect.Option.match({
374
- onNone: () => false,
375
- onSome: (cfg) => (cfg.ignore ?? []).some((p) => ChangesetConfig.matches(name, p))
376
- }))),
377
- fixed: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
378
- onNone: () => [],
379
- onSome: (cfg) => cfg.fixed ?? []
380
- }))),
381
- refresh: () => effect.Effect.sync(() => cache.clear())
382
- };
383
- }));
384
385
  //#endregion
385
386
  //#region ../silk-effects/dist/dev/pkg/utils/TrailingSlash.js
386
387
  /**
@@ -400,7 +401,7 @@ const trimTrailingSlashes = (s) => {
400
401
  //#endregion
401
402
  //#region ../../node_modules/.pnpm/@effected+glob@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/glob/internal/limits.js
402
403
  /** Hard cap on pattern length. Upstream minimatch's MAX_PATTERN_LENGTH (64KB). */
403
- const MAX_PATTERN_LENGTH = 1024 * 64;
404
+ const MAX_PATTERN_LENGTH = 65536;
404
405
  /** Default brace-expansion output budget. Upstream brace-expansion's EXPANSION_MAX. */
405
406
  const EXPANSION_MAX = 1e5;
406
407
  /**
@@ -2332,7 +2333,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2332
2333
  }
2333
2334
  };
2334
2335
  //#endregion
2335
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/BunExtension.js
2336
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/BunExtension.js
2336
2337
  /**
2337
2338
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2338
2339
  * when the format is `"bun"`.
@@ -2353,7 +2354,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
2353
2354
  trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
2354
2355
  }) {};
2355
2356
  //#endregion
2356
- //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogResolver.js
2357
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogResolver.js
2357
2358
  /**
2358
2359
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2359
2360
  * version ranges.
@@ -2399,7 +2400,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
2399
2400
  static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
2400
2401
  };
2401
2402
  //#endregion
2402
- //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/WorkspaceResolver.js
2403
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/WorkspaceResolver.js
2403
2404
  /**
2404
2405
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2405
2406
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2460,7 +2461,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
2460
2461
  static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
2461
2462
  };
2462
2463
  //#endregion
2463
- //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogAssemblyError.js
2464
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogAssemblyError.js
2464
2465
  /**
2465
2466
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2466
2467
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2504,7 +2505,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
2504
2505
  }
2505
2506
  };
2506
2507
  //#endregion
2507
- //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySection.js
2508
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySection.js
2508
2509
  /**
2509
2510
  * The short dependency kind: which dependency map an entry came from, named the
2510
2511
  * way consumers branch on it.
@@ -2536,7 +2537,7 @@ Object.fromEntries(Object.entries({
2536
2537
  optional: "optionalDependencies"
2537
2538
  }).map(([kind, field]) => [field, kind]));
2538
2539
  //#endregion
2539
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/desugar.js
2540
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/desugar.js
2540
2541
  const sv = (major, minor, patch, prerelease = [], build = []) => ({
2541
2542
  major,
2542
2543
  minor,
@@ -2625,7 +2626,7 @@ const desugarHyphen = (lower, upper) => {
2625
2626
  return [comp(">=", lowerVersion)];
2626
2627
  };
2627
2628
  //#endregion
2628
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/grammar.js
2629
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/grammar.js
2629
2630
  /** Private control-flow exception; never escapes the entry points. */
2630
2631
  var ParseFailure = class {
2631
2632
  position;
@@ -2861,13 +2862,17 @@ const parseSimple = (s) => {
2861
2862
  if (ch === "~") {
2862
2863
  advance$1(s);
2863
2864
  if (peek$1(s) === ">") return fail(s);
2864
- return desugarTilde(parsePartial(s));
2865
+ const partial = parsePartial(s);
2866
+ return desugarTilde(partial);
2865
2867
  }
2866
2868
  if (ch === "^") {
2867
2869
  advance$1(s);
2868
- return desugarCaret(parsePartial(s));
2870
+ const partial = parsePartial(s);
2871
+ return desugarCaret(partial);
2869
2872
  }
2870
- return desugarXRange(parseOperator(s), parsePartial(s));
2873
+ const operator = parseOperator(s);
2874
+ const partial = parsePartial(s);
2875
+ return desugarXRange(operator, partial);
2871
2876
  };
2872
2877
  const atRangeEnd = (s) => {
2873
2878
  if (atEnd$1(s)) return true;
@@ -2884,7 +2889,8 @@ const parseRangeComparators = (s) => {
2884
2889
  advance$1(s);
2885
2890
  advance$1(s);
2886
2891
  advance$1(s);
2887
- return desugarHyphen(lower, parsePartial(s));
2892
+ const upper = parsePartial(s);
2893
+ return desugarHyphen(lower, upper);
2888
2894
  } catch (failure) {
2889
2895
  if (!(failure instanceof ParseFailure)) throw failure;
2890
2896
  s.pos = savedPos;
@@ -3020,7 +3026,7 @@ const formatComparator = (c) => {
3020
3026
  /** Print comparator sets as `a b || c d`. */
3021
3027
  const formatRange = (sets) => sets.map((set) => set.map(formatComparator).join(" ")).join(" || ");
3022
3028
  //#endregion
3023
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/order.js
3029
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/order.js
3024
3030
  /**
3025
3031
  * Compare two prerelease identifiers per SemVer 2.0.0 §11: numeric
3026
3032
  * identifiers always have lower precedence than alphanumeric ones; numerics
@@ -3073,7 +3079,7 @@ const compareBuild = (a, b) => {
3073
3079
  return 0;
3074
3080
  };
3075
3081
  //#endregion
3076
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/SemVer.js
3082
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/SemVer.js
3077
3083
  /**
3078
3084
  * Indicates that a string could not be parsed as a valid SemVer 2.0.0 version.
3079
3085
  *
@@ -3154,6 +3160,35 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3154
3160
  encode: (parts) => effect.Effect.succeed(formatVersion(parts))
3155
3161
  })));
3156
3162
  /**
3163
+ * `Schema.String` refined by {@link SemVer.isValid}: an exact SemVer 2.0.0
3164
+ * version string whose type stays `string`.
3165
+ *
3166
+ * @remarks
3167
+ * For consumer structs whose field must remain a plain string — a manifest
3168
+ * model, an action input — while still refusing everything that is not
3169
+ * exactly one version: ranges, partial versions, dist-tags, and padded
3170
+ * input (see {@link SemVer.isValid} for the whitespace posture). Build
3171
+ * metadata is valid grammar and passes; reach for
3172
+ * {@link SemVer.PinnableVersionString} when the `+` position is spoken for.
3173
+ * Decode to a {@link SemVer} instance with {@link SemVer.FromString}
3174
+ * instead when the parsed components are wanted.
3175
+ */
3176
+ static ExactVersionString = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => SemVer.isValid(value) ? void 0 : "Expected an exact SemVer 2.0.0 version string (ranges, partial versions, dist-tags and surrounding whitespace are not valid)")));
3177
+ /**
3178
+ * `Schema.String` refined by {@link SemVer.isPinnable}: an exact,
3179
+ * build-metadata-free SemVer 2.0.0 version string whose type stays
3180
+ * `string`.
3181
+ *
3182
+ * @remarks
3183
+ * The corepack-pinnable notion: what the `<name>@<version>[+<integrity>]`
3184
+ * pin grammar can express in its version position, where the first `+`
3185
+ * always begins the integrity component. `@effected/package-json`'s
3186
+ * `PackageManager` field model consumes this schema directly; suites that
3187
+ * must prove they share it rather than carrying a copy can assert object
3188
+ * identity against this export.
3189
+ */
3190
+ static PinnableVersionString = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => SemVer.isPinnable(value) ? void 0 : "Expected an exact SemVer version with no build metadata (ranges, partial versions, dist-tags and surrounding whitespace are not pinnable)")));
3191
+ /**
3157
3192
  * Parse a strict SemVer 2.0.0 version string, synchronously, returning a
3158
3193
  * `Result` instead of an `Effect`.
3159
3194
  *
@@ -3161,6 +3196,12 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3161
3196
  * identifiers and partially consumed input.
3162
3197
  *
3163
3198
  * @remarks
3199
+ * **Surrounding whitespace is TRIMMED before parsing**, matching
3200
+ * node-semver's constructor: `" 1.2.3"` parses successfully. When padded
3201
+ * input should be the caller's error rather than silently canonicalized,
3202
+ * reach for {@link SemVer.isValid} / {@link SemVer.ExactVersionString}
3203
+ * (or their pinnable twins), which deliberately reject it.
3204
+ *
3164
3205
  * {@link SemVer.parse} is defined in terms of this function; the two never
3165
3206
  * diverge. Reach for the `Effect` variant inside Effect code — it carries
3166
3207
  * the `SemVer.parse` tracing span — and for this one at synchronous
@@ -3206,6 +3247,49 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3206
3247
  */
3207
3248
  static parse = effect.Effect.fn("SemVer.parse")((input) => effect.Effect.fromResult(SemVer.parseResult(input)));
3208
3249
  /**
3250
+ * Whether `input` is a valid SemVer 2.0.0 version string, exactly as
3251
+ * given.
3252
+ *
3253
+ * @remarks
3254
+ * Strict grammar validity — the same grammar as {@link SemVer.parseResult}
3255
+ * — with one deliberate divergence: surrounding whitespace is **rejected**.
3256
+ * `parseResult` trims its input (matching node-semver, whose `SemVer`
3257
+ * constructor trims), so `" 1.2.3"` parses; this predicate answers a
3258
+ * different question — "is this string, byte for byte, a version?" — and a
3259
+ * padded input is the caller's bug to surface, not this package's to hide.
3260
+ * Build metadata is valid grammar (`isValid("1.2.3+build")` is `true`);
3261
+ * reach for {@link SemVer.isPinnable} when the `+` position must stay
3262
+ * free.
3263
+ *
3264
+ * @param input - the candidate version string
3265
+ * @returns `true` when `input` is a valid version string with no
3266
+ * surrounding whitespace.
3267
+ */
3268
+ static isValid(input) {
3269
+ return input === input.trim() && effect.Result.isSuccess(SemVer.parseResult(input));
3270
+ }
3271
+ /**
3272
+ * Whether `input` is a corepack-pinnable version string: valid by
3273
+ * {@link SemVer.isValid} **and** carrying no build metadata.
3274
+ *
3275
+ * @remarks
3276
+ * The notion the `<name>@<version>[+<integrity>]` pin grammar needs: there
3277
+ * the first `+` after the version always begins the integrity component,
3278
+ * so a version carrying build identifiers would encode to a string that
3279
+ * re-parses differently. Prerelease versions are pinnable; the whitespace
3280
+ * posture is {@link SemVer.isValid}'s.
3281
+ *
3282
+ * @param input - the candidate version string
3283
+ * @returns `true` when `input` is a valid version string with no
3284
+ * surrounding whitespace (the string equals its own trim) and whose
3285
+ * build metadata is empty.
3286
+ */
3287
+ static isPinnable(input) {
3288
+ if (input !== input.trim()) return false;
3289
+ const parsed = SemVer.parseResult(input);
3290
+ return effect.Result.isSuccess(parsed) && parsed.success.build.length === 0;
3291
+ }
3292
+ /**
3209
3293
  * Positional convenience constructor: `SemVer.of(1, 2, 3)`.
3210
3294
  *
3211
3295
  * @param major - the major version component
@@ -3308,9 +3392,7 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3308
3392
  case "minor":
3309
3393
  key = `${version.major}.${version.minor}`;
3310
3394
  break;
3311
- case "patch":
3312
- key = `${version.major}.${version.minor}.${version.patch}`;
3313
- break;
3395
+ case "patch": key = `${version.major}.${version.minor}.${version.patch}`;
3314
3396
  }
3315
3397
  const group = grouped[key] ?? [];
3316
3398
  group.push(version);
@@ -3508,7 +3590,7 @@ var SemVerBump = class {
3508
3590
  }
3509
3591
  };
3510
3592
  //#endregion
3511
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/Comparator.js
3593
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/Comparator.js
3512
3594
  /**
3513
3595
  * Indicates that a string could not be parsed as a single comparator.
3514
3596
  *
@@ -3642,7 +3724,7 @@ var Comparator = class Comparator extends effect.Schema.Class("Comparator")({
3642
3724
  }
3643
3725
  };
3644
3726
  //#endregion
3645
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/normalize.js
3727
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/normalize.js
3646
3728
  const operatorWeight = (op) => {
3647
3729
  switch (op) {
3648
3730
  case ">=": return 0;
@@ -3673,7 +3755,7 @@ const normalizeComparatorSet = (set) => sortComparators(removeDuplicates(set));
3673
3755
  /** Normalize every comparator set in a range: sort and deduplicate each independently. */
3674
3756
  const normalizeSets = (sets) => sets.map(normalizeComparatorSet);
3675
3757
  //#endregion
3676
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/Range.js
3758
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/Range.js
3677
3759
  /**
3678
3760
  * Indicates that a string could not be parsed as a range expression.
3679
3761
  *
@@ -3952,9 +4034,7 @@ const isSetSatisfiable = (set) => {
3952
4034
  case "<=":
3953
4035
  if (cmp > 0) return false;
3954
4036
  break;
3955
- case "=":
3956
- if (cmp !== 0) return false;
3957
- break;
4037
+ case "=": if (cmp !== 0) return false;
3958
4038
  }
3959
4039
  }
3960
4040
  for (const lo of lowers) for (const hi of uppers) {
@@ -3993,9 +4073,7 @@ const isComparatorImplied = (set, comp) => {
3993
4073
  if (s.operator === "<=" && cmp < 0) return true;
3994
4074
  if (s.operator === "=" && cmp < 0) return true;
3995
4075
  break;
3996
- case "=":
3997
- if (s.operator === "=" && cmp === 0) return true;
3998
- break;
4076
+ case "=": if (s.operator === "=" && cmp === 0) return true;
3999
4077
  }
4000
4078
  }
4001
4079
  return false;
@@ -4005,7 +4083,7 @@ const isComparatorSetSubset = (sub, sup) => {
4005
4083
  return true;
4006
4084
  };
4007
4085
  //#endregion
4008
- //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySpecifier.js
4086
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySpecifier.js
4009
4087
  /**
4010
4088
  * Indicates that a string could not be parsed as a valid dependency specifier.
4011
4089
  *
@@ -4212,9 +4290,9 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4212
4290
  FromString: fromString
4213
4291
  });
4214
4292
  //#endregion
4215
- //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/IntegrityHash.js
4293
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/IntegrityHash.js
4216
4294
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4217
- const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
4295
+ const COREPACK_RE = /^(sha1|sha224|sha256|sha384|sha512)\.[0-9a-f]+$/;
4218
4296
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
4219
4297
  const isSri = (value) => SRI_RE.test(value);
4220
4298
  const isCorepack = (value) => COREPACK_RE.test(value);
@@ -4264,6 +4342,58 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4264
4342
  algorithmOf,
4265
4343
  decode: decode$2
4266
4344
  });
4345
+ /**
4346
+ * {@link (IntegrityHash:variable)} narrowed to the corepack `<algo>.<hex>` form
4347
+ * — `sha512.deadbeef`, and corepack's own sha224 default pins
4348
+ * (`sha224.877304e3…`). An SRI (`sha512-<base64>`) or yarn (`10c0/<hex>`)
4349
+ * hash, both valid `IntegrityHash` values, fails this schema.
4350
+ *
4351
+ * @remarks
4352
+ * The corepack pin tail (`<name>@<version>+<integrity>`) is the one place the
4353
+ * kit meets this form, and two schemas name it: `PackageManagerPin.integrity`
4354
+ * here and `@effected/package-json`'s `PackageManager.integrity`. Both consume
4355
+ * **this** schema — the restriction existed privately in each module until they
4356
+ * were consolidated, and a private copy is exactly how the two drift (the
4357
+ * widening that admitted sha224 had to be made twice).
4358
+ *
4359
+ * It decodes to the same {@link IntegrityHashBrand} the unrestricted schema
4360
+ * does, so a corepack-validated value assigns anywhere an `IntegrityHash` is
4361
+ * expected; there is no second brand. Reach for
4362
+ * `IntegrityHash.isCorepack(value)` to ask the same question about a raw
4363
+ * string without decoding.
4364
+ *
4365
+ * That single brand is also why sharing this schema is not type-enforced, and
4366
+ * the consequence is sharper than it looks: a `Schema.check` is **erased from
4367
+ * the built type**, so this schema and the unrestricted one are the same
4368
+ * declared type. A consumer that quietly reverts to a private copy compiles
4369
+ * clean, and — if the copy is faithful — passes every rejection test too.
4370
+ * Neither `tsc` nor behaviour can see the re-fork.
4371
+ *
4372
+ * What does see it is **object identity**, so each consumer's suite asserts
4373
+ * that its field schema IS this export:
4374
+ * `PackageManagerPin.fields.integrity.schema === CorepackIntegrityHash` (an
4375
+ * `optionalKey` field keeps the inner schema on `.schema`), and
4376
+ * `PackageManager.fields.integrity.value === CorepackIntegrityHash` on the
4377
+ * `@effected/package-json` side (a `Schema.Option` keeps it on `.value`). Both
4378
+ * assertions carry a control against the unrestricted brand, so they discriminate
4379
+ * rather than passing on any schema at all. That identity assertion is the only
4380
+ * thing standing between the two surfaces and a silent re-fork; do not replace
4381
+ * it with a behavioural test, which cannot fail.
4382
+ *
4383
+ * @example
4384
+ * ```ts
4385
+ * import { CorepackIntegrityHash } from "@effected/npm";
4386
+ * import { Schema } from "effect";
4387
+ *
4388
+ * const decode = Schema.decodeUnknownExit(CorepackIntegrityHash);
4389
+ *
4390
+ * decode("sha512.deadbeef"); // success
4391
+ * decode("sha512-3q2+7w=="); // failure — SRI form
4392
+ * ```
4393
+ *
4394
+ * @public
4395
+ */
4396
+ const CorepackIntegrityHash = brandedIntegrity.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
4267
4397
  effect.Schema.Literals([
4268
4398
  "npm",
4269
4399
  "pnpm",
@@ -4278,15 +4408,22 @@ const PREFIXES = {
4278
4408
  "--no",
4279
4409
  "--"
4280
4410
  ],
4281
- dlxPrefix: ["npx"]
4411
+ dlxPrefix: ["npx"],
4412
+ scriptPrefix: [
4413
+ "npm",
4414
+ "run",
4415
+ "--"
4416
+ ]
4282
4417
  },
4283
4418
  pnpm: {
4284
4419
  prefix: ["pnpm", "exec"],
4285
- dlxPrefix: ["pnpm", "dlx"]
4420
+ dlxPrefix: ["pnpm", "dlx"],
4421
+ scriptPrefix: ["pnpm", "run"]
4286
4422
  },
4287
4423
  yarn: {
4288
4424
  prefix: ["yarn", "exec"],
4289
- dlxPrefix: ["yarn", "dlx"]
4425
+ dlxPrefix: ["yarn", "dlx"],
4426
+ scriptPrefix: ["yarn", "run"]
4290
4427
  },
4291
4428
  bun: {
4292
4429
  prefix: [
@@ -4294,15 +4431,16 @@ const PREFIXES = {
4294
4431
  "x",
4295
4432
  "--no-install"
4296
4433
  ],
4297
- dlxPrefix: ["bun", "x"]
4434
+ dlxPrefix: ["bun", "x"],
4435
+ scriptPrefix: ["bun", "run"]
4298
4436
  }
4299
4437
  };
4300
4438
  /**
4301
4439
  * How to run a project-local binary here.
4302
4440
  *
4303
4441
  * @remarks
4304
- * This is the whole of what tool discovery needs from a workspace: an argv
4305
- * prefix and a directory to run it in. It deliberately carries no workspace
4442
+ * This is the whole of what tool discovery needs from a workspace: argv
4443
+ * prefixes and a directory to run them in. It deliberately carries no workspace
4306
4444
  * root, no manifest and no package-manager semantics — `label` is for
4307
4445
  * reporting only, and nothing in this package branches on it.
4308
4446
  *
@@ -4315,6 +4453,8 @@ var ExecContext = class extends effect.Schema.Class("ExecContext")({
4315
4453
  prefix: effect.Schema.Array(effect.Schema.String),
4316
4454
  /** argv prefix that fetch-and-runs a package binary, e.g. `["pnpm", "dlx"]`. */
4317
4455
  dlxPrefix: effect.Schema.Array(effect.Schema.String),
4456
+ /** argv prefix that runs a `package.json` script, e.g. `["pnpm", "run"]`. */
4457
+ scriptPrefix: effect.Schema.Array(effect.Schema.String),
4318
4458
  /** Directory the prefix must run in. Omitted means "wherever the caller is". */
4319
4459
  directory: effect.Schema.optionalKey(effect.Schema.String)
4320
4460
  }) {
@@ -4327,6 +4467,19 @@ var ExecContext = class extends effect.Schema.Class("ExecContext")({
4327
4467
  return this.withPrefix(command, this.dlxPrefix);
4328
4468
  }
4329
4469
  /**
4470
+ * As {@link ExecContext.apply}, using `scriptPrefix` — runs a
4471
+ * `package.json` script by name.
4472
+ *
4473
+ * @remarks
4474
+ * The command's `command` is the script name and its `args` are the script's
4475
+ * arguments. Every launcher uses the explicit `run` form, and npm's prefix
4476
+ * carries a trailing `--` because bare `npm run <script> --flag` silently
4477
+ * claims `--flag` for npm itself instead of the script.
4478
+ */
4479
+ applyScript(command) {
4480
+ return this.withPrefix(command, this.scriptPrefix);
4481
+ }
4482
+ /**
4330
4483
  * Core's `prefix` and `setCwd` both return NEW commands, so the caller's
4331
4484
  * value is never mutated.
4332
4485
  */
@@ -4377,9 +4530,21 @@ var LocalExecError = class extends effect.Schema.TaggedErrorClass()("LocalExecEr
4377
4530
  * @public
4378
4531
  */
4379
4532
  var LocalExec = class LocalExec extends effect.Context.Service()("@effected/commands/LocalExec") {
4380
- /** The exec and dlx argv prefixes for a launcher — the single home of that knowledge. */
4533
+ /** The exec, dlx and script-runner argv prefixes for a launcher — the single home of that knowledge. */
4381
4534
  static prefixes = (launcher) => PREFIXES[launcher];
4382
4535
  /**
4536
+ * The argv prefix that runs a `package.json` script for `launcher`.
4537
+ *
4538
+ * @remarks
4539
+ * A projection of {@link LocalExec.prefixes} for the caller that only runs
4540
+ * scripts. Every launcher uses the explicit `run` form —
4541
+ * `["npm", "run", "--"]`, `["pnpm", "run"]`, `["yarn", "run"]` and
4542
+ * `["bun", "run"]` — and npm's carries a trailing `--` because bare
4543
+ * `npm run <script> --flag` silently claims `--flag` for npm itself; the
4544
+ * other three forward post-script arguments without it.
4545
+ */
4546
+ static scriptPrefix = (launcher) => PREFIXES[launcher].scriptPrefix;
4547
+ /**
4383
4548
  * No project-local execution context: every tool resolves globally.
4384
4549
  *
4385
4550
  * @remarks
@@ -4389,11 +4554,12 @@ var LocalExec = class LocalExec extends effect.Context.Service()("@effected/comm
4389
4554
  static layerNone = effect.Layer.succeed(this, { context: effect.Effect.succeed(effect.Option.none()) });
4390
4555
  /** A context for a known package manager, from the static prefix table. */
4391
4556
  static layerFor = (launcher, options) => {
4392
- const { prefix, dlxPrefix } = PREFIXES[launcher];
4557
+ const { prefix, dlxPrefix, scriptPrefix } = PREFIXES[launcher];
4393
4558
  return LocalExec.layerContext(ExecContext.make({
4394
4559
  label: launcher,
4395
4560
  prefix,
4396
4561
  dlxPrefix,
4562
+ scriptPrefix,
4397
4563
  ...options?.directory === void 0 ? {} : { directory: options.directory }
4398
4564
  }));
4399
4565
  };
@@ -4423,7 +4589,7 @@ var LocalExec = class LocalExec extends effect.Context.Service()("@effected/comm
4423
4589
  static layerTest = (overrides = {}) => effect.Layer.succeed(LocalExec, LocalExec.makeTest(overrides));
4424
4590
  };
4425
4591
  //#endregion
4426
- //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/ReleaseAgeGate.js
4592
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/ReleaseAgeGate.js
4427
4593
  const MS_PER_MINUTE = 6e4;
4428
4594
  /**
4429
4595
  * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
@@ -4593,7 +4759,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
4593
4759
  }
4594
4760
  };
4595
4761
  //#endregion
4596
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/ImporterDependency.js
4762
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/ImporterDependency.js
4597
4763
  /**
4598
4764
  * One declared dependency of one workspace importer, as the lockfile records it.
4599
4765
  *
@@ -4631,7 +4797,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
4631
4797
  depType: DependencyField
4632
4798
  }) {};
4633
4799
  //#endregion
4634
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/LockfileImporter.js
4800
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/LockfileImporter.js
4635
4801
  /**
4636
4802
  * One workspace importer's declared dependencies, as the lockfile records them.
4637
4803
  *
@@ -4655,7 +4821,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
4655
4821
  dependencies: effect.Schema.Array(ImporterDependency)
4656
4822
  }) {};
4657
4823
  //#endregion
4658
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/ResolvedPackage.js
4824
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/ResolvedPackage.js
4659
4825
  const EMPTY_DEPENDENCIES = {};
4660
4826
  /**
4661
4827
  * A package resolved from a lockfile.
@@ -4690,7 +4856,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
4690
4856
  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)))
4691
4857
  }) {};
4692
4858
  //#endregion
4693
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/WorkspaceDependency.js
4859
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/WorkspaceDependency.js
4694
4860
  /**
4695
4861
  * A directed dependency edge between two workspace packages as recorded in
4696
4862
  * the lockfile.
@@ -4712,7 +4878,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
4712
4878
  constraint: effect.Schema.String
4713
4879
  }) {};
4714
4880
  //#endregion
4715
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/PnpmExtension.js
4881
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/PnpmExtension.js
4716
4882
  /**
4717
4883
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
4718
4884
  * when the format is `"pnpm"`.
@@ -4737,7 +4903,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
4737
4903
  }))
4738
4904
  }) {};
4739
4905
  //#endregion
4740
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/LockfileFormat.js
4906
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/LockfileFormat.js
4741
4907
  /**
4742
4908
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
4743
4909
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -4758,20 +4924,24 @@ const LockfileFormat = effect.Schema.Literals([
4758
4924
  "yarn"
4759
4925
  ]);
4760
4926
  const FILENAMES = {
4761
- bun: "bun.lock",
4762
- npm: "package-lock.json",
4763
- pnpm: "pnpm-lock.yaml",
4764
- yarn: "yarn.lock"
4927
+ bun: ["bun.lock", "bun.lockb"],
4928
+ npm: ["package-lock.json", "npm-shrinkwrap.json"],
4929
+ pnpm: ["pnpm-lock.yaml"],
4930
+ yarn: ["yarn.lock"]
4765
4931
  };
4766
4932
  /**
4767
4933
  * The conventional lockfile filename for a format: `"bun.lock"`,
4768
4934
  * `"package-lock.json"`, `"pnpm-lock.yaml"` or `"yarn.lock"`.
4769
4935
  *
4936
+ * @remarks
4937
+ * The primary name only — the first element of {@link filenamesFor}, which is
4938
+ * what detection that must also see the genuine alternates should use.
4939
+ *
4770
4940
  * @public
4771
4941
  */
4772
- const filenameFor = (format) => FILENAMES[format];
4942
+ const filenameFor = (format) => FILENAMES[format][0];
4773
4943
  //#endregion
4774
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/shared.js
4944
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/shared.js
4775
4945
  /**
4776
4946
  * The four dependency sections of a manifest, in a stable order — the shared
4777
4947
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -5186,9 +5356,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
5186
5356
  else tokenError = "InvalidUnicode";
5187
5357
  break;
5188
5358
  }
5189
- default:
5190
- tokenError = "InvalidEscapeCharacter";
5191
- break;
5359
+ default: tokenError = "InvalidEscapeCharacter";
5192
5360
  }
5193
5361
  start = pos;
5194
5362
  } else if (isLineBreak$1(ch)) {
@@ -6702,7 +6870,7 @@ var JsoncModifier = class {
6702
6870
  });
6703
6871
  };
6704
6872
  //#endregion
6705
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/bun.js
6873
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/bun.js
6706
6874
  const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6707
6875
  const BunWorkspaceEntry = effect.Schema.Struct({
6708
6876
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6795,7 +6963,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
6795
6963
  };
6796
6964
  });
6797
6965
  //#endregion
6798
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/npm.js
6966
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/npm.js
6799
6967
  const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6800
6968
  const NpmPackageEntry = effect.Schema.Struct({
6801
6969
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -13717,7 +13885,7 @@ function deepEqualValues(a, b) {
13717
13885
  return false;
13718
13886
  }
13719
13887
  //#endregion
13720
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/documents.js
13888
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/documents.js
13721
13889
  /**
13722
13890
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
13723
13891
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -13787,7 +13955,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
13787
13955
  };
13788
13956
  });
13789
13957
  //#endregion
13790
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/pnpm.js
13958
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/pnpm.js
13791
13959
  const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
13792
13960
  specifier: effect.Schema.String,
13793
13961
  version: effect.Schema.String
@@ -13912,7 +14080,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
13912
14080
  };
13913
14081
  });
13914
14082
  //#endregion
13915
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/yarn.js
14083
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/yarn.js
13916
14084
  const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
13917
14085
  const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
13918
14086
  const YarnEntry = effect.Schema.Struct({
@@ -14035,7 +14203,7 @@ const cleanYarnDeps = (deps) => {
14035
14203
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
14036
14204
  };
14037
14205
  //#endregion
14038
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/Lockfile.js
14206
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/Lockfile.js
14039
14207
  const EMPTY_IMPORTERS = [];
14040
14208
  /**
14041
14209
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -14279,7 +14447,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
14279
14447
  }
14280
14448
  };
14281
14449
  //#endregion
14282
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/LockfileIntegrity.js
14450
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/LockfileIntegrity.js
14283
14451
  /**
14284
14452
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
14285
14453
  * lockfile against: a package name plus the four optional dependency maps.
@@ -14395,7 +14563,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
14395
14563
  }
14396
14564
  };
14397
14565
  //#endregion
14398
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14566
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14399
14567
  /**
14400
14568
  * A resolved dependency entry pairing a package name with its version
14401
14569
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -14459,7 +14627,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
14459
14627
  }
14460
14628
  };
14461
14629
  //#endregion
14462
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14630
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14463
14631
  /**
14464
14632
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
14465
14633
  *
@@ -16014,7 +16182,7 @@ effect.Schema.String.pipe(effect.Schema.decodeTo(SpdxExpressionUnion, effect.Sch
16014
16182
  encode: (expression) => effect.Effect.succeed(serialize$1(expression))
16015
16183
  })));
16016
16184
  //#endregion
16017
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16185
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16018
16186
  /**
16019
16187
  * Indicates that a string is not a valid SPDX license identifier or expression.
16020
16188
  *
@@ -16049,50 +16217,103 @@ const isValidSpdx = (value) => {
16049
16217
  */
16050
16218
  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"));
16051
16219
  //#endregion
16052
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16053
- const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
16054
- /**
16055
- * The `packageManager` field only ever carries corepack's `<algo>.<hex>`
16056
- * integrity form (the `name@version+sha512.<hex>` tail). Restrict the
16057
- * `@effected/npm` `IntegrityHash` brand — which also admits the SRI and yarn
16058
- * forms — to just the corepack shape, so an SRI or yarn integrity here fails
16059
- * typed rather than being accepted into a field that can never legitimately
16060
- * hold it.
16061
- */
16062
- const CorepackIntegrity = IntegrityHash.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => IntegrityHash.isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
16220
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16221
+ const PACKAGE_MANAGER_NAME_RE = /^[a-z]+$/;
16222
+ const invalid$1 = (input, message) => effect.Effect.fail(new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message }));
16063
16223
  /**
16064
16224
  * A structured `packageManager` value with `name`, `version` and an optional
16065
16225
  * `integrity` hash.
16066
16226
  *
16227
+ * @remarks
16228
+ * The same `<name>@<version>[+<integrity>]` triple `@effected/npm`'s
16229
+ * `PackageManagerPin` models, in its `package.json` field form. Both share the
16230
+ * strict pieces — the version is `@effected/semver`'s
16231
+ * `SemVer.PinnableVersionString` (decode rules through `SemVer.isPinnable`),
16232
+ * the integrity is npm's `CorepackIntegrityHash` — and
16233
+ * both apply the first-`+`-is-integrity rule. Reach for the pin when
16234
+ * provisioning a package manager; reach for this class when reading or writing
16235
+ * the manifest field.
16236
+ *
16237
+ * **The one deliberate divergence is the name grammar**, and it points this
16238
+ * way: the pin closes the set to the four managers the kit can provision
16239
+ * (`npm | pnpm | yarn | bun`), while this field model accepts any lowercase
16240
+ * name. The evidence:
16241
+ *
16242
+ * - Corepack 0.34.0 (`specUtils.ts`, `parseSpec`) recognises **three** names —
16243
+ * `npm`, `pnpm`, `yarn` — and throws an "unsupported package manager
16244
+ * specification" usage error for any other. Adopting that set here would reject
16245
+ * `bun@1.2.20`, which is real: six published packages in this repo's own
16246
+ * `node_modules` carry exactly that value, and a manifest model that cannot
16247
+ * read them is useless for the job it has.
16248
+ * - Corepack does not treat the set as closed either. `parseSpec` skips the
16249
+ * name check entirely when the spec is a URL, so a custom name is reachable
16250
+ * in corepack's own grammar (behind `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS`).
16251
+ * - npm documents no constraint on this field at all. Its `package.json`
16252
+ * reference constrains only `devEngines.packageManager.name` — a different
16253
+ * field, modeled here by `DevEngine` and out of scope for this class.
16254
+ *
16255
+ * So: field model = manifests as they exist in the wild; pin = the kit's
16256
+ * provisioning vocabulary. A name outside the pin's four is representable here
16257
+ * and simply will not be installable through the pin — which is the honest
16258
+ * relationship between a document model and a provisioning contract.
16259
+ *
16067
16260
  * @public
16068
16261
  */
16069
16262
  var PackageManager = class PackageManager extends effect.Schema.Class("PackageManager")({
16070
- /** The package-manager name (e.g. `pnpm`). */
16263
+ /** The package-manager name (e.g. `pnpm`). Any lowercase name — see the class remarks. */
16071
16264
  name: effect.Schema.String,
16072
- /** The version (e.g. `10.33.0`). */
16073
- version: effect.Schema.String,
16074
- /** The optional integrity hash (e.g. `sha512.abc`), an `@effected/npm` `IntegrityHash` restricted to the corepack `<algo>.<hex>` form. */
16075
- integrity: effect.Schema.Option(CorepackIntegrity)
16265
+ /**
16266
+ * The version (e.g. `10.33.0`): `@effected/semver`'s
16267
+ * `SemVer.PinnableVersionString` an exact SemVer 2.0.0 version with no
16268
+ * build metadata and no surrounding whitespace. Prerelease versions are
16269
+ * allowed (`10.0.0-rc.1`); ranges, partial versions, dist-tags,
16270
+ * leading-zero components and padded values are not, and a version
16271
+ * carrying build metadata is rejected at construction because the grammar
16272
+ * cannot express it. The shared schema is consumed by identity, not
16273
+ * copied — the suite asserts `fields.version === SemVer.PinnableVersionString`.
16274
+ */
16275
+ version: SemVer.PinnableVersionString,
16276
+ /**
16277
+ * The optional integrity hash (e.g. `sha512.abc`): `@effected/npm`'s
16278
+ * `CorepackIntegrityHash`, the shared restriction of the `IntegrityHash`
16279
+ * brand to the corepack `<algo>.<hex>` form.
16280
+ */
16281
+ integrity: effect.Schema.Option(CorepackIntegrityHash)
16076
16282
  }) {
16077
16283
  /**
16078
16284
  * Schema transformation between the `"name@version+integrity"` string and a
16079
16285
  * {@link PackageManager}.
16286
+ *
16287
+ * @remarks
16288
+ * Decoding splits on the first `@`, then on the first `+` — which always
16289
+ * begins the integrity, never semver build metadata — and validates each
16290
+ * component: the name against the lowercase grammar, the version through
16291
+ * `@effected/semver`'s strict parse, the integrity through
16292
+ * `CorepackIntegrityHash`. Every failure is a typed decode failure naming
16293
+ * the component that failed. Encoding prints the canonical string, which is
16294
+ * byte-identical to any input this codec accepts.
16080
16295
  */
16081
16296
  static FromString = effect.Schema.String.pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(PackageManager), effect.SchemaTransformation.transformOrFail({
16082
16297
  decode: (input) => {
16083
- const match = input.match(PACKAGE_MANAGER_RE);
16084
- if (match === null) return effect.Effect.fail(new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message: `Invalid packageManager format: "${input}"` }));
16085
- const rawIntegrity = match[3];
16086
- if (rawIntegrity === void 0) return effect.Effect.succeed(PackageManager.make({
16087
- name: match[1],
16088
- version: match[2],
16298
+ const at = input.indexOf("@");
16299
+ if (at === -1) return invalid$1(input, `Invalid packageManager format: "${input}"`);
16300
+ const name = input.slice(0, at);
16301
+ if (!PACKAGE_MANAGER_NAME_RE.test(name)) return invalid$1(input, `Invalid packageManager name: "${name}"`);
16302
+ const rest = input.slice(at + 1);
16303
+ const plus = rest.indexOf("+");
16304
+ const version = plus === -1 ? rest : rest.slice(0, plus);
16305
+ if (!SemVer.isPinnable(version)) return invalid$1(input, `Invalid packageManager version: "${version}"`);
16306
+ if (plus === -1) return effect.Effect.succeed(PackageManager.make({
16307
+ name,
16308
+ version,
16089
16309
  integrity: effect.Option.none()
16090
16310
  }));
16091
- const decoded = effect.Schema.decodeUnknownExit(CorepackIntegrity)(rawIntegrity);
16092
- if (effect.Exit.isFailure(decoded)) return effect.Effect.fail(new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message: `Invalid packageManager integrity: "${rawIntegrity}"` }));
16311
+ const rawIntegrity = rest.slice(plus + 1);
16312
+ const decoded = effect.Schema.decodeUnknownExit(CorepackIntegrityHash)(rawIntegrity);
16313
+ if (effect.Exit.isFailure(decoded)) return invalid$1(input, `Invalid packageManager integrity: "${rawIntegrity}"`);
16093
16314
  return effect.Effect.succeed(PackageManager.make({
16094
- name: match[1],
16095
- version: match[2],
16315
+ name,
16316
+ version,
16096
16317
  integrity: effect.Option.some(decoded.value)
16097
16318
  }));
16098
16319
  },
@@ -16107,7 +16328,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
16107
16328
  }
16108
16329
  };
16109
16330
  //#endregion
16110
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16331
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16111
16332
  /**
16112
16333
  * Indicates that a string could not be used as a valid npm package name.
16113
16334
  *
@@ -16165,7 +16386,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
16165
16386
  isScoped
16166
16387
  });
16167
16388
  //#endregion
16168
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16389
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16169
16390
  const parsePersonString = (input) => {
16170
16391
  const emailMatch = input.match(/<([^>]+)>/);
16171
16392
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -16311,7 +16532,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
16311
16532
  }
16312
16533
  };
16313
16534
  //#endregion
16314
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Repository.js
16535
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Repository.js
16315
16536
  /** The shorthand hosts npm resolves without a scheme. */
16316
16537
  const SHORTHAND_HOSTS = /* @__PURE__ */ new Map([
16317
16538
  ["github", "https://github.com"],
@@ -16486,7 +16707,7 @@ var Bugs = class Bugs extends effect.Schema.Class("Bugs")({
16486
16707
  })));
16487
16708
  };
16488
16709
  //#endregion
16489
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16710
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16490
16711
  const KEY_INDEX = new Map([
16491
16712
  "$schema",
16492
16713
  "name",
@@ -16709,7 +16930,7 @@ const renderJson = (raw, options) => {
16709
16930
  return options.newline ? `${json}\n` : json;
16710
16931
  };
16711
16932
  //#endregion
16712
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16933
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16713
16934
  const toHashMap = effect.SchemaTransformation.transform({
16714
16935
  decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
16715
16936
  encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
@@ -17020,11 +17241,12 @@ var Package = class Package extends effect.Schema.Class("Package")({
17020
17241
  * sorting and empty-map stripping unless the options opt out. Pure.
17021
17242
  */
17022
17243
  toJsonString(options) {
17023
- return renderJson(effect.Schema.encodeUnknownSync(Package.schema)(this), resolveFormatOptions(options));
17244
+ const raw = effect.Schema.encodeUnknownSync(Package.schema)(this);
17245
+ return renderJson(raw, resolveFormatOptions(options));
17024
17246
  }
17025
17247
  };
17026
17248
  //#endregion
17027
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspacePackage.js
17249
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspacePackage.js
17028
17250
  const EMPTY$1 = Object.freeze(Object.create(null));
17029
17251
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
17030
17252
  /**
@@ -17622,7 +17844,7 @@ var Walker$1 = class {
17622
17844
  static findRoot = findRoot$1;
17623
17845
  };
17624
17846
  //#endregion
17625
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceRoot.js
17847
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceRoot.js
17626
17848
  /**
17627
17849
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
17628
17850
  *
@@ -17809,7 +18031,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
17809
18031
  static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
17810
18032
  };
17811
18033
  //#endregion
17812
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/limits.js
18034
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/limits.js
17813
18035
  /**
17814
18036
  * Hard ceiling on directories the enumerator will visit for one pattern set.
17815
18037
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -17827,7 +18049,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
17827
18049
  */
17828
18050
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
17829
18051
  //#endregion
17830
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/traverse.js
18052
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/traverse.js
17831
18053
  /** Directory names never descended into. */
17832
18054
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
17833
18055
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -17917,7 +18139,7 @@ var Traversal = class {
17917
18139
  }
17918
18140
  };
17919
18141
  //#endregion
17920
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/enumerate.js
18142
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/enumerate.js
17921
18143
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
17922
18144
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
17923
18145
  /**
@@ -17987,7 +18209,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
17987
18209
  return results;
17988
18210
  });
17989
18211
  //#endregion
17990
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/patterns.js
18212
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/patterns.js
17991
18213
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
17992
18214
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
17993
18215
  const pnpmPatternsOf = (document) => {
@@ -18044,7 +18266,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
18044
18266
  return manifestPatternsOf(manifest);
18045
18267
  });
18046
18268
  //#endregion
18047
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceDiscovery.js
18269
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceDiscovery.js
18048
18270
  /**
18049
18271
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
18050
18272
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -18245,12 +18467,13 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
18245
18467
  kind: failure.kind,
18246
18468
  cause: failure.cause
18247
18469
  })));
18248
- const directories = yield* enumerate(root, yield* GlobSet.compile(patterns).pipe(effect.Effect.mapError((error) => new WorkspacePatternError({
18470
+ const globs = yield* GlobSet.compile(patterns).pipe(effect.Effect.mapError((error) => new WorkspacePatternError({
18249
18471
  root,
18250
18472
  pattern: error.pattern,
18251
18473
  kind: "uncompilable",
18252
18474
  detail: error.message
18253
- }))), { maxDepth: options?.maxDepth ?? 32 }).pipe(effect.Effect.mapError((failure) => new WorkspacePatternError({
18475
+ })));
18476
+ const directories = yield* enumerate(root, globs, { maxDepth: options?.maxDepth ?? 32 }).pipe(effect.Effect.mapError((failure) => new WorkspacePatternError({
18254
18477
  root,
18255
18478
  pattern: failure.pattern,
18256
18479
  kind: patternKindOf(failure.kind),
@@ -18364,7 +18587,10 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
18364
18587
  * (a fabricated root path would leak into consumer path logic), so an
18365
18588
  * unstubbed `info()` call is a test-wiring mistake and fails loudly as a
18366
18589
  * defect rather than succeeding with a lie or failing with a dishonest
18367
- * typed error.
18590
+ * typed error. A defect is not absorbed by `Effect.catch` or any
18591
+ * typed-error handler — deliberately, so code under test with a
18592
+ * best-effort `catch` cannot make the mandatory stub look optional; the
18593
+ * unstubbed call still fails the test.
18368
18594
  *
18369
18595
  * @example
18370
18596
  * ```ts
@@ -18478,7 +18704,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
18478
18704
  };
18479
18705
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
18480
18706
  //#endregion
18481
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/DependencyGraph.js
18707
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/DependencyGraph.js
18482
18708
  /**
18483
18709
  * Raised when the workspace dependency graph cannot be topologically ordered
18484
18710
  * because it contains a cycle.
@@ -18623,10 +18849,9 @@ packages: effect.Schema.Array(WorkspacePackage) }) {
18623
18849
  const { reverse } = this.#index();
18624
18850
  const affected = /* @__PURE__ */ new Set();
18625
18851
  const queue = [...names];
18626
- while (queue.length > 0) {
18627
- const current = queue.shift();
18628
- /* v8 ignore next */
18629
- if (current === void 0) break;
18852
+ for (let head = 0; head < queue.length; head += 1) {
18853
+ const current = queue[head];
18854
+ if (current === void 0) continue;
18630
18855
  if (affected.has(current)) continue;
18631
18856
  affected.add(current);
18632
18857
  for (const dependent of reverse.get(current) ?? []) if (!affected.has(dependent)) queue.push(dependent);
@@ -18657,10 +18882,9 @@ packages: effect.Schema.Array(WorkspacePackage) }) {
18657
18882
  }));
18658
18883
  const needed = /* @__PURE__ */ new Set();
18659
18884
  const queue = [...names];
18660
- while (queue.length > 0) {
18661
- const current = queue.shift();
18662
- /* v8 ignore next */
18663
- if (current === void 0) break;
18885
+ for (let head = 0; head < queue.length; head += 1) {
18886
+ const current = queue[head];
18887
+ if (current === void 0) continue;
18664
18888
  if (needed.has(current)) continue;
18665
18889
  needed.add(current);
18666
18890
  for (const dependency of forward.get(current) ?? []) if (!needed.has(dependency)) queue.push(dependency);
@@ -20122,7 +20346,7 @@ var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
20122
20346
  static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
20123
20347
  };
20124
20348
  //#endregion
20125
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ChangeDetector.js
20349
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ChangeDetector.js
20126
20350
  /**
20127
20351
  * Which git refs to compare, and whether to fold in the working tree.
20128
20352
  *
@@ -20374,7 +20598,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
20374
20598
  };
20375
20599
  }
20376
20600
  //#endregion
20377
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/catalogs.js
20601
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/catalogs.js
20378
20602
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
20379
20603
  const inlineCatalogs = (manifest) => {
20380
20604
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -20392,7 +20616,7 @@ const merge = (...sources) => mergeCatalogs(...sources);
20392
20616
  /** Whether `specifier` is a `catalog:` protocol reference, and which catalog it names. */
20393
20617
  const catalogNameOf = (specifier) => parseCatalogProtocol(specifier);
20394
20618
  /** Normalize the arbitrary shape of a catalog map into `CatalogEntries`, dropping anything unusable. */
20395
- const normalize$1 = (raw) => {
20619
+ const normalize$2 = (raw) => {
20396
20620
  if (raw === null || typeof raw !== "object") return {};
20397
20621
  const entries = {};
20398
20622
  for (const [catalogName, catalog] of Object.entries(raw)) {
@@ -20438,7 +20662,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
20438
20662
  });
20439
20663
  };
20440
20664
  //#endregion
20441
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ConfigDependencyHooks.js
20665
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ConfigDependencyHooks.js
20442
20666
  /** Whether `value` is a non-null, non-array object. */
20443
20667
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
20444
20668
  /**
@@ -20519,7 +20743,7 @@ const configToEntries = (config) => {
20519
20743
  ...isObject$2(raw.default) ? raw.default : {},
20520
20744
  ...config.catalog
20521
20745
  };
20522
- return normalize$1(raw);
20746
+ return normalize$2(raw);
20523
20747
  };
20524
20748
  /** Locate the `updateConfig` hook across the CJS/ESM export shapes a `pnpmfile.cjs` can present. */
20525
20749
  const updateConfigOf = (mod) => {
@@ -20587,7 +20811,8 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
20587
20811
  let loaded;
20588
20812
  let found = false;
20589
20813
  for (const filename of ["pnpmfile.mjs", "pnpmfile.cjs"]) {
20590
- const candidateUrl = (0, node_url.pathToFileURL)((0, node_path.join)(root, "node_modules", ".pnpm-config", name, filename)).href;
20814
+ const candidatePath = (0, node_path.join)(root, "node_modules", ".pnpm-config", name, filename);
20815
+ const candidateUrl = (0, node_url.pathToFileURL)(candidatePath).href;
20591
20816
  const result = yield* effect.Effect.result(effect.Effect.tryPromise({
20592
20817
  try: () => import(candidateUrl),
20593
20818
  catch: (cause) => cause
@@ -20624,7 +20849,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
20624
20849
  }) });
20625
20850
  };
20626
20851
  //#endregion
20627
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/PackageManagerName.js
20852
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/PackageManagerName.js
20628
20853
  /**
20629
20854
  * The four package managers this package understands.
20630
20855
  *
@@ -20914,6 +21139,11 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
20914
21139
  * reads as a legitimate "no manager here" answer, so a consumer would branch
20915
21140
  * on it and proceed, never learning that the test simply forgot to stub.
20916
21141
  *
21142
+ * The defect is also not absorbed by `Effect.catch` or any typed-error
21143
+ * handler — deliberately, so code under test with a best-effort `catch`
21144
+ * around detection cannot make the mandatory stub look optional; the
21145
+ * unstubbed call still fails the test.
21146
+ *
20917
21147
  * @param overrides - Members to supply; anything omitted dies on use.
20918
21148
  *
20919
21149
  * @example
@@ -20947,7 +21177,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
20947
21177
  static layerTest = (overrides = {}) => effect.Layer.succeed(PackageManagerDetector, PackageManagerDetector.makeTest(overrides));
20948
21178
  };
20949
21179
  //#endregion
20950
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/LockfileReader.js
21180
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/LockfileReader.js
20951
21181
  /**
20952
21182
  * Raised when the workspace's lockfile cannot be read off disk.
20953
21183
  *
@@ -21127,7 +21357,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
21127
21357
  static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
21128
21358
  };
21129
21359
  //#endregion
21130
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Publishability.js
21360
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Publishability.js
21131
21361
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
21132
21362
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
21133
21363
  /**
@@ -21264,8 +21494,15 @@ var PublishabilityDetector = class extends effect.Context.Service()("@effected/w
21264
21494
  * silence — `Layer.mergeAll(myDetector, Workspaces.layer())` resolved to the
21265
21495
  * default, because `mergeAll` is last-wins. For a service that decides
21266
21496
  * whether a package publishes and to which registry, that silent revert was
21267
- * the worst available failure. The requirement now sits in `R`, so the
21268
- * choice is made once, explicitly, and unmade wiring does not compile.
21497
+ * the worst available failure.
21498
+ *
21499
+ * The composites do not *require* a detector either — nothing inside them
21500
+ * asks a publishability question, so their `R` stays `FileSystem | Path`.
21501
+ * The requirement instead surfaces in the `R` of each operation that asks
21502
+ * (`VersioningStrategy.detect`, e.g.): a program that asks and never wires
21503
+ * a detector fails to compile where that operation's `R` must close — which
21504
+ * can be far from the layer-wiring site — and a program that never asks
21505
+ * never supplies a publish policy at all.
21269
21506
  */
21270
21507
  static layerNpm = effect.Layer.succeed(this, this.npm);
21271
21508
  /**
@@ -21279,7 +21516,7 @@ var PublishabilityDetector = class extends effect.Context.Service()("@effected/w
21279
21516
  static layerNone = effect.Layer.succeed(this, this.none);
21280
21517
  };
21281
21518
  //#endregion
21282
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/importerVersions.js
21519
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/importerVersions.js
21283
21520
  /**
21284
21521
  * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
21285
21522
  *
@@ -21365,7 +21602,7 @@ const unanimousVersionOf = (index, dependency) => {
21365
21602
  return agreed;
21366
21603
  };
21367
21604
  //#endregion
21368
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceCatalogs.js
21605
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceCatalogs.js
21369
21606
  /**
21370
21607
  * An immutable, fully-normalized catalog collection — the one catalog
21371
21608
  * resolution semantic in the package.
@@ -21388,7 +21625,7 @@ entries: effect.Schema.Record(effect.Schema.String, effect.Schema.Record(effect.
21388
21625
  }
21389
21626
  /** Wrap a pnpm `Catalogs` map, dropping unusable entries. */
21390
21627
  static fromCatalogs(catalogs) {
21391
- return CatalogSet.make({ entries: normalize$1(catalogs) });
21628
+ return CatalogSet.make({ entries: normalize$2(catalogs) });
21392
21629
  }
21393
21630
  /**
21394
21631
  * The `catalog:` and `catalogs:` blocks of a `pnpm-workspace.yaml` document.
@@ -21408,7 +21645,7 @@ entries: effect.Schema.Record(effect.Schema.String, effect.Schema.Record(effect.
21408
21645
  * range or a `{ specifier, version }` pair.
21409
21646
  */
21410
21647
  static fromLockfileCatalogs(raw) {
21411
- return CatalogSet.make({ entries: normalize$1(raw) });
21648
+ return CatalogSet.make({ entries: normalize$2(raw) });
21412
21649
  }
21413
21650
  /**
21414
21651
  * The catalog set a parsed lockfile records, PM-aware.
@@ -21874,7 +22111,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
21874
22111
  }));
21875
22112
  };
21876
22113
  //#endregion
21877
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
22114
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
21878
22115
  const EMPTY = Object.freeze(Object.create(null));
21879
22116
  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)));
21880
22117
  /**
@@ -22097,7 +22334,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
22097
22334
  }
22098
22335
  };
22099
22336
  //#endregion
22100
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceSnapshots.js
22337
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceSnapshots.js
22101
22338
  /** Whether `value` is a non-null, non-array object. */
22102
22339
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
22103
22340
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -22213,11 +22450,12 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
22213
22450
  let inline;
22214
22451
  let recorded;
22215
22452
  if (effect.Option.isSome(pnpmWorkspaceText)) {
22216
- const pnpmPatterns = pnpmPatternsOf(yield* Yaml.parse(pnpmWorkspaceText.value).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
22453
+ const document = yield* Yaml.parse(pnpmWorkspaceText.value).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
22217
22454
  source: "manifest",
22218
22455
  path: "pnpm-workspace.yaml",
22219
22456
  cause
22220
- }))));
22457
+ })));
22458
+ const pnpmPatterns = pnpmPatternsOf(document);
22221
22459
  patterns = pnpmPatterns.length > 0 ? pnpmPatterns : manifestPatternsOf(rootManifest);
22222
22460
  inline = yield* CatalogSet.fromWorkspaceYaml(pnpmWorkspaceText.value);
22223
22461
  recorded = yield* lockfileRecord(root, ref, "pnpm");
@@ -22261,7 +22499,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
22261
22499
  return {
22262
22500
  at: effect.Effect.fn("WorkspaceSnapshots.at")(function* (ref) {
22263
22501
  const root = yield* effect.Effect.suspend(() => roots.find(options?.cwd ?? process.cwd()));
22264
- const key = `${root}${ref}`;
22502
+ const key = `${root}\0${ref}`;
22265
22503
  let memo = atCaches.get(key);
22266
22504
  if (memo === void 0) {
22267
22505
  const [resolveOnce, invalidate] = yield* effect.Effect.cachedInvalidateWithTTL(computeAt(root, ref), effect.Duration.infinity);
@@ -22319,6 +22557,13 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
22319
22557
  * test-wiring mistake fails loudly as a defect rather than succeeding with a
22320
22558
  * lie.
22321
22559
  *
22560
+ * **A defect is not absorbed by `Effect.catch` or any typed-error handler**,
22561
+ * and that is the point: code under test with a best-effort `catch` around
22562
+ * its snapshot reads cannot make a mandatory stub look optional — the
22563
+ * unstubbed call still fails the test instead of quietly taking the catch
22564
+ * branch. Only defect-level combinators (`Effect.catchDefect`,
22565
+ * `Effect.exit`) would see it.
22566
+ *
22322
22567
  * @example
22323
22568
  * ```ts
22324
22569
  * import { CatalogSet, WorkspaceSnapshots, WorkspaceStateSnapshot } from "@effected/workspaces";
@@ -22366,7 +22611,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
22366
22611
  static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
22367
22612
  };
22368
22613
  //#endregion
22369
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Workspaces.js
22614
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Workspaces.js
22370
22615
  const compose = (options, catalogsFactory) => {
22371
22616
  const roots = WorkspaceRoot.layer;
22372
22617
  const detector = PackageManagerDetector.layer;
@@ -22399,11 +22644,12 @@ const localExecLayer = (options) => effect.Layer.effect(LocalExec, effect.Effect
22399
22644
  cause
22400
22645
  })));
22401
22646
  if (effect.Option.isNone(detected)) return effect.Option.none();
22402
- const { prefix, dlxPrefix } = LocalExec.prefixes(detected.value.name);
22647
+ const { prefix, dlxPrefix, scriptPrefix } = LocalExec.prefixes(detected.value.name);
22403
22648
  return effect.Option.some(ExecContext.make({
22404
22649
  label: detected.value.name,
22405
22650
  prefix,
22406
22651
  dlxPrefix,
22652
+ scriptPrefix,
22407
22653
  directory: root.value
22408
22654
  }));
22409
22655
  }) };
@@ -22417,13 +22663,23 @@ var Workspaces = class {
22417
22663
  constructor() {}
22418
22664
  /**
22419
22665
  * Every service that needs only a filesystem: root, package-manager
22420
- * detection, discovery, lockfile reading, catalogs and publishability.
22666
+ * detection, discovery, lockfile reading and catalogs.
22421
22667
  *
22422
22668
  * @remarks
22423
22669
  * Requires core `FileSystem` and `Path`, which the consumer provides at the
22424
22670
  * edge (`@effect/platform-node`, `@effect/platform-bun`, or a test's
22425
22671
  * `FileSystem.layerNoop`).
22426
22672
  *
22673
+ * **`PublishabilityDetector` is neither provided nor required here.** The
22674
+ * composite used to bake in npm semantics, which a naively-ordered override
22675
+ * silently lost to; now it supplies no default, and — because nothing inside
22676
+ * the composite asks a publishability question — it does not require one in
22677
+ * `R` either. The requirement surfaces in the `R` of each operation that
22678
+ * asks (`VersioningStrategy.detect`, e.g.), so a program that asks and never
22679
+ * wires a detector fails to compile at that operation, and a program that
22680
+ * never asks never supplies a publish policy. Wire one explicitly where
22681
+ * needed: `Layer.mergeAll(Workspaces.layer(), PublishabilityDetector.layerNpm)`.
22682
+ *
22427
22683
  * **Bind the result to a `const`.** This is a parameterized factory and
22428
22684
  * layers memoize by reference, so calling it twice builds everything twice.
22429
22685
  *
@@ -22479,7 +22735,8 @@ var Workspaces = class {
22479
22735
  * it. So `commands` declares the narrow contract and we ship the layer.
22480
22736
  *
22481
22737
  * **The argv knowledge is not duplicated.** `LocalExec.prefixes(name)` is
22482
- * the one home of the four managers' `exec`/`dlx` prefixes; this layer
22738
+ * the one home of the four managers' `exec`/`dlx`/script-runner prefixes;
22739
+ * this layer
22483
22740
  * detects *which* manager owns the directory and asks `commands` what that
22484
22741
  * manager's argv looks like. Neither package reimplements the other's
22485
22742
  * half.
@@ -22648,7 +22905,7 @@ const provenanceForRegistry = (registry) => {
22648
22905
  * @since 0.4.0
22649
22906
  * @public
22650
22907
  */
22651
- var SilkPublishability = class {
22908
+ var SilkPublishability = class SilkPublishability {
22652
22909
  /**
22653
22910
  * Apply silk publishability rules to a raw `package.json` and the bundler's resolved
22654
22911
  * target binding. Targets-first precedence:
@@ -22780,6 +23037,56 @@ var SilkPublishability = class {
22780
23037
  return out;
22781
23038
  });
22782
23039
  }
23040
+ /**
23041
+ * Override of `@effected/workspaces`' `PublishabilityDetector` Tag with pure silk rules.
23042
+ *
23043
+ * @remarks Requires `FileSystem` (captured at layer build); `detect` reads the raw
23044
+ * `package.json` from `pkg.packageJsonPath` and applies `SilkPublishability.detect`.
23045
+ *
23046
+ * @since 0.4.0
23047
+ * @public
23048
+ */
23049
+ static layer = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
23050
+ const fs = yield* effect.FileSystem.FileSystem;
23051
+ return { detect: (pkg) => effect.Effect.gen(function* () {
23052
+ const raw = yield* readRaw(fs, pkg.packageJsonPath);
23053
+ if (!raw) return [];
23054
+ const binding = yield* readTargetsBinding(fs, pkg.path);
23055
+ return SilkPublishability.detect(pkg.name, raw, binding);
23056
+ }) };
23057
+ }));
23058
+ /**
23059
+ * Ignore-aware override of `PublishabilityDetector`. `detect` short-circuits to `[]`
23060
+ * for changeset-ignored packages, then dispatches on `ChangesetConfig.mode`:
23061
+ * `none` → `[]`; `silk` → `SilkPublishability.detect`; `vanilla` → the library default.
23062
+ *
23063
+ * @remarks Requires `FileSystem` and {@link ChangesetConfig} at build.
23064
+ * The kit's `detect` contract no longer receives the workspace root, so the changeset
23065
+ * lookups read it from `pkg.workspaceRoot` — the discovery root the package was found
23066
+ * against, never a filesystem marker walk, which could escape an unmarked root and read
23067
+ * the wrong `.changeset/config.json`.
23068
+ *
23069
+ * @since 0.4.0
23070
+ * @public
23071
+ */
23072
+ static layerAdaptive = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
23073
+ const fs = yield* effect.FileSystem.FileSystem;
23074
+ const config = yield* ChangesetConfig;
23075
+ const vanilla = PublishabilityDetector.npm;
23076
+ return { detect: (pkg) => effect.Effect.gen(function* () {
23077
+ const root = pkg.workspaceRoot;
23078
+ if (yield* config.isIgnored(pkg.name, root)) return [];
23079
+ const mode = yield* config.mode(root);
23080
+ if (mode === "none") return [];
23081
+ if (mode === "silk") {
23082
+ const raw = yield* readRaw(fs, pkg.packageJsonPath);
23083
+ if (!raw) return [];
23084
+ const binding = yield* readTargetsBinding(fs, pkg.path);
23085
+ return SilkPublishability.detect(pkg.name, raw, binding);
23086
+ }
23087
+ return yield* vanilla.detect(pkg);
23088
+ }) };
23089
+ }));
22783
23090
  };
22784
23091
  /**
22785
23092
  * Reduce a directory to a comparable package-relative POSIX path: backslashes to
@@ -22796,7 +23103,8 @@ var SilkPublishability = class {
22796
23103
  */
22797
23104
  const normalizeDir = (dir) => {
22798
23105
  const slashed = dir.replaceAll("\\", "/");
22799
- const normalized = trimTrailingSlashes(slashed.startsWith("./") ? slashed.slice(2) : slashed);
23106
+ const withoutPrefix = slashed.startsWith("./") ? slashed.slice(2) : slashed;
23107
+ const normalized = trimTrailingSlashes(withoutPrefix);
22800
23108
  return normalized === "" ? "." : normalized;
22801
23109
  };
22802
23110
  /** True when a built target directory's package.json is `private: true`. Missing/unreadable/malformed → false. */
@@ -22826,47 +23134,6 @@ const readTargetsBinding = (fs, pkgPath) => fs.readFileString((0, node_path.join
22826
23134
  try: () => JSON.parse(content),
22827
23135
  catch: () => /* @__PURE__ */ new Error("invalid targets.json")
22828
23136
  })), effect.Effect.orElseSucceed(() => null));
22829
- effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
22830
- const fs = yield* effect.FileSystem.FileSystem;
22831
- return { detect: (pkg) => effect.Effect.gen(function* () {
22832
- const raw = yield* readRaw(fs, pkg.packageJsonPath);
22833
- if (!raw) return [];
22834
- const binding = yield* readTargetsBinding(fs, pkg.path);
22835
- return SilkPublishability.detect(pkg.name, raw, binding);
22836
- }) };
22837
- }));
22838
- /**
22839
- * Ignore-aware override of `PublishabilityDetector`. `detect` short-circuits to `[]`
22840
- * for changeset-ignored packages, then dispatches on `ChangesetConfig.mode`:
22841
- * `none` → `[]`; `silk` → `SilkPublishability.detect`; `vanilla` → the library default.
22842
- *
22843
- * @remarks Requires `FileSystem` and {@link ChangesetConfig} at build.
22844
- * The kit's `detect` contract no longer receives the workspace root, so the changeset
22845
- * lookups read it from `pkg.workspaceRoot` — the discovery root the package was found
22846
- * against, never a filesystem marker walk, which could escape an unmarked root and read
22847
- * the wrong `.changeset/config.json`.
22848
- *
22849
- * @since 0.4.0
22850
- * @public
22851
- */
22852
- const PublishabilityDetectorAdaptiveLive = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
22853
- const fs = yield* effect.FileSystem.FileSystem;
22854
- const config = yield* ChangesetConfig;
22855
- const vanilla = PublishabilityDetector.npm;
22856
- return { detect: (pkg) => effect.Effect.gen(function* () {
22857
- const root = pkg.workspaceRoot;
22858
- if (yield* config.isIgnored(pkg.name, root)) return [];
22859
- const mode = yield* config.mode(root);
22860
- if (mode === "none") return [];
22861
- if (mode === "silk") {
22862
- const raw = yield* readRaw(fs, pkg.packageJsonPath);
22863
- if (!raw) return [];
22864
- const binding = yield* readTargetsBinding(fs, pkg.path);
22865
- return SilkPublishability.detect(pkg.name, raw, binding);
22866
- }
22867
- return yield* vanilla.detect(pkg);
22868
- }) };
22869
- }));
22870
23137
  //#endregion
22871
23138
  //#region ../silk-effects/dist/dev/pkg/_virtual/_rolldown/runtime.js
22872
23139
  var __defProp = Object.defineProperty;
@@ -24679,21 +24946,20 @@ function getGitHubInfo(params) {
24679
24946
  /**
24680
24947
  * GitHub service for fetching commit metadata.
24681
24948
  *
24682
- * Defines the {@link GitHubService} Effect service tag, the
24683
- * {@link GitHubLive | production layer} backed by `\@changesets/get-github-info`,
24949
+ * Defines the {@link GitHubService} Effect service tag, its
24950
+ * `GitHubService.layer` production layer backed by `\@changesets/get-github-info`,
24684
24951
  * and the {@link makeGitHubTest} helper for constructing deterministic test
24685
24952
  * layers.
24686
24953
  *
24687
24954
  * @remarks
24688
24955
  * The GitHub service is consumed by the changelog formatters to resolve
24689
24956
  * commit hashes into pull-request numbers, author usernames, and link URLs.
24690
- * In production, {@link GitHubLive} calls the GitHub REST API via the
24957
+ * In production, `GitHubService.layer` calls the GitHub REST API via the
24691
24958
  * vendored `getGitHubInfo` wrapper. In tests, {@link makeGitHubTest}
24692
24959
  * returns canned responses from a `Map` keyed by commit hash.
24693
24960
  *
24694
24961
  * @see {@link GitHubService} for the Effect service tag
24695
24962
  * @see {@link GitHubServiceShape} for the service interface
24696
- * @see {@link GitHubLive} for the production layer
24697
24963
  * @see {@link makeGitHubTest} for constructing test layers
24698
24964
  */
24699
24965
  /**
@@ -24707,13 +24973,13 @@ function getGitHubInfo(params) {
24707
24973
  * This tag follows the standard Effect `Context.Service` pattern. Two layers
24708
24974
  * are provided out of the box:
24709
24975
  *
24710
- * - {@link GitHubLive} — production layer backed by the GitHub REST API
24976
+ * - `GitHubService.layer` — production layer backed by the GitHub REST API
24711
24977
  * - {@link makeGitHubTest} — factory for deterministic test layers
24712
24978
  *
24713
24979
  * @example
24714
24980
  * ```typescript
24715
- * import { Effect, Layer } from "effect";
24716
- * import { GitHubService, GitHubLive } from "\@savvy-web/changesets";
24981
+ * import { Effect } from "effect";
24982
+ * import { GitHubService } from "\@savvy-web/changesets";
24717
24983
  *
24718
24984
  * const program = Effect.gen(function* () {
24719
24985
  * const github = yield* GitHubService;
@@ -24725,7 +24991,7 @@ function getGitHubInfo(params) {
24725
24991
  * });
24726
24992
  *
24727
24993
  * // Provide the live layer and run
24728
- * Effect.runPromise(program.pipe(Effect.provide(GitHubLive)));
24994
+ * Effect.runPromise(program.pipe(Effect.provide(GitHubService.layer)));
24729
24995
  * ```
24730
24996
  *
24731
24997
  * @example Creating a test layer with canned responses
@@ -24749,41 +25015,41 @@ function getGitHubInfo(params) {
24749
25015
  * ```
24750
25016
  *
24751
25017
  * @see {@link GitHubServiceShape} for the service interface
24752
- * @see {@link GitHubLive} for the production layer
24753
25018
  * @see {@link makeGitHubTest} for creating test layers
24754
25019
  *
24755
25020
  * @public
24756
25021
  */
24757
- var GitHubService = class extends effect.Context.Service()("GitHubService") {};
24758
- /**
24759
- * Production layer for {@link GitHubService}.
24760
- *
24761
- * Delegates to `\@changesets/get-github-info` to fetch commit metadata
24762
- * from the GitHub REST API. Requires a `GITHUB_TOKEN` environment variable
24763
- * to be set for authenticated requests.
24764
- *
24765
- * @remarks
24766
- * This layer is used by the `\@savvy-web/changesets/changelog` entry point
24767
- * to resolve commit hashes into PR numbers and author attribution. It is
24768
- * used by the changelog formatter's
24769
- * `MainLayer`.
24770
- *
24771
- * @example
24772
- * ```typescript
24773
- * import { Effect } from "effect";
24774
- * import { GitHubService, GitHubLive } from "\@savvy-web/changesets";
24775
- *
24776
- * const program = Effect.gen(function* () {
24777
- * const github = yield* GitHubService;
24778
- * return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" });
24779
- * });
24780
- *
24781
- * Effect.runPromise(program.pipe(Effect.provide(GitHubLive)));
24782
- * ```
24783
- *
24784
- * @public
24785
- */
24786
- const GitHubLive = effect.Layer.succeed(GitHubService, { getInfo: getGitHubInfo });
25022
+ var GitHubService = class extends effect.Context.Service()("GitHubService") {
25023
+ /**
25024
+ * Production layer for {@link GitHubService}.
25025
+ *
25026
+ * Delegates to `\@changesets/get-github-info` to fetch commit metadata
25027
+ * from the GitHub REST API. Requires a `GITHUB_TOKEN` environment variable
25028
+ * to be set for authenticated requests.
25029
+ *
25030
+ * @remarks
25031
+ * This layer is used by the `\@savvy-web/changesets/changelog` entry point
25032
+ * to resolve commit hashes into PR numbers and author attribution. It is
25033
+ * used by the changelog formatter's
25034
+ * `MainLayer`.
25035
+ *
25036
+ * @example
25037
+ * ```typescript
25038
+ * import { Effect } from "effect";
25039
+ * import { GitHubService } from "\@savvy-web/changesets";
25040
+ *
25041
+ * const program = Effect.gen(function* () {
25042
+ * const github = yield* GitHubService;
25043
+ * return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" });
25044
+ * });
25045
+ *
25046
+ * Effect.runPromise(program.pipe(Effect.provide(GitHubService.layer)));
25047
+ * ```
25048
+ *
25049
+ * @public
25050
+ */
25051
+ static layer = effect.Layer.succeed(this, { getInfo: getGitHubInfo });
25052
+ };
24787
25053
  /**
24788
25054
  * Create a test layer for {@link GitHubService} with pre-configured responses.
24789
25055
  *
@@ -35175,7 +35441,9 @@ function factoryLabel(effects, ok, nok, type, markerType, stringType) {
35175
35441
  * @type {State}
35176
35442
  */
35177
35443
  function atBreak(code) {
35178
- if (size > 999 || code === null || code === 91 || code === 93 && !seen || code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
35444
+ if (size > 999 || code === null || code === 91 || code === 93 && !seen ||
35445
+ /* c8 ignore next 3 */
35446
+ code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
35179
35447
  if (code === 93) {
35180
35448
  effects.exit(stringType);
35181
35449
  effects.enter(markerType);
@@ -45199,6 +45467,22 @@ function inferDependencyType(dep) {
45199
45467
  return "dependency";
45200
45468
  }
45201
45469
  /**
45470
+ * Narrow a dependency update to one with both version endpoints present.
45471
+ *
45472
+ * `@changesets/types` only guarantees `oldVersion`/`newVersion` on the
45473
+ * `major`/`minor`/`patch` arms of `ComprehensiveRelease`; a `type: "none"`
45474
+ * entry may carry neither. The table's `From`/`To` columns are validated
45475
+ * version strings, so an entry missing either endpoint has no row to render.
45476
+ *
45477
+ * @param dep - The dependency update to test
45478
+ * @returns `true` when both `oldVersion` and `newVersion` are present
45479
+ *
45480
+ * @internal
45481
+ */
45482
+ function isVersioned(dep) {
45483
+ return dep.oldVersion !== void 0 && dep.newVersion !== void 0;
45484
+ }
45485
+ /**
45202
45486
  * Format dependency release lines as a structured markdown table.
45203
45487
  *
45204
45488
  * This is the core Effect program that implements the `getDependencyReleaseLine`
@@ -45209,8 +45493,9 @@ function inferDependencyType(dep) {
45209
45493
  * The function maps each `ModCompWithPackage` entry to a `DependencyTableRow`,
45210
45494
  * inferring the dependency type from the consuming package's `package.json`,
45211
45495
  * then delegates to `serializeDependencyTableToMarkdown` for GFM table
45212
- * rendering, prefixed with a `### Dependencies` heading. Returns an empty
45213
- * string when no dependencies were updated.
45496
+ * rendering, prefixed with a `### Dependencies` heading. Entries missing
45497
+ * either version endpoint are dropped by {@link isVersioned}; the function
45498
+ * returns an empty string when no rows survive.
45214
45499
  *
45215
45500
  * The `_changesets` and `_options` parameters are part of the Changesets API
45216
45501
  * contract but are not used in the table format. They are retained for
@@ -45219,19 +45504,21 @@ function inferDependencyType(dep) {
45219
45504
  * @param _changesets - Changesets that caused the dependency updates (unused in table format)
45220
45505
  * @param dependenciesUpdated - The list of dependencies that were updated, including old/new versions
45221
45506
  * @param _options - Validated configuration options (unused in table format)
45222
- * @returns An `Effect` that resolves to a `### Dependencies` heading followed by a formatted markdown table string, or empty string if no dependencies were updated
45507
+ * @returns An `Effect` that resolves to a `### Dependencies` heading followed by a formatted markdown table string, or empty string if no dependencies with both version endpoints were updated
45223
45508
  */
45224
45509
  function getDependencyReleaseLine(_changesets, dependenciesUpdated, _options) {
45225
45510
  return effect.Effect.gen(function* () {
45226
45511
  if (dependenciesUpdated.length === 0) return "";
45227
45512
  yield* GitHubService;
45228
- return `### Dependencies\n\n${serializeDependencyTableToMarkdown(dependenciesUpdated.map((dep) => ({
45513
+ const rows = dependenciesUpdated.filter(isVersioned).map((dep) => ({
45229
45514
  dependency: dep.name,
45230
45515
  type: inferDependencyType(dep),
45231
45516
  action: "updated",
45232
45517
  from: dep.oldVersion,
45233
45518
  to: dep.newVersion
45234
- })))}`;
45519
+ }));
45520
+ if (rows.length === 0) return "";
45521
+ return `### Dependencies\n\n${serializeDependencyTableToMarkdown(rows)}`;
45235
45522
  });
45236
45523
  }
45237
45524
  //#endregion
@@ -45735,7 +46022,7 @@ function getReleaseLine(changeset, versionType, options) {
45735
46022
  * @remarks
45736
46023
  * The module composes two Effect programs — {@link getReleaseLine} and
45737
46024
  * {@link getDependencyReleaseLine} — and runs each through
45738
- * `Effect.runPromise` with {@link GitHubLive} (for commit metadata). Options are
46025
+ * `Effect.runPromise` with `GitHubService.layer` (for commit metadata). Options are
45739
46026
  * validated at the boundary via `validateChangesetOptions` before being
45740
46027
  * passed to the formatters.
45741
46028
  *
@@ -45777,14 +46064,14 @@ function getReleaseLine(changeset, versionType, options) {
45777
46064
  /**
45778
46065
  * The layer providing every service the formatters need.
45779
46066
  *
45780
- * {@link GitHubLive} satisfies the requirements of both `getReleaseLine` and
46067
+ * `GitHubService.layer` satisfies the requirements of both `getReleaseLine` and
45781
46068
  * `getDependencyReleaseLine`, which each need only `GitHubService`. Markdown
45782
46069
  * parsing is not a layer: the formatters call the remark pipeline's
45783
46070
  * `parseMarkdown` / `stringifyMarkdown` functions directly.
45784
46071
  *
45785
46072
  * @internal
45786
46073
  */
45787
- const MainLayer = GitHubLive;
46074
+ const MainLayer = GitHubService.layer;
45788
46075
  /**
45789
46076
  * Changesets API `ChangelogFunctions` implementation.
45790
46077
  *
@@ -47247,7 +47534,8 @@ var ChangelogTransformer = class ChangelogTransformer {
47247
47534
  */
47248
47535
  static transformFile(filePath, options) {
47249
47536
  const content = (0, node_fs.readFileSync)(filePath, "utf-8");
47250
- (0, node_fs.writeFileSync)(filePath, ChangelogTransformer.transformContent(content, options), "utf-8");
47537
+ const result = ChangelogTransformer.transformContent(content, options);
47538
+ (0, node_fs.writeFileSync)(filePath, result, "utf-8");
47251
47539
  }
47252
47540
  };
47253
47541
  //#endregion
@@ -47282,7 +47570,6 @@ var ChangelogTransformer = class ChangelogTransformer {
47282
47570
  * {@link ConfigInspectorShape.classify} calls reuse it.
47283
47571
  *
47284
47572
  * @see {@link ConfigInspector} for the Effect service tag
47285
- * @see {@link ConfigInspectorLive} for the production layer
47286
47573
  *
47287
47574
  */
47288
47575
  /** A `versionFiles` entry expanded to its absolute target paths. @public */
@@ -47336,7 +47623,7 @@ const ClassificationSchema = effect.Schema.Struct({
47336
47623
  * @example
47337
47624
  * ```typescript
47338
47625
  * import { Effect } from "effect";
47339
- * import { ConfigInspector, ConfigInspectorLive } from "@savvy-web/changesets";
47626
+ * import { ConfigInspector } from "@savvy-web/changesets";
47340
47627
  *
47341
47628
  * const program = Effect.gen(function* () {
47342
47629
  * const inspector = yield* ConfigInspector;
@@ -47344,12 +47631,24 @@ const ClassificationSchema = effect.Schema.Struct({
47344
47631
  * return config.packages.map((p) => p.name);
47345
47632
  * });
47346
47633
  *
47347
- * Effect.runPromise(program.pipe(Effect.provide(ConfigInspectorLive)));
47634
+ * Effect.runPromise(program.pipe(Effect.provide(ConfigInspector.layer)));
47348
47635
  * ```
47349
47636
  *
47350
47637
  * @public
47351
47638
  */
47352
- var ConfigInspector = class extends effect.Context.Service()("ConfigInspector") {};
47639
+ var ConfigInspector = class extends effect.Context.Service()("ConfigInspector") {
47640
+ /**
47641
+ * Production layer for {@link ConfigInspector}.
47642
+ *
47643
+ * Requires {@link ChangesetConfigReader} and `WorkspaceDiscovery`
47644
+ * in the environment.
47645
+ *
47646
+ * @public
47647
+ */
47648
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
47649
+ return makeShape$3(yield* ChangesetConfigReader, yield* WorkspaceDiscovery, yield* effect.FileSystem.FileSystem);
47650
+ }));
47651
+ };
47353
47652
  /**
47354
47653
  * Pull the changelog formatter ID and its options object out of the raw
47355
47654
  * `.changeset/config.json` shape (where `changelog` may be a tuple, a string,
@@ -47743,22 +48042,11 @@ function classifyOne(inspected, path) {
47743
48042
  };
47744
48043
  }
47745
48044
  /**
47746
- * Live layer for {@link ConfigInspector}.
47747
- *
47748
- * Requires {@link ChangesetConfigReader} and `WorkspaceDiscovery`
47749
- * in the environment.
47750
- *
47751
- * @public
47752
- */
47753
- const ConfigInspectorLive = effect.Layer.effect(ConfigInspector, effect.Effect.gen(function* () {
47754
- return makeShape$3(yield* ChangesetConfigReader, yield* WorkspaceDiscovery, yield* effect.FileSystem.FileSystem);
47755
- }));
47756
- /**
47757
48045
  * Test factory — build a {@link ConfigInspector} that returns a fixed
47758
48046
  * {@link InspectedConfig} without touching the filesystem.
47759
48047
  *
47760
48048
  * Tests that need to exercise the inspect/classify logic against real files
47761
- * should compose `ConfigInspectorLive` with test layers for
48049
+ * should compose `ConfigInspector.layer` with test layers for
47762
48050
  * `ChangesetConfigReader` and `WorkspaceDiscovery` instead.
47763
48051
  *
47764
48052
  * @public
@@ -47804,7 +48092,7 @@ const BranchAnalysisSchema = effect.Schema.Struct({
47804
48092
  * @example
47805
48093
  * ```typescript
47806
48094
  * import { Effect } from "effect";
47807
- * import { BranchAnalyzer, BranchAnalyzerLive, ConfigInspectorLive } from "@savvy-web/changesets";
48095
+ * import { BranchAnalyzer, ConfigInspector } from "@savvy-web/changesets";
47808
48096
  *
47809
48097
  * const program = Effect.gen(function* () {
47810
48098
  * const analyzer = yield* BranchAnalyzer;
@@ -47814,16 +48102,30 @@ const BranchAnalysisSchema = effect.Schema.Struct({
47814
48102
  *
47815
48103
  * Effect.runPromise(
47816
48104
  * program.pipe(
47817
- * Effect.provide(BranchAnalyzerLive),
47818
- * Effect.provide(ConfigInspectorLive),
47819
- * // ... + ChangesetConfigReaderLive + kit workspace layers + NodeServices.layer
48105
+ * Effect.provide(BranchAnalyzer.layer),
48106
+ * Effect.provide(ConfigInspector.layer),
48107
+ * // ... + ChangesetConfigReader.layer + kit workspace layers + NodeServices.layer
47820
48108
  * ),
47821
48109
  * );
47822
48110
  * ```
47823
48111
  *
47824
48112
  * @public
47825
48113
  */
47826
- var BranchAnalyzer = class extends effect.Context.Service()("BranchAnalyzer") {};
48114
+ var BranchAnalyzer = class extends effect.Context.Service()("BranchAnalyzer") {
48115
+ /**
48116
+ * Production layer for {@link BranchAnalyzer}.
48117
+ *
48118
+ * Requires {@link ConfigInspector} (which in turn requires
48119
+ * `ChangesetConfigReader` and `WorkspaceDiscovery`) and a
48120
+ * `ChildProcessSpawner` (satisfied by `NodeServices.layer`) for the
48121
+ * internally-composed `@effected/git` layer.
48122
+ *
48123
+ * @public
48124
+ */
48125
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
48126
+ return makeShape$2(yield* ConfigInspector, yield* Git);
48127
+ })).pipe(effect.Layer.provide(Git.layer));
48128
+ };
47827
48129
  /**
47828
48130
  * Fold a `@effected/git` typed failure into this package's {@link GitError},
47829
48131
  * preserving the public `ConfigurationError | GitError` error channel.
@@ -47907,19 +48209,6 @@ function makeShape$2(inspector, git) {
47907
48209
  return { analyzeBranch };
47908
48210
  }
47909
48211
  /**
47910
- * Live layer for {@link BranchAnalyzer}.
47911
- *
47912
- * Requires {@link ConfigInspector} (which in turn requires
47913
- * `ChangesetConfigReader` and `WorkspaceDiscovery`) and a
47914
- * `ChildProcessSpawner` (satisfied by `NodeServices.layer`) for the
47915
- * internally-composed `@effected/git` layer.
47916
- *
47917
- * @public
47918
- */
47919
- const BranchAnalyzerLive = effect.Layer.effect(BranchAnalyzer, effect.Effect.gen(function* () {
47920
- return makeShape$2(yield* ConfigInspector, yield* Git);
47921
- })).pipe(effect.Layer.provide(Git.layer));
47922
- /**
47923
48212
  * Test factory — build a {@link BranchAnalyzer} that returns a fixed
47924
48213
  * {@link BranchAnalysis} for any input.
47925
48214
  *
@@ -47947,7 +48236,7 @@ function makeBranchAnalyzerTest(fixed) {
47947
48236
  * ```typescript
47948
48237
  * import { Effect } from "effect";
47949
48238
  * import type { ChangesetOptions } from "\@savvy-web/changesets";
47950
- * import { ChangelogService, GitHubLive } from "\@savvy-web/changesets";
48239
+ * import { ChangelogService } from "\@savvy-web/changesets";
47951
48240
  *
47952
48241
  * const program = Effect.gen(function* () {
47953
48242
  * const changelog = yield* ChangelogService;
@@ -48141,10 +48430,10 @@ function gitListChangesetFilesAtRef(cwd, ref) {
48141
48430
  *
48142
48431
  * @remarks
48143
48432
  * Uses the currently-active {@link SilkPublishability} — wire the
48144
- * {@link SilkPublishabilityDetectorLive} layer to get silk semantics.
48433
+ * `SilkPublishability.layer` layer to get silk semantics.
48145
48434
  *
48146
48435
  * The kit's `PublishabilityDetector.detect` contract no longer receives the
48147
- * workspace root — the ignore/mode-aware `PublishabilityDetectorAdaptiveLive`
48436
+ * workspace root — the ignore/mode-aware `SilkPublishability.layerAdaptive`
48148
48437
  * derives the `.changeset/config.json` root per package from the package's
48149
48438
  * own discovery coordinates (`pkg.path` ascended by `pkg.relativePath`).
48150
48439
  * The `root` parameter is retained for signature stability
@@ -48198,7 +48487,6 @@ function listPublishablePackageNames(packages, _root) {
48198
48487
  * and MCP tools are thin adapters over this service.
48199
48488
  *
48200
48489
  * @see {@link DepsRegen} for the service tag
48201
- * @see {@link DepsRegenLive} for the production layer
48202
48490
  *
48203
48491
  */
48204
48492
  const ADJECTIVES = [
@@ -48397,7 +48685,30 @@ function renderChangesetContent(diff) {
48397
48685
  *
48398
48686
  * @public
48399
48687
  */
48400
- var DepsRegen = class extends effect.Context.Service()("Changesets/DepsRegen") {};
48688
+ var DepsRegen = class extends effect.Context.Service()("Changesets/DepsRegen") {
48689
+ /**
48690
+ * Production layer for {@link DepsRegen}.
48691
+ *
48692
+ * Requires `WorkspaceSnapshots`, `WorkspaceDiscovery`,
48693
+ * `PublishabilityDetector` (all from `@effected/workspaces`),
48694
+ * `Git` (from `@effected/git`, backing merge-base resolution),
48695
+ * {@link ConfigInspector}, {@link ChangesetConfig}, and
48696
+ * `FileSystem.FileSystem` (resolved once at construction and closed over by
48697
+ * the shape, keeping `plan`/`execute` themselves requirement-free).
48698
+ *
48699
+ * @public
48700
+ */
48701
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
48702
+ const snapshots = yield* WorkspaceSnapshots;
48703
+ const inspector = yield* ConfigInspector;
48704
+ const discovery = yield* WorkspaceDiscovery;
48705
+ const detector = yield* PublishabilityDetector;
48706
+ const config = yield* ChangesetConfig;
48707
+ const fs = yield* effect.FileSystem.FileSystem;
48708
+ const git = yield* Git;
48709
+ return makeShape$1(snapshots, inspector, discovery, detector, config, fs, effect.Layer.succeed(Git, git));
48710
+ }));
48711
+ };
48401
48712
  /**
48402
48713
  * Build a {@link DepsRegenShape} that closes over already-resolved service
48403
48714
  * implementations, keeping the public `plan`/`execute` signatures
@@ -48490,29 +48801,7 @@ function makeShape$1(snapshots, inspector, discovery, detector, config, fs, prov
48490
48801
  execute
48491
48802
  };
48492
48803
  }
48493
- /**
48494
- * Live layer for {@link DepsRegen}.
48495
- *
48496
- * Requires `WorkspaceSnapshots`, `WorkspaceDiscovery`,
48497
- * `PublishabilityDetector` (all from `@effected/workspaces`),
48498
- * `Git` (from `@effected/git`, backing merge-base resolution),
48499
- * {@link ConfigInspector}, {@link ChangesetConfig}, and
48500
- * `FileSystem.FileSystem` (resolved once at construction and closed over by
48501
- * the shape, keeping `plan`/`execute` themselves requirement-free).
48502
- *
48503
- * @public
48504
- */
48505
- const DepsRegenLive = effect.Layer.effect(DepsRegen, effect.Effect.gen(function* () {
48506
- const snapshots = yield* WorkspaceSnapshots;
48507
- const inspector = yield* ConfigInspector;
48508
- const discovery = yield* WorkspaceDiscovery;
48509
- const detector = yield* PublishabilityDetector;
48510
- const config = yield* ChangesetConfig;
48511
- const fs = yield* effect.FileSystem.FileSystem;
48512
- const git = yield* Git;
48513
- return makeShape$1(snapshots, inspector, discovery, detector, config, fs, effect.Layer.succeed(Git, git));
48514
- }));
48515
- const ConfigGraph = ChangesetConfigLive.pipe(effect.Layer.provide(ChangesetConfigReaderLive));
48804
+ const ConfigGraph = ChangesetConfig.layer.pipe(effect.Layer.provide(ChangesetConfigReader.layer));
48516
48805
  /**
48517
48806
  * Build the batteries-included {@link DepsRegen} layer over a
48518
48807
  * `@effected/workspaces` kit graph bound to `options.cwd`.
@@ -48534,7 +48823,7 @@ const ConfigGraph = ChangesetConfigLive.pipe(effect.Layer.provide(ChangesetConfi
48534
48823
  */
48535
48824
  function makeDepsRegenDefault(options) {
48536
48825
  const kitGraph = Workspaces.layerWithGit(options);
48537
- return DepsRegenLive.pipe(effect.Layer.provide(ConfigInspectorLive.pipe(effect.Layer.provide(effect.Layer.mergeAll(ChangesetConfigReaderLive, kitGraph)))), effect.Layer.provide(PublishabilityDetectorAdaptiveLive.pipe(effect.Layer.provide(effect.Layer.mergeAll(ConfigGraph, kitGraph)))), effect.Layer.provide(ConfigGraph), effect.Layer.provide(kitGraph));
48826
+ return DepsRegen.layer.pipe(effect.Layer.provide(ConfigInspector.layer.pipe(effect.Layer.provide(effect.Layer.mergeAll(ChangesetConfigReader.layer, kitGraph)))), effect.Layer.provide(SilkPublishability.layerAdaptive.pipe(effect.Layer.provide(effect.Layer.mergeAll(ConfigGraph, kitGraph)))), effect.Layer.provide(ConfigGraph), effect.Layer.provide(kitGraph));
48538
48827
  }
48539
48828
  /**
48540
48829
  * Batteries-included {@link DepsRegen} layer: silk's opinionated default
@@ -48546,10 +48835,10 @@ function makeDepsRegenDefault(options) {
48546
48835
  * (`NodeServices.layer`), not a bare filesystem-only layer.
48547
48836
  *
48548
48837
  * Gating uses silk's adaptive publishability detector
48549
- * ({@link PublishabilityDetectorAdaptiveLive}), so the default semantics
48838
+ * (`SilkPublishability.layerAdaptive`), so the default semantics
48550
48839
  * are "versionable minus ignored" — identical to the savvy CLI and MCP
48551
48840
  * runtimes. Consumers who need to swap any dependency (test detectors,
48552
- * alternate config sources) should keep composing {@link DepsRegenLive}
48841
+ * alternate config sources) should keep composing {@link DepsRegen.layer}
48553
48842
  * directly; this layer is purely additive.
48554
48843
  *
48555
48844
  * @example
@@ -48608,6 +48897,10 @@ const MaintenanceReasonSchema = effect.Schema.Struct({
48608
48897
  * will not match here; the release then degrades gracefully to the
48609
48898
  * `"unspecified"` fallback sentence instead of naming its triggers.
48610
48899
  *
48900
+ * Co-members releasing as `type: "none"` are never triggers — they carry no
48901
+ * version bump (and, per `@changesets/types`, no guaranteed `newVersion`), so
48902
+ * naming one would print an unchanged version as the cause of the release.
48903
+ *
48611
48904
  * @public
48612
48905
  */
48613
48906
  function deriveMaintenanceReason(release, plan, config) {
@@ -48615,7 +48908,7 @@ function deriveMaintenanceReason(release, plan, config) {
48615
48908
  const groupKinds = [["fixed", config.fixed], ["linked", config.linked]];
48616
48909
  for (const [kind, groups] of groupKinds) for (const group of groups) {
48617
48910
  if (!group.some((pattern) => ChangesetConfig.matches(release.name, pattern))) continue;
48618
- const triggers = plan.releases.filter((r) => r.name !== release.name && r.changesets.length > 0 && group.some((pattern) => ChangesetConfig.matches(r.name, pattern))).map((r) => ({
48911
+ const triggers = plan.releases.filter((r) => r.name !== release.name && r.type !== "none" && r.changesets.length > 0 && group.some((pattern) => ChangesetConfig.matches(r.name, pattern))).map((r) => ({
48619
48912
  name: r.name,
48620
48913
  version: r.newVersion
48621
48914
  }));
@@ -48734,14 +49027,12 @@ function walkJsonPath(obj, path) {
48734
49027
  path: [...nodePath, segment.index]
48735
49028
  });
48736
49029
  break;
48737
- case "wildcard":
48738
- if (Array.isArray(node)) node.forEach((element, index) => {
48739
- next.push({
48740
- node: element,
48741
- path: [...nodePath, index]
48742
- });
49030
+ case "wildcard": if (Array.isArray(node)) node.forEach((element, index) => {
49031
+ next.push({
49032
+ node: element,
49033
+ path: [...nodePath, index]
48743
49034
  });
48744
- break;
49035
+ });
48745
49036
  }
48746
49037
  }
48747
49038
  current = next;
@@ -49796,7 +50087,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49796
50087
  };
49797
50088
  module.exports = {
49798
50089
  DEFAULT_MAX_EXTGLOB_RECURSION,
49799
- MAX_LENGTH: 1024 * 64,
50090
+ MAX_LENGTH: 65536,
49800
50091
  POSIX_REGEX_SOURCE: {
49801
50092
  __proto__: null,
49802
50093
  alnum: "a-zA-Z0-9",
@@ -51885,7 +52176,7 @@ function formatPaths(paths, mapper) {
51885
52176
  if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
51886
52177
  return paths;
51887
52178
  }
51888
- const defaultOptions = {
52179
+ const defaultOptions$1 = {
51889
52180
  caseSensitiveMatch: true,
51890
52181
  debug: !!process.env.TINYGLOBBY_DEBUG,
51891
52182
  expandDirectories: true,
@@ -51894,7 +52185,7 @@ const defaultOptions = {
51894
52185
  };
51895
52186
  function getOptions(options) {
51896
52187
  const opts = Object.assign({}, options);
51897
- for (const key in defaultOptions) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions[key] });
52188
+ for (const key in defaultOptions$1) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions$1[key] });
51898
52189
  opts.cwd = (opts.cwd instanceof URL ? (0, url.fileURLToPath)(opts.cwd) : (0, path.resolve)(opts.cwd || process.cwd())).replace(BACKSLASHES, "/");
51899
52190
  opts.ignore = ensureStringArray(opts.ignore);
51900
52191
  opts.fs && (opts.fs = {
@@ -52212,7 +52503,6 @@ var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
52212
52503
  version: "1.2"
52213
52504
  };
52214
52505
  this.tags = Object.assign({}, Directives.defaultTags);
52215
- break;
52216
52506
  }
52217
52507
  return res;
52218
52508
  }
@@ -53064,7 +53354,7 @@ var require_stringifyString = /* @__PURE__ */ __commonJSMin(((exports) => {
53064
53354
  }
53065
53355
  let blockEndNewlines;
53066
53356
  try {
53067
- blockEndNewlines = /* @__PURE__ */ new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
53357
+ blockEndNewlines = new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
53068
53358
  } catch {
53069
53359
  blockEndNewlines = /\n+(?!\n|$)/g;
53070
53360
  }
@@ -54390,9 +54680,7 @@ var require_int = /* @__PURE__ */ __commonJSMin(((exports) => {
54390
54680
  case 8:
54391
54681
  str = `0o${str}`;
54392
54682
  break;
54393
- case 16:
54394
- str = `0x${str}`;
54395
- break;
54683
+ case 16: str = `0x${str}`;
54396
54684
  }
54397
54685
  const n = BigInt(str);
54398
54686
  return sign === "-" ? BigInt(-1) * n : n;
@@ -55921,9 +56209,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
55921
56209
  badChar = `block scalar indicator ${source[0]}`;
55922
56210
  break;
55923
56211
  case "@":
55924
- case "`":
55925
- badChar = `reserved character ${source[0]}`;
55926
- break;
56212
+ case "`": badChar = `reserved character ${source[0]}`;
55927
56213
  }
55928
56214
  if (badChar) onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
55929
56215
  return foldLines(source);
@@ -55942,8 +56228,8 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
55942
56228
  */
55943
56229
  let first, line;
55944
56230
  try {
55945
- first = /* @__PURE__ */ new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
55946
- line = /* @__PURE__ */ new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
56231
+ first = new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
56232
+ line = new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
55947
56233
  } catch {
55948
56234
  first = /(.*?)[ \t]*\r?\n/sy;
55949
56235
  line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
@@ -60256,7 +60542,7 @@ function validatePackages(packages) {
60256
60542
  }
60257
60543
  }
60258
60544
  //#endregion
60259
- //#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@3.0.0-next.7/node_modules/@changesets/get-dependents-graph/dist/index.mjs
60545
+ //#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@3.0.0-next.8/node_modules/@changesets/get-dependents-graph/dist/index.mjs
60260
60546
  var src_default = new Proxy({}, { get(target, color) {
60261
60547
  target[color] ??= (text) => (0, node_util.styleText)(color, text);
60262
60548
  return target[color];
@@ -60370,20 +60656,20 @@ function getDependentsGraph(packages, opts) {
60370
60656
  graph.set(key, dependentsLookup[key]);
60371
60657
  });
60372
60658
  const simplifiedDependentsGraph = /* @__PURE__ */ new Map();
60373
- graph.forEach((pkgInfo, pkgName) => {
60374
- simplifiedDependentsGraph.set(pkgName, pkgInfo.dependents);
60659
+ graph.forEach((info, pkgName) => {
60660
+ simplifiedDependentsGraph.set(pkgName, info.dependents);
60375
60661
  });
60376
60662
  return simplifiedDependentsGraph;
60377
60663
  }
60378
60664
  //#endregion
60379
- //#region ../../node_modules/.pnpm/@changesets+should-skip-package@1.0.0-next.7/node_modules/@changesets/should-skip-package/dist/index.mjs
60665
+ //#region ../../node_modules/.pnpm/@changesets+should-skip-package@1.0.0-next.8/node_modules/@changesets/should-skip-package/dist/index.mjs
60380
60666
  function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) {
60381
60667
  if (ignore.includes(packageJson.name)) return true;
60382
60668
  if (packageJson.private && !allowPrivatePackages) return true;
60383
60669
  return !packageJson.version;
60384
60670
  }
60385
60671
  //#endregion
60386
- //#region ../../node_modules/.pnpm/@changesets+config@4.0.0-next.7/node_modules/@changesets/config/dist/index.mjs
60672
+ //#region ../../node_modules/.pnpm/@changesets+config@4.0.0-next.8/node_modules/@changesets/config/dist/index.mjs
60387
60673
  const DEFAULT_CONFIG = {
60388
60674
  lang: void 0,
60389
60675
  message: void 0,
@@ -61295,7 +61581,7 @@ async function readConfig(cwd, packages) {
61295
61581
  packages ??= await getPackages(cwd);
61296
61582
  return validateConfig(JSON.parse(await node_fs_promises.readFile(node_path.join(packages.rootDir, ".changeset", "config.json"), "utf8")), packages);
61297
61583
  }
61298
- var version = "4.0.0-next.7";
61584
+ var version = "4.0.0-next.8";
61299
61585
  const defaultConfig = normalizeWrittenConfig({
61300
61586
  packageNames: [],
61301
61587
  writtenConfig: parse(WrittenConfigSchema, {
@@ -61847,7 +62133,7 @@ const COMMANDS = {
61847
62133
  "deno": deno,
61848
62134
  "nub": nub
61849
62135
  };
61850
- function resolveCommand(agent, command, args) {
62136
+ function resolveCommand$1(agent, command, args) {
61851
62137
  const value = COMMANDS[agent][command];
61852
62138
  return constructCommand(value, args);
61853
62139
  }
@@ -61957,18 +62243,16 @@ async function detect$1(options = {}) {
61957
62243
  if (result) return result;
61958
62244
  break;
61959
62245
  }
61960
- case "install-metadata":
61961
- for (const metadata of Object.keys(INSTALL_METADATA)) {
61962
- const fileOrDir = metadata.endsWith("/") ? "dir" : "file";
61963
- if (await pathExists(node_path.join(directory, metadata), fileOrDir)) {
61964
- const name = INSTALL_METADATA[metadata];
61965
- return {
61966
- name,
61967
- agent: name === "yarn" ? isMetadataYarnClassic(metadata) ? "yarn" : "yarn@berry" : name
61968
- };
61969
- }
62246
+ case "install-metadata": for (const metadata of Object.keys(INSTALL_METADATA)) {
62247
+ const fileOrDir = metadata.endsWith("/") ? "dir" : "file";
62248
+ if (await pathExists(node_path.join(directory, metadata), fileOrDir)) {
62249
+ const name = INSTALL_METADATA[metadata];
62250
+ return {
62251
+ name,
62252
+ agent: name === "yarn" ? isMetadataYarnClassic(metadata) ? "yarn" : "yarn@berry" : name
62253
+ };
61970
62254
  }
61971
- break;
62255
+ }
61972
62256
  }
61973
62257
  if (stopDir?.(directory)) break;
61974
62258
  }
@@ -62029,201 +62313,212 @@ function isMetadataYarnClassic(metadataPath) {
62029
62313
  return metadataPath.endsWith(".yarn_integrity");
62030
62314
  }
62031
62315
  //#endregion
62032
- //#region ../../node_modules/.pnpm/tinyexec@1.2.4/node_modules/tinyexec/dist/main.mjs
62033
- const h = /^path$/i;
62034
- const g = {
62316
+ //#region ../../node_modules/.pnpm/tinyexec@1.3.0/node_modules/tinyexec/dist/main.mjs
62317
+ const isPathLikePattern = /^path$/i;
62318
+ const defaultEnvPathInfo = {
62035
62319
  key: "PATH",
62036
62320
  value: ""
62037
62321
  };
62038
- function _(e) {
62039
- for (const t in e) {
62040
- if (!Object.prototype.hasOwnProperty.call(e, t) || !h.test(t)) continue;
62041
- const n = e[t];
62042
- if (!n) return g;
62322
+ function getPathFromEnv(env) {
62323
+ for (const key in env) {
62324
+ if (!Object.prototype.hasOwnProperty.call(env, key) || !isPathLikePattern.test(key)) continue;
62325
+ const value = env[key];
62326
+ if (!value) return defaultEnvPathInfo;
62043
62327
  return {
62044
- key: t,
62045
- value: n
62328
+ key,
62329
+ value
62046
62330
  };
62047
62331
  }
62048
- return g;
62332
+ return defaultEnvPathInfo;
62049
62333
  }
62050
- function v(e, t) {
62051
- const n = t.value.split(node_path.delimiter);
62052
- const r = [];
62053
- let o = e;
62054
- let c;
62334
+ function addNodeBinToPath(cwd, path) {
62335
+ const parts = path.value.split(node_path.delimiter);
62336
+ const nodeBinPaths = [];
62337
+ let currentPath = cwd;
62338
+ let lastPath;
62055
62339
  do {
62056
- r.push((0, node_path.resolve)(o, "node_modules", ".bin"));
62057
- c = o;
62058
- o = (0, node_path.dirname)(o);
62059
- } while (o !== c);
62060
- r.push((0, node_path.dirname)(process.execPath));
62061
- const l = r.concat(n).join(node_path.delimiter);
62340
+ nodeBinPaths.push((0, node_path.resolve)(currentPath, "node_modules", ".bin"));
62341
+ lastPath = currentPath;
62342
+ currentPath = (0, node_path.dirname)(currentPath);
62343
+ } while (currentPath !== lastPath);
62344
+ nodeBinPaths.push((0, node_path.dirname)(process.execPath));
62345
+ const newPath = nodeBinPaths.concat(parts).join(node_path.delimiter);
62062
62346
  return {
62063
- key: t.key,
62064
- value: l
62347
+ key: path.key,
62348
+ value: newPath
62065
62349
  };
62066
62350
  }
62067
- function y(e, t, n = true) {
62068
- const r = {
62351
+ function computeEnv(cwd, env, nodePath = true) {
62352
+ const envWithDefault = {
62069
62353
  ...process.env,
62070
- ...t
62354
+ ...env
62071
62355
  };
62072
- if (!n) return r;
62073
- const i = v(e, _(r));
62074
- r[i.key] = i.value;
62075
- return r;
62076
- }
62077
- const b = (e) => {
62078
- let t = e.length;
62079
- const n = new node_stream.PassThrough();
62080
- const r = () => {
62081
- if (--t === 0) n.end();
62356
+ if (!nodePath) return envWithDefault;
62357
+ const envPathInfo = addNodeBinToPath(cwd, getPathFromEnv(envWithDefault));
62358
+ envWithDefault[envPathInfo.key] = envPathInfo.value;
62359
+ return envWithDefault;
62360
+ }
62361
+ const combineStreams = (streams) => {
62362
+ let streamCount = streams.length;
62363
+ const combined = new node_stream.PassThrough();
62364
+ const maybeEmitEnd = () => {
62365
+ if (--streamCount === 0) combined.end();
62082
62366
  };
62083
- for (const t of e) (0, node_stream_promises.pipeline)(t, n, { end: false }).then(r).catch(r);
62084
- return n;
62367
+ for (const stream of streams) (0, node_stream_promises.pipeline)(stream, combined, { end: false }).then(maybeEmitEnd).catch(maybeEmitEnd);
62368
+ return combined;
62085
62369
  };
62086
- const x = /([()\][%!^"`<>&|;, *?])/g;
62087
- const S = /^#!\s*(.+)/;
62088
- const C = /\.(?:com|exe)$/i;
62089
- const w = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i;
62090
- const T = process.platform === "win32";
62091
- const E = [
62370
+ const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
62371
+ const shebangRegExp = /^#!\s*(.+)/;
62372
+ const isWindowsExecutableRegExp = /\.(?:com|exe)$/i;
62373
+ const isNodeModulesCmdRegExp = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i;
62374
+ const isWindows = process.platform === "win32";
62375
+ const defaultPathExt = [
62092
62376
  ".EXE",
62093
62377
  ".CMD",
62094
62378
  ".BAT",
62095
62379
  ".COM"
62096
62380
  ];
62381
+ const noPathExt = [""];
62097
62382
  /**
62098
62383
  * Normalizes the command and arguments to work cross-platform.
62099
62384
  * On Windows, this basically handles things like shebangs, calling
62100
62385
  * `node_modules/.bin` commands, and escaping meta characters.
62101
62386
  * On other platforms, it just returns the command and arguments as-is.
62102
62387
  */
62103
- function D(e, t = [], n = {}) {
62104
- if (n.shell === true || !T) return {
62105
- command: e,
62106
- args: t,
62107
- options: n
62388
+ function normalizeSpawnCommand(command, args = [], options = {}) {
62389
+ if (options.shell === true || !isWindows) return {
62390
+ command,
62391
+ args,
62392
+ options
62108
62393
  };
62109
- let i = O(e, n);
62110
- let a = null;
62111
- if (i !== null) {
62112
- const e = 150;
62113
- const t = Buffer.alloc(e);
62114
- let n = null;
62394
+ let file = resolveCommand(command, options);
62395
+ let shebang = null;
62396
+ if (file !== null) {
62397
+ const size = 150;
62398
+ const buffer = Buffer.alloc(size);
62399
+ let fd = null;
62115
62400
  try {
62116
- n = (0, node_fs.openSync)(i, "r");
62117
- (0, node_fs.readSync)(n, t, 0, e, 0);
62401
+ fd = (0, node_fs.openSync)(file, "r");
62402
+ (0, node_fs.readSync)(fd, buffer, 0, size, 0);
62118
62403
  } catch {} finally {
62119
- if (n !== null) (0, node_fs.closeSync)(n);
62120
- }
62121
- const o = t.toString().match(S);
62122
- if (o !== null) {
62123
- const e = o[1].trim();
62124
- const t = e.indexOf(" ");
62125
- const n = t !== -1 ? e.slice(0, t) : e;
62126
- const i = t !== -1 ? e.slice(t + 1) : "";
62127
- const s = (0, node_path.basename)(n);
62128
- a = s === "env" ? i || null : s;
62129
- }
62130
- }
62131
- if (a !== null && i !== null) {
62132
- t = [i, ...t];
62133
- e = a;
62134
- i = O(e, n);
62135
- }
62136
- if (i === null || !C.test(i)) {
62137
- const r = i !== null && w.test(i);
62138
- e = (0, node_path.normalize)(e);
62139
- e = e.replace(x, "^$1");
62140
- t = t.map((e) => {
62141
- e = e.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
62142
- e = e.replace(/(?=(\\+?)?)\1$/, "$1$1");
62143
- e = `"${e}"`;
62144
- e = e.replace(x, "^$1");
62145
- if (r) e = e.replace(x, "^$1");
62146
- return e;
62404
+ if (fd !== null) (0, node_fs.closeSync)(fd);
62405
+ }
62406
+ const match = buffer.toString().match(shebangRegExp);
62407
+ if (match !== null) {
62408
+ const line = match[1].trim();
62409
+ const separatorIndex = line.indexOf(" ");
62410
+ const path = separatorIndex !== -1 ? line.slice(0, separatorIndex) : line;
62411
+ const argument = separatorIndex !== -1 ? line.slice(separatorIndex + 1) : "";
62412
+ const binary = (0, node_path.basename)(path);
62413
+ shebang = binary === "env" ? argument || null : binary;
62414
+ }
62415
+ }
62416
+ if (shebang !== null && file !== null) {
62417
+ args = [file, ...args];
62418
+ command = shebang;
62419
+ file = resolveCommand(command, options);
62420
+ }
62421
+ if (file === null || !isWindowsExecutableRegExp.test(file)) {
62422
+ const needsDoubleEscapeMetaChars = file !== null && isNodeModulesCmdRegExp.test(file);
62423
+ command = (0, node_path.normalize)(command);
62424
+ command = command.replace(metaCharsRegExp, "^$1");
62425
+ args = args.map((arg) => {
62426
+ arg = arg.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
62427
+ arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
62428
+ arg = `"${arg}"`;
62429
+ arg = arg.replace(metaCharsRegExp, "^$1");
62430
+ if (needsDoubleEscapeMetaChars) arg = arg.replace(metaCharsRegExp, "^$1");
62431
+ return arg;
62147
62432
  });
62148
- t = [
62433
+ args = [
62149
62434
  "/d",
62150
62435
  "/s",
62151
62436
  "/c",
62152
- `"${[e, ...t].join(" ")}"`
62437
+ `"${[command, ...args].join(" ")}"`
62153
62438
  ];
62154
- e = n.env?.comspec ?? "cmd.exe";
62155
- n = {
62156
- ...n,
62439
+ command = options.env?.comspec ?? "cmd.exe";
62440
+ options = {
62441
+ ...options,
62157
62442
  windowsVerbatimArguments: true
62158
62443
  };
62159
62444
  }
62160
62445
  return {
62161
- command: e,
62162
- args: t,
62163
- options: n
62446
+ command,
62447
+ args,
62448
+ options
62164
62449
  };
62165
62450
  }
62166
62451
  /**
62167
62452
  * Resolves the command to an absolute path if possible.
62168
62453
  * Handles things like traversing PATH and adding extensions from PATHEXT
62169
62454
  */
62170
- function O(e, t) {
62171
- const r = (t.cwd ?? (0, node_process.cwd)()).toString();
62172
- const a = t.env ?? process.env;
62173
- const o = _(a).value;
62174
- const c = e.includes("/") || e.includes("\\") ? [""] : [r, ...o.split(node_path.delimiter)];
62175
- const l = a.PATHEXT ? a.PATHEXT.split(node_path.delimiter) : E;
62176
- if (e.includes(".") && l[0] !== "") l.unshift("");
62177
- for (const t of c) {
62178
- const n = (0, node_path.resolve)(r, t.startsWith("\"") && t.endsWith("\"") && t.length > 1 ? t.slice(1, -1) : t, e);
62179
- for (const e of l) {
62180
- const t = n + e;
62455
+ function resolveCommand(command, options) {
62456
+ const cwd$3 = (options.cwd ?? (0, node_process.cwd)()).toString();
62457
+ const env = options.env ?? process.env;
62458
+ const PATH = getPathFromEnv(env).value;
62459
+ const pathEnv = command.includes("/") || command.includes("\\") ? [""] : [cwd$3, ...PATH.split(node_path.delimiter)];
62460
+ let pathExt = env.PATHEXT ? env.PATHEXT.split(node_path.delimiter) : defaultPathExt;
62461
+ if (command.includes(".") && pathExt[0] !== "") pathExt = ["", ...pathExt];
62462
+ for (const extensions of [pathExt, noPathExt]) for (const path of pathEnv) {
62463
+ const dest = (0, node_path.resolve)(cwd$3, path.startsWith("\"") && path.endsWith("\"") && path.length > 1 ? path.slice(1, -1) : path, command);
62464
+ for (const ext of extensions) {
62465
+ const destWithExt = dest + ext;
62181
62466
  try {
62182
- if ((0, node_fs.statSync)(t).isFile()) return t;
62467
+ if ((0, node_fs.statSync)(destWithExt).isFile()) return destWithExt;
62183
62468
  } catch {}
62184
62469
  }
62185
62470
  }
62186
62471
  return null;
62187
62472
  }
62188
- var k = class extends Error {
62473
+ var NonZeroExitError = class extends Error {
62189
62474
  result;
62190
62475
  output;
62191
- get exitCode() {
62192
- if (this.result.exitCode !== null) return this.result.exitCode;
62193
- }
62194
- constructor(e, t) {
62195
- super(`Process exited with non-zero status (${e.exitCode})`);
62196
- this.result = e;
62197
- this.output = t;
62476
+ exitCode;
62477
+ get signalCode() {
62478
+ return this.result.signalCode;
62479
+ }
62480
+ constructor(result, output, command, args) {
62481
+ let target = "The process";
62482
+ if (command) target = `The command \`${args?.length ? `${command} ${args.map((a) => /[ "'`()]/.test(a) ? JSON.stringify(a) : a).join(" ")}` : command}\``;
62483
+ const exitCode = result.exitCode ?? 1;
62484
+ super(result.signalCode !== null ? `${target} was killed by the signal ${result.signalCode}` : `${target} exited with a non-zero status (${exitCode})`);
62485
+ this.result = result;
62486
+ this.output = output;
62487
+ this.exitCode = exitCode;
62488
+ Object.defineProperty(this, "result", {
62489
+ enumerable: false,
62490
+ writable: false,
62491
+ configurable: false
62492
+ });
62198
62493
  }
62199
62494
  };
62200
- const j = {
62495
+ const defaultOptions = {
62201
62496
  timeout: void 0,
62202
62497
  persist: false
62203
62498
  };
62204
- const N = { windowsHide: true };
62205
- function P(e) {
62206
- const t = new AbortController();
62207
- for (const n of e) {
62208
- if (n.aborted) {
62209
- t.abort();
62210
- return n;
62211
- }
62212
- const e = () => {
62213
- t.abort(n.reason);
62499
+ const defaultNodeOptions = { windowsHide: true };
62500
+ function combineSignals(signals) {
62501
+ const controller = new AbortController();
62502
+ for (const signal of signals) {
62503
+ if (signal.aborted) {
62504
+ controller.abort();
62505
+ return signal;
62506
+ }
62507
+ const onAbort = () => {
62508
+ controller.abort(signal.reason);
62214
62509
  };
62215
- n.addEventListener("abort", e, { signal: t.signal });
62510
+ signal.addEventListener("abort", onAbort, { signal: controller.signal });
62216
62511
  }
62217
- return t.signal;
62512
+ return controller.signal;
62218
62513
  }
62219
- async function F(e) {
62220
- let t = "";
62514
+ async function readStream(stream) {
62515
+ let output = "";
62221
62516
  try {
62222
- for await (const n of e) t += n.toString();
62517
+ for await (const chunk of stream) output += chunk.toString();
62223
62518
  } catch {}
62224
- return t;
62519
+ return output;
62225
62520
  }
62226
- var I = class {
62521
+ var ExecProcess = class {
62227
62522
  _process;
62228
62523
  _aborted = false;
62229
62524
  _options;
@@ -62241,19 +62536,22 @@ var I = class {
62241
62536
  get exitCode() {
62242
62537
  if (this._process && this._process.exitCode !== null) return this._process.exitCode;
62243
62538
  }
62244
- constructor(e, t, n) {
62539
+ get signalCode() {
62540
+ return this._process?.signalCode ?? null;
62541
+ }
62542
+ constructor(command, args, options) {
62245
62543
  this._options = {
62246
- ...j,
62247
- ...n
62544
+ ...defaultOptions,
62545
+ ...options
62248
62546
  };
62249
- this._command = e;
62250
- this._args = t ?? [];
62251
- this._processClosed = new Promise((e) => {
62252
- this._resolveClose = e;
62547
+ this._command = command;
62548
+ this._args = args ?? [];
62549
+ this._processClosed = new Promise((resolve) => {
62550
+ this._resolveClose = resolve;
62253
62551
  });
62254
62552
  }
62255
- kill(e) {
62256
- return this._process?.kill(e) === true;
62553
+ kill(signal) {
62554
+ return this._process?.kill(signal) === true;
62257
62555
  }
62258
62556
  get aborted() {
62259
62557
  return this._aborted;
@@ -62261,99 +62559,99 @@ var I = class {
62261
62559
  get killed() {
62262
62560
  return this._process?.killed === true;
62263
62561
  }
62264
- pipe(e, t, n) {
62265
- return z(e, t, {
62266
- ...n,
62562
+ pipe(command, args, options) {
62563
+ return exec(command, args, {
62564
+ ...options,
62267
62565
  stdin: this
62268
62566
  });
62269
62567
  }
62270
62568
  async *[Symbol.asyncIterator]() {
62271
- const e = this._process;
62272
- if (!e) return;
62273
- const t = [];
62274
- if (this._streamErr) t.push(this._streamErr);
62275
- if (this._streamOut) t.push(this._streamOut);
62276
- const n = b(t);
62277
- const r = node_readline.createInterface({ input: n });
62278
- for await (const e of r) yield e.toString();
62569
+ const proc = this._process;
62570
+ if (!proc) return;
62571
+ const streams = [];
62572
+ if (this._streamErr) streams.push(this._streamErr);
62573
+ if (this._streamOut) streams.push(this._streamOut);
62574
+ const streamCombined = combineStreams(streams);
62575
+ const rl = node_readline.createInterface({ input: streamCombined });
62576
+ for await (const chunk of rl) yield chunk.toString();
62279
62577
  await this._processClosed;
62280
- e.removeAllListeners();
62578
+ proc.removeAllListeners();
62281
62579
  if (this._thrownError) throw this._thrownError;
62282
- if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new k(this);
62580
+ if (this._options?.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, void 0, this._command, this._args);
62283
62581
  }
62284
62582
  async _waitForOutput() {
62285
- const e = this._process;
62286
- if (!e) throw new Error("No process was started");
62287
- const [t, n] = await Promise.all([this._streamOut ? F(this._streamOut) : "", this._streamErr ? F(this._streamErr) : ""]);
62583
+ const proc = this._process;
62584
+ if (!proc) throw new Error("No process was started");
62585
+ const [stdout, stderr] = await Promise.all([this._streamOut ? readStream(this._streamOut) : "", this._streamErr ? readStream(this._streamErr) : ""]);
62288
62586
  await this._processClosed;
62289
- const { stdin: r } = this._options;
62290
- if (r && typeof r !== "string") await r;
62291
- e.removeAllListeners();
62587
+ const { stdin } = this._options;
62588
+ if (stdin && typeof stdin !== "string") await stdin;
62589
+ proc.removeAllListeners();
62292
62590
  if (this._thrownError) throw this._thrownError;
62293
- const i = {
62294
- stderr: n,
62295
- stdout: t,
62591
+ const result = {
62592
+ stderr,
62593
+ stdout,
62296
62594
  exitCode: this.exitCode
62297
62595
  };
62298
- if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new k(this, i);
62299
- return i;
62596
+ if (this._options.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, result, this._command, this._args);
62597
+ return result;
62300
62598
  }
62301
- then(e, t) {
62302
- return this._waitForOutput().then(e, t);
62599
+ then(onfulfilled, onrejected) {
62600
+ return this._waitForOutput().then(onfulfilled, onrejected);
62303
62601
  }
62304
62602
  _streamOut;
62305
62603
  _streamErr;
62306
62604
  spawn() {
62307
- const t = (0, node_process.cwd)();
62308
- const r = this._options;
62309
- const i = {
62310
- ...N,
62311
- ...r.nodeOptions
62605
+ const cwd$1 = (0, node_process.cwd)();
62606
+ const options = this._options;
62607
+ const nodeOptions = {
62608
+ ...defaultNodeOptions,
62609
+ ...options.nodeOptions
62312
62610
  };
62313
- const a = [];
62611
+ const signals = [];
62314
62612
  this._resetState();
62315
- if (r.timeout !== void 0) a.push(AbortSignal.timeout(r.timeout));
62316
- if (r.signal !== void 0) a.push(r.signal);
62317
- if (r.persist === true) i.detached = true;
62318
- if (a.length > 0) i.signal = P(a);
62319
- i.env = y(t, i.env, r.nodePath);
62320
- const o = D(this._command, this._args, i);
62321
- const s = (0, node_child_process.spawn)(o.command, o.args, o.options);
62322
- if (s.stderr) this._streamErr = s.stderr;
62323
- if (s.stdout) this._streamOut = s.stdout;
62324
- this._process = s;
62325
- s.once("error", this._onError);
62326
- s.once("close", this._onClose);
62327
- if (s.stdin) {
62328
- const { stdin: e } = r;
62329
- if (typeof e === "string") s.stdin.end(e);
62330
- else e?.process?.stdout?.pipe(s.stdin);
62613
+ if (options.timeout !== void 0) signals.push(AbortSignal.timeout(options.timeout));
62614
+ if (options.signal !== void 0) signals.push(options.signal);
62615
+ if (options.persist === true) nodeOptions.detached = true;
62616
+ if (signals.length > 0) nodeOptions.signal = combineSignals(signals);
62617
+ nodeOptions.env = computeEnv(cwd$1, nodeOptions.env, options.nodePath);
62618
+ const crossResult = normalizeSpawnCommand(this._command, this._args, nodeOptions);
62619
+ const handle = (0, node_child_process.spawn)(crossResult.command, crossResult.args, crossResult.options);
62620
+ if (handle.stderr) this._streamErr = handle.stderr;
62621
+ if (handle.stdout) this._streamOut = handle.stdout;
62622
+ this._process = handle;
62623
+ handle.once("error", this._onError);
62624
+ handle.once("close", this._onClose);
62625
+ if (handle.stdin) {
62626
+ const { stdin } = options;
62627
+ if (typeof stdin === "string") handle.stdin.end(stdin);
62628
+ else stdin?.process?.stdout?.pipe(handle.stdin);
62331
62629
  }
62332
62630
  }
62333
62631
  _resetState() {
62334
62632
  this._aborted = false;
62335
- this._processClosed = new Promise((e) => {
62336
- this._resolveClose = e;
62633
+ this._processClosed = new Promise((resolve) => {
62634
+ this._resolveClose = resolve;
62337
62635
  });
62338
62636
  this._thrownError = void 0;
62339
62637
  }
62340
- _onError = (e) => {
62341
- if (e.name === "AbortError" && (!(e.cause instanceof Error) || e.cause.name !== "TimeoutError")) {
62638
+ _onError = (err) => {
62639
+ if (err.name === "AbortError" && (!(err.cause instanceof Error) || err.cause.name !== "TimeoutError")) {
62342
62640
  this._aborted = true;
62343
62641
  return;
62344
62642
  }
62345
- this._thrownError = e;
62643
+ this._thrownError = err;
62346
62644
  };
62347
62645
  _onClose = () => {
62348
62646
  if (this._resolveClose) this._resolveClose();
62349
62647
  };
62350
62648
  };
62351
- const R = (e, t, n) => {
62352
- const r = new I(e, t, n);
62353
- r.spawn();
62354
- return r;
62649
+ const x = (command, args, userOptions) => {
62650
+ const proc = new ExecProcess(command, args, userOptions);
62651
+ proc.spawn();
62652
+ return proc;
62355
62653
  };
62356
- const z = R;
62654
+ const exec = x;
62357
62655
  //#endregion
62358
62656
  //#region ../../node_modules/.pnpm/@changesets+format@0.1.1/node_modules/@changesets/format/dist/index.js
62359
62657
  /**
@@ -62372,14 +62670,14 @@ function traverseUpwards(startDir, stopDir, cb) {
62372
62670
  }
62373
62671
  }
62374
62672
  async function packageManagerExecute(packageManager, args, cwd) {
62375
- const cmd = resolveCommand(packageManager, "execute-local", args) ?? {
62673
+ const cmd = resolveCommand$1(packageManager, "execute-local", args) ?? {
62376
62674
  command: "npx",
62377
62675
  args
62378
62676
  };
62379
62677
  return await spawnProcess(cmd.command, cmd.args, cwd);
62380
62678
  }
62381
62679
  async function spawnProcess(command, args, cwd) {
62382
- await z(command, args, {
62680
+ await exec(command, args, {
62383
62681
  nodeOptions: { cwd },
62384
62682
  throwOnError: true
62385
62683
  });
@@ -62567,9 +62865,9 @@ var InternalError = class extends Error {
62567
62865
  }
62568
62866
  };
62569
62867
  //#endregion
62570
- //#region ../../node_modules/.pnpm/@changesets+git@4.0.0-next.7/node_modules/@changesets/git/dist/index.mjs
62868
+ //#region ../../node_modules/.pnpm/@changesets+git@4.0.0-next.8/node_modules/@changesets/git/dist/index.mjs
62571
62869
  async function getDivergedCommit(cwd, ref) {
62572
- const cmd = await z("git", [
62870
+ const cmd = await exec("git", [
62573
62871
  "merge-base",
62574
62872
  ref,
62575
62873
  "HEAD"
@@ -62588,7 +62886,7 @@ async function getCommitsThatAddFiles(gitPaths, { cwd, short = false }) {
62588
62886
  let remaining = gitPaths;
62589
62887
  do {
62590
62888
  const commitInfos = await Promise.all(remaining.map(async (gitPath) => {
62591
- const [commitSha, parentSha] = (await z("git", [
62889
+ const [commitSha, parentSha] = (await exec("git", [
62592
62890
  "log",
62593
62891
  "--diff-filter=A",
62594
62892
  "--max-count=1",
@@ -62619,9 +62917,9 @@ async function getCommitsThatAddFiles(gitPaths, { cwd, short = false }) {
62619
62917
  return gitPaths.map((p) => map.get(p));
62620
62918
  }
62621
62919
  async function isRepoShallow({ cwd }) {
62622
- const isShallowRepoOutput = (await z("git", ["rev-parse", "--is-shallow-repository"], { nodeOptions: { cwd } })).stdout.toString().trim();
62920
+ const isShallowRepoOutput = (await exec("git", ["rev-parse", "--is-shallow-repository"], { nodeOptions: { cwd } })).stdout.toString().trim();
62623
62921
  if (isShallowRepoOutput === "--is-shallow-repository") {
62624
- const gitDir = (await z("git", ["rev-parse", "--git-dir"], { nodeOptions: { cwd } })).stdout.toString().trim();
62922
+ const gitDir = (await exec("git", ["rev-parse", "--git-dir"], { nodeOptions: { cwd } })).stdout.toString().trim();
62625
62923
  const fullGitDir = node_path.resolve(cwd, gitDir);
62626
62924
  try {
62627
62925
  await node_fs_promises.access(node_path.join(fullGitDir, "shallow"));
@@ -62632,12 +62930,12 @@ async function isRepoShallow({ cwd }) {
62632
62930
  } else return isShallowRepoOutput === "true";
62633
62931
  }
62634
62932
  async function deepenCloneBy({ by, cwd }) {
62635
- const cmd = await z("git", ["fetch", `--deepen=${by}`], { nodeOptions: { cwd } });
62933
+ const cmd = await exec("git", ["fetch", `--deepen=${by}`], { nodeOptions: { cwd } });
62636
62934
  if (cmd.exitCode !== 0) throw new Error(cmd.stderr.toString());
62637
62935
  }
62638
62936
  async function getChangedChangesetFilesSinceRef({ cwd, ref }) {
62639
62937
  try {
62640
- const cmd = await z("git", [
62938
+ const cmd = await exec("git", [
62641
62939
  "diff",
62642
62940
  "--name-only",
62643
62941
  "--diff-filter=d",
@@ -64452,9 +64750,7 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
64452
64750
  case 2:
64453
64751
  handleError(12);
64454
64752
  break;
64455
- case 6:
64456
- handleError(16);
64457
- break;
64753
+ case 6: handleError(16);
64458
64754
  }
64459
64755
  switch (token) {
64460
64756
  case 12:
@@ -64714,7 +65010,7 @@ function applyEdits(text, edits) {
64714
65010
  return text;
64715
65011
  }
64716
65012
  //#endregion
64717
- //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.0.0-next.8/node_modules/@changesets/apply-release-plan/dist/index.mjs
65013
+ //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.0.0-next.9/node_modules/@changesets/apply-release-plan/dist/index.mjs
64718
65014
  /**
64719
65015
  * A simple JSON editing utility that preserves formatting. They specified operation keys
64720
65016
  * must exist in the JSON for this implementation.
@@ -64766,6 +65062,7 @@ function getBumpLevel(type) {
64766
65062
  return level;
64767
65063
  }
64768
65064
  function shouldUpdateDependencyBasedOnConfig(cwd, release, { depVersionRange, depType }, { minReleaseType, onlyUpdatePeerDependentsWhenOutOfRange }) {
65065
+ if (release.newVersion == null) return false;
64769
65066
  if (depVersionRange.startsWith("workspace:")) {
64770
65067
  depVersionRange = depVersionRange.replace(/^workspace:/, "");
64771
65068
  switch (depVersionRange) {
@@ -64777,7 +65074,7 @@ function shouldUpdateDependencyBasedOnConfig(cwd, release, { depVersionRange, de
64777
65074
  default: if (!(0, semver_ranges_valid_js.default)(depVersionRange)) return node_path.posix.normalize(depVersionRange) === node_path.relative(cwd, release.dir).replace(/\\/g, "/");
64778
65075
  }
64779
65076
  }
64780
- if (!(0, semver_functions_satisfies_js.default)(release.version, depVersionRange)) return true;
65077
+ if (!(0, semver_functions_satisfies_js.default)(release.newVersion, depVersionRange)) return true;
64781
65078
  const minLevel = getBumpLevel(minReleaseType);
64782
65079
  let shouldUpdate = getBumpLevel(release.type) >= minLevel;
64783
65080
  if (depType === "peerDependencies") shouldUpdate = !onlyUpdatePeerDependentsWhenOutOfRange;
@@ -64802,12 +65099,7 @@ async function getChangelogEntry(cwd, release, releases, changesets, changelogFu
64802
65099
  const peerDependencyVersionRange = release.packageJson.peerDependencies?.[rel.name];
64803
65100
  const versionRange = dependencyVersionRange || peerDependencyVersionRange;
64804
65101
  const usesWorkspaceRange = versionRange?.startsWith("workspace:");
64805
- return versionRange && (usesWorkspaceRange || (0, semver_ranges_valid_js.default)(versionRange) != null) && shouldUpdateDependencyBasedOnConfig(cwd, {
64806
- type: rel.type,
64807
- version: rel.newVersion,
64808
- oldVersion: rel.oldVersion,
64809
- dir: rel.dir
64810
- }, {
65102
+ return versionRange && (usesWorkspaceRange || (0, semver_ranges_valid_js.default)(versionRange) != null) && shouldUpdateDependencyBasedOnConfig(cwd, rel, {
64811
65103
  depVersionRange: versionRange,
64812
65104
  depType: dependencyVersionRange ? "dependencies" : "peerDependencies"
64813
65105
  }, {
@@ -64859,14 +65151,11 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
64859
65151
  const pkgJsonEdits = [];
64860
65152
  for (const depType of DEPENDENCY_TYPES) {
64861
65153
  const deps = packageJson[depType];
64862
- if (deps) for (const { name, version, oldVersion, type, dir } of versionsToUpdate) {
65154
+ if (deps) for (const release of versionsToUpdate) {
65155
+ if (release.newVersion == null) continue;
65156
+ const { name, newVersion } = release;
64863
65157
  let depCurrentVersion = deps[name];
64864
- if (!depCurrentVersion || depCurrentVersion.startsWith("file:") || depCurrentVersion.startsWith("link:") || !shouldUpdateDependencyBasedOnConfig(cwd, {
64865
- version,
64866
- oldVersion,
64867
- type,
64868
- dir
64869
- }, {
65158
+ if (!depCurrentVersion || depCurrentVersion.startsWith("file:") || depCurrentVersion.startsWith("link:") || !shouldUpdateDependencyBasedOnConfig(cwd, release, {
64870
65159
  depVersionRange: depCurrentVersion,
64871
65160
  depType
64872
65161
  }, {
@@ -64880,8 +65169,8 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
64880
65169
  if (workspaceDepVersion === "*" || workspaceDepVersion === "^" || workspaceDepVersion === "~" || (0, semver_ranges_valid_js.default)(workspaceDepVersion) == null) continue;
64881
65170
  depCurrentVersion = workspaceDepVersion;
64882
65171
  }
64883
- if (new semver_classes_range_js.default(depCurrentVersion).range !== "" || (0, semver_functions_prerelease_js.default)(version) != null) {
64884
- let newNewRange = snapshot ? version : `${getVersionRangeType(depCurrentVersion)}${version}`;
65172
+ if (new semver_classes_range_js.default(depCurrentVersion).range !== "" || (0, semver_functions_prerelease_js.default)(newVersion) != null) {
65173
+ let newNewRange = snapshot ? newVersion : `${getVersionRangeType(depCurrentVersion)}${newVersion}`;
64885
65174
  if (usesWorkspaceRange) newNewRange = `workspace:${newNewRange}`;
64886
65175
  pkgJsonEdits.push({
64887
65176
  keys: [depType, name],
@@ -64948,12 +65237,9 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
64948
65237
  else await node_fs_promises.writeFile(node_path.join(cwd, ".changeset", "pre.json"), JSON.stringify(releasePlan.preState, null, 2) + "\n");
64949
65238
  touchedFiles.push(node_path.join(cwd, ".changeset", "pre.json"));
64950
65239
  }
64951
- const versionsToUpdate = releases.map(({ name, newVersion, oldVersion, type }) => ({
64952
- name,
64953
- version: newVersion,
64954
- oldVersion,
64955
- type,
64956
- dir: packagesByName.get(name).dir
65240
+ const versionsToUpdate = releases.map((release) => ({
65241
+ ...release,
65242
+ dir: packagesByName.get(release.name).dir
64957
65243
  }));
64958
65244
  const dependencyUpdateOptions = {
64959
65245
  cwd,
@@ -64965,10 +65251,12 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
64965
65251
  const filesToFormat = [];
64966
65252
  for (const release of releaseWithChangelogs) {
64967
65253
  const { changelog, dir, name, newVersion, packageJson } = release;
64968
- const pkgJsonPath = await updatePackageJson(dir, [{
65254
+ const pkgJsonEdits = getDependencyVersionEdits(packageJson, versionsToUpdate, dependencyUpdateOptions);
65255
+ if (newVersion != null) pkgJsonEdits.push({
64969
65256
  keys: ["version"],
64970
65257
  value: newVersion
64971
- }, ...getDependencyVersionEdits(packageJson, versionsToUpdate, dependencyUpdateOptions)]);
65258
+ });
65259
+ const pkgJsonPath = await updatePackageJson(dir, pkgJsonEdits);
64972
65260
  if (pkgJsonPath) touchedFiles.push(pkgJsonPath);
64973
65261
  if (changelog && changelog.length > 0) {
64974
65262
  const changelogPath = node_path.resolve(dir, "CHANGELOG.md");
@@ -65072,7 +65360,7 @@ async function updateChangelog(changelogPath, changelog, name) {
65072
65360
  await node_fs_promises.writeFile(changelogPath, newChangelog);
65073
65361
  }
65074
65362
  //#endregion
65075
- //#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@7.0.0-next.8/node_modules/@changesets/assemble-release-plan/dist/index.mjs
65363
+ //#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@7.0.0-next.9/node_modules/@changesets/assemble-release-plan/dist/index.mjs
65076
65364
  function getHighestReleaseType(releases) {
65077
65365
  if (releases.length === 0) throw new Error(`Large internal Changesets error when calculating highest release type in the set of releases. Please contact the maintainers`);
65078
65366
  let highestReleaseType = "none";
@@ -65418,7 +65706,7 @@ function getPreInfo(changesets, packagesByName, config, preState) {
65418
65706
  };
65419
65707
  }
65420
65708
  //#endregion
65421
- //#region ../../node_modules/.pnpm/@changesets+pre@3.0.0-next.7/node_modules/@changesets/pre/dist/index.mjs
65709
+ //#region ../../node_modules/.pnpm/@changesets+pre@3.0.0-next.8/node_modules/@changesets/pre/dist/index.mjs
65422
65710
  async function outputFile(filePath, content) {
65423
65711
  await node_fs_promises.mkdir(node_path.dirname(filePath), { recursive: true });
65424
65712
  await node_fs_promises.writeFile(filePath, content, "utf8");
@@ -65447,7 +65735,7 @@ async function migratePreState(rootDir, preState) {
65447
65735
  return preState;
65448
65736
  }
65449
65737
  //#endregion
65450
- //#region ../../node_modules/.pnpm/@changesets+parse@1.0.0-next.8/node_modules/@changesets/parse/dist/index.mjs
65738
+ //#region ../../node_modules/.pnpm/@changesets+parse@1.0.0-next.9/node_modules/@changesets/parse/dist/index.mjs
65451
65739
  const mdRegex = /\s*---([^]*?)\r?\n\s*---(\s*(?:\n|$)[^]*)/;
65452
65740
  const EXAMPLE_FORMAT = `---\n"package-name": patch\n---`;
65453
65741
  const validVersionTypes = [
@@ -65500,7 +65788,7 @@ YAML error: ${e instanceof Error ? e.message : String(e)}\nFrontmatter content:\
65500
65788
  };
65501
65789
  }
65502
65790
  //#endregion
65503
- //#region ../../node_modules/.pnpm/@changesets+read@1.0.0-next.8/node_modules/@changesets/read/dist/index.mjs
65791
+ //#region ../../node_modules/.pnpm/@changesets+read@1.0.0-next.9/node_modules/@changesets/read/dist/index.mjs
65504
65792
  const ignoredMdFiles = [
65505
65793
  /^README\.md$/i,
65506
65794
  "AGENTS.md",
@@ -65533,7 +65821,7 @@ async function readChangesets(rootDir, sinceRef) {
65533
65821
  return await Promise.all(changesetContents);
65534
65822
  }
65535
65823
  //#endregion
65536
- //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.0-next.8/node_modules/@changesets/get-release-plan/dist/index.mjs
65824
+ //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.0-next.9/node_modules/@changesets/get-release-plan/dist/index.mjs
65537
65825
  async function getReleasePlan(cwd, sinceRef, passedConfig) {
65538
65826
  const packages = await getPackages(cwd);
65539
65827
  const configResult = await readConfig(packages.rootDir, packages);
@@ -65574,7 +65862,12 @@ async function loadConfig(root, packages) {
65574
65862
  };
65575
65863
  }
65576
65864
  /** Effect service tag for the release planner. @public */
65577
- var ReleasePlanner = class extends effect.Context.Service()("ReleasePlanner") {};
65865
+ var ReleasePlanner = class extends effect.Context.Service()("ReleasePlanner") {
65866
+ /** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */
65867
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
65868
+ return makeShape(yield* ConfigInspector, yield* effect.FileSystem.FileSystem);
65869
+ }));
65870
+ };
65578
65871
  /** Build the service shape over a resolved {@link ConfigInspector} and {@link FileSystem.FileSystem}. */
65579
65872
  function makeShape(inspector, fs) {
65580
65873
  const plan = (root) => effect.Effect.tryPromise({
@@ -65592,10 +65885,6 @@ function makeShape(inspector, fs) {
65592
65885
  apply
65593
65886
  };
65594
65887
  }
65595
- /** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */
65596
- const ReleasePlannerLive = effect.Layer.effect(ReleasePlanner, effect.Effect.gen(function* () {
65597
- return makeShape(yield* ConfigInspector, yield* effect.FileSystem.FileSystem);
65598
- }));
65599
65888
  /**
65600
65889
  * Test factory — supply fixed results for any subset of methods. Unsupplied
65601
65890
  * methods fail with a `ReleasePlanError`.
@@ -66722,7 +67011,6 @@ const changelogFunctions = (/* @__PURE__ */ __exportAll({
66722
67011
  AppliedReleaseSchema: () => AppliedReleaseSchema,
66723
67012
  BranchAnalysisSchema: () => BranchAnalysisSchema,
66724
67013
  BranchAnalyzer: () => BranchAnalyzer,
66725
- BranchAnalyzerLive: () => BranchAnalyzerLive,
66726
67014
  BranchFileEntrySchema: () => BranchFileEntrySchema,
66727
67015
  BumpTypeSchema: () => BumpTypeSchema,
66728
67016
  Categories: () => Categories,
@@ -66740,7 +67028,6 @@ const changelogFunctions = (/* @__PURE__ */ __exportAll({
66740
67028
  ClassificationSchema: () => ClassificationSchema,
66741
67029
  CommitHashSchema: () => CommitHashSchema,
66742
67030
  ConfigInspector: () => ConfigInspector,
66743
- ConfigInspectorLive: () => ConfigInspectorLive,
66744
67031
  ConfigurationError: () => ConfigurationError,
66745
67032
  ContentStructureRule: () => ContentStructureRule$1,
66746
67033
  ContributorFootnotesPlugin: () => ContributorFootnotesPlugin,
@@ -66755,12 +67042,10 @@ const changelogFunctions = (/* @__PURE__ */ __exportAll({
66755
67042
  DependencyUpdateSchema: () => DependencyUpdateSchema,
66756
67043
  DepsRegen: () => DepsRegen,
66757
67044
  DepsRegenDefault: () => DepsRegenDefault,
66758
- DepsRegenLive: () => DepsRegenLive,
66759
67045
  FileStatusSchema: () => FileStatusSchema,
66760
67046
  GitError: () => GitError$1,
66761
67047
  GitHubApiError: () => GitHubApiError,
66762
67048
  GitHubInfoSchema: () => GitHubInfoSchema,
66763
- GitHubLive: () => GitHubLive,
66764
67049
  GitHubService: () => GitHubService,
66765
67050
  GlobSchema: () => GlobSchema,
66766
67051
  HeadingHierarchyRule: () => HeadingHierarchyRule$1,
@@ -66789,7 +67074,6 @@ const changelogFunctions = (/* @__PURE__ */ __exportAll({
66789
67074
  PreviewReleaseSchema: () => PreviewReleaseSchema,
66790
67075
  ReleasePlanError: () => ReleasePlanError,
66791
67076
  ReleasePlanner: () => ReleasePlanner,
66792
- ReleasePlannerLive: () => ReleasePlannerLive,
66793
67077
  ReorderSectionsPlugin: () => ReorderSectionsPlugin,
66794
67078
  RepoSchema: () => RepoSchema,
66795
67079
  RequiredSectionsRule: () => RequiredSectionsRule$1,