@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.
@@ -29,7 +29,7 @@ var __copyProps = (to, from, except, desc) => {
29
29
  }
30
30
  return to;
31
31
  };
32
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
32
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp$1(target, "default", {
33
33
  value: mod,
34
34
  enumerable: true
35
35
  }) : target, mod));
@@ -216,7 +216,7 @@ function isSilkChangelog(changelog) {
216
216
  * const reader = yield* ChangesetConfigReader;
217
217
  * return yield* reader.read(process.cwd());
218
218
  * }).pipe(
219
- * Effect.provide(ChangesetConfigReaderLive),
219
+ * Effect.provide(ChangesetConfigReader.layer),
220
220
  * Effect.provide(NodeServices.layer),
221
221
  * )
222
222
  * );
@@ -225,64 +225,65 @@ function isSilkChangelog(changelog) {
225
225
  * @since 0.1.0
226
226
  * @public
227
227
  */
228
- var ChangesetConfigReader = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfigReader") {};
229
- /**
230
- * Live implementation of {@link ChangesetConfigReader}.
231
- *
232
- * @remarks
233
- * Requires the core `FileSystem` service. Provide `NodeServices.layer` (or
234
- * `NodeFileSystem.layer`) from `@effect/platform-node` to satisfy this dependency.
235
- *
236
- * @since 0.1.0
237
- * @public
238
- */
239
- const ChangesetConfigReaderLive = effect.Layer.effect(ChangesetConfigReader, effect.Effect.gen(function* () {
240
- const fs = yield* effect.FileSystem.FileSystem;
241
- const read = (root) => {
242
- const configPath = `${root}/.changeset/config.json`;
243
- return effect.Effect.gen(function* () {
244
- if (!(yield* fs.exists(configPath).pipe(effect.Effect.mapError(
245
- /* v8 ignore next 4 -- error path requires fs.exists to fail */
246
- (cause) => new ChangesetConfigError({
247
- path: configPath,
248
- reason: String(cause)
249
- })
250
- )))) return yield* effect.Effect.fail(new ChangesetConfigError({
251
- path: configPath,
252
- reason: "File not found"
253
- }));
254
- const raw = yield* fs.readFileString(configPath).pipe(effect.Effect.mapError(
255
- /* v8 ignore next 4 -- error path requires fs.readFileString to fail */
256
- (cause) => new ChangesetConfigError({
257
- path: configPath,
258
- reason: String(cause)
259
- })
260
- ));
261
- const parsed = yield* effect.Effect.try({
262
- try: () => JSON.parse(raw),
263
- catch: (cause) => new ChangesetConfigError({
228
+ var ChangesetConfigReader = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfigReader") {
229
+ /**
230
+ * Production implementation of {@link ChangesetConfigReader}.
231
+ *
232
+ * @remarks
233
+ * Requires the core `FileSystem` service. Provide `NodeServices.layer` (or
234
+ * `NodeFileSystem.layer`) from `@effect/platform-node` to satisfy this dependency.
235
+ *
236
+ * @since 0.1.0
237
+ * @public
238
+ */
239
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
240
+ const fs = yield* effect.FileSystem.FileSystem;
241
+ const read = (root) => {
242
+ const configPath = `${root}/.changeset/config.json`;
243
+ return effect.Effect.gen(function* () {
244
+ if (!(yield* fs.exists(configPath).pipe(effect.Effect.mapError(
245
+ /* v8 ignore next 4 -- error path requires fs.exists to fail */
246
+ (cause) => new ChangesetConfigError({
247
+ path: configPath,
248
+ reason: String(cause)
249
+ })
250
+ )))) return yield* effect.Effect.fail(new ChangesetConfigError({
264
251
  path: configPath,
265
- reason: `Invalid JSON: ${String(cause)}`
266
- })
252
+ reason: "File not found"
253
+ }));
254
+ const raw = yield* fs.readFileString(configPath).pipe(effect.Effect.mapError(
255
+ /* v8 ignore next 4 -- error path requires fs.readFileString to fail */
256
+ (cause) => new ChangesetConfigError({
257
+ path: configPath,
258
+ reason: String(cause)
259
+ })
260
+ ));
261
+ const parsed = yield* effect.Effect.try({
262
+ try: () => JSON.parse(raw),
263
+ catch: (cause) => new ChangesetConfigError({
264
+ path: configPath,
265
+ reason: `Invalid JSON: ${String(cause)}`
266
+ })
267
+ });
268
+ if (isSilkChangelog(parsed.changelog)) return yield* effect.Schema.decodeUnknownEffect(SilkChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
269
+ /* v8 ignore next 4 -- error path requires schema decode failure */
270
+ (cause) => new ChangesetConfigError({
271
+ path: configPath,
272
+ reason: `Schema decode failed: ${String(cause)}`
273
+ })
274
+ ));
275
+ return yield* effect.Schema.decodeUnknownEffect(ChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
276
+ /* v8 ignore next 4 -- error path requires schema decode failure */
277
+ (cause) => new ChangesetConfigError({
278
+ path: configPath,
279
+ reason: `Schema decode failed: ${String(cause)}`
280
+ })
281
+ ));
267
282
  });
268
- if (isSilkChangelog(parsed.changelog)) return yield* effect.Schema.decodeUnknownEffect(SilkChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
269
- /* v8 ignore next 4 -- error path requires schema decode failure */
270
- (cause) => new ChangesetConfigError({
271
- path: configPath,
272
- reason: `Schema decode failed: ${String(cause)}`
273
- })
274
- ));
275
- return yield* effect.Schema.decodeUnknownEffect(ChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
276
- /* v8 ignore next 4 -- error path requires schema decode failure */
277
- (cause) => new ChangesetConfigError({
278
- path: configPath,
279
- reason: `Schema decode failed: ${String(cause)}`
280
- })
281
- ));
282
- });
283
- };
284
- return { read };
285
- }));
283
+ };
284
+ return { read };
285
+ }));
286
+ };
286
287
  //#endregion
287
288
  //#region ../silk-effects/dist/dev/pkg/errors/PublishTargetBindingError.js
288
289
  /**
@@ -311,6 +312,7 @@ var PublishTargetBindingError = class extends effect.Data.TaggedError("PublishTa
311
312
  };
312
313
  //#endregion
313
314
  //#region ../silk-effects/dist/dev/pkg/services/ChangesetConfig.js
315
+ const isSilk = (cfg) => "_isSilk" in cfg && cfg._isSilk === true;
314
316
  /**
315
317
  * Accessor service over a workspace root's `.changeset/config.json`.
316
318
  *
@@ -322,7 +324,7 @@ var PublishTargetBindingError = class extends effect.Data.TaggedError("PublishTa
322
324
  * @since 0.4.0
323
325
  * @public
324
326
  */
325
- var ChangesetConfig = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfig") {
327
+ var ChangesetConfig = class ChangesetConfig extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfig") {
326
328
  /**
327
329
  * The one ignore matcher: exact name match, or `@scope/*` wildcard.
328
330
  *
@@ -336,55 +338,54 @@ var ChangesetConfig = class extends effect.Context.Service()("@savvy-web/silk-ef
336
338
  }
337
339
  return name === pattern;
338
340
  }
341
+ /**
342
+ * Production layer for {@link ChangesetConfig}, reading via {@link ChangesetConfigReader}, cached per root.
343
+ *
344
+ * @remarks
345
+ * Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide
346
+ * `ChangesetConfigReader.layer` + a platform layer (`NodeServices.layer`).
347
+ *
348
+ * @since 0.4.0
349
+ * @public
350
+ */
351
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
352
+ const reader = yield* ChangesetConfigReader;
353
+ const cache = /* @__PURE__ */ new Map();
354
+ const read = (root) => effect.Effect.gen(function* () {
355
+ const hit = cache.get(root);
356
+ if (hit !== void 0) return hit;
357
+ const result = yield* reader.read(root).pipe(effect.Effect.option);
358
+ cache.set(root, result);
359
+ return result;
360
+ });
361
+ return {
362
+ mode: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
363
+ onNone: () => "none",
364
+ onSome: (cfg) => isSilk(cfg) ? "silk" : "vanilla"
365
+ }))),
366
+ versionPrivate: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
367
+ onNone: () => false,
368
+ onSome: (cfg) => {
369
+ const pp = cfg.privatePackages;
370
+ return pp !== void 0 && pp !== false && pp.version === true;
371
+ }
372
+ }))),
373
+ ignorePatterns: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
374
+ onNone: () => [],
375
+ onSome: (cfg) => cfg.ignore ?? []
376
+ }))),
377
+ isIgnored: (name, root) => read(root).pipe(effect.Effect.map(effect.Option.match({
378
+ onNone: () => false,
379
+ onSome: (cfg) => (cfg.ignore ?? []).some((p) => ChangesetConfig.matches(name, p))
380
+ }))),
381
+ fixed: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
382
+ onNone: () => [],
383
+ onSome: (cfg) => cfg.fixed ?? []
384
+ }))),
385
+ refresh: () => effect.Effect.sync(() => cache.clear())
386
+ };
387
+ }));
339
388
  };
340
- const isSilk = (cfg) => "_isSilk" in cfg && cfg._isSilk === true;
341
- /**
342
- * Live {@link ChangesetConfig} reading via {@link ChangesetConfigReader}, cached per root.
343
- *
344
- * @remarks
345
- * Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide
346
- * `ChangesetConfigReaderLive` + a platform layer (`NodeServices.layer`).
347
- *
348
- * @since 0.4.0
349
- * @public
350
- */
351
- const ChangesetConfigLive = effect.Layer.effect(ChangesetConfig, effect.Effect.gen(function* () {
352
- const reader = yield* ChangesetConfigReader;
353
- const cache = /* @__PURE__ */ new Map();
354
- const read = (root) => effect.Effect.gen(function* () {
355
- const hit = cache.get(root);
356
- if (hit !== void 0) return hit;
357
- const result = yield* reader.read(root).pipe(effect.Effect.option);
358
- cache.set(root, result);
359
- return result;
360
- });
361
- return {
362
- mode: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
363
- onNone: () => "none",
364
- onSome: (cfg) => isSilk(cfg) ? "silk" : "vanilla"
365
- }))),
366
- versionPrivate: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
367
- onNone: () => false,
368
- onSome: (cfg) => {
369
- const pp = cfg.privatePackages;
370
- return pp !== void 0 && pp !== false && pp.version === true;
371
- }
372
- }))),
373
- ignorePatterns: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
374
- onNone: () => [],
375
- onSome: (cfg) => cfg.ignore ?? []
376
- }))),
377
- isIgnored: (name, root) => read(root).pipe(effect.Effect.map(effect.Option.match({
378
- onNone: () => false,
379
- onSome: (cfg) => (cfg.ignore ?? []).some((p) => ChangesetConfig.matches(name, p))
380
- }))),
381
- fixed: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
382
- onNone: () => [],
383
- onSome: (cfg) => cfg.fixed ?? []
384
- }))),
385
- refresh: () => effect.Effect.sync(() => cache.clear())
386
- };
387
- }));
388
389
  //#endregion
389
390
  //#region ../silk-effects/dist/dev/pkg/utils/TrailingSlash.js
390
391
  /**
@@ -404,7 +405,7 @@ const trimTrailingSlashes = (s) => {
404
405
  //#endregion
405
406
  //#region ../../node_modules/.pnpm/@effected+glob@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/glob/internal/limits.js
406
407
  /** Hard cap on pattern length. Upstream minimatch's MAX_PATTERN_LENGTH (64KB). */
407
- const MAX_PATTERN_LENGTH = 1024 * 64;
408
+ const MAX_PATTERN_LENGTH = 65536;
408
409
  /** Default brace-expansion output budget. Upstream brace-expansion's EXPANSION_MAX. */
409
410
  const EXPANSION_MAX = 1e5;
410
411
  /**
@@ -2336,7 +2337,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2336
2337
  }
2337
2338
  };
2338
2339
  //#endregion
2339
- //#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
2340
+ //#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
2340
2341
  /**
2341
2342
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2342
2343
  * when the format is `"bun"`.
@@ -2357,7 +2358,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
2357
2358
  trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
2358
2359
  }) {};
2359
2360
  //#endregion
2360
- //#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
2361
+ //#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
2361
2362
  /**
2362
2363
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2363
2364
  * version ranges.
@@ -2403,7 +2404,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
2403
2404
  static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
2404
2405
  };
2405
2406
  //#endregion
2406
- //#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
2407
+ //#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
2407
2408
  /**
2408
2409
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2409
2410
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2464,7 +2465,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
2464
2465
  static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
2465
2466
  };
2466
2467
  //#endregion
2467
- //#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
2468
+ //#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
2468
2469
  /**
2469
2470
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2470
2471
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2508,7 +2509,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
2508
2509
  }
2509
2510
  };
2510
2511
  //#endregion
2511
- //#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
2512
+ //#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
2512
2513
  /**
2513
2514
  * The short dependency kind: which dependency map an entry came from, named the
2514
2515
  * way consumers branch on it.
@@ -2540,7 +2541,7 @@ Object.fromEntries(Object.entries({
2540
2541
  optional: "optionalDependencies"
2541
2542
  }).map(([kind, field]) => [field, kind]));
2542
2543
  //#endregion
2543
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/desugar.js
2544
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/desugar.js
2544
2545
  const sv = (major, minor, patch, prerelease = [], build = []) => ({
2545
2546
  major,
2546
2547
  minor,
@@ -2629,7 +2630,7 @@ const desugarHyphen = (lower, upper) => {
2629
2630
  return [comp(">=", lowerVersion)];
2630
2631
  };
2631
2632
  //#endregion
2632
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/grammar.js
2633
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/grammar.js
2633
2634
  /** Private control-flow exception; never escapes the entry points. */
2634
2635
  var ParseFailure = class {
2635
2636
  position;
@@ -2865,13 +2866,17 @@ const parseSimple = (s) => {
2865
2866
  if (ch === "~") {
2866
2867
  advance$1(s);
2867
2868
  if (peek$1(s) === ">") return fail(s);
2868
- return desugarTilde(parsePartial(s));
2869
+ const partial = parsePartial(s);
2870
+ return desugarTilde(partial);
2869
2871
  }
2870
2872
  if (ch === "^") {
2871
2873
  advance$1(s);
2872
- return desugarCaret(parsePartial(s));
2874
+ const partial = parsePartial(s);
2875
+ return desugarCaret(partial);
2873
2876
  }
2874
- return desugarXRange(parseOperator(s), parsePartial(s));
2877
+ const operator = parseOperator(s);
2878
+ const partial = parsePartial(s);
2879
+ return desugarXRange(operator, partial);
2875
2880
  };
2876
2881
  const atRangeEnd = (s) => {
2877
2882
  if (atEnd$1(s)) return true;
@@ -2888,7 +2893,8 @@ const parseRangeComparators = (s) => {
2888
2893
  advance$1(s);
2889
2894
  advance$1(s);
2890
2895
  advance$1(s);
2891
- return desugarHyphen(lower, parsePartial(s));
2896
+ const upper = parsePartial(s);
2897
+ return desugarHyphen(lower, upper);
2892
2898
  } catch (failure) {
2893
2899
  if (!(failure instanceof ParseFailure)) throw failure;
2894
2900
  s.pos = savedPos;
@@ -3024,7 +3030,7 @@ const formatComparator = (c) => {
3024
3030
  /** Print comparator sets as `a b || c d`. */
3025
3031
  const formatRange = (sets) => sets.map((set) => set.map(formatComparator).join(" ")).join(" || ");
3026
3032
  //#endregion
3027
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/order.js
3033
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/order.js
3028
3034
  /**
3029
3035
  * Compare two prerelease identifiers per SemVer 2.0.0 §11: numeric
3030
3036
  * identifiers always have lower precedence than alphanumeric ones; numerics
@@ -3077,7 +3083,7 @@ const compareBuild = (a, b) => {
3077
3083
  return 0;
3078
3084
  };
3079
3085
  //#endregion
3080
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/SemVer.js
3086
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/SemVer.js
3081
3087
  /**
3082
3088
  * Indicates that a string could not be parsed as a valid SemVer 2.0.0 version.
3083
3089
  *
@@ -3158,6 +3164,35 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3158
3164
  encode: (parts) => effect.Effect.succeed(formatVersion(parts))
3159
3165
  })));
3160
3166
  /**
3167
+ * `Schema.String` refined by {@link SemVer.isValid}: an exact SemVer 2.0.0
3168
+ * version string whose type stays `string`.
3169
+ *
3170
+ * @remarks
3171
+ * For consumer structs whose field must remain a plain string — a manifest
3172
+ * model, an action input — while still refusing everything that is not
3173
+ * exactly one version: ranges, partial versions, dist-tags, and padded
3174
+ * input (see {@link SemVer.isValid} for the whitespace posture). Build
3175
+ * metadata is valid grammar and passes; reach for
3176
+ * {@link SemVer.PinnableVersionString} when the `+` position is spoken for.
3177
+ * Decode to a {@link SemVer} instance with {@link SemVer.FromString}
3178
+ * instead when the parsed components are wanted.
3179
+ */
3180
+ 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)")));
3181
+ /**
3182
+ * `Schema.String` refined by {@link SemVer.isPinnable}: an exact,
3183
+ * build-metadata-free SemVer 2.0.0 version string whose type stays
3184
+ * `string`.
3185
+ *
3186
+ * @remarks
3187
+ * The corepack-pinnable notion: what the `<name>@<version>[+<integrity>]`
3188
+ * pin grammar can express in its version position, where the first `+`
3189
+ * always begins the integrity component. `@effected/package-json`'s
3190
+ * `PackageManager` field model consumes this schema directly; suites that
3191
+ * must prove they share it rather than carrying a copy can assert object
3192
+ * identity against this export.
3193
+ */
3194
+ 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)")));
3195
+ /**
3161
3196
  * Parse a strict SemVer 2.0.0 version string, synchronously, returning a
3162
3197
  * `Result` instead of an `Effect`.
3163
3198
  *
@@ -3165,6 +3200,12 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3165
3200
  * identifiers and partially consumed input.
3166
3201
  *
3167
3202
  * @remarks
3203
+ * **Surrounding whitespace is TRIMMED before parsing**, matching
3204
+ * node-semver's constructor: `" 1.2.3"` parses successfully. When padded
3205
+ * input should be the caller's error rather than silently canonicalized,
3206
+ * reach for {@link SemVer.isValid} / {@link SemVer.ExactVersionString}
3207
+ * (or their pinnable twins), which deliberately reject it.
3208
+ *
3168
3209
  * {@link SemVer.parse} is defined in terms of this function; the two never
3169
3210
  * diverge. Reach for the `Effect` variant inside Effect code — it carries
3170
3211
  * the `SemVer.parse` tracing span — and for this one at synchronous
@@ -3210,6 +3251,49 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3210
3251
  */
3211
3252
  static parse = effect.Effect.fn("SemVer.parse")((input) => effect.Effect.fromResult(SemVer.parseResult(input)));
3212
3253
  /**
3254
+ * Whether `input` is a valid SemVer 2.0.0 version string, exactly as
3255
+ * given.
3256
+ *
3257
+ * @remarks
3258
+ * Strict grammar validity — the same grammar as {@link SemVer.parseResult}
3259
+ * — with one deliberate divergence: surrounding whitespace is **rejected**.
3260
+ * `parseResult` trims its input (matching node-semver, whose `SemVer`
3261
+ * constructor trims), so `" 1.2.3"` parses; this predicate answers a
3262
+ * different question — "is this string, byte for byte, a version?" — and a
3263
+ * padded input is the caller's bug to surface, not this package's to hide.
3264
+ * Build metadata is valid grammar (`isValid("1.2.3+build")` is `true`);
3265
+ * reach for {@link SemVer.isPinnable} when the `+` position must stay
3266
+ * free.
3267
+ *
3268
+ * @param input - the candidate version string
3269
+ * @returns `true` when `input` is a valid version string with no
3270
+ * surrounding whitespace.
3271
+ */
3272
+ static isValid(input) {
3273
+ return input === input.trim() && effect.Result.isSuccess(SemVer.parseResult(input));
3274
+ }
3275
+ /**
3276
+ * Whether `input` is a corepack-pinnable version string: valid by
3277
+ * {@link SemVer.isValid} **and** carrying no build metadata.
3278
+ *
3279
+ * @remarks
3280
+ * The notion the `<name>@<version>[+<integrity>]` pin grammar needs: there
3281
+ * the first `+` after the version always begins the integrity component,
3282
+ * so a version carrying build identifiers would encode to a string that
3283
+ * re-parses differently. Prerelease versions are pinnable; the whitespace
3284
+ * posture is {@link SemVer.isValid}'s.
3285
+ *
3286
+ * @param input - the candidate version string
3287
+ * @returns `true` when `input` is a valid version string with no
3288
+ * surrounding whitespace (the string equals its own trim) and whose
3289
+ * build metadata is empty.
3290
+ */
3291
+ static isPinnable(input) {
3292
+ if (input !== input.trim()) return false;
3293
+ const parsed = SemVer.parseResult(input);
3294
+ return effect.Result.isSuccess(parsed) && parsed.success.build.length === 0;
3295
+ }
3296
+ /**
3213
3297
  * Positional convenience constructor: `SemVer.of(1, 2, 3)`.
3214
3298
  *
3215
3299
  * @param major - the major version component
@@ -3312,9 +3396,7 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3312
3396
  case "minor":
3313
3397
  key = `${version.major}.${version.minor}`;
3314
3398
  break;
3315
- case "patch":
3316
- key = `${version.major}.${version.minor}.${version.patch}`;
3317
- break;
3399
+ case "patch": key = `${version.major}.${version.minor}.${version.patch}`;
3318
3400
  }
3319
3401
  const group = grouped[key] ?? [];
3320
3402
  group.push(version);
@@ -3512,7 +3594,7 @@ var SemVerBump = class {
3512
3594
  }
3513
3595
  };
3514
3596
  //#endregion
3515
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/Comparator.js
3597
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/Comparator.js
3516
3598
  /**
3517
3599
  * Indicates that a string could not be parsed as a single comparator.
3518
3600
  *
@@ -3646,7 +3728,7 @@ var Comparator = class Comparator extends effect.Schema.Class("Comparator")({
3646
3728
  }
3647
3729
  };
3648
3730
  //#endregion
3649
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/normalize.js
3731
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/normalize.js
3650
3732
  const operatorWeight = (op) => {
3651
3733
  switch (op) {
3652
3734
  case ">=": return 0;
@@ -3677,7 +3759,7 @@ const normalizeComparatorSet = (set) => sortComparators(removeDuplicates(set));
3677
3759
  /** Normalize every comparator set in a range: sort and deduplicate each independently. */
3678
3760
  const normalizeSets = (sets) => sets.map(normalizeComparatorSet);
3679
3761
  //#endregion
3680
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/Range.js
3762
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/Range.js
3681
3763
  /**
3682
3764
  * Indicates that a string could not be parsed as a range expression.
3683
3765
  *
@@ -3956,9 +4038,7 @@ const isSetSatisfiable = (set) => {
3956
4038
  case "<=":
3957
4039
  if (cmp > 0) return false;
3958
4040
  break;
3959
- case "=":
3960
- if (cmp !== 0) return false;
3961
- break;
4041
+ case "=": if (cmp !== 0) return false;
3962
4042
  }
3963
4043
  }
3964
4044
  for (const lo of lowers) for (const hi of uppers) {
@@ -3997,9 +4077,7 @@ const isComparatorImplied = (set, comp) => {
3997
4077
  if (s.operator === "<=" && cmp < 0) return true;
3998
4078
  if (s.operator === "=" && cmp < 0) return true;
3999
4079
  break;
4000
- case "=":
4001
- if (s.operator === "=" && cmp === 0) return true;
4002
- break;
4080
+ case "=": if (s.operator === "=" && cmp === 0) return true;
4003
4081
  }
4004
4082
  }
4005
4083
  return false;
@@ -4009,7 +4087,7 @@ const isComparatorSetSubset = (sub, sup) => {
4009
4087
  return true;
4010
4088
  };
4011
4089
  //#endregion
4012
- //#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
4090
+ //#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
4013
4091
  /**
4014
4092
  * Indicates that a string could not be parsed as a valid dependency specifier.
4015
4093
  *
@@ -4216,9 +4294,9 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4216
4294
  FromString: fromString
4217
4295
  });
4218
4296
  //#endregion
4219
- //#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
4297
+ //#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
4220
4298
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4221
- const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
4299
+ const COREPACK_RE = /^(sha1|sha224|sha256|sha384|sha512)\.[0-9a-f]+$/;
4222
4300
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
4223
4301
  const isSri = (value) => SRI_RE.test(value);
4224
4302
  const isCorepack = (value) => COREPACK_RE.test(value);
@@ -4268,6 +4346,58 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4268
4346
  algorithmOf,
4269
4347
  decode: decode$2
4270
4348
  });
4349
+ /**
4350
+ * {@link (IntegrityHash:variable)} narrowed to the corepack `<algo>.<hex>` form
4351
+ * — `sha512.deadbeef`, and corepack's own sha224 default pins
4352
+ * (`sha224.877304e3…`). An SRI (`sha512-<base64>`) or yarn (`10c0/<hex>`)
4353
+ * hash, both valid `IntegrityHash` values, fails this schema.
4354
+ *
4355
+ * @remarks
4356
+ * The corepack pin tail (`<name>@<version>+<integrity>`) is the one place the
4357
+ * kit meets this form, and two schemas name it: `PackageManagerPin.integrity`
4358
+ * here and `@effected/package-json`'s `PackageManager.integrity`. Both consume
4359
+ * **this** schema — the restriction existed privately in each module until they
4360
+ * were consolidated, and a private copy is exactly how the two drift (the
4361
+ * widening that admitted sha224 had to be made twice).
4362
+ *
4363
+ * It decodes to the same {@link IntegrityHashBrand} the unrestricted schema
4364
+ * does, so a corepack-validated value assigns anywhere an `IntegrityHash` is
4365
+ * expected; there is no second brand. Reach for
4366
+ * `IntegrityHash.isCorepack(value)` to ask the same question about a raw
4367
+ * string without decoding.
4368
+ *
4369
+ * That single brand is also why sharing this schema is not type-enforced, and
4370
+ * the consequence is sharper than it looks: a `Schema.check` is **erased from
4371
+ * the built type**, so this schema and the unrestricted one are the same
4372
+ * declared type. A consumer that quietly reverts to a private copy compiles
4373
+ * clean, and — if the copy is faithful — passes every rejection test too.
4374
+ * Neither `tsc` nor behaviour can see the re-fork.
4375
+ *
4376
+ * What does see it is **object identity**, so each consumer's suite asserts
4377
+ * that its field schema IS this export:
4378
+ * `PackageManagerPin.fields.integrity.schema === CorepackIntegrityHash` (an
4379
+ * `optionalKey` field keeps the inner schema on `.schema`), and
4380
+ * `PackageManager.fields.integrity.value === CorepackIntegrityHash` on the
4381
+ * `@effected/package-json` side (a `Schema.Option` keeps it on `.value`). Both
4382
+ * assertions carry a control against the unrestricted brand, so they discriminate
4383
+ * rather than passing on any schema at all. That identity assertion is the only
4384
+ * thing standing between the two surfaces and a silent re-fork; do not replace
4385
+ * it with a behavioural test, which cannot fail.
4386
+ *
4387
+ * @example
4388
+ * ```ts
4389
+ * import { CorepackIntegrityHash } from "@effected/npm";
4390
+ * import { Schema } from "effect";
4391
+ *
4392
+ * const decode = Schema.decodeUnknownExit(CorepackIntegrityHash);
4393
+ *
4394
+ * decode("sha512.deadbeef"); // success
4395
+ * decode("sha512-3q2+7w=="); // failure — SRI form
4396
+ * ```
4397
+ *
4398
+ * @public
4399
+ */
4400
+ const CorepackIntegrityHash = brandedIntegrity.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
4271
4401
  effect.Schema.Literals([
4272
4402
  "npm",
4273
4403
  "pnpm",
@@ -4282,15 +4412,22 @@ const PREFIXES = {
4282
4412
  "--no",
4283
4413
  "--"
4284
4414
  ],
4285
- dlxPrefix: ["npx"]
4415
+ dlxPrefix: ["npx"],
4416
+ scriptPrefix: [
4417
+ "npm",
4418
+ "run",
4419
+ "--"
4420
+ ]
4286
4421
  },
4287
4422
  pnpm: {
4288
4423
  prefix: ["pnpm", "exec"],
4289
- dlxPrefix: ["pnpm", "dlx"]
4424
+ dlxPrefix: ["pnpm", "dlx"],
4425
+ scriptPrefix: ["pnpm", "run"]
4290
4426
  },
4291
4427
  yarn: {
4292
4428
  prefix: ["yarn", "exec"],
4293
- dlxPrefix: ["yarn", "dlx"]
4429
+ dlxPrefix: ["yarn", "dlx"],
4430
+ scriptPrefix: ["yarn", "run"]
4294
4431
  },
4295
4432
  bun: {
4296
4433
  prefix: [
@@ -4298,15 +4435,16 @@ const PREFIXES = {
4298
4435
  "x",
4299
4436
  "--no-install"
4300
4437
  ],
4301
- dlxPrefix: ["bun", "x"]
4438
+ dlxPrefix: ["bun", "x"],
4439
+ scriptPrefix: ["bun", "run"]
4302
4440
  }
4303
4441
  };
4304
4442
  /**
4305
4443
  * How to run a project-local binary here.
4306
4444
  *
4307
4445
  * @remarks
4308
- * This is the whole of what tool discovery needs from a workspace: an argv
4309
- * prefix and a directory to run it in. It deliberately carries no workspace
4446
+ * This is the whole of what tool discovery needs from a workspace: argv
4447
+ * prefixes and a directory to run them in. It deliberately carries no workspace
4310
4448
  * root, no manifest and no package-manager semantics — `label` is for
4311
4449
  * reporting only, and nothing in this package branches on it.
4312
4450
  *
@@ -4319,6 +4457,8 @@ var ExecContext = class extends effect.Schema.Class("ExecContext")({
4319
4457
  prefix: effect.Schema.Array(effect.Schema.String),
4320
4458
  /** argv prefix that fetch-and-runs a package binary, e.g. `["pnpm", "dlx"]`. */
4321
4459
  dlxPrefix: effect.Schema.Array(effect.Schema.String),
4460
+ /** argv prefix that runs a `package.json` script, e.g. `["pnpm", "run"]`. */
4461
+ scriptPrefix: effect.Schema.Array(effect.Schema.String),
4322
4462
  /** Directory the prefix must run in. Omitted means "wherever the caller is". */
4323
4463
  directory: effect.Schema.optionalKey(effect.Schema.String)
4324
4464
  }) {
@@ -4331,6 +4471,19 @@ var ExecContext = class extends effect.Schema.Class("ExecContext")({
4331
4471
  return this.withPrefix(command, this.dlxPrefix);
4332
4472
  }
4333
4473
  /**
4474
+ * As {@link ExecContext.apply}, using `scriptPrefix` — runs a
4475
+ * `package.json` script by name.
4476
+ *
4477
+ * @remarks
4478
+ * The command's `command` is the script name and its `args` are the script's
4479
+ * arguments. Every launcher uses the explicit `run` form, and npm's prefix
4480
+ * carries a trailing `--` because bare `npm run <script> --flag` silently
4481
+ * claims `--flag` for npm itself instead of the script.
4482
+ */
4483
+ applyScript(command) {
4484
+ return this.withPrefix(command, this.scriptPrefix);
4485
+ }
4486
+ /**
4334
4487
  * Core's `prefix` and `setCwd` both return NEW commands, so the caller's
4335
4488
  * value is never mutated.
4336
4489
  */
@@ -4381,9 +4534,21 @@ var LocalExecError = class extends effect.Schema.TaggedErrorClass()("LocalExecEr
4381
4534
  * @public
4382
4535
  */
4383
4536
  var LocalExec = class LocalExec extends effect.Context.Service()("@effected/commands/LocalExec") {
4384
- /** The exec and dlx argv prefixes for a launcher — the single home of that knowledge. */
4537
+ /** The exec, dlx and script-runner argv prefixes for a launcher — the single home of that knowledge. */
4385
4538
  static prefixes = (launcher) => PREFIXES[launcher];
4386
4539
  /**
4540
+ * The argv prefix that runs a `package.json` script for `launcher`.
4541
+ *
4542
+ * @remarks
4543
+ * A projection of {@link LocalExec.prefixes} for the caller that only runs
4544
+ * scripts. Every launcher uses the explicit `run` form —
4545
+ * `["npm", "run", "--"]`, `["pnpm", "run"]`, `["yarn", "run"]` and
4546
+ * `["bun", "run"]` — and npm's carries a trailing `--` because bare
4547
+ * `npm run <script> --flag` silently claims `--flag` for npm itself; the
4548
+ * other three forward post-script arguments without it.
4549
+ */
4550
+ static scriptPrefix = (launcher) => PREFIXES[launcher].scriptPrefix;
4551
+ /**
4387
4552
  * No project-local execution context: every tool resolves globally.
4388
4553
  *
4389
4554
  * @remarks
@@ -4393,11 +4558,12 @@ var LocalExec = class LocalExec extends effect.Context.Service()("@effected/comm
4393
4558
  static layerNone = effect.Layer.succeed(this, { context: effect.Effect.succeed(effect.Option.none()) });
4394
4559
  /** A context for a known package manager, from the static prefix table. */
4395
4560
  static layerFor = (launcher, options) => {
4396
- const { prefix, dlxPrefix } = PREFIXES[launcher];
4561
+ const { prefix, dlxPrefix, scriptPrefix } = PREFIXES[launcher];
4397
4562
  return LocalExec.layerContext(ExecContext.make({
4398
4563
  label: launcher,
4399
4564
  prefix,
4400
4565
  dlxPrefix,
4566
+ scriptPrefix,
4401
4567
  ...options?.directory === void 0 ? {} : { directory: options.directory }
4402
4568
  }));
4403
4569
  };
@@ -4427,7 +4593,7 @@ var LocalExec = class LocalExec extends effect.Context.Service()("@effected/comm
4427
4593
  static layerTest = (overrides = {}) => effect.Layer.succeed(LocalExec, LocalExec.makeTest(overrides));
4428
4594
  };
4429
4595
  //#endregion
4430
- //#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
4596
+ //#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
4431
4597
  const MS_PER_MINUTE = 6e4;
4432
4598
  /**
4433
4599
  * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
@@ -4597,7 +4763,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
4597
4763
  }
4598
4764
  };
4599
4765
  //#endregion
4600
- //#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
4766
+ //#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
4601
4767
  /**
4602
4768
  * One declared dependency of one workspace importer, as the lockfile records it.
4603
4769
  *
@@ -4635,7 +4801,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
4635
4801
  depType: DependencyField
4636
4802
  }) {};
4637
4803
  //#endregion
4638
- //#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
4804
+ //#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
4639
4805
  /**
4640
4806
  * One workspace importer's declared dependencies, as the lockfile records them.
4641
4807
  *
@@ -4659,7 +4825,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
4659
4825
  dependencies: effect.Schema.Array(ImporterDependency)
4660
4826
  }) {};
4661
4827
  //#endregion
4662
- //#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
4828
+ //#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
4663
4829
  const EMPTY_DEPENDENCIES = {};
4664
4830
  /**
4665
4831
  * A package resolved from a lockfile.
@@ -4694,7 +4860,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
4694
4860
  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)))
4695
4861
  }) {};
4696
4862
  //#endregion
4697
- //#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
4863
+ //#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
4698
4864
  /**
4699
4865
  * A directed dependency edge between two workspace packages as recorded in
4700
4866
  * the lockfile.
@@ -4716,7 +4882,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
4716
4882
  constraint: effect.Schema.String
4717
4883
  }) {};
4718
4884
  //#endregion
4719
- //#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
4885
+ //#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
4720
4886
  /**
4721
4887
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
4722
4888
  * when the format is `"pnpm"`.
@@ -4741,7 +4907,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
4741
4907
  }))
4742
4908
  }) {};
4743
4909
  //#endregion
4744
- //#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
4910
+ //#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
4745
4911
  /**
4746
4912
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
4747
4913
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -4762,20 +4928,24 @@ const LockfileFormat = effect.Schema.Literals([
4762
4928
  "yarn"
4763
4929
  ]);
4764
4930
  const FILENAMES = {
4765
- bun: "bun.lock",
4766
- npm: "package-lock.json",
4767
- pnpm: "pnpm-lock.yaml",
4768
- yarn: "yarn.lock"
4931
+ bun: ["bun.lock", "bun.lockb"],
4932
+ npm: ["package-lock.json", "npm-shrinkwrap.json"],
4933
+ pnpm: ["pnpm-lock.yaml"],
4934
+ yarn: ["yarn.lock"]
4769
4935
  };
4770
4936
  /**
4771
4937
  * The conventional lockfile filename for a format: `"bun.lock"`,
4772
4938
  * `"package-lock.json"`, `"pnpm-lock.yaml"` or `"yarn.lock"`.
4773
4939
  *
4940
+ * @remarks
4941
+ * The primary name only — the first element of {@link filenamesFor}, which is
4942
+ * what detection that must also see the genuine alternates should use.
4943
+ *
4774
4944
  * @public
4775
4945
  */
4776
- const filenameFor = (format) => FILENAMES[format];
4946
+ const filenameFor = (format) => FILENAMES[format][0];
4777
4947
  //#endregion
4778
- //#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
4948
+ //#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
4779
4949
  /**
4780
4950
  * The four dependency sections of a manifest, in a stable order — the shared
4781
4951
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -5190,9 +5360,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
5190
5360
  else tokenError = "InvalidUnicode";
5191
5361
  break;
5192
5362
  }
5193
- default:
5194
- tokenError = "InvalidEscapeCharacter";
5195
- break;
5363
+ default: tokenError = "InvalidEscapeCharacter";
5196
5364
  }
5197
5365
  start = pos;
5198
5366
  } else if (isLineBreak$1(ch)) {
@@ -6706,7 +6874,7 @@ var JsoncModifier = class {
6706
6874
  });
6707
6875
  };
6708
6876
  //#endregion
6709
- //#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
6877
+ //#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
6710
6878
  const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6711
6879
  const BunWorkspaceEntry = effect.Schema.Struct({
6712
6880
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6799,7 +6967,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
6799
6967
  };
6800
6968
  });
6801
6969
  //#endregion
6802
- //#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
6970
+ //#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
6803
6971
  const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6804
6972
  const NpmPackageEntry = effect.Schema.Struct({
6805
6973
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -13721,7 +13889,7 @@ function deepEqualValues(a, b) {
13721
13889
  return false;
13722
13890
  }
13723
13891
  //#endregion
13724
- //#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
13892
+ //#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
13725
13893
  /**
13726
13894
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
13727
13895
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -13791,7 +13959,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
13791
13959
  };
13792
13960
  });
13793
13961
  //#endregion
13794
- //#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
13962
+ //#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
13795
13963
  const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
13796
13964
  specifier: effect.Schema.String,
13797
13965
  version: effect.Schema.String
@@ -13916,7 +14084,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
13916
14084
  };
13917
14085
  });
13918
14086
  //#endregion
13919
- //#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
14087
+ //#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
13920
14088
  const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
13921
14089
  const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
13922
14090
  const YarnEntry = effect.Schema.Struct({
@@ -14039,7 +14207,7 @@ const cleanYarnDeps = (deps) => {
14039
14207
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
14040
14208
  };
14041
14209
  //#endregion
14042
- //#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
14210
+ //#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
14043
14211
  const EMPTY_IMPORTERS = [];
14044
14212
  /**
14045
14213
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -14283,7 +14451,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
14283
14451
  }
14284
14452
  };
14285
14453
  //#endregion
14286
- //#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
14454
+ //#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
14287
14455
  /**
14288
14456
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
14289
14457
  * lockfile against: a package name plus the four optional dependency maps.
@@ -14399,7 +14567,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
14399
14567
  }
14400
14568
  };
14401
14569
  //#endregion
14402
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14570
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14403
14571
  /**
14404
14572
  * A resolved dependency entry pairing a package name with its version
14405
14573
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -14463,7 +14631,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
14463
14631
  }
14464
14632
  };
14465
14633
  //#endregion
14466
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14634
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14467
14635
  /**
14468
14636
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
14469
14637
  *
@@ -16018,7 +16186,7 @@ effect.Schema.String.pipe(effect.Schema.decodeTo(SpdxExpressionUnion, effect.Sch
16018
16186
  encode: (expression) => effect.Effect.succeed(serialize$1(expression))
16019
16187
  })));
16020
16188
  //#endregion
16021
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16189
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16022
16190
  /**
16023
16191
  * Indicates that a string is not a valid SPDX license identifier or expression.
16024
16192
  *
@@ -16053,50 +16221,103 @@ const isValidSpdx = (value) => {
16053
16221
  */
16054
16222
  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"));
16055
16223
  //#endregion
16056
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16057
- const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
16058
- /**
16059
- * The `packageManager` field only ever carries corepack's `<algo>.<hex>`
16060
- * integrity form (the `name@version+sha512.<hex>` tail). Restrict the
16061
- * `@effected/npm` `IntegrityHash` brand — which also admits the SRI and yarn
16062
- * forms — to just the corepack shape, so an SRI or yarn integrity here fails
16063
- * typed rather than being accepted into a field that can never legitimately
16064
- * hold it.
16065
- */
16066
- const CorepackIntegrity = IntegrityHash.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => IntegrityHash.isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
16224
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16225
+ const PACKAGE_MANAGER_NAME_RE = /^[a-z]+$/;
16226
+ const invalid$1 = (input, message) => effect.Effect.fail(new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message }));
16067
16227
  /**
16068
16228
  * A structured `packageManager` value with `name`, `version` and an optional
16069
16229
  * `integrity` hash.
16070
16230
  *
16231
+ * @remarks
16232
+ * The same `<name>@<version>[+<integrity>]` triple `@effected/npm`'s
16233
+ * `PackageManagerPin` models, in its `package.json` field form. Both share the
16234
+ * strict pieces — the version is `@effected/semver`'s
16235
+ * `SemVer.PinnableVersionString` (decode rules through `SemVer.isPinnable`),
16236
+ * the integrity is npm's `CorepackIntegrityHash` — and
16237
+ * both apply the first-`+`-is-integrity rule. Reach for the pin when
16238
+ * provisioning a package manager; reach for this class when reading or writing
16239
+ * the manifest field.
16240
+ *
16241
+ * **The one deliberate divergence is the name grammar**, and it points this
16242
+ * way: the pin closes the set to the four managers the kit can provision
16243
+ * (`npm | pnpm | yarn | bun`), while this field model accepts any lowercase
16244
+ * name. The evidence:
16245
+ *
16246
+ * - Corepack 0.34.0 (`specUtils.ts`, `parseSpec`) recognises **three** names —
16247
+ * `npm`, `pnpm`, `yarn` — and throws an "unsupported package manager
16248
+ * specification" usage error for any other. Adopting that set here would reject
16249
+ * `bun@1.2.20`, which is real: six published packages in this repo's own
16250
+ * `node_modules` carry exactly that value, and a manifest model that cannot
16251
+ * read them is useless for the job it has.
16252
+ * - Corepack does not treat the set as closed either. `parseSpec` skips the
16253
+ * name check entirely when the spec is a URL, so a custom name is reachable
16254
+ * in corepack's own grammar (behind `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS`).
16255
+ * - npm documents no constraint on this field at all. Its `package.json`
16256
+ * reference constrains only `devEngines.packageManager.name` — a different
16257
+ * field, modeled here by `DevEngine` and out of scope for this class.
16258
+ *
16259
+ * So: field model = manifests as they exist in the wild; pin = the kit's
16260
+ * provisioning vocabulary. A name outside the pin's four is representable here
16261
+ * and simply will not be installable through the pin — which is the honest
16262
+ * relationship between a document model and a provisioning contract.
16263
+ *
16071
16264
  * @public
16072
16265
  */
16073
16266
  var PackageManager = class PackageManager extends effect.Schema.Class("PackageManager")({
16074
- /** The package-manager name (e.g. `pnpm`). */
16267
+ /** The package-manager name (e.g. `pnpm`). Any lowercase name — see the class remarks. */
16075
16268
  name: effect.Schema.String,
16076
- /** The version (e.g. `10.33.0`). */
16077
- version: effect.Schema.String,
16078
- /** The optional integrity hash (e.g. `sha512.abc`), an `@effected/npm` `IntegrityHash` restricted to the corepack `<algo>.<hex>` form. */
16079
- integrity: effect.Schema.Option(CorepackIntegrity)
16269
+ /**
16270
+ * The version (e.g. `10.33.0`): `@effected/semver`'s
16271
+ * `SemVer.PinnableVersionString` an exact SemVer 2.0.0 version with no
16272
+ * build metadata and no surrounding whitespace. Prerelease versions are
16273
+ * allowed (`10.0.0-rc.1`); ranges, partial versions, dist-tags,
16274
+ * leading-zero components and padded values are not, and a version
16275
+ * carrying build metadata is rejected at construction because the grammar
16276
+ * cannot express it. The shared schema is consumed by identity, not
16277
+ * copied — the suite asserts `fields.version === SemVer.PinnableVersionString`.
16278
+ */
16279
+ version: SemVer.PinnableVersionString,
16280
+ /**
16281
+ * The optional integrity hash (e.g. `sha512.abc`): `@effected/npm`'s
16282
+ * `CorepackIntegrityHash`, the shared restriction of the `IntegrityHash`
16283
+ * brand to the corepack `<algo>.<hex>` form.
16284
+ */
16285
+ integrity: effect.Schema.Option(CorepackIntegrityHash)
16080
16286
  }) {
16081
16287
  /**
16082
16288
  * Schema transformation between the `"name@version+integrity"` string and a
16083
16289
  * {@link PackageManager}.
16290
+ *
16291
+ * @remarks
16292
+ * Decoding splits on the first `@`, then on the first `+` — which always
16293
+ * begins the integrity, never semver build metadata — and validates each
16294
+ * component: the name against the lowercase grammar, the version through
16295
+ * `@effected/semver`'s strict parse, the integrity through
16296
+ * `CorepackIntegrityHash`. Every failure is a typed decode failure naming
16297
+ * the component that failed. Encoding prints the canonical string, which is
16298
+ * byte-identical to any input this codec accepts.
16084
16299
  */
16085
16300
  static FromString = effect.Schema.String.pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(PackageManager), effect.SchemaTransformation.transformOrFail({
16086
16301
  decode: (input) => {
16087
- const match = input.match(PACKAGE_MANAGER_RE);
16088
- if (match === null) return effect.Effect.fail(new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message: `Invalid packageManager format: "${input}"` }));
16089
- const rawIntegrity = match[3];
16090
- if (rawIntegrity === void 0) return effect.Effect.succeed(PackageManager.make({
16091
- name: match[1],
16092
- version: match[2],
16302
+ const at = input.indexOf("@");
16303
+ if (at === -1) return invalid$1(input, `Invalid packageManager format: "${input}"`);
16304
+ const name = input.slice(0, at);
16305
+ if (!PACKAGE_MANAGER_NAME_RE.test(name)) return invalid$1(input, `Invalid packageManager name: "${name}"`);
16306
+ const rest = input.slice(at + 1);
16307
+ const plus = rest.indexOf("+");
16308
+ const version = plus === -1 ? rest : rest.slice(0, plus);
16309
+ if (!SemVer.isPinnable(version)) return invalid$1(input, `Invalid packageManager version: "${version}"`);
16310
+ if (plus === -1) return effect.Effect.succeed(PackageManager.make({
16311
+ name,
16312
+ version,
16093
16313
  integrity: effect.Option.none()
16094
16314
  }));
16095
- const decoded = effect.Schema.decodeUnknownExit(CorepackIntegrity)(rawIntegrity);
16096
- if (effect.Exit.isFailure(decoded)) return effect.Effect.fail(new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message: `Invalid packageManager integrity: "${rawIntegrity}"` }));
16315
+ const rawIntegrity = rest.slice(plus + 1);
16316
+ const decoded = effect.Schema.decodeUnknownExit(CorepackIntegrityHash)(rawIntegrity);
16317
+ if (effect.Exit.isFailure(decoded)) return invalid$1(input, `Invalid packageManager integrity: "${rawIntegrity}"`);
16097
16318
  return effect.Effect.succeed(PackageManager.make({
16098
- name: match[1],
16099
- version: match[2],
16319
+ name,
16320
+ version,
16100
16321
  integrity: effect.Option.some(decoded.value)
16101
16322
  }));
16102
16323
  },
@@ -16111,7 +16332,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
16111
16332
  }
16112
16333
  };
16113
16334
  //#endregion
16114
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16335
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16115
16336
  /**
16116
16337
  * Indicates that a string could not be used as a valid npm package name.
16117
16338
  *
@@ -16169,7 +16390,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
16169
16390
  isScoped
16170
16391
  });
16171
16392
  //#endregion
16172
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16393
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16173
16394
  const parsePersonString = (input) => {
16174
16395
  const emailMatch = input.match(/<([^>]+)>/);
16175
16396
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -16315,7 +16536,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
16315
16536
  }
16316
16537
  };
16317
16538
  //#endregion
16318
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Repository.js
16539
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Repository.js
16319
16540
  /** The shorthand hosts npm resolves without a scheme. */
16320
16541
  const SHORTHAND_HOSTS = /* @__PURE__ */ new Map([
16321
16542
  ["github", "https://github.com"],
@@ -16490,7 +16711,7 @@ var Bugs = class Bugs extends effect.Schema.Class("Bugs")({
16490
16711
  })));
16491
16712
  };
16492
16713
  //#endregion
16493
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16714
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16494
16715
  const KEY_INDEX = new Map([
16495
16716
  "$schema",
16496
16717
  "name",
@@ -16713,7 +16934,7 @@ const renderJson = (raw, options) => {
16713
16934
  return options.newline ? `${json}\n` : json;
16714
16935
  };
16715
16936
  //#endregion
16716
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16937
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16717
16938
  const toHashMap = effect.SchemaTransformation.transform({
16718
16939
  decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
16719
16940
  encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
@@ -17024,11 +17245,12 @@ var Package = class Package extends effect.Schema.Class("Package")({
17024
17245
  * sorting and empty-map stripping unless the options opt out. Pure.
17025
17246
  */
17026
17247
  toJsonString(options) {
17027
- return renderJson(effect.Schema.encodeUnknownSync(Package.schema)(this), resolveFormatOptions(options));
17248
+ const raw = effect.Schema.encodeUnknownSync(Package.schema)(this);
17249
+ return renderJson(raw, resolveFormatOptions(options));
17028
17250
  }
17029
17251
  };
17030
17252
  //#endregion
17031
- //#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
17253
+ //#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
17032
17254
  const EMPTY$1 = Object.freeze(Object.create(null));
17033
17255
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
17034
17256
  /**
@@ -17626,7 +17848,7 @@ var Walker$1 = class {
17626
17848
  static findRoot = findRoot$1;
17627
17849
  };
17628
17850
  //#endregion
17629
- //#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
17851
+ //#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
17630
17852
  /**
17631
17853
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
17632
17854
  *
@@ -17813,7 +18035,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
17813
18035
  static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
17814
18036
  };
17815
18037
  //#endregion
17816
- //#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
18038
+ //#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
17817
18039
  /**
17818
18040
  * Hard ceiling on directories the enumerator will visit for one pattern set.
17819
18041
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -17831,7 +18053,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
17831
18053
  */
17832
18054
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
17833
18055
  //#endregion
17834
- //#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
18056
+ //#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
17835
18057
  /** Directory names never descended into. */
17836
18058
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
17837
18059
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -17921,7 +18143,7 @@ var Traversal = class {
17921
18143
  }
17922
18144
  };
17923
18145
  //#endregion
17924
- //#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
18146
+ //#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
17925
18147
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
17926
18148
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
17927
18149
  /**
@@ -17991,7 +18213,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
17991
18213
  return results;
17992
18214
  });
17993
18215
  //#endregion
17994
- //#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
18216
+ //#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
17995
18217
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
17996
18218
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
17997
18219
  const pnpmPatternsOf = (document) => {
@@ -18048,7 +18270,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
18048
18270
  return manifestPatternsOf(manifest);
18049
18271
  });
18050
18272
  //#endregion
18051
- //#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
18273
+ //#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
18052
18274
  /**
18053
18275
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
18054
18276
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -18249,12 +18471,13 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
18249
18471
  kind: failure.kind,
18250
18472
  cause: failure.cause
18251
18473
  })));
18252
- const directories = yield* enumerate(root, yield* GlobSet.compile(patterns).pipe(effect.Effect.mapError((error) => new WorkspacePatternError({
18474
+ const globs = yield* GlobSet.compile(patterns).pipe(effect.Effect.mapError((error) => new WorkspacePatternError({
18253
18475
  root,
18254
18476
  pattern: error.pattern,
18255
18477
  kind: "uncompilable",
18256
18478
  detail: error.message
18257
- }))), { maxDepth: options?.maxDepth ?? 32 }).pipe(effect.Effect.mapError((failure) => new WorkspacePatternError({
18479
+ })));
18480
+ const directories = yield* enumerate(root, globs, { maxDepth: options?.maxDepth ?? 32 }).pipe(effect.Effect.mapError((failure) => new WorkspacePatternError({
18258
18481
  root,
18259
18482
  pattern: failure.pattern,
18260
18483
  kind: patternKindOf(failure.kind),
@@ -18368,7 +18591,10 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
18368
18591
  * (a fabricated root path would leak into consumer path logic), so an
18369
18592
  * unstubbed `info()` call is a test-wiring mistake and fails loudly as a
18370
18593
  * defect rather than succeeding with a lie or failing with a dishonest
18371
- * typed error.
18594
+ * typed error. A defect is not absorbed by `Effect.catch` or any
18595
+ * typed-error handler — deliberately, so code under test with a
18596
+ * best-effort `catch` cannot make the mandatory stub look optional; the
18597
+ * unstubbed call still fails the test.
18372
18598
  *
18373
18599
  * @example
18374
18600
  * ```ts
@@ -18482,7 +18708,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
18482
18708
  };
18483
18709
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
18484
18710
  //#endregion
18485
- //#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
18711
+ //#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
18486
18712
  /**
18487
18713
  * Raised when the workspace dependency graph cannot be topologically ordered
18488
18714
  * because it contains a cycle.
@@ -18627,10 +18853,9 @@ packages: effect.Schema.Array(WorkspacePackage) }) {
18627
18853
  const { reverse } = this.#index();
18628
18854
  const affected = /* @__PURE__ */ new Set();
18629
18855
  const queue = [...names];
18630
- while (queue.length > 0) {
18631
- const current = queue.shift();
18632
- /* v8 ignore next */
18633
- if (current === void 0) break;
18856
+ for (let head = 0; head < queue.length; head += 1) {
18857
+ const current = queue[head];
18858
+ if (current === void 0) continue;
18634
18859
  if (affected.has(current)) continue;
18635
18860
  affected.add(current);
18636
18861
  for (const dependent of reverse.get(current) ?? []) if (!affected.has(dependent)) queue.push(dependent);
@@ -18661,10 +18886,9 @@ packages: effect.Schema.Array(WorkspacePackage) }) {
18661
18886
  }));
18662
18887
  const needed = /* @__PURE__ */ new Set();
18663
18888
  const queue = [...names];
18664
- while (queue.length > 0) {
18665
- const current = queue.shift();
18666
- /* v8 ignore next */
18667
- if (current === void 0) break;
18889
+ for (let head = 0; head < queue.length; head += 1) {
18890
+ const current = queue[head];
18891
+ if (current === void 0) continue;
18668
18892
  if (needed.has(current)) continue;
18669
18893
  needed.add(current);
18670
18894
  for (const dependency of forward.get(current) ?? []) if (!needed.has(dependency)) queue.push(dependency);
@@ -20126,7 +20350,7 @@ var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
20126
20350
  static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
20127
20351
  };
20128
20352
  //#endregion
20129
- //#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
20353
+ //#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
20130
20354
  /**
20131
20355
  * Which git refs to compare, and whether to fold in the working tree.
20132
20356
  *
@@ -20378,7 +20602,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
20378
20602
  };
20379
20603
  }
20380
20604
  //#endregion
20381
- //#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
20605
+ //#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
20382
20606
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
20383
20607
  const inlineCatalogs = (manifest) => {
20384
20608
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -20396,7 +20620,7 @@ const merge = (...sources) => mergeCatalogs(...sources);
20396
20620
  /** Whether `specifier` is a `catalog:` protocol reference, and which catalog it names. */
20397
20621
  const catalogNameOf = (specifier) => parseCatalogProtocol(specifier);
20398
20622
  /** Normalize the arbitrary shape of a catalog map into `CatalogEntries`, dropping anything unusable. */
20399
- const normalize$1 = (raw) => {
20623
+ const normalize$2 = (raw) => {
20400
20624
  if (raw === null || typeof raw !== "object") return {};
20401
20625
  const entries = {};
20402
20626
  for (const [catalogName, catalog] of Object.entries(raw)) {
@@ -20442,7 +20666,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
20442
20666
  });
20443
20667
  };
20444
20668
  //#endregion
20445
- //#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
20669
+ //#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
20446
20670
  /** Whether `value` is a non-null, non-array object. */
20447
20671
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
20448
20672
  /**
@@ -20523,7 +20747,7 @@ const configToEntries = (config) => {
20523
20747
  ...isObject$2(raw.default) ? raw.default : {},
20524
20748
  ...config.catalog
20525
20749
  };
20526
- return normalize$1(raw);
20750
+ return normalize$2(raw);
20527
20751
  };
20528
20752
  /** Locate the `updateConfig` hook across the CJS/ESM export shapes a `pnpmfile.cjs` can present. */
20529
20753
  const updateConfigOf = (mod) => {
@@ -20591,7 +20815,8 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
20591
20815
  let loaded;
20592
20816
  let found = false;
20593
20817
  for (const filename of ["pnpmfile.mjs", "pnpmfile.cjs"]) {
20594
- const candidateUrl = (0, node_url.pathToFileURL)((0, node_path.join)(root, "node_modules", ".pnpm-config", name, filename)).href;
20818
+ const candidatePath = (0, node_path.join)(root, "node_modules", ".pnpm-config", name, filename);
20819
+ const candidateUrl = (0, node_url.pathToFileURL)(candidatePath).href;
20595
20820
  const result = yield* effect.Effect.result(effect.Effect.tryPromise({
20596
20821
  try: () => import(candidateUrl),
20597
20822
  catch: (cause) => cause
@@ -20628,7 +20853,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
20628
20853
  }) });
20629
20854
  };
20630
20855
  //#endregion
20631
- //#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
20856
+ //#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
20632
20857
  /**
20633
20858
  * The four package managers this package understands.
20634
20859
  *
@@ -20918,6 +21143,11 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
20918
21143
  * reads as a legitimate "no manager here" answer, so a consumer would branch
20919
21144
  * on it and proceed, never learning that the test simply forgot to stub.
20920
21145
  *
21146
+ * The defect is also not absorbed by `Effect.catch` or any typed-error
21147
+ * handler — deliberately, so code under test with a best-effort `catch`
21148
+ * around detection cannot make the mandatory stub look optional; the
21149
+ * unstubbed call still fails the test.
21150
+ *
20921
21151
  * @param overrides - Members to supply; anything omitted dies on use.
20922
21152
  *
20923
21153
  * @example
@@ -20951,7 +21181,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
20951
21181
  static layerTest = (overrides = {}) => effect.Layer.succeed(PackageManagerDetector, PackageManagerDetector.makeTest(overrides));
20952
21182
  };
20953
21183
  //#endregion
20954
- //#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
21184
+ //#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
20955
21185
  /**
20956
21186
  * Raised when the workspace's lockfile cannot be read off disk.
20957
21187
  *
@@ -21131,7 +21361,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
21131
21361
  static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
21132
21362
  };
21133
21363
  //#endregion
21134
- //#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
21364
+ //#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
21135
21365
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
21136
21366
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
21137
21367
  /**
@@ -21268,8 +21498,15 @@ var PublishabilityDetector = class extends effect.Context.Service()("@effected/w
21268
21498
  * silence — `Layer.mergeAll(myDetector, Workspaces.layer())` resolved to the
21269
21499
  * default, because `mergeAll` is last-wins. For a service that decides
21270
21500
  * whether a package publishes and to which registry, that silent revert was
21271
- * the worst available failure. The requirement now sits in `R`, so the
21272
- * choice is made once, explicitly, and unmade wiring does not compile.
21501
+ * the worst available failure.
21502
+ *
21503
+ * The composites do not *require* a detector either — nothing inside them
21504
+ * asks a publishability question, so their `R` stays `FileSystem | Path`.
21505
+ * The requirement instead surfaces in the `R` of each operation that asks
21506
+ * (`VersioningStrategy.detect`, e.g.): a program that asks and never wires
21507
+ * a detector fails to compile where that operation's `R` must close — which
21508
+ * can be far from the layer-wiring site — and a program that never asks
21509
+ * never supplies a publish policy at all.
21273
21510
  */
21274
21511
  static layerNpm = effect.Layer.succeed(this, this.npm);
21275
21512
  /**
@@ -21283,7 +21520,7 @@ var PublishabilityDetector = class extends effect.Context.Service()("@effected/w
21283
21520
  static layerNone = effect.Layer.succeed(this, this.none);
21284
21521
  };
21285
21522
  //#endregion
21286
- //#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
21523
+ //#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
21287
21524
  /**
21288
21525
  * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
21289
21526
  *
@@ -21369,7 +21606,7 @@ const unanimousVersionOf = (index, dependency) => {
21369
21606
  return agreed;
21370
21607
  };
21371
21608
  //#endregion
21372
- //#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
21609
+ //#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
21373
21610
  /**
21374
21611
  * An immutable, fully-normalized catalog collection — the one catalog
21375
21612
  * resolution semantic in the package.
@@ -21392,7 +21629,7 @@ entries: effect.Schema.Record(effect.Schema.String, effect.Schema.Record(effect.
21392
21629
  }
21393
21630
  /** Wrap a pnpm `Catalogs` map, dropping unusable entries. */
21394
21631
  static fromCatalogs(catalogs) {
21395
- return CatalogSet.make({ entries: normalize$1(catalogs) });
21632
+ return CatalogSet.make({ entries: normalize$2(catalogs) });
21396
21633
  }
21397
21634
  /**
21398
21635
  * The `catalog:` and `catalogs:` blocks of a `pnpm-workspace.yaml` document.
@@ -21412,7 +21649,7 @@ entries: effect.Schema.Record(effect.Schema.String, effect.Schema.Record(effect.
21412
21649
  * range or a `{ specifier, version }` pair.
21413
21650
  */
21414
21651
  static fromLockfileCatalogs(raw) {
21415
- return CatalogSet.make({ entries: normalize$1(raw) });
21652
+ return CatalogSet.make({ entries: normalize$2(raw) });
21416
21653
  }
21417
21654
  /**
21418
21655
  * The catalog set a parsed lockfile records, PM-aware.
@@ -21878,7 +22115,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
21878
22115
  }));
21879
22116
  };
21880
22117
  //#endregion
21881
- //#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
22118
+ //#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
21882
22119
  const EMPTY = Object.freeze(Object.create(null));
21883
22120
  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)));
21884
22121
  /**
@@ -22101,7 +22338,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
22101
22338
  }
22102
22339
  };
22103
22340
  //#endregion
22104
- //#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
22341
+ //#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
22105
22342
  /** Whether `value` is a non-null, non-array object. */
22106
22343
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
22107
22344
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -22217,11 +22454,12 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
22217
22454
  let inline;
22218
22455
  let recorded;
22219
22456
  if (effect.Option.isSome(pnpmWorkspaceText)) {
22220
- const pnpmPatterns = pnpmPatternsOf(yield* Yaml.parse(pnpmWorkspaceText.value).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
22457
+ const document = yield* Yaml.parse(pnpmWorkspaceText.value).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
22221
22458
  source: "manifest",
22222
22459
  path: "pnpm-workspace.yaml",
22223
22460
  cause
22224
- }))));
22461
+ })));
22462
+ const pnpmPatterns = pnpmPatternsOf(document);
22225
22463
  patterns = pnpmPatterns.length > 0 ? pnpmPatterns : manifestPatternsOf(rootManifest);
22226
22464
  inline = yield* CatalogSet.fromWorkspaceYaml(pnpmWorkspaceText.value);
22227
22465
  recorded = yield* lockfileRecord(root, ref, "pnpm");
@@ -22265,7 +22503,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
22265
22503
  return {
22266
22504
  at: effect.Effect.fn("WorkspaceSnapshots.at")(function* (ref) {
22267
22505
  const root = yield* effect.Effect.suspend(() => roots.find(options?.cwd ?? process.cwd()));
22268
- const key = `${root}${ref}`;
22506
+ const key = `${root}\0${ref}`;
22269
22507
  let memo = atCaches.get(key);
22270
22508
  if (memo === void 0) {
22271
22509
  const [resolveOnce, invalidate] = yield* effect.Effect.cachedInvalidateWithTTL(computeAt(root, ref), effect.Duration.infinity);
@@ -22323,6 +22561,13 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
22323
22561
  * test-wiring mistake fails loudly as a defect rather than succeeding with a
22324
22562
  * lie.
22325
22563
  *
22564
+ * **A defect is not absorbed by `Effect.catch` or any typed-error handler**,
22565
+ * and that is the point: code under test with a best-effort `catch` around
22566
+ * its snapshot reads cannot make a mandatory stub look optional — the
22567
+ * unstubbed call still fails the test instead of quietly taking the catch
22568
+ * branch. Only defect-level combinators (`Effect.catchDefect`,
22569
+ * `Effect.exit`) would see it.
22570
+ *
22326
22571
  * @example
22327
22572
  * ```ts
22328
22573
  * import { CatalogSet, WorkspaceSnapshots, WorkspaceStateSnapshot } from "@effected/workspaces";
@@ -22370,7 +22615,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
22370
22615
  static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
22371
22616
  };
22372
22617
  //#endregion
22373
- //#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
22618
+ //#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
22374
22619
  const compose = (options, catalogsFactory) => {
22375
22620
  const roots = WorkspaceRoot.layer;
22376
22621
  const detector = PackageManagerDetector.layer;
@@ -22403,11 +22648,12 @@ const localExecLayer = (options) => effect.Layer.effect(LocalExec, effect.Effect
22403
22648
  cause
22404
22649
  })));
22405
22650
  if (effect.Option.isNone(detected)) return effect.Option.none();
22406
- const { prefix, dlxPrefix } = LocalExec.prefixes(detected.value.name);
22651
+ const { prefix, dlxPrefix, scriptPrefix } = LocalExec.prefixes(detected.value.name);
22407
22652
  return effect.Option.some(ExecContext.make({
22408
22653
  label: detected.value.name,
22409
22654
  prefix,
22410
22655
  dlxPrefix,
22656
+ scriptPrefix,
22411
22657
  directory: root.value
22412
22658
  }));
22413
22659
  }) };
@@ -22421,13 +22667,23 @@ var Workspaces = class {
22421
22667
  constructor() {}
22422
22668
  /**
22423
22669
  * Every service that needs only a filesystem: root, package-manager
22424
- * detection, discovery, lockfile reading, catalogs and publishability.
22670
+ * detection, discovery, lockfile reading and catalogs.
22425
22671
  *
22426
22672
  * @remarks
22427
22673
  * Requires core `FileSystem` and `Path`, which the consumer provides at the
22428
22674
  * edge (`@effect/platform-node`, `@effect/platform-bun`, or a test's
22429
22675
  * `FileSystem.layerNoop`).
22430
22676
  *
22677
+ * **`PublishabilityDetector` is neither provided nor required here.** The
22678
+ * composite used to bake in npm semantics, which a naively-ordered override
22679
+ * silently lost to; now it supplies no default, and — because nothing inside
22680
+ * the composite asks a publishability question — it does not require one in
22681
+ * `R` either. The requirement surfaces in the `R` of each operation that
22682
+ * asks (`VersioningStrategy.detect`, e.g.), so a program that asks and never
22683
+ * wires a detector fails to compile at that operation, and a program that
22684
+ * never asks never supplies a publish policy. Wire one explicitly where
22685
+ * needed: `Layer.mergeAll(Workspaces.layer(), PublishabilityDetector.layerNpm)`.
22686
+ *
22431
22687
  * **Bind the result to a `const`.** This is a parameterized factory and
22432
22688
  * layers memoize by reference, so calling it twice builds everything twice.
22433
22689
  *
@@ -22483,7 +22739,8 @@ var Workspaces = class {
22483
22739
  * it. So `commands` declares the narrow contract and we ship the layer.
22484
22740
  *
22485
22741
  * **The argv knowledge is not duplicated.** `LocalExec.prefixes(name)` is
22486
- * the one home of the four managers' `exec`/`dlx` prefixes; this layer
22742
+ * the one home of the four managers' `exec`/`dlx`/script-runner prefixes;
22743
+ * this layer
22487
22744
  * detects *which* manager owns the directory and asks `commands` what that
22488
22745
  * manager's argv looks like. Neither package reimplements the other's
22489
22746
  * half.
@@ -22652,7 +22909,7 @@ const provenanceForRegistry = (registry) => {
22652
22909
  * @since 0.4.0
22653
22910
  * @public
22654
22911
  */
22655
- var SilkPublishability = class {
22912
+ var SilkPublishability = class SilkPublishability {
22656
22913
  /**
22657
22914
  * Apply silk publishability rules to a raw `package.json` and the bundler's resolved
22658
22915
  * target binding. Targets-first precedence:
@@ -22784,6 +23041,56 @@ var SilkPublishability = class {
22784
23041
  return out;
22785
23042
  });
22786
23043
  }
23044
+ /**
23045
+ * Override of `@effected/workspaces`' `PublishabilityDetector` Tag with pure silk rules.
23046
+ *
23047
+ * @remarks Requires `FileSystem` (captured at layer build); `detect` reads the raw
23048
+ * `package.json` from `pkg.packageJsonPath` and applies `SilkPublishability.detect`.
23049
+ *
23050
+ * @since 0.4.0
23051
+ * @public
23052
+ */
23053
+ static layer = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
23054
+ const fs = yield* effect.FileSystem.FileSystem;
23055
+ return { detect: (pkg) => effect.Effect.gen(function* () {
23056
+ const raw = yield* readRaw(fs, pkg.packageJsonPath);
23057
+ if (!raw) return [];
23058
+ const binding = yield* readTargetsBinding(fs, pkg.path);
23059
+ return SilkPublishability.detect(pkg.name, raw, binding);
23060
+ }) };
23061
+ }));
23062
+ /**
23063
+ * Ignore-aware override of `PublishabilityDetector`. `detect` short-circuits to `[]`
23064
+ * for changeset-ignored packages, then dispatches on `ChangesetConfig.mode`:
23065
+ * `none` → `[]`; `silk` → `SilkPublishability.detect`; `vanilla` → the library default.
23066
+ *
23067
+ * @remarks Requires `FileSystem` and {@link ChangesetConfig} at build.
23068
+ * The kit's `detect` contract no longer receives the workspace root, so the changeset
23069
+ * lookups read it from `pkg.workspaceRoot` — the discovery root the package was found
23070
+ * against, never a filesystem marker walk, which could escape an unmarked root and read
23071
+ * the wrong `.changeset/config.json`.
23072
+ *
23073
+ * @since 0.4.0
23074
+ * @public
23075
+ */
23076
+ static layerAdaptive = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
23077
+ const fs = yield* effect.FileSystem.FileSystem;
23078
+ const config = yield* ChangesetConfig;
23079
+ const vanilla = PublishabilityDetector.npm;
23080
+ return { detect: (pkg) => effect.Effect.gen(function* () {
23081
+ const root = pkg.workspaceRoot;
23082
+ if (yield* config.isIgnored(pkg.name, root)) return [];
23083
+ const mode = yield* config.mode(root);
23084
+ if (mode === "none") return [];
23085
+ if (mode === "silk") {
23086
+ const raw = yield* readRaw(fs, pkg.packageJsonPath);
23087
+ if (!raw) return [];
23088
+ const binding = yield* readTargetsBinding(fs, pkg.path);
23089
+ return SilkPublishability.detect(pkg.name, raw, binding);
23090
+ }
23091
+ return yield* vanilla.detect(pkg);
23092
+ }) };
23093
+ }));
22787
23094
  };
22788
23095
  /**
22789
23096
  * Reduce a directory to a comparable package-relative POSIX path: backslashes to
@@ -22800,7 +23107,8 @@ var SilkPublishability = class {
22800
23107
  */
22801
23108
  const normalizeDir = (dir) => {
22802
23109
  const slashed = dir.replaceAll("\\", "/");
22803
- const normalized = trimTrailingSlashes(slashed.startsWith("./") ? slashed.slice(2) : slashed);
23110
+ const withoutPrefix = slashed.startsWith("./") ? slashed.slice(2) : slashed;
23111
+ const normalized = trimTrailingSlashes(withoutPrefix);
22804
23112
  return normalized === "" ? "." : normalized;
22805
23113
  };
22806
23114
  /** True when a built target directory's package.json is `private: true`. Missing/unreadable/malformed → false. */
@@ -22830,47 +23138,6 @@ const readTargetsBinding = (fs, pkgPath) => fs.readFileString((0, node_path.join
22830
23138
  try: () => JSON.parse(content),
22831
23139
  catch: () => /* @__PURE__ */ new Error("invalid targets.json")
22832
23140
  })), effect.Effect.orElseSucceed(() => null));
22833
- effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
22834
- const fs = yield* effect.FileSystem.FileSystem;
22835
- return { detect: (pkg) => effect.Effect.gen(function* () {
22836
- const raw = yield* readRaw(fs, pkg.packageJsonPath);
22837
- if (!raw) return [];
22838
- const binding = yield* readTargetsBinding(fs, pkg.path);
22839
- return SilkPublishability.detect(pkg.name, raw, binding);
22840
- }) };
22841
- }));
22842
- /**
22843
- * Ignore-aware override of `PublishabilityDetector`. `detect` short-circuits to `[]`
22844
- * for changeset-ignored packages, then dispatches on `ChangesetConfig.mode`:
22845
- * `none` → `[]`; `silk` → `SilkPublishability.detect`; `vanilla` → the library default.
22846
- *
22847
- * @remarks Requires `FileSystem` and {@link ChangesetConfig} at build.
22848
- * The kit's `detect` contract no longer receives the workspace root, so the changeset
22849
- * lookups read it from `pkg.workspaceRoot` — the discovery root the package was found
22850
- * against, never a filesystem marker walk, which could escape an unmarked root and read
22851
- * the wrong `.changeset/config.json`.
22852
- *
22853
- * @since 0.4.0
22854
- * @public
22855
- */
22856
- const PublishabilityDetectorAdaptiveLive = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
22857
- const fs = yield* effect.FileSystem.FileSystem;
22858
- const config = yield* ChangesetConfig;
22859
- const vanilla = PublishabilityDetector.npm;
22860
- return { detect: (pkg) => effect.Effect.gen(function* () {
22861
- const root = pkg.workspaceRoot;
22862
- if (yield* config.isIgnored(pkg.name, root)) return [];
22863
- const mode = yield* config.mode(root);
22864
- if (mode === "none") return [];
22865
- if (mode === "silk") {
22866
- const raw = yield* readRaw(fs, pkg.packageJsonPath);
22867
- if (!raw) return [];
22868
- const binding = yield* readTargetsBinding(fs, pkg.path);
22869
- return SilkPublishability.detect(pkg.name, raw, binding);
22870
- }
22871
- return yield* vanilla.detect(pkg);
22872
- }) };
22873
- }));
22874
23141
  //#endregion
22875
23142
  //#region ../silk-effects/dist/dev/pkg/_virtual/_rolldown/runtime.js
22876
23143
  var __defProp = Object.defineProperty;
@@ -24683,21 +24950,20 @@ function getGitHubInfo(params) {
24683
24950
  /**
24684
24951
  * GitHub service for fetching commit metadata.
24685
24952
  *
24686
- * Defines the {@link GitHubService} Effect service tag, the
24687
- * {@link GitHubLive | production layer} backed by `\@changesets/get-github-info`,
24953
+ * Defines the {@link GitHubService} Effect service tag, its
24954
+ * `GitHubService.layer` production layer backed by `\@changesets/get-github-info`,
24688
24955
  * and the {@link makeGitHubTest} helper for constructing deterministic test
24689
24956
  * layers.
24690
24957
  *
24691
24958
  * @remarks
24692
24959
  * The GitHub service is consumed by the changelog formatters to resolve
24693
24960
  * commit hashes into pull-request numbers, author usernames, and link URLs.
24694
- * In production, {@link GitHubLive} calls the GitHub REST API via the
24961
+ * In production, `GitHubService.layer` calls the GitHub REST API via the
24695
24962
  * vendored `getGitHubInfo` wrapper. In tests, {@link makeGitHubTest}
24696
24963
  * returns canned responses from a `Map` keyed by commit hash.
24697
24964
  *
24698
24965
  * @see {@link GitHubService} for the Effect service tag
24699
24966
  * @see {@link GitHubServiceShape} for the service interface
24700
- * @see {@link GitHubLive} for the production layer
24701
24967
  * @see {@link makeGitHubTest} for constructing test layers
24702
24968
  */
24703
24969
  /**
@@ -24711,13 +24977,13 @@ function getGitHubInfo(params) {
24711
24977
  * This tag follows the standard Effect `Context.Service` pattern. Two layers
24712
24978
  * are provided out of the box:
24713
24979
  *
24714
- * - {@link GitHubLive} — production layer backed by the GitHub REST API
24980
+ * - `GitHubService.layer` — production layer backed by the GitHub REST API
24715
24981
  * - {@link makeGitHubTest} — factory for deterministic test layers
24716
24982
  *
24717
24983
  * @example
24718
24984
  * ```typescript
24719
- * import { Effect, Layer } from "effect";
24720
- * import { GitHubService, GitHubLive } from "\@savvy-web/changesets";
24985
+ * import { Effect } from "effect";
24986
+ * import { GitHubService } from "\@savvy-web/changesets";
24721
24987
  *
24722
24988
  * const program = Effect.gen(function* () {
24723
24989
  * const github = yield* GitHubService;
@@ -24729,7 +24995,7 @@ function getGitHubInfo(params) {
24729
24995
  * });
24730
24996
  *
24731
24997
  * // Provide the live layer and run
24732
- * Effect.runPromise(program.pipe(Effect.provide(GitHubLive)));
24998
+ * Effect.runPromise(program.pipe(Effect.provide(GitHubService.layer)));
24733
24999
  * ```
24734
25000
  *
24735
25001
  * @example Creating a test layer with canned responses
@@ -24753,41 +25019,41 @@ function getGitHubInfo(params) {
24753
25019
  * ```
24754
25020
  *
24755
25021
  * @see {@link GitHubServiceShape} for the service interface
24756
- * @see {@link GitHubLive} for the production layer
24757
25022
  * @see {@link makeGitHubTest} for creating test layers
24758
25023
  *
24759
25024
  * @public
24760
25025
  */
24761
- var GitHubService = class extends effect.Context.Service()("GitHubService") {};
24762
- /**
24763
- * Production layer for {@link GitHubService}.
24764
- *
24765
- * Delegates to `\@changesets/get-github-info` to fetch commit metadata
24766
- * from the GitHub REST API. Requires a `GITHUB_TOKEN` environment variable
24767
- * to be set for authenticated requests.
24768
- *
24769
- * @remarks
24770
- * This layer is used by the `\@savvy-web/changesets/changelog` entry point
24771
- * to resolve commit hashes into PR numbers and author attribution. It is
24772
- * used by the changelog formatter's
24773
- * `MainLayer`.
24774
- *
24775
- * @example
24776
- * ```typescript
24777
- * import { Effect } from "effect";
24778
- * import { GitHubService, GitHubLive } from "\@savvy-web/changesets";
24779
- *
24780
- * const program = Effect.gen(function* () {
24781
- * const github = yield* GitHubService;
24782
- * return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" });
24783
- * });
24784
- *
24785
- * Effect.runPromise(program.pipe(Effect.provide(GitHubLive)));
24786
- * ```
24787
- *
24788
- * @public
24789
- */
24790
- const GitHubLive = effect.Layer.succeed(GitHubService, { getInfo: getGitHubInfo });
25026
+ var GitHubService = class extends effect.Context.Service()("GitHubService") {
25027
+ /**
25028
+ * Production layer for {@link GitHubService}.
25029
+ *
25030
+ * Delegates to `\@changesets/get-github-info` to fetch commit metadata
25031
+ * from the GitHub REST API. Requires a `GITHUB_TOKEN` environment variable
25032
+ * to be set for authenticated requests.
25033
+ *
25034
+ * @remarks
25035
+ * This layer is used by the `\@savvy-web/changesets/changelog` entry point
25036
+ * to resolve commit hashes into PR numbers and author attribution. It is
25037
+ * used by the changelog formatter's
25038
+ * `MainLayer`.
25039
+ *
25040
+ * @example
25041
+ * ```typescript
25042
+ * import { Effect } from "effect";
25043
+ * import { GitHubService } from "\@savvy-web/changesets";
25044
+ *
25045
+ * const program = Effect.gen(function* () {
25046
+ * const github = yield* GitHubService;
25047
+ * return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" });
25048
+ * });
25049
+ *
25050
+ * Effect.runPromise(program.pipe(Effect.provide(GitHubService.layer)));
25051
+ * ```
25052
+ *
25053
+ * @public
25054
+ */
25055
+ static layer = effect.Layer.succeed(this, { getInfo: getGitHubInfo });
25056
+ };
24791
25057
  /**
24792
25058
  * Create a test layer for {@link GitHubService} with pre-configured responses.
24793
25059
  *
@@ -35179,7 +35445,9 @@ function factoryLabel(effects, ok, nok, type, markerType, stringType) {
35179
35445
  * @type {State}
35180
35446
  */
35181
35447
  function atBreak(code) {
35182
- if (size > 999 || code === null || code === 91 || code === 93 && !seen || code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
35448
+ if (size > 999 || code === null || code === 91 || code === 93 && !seen ||
35449
+ /* c8 ignore next 3 */
35450
+ code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
35183
35451
  if (code === 93) {
35184
35452
  effects.exit(stringType);
35185
35453
  effects.enter(markerType);
@@ -45203,6 +45471,22 @@ function inferDependencyType(dep) {
45203
45471
  return "dependency";
45204
45472
  }
45205
45473
  /**
45474
+ * Narrow a dependency update to one with both version endpoints present.
45475
+ *
45476
+ * `@changesets/types` only guarantees `oldVersion`/`newVersion` on the
45477
+ * `major`/`minor`/`patch` arms of `ComprehensiveRelease`; a `type: "none"`
45478
+ * entry may carry neither. The table's `From`/`To` columns are validated
45479
+ * version strings, so an entry missing either endpoint has no row to render.
45480
+ *
45481
+ * @param dep - The dependency update to test
45482
+ * @returns `true` when both `oldVersion` and `newVersion` are present
45483
+ *
45484
+ * @internal
45485
+ */
45486
+ function isVersioned(dep) {
45487
+ return dep.oldVersion !== void 0 && dep.newVersion !== void 0;
45488
+ }
45489
+ /**
45206
45490
  * Format dependency release lines as a structured markdown table.
45207
45491
  *
45208
45492
  * This is the core Effect program that implements the `getDependencyReleaseLine`
@@ -45213,8 +45497,9 @@ function inferDependencyType(dep) {
45213
45497
  * The function maps each `ModCompWithPackage` entry to a `DependencyTableRow`,
45214
45498
  * inferring the dependency type from the consuming package's `package.json`,
45215
45499
  * then delegates to `serializeDependencyTableToMarkdown` for GFM table
45216
- * rendering, prefixed with a `### Dependencies` heading. Returns an empty
45217
- * string when no dependencies were updated.
45500
+ * rendering, prefixed with a `### Dependencies` heading. Entries missing
45501
+ * either version endpoint are dropped by {@link isVersioned}; the function
45502
+ * returns an empty string when no rows survive.
45218
45503
  *
45219
45504
  * The `_changesets` and `_options` parameters are part of the Changesets API
45220
45505
  * contract but are not used in the table format. They are retained for
@@ -45223,19 +45508,21 @@ function inferDependencyType(dep) {
45223
45508
  * @param _changesets - Changesets that caused the dependency updates (unused in table format)
45224
45509
  * @param dependenciesUpdated - The list of dependencies that were updated, including old/new versions
45225
45510
  * @param _options - Validated configuration options (unused in table format)
45226
- * @returns An `Effect` that resolves to a `### Dependencies` heading followed by a formatted markdown table string, or empty string if no dependencies were updated
45511
+ * @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
45227
45512
  */
45228
45513
  function getDependencyReleaseLine(_changesets, dependenciesUpdated, _options) {
45229
45514
  return effect.Effect.gen(function* () {
45230
45515
  if (dependenciesUpdated.length === 0) return "";
45231
45516
  yield* GitHubService;
45232
- return `### Dependencies\n\n${serializeDependencyTableToMarkdown(dependenciesUpdated.map((dep) => ({
45517
+ const rows = dependenciesUpdated.filter(isVersioned).map((dep) => ({
45233
45518
  dependency: dep.name,
45234
45519
  type: inferDependencyType(dep),
45235
45520
  action: "updated",
45236
45521
  from: dep.oldVersion,
45237
45522
  to: dep.newVersion
45238
- })))}`;
45523
+ }));
45524
+ if (rows.length === 0) return "";
45525
+ return `### Dependencies\n\n${serializeDependencyTableToMarkdown(rows)}`;
45239
45526
  });
45240
45527
  }
45241
45528
  //#endregion
@@ -45739,7 +46026,7 @@ function getReleaseLine(changeset, versionType, options) {
45739
46026
  * @remarks
45740
46027
  * The module composes two Effect programs — {@link getReleaseLine} and
45741
46028
  * {@link getDependencyReleaseLine} — and runs each through
45742
- * `Effect.runPromise` with {@link GitHubLive} (for commit metadata). Options are
46029
+ * `Effect.runPromise` with `GitHubService.layer` (for commit metadata). Options are
45743
46030
  * validated at the boundary via `validateChangesetOptions` before being
45744
46031
  * passed to the formatters.
45745
46032
  *
@@ -45781,14 +46068,14 @@ function getReleaseLine(changeset, versionType, options) {
45781
46068
  /**
45782
46069
  * The layer providing every service the formatters need.
45783
46070
  *
45784
- * {@link GitHubLive} satisfies the requirements of both `getReleaseLine` and
46071
+ * `GitHubService.layer` satisfies the requirements of both `getReleaseLine` and
45785
46072
  * `getDependencyReleaseLine`, which each need only `GitHubService`. Markdown
45786
46073
  * parsing is not a layer: the formatters call the remark pipeline's
45787
46074
  * `parseMarkdown` / `stringifyMarkdown` functions directly.
45788
46075
  *
45789
46076
  * @internal
45790
46077
  */
45791
- const MainLayer = GitHubLive;
46078
+ const MainLayer = GitHubService.layer;
45792
46079
  /**
45793
46080
  * Changesets API `ChangelogFunctions` implementation.
45794
46081
  *
@@ -47251,7 +47538,8 @@ var ChangelogTransformer = class ChangelogTransformer {
47251
47538
  */
47252
47539
  static transformFile(filePath, options) {
47253
47540
  const content = (0, node_fs.readFileSync)(filePath, "utf-8");
47254
- (0, node_fs.writeFileSync)(filePath, ChangelogTransformer.transformContent(content, options), "utf-8");
47541
+ const result = ChangelogTransformer.transformContent(content, options);
47542
+ (0, node_fs.writeFileSync)(filePath, result, "utf-8");
47255
47543
  }
47256
47544
  };
47257
47545
  //#endregion
@@ -47286,7 +47574,6 @@ var ChangelogTransformer = class ChangelogTransformer {
47286
47574
  * {@link ConfigInspectorShape.classify} calls reuse it.
47287
47575
  *
47288
47576
  * @see {@link ConfigInspector} for the Effect service tag
47289
- * @see {@link ConfigInspectorLive} for the production layer
47290
47577
  *
47291
47578
  */
47292
47579
  /** A `versionFiles` entry expanded to its absolute target paths. @public */
@@ -47340,7 +47627,7 @@ const ClassificationSchema = effect.Schema.Struct({
47340
47627
  * @example
47341
47628
  * ```typescript
47342
47629
  * import { Effect } from "effect";
47343
- * import { ConfigInspector, ConfigInspectorLive } from "@savvy-web/changesets";
47630
+ * import { ConfigInspector } from "@savvy-web/changesets";
47344
47631
  *
47345
47632
  * const program = Effect.gen(function* () {
47346
47633
  * const inspector = yield* ConfigInspector;
@@ -47348,12 +47635,24 @@ const ClassificationSchema = effect.Schema.Struct({
47348
47635
  * return config.packages.map((p) => p.name);
47349
47636
  * });
47350
47637
  *
47351
- * Effect.runPromise(program.pipe(Effect.provide(ConfigInspectorLive)));
47638
+ * Effect.runPromise(program.pipe(Effect.provide(ConfigInspector.layer)));
47352
47639
  * ```
47353
47640
  *
47354
47641
  * @public
47355
47642
  */
47356
- var ConfigInspector = class extends effect.Context.Service()("ConfigInspector") {};
47643
+ var ConfigInspector = class extends effect.Context.Service()("ConfigInspector") {
47644
+ /**
47645
+ * Production layer for {@link ConfigInspector}.
47646
+ *
47647
+ * Requires {@link ChangesetConfigReader} and `WorkspaceDiscovery`
47648
+ * in the environment.
47649
+ *
47650
+ * @public
47651
+ */
47652
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
47653
+ return makeShape$3(yield* ChangesetConfigReader, yield* WorkspaceDiscovery, yield* effect.FileSystem.FileSystem);
47654
+ }));
47655
+ };
47357
47656
  /**
47358
47657
  * Pull the changelog formatter ID and its options object out of the raw
47359
47658
  * `.changeset/config.json` shape (where `changelog` may be a tuple, a string,
@@ -47747,22 +48046,11 @@ function classifyOne(inspected, path) {
47747
48046
  };
47748
48047
  }
47749
48048
  /**
47750
- * Live layer for {@link ConfigInspector}.
47751
- *
47752
- * Requires {@link ChangesetConfigReader} and `WorkspaceDiscovery`
47753
- * in the environment.
47754
- *
47755
- * @public
47756
- */
47757
- const ConfigInspectorLive = effect.Layer.effect(ConfigInspector, effect.Effect.gen(function* () {
47758
- return makeShape$3(yield* ChangesetConfigReader, yield* WorkspaceDiscovery, yield* effect.FileSystem.FileSystem);
47759
- }));
47760
- /**
47761
48049
  * Test factory — build a {@link ConfigInspector} that returns a fixed
47762
48050
  * {@link InspectedConfig} without touching the filesystem.
47763
48051
  *
47764
48052
  * Tests that need to exercise the inspect/classify logic against real files
47765
- * should compose `ConfigInspectorLive` with test layers for
48053
+ * should compose `ConfigInspector.layer` with test layers for
47766
48054
  * `ChangesetConfigReader` and `WorkspaceDiscovery` instead.
47767
48055
  *
47768
48056
  * @public
@@ -47808,7 +48096,7 @@ const BranchAnalysisSchema = effect.Schema.Struct({
47808
48096
  * @example
47809
48097
  * ```typescript
47810
48098
  * import { Effect } from "effect";
47811
- * import { BranchAnalyzer, BranchAnalyzerLive, ConfigInspectorLive } from "@savvy-web/changesets";
48099
+ * import { BranchAnalyzer, ConfigInspector } from "@savvy-web/changesets";
47812
48100
  *
47813
48101
  * const program = Effect.gen(function* () {
47814
48102
  * const analyzer = yield* BranchAnalyzer;
@@ -47818,16 +48106,30 @@ const BranchAnalysisSchema = effect.Schema.Struct({
47818
48106
  *
47819
48107
  * Effect.runPromise(
47820
48108
  * program.pipe(
47821
- * Effect.provide(BranchAnalyzerLive),
47822
- * Effect.provide(ConfigInspectorLive),
47823
- * // ... + ChangesetConfigReaderLive + kit workspace layers + NodeServices.layer
48109
+ * Effect.provide(BranchAnalyzer.layer),
48110
+ * Effect.provide(ConfigInspector.layer),
48111
+ * // ... + ChangesetConfigReader.layer + kit workspace layers + NodeServices.layer
47824
48112
  * ),
47825
48113
  * );
47826
48114
  * ```
47827
48115
  *
47828
48116
  * @public
47829
48117
  */
47830
- var BranchAnalyzer = class extends effect.Context.Service()("BranchAnalyzer") {};
48118
+ var BranchAnalyzer = class extends effect.Context.Service()("BranchAnalyzer") {
48119
+ /**
48120
+ * Production layer for {@link BranchAnalyzer}.
48121
+ *
48122
+ * Requires {@link ConfigInspector} (which in turn requires
48123
+ * `ChangesetConfigReader` and `WorkspaceDiscovery`) and a
48124
+ * `ChildProcessSpawner` (satisfied by `NodeServices.layer`) for the
48125
+ * internally-composed `@effected/git` layer.
48126
+ *
48127
+ * @public
48128
+ */
48129
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
48130
+ return makeShape$2(yield* ConfigInspector, yield* Git);
48131
+ })).pipe(effect.Layer.provide(Git.layer));
48132
+ };
47831
48133
  /**
47832
48134
  * Fold a `@effected/git` typed failure into this package's {@link GitError},
47833
48135
  * preserving the public `ConfigurationError | GitError` error channel.
@@ -47911,19 +48213,6 @@ function makeShape$2(inspector, git) {
47911
48213
  return { analyzeBranch };
47912
48214
  }
47913
48215
  /**
47914
- * Live layer for {@link BranchAnalyzer}.
47915
- *
47916
- * Requires {@link ConfigInspector} (which in turn requires
47917
- * `ChangesetConfigReader` and `WorkspaceDiscovery`) and a
47918
- * `ChildProcessSpawner` (satisfied by `NodeServices.layer`) for the
47919
- * internally-composed `@effected/git` layer.
47920
- *
47921
- * @public
47922
- */
47923
- const BranchAnalyzerLive = effect.Layer.effect(BranchAnalyzer, effect.Effect.gen(function* () {
47924
- return makeShape$2(yield* ConfigInspector, yield* Git);
47925
- })).pipe(effect.Layer.provide(Git.layer));
47926
- /**
47927
48216
  * Test factory — build a {@link BranchAnalyzer} that returns a fixed
47928
48217
  * {@link BranchAnalysis} for any input.
47929
48218
  *
@@ -47951,7 +48240,7 @@ function makeBranchAnalyzerTest(fixed) {
47951
48240
  * ```typescript
47952
48241
  * import { Effect } from "effect";
47953
48242
  * import type { ChangesetOptions } from "\@savvy-web/changesets";
47954
- * import { ChangelogService, GitHubLive } from "\@savvy-web/changesets";
48243
+ * import { ChangelogService } from "\@savvy-web/changesets";
47955
48244
  *
47956
48245
  * const program = Effect.gen(function* () {
47957
48246
  * const changelog = yield* ChangelogService;
@@ -48145,10 +48434,10 @@ function gitListChangesetFilesAtRef(cwd, ref) {
48145
48434
  *
48146
48435
  * @remarks
48147
48436
  * Uses the currently-active {@link SilkPublishability} — wire the
48148
- * {@link SilkPublishabilityDetectorLive} layer to get silk semantics.
48437
+ * `SilkPublishability.layer` layer to get silk semantics.
48149
48438
  *
48150
48439
  * The kit's `PublishabilityDetector.detect` contract no longer receives the
48151
- * workspace root — the ignore/mode-aware `PublishabilityDetectorAdaptiveLive`
48440
+ * workspace root — the ignore/mode-aware `SilkPublishability.layerAdaptive`
48152
48441
  * derives the `.changeset/config.json` root per package from the package's
48153
48442
  * own discovery coordinates (`pkg.path` ascended by `pkg.relativePath`).
48154
48443
  * The `root` parameter is retained for signature stability
@@ -48202,7 +48491,6 @@ function listPublishablePackageNames(packages, _root) {
48202
48491
  * and MCP tools are thin adapters over this service.
48203
48492
  *
48204
48493
  * @see {@link DepsRegen} for the service tag
48205
- * @see {@link DepsRegenLive} for the production layer
48206
48494
  *
48207
48495
  */
48208
48496
  const ADJECTIVES = [
@@ -48401,7 +48689,30 @@ function renderChangesetContent(diff) {
48401
48689
  *
48402
48690
  * @public
48403
48691
  */
48404
- var DepsRegen = class extends effect.Context.Service()("Changesets/DepsRegen") {};
48692
+ var DepsRegen = class extends effect.Context.Service()("Changesets/DepsRegen") {
48693
+ /**
48694
+ * Production layer for {@link DepsRegen}.
48695
+ *
48696
+ * Requires `WorkspaceSnapshots`, `WorkspaceDiscovery`,
48697
+ * `PublishabilityDetector` (all from `@effected/workspaces`),
48698
+ * `Git` (from `@effected/git`, backing merge-base resolution),
48699
+ * {@link ConfigInspector}, {@link ChangesetConfig}, and
48700
+ * `FileSystem.FileSystem` (resolved once at construction and closed over by
48701
+ * the shape, keeping `plan`/`execute` themselves requirement-free).
48702
+ *
48703
+ * @public
48704
+ */
48705
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
48706
+ const snapshots = yield* WorkspaceSnapshots;
48707
+ const inspector = yield* ConfigInspector;
48708
+ const discovery = yield* WorkspaceDiscovery;
48709
+ const detector = yield* PublishabilityDetector;
48710
+ const config = yield* ChangesetConfig;
48711
+ const fs = yield* effect.FileSystem.FileSystem;
48712
+ const git = yield* Git;
48713
+ return makeShape$1(snapshots, inspector, discovery, detector, config, fs, effect.Layer.succeed(Git, git));
48714
+ }));
48715
+ };
48405
48716
  /**
48406
48717
  * Build a {@link DepsRegenShape} that closes over already-resolved service
48407
48718
  * implementations, keeping the public `plan`/`execute` signatures
@@ -48494,29 +48805,7 @@ function makeShape$1(snapshots, inspector, discovery, detector, config, fs, prov
48494
48805
  execute
48495
48806
  };
48496
48807
  }
48497
- /**
48498
- * Live layer for {@link DepsRegen}.
48499
- *
48500
- * Requires `WorkspaceSnapshots`, `WorkspaceDiscovery`,
48501
- * `PublishabilityDetector` (all from `@effected/workspaces`),
48502
- * `Git` (from `@effected/git`, backing merge-base resolution),
48503
- * {@link ConfigInspector}, {@link ChangesetConfig}, and
48504
- * `FileSystem.FileSystem` (resolved once at construction and closed over by
48505
- * the shape, keeping `plan`/`execute` themselves requirement-free).
48506
- *
48507
- * @public
48508
- */
48509
- const DepsRegenLive = effect.Layer.effect(DepsRegen, effect.Effect.gen(function* () {
48510
- const snapshots = yield* WorkspaceSnapshots;
48511
- const inspector = yield* ConfigInspector;
48512
- const discovery = yield* WorkspaceDiscovery;
48513
- const detector = yield* PublishabilityDetector;
48514
- const config = yield* ChangesetConfig;
48515
- const fs = yield* effect.FileSystem.FileSystem;
48516
- const git = yield* Git;
48517
- return makeShape$1(snapshots, inspector, discovery, detector, config, fs, effect.Layer.succeed(Git, git));
48518
- }));
48519
- const ConfigGraph = ChangesetConfigLive.pipe(effect.Layer.provide(ChangesetConfigReaderLive));
48808
+ const ConfigGraph = ChangesetConfig.layer.pipe(effect.Layer.provide(ChangesetConfigReader.layer));
48520
48809
  /**
48521
48810
  * Build the batteries-included {@link DepsRegen} layer over a
48522
48811
  * `@effected/workspaces` kit graph bound to `options.cwd`.
@@ -48538,7 +48827,7 @@ const ConfigGraph = ChangesetConfigLive.pipe(effect.Layer.provide(ChangesetConfi
48538
48827
  */
48539
48828
  function makeDepsRegenDefault(options) {
48540
48829
  const kitGraph = Workspaces.layerWithGit(options);
48541
- 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));
48830
+ 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));
48542
48831
  }
48543
48832
  /**
48544
48833
  * Batteries-included {@link DepsRegen} layer: silk's opinionated default
@@ -48550,10 +48839,10 @@ function makeDepsRegenDefault(options) {
48550
48839
  * (`NodeServices.layer`), not a bare filesystem-only layer.
48551
48840
  *
48552
48841
  * Gating uses silk's adaptive publishability detector
48553
- * ({@link PublishabilityDetectorAdaptiveLive}), so the default semantics
48842
+ * (`SilkPublishability.layerAdaptive`), so the default semantics
48554
48843
  * are "versionable minus ignored" — identical to the savvy CLI and MCP
48555
48844
  * runtimes. Consumers who need to swap any dependency (test detectors,
48556
- * alternate config sources) should keep composing {@link DepsRegenLive}
48845
+ * alternate config sources) should keep composing {@link DepsRegen.layer}
48557
48846
  * directly; this layer is purely additive.
48558
48847
  *
48559
48848
  * @example
@@ -48612,6 +48901,10 @@ const MaintenanceReasonSchema = effect.Schema.Struct({
48612
48901
  * will not match here; the release then degrades gracefully to the
48613
48902
  * `"unspecified"` fallback sentence instead of naming its triggers.
48614
48903
  *
48904
+ * Co-members releasing as `type: "none"` are never triggers — they carry no
48905
+ * version bump (and, per `@changesets/types`, no guaranteed `newVersion`), so
48906
+ * naming one would print an unchanged version as the cause of the release.
48907
+ *
48615
48908
  * @public
48616
48909
  */
48617
48910
  function deriveMaintenanceReason(release, plan, config) {
@@ -48619,7 +48912,7 @@ function deriveMaintenanceReason(release, plan, config) {
48619
48912
  const groupKinds = [["fixed", config.fixed], ["linked", config.linked]];
48620
48913
  for (const [kind, groups] of groupKinds) for (const group of groups) {
48621
48914
  if (!group.some((pattern) => ChangesetConfig.matches(release.name, pattern))) continue;
48622
- const triggers = plan.releases.filter((r) => r.name !== release.name && r.changesets.length > 0 && group.some((pattern) => ChangesetConfig.matches(r.name, pattern))).map((r) => ({
48915
+ 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) => ({
48623
48916
  name: r.name,
48624
48917
  version: r.newVersion
48625
48918
  }));
@@ -48738,14 +49031,12 @@ function walkJsonPath(obj, path) {
48738
49031
  path: [...nodePath, segment.index]
48739
49032
  });
48740
49033
  break;
48741
- case "wildcard":
48742
- if (Array.isArray(node)) node.forEach((element, index) => {
48743
- next.push({
48744
- node: element,
48745
- path: [...nodePath, index]
48746
- });
49034
+ case "wildcard": if (Array.isArray(node)) node.forEach((element, index) => {
49035
+ next.push({
49036
+ node: element,
49037
+ path: [...nodePath, index]
48747
49038
  });
48748
- break;
49039
+ });
48749
49040
  }
48750
49041
  }
48751
49042
  current = next;
@@ -49800,7 +50091,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49800
50091
  };
49801
50092
  module.exports = {
49802
50093
  DEFAULT_MAX_EXTGLOB_RECURSION,
49803
- MAX_LENGTH: 1024 * 64,
50094
+ MAX_LENGTH: 65536,
49804
50095
  POSIX_REGEX_SOURCE: {
49805
50096
  __proto__: null,
49806
50097
  alnum: "a-zA-Z0-9",
@@ -51889,7 +52180,7 @@ function formatPaths(paths, mapper) {
51889
52180
  if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
51890
52181
  return paths;
51891
52182
  }
51892
- const defaultOptions = {
52183
+ const defaultOptions$1 = {
51893
52184
  caseSensitiveMatch: true,
51894
52185
  debug: !!process.env.TINYGLOBBY_DEBUG,
51895
52186
  expandDirectories: true,
@@ -51898,7 +52189,7 @@ const defaultOptions = {
51898
52189
  };
51899
52190
  function getOptions(options) {
51900
52191
  const opts = Object.assign({}, options);
51901
- for (const key in defaultOptions) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions[key] });
52192
+ for (const key in defaultOptions$1) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions$1[key] });
51902
52193
  opts.cwd = (opts.cwd instanceof URL ? (0, url.fileURLToPath)(opts.cwd) : (0, path.resolve)(opts.cwd || process.cwd())).replace(BACKSLASHES, "/");
51903
52194
  opts.ignore = ensureStringArray(opts.ignore);
51904
52195
  opts.fs && (opts.fs = {
@@ -52216,7 +52507,6 @@ var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
52216
52507
  version: "1.2"
52217
52508
  };
52218
52509
  this.tags = Object.assign({}, Directives.defaultTags);
52219
- break;
52220
52510
  }
52221
52511
  return res;
52222
52512
  }
@@ -53068,7 +53358,7 @@ var require_stringifyString = /* @__PURE__ */ __commonJSMin(((exports) => {
53068
53358
  }
53069
53359
  let blockEndNewlines;
53070
53360
  try {
53071
- blockEndNewlines = /* @__PURE__ */ new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
53361
+ blockEndNewlines = new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
53072
53362
  } catch {
53073
53363
  blockEndNewlines = /\n+(?!\n|$)/g;
53074
53364
  }
@@ -54394,9 +54684,7 @@ var require_int = /* @__PURE__ */ __commonJSMin(((exports) => {
54394
54684
  case 8:
54395
54685
  str = `0o${str}`;
54396
54686
  break;
54397
- case 16:
54398
- str = `0x${str}`;
54399
- break;
54687
+ case 16: str = `0x${str}`;
54400
54688
  }
54401
54689
  const n = BigInt(str);
54402
54690
  return sign === "-" ? BigInt(-1) * n : n;
@@ -55925,9 +56213,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
55925
56213
  badChar = `block scalar indicator ${source[0]}`;
55926
56214
  break;
55927
56215
  case "@":
55928
- case "`":
55929
- badChar = `reserved character ${source[0]}`;
55930
- break;
56216
+ case "`": badChar = `reserved character ${source[0]}`;
55931
56217
  }
55932
56218
  if (badChar) onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
55933
56219
  return foldLines(source);
@@ -55946,8 +56232,8 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
55946
56232
  */
55947
56233
  let first, line;
55948
56234
  try {
55949
- first = /* @__PURE__ */ new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
55950
- line = /* @__PURE__ */ new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
56235
+ first = new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
56236
+ line = new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
55951
56237
  } catch {
55952
56238
  first = /(.*?)[ \t]*\r?\n/sy;
55953
56239
  line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
@@ -60260,7 +60546,7 @@ function validatePackages(packages) {
60260
60546
  }
60261
60547
  }
60262
60548
  //#endregion
60263
- //#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@3.0.0-next.7/node_modules/@changesets/get-dependents-graph/dist/index.mjs
60549
+ //#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@3.0.0-next.8/node_modules/@changesets/get-dependents-graph/dist/index.mjs
60264
60550
  var src_default = new Proxy({}, { get(target, color) {
60265
60551
  target[color] ??= (text) => (0, node_util.styleText)(color, text);
60266
60552
  return target[color];
@@ -60374,20 +60660,20 @@ function getDependentsGraph(packages, opts) {
60374
60660
  graph.set(key, dependentsLookup[key]);
60375
60661
  });
60376
60662
  const simplifiedDependentsGraph = /* @__PURE__ */ new Map();
60377
- graph.forEach((pkgInfo, pkgName) => {
60378
- simplifiedDependentsGraph.set(pkgName, pkgInfo.dependents);
60663
+ graph.forEach((info, pkgName) => {
60664
+ simplifiedDependentsGraph.set(pkgName, info.dependents);
60379
60665
  });
60380
60666
  return simplifiedDependentsGraph;
60381
60667
  }
60382
60668
  //#endregion
60383
- //#region ../../node_modules/.pnpm/@changesets+should-skip-package@1.0.0-next.7/node_modules/@changesets/should-skip-package/dist/index.mjs
60669
+ //#region ../../node_modules/.pnpm/@changesets+should-skip-package@1.0.0-next.8/node_modules/@changesets/should-skip-package/dist/index.mjs
60384
60670
  function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) {
60385
60671
  if (ignore.includes(packageJson.name)) return true;
60386
60672
  if (packageJson.private && !allowPrivatePackages) return true;
60387
60673
  return !packageJson.version;
60388
60674
  }
60389
60675
  //#endregion
60390
- //#region ../../node_modules/.pnpm/@changesets+config@4.0.0-next.7/node_modules/@changesets/config/dist/index.mjs
60676
+ //#region ../../node_modules/.pnpm/@changesets+config@4.0.0-next.8/node_modules/@changesets/config/dist/index.mjs
60391
60677
  const DEFAULT_CONFIG = {
60392
60678
  lang: void 0,
60393
60679
  message: void 0,
@@ -61299,7 +61585,7 @@ async function readConfig(cwd, packages) {
61299
61585
  packages ??= await getPackages(cwd);
61300
61586
  return validateConfig(JSON.parse(await node_fs_promises.readFile(node_path.join(packages.rootDir, ".changeset", "config.json"), "utf8")), packages);
61301
61587
  }
61302
- var version = "4.0.0-next.7";
61588
+ var version = "4.0.0-next.8";
61303
61589
  const defaultConfig = normalizeWrittenConfig({
61304
61590
  packageNames: [],
61305
61591
  writtenConfig: parse(WrittenConfigSchema, {
@@ -61851,7 +62137,7 @@ const COMMANDS = {
61851
62137
  "deno": deno,
61852
62138
  "nub": nub
61853
62139
  };
61854
- function resolveCommand(agent, command, args) {
62140
+ function resolveCommand$1(agent, command, args) {
61855
62141
  const value = COMMANDS[agent][command];
61856
62142
  return constructCommand(value, args);
61857
62143
  }
@@ -61961,18 +62247,16 @@ async function detect$1(options = {}) {
61961
62247
  if (result) return result;
61962
62248
  break;
61963
62249
  }
61964
- case "install-metadata":
61965
- for (const metadata of Object.keys(INSTALL_METADATA)) {
61966
- const fileOrDir = metadata.endsWith("/") ? "dir" : "file";
61967
- if (await pathExists(node_path.join(directory, metadata), fileOrDir)) {
61968
- const name = INSTALL_METADATA[metadata];
61969
- return {
61970
- name,
61971
- agent: name === "yarn" ? isMetadataYarnClassic(metadata) ? "yarn" : "yarn@berry" : name
61972
- };
61973
- }
62250
+ case "install-metadata": for (const metadata of Object.keys(INSTALL_METADATA)) {
62251
+ const fileOrDir = metadata.endsWith("/") ? "dir" : "file";
62252
+ if (await pathExists(node_path.join(directory, metadata), fileOrDir)) {
62253
+ const name = INSTALL_METADATA[metadata];
62254
+ return {
62255
+ name,
62256
+ agent: name === "yarn" ? isMetadataYarnClassic(metadata) ? "yarn" : "yarn@berry" : name
62257
+ };
61974
62258
  }
61975
- break;
62259
+ }
61976
62260
  }
61977
62261
  if (stopDir?.(directory)) break;
61978
62262
  }
@@ -62033,201 +62317,212 @@ function isMetadataYarnClassic(metadataPath) {
62033
62317
  return metadataPath.endsWith(".yarn_integrity");
62034
62318
  }
62035
62319
  //#endregion
62036
- //#region ../../node_modules/.pnpm/tinyexec@1.2.4/node_modules/tinyexec/dist/main.mjs
62037
- const h = /^path$/i;
62038
- const g = {
62320
+ //#region ../../node_modules/.pnpm/tinyexec@1.3.0/node_modules/tinyexec/dist/main.mjs
62321
+ const isPathLikePattern = /^path$/i;
62322
+ const defaultEnvPathInfo = {
62039
62323
  key: "PATH",
62040
62324
  value: ""
62041
62325
  };
62042
- function _(e) {
62043
- for (const t in e) {
62044
- if (!Object.prototype.hasOwnProperty.call(e, t) || !h.test(t)) continue;
62045
- const n = e[t];
62046
- if (!n) return g;
62326
+ function getPathFromEnv(env) {
62327
+ for (const key in env) {
62328
+ if (!Object.prototype.hasOwnProperty.call(env, key) || !isPathLikePattern.test(key)) continue;
62329
+ const value = env[key];
62330
+ if (!value) return defaultEnvPathInfo;
62047
62331
  return {
62048
- key: t,
62049
- value: n
62332
+ key,
62333
+ value
62050
62334
  };
62051
62335
  }
62052
- return g;
62336
+ return defaultEnvPathInfo;
62053
62337
  }
62054
- function v(e, t) {
62055
- const n = t.value.split(node_path.delimiter);
62056
- const r = [];
62057
- let o = e;
62058
- let c;
62338
+ function addNodeBinToPath(cwd, path) {
62339
+ const parts = path.value.split(node_path.delimiter);
62340
+ const nodeBinPaths = [];
62341
+ let currentPath = cwd;
62342
+ let lastPath;
62059
62343
  do {
62060
- r.push((0, node_path.resolve)(o, "node_modules", ".bin"));
62061
- c = o;
62062
- o = (0, node_path.dirname)(o);
62063
- } while (o !== c);
62064
- r.push((0, node_path.dirname)(process.execPath));
62065
- const l = r.concat(n).join(node_path.delimiter);
62344
+ nodeBinPaths.push((0, node_path.resolve)(currentPath, "node_modules", ".bin"));
62345
+ lastPath = currentPath;
62346
+ currentPath = (0, node_path.dirname)(currentPath);
62347
+ } while (currentPath !== lastPath);
62348
+ nodeBinPaths.push((0, node_path.dirname)(process.execPath));
62349
+ const newPath = nodeBinPaths.concat(parts).join(node_path.delimiter);
62066
62350
  return {
62067
- key: t.key,
62068
- value: l
62351
+ key: path.key,
62352
+ value: newPath
62069
62353
  };
62070
62354
  }
62071
- function y(e, t, n = true) {
62072
- const r = {
62355
+ function computeEnv(cwd, env, nodePath = true) {
62356
+ const envWithDefault = {
62073
62357
  ...process.env,
62074
- ...t
62358
+ ...env
62075
62359
  };
62076
- if (!n) return r;
62077
- const i = v(e, _(r));
62078
- r[i.key] = i.value;
62079
- return r;
62080
- }
62081
- const b = (e) => {
62082
- let t = e.length;
62083
- const n = new node_stream.PassThrough();
62084
- const r = () => {
62085
- if (--t === 0) n.end();
62360
+ if (!nodePath) return envWithDefault;
62361
+ const envPathInfo = addNodeBinToPath(cwd, getPathFromEnv(envWithDefault));
62362
+ envWithDefault[envPathInfo.key] = envPathInfo.value;
62363
+ return envWithDefault;
62364
+ }
62365
+ const combineStreams = (streams) => {
62366
+ let streamCount = streams.length;
62367
+ const combined = new node_stream.PassThrough();
62368
+ const maybeEmitEnd = () => {
62369
+ if (--streamCount === 0) combined.end();
62086
62370
  };
62087
- for (const t of e) (0, node_stream_promises.pipeline)(t, n, { end: false }).then(r).catch(r);
62088
- return n;
62371
+ for (const stream of streams) (0, node_stream_promises.pipeline)(stream, combined, { end: false }).then(maybeEmitEnd).catch(maybeEmitEnd);
62372
+ return combined;
62089
62373
  };
62090
- const x = /([()\][%!^"`<>&|;, *?])/g;
62091
- const S = /^#!\s*(.+)/;
62092
- const C = /\.(?:com|exe)$/i;
62093
- const w = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i;
62094
- const T = process.platform === "win32";
62095
- const E = [
62374
+ const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
62375
+ const shebangRegExp = /^#!\s*(.+)/;
62376
+ const isWindowsExecutableRegExp = /\.(?:com|exe)$/i;
62377
+ const isNodeModulesCmdRegExp = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i;
62378
+ const isWindows = process.platform === "win32";
62379
+ const defaultPathExt = [
62096
62380
  ".EXE",
62097
62381
  ".CMD",
62098
62382
  ".BAT",
62099
62383
  ".COM"
62100
62384
  ];
62385
+ const noPathExt = [""];
62101
62386
  /**
62102
62387
  * Normalizes the command and arguments to work cross-platform.
62103
62388
  * On Windows, this basically handles things like shebangs, calling
62104
62389
  * `node_modules/.bin` commands, and escaping meta characters.
62105
62390
  * On other platforms, it just returns the command and arguments as-is.
62106
62391
  */
62107
- function D(e, t = [], n = {}) {
62108
- if (n.shell === true || !T) return {
62109
- command: e,
62110
- args: t,
62111
- options: n
62392
+ function normalizeSpawnCommand(command, args = [], options = {}) {
62393
+ if (options.shell === true || !isWindows) return {
62394
+ command,
62395
+ args,
62396
+ options
62112
62397
  };
62113
- let i = O(e, n);
62114
- let a = null;
62115
- if (i !== null) {
62116
- const e = 150;
62117
- const t = Buffer.alloc(e);
62118
- let n = null;
62398
+ let file = resolveCommand(command, options);
62399
+ let shebang = null;
62400
+ if (file !== null) {
62401
+ const size = 150;
62402
+ const buffer = Buffer.alloc(size);
62403
+ let fd = null;
62119
62404
  try {
62120
- n = (0, node_fs.openSync)(i, "r");
62121
- (0, node_fs.readSync)(n, t, 0, e, 0);
62405
+ fd = (0, node_fs.openSync)(file, "r");
62406
+ (0, node_fs.readSync)(fd, buffer, 0, size, 0);
62122
62407
  } catch {} finally {
62123
- if (n !== null) (0, node_fs.closeSync)(n);
62124
- }
62125
- const o = t.toString().match(S);
62126
- if (o !== null) {
62127
- const e = o[1].trim();
62128
- const t = e.indexOf(" ");
62129
- const n = t !== -1 ? e.slice(0, t) : e;
62130
- const i = t !== -1 ? e.slice(t + 1) : "";
62131
- const s = (0, node_path.basename)(n);
62132
- a = s === "env" ? i || null : s;
62133
- }
62134
- }
62135
- if (a !== null && i !== null) {
62136
- t = [i, ...t];
62137
- e = a;
62138
- i = O(e, n);
62139
- }
62140
- if (i === null || !C.test(i)) {
62141
- const r = i !== null && w.test(i);
62142
- e = (0, node_path.normalize)(e);
62143
- e = e.replace(x, "^$1");
62144
- t = t.map((e) => {
62145
- e = e.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
62146
- e = e.replace(/(?=(\\+?)?)\1$/, "$1$1");
62147
- e = `"${e}"`;
62148
- e = e.replace(x, "^$1");
62149
- if (r) e = e.replace(x, "^$1");
62150
- return e;
62408
+ if (fd !== null) (0, node_fs.closeSync)(fd);
62409
+ }
62410
+ const match = buffer.toString().match(shebangRegExp);
62411
+ if (match !== null) {
62412
+ const line = match[1].trim();
62413
+ const separatorIndex = line.indexOf(" ");
62414
+ const path = separatorIndex !== -1 ? line.slice(0, separatorIndex) : line;
62415
+ const argument = separatorIndex !== -1 ? line.slice(separatorIndex + 1) : "";
62416
+ const binary = (0, node_path.basename)(path);
62417
+ shebang = binary === "env" ? argument || null : binary;
62418
+ }
62419
+ }
62420
+ if (shebang !== null && file !== null) {
62421
+ args = [file, ...args];
62422
+ command = shebang;
62423
+ file = resolveCommand(command, options);
62424
+ }
62425
+ if (file === null || !isWindowsExecutableRegExp.test(file)) {
62426
+ const needsDoubleEscapeMetaChars = file !== null && isNodeModulesCmdRegExp.test(file);
62427
+ command = (0, node_path.normalize)(command);
62428
+ command = command.replace(metaCharsRegExp, "^$1");
62429
+ args = args.map((arg) => {
62430
+ arg = arg.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
62431
+ arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
62432
+ arg = `"${arg}"`;
62433
+ arg = arg.replace(metaCharsRegExp, "^$1");
62434
+ if (needsDoubleEscapeMetaChars) arg = arg.replace(metaCharsRegExp, "^$1");
62435
+ return arg;
62151
62436
  });
62152
- t = [
62437
+ args = [
62153
62438
  "/d",
62154
62439
  "/s",
62155
62440
  "/c",
62156
- `"${[e, ...t].join(" ")}"`
62441
+ `"${[command, ...args].join(" ")}"`
62157
62442
  ];
62158
- e = n.env?.comspec ?? "cmd.exe";
62159
- n = {
62160
- ...n,
62443
+ command = options.env?.comspec ?? "cmd.exe";
62444
+ options = {
62445
+ ...options,
62161
62446
  windowsVerbatimArguments: true
62162
62447
  };
62163
62448
  }
62164
62449
  return {
62165
- command: e,
62166
- args: t,
62167
- options: n
62450
+ command,
62451
+ args,
62452
+ options
62168
62453
  };
62169
62454
  }
62170
62455
  /**
62171
62456
  * Resolves the command to an absolute path if possible.
62172
62457
  * Handles things like traversing PATH and adding extensions from PATHEXT
62173
62458
  */
62174
- function O(e, t) {
62175
- const r = (t.cwd ?? (0, node_process.cwd)()).toString();
62176
- const a = t.env ?? process.env;
62177
- const o = _(a).value;
62178
- const c = e.includes("/") || e.includes("\\") ? [""] : [r, ...o.split(node_path.delimiter)];
62179
- const l = a.PATHEXT ? a.PATHEXT.split(node_path.delimiter) : E;
62180
- if (e.includes(".") && l[0] !== "") l.unshift("");
62181
- for (const t of c) {
62182
- const n = (0, node_path.resolve)(r, t.startsWith("\"") && t.endsWith("\"") && t.length > 1 ? t.slice(1, -1) : t, e);
62183
- for (const e of l) {
62184
- const t = n + e;
62459
+ function resolveCommand(command, options) {
62460
+ const cwd$3 = (options.cwd ?? (0, node_process.cwd)()).toString();
62461
+ const env = options.env ?? process.env;
62462
+ const PATH = getPathFromEnv(env).value;
62463
+ const pathEnv = command.includes("/") || command.includes("\\") ? [""] : [cwd$3, ...PATH.split(node_path.delimiter)];
62464
+ let pathExt = env.PATHEXT ? env.PATHEXT.split(node_path.delimiter) : defaultPathExt;
62465
+ if (command.includes(".") && pathExt[0] !== "") pathExt = ["", ...pathExt];
62466
+ for (const extensions of [pathExt, noPathExt]) for (const path of pathEnv) {
62467
+ const dest = (0, node_path.resolve)(cwd$3, path.startsWith("\"") && path.endsWith("\"") && path.length > 1 ? path.slice(1, -1) : path, command);
62468
+ for (const ext of extensions) {
62469
+ const destWithExt = dest + ext;
62185
62470
  try {
62186
- if ((0, node_fs.statSync)(t).isFile()) return t;
62471
+ if ((0, node_fs.statSync)(destWithExt).isFile()) return destWithExt;
62187
62472
  } catch {}
62188
62473
  }
62189
62474
  }
62190
62475
  return null;
62191
62476
  }
62192
- var k = class extends Error {
62477
+ var NonZeroExitError = class extends Error {
62193
62478
  result;
62194
62479
  output;
62195
- get exitCode() {
62196
- if (this.result.exitCode !== null) return this.result.exitCode;
62197
- }
62198
- constructor(e, t) {
62199
- super(`Process exited with non-zero status (${e.exitCode})`);
62200
- this.result = e;
62201
- this.output = t;
62480
+ exitCode;
62481
+ get signalCode() {
62482
+ return this.result.signalCode;
62483
+ }
62484
+ constructor(result, output, command, args) {
62485
+ let target = "The process";
62486
+ if (command) target = `The command \`${args?.length ? `${command} ${args.map((a) => /[ "'`()]/.test(a) ? JSON.stringify(a) : a).join(" ")}` : command}\``;
62487
+ const exitCode = result.exitCode ?? 1;
62488
+ super(result.signalCode !== null ? `${target} was killed by the signal ${result.signalCode}` : `${target} exited with a non-zero status (${exitCode})`);
62489
+ this.result = result;
62490
+ this.output = output;
62491
+ this.exitCode = exitCode;
62492
+ Object.defineProperty(this, "result", {
62493
+ enumerable: false,
62494
+ writable: false,
62495
+ configurable: false
62496
+ });
62202
62497
  }
62203
62498
  };
62204
- const j = {
62499
+ const defaultOptions = {
62205
62500
  timeout: void 0,
62206
62501
  persist: false
62207
62502
  };
62208
- const N = { windowsHide: true };
62209
- function P(e) {
62210
- const t = new AbortController();
62211
- for (const n of e) {
62212
- if (n.aborted) {
62213
- t.abort();
62214
- return n;
62215
- }
62216
- const e = () => {
62217
- t.abort(n.reason);
62503
+ const defaultNodeOptions = { windowsHide: true };
62504
+ function combineSignals(signals) {
62505
+ const controller = new AbortController();
62506
+ for (const signal of signals) {
62507
+ if (signal.aborted) {
62508
+ controller.abort();
62509
+ return signal;
62510
+ }
62511
+ const onAbort = () => {
62512
+ controller.abort(signal.reason);
62218
62513
  };
62219
- n.addEventListener("abort", e, { signal: t.signal });
62514
+ signal.addEventListener("abort", onAbort, { signal: controller.signal });
62220
62515
  }
62221
- return t.signal;
62516
+ return controller.signal;
62222
62517
  }
62223
- async function F(e) {
62224
- let t = "";
62518
+ async function readStream(stream) {
62519
+ let output = "";
62225
62520
  try {
62226
- for await (const n of e) t += n.toString();
62521
+ for await (const chunk of stream) output += chunk.toString();
62227
62522
  } catch {}
62228
- return t;
62523
+ return output;
62229
62524
  }
62230
- var I = class {
62525
+ var ExecProcess = class {
62231
62526
  _process;
62232
62527
  _aborted = false;
62233
62528
  _options;
@@ -62245,19 +62540,22 @@ var I = class {
62245
62540
  get exitCode() {
62246
62541
  if (this._process && this._process.exitCode !== null) return this._process.exitCode;
62247
62542
  }
62248
- constructor(e, t, n) {
62543
+ get signalCode() {
62544
+ return this._process?.signalCode ?? null;
62545
+ }
62546
+ constructor(command, args, options) {
62249
62547
  this._options = {
62250
- ...j,
62251
- ...n
62548
+ ...defaultOptions,
62549
+ ...options
62252
62550
  };
62253
- this._command = e;
62254
- this._args = t ?? [];
62255
- this._processClosed = new Promise((e) => {
62256
- this._resolveClose = e;
62551
+ this._command = command;
62552
+ this._args = args ?? [];
62553
+ this._processClosed = new Promise((resolve) => {
62554
+ this._resolveClose = resolve;
62257
62555
  });
62258
62556
  }
62259
- kill(e) {
62260
- return this._process?.kill(e) === true;
62557
+ kill(signal) {
62558
+ return this._process?.kill(signal) === true;
62261
62559
  }
62262
62560
  get aborted() {
62263
62561
  return this._aborted;
@@ -62265,99 +62563,99 @@ var I = class {
62265
62563
  get killed() {
62266
62564
  return this._process?.killed === true;
62267
62565
  }
62268
- pipe(e, t, n) {
62269
- return z(e, t, {
62270
- ...n,
62566
+ pipe(command, args, options) {
62567
+ return exec(command, args, {
62568
+ ...options,
62271
62569
  stdin: this
62272
62570
  });
62273
62571
  }
62274
62572
  async *[Symbol.asyncIterator]() {
62275
- const e = this._process;
62276
- if (!e) return;
62277
- const t = [];
62278
- if (this._streamErr) t.push(this._streamErr);
62279
- if (this._streamOut) t.push(this._streamOut);
62280
- const n = b(t);
62281
- const r = node_readline.createInterface({ input: n });
62282
- for await (const e of r) yield e.toString();
62573
+ const proc = this._process;
62574
+ if (!proc) return;
62575
+ const streams = [];
62576
+ if (this._streamErr) streams.push(this._streamErr);
62577
+ if (this._streamOut) streams.push(this._streamOut);
62578
+ const streamCombined = combineStreams(streams);
62579
+ const rl = node_readline.createInterface({ input: streamCombined });
62580
+ for await (const chunk of rl) yield chunk.toString();
62283
62581
  await this._processClosed;
62284
- e.removeAllListeners();
62582
+ proc.removeAllListeners();
62285
62583
  if (this._thrownError) throw this._thrownError;
62286
- if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new k(this);
62584
+ if (this._options?.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, void 0, this._command, this._args);
62287
62585
  }
62288
62586
  async _waitForOutput() {
62289
- const e = this._process;
62290
- if (!e) throw new Error("No process was started");
62291
- const [t, n] = await Promise.all([this._streamOut ? F(this._streamOut) : "", this._streamErr ? F(this._streamErr) : ""]);
62587
+ const proc = this._process;
62588
+ if (!proc) throw new Error("No process was started");
62589
+ const [stdout, stderr] = await Promise.all([this._streamOut ? readStream(this._streamOut) : "", this._streamErr ? readStream(this._streamErr) : ""]);
62292
62590
  await this._processClosed;
62293
- const { stdin: r } = this._options;
62294
- if (r && typeof r !== "string") await r;
62295
- e.removeAllListeners();
62591
+ const { stdin } = this._options;
62592
+ if (stdin && typeof stdin !== "string") await stdin;
62593
+ proc.removeAllListeners();
62296
62594
  if (this._thrownError) throw this._thrownError;
62297
- const i = {
62298
- stderr: n,
62299
- stdout: t,
62595
+ const result = {
62596
+ stderr,
62597
+ stdout,
62300
62598
  exitCode: this.exitCode
62301
62599
  };
62302
- if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new k(this, i);
62303
- return i;
62600
+ if (this._options.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, result, this._command, this._args);
62601
+ return result;
62304
62602
  }
62305
- then(e, t) {
62306
- return this._waitForOutput().then(e, t);
62603
+ then(onfulfilled, onrejected) {
62604
+ return this._waitForOutput().then(onfulfilled, onrejected);
62307
62605
  }
62308
62606
  _streamOut;
62309
62607
  _streamErr;
62310
62608
  spawn() {
62311
- const t = (0, node_process.cwd)();
62312
- const r = this._options;
62313
- const i = {
62314
- ...N,
62315
- ...r.nodeOptions
62609
+ const cwd$1 = (0, node_process.cwd)();
62610
+ const options = this._options;
62611
+ const nodeOptions = {
62612
+ ...defaultNodeOptions,
62613
+ ...options.nodeOptions
62316
62614
  };
62317
- const a = [];
62615
+ const signals = [];
62318
62616
  this._resetState();
62319
- if (r.timeout !== void 0) a.push(AbortSignal.timeout(r.timeout));
62320
- if (r.signal !== void 0) a.push(r.signal);
62321
- if (r.persist === true) i.detached = true;
62322
- if (a.length > 0) i.signal = P(a);
62323
- i.env = y(t, i.env, r.nodePath);
62324
- const o = D(this._command, this._args, i);
62325
- const s = (0, node_child_process.spawn)(o.command, o.args, o.options);
62326
- if (s.stderr) this._streamErr = s.stderr;
62327
- if (s.stdout) this._streamOut = s.stdout;
62328
- this._process = s;
62329
- s.once("error", this._onError);
62330
- s.once("close", this._onClose);
62331
- if (s.stdin) {
62332
- const { stdin: e } = r;
62333
- if (typeof e === "string") s.stdin.end(e);
62334
- else e?.process?.stdout?.pipe(s.stdin);
62617
+ if (options.timeout !== void 0) signals.push(AbortSignal.timeout(options.timeout));
62618
+ if (options.signal !== void 0) signals.push(options.signal);
62619
+ if (options.persist === true) nodeOptions.detached = true;
62620
+ if (signals.length > 0) nodeOptions.signal = combineSignals(signals);
62621
+ nodeOptions.env = computeEnv(cwd$1, nodeOptions.env, options.nodePath);
62622
+ const crossResult = normalizeSpawnCommand(this._command, this._args, nodeOptions);
62623
+ const handle = (0, node_child_process.spawn)(crossResult.command, crossResult.args, crossResult.options);
62624
+ if (handle.stderr) this._streamErr = handle.stderr;
62625
+ if (handle.stdout) this._streamOut = handle.stdout;
62626
+ this._process = handle;
62627
+ handle.once("error", this._onError);
62628
+ handle.once("close", this._onClose);
62629
+ if (handle.stdin) {
62630
+ const { stdin } = options;
62631
+ if (typeof stdin === "string") handle.stdin.end(stdin);
62632
+ else stdin?.process?.stdout?.pipe(handle.stdin);
62335
62633
  }
62336
62634
  }
62337
62635
  _resetState() {
62338
62636
  this._aborted = false;
62339
- this._processClosed = new Promise((e) => {
62340
- this._resolveClose = e;
62637
+ this._processClosed = new Promise((resolve) => {
62638
+ this._resolveClose = resolve;
62341
62639
  });
62342
62640
  this._thrownError = void 0;
62343
62641
  }
62344
- _onError = (e) => {
62345
- if (e.name === "AbortError" && (!(e.cause instanceof Error) || e.cause.name !== "TimeoutError")) {
62642
+ _onError = (err) => {
62643
+ if (err.name === "AbortError" && (!(err.cause instanceof Error) || err.cause.name !== "TimeoutError")) {
62346
62644
  this._aborted = true;
62347
62645
  return;
62348
62646
  }
62349
- this._thrownError = e;
62647
+ this._thrownError = err;
62350
62648
  };
62351
62649
  _onClose = () => {
62352
62650
  if (this._resolveClose) this._resolveClose();
62353
62651
  };
62354
62652
  };
62355
- const R = (e, t, n) => {
62356
- const r = new I(e, t, n);
62357
- r.spawn();
62358
- return r;
62653
+ const x = (command, args, userOptions) => {
62654
+ const proc = new ExecProcess(command, args, userOptions);
62655
+ proc.spawn();
62656
+ return proc;
62359
62657
  };
62360
- const z = R;
62658
+ const exec = x;
62361
62659
  //#endregion
62362
62660
  //#region ../../node_modules/.pnpm/@changesets+format@0.1.1/node_modules/@changesets/format/dist/index.js
62363
62661
  /**
@@ -62376,14 +62674,14 @@ function traverseUpwards(startDir, stopDir, cb) {
62376
62674
  }
62377
62675
  }
62378
62676
  async function packageManagerExecute(packageManager, args, cwd) {
62379
- const cmd = resolveCommand(packageManager, "execute-local", args) ?? {
62677
+ const cmd = resolveCommand$1(packageManager, "execute-local", args) ?? {
62380
62678
  command: "npx",
62381
62679
  args
62382
62680
  };
62383
62681
  return await spawnProcess(cmd.command, cmd.args, cwd);
62384
62682
  }
62385
62683
  async function spawnProcess(command, args, cwd) {
62386
- await z(command, args, {
62684
+ await exec(command, args, {
62387
62685
  nodeOptions: { cwd },
62388
62686
  throwOnError: true
62389
62687
  });
@@ -62571,9 +62869,9 @@ var InternalError = class extends Error {
62571
62869
  }
62572
62870
  };
62573
62871
  //#endregion
62574
- //#region ../../node_modules/.pnpm/@changesets+git@4.0.0-next.7/node_modules/@changesets/git/dist/index.mjs
62872
+ //#region ../../node_modules/.pnpm/@changesets+git@4.0.0-next.8/node_modules/@changesets/git/dist/index.mjs
62575
62873
  async function getDivergedCommit(cwd, ref) {
62576
- const cmd = await z("git", [
62874
+ const cmd = await exec("git", [
62577
62875
  "merge-base",
62578
62876
  ref,
62579
62877
  "HEAD"
@@ -62592,7 +62890,7 @@ async function getCommitsThatAddFiles(gitPaths, { cwd, short = false }) {
62592
62890
  let remaining = gitPaths;
62593
62891
  do {
62594
62892
  const commitInfos = await Promise.all(remaining.map(async (gitPath) => {
62595
- const [commitSha, parentSha] = (await z("git", [
62893
+ const [commitSha, parentSha] = (await exec("git", [
62596
62894
  "log",
62597
62895
  "--diff-filter=A",
62598
62896
  "--max-count=1",
@@ -62623,9 +62921,9 @@ async function getCommitsThatAddFiles(gitPaths, { cwd, short = false }) {
62623
62921
  return gitPaths.map((p) => map.get(p));
62624
62922
  }
62625
62923
  async function isRepoShallow({ cwd }) {
62626
- const isShallowRepoOutput = (await z("git", ["rev-parse", "--is-shallow-repository"], { nodeOptions: { cwd } })).stdout.toString().trim();
62924
+ const isShallowRepoOutput = (await exec("git", ["rev-parse", "--is-shallow-repository"], { nodeOptions: { cwd } })).stdout.toString().trim();
62627
62925
  if (isShallowRepoOutput === "--is-shallow-repository") {
62628
- const gitDir = (await z("git", ["rev-parse", "--git-dir"], { nodeOptions: { cwd } })).stdout.toString().trim();
62926
+ const gitDir = (await exec("git", ["rev-parse", "--git-dir"], { nodeOptions: { cwd } })).stdout.toString().trim();
62629
62927
  const fullGitDir = node_path.resolve(cwd, gitDir);
62630
62928
  try {
62631
62929
  await node_fs_promises.access(node_path.join(fullGitDir, "shallow"));
@@ -62636,12 +62934,12 @@ async function isRepoShallow({ cwd }) {
62636
62934
  } else return isShallowRepoOutput === "true";
62637
62935
  }
62638
62936
  async function deepenCloneBy({ by, cwd }) {
62639
- const cmd = await z("git", ["fetch", `--deepen=${by}`], { nodeOptions: { cwd } });
62937
+ const cmd = await exec("git", ["fetch", `--deepen=${by}`], { nodeOptions: { cwd } });
62640
62938
  if (cmd.exitCode !== 0) throw new Error(cmd.stderr.toString());
62641
62939
  }
62642
62940
  async function getChangedChangesetFilesSinceRef({ cwd, ref }) {
62643
62941
  try {
62644
- const cmd = await z("git", [
62942
+ const cmd = await exec("git", [
62645
62943
  "diff",
62646
62944
  "--name-only",
62647
62945
  "--diff-filter=d",
@@ -64456,9 +64754,7 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
64456
64754
  case 2:
64457
64755
  handleError(12);
64458
64756
  break;
64459
- case 6:
64460
- handleError(16);
64461
- break;
64757
+ case 6: handleError(16);
64462
64758
  }
64463
64759
  switch (token) {
64464
64760
  case 12:
@@ -64718,7 +65014,7 @@ function applyEdits(text, edits) {
64718
65014
  return text;
64719
65015
  }
64720
65016
  //#endregion
64721
- //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.0.0-next.8/node_modules/@changesets/apply-release-plan/dist/index.mjs
65017
+ //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.0.0-next.9/node_modules/@changesets/apply-release-plan/dist/index.mjs
64722
65018
  /**
64723
65019
  * A simple JSON editing utility that preserves formatting. They specified operation keys
64724
65020
  * must exist in the JSON for this implementation.
@@ -64770,6 +65066,7 @@ function getBumpLevel(type) {
64770
65066
  return level;
64771
65067
  }
64772
65068
  function shouldUpdateDependencyBasedOnConfig(cwd, release, { depVersionRange, depType }, { minReleaseType, onlyUpdatePeerDependentsWhenOutOfRange }) {
65069
+ if (release.newVersion == null) return false;
64773
65070
  if (depVersionRange.startsWith("workspace:")) {
64774
65071
  depVersionRange = depVersionRange.replace(/^workspace:/, "");
64775
65072
  switch (depVersionRange) {
@@ -64781,7 +65078,7 @@ function shouldUpdateDependencyBasedOnConfig(cwd, release, { depVersionRange, de
64781
65078
  default: if (!(0, semver_ranges_valid_js.default)(depVersionRange)) return node_path.posix.normalize(depVersionRange) === node_path.relative(cwd, release.dir).replace(/\\/g, "/");
64782
65079
  }
64783
65080
  }
64784
- if (!(0, semver_functions_satisfies_js.default)(release.version, depVersionRange)) return true;
65081
+ if (!(0, semver_functions_satisfies_js.default)(release.newVersion, depVersionRange)) return true;
64785
65082
  const minLevel = getBumpLevel(minReleaseType);
64786
65083
  let shouldUpdate = getBumpLevel(release.type) >= minLevel;
64787
65084
  if (depType === "peerDependencies") shouldUpdate = !onlyUpdatePeerDependentsWhenOutOfRange;
@@ -64806,12 +65103,7 @@ async function getChangelogEntry(cwd, release, releases, changesets, changelogFu
64806
65103
  const peerDependencyVersionRange = release.packageJson.peerDependencies?.[rel.name];
64807
65104
  const versionRange = dependencyVersionRange || peerDependencyVersionRange;
64808
65105
  const usesWorkspaceRange = versionRange?.startsWith("workspace:");
64809
- return versionRange && (usesWorkspaceRange || (0, semver_ranges_valid_js.default)(versionRange) != null) && shouldUpdateDependencyBasedOnConfig(cwd, {
64810
- type: rel.type,
64811
- version: rel.newVersion,
64812
- oldVersion: rel.oldVersion,
64813
- dir: rel.dir
64814
- }, {
65106
+ return versionRange && (usesWorkspaceRange || (0, semver_ranges_valid_js.default)(versionRange) != null) && shouldUpdateDependencyBasedOnConfig(cwd, rel, {
64815
65107
  depVersionRange: versionRange,
64816
65108
  depType: dependencyVersionRange ? "dependencies" : "peerDependencies"
64817
65109
  }, {
@@ -64863,14 +65155,11 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
64863
65155
  const pkgJsonEdits = [];
64864
65156
  for (const depType of DEPENDENCY_TYPES) {
64865
65157
  const deps = packageJson[depType];
64866
- if (deps) for (const { name, version, oldVersion, type, dir } of versionsToUpdate) {
65158
+ if (deps) for (const release of versionsToUpdate) {
65159
+ if (release.newVersion == null) continue;
65160
+ const { name, newVersion } = release;
64867
65161
  let depCurrentVersion = deps[name];
64868
- if (!depCurrentVersion || depCurrentVersion.startsWith("file:") || depCurrentVersion.startsWith("link:") || !shouldUpdateDependencyBasedOnConfig(cwd, {
64869
- version,
64870
- oldVersion,
64871
- type,
64872
- dir
64873
- }, {
65162
+ if (!depCurrentVersion || depCurrentVersion.startsWith("file:") || depCurrentVersion.startsWith("link:") || !shouldUpdateDependencyBasedOnConfig(cwd, release, {
64874
65163
  depVersionRange: depCurrentVersion,
64875
65164
  depType
64876
65165
  }, {
@@ -64884,8 +65173,8 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
64884
65173
  if (workspaceDepVersion === "*" || workspaceDepVersion === "^" || workspaceDepVersion === "~" || (0, semver_ranges_valid_js.default)(workspaceDepVersion) == null) continue;
64885
65174
  depCurrentVersion = workspaceDepVersion;
64886
65175
  }
64887
- if (new semver_classes_range_js.default(depCurrentVersion).range !== "" || (0, semver_functions_prerelease_js.default)(version) != null) {
64888
- let newNewRange = snapshot ? version : `${getVersionRangeType(depCurrentVersion)}${version}`;
65176
+ if (new semver_classes_range_js.default(depCurrentVersion).range !== "" || (0, semver_functions_prerelease_js.default)(newVersion) != null) {
65177
+ let newNewRange = snapshot ? newVersion : `${getVersionRangeType(depCurrentVersion)}${newVersion}`;
64889
65178
  if (usesWorkspaceRange) newNewRange = `workspace:${newNewRange}`;
64890
65179
  pkgJsonEdits.push({
64891
65180
  keys: [depType, name],
@@ -64952,12 +65241,9 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
64952
65241
  else await node_fs_promises.writeFile(node_path.join(cwd, ".changeset", "pre.json"), JSON.stringify(releasePlan.preState, null, 2) + "\n");
64953
65242
  touchedFiles.push(node_path.join(cwd, ".changeset", "pre.json"));
64954
65243
  }
64955
- const versionsToUpdate = releases.map(({ name, newVersion, oldVersion, type }) => ({
64956
- name,
64957
- version: newVersion,
64958
- oldVersion,
64959
- type,
64960
- dir: packagesByName.get(name).dir
65244
+ const versionsToUpdate = releases.map((release) => ({
65245
+ ...release,
65246
+ dir: packagesByName.get(release.name).dir
64961
65247
  }));
64962
65248
  const dependencyUpdateOptions = {
64963
65249
  cwd,
@@ -64969,10 +65255,12 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
64969
65255
  const filesToFormat = [];
64970
65256
  for (const release of releaseWithChangelogs) {
64971
65257
  const { changelog, dir, name, newVersion, packageJson } = release;
64972
- const pkgJsonPath = await updatePackageJson(dir, [{
65258
+ const pkgJsonEdits = getDependencyVersionEdits(packageJson, versionsToUpdate, dependencyUpdateOptions);
65259
+ if (newVersion != null) pkgJsonEdits.push({
64973
65260
  keys: ["version"],
64974
65261
  value: newVersion
64975
- }, ...getDependencyVersionEdits(packageJson, versionsToUpdate, dependencyUpdateOptions)]);
65262
+ });
65263
+ const pkgJsonPath = await updatePackageJson(dir, pkgJsonEdits);
64976
65264
  if (pkgJsonPath) touchedFiles.push(pkgJsonPath);
64977
65265
  if (changelog && changelog.length > 0) {
64978
65266
  const changelogPath = node_path.resolve(dir, "CHANGELOG.md");
@@ -65076,7 +65364,7 @@ async function updateChangelog(changelogPath, changelog, name) {
65076
65364
  await node_fs_promises.writeFile(changelogPath, newChangelog);
65077
65365
  }
65078
65366
  //#endregion
65079
- //#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@7.0.0-next.8/node_modules/@changesets/assemble-release-plan/dist/index.mjs
65367
+ //#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@7.0.0-next.9/node_modules/@changesets/assemble-release-plan/dist/index.mjs
65080
65368
  function getHighestReleaseType(releases) {
65081
65369
  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`);
65082
65370
  let highestReleaseType = "none";
@@ -65422,7 +65710,7 @@ function getPreInfo(changesets, packagesByName, config, preState) {
65422
65710
  };
65423
65711
  }
65424
65712
  //#endregion
65425
- //#region ../../node_modules/.pnpm/@changesets+pre@3.0.0-next.7/node_modules/@changesets/pre/dist/index.mjs
65713
+ //#region ../../node_modules/.pnpm/@changesets+pre@3.0.0-next.8/node_modules/@changesets/pre/dist/index.mjs
65426
65714
  async function outputFile(filePath, content) {
65427
65715
  await node_fs_promises.mkdir(node_path.dirname(filePath), { recursive: true });
65428
65716
  await node_fs_promises.writeFile(filePath, content, "utf8");
@@ -65451,7 +65739,7 @@ async function migratePreState(rootDir, preState) {
65451
65739
  return preState;
65452
65740
  }
65453
65741
  //#endregion
65454
- //#region ../../node_modules/.pnpm/@changesets+parse@1.0.0-next.8/node_modules/@changesets/parse/dist/index.mjs
65742
+ //#region ../../node_modules/.pnpm/@changesets+parse@1.0.0-next.9/node_modules/@changesets/parse/dist/index.mjs
65455
65743
  const mdRegex = /\s*---([^]*?)\r?\n\s*---(\s*(?:\n|$)[^]*)/;
65456
65744
  const EXAMPLE_FORMAT = `---\n"package-name": patch\n---`;
65457
65745
  const validVersionTypes = [
@@ -65504,7 +65792,7 @@ YAML error: ${e instanceof Error ? e.message : String(e)}\nFrontmatter content:\
65504
65792
  };
65505
65793
  }
65506
65794
  //#endregion
65507
- //#region ../../node_modules/.pnpm/@changesets+read@1.0.0-next.8/node_modules/@changesets/read/dist/index.mjs
65795
+ //#region ../../node_modules/.pnpm/@changesets+read@1.0.0-next.9/node_modules/@changesets/read/dist/index.mjs
65508
65796
  const ignoredMdFiles = [
65509
65797
  /^README\.md$/i,
65510
65798
  "AGENTS.md",
@@ -65537,7 +65825,7 @@ async function readChangesets(rootDir, sinceRef) {
65537
65825
  return await Promise.all(changesetContents);
65538
65826
  }
65539
65827
  //#endregion
65540
- //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.0-next.8/node_modules/@changesets/get-release-plan/dist/index.mjs
65828
+ //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.0-next.9/node_modules/@changesets/get-release-plan/dist/index.mjs
65541
65829
  async function getReleasePlan(cwd, sinceRef, passedConfig) {
65542
65830
  const packages = await getPackages(cwd);
65543
65831
  const configResult = await readConfig(packages.rootDir, packages);
@@ -65578,7 +65866,12 @@ async function loadConfig(root, packages) {
65578
65866
  };
65579
65867
  }
65580
65868
  /** Effect service tag for the release planner. @public */
65581
- var ReleasePlanner = class extends effect.Context.Service()("ReleasePlanner") {};
65869
+ var ReleasePlanner = class extends effect.Context.Service()("ReleasePlanner") {
65870
+ /** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */
65871
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
65872
+ return makeShape(yield* ConfigInspector, yield* effect.FileSystem.FileSystem);
65873
+ }));
65874
+ };
65582
65875
  /** Build the service shape over a resolved {@link ConfigInspector} and {@link FileSystem.FileSystem}. */
65583
65876
  function makeShape(inspector, fs) {
65584
65877
  const plan = (root) => effect.Effect.tryPromise({
@@ -65596,10 +65889,6 @@ function makeShape(inspector, fs) {
65596
65889
  apply
65597
65890
  };
65598
65891
  }
65599
- /** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */
65600
- const ReleasePlannerLive = effect.Layer.effect(ReleasePlanner, effect.Effect.gen(function* () {
65601
- return makeShape(yield* ConfigInspector, yield* effect.FileSystem.FileSystem);
65602
- }));
65603
65892
  /**
65604
65893
  * Test factory — supply fixed results for any subset of methods. Unsupplied
65605
65894
  * methods fail with a `ReleasePlanError`.
@@ -66717,7 +67006,6 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
66717
67006
  AppliedReleaseSchema: () => AppliedReleaseSchema,
66718
67007
  BranchAnalysisSchema: () => BranchAnalysisSchema,
66719
67008
  BranchAnalyzer: () => BranchAnalyzer,
66720
- BranchAnalyzerLive: () => BranchAnalyzerLive,
66721
67009
  BranchFileEntrySchema: () => BranchFileEntrySchema,
66722
67010
  BumpTypeSchema: () => BumpTypeSchema,
66723
67011
  Categories: () => Categories,
@@ -66735,7 +67023,6 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
66735
67023
  ClassificationSchema: () => ClassificationSchema,
66736
67024
  CommitHashSchema: () => CommitHashSchema,
66737
67025
  ConfigInspector: () => ConfigInspector,
66738
- ConfigInspectorLive: () => ConfigInspectorLive,
66739
67026
  ConfigurationError: () => ConfigurationError,
66740
67027
  ContentStructureRule: () => ContentStructureRule$2,
66741
67028
  ContributorFootnotesPlugin: () => ContributorFootnotesPlugin,
@@ -66750,12 +67037,10 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
66750
67037
  DependencyUpdateSchema: () => DependencyUpdateSchema,
66751
67038
  DepsRegen: () => DepsRegen,
66752
67039
  DepsRegenDefault: () => DepsRegenDefault,
66753
- DepsRegenLive: () => DepsRegenLive,
66754
67040
  FileStatusSchema: () => FileStatusSchema,
66755
67041
  GitError: () => GitError$1,
66756
67042
  GitHubApiError: () => GitHubApiError,
66757
67043
  GitHubInfoSchema: () => GitHubInfoSchema,
66758
- GitHubLive: () => GitHubLive,
66759
67044
  GitHubService: () => GitHubService,
66760
67045
  GlobSchema: () => GlobSchema,
66761
67046
  HeadingHierarchyRule: () => HeadingHierarchyRule$2,
@@ -66784,7 +67069,6 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
66784
67069
  PreviewReleaseSchema: () => PreviewReleaseSchema,
66785
67070
  ReleasePlanError: () => ReleasePlanError,
66786
67071
  ReleasePlanner: () => ReleasePlanner,
66787
- ReleasePlannerLive: () => ReleasePlannerLive,
66788
67072
  ReorderSectionsPlugin: () => ReorderSectionsPlugin,
66789
67073
  RepoSchema: () => RepoSchema,
66790
67074
  RequiredSectionsRule: () => RequiredSectionsRule$2,