@savvy-web/silk-effects 3.0.3 → 3.2.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.
@@ -237,15 +237,16 @@ function makeShape(inspector) {
237
237
  path,
238
238
  status: "added"
239
239
  }));
240
+ const isOwnChangeset = (path) => path.startsWith(".changeset/") && path.endsWith(".md");
240
241
  const seen = /* @__PURE__ */ new Set();
241
242
  const rawEntries = [];
242
243
  for (const e of diffEntries) {
243
- if (seen.has(e.path)) continue;
244
+ if (seen.has(e.path) || isOwnChangeset(e.path)) continue;
244
245
  seen.add(e.path);
245
246
  rawEntries.push(e);
246
247
  }
247
248
  for (const e of untrackedEntries) {
248
- if (seen.has(e.path)) continue;
249
+ if (seen.has(e.path) || isOwnChangeset(e.path)) continue;
249
250
  seen.add(e.path);
250
251
  rawEntries.push(e);
251
252
  }
@@ -257,7 +257,8 @@ function makeShape(pit, inspector, discovery, detector, config, fs) {
257
257
  fromRef = yield* gitMergeBase(resolvedCwd, baseBranch);
258
258
  }
259
259
  const rawDiffs = computeWorkspaceDependencyDiffs(yield* pit.at(fromRef, { cwd: resolvedCwd }), options.to ? yield* pit.at(options.to, { cwd: resolvedCwd }) : yield* pit.worktree({ cwd: resolvedCwd }));
260
- const targetPkg = options.package;
260
+ const explicitTargets = /* @__PURE__ */ new Set([...options.packages ?? [], ...options.package ? [options.package] : []]);
261
+ const excluded = new Set(options.exclude ?? []);
261
262
  const livePackages = yield* discovery.listPackages(resolvedCwd);
262
263
  const publishable = yield* listPublishablePackageNames(livePackages, resolvedCwd).pipe(Effect.provide(provideDetector));
263
264
  const versionPrivate = yield* config.versionPrivate(resolvedCwd);
@@ -266,9 +267,15 @@ function makeShape(pit, inspector, discovery, detector, config, fs) {
266
267
  if (yield* config.isIgnored(pkg.name, resolvedCwd)) continue;
267
268
  if (publishable.has(pkg.name) || versionPrivate) inScope.add(pkg.name);
268
269
  }
269
- const targetIgnored = targetPkg ? yield* config.isIgnored(targetPkg, resolvedCwd) : false;
270
+ const activeTargets = /* @__PURE__ */ new Set();
271
+ for (const name of explicitTargets) {
272
+ if (excluded.has(name)) continue;
273
+ if (yield* config.isIgnored(name, resolvedCwd)) continue;
274
+ activeTargets.add(name);
275
+ }
276
+ const inScopeFor = (name) => explicitTargets.size > 0 ? activeTargets.has(name) : inScope.has(name) && !excluded.has(name);
270
277
  const keepDevDeps = options.includeDevDeps === true;
271
- const scoped = targetPkg ? targetIgnored ? [] : rawDiffs.filter((d) => d.package === targetPkg) : rawDiffs.filter((d) => inScope.has(d.package));
278
+ const scoped = rawDiffs.filter((d) => inScopeFor(d.package));
272
279
  const resolved = [];
273
280
  for (const diff of scoped) {
274
281
  const rows = keepDevDeps ? [...diff.rows] : diff.rows.filter((r) => r.type !== "devDependency");
@@ -279,7 +286,7 @@ function makeShape(pit, inspector, discovery, detector, config, fs) {
279
286
  }
280
287
  const existingPure = yield* findPureDependencyChangesets(fs, changesetDir);
281
288
  const skippedMixed = yield* findMixedDependencyChangesets(fs, changesetDir);
282
- const toDelete = targetPkg ? targetIgnored ? [] : existingPure.filter((p) => p.package === targetPkg) : existingPure.filter((p) => inScope.has(p.package));
289
+ const toDelete = existingPure.filter((p) => inScopeFor(p.package));
283
290
  const chosenFilenames = /* @__PURE__ */ new Set();
284
291
  const toWrite = [];
285
292
  for (const diff of resolved) {
@@ -43,6 +43,32 @@ const DEP_TYPE_MAP = [
43
43
  */
44
44
  const resolveOrRaw = (snapshot, dep, spec) => Option.getOrElse(snapshot.resolve(dep, spec), () => spec);
45
45
  /**
46
+ * Drop no-net-change field moves: the same dependency removed from one field
47
+ * and added to another with an equal resolved version (e.g. a dep promoted
48
+ * from `devDependencies` to `dependencies`). A field reclassification is a
49
+ * contract change worth release-note prose, not a version movement, so it
50
+ * must not surface as an unrelated removed row plus an added row. Moves that
51
+ * also change the resolved version keep both rows (the movement is real).
52
+ */
53
+ const collapseFieldMoves = (rows) => {
54
+ const dropped = /* @__PURE__ */ new Set();
55
+ const byName = /* @__PURE__ */ new Map();
56
+ for (const row of rows) {
57
+ const group = byName.get(row.dependency);
58
+ if (group) group.push(row);
59
+ else byName.set(row.dependency, [row]);
60
+ }
61
+ for (const group of byName.values()) for (const removed of group) {
62
+ if (removed.action !== "removed" || dropped.has(removed)) continue;
63
+ const added = group.find((r) => r.action === "added" && !dropped.has(r) && r.type !== removed.type && r.to === removed.from);
64
+ if (added) {
65
+ dropped.add(removed);
66
+ dropped.add(added);
67
+ }
68
+ }
69
+ return rows.filter((r) => !dropped.has(r));
70
+ };
71
+ /**
46
72
  * Diff two workspace snapshots and return per-package dependency-table rows,
47
73
  * comparing already-resolved specifier values per side.
48
74
  *
@@ -98,10 +124,11 @@ function computeWorkspaceDependencyDiffs(before, after) {
98
124
  });
99
125
  }
100
126
  }
101
- if (rows.length > 0) result.push({
127
+ const collapsed = collapseFieldMoves(rows);
128
+ if (collapsed.length > 0) result.push({
102
129
  package: afterPkg.name,
103
130
  relativePath: afterPkg.relativePath,
104
- rows: sortDependencyRows(rows)
131
+ rows: sortDependencyRows(collapsed)
105
132
  });
106
133
  }
107
134
  return result;
@@ -0,0 +1,30 @@
1
+ import { Data } from "effect";
2
+
3
+ //#region src/errors/PublishTargetBindingError.ts
4
+ /**
5
+ * Raised when publishability detection selects a directory that the package's
6
+ * `dist/prod/targets.json` binding does not describe.
7
+ *
8
+ * @remarks
9
+ * The bundler's prod build writes `targets.json` naming every byte-group
10
+ * directory it produced. Once that binding exists it is authoritative: the only
11
+ * directories whose bytes may be published are the ones it lists. A detector
12
+ * that returns anything else — most often `publishConfig.directory` pointing at
13
+ * a **dev** build, because silk mode was misdetected — is about to pack an
14
+ * unresolved workspace manifest and ship it to a registry.
15
+ *
16
+ * That is the `yaml-effect@0.7.1` failure: detection picked `dist/dev/pkg`, the
17
+ * dev manifest still carried `catalog:` specifiers, and the published package
18
+ * was uninstallable (`EUNSUPPORTEDPROTOCOL`).
19
+ *
20
+ * @since 3.1.0
21
+ * @public
22
+ */
23
+ var PublishTargetBindingError = class extends Data.TaggedError("PublishTargetBindingError") {
24
+ get message() {
25
+ return `Package ${this.pkg} resolved publish directory "${this.directory}", which is not one of the directories bound by dist/prod/targets.json (${this.boundDirectories.join(", ")}). This means publishability detection did not select the prod build output — refusing to publish before packing an unresolved manifest.`;
26
+ }
27
+ };
28
+
29
+ //#endregion
30
+ export { PublishTargetBindingError };
package/index.d.ts CHANGED
@@ -3,8 +3,6 @@ import { Plugin } from "unified";
3
3
  import { Command, CommandExecutor, FileSystem, Path } from "@effect/platform";
4
4
  import { PackageManagerDetector, PointInTimeReadError, PointInTimeWorkspace, PublishConfig, PublishTarget, PublishabilityDetector, TopologicalSorter, WorkspaceDiscovery, WorkspaceDiscoveryError, WorkspacePackage, WorkspaceRoot, WorkspaceStateSnapshot } from "workspaces-effect";
5
5
  import { PlatformError } from "@effect/platform/Error";
6
-
7
- //#region \0rolldown/runtime.js
8
6
  //#endregion
9
7
  //#region src/changesets/categories/types.d.ts
10
8
  /**
@@ -41,9 +39,13 @@ import { PlatformError } from "@effect/platform/Error";
41
39
  * @public
42
40
  */
43
41
  declare const SectionCategorySchema: Schema.Struct<{
44
- /** Display heading used in CHANGELOG output. */heading: typeof Schema.String; /** Priority for ordering (lower = higher priority). */
45
- priority: typeof Schema.Number; /** Conventional commit types that map to this category. */
46
- commitTypes: Schema.Array$<typeof Schema.String>; /** Brief description for documentation. */
42
+ /** Display heading used in CHANGELOG output. */
43
+ heading: typeof Schema.String;
44
+ /** Priority for ordering (lower = higher priority). */
45
+ priority: typeof Schema.Number;
46
+ /** Conventional commit types that map to this category. */
47
+ commitTypes: Schema.Array$<typeof Schema.String>;
48
+ /** Brief description for documentation. */
47
49
  description: typeof Schema.String;
48
50
  }>;
49
51
  /**
@@ -1682,10 +1684,15 @@ declare const VersionOrEmptySchema: Schema.filter<typeof Schema.String>;
1682
1684
  * @public
1683
1685
  */
1684
1686
  declare const DependencyTableRowSchema: Schema.Struct<{
1685
- /** Package or toolchain name. */dependency: Schema.filter<typeof Schema.String>; /** Dependency type. */
1686
- type: Schema.Literal<["dependency", "devDependency", "peerDependency", "optionalDependency", "workspace", "config"]>; /** Change action. */
1687
- action: Schema.Literal<["added", "updated", "removed"]>; /** Previous version (em dash for added). */
1688
- from: Schema.filter<typeof Schema.String>; /** New version (em dash for removed). */
1687
+ /** Package or toolchain name. */
1688
+ dependency: Schema.filter<typeof Schema.String>;
1689
+ /** Dependency type. */
1690
+ type: Schema.Literal<["dependency", "devDependency", "peerDependency", "optionalDependency", "workspace", "config"]>;
1691
+ /** Change action. */
1692
+ action: Schema.Literal<["added", "updated", "removed"]>;
1693
+ /** Previous version (em dash for added). */
1694
+ from: Schema.filter<typeof Schema.String>;
1695
+ /** New version (em dash for removed). */
1689
1696
  to: Schema.filter<typeof Schema.String>;
1690
1697
  }>;
1691
1698
  /**
@@ -1732,10 +1739,15 @@ interface DependencyTableRow extends Schema.Schema.Type<typeof DependencyTableRo
1732
1739
  * @public
1733
1740
  */
1734
1741
  declare const DependencyTableSchema: Schema.filter<Schema.Array$<Schema.Struct<{
1735
- /** Package or toolchain name. */dependency: Schema.filter<typeof Schema.String>; /** Dependency type. */
1736
- type: Schema.Literal<["dependency", "devDependency", "peerDependency", "optionalDependency", "workspace", "config"]>; /** Change action. */
1737
- action: Schema.Literal<["added", "updated", "removed"]>; /** Previous version (em dash for added). */
1738
- from: Schema.filter<typeof Schema.String>; /** New version (em dash for removed). */
1742
+ /** Package or toolchain name. */
1743
+ dependency: Schema.filter<typeof Schema.String>;
1744
+ /** Dependency type. */
1745
+ type: Schema.Literal<["dependency", "devDependency", "peerDependency", "optionalDependency", "workspace", "config"]>;
1746
+ /** Change action. */
1747
+ action: Schema.Literal<["added", "updated", "removed"]>;
1748
+ /** Previous version (em dash for added). */
1749
+ from: Schema.filter<typeof Schema.String>;
1750
+ /** New version (em dash for removed). */
1739
1751
  to: Schema.filter<typeof Schema.String>;
1740
1752
  }>>>;
1741
1753
  //#endregion
@@ -2097,7 +2109,9 @@ declare class ChangesetLinter {
2097
2109
  * @public
2098
2110
  */
2099
2111
  declare const MaintenanceTriggerSchema: Schema.Struct<{
2100
- /** Package name of the triggering co-member. */name: typeof Schema.String; /** The co-member's new version in the same release plan. */
2112
+ /** Package name of the triggering co-member. */
2113
+ name: typeof Schema.String;
2114
+ /** The co-member's new version in the same release plan. */
2101
2115
  version: typeof Schema.String;
2102
2116
  }>;
2103
2117
  /**
@@ -2112,9 +2126,13 @@ type MaintenanceTrigger = typeof MaintenanceTriggerSchema.Type;
2112
2126
  * @public
2113
2127
  */
2114
2128
  declare const MaintenanceReasonSchema: Schema.Struct<{
2115
- /** Coupling that forced the release; `"unspecified"` when undetermined. */kind: Schema.Literal<["fixed", "linked", "unspecified"]>; /** Triggering co-members; empty for `"unspecified"`. */
2129
+ /** Coupling that forced the release; `"unspecified"` when undetermined. */
2130
+ kind: Schema.Literal<["fixed", "linked", "unspecified"]>;
2131
+ /** Triggering co-members; empty for `"unspecified"`. */
2116
2132
  triggers: Schema.Array$<Schema.Struct<{
2117
- /** Package name of the triggering co-member. */name: typeof Schema.String; /** The co-member's new version in the same release plan. */
2133
+ /** Package name of the triggering co-member. */
2134
+ name: typeof Schema.String;
2135
+ /** The co-member's new version in the same release plan. */
2118
2136
  version: typeof Schema.String;
2119
2137
  }>>;
2120
2138
  }>;
@@ -2311,7 +2329,7 @@ declare const changelogFunctions: ChangelogFunctions;
2311
2329
  *
2312
2330
  * @internal
2313
2331
  */
2314
- declare const ChangesetValidationErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
2332
+ declare const ChangesetValidationErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2315
2333
  readonly _tag: "ChangesetValidationError";
2316
2334
  } & Readonly<A>;
2317
2335
  /**
@@ -2345,9 +2363,13 @@ declare const ChangesetValidationErrorBase: new <A extends Record<string, any> =
2345
2363
  * @public
2346
2364
  */
2347
2365
  declare class ChangesetValidationError extends ChangesetValidationErrorBase<{
2348
- /** File path of the changeset that failed validation. */readonly file?: string | undefined; /** Individual validation issues found. */
2366
+ /** File path of the changeset that failed validation. */
2367
+ readonly file?: string | undefined;
2368
+ /** Individual validation issues found. */
2349
2369
  readonly issues: ReadonlyArray<{
2350
- /** JSON-path to the problematic field. */readonly path: string; /** Human-readable description of the issue. */
2370
+ /** JSON-path to the problematic field. */
2371
+ readonly path: string;
2372
+ /** Human-readable description of the issue. */
2351
2373
  readonly message: string;
2352
2374
  }>;
2353
2375
  }> {
@@ -2363,7 +2385,7 @@ declare class ChangesetValidationError extends ChangesetValidationErrorBase<{
2363
2385
  *
2364
2386
  * @internal
2365
2387
  */
2366
- declare const GitHubApiErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
2388
+ declare const GitHubApiErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2367
2389
  readonly _tag: "GitHubApiError";
2368
2390
  } & Readonly<A>;
2369
2391
  /**
@@ -2399,8 +2421,11 @@ declare const GitHubApiErrorBase: new <A extends Record<string, any> = {}>(args:
2399
2421
  * @public
2400
2422
  */
2401
2423
  declare class GitHubApiError extends GitHubApiErrorBase<{
2402
- /** The API operation that failed (e.g., `"getInfo"`). */readonly operation: string; /** HTTP status code, if available. */
2403
- readonly statusCode?: number | undefined; /** Human-readable failure reason. */
2424
+ /** The API operation that failed (e.g., `"getInfo"`). */
2425
+ readonly operation: string;
2426
+ /** HTTP status code, if available. */
2427
+ readonly statusCode?: number | undefined;
2428
+ /** Human-readable failure reason. */
2404
2429
  readonly reason: string;
2405
2430
  }> {
2406
2431
  get message(): string;
@@ -2419,7 +2444,7 @@ declare class GitHubApiError extends GitHubApiErrorBase<{
2419
2444
  *
2420
2445
  * @internal
2421
2446
  */
2422
- declare const MarkdownParseErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
2447
+ declare const MarkdownParseErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2423
2448
  readonly _tag: "MarkdownParseError";
2424
2449
  } & Readonly<A>;
2425
2450
  /**
@@ -2450,9 +2475,13 @@ declare const MarkdownParseErrorBase: new <A extends Record<string, any> = {}>(a
2450
2475
  * @public
2451
2476
  */
2452
2477
  declare class MarkdownParseError extends MarkdownParseErrorBase<{
2453
- /** Source file path, if known. */readonly source?: string | undefined; /** Human-readable failure reason. */
2454
- readonly reason: string; /** Line number where the error occurred (1-based). */
2455
- readonly line?: number | undefined; /** Column number where the error occurred (1-based). */
2478
+ /** Source file path, if known. */
2479
+ readonly source?: string | undefined;
2480
+ /** Human-readable failure reason. */
2481
+ readonly reason: string;
2482
+ /** Line number where the error occurred (1-based). */
2483
+ readonly line?: number | undefined;
2484
+ /** Column number where the error occurred (1-based). */
2456
2485
  readonly column?: number | undefined;
2457
2486
  }> {
2458
2487
  get message(): string;
@@ -2467,7 +2496,7 @@ declare class MarkdownParseError extends MarkdownParseErrorBase<{
2467
2496
  *
2468
2497
  * @internal
2469
2498
  */
2470
- declare const ConfigurationErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
2499
+ declare const ConfigurationErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2471
2500
  readonly _tag: "ConfigurationError";
2472
2501
  } & Readonly<A>;
2473
2502
  /**
@@ -2498,7 +2527,9 @@ declare const ConfigurationErrorBase: new <A extends Record<string, any> = {}>(a
2498
2527
  * @public
2499
2528
  */
2500
2529
  declare class ConfigurationError extends ConfigurationErrorBase<{
2501
- /** Configuration field that is invalid or missing. */readonly field: string; /** Human-readable failure reason. */
2530
+ /** Configuration field that is invalid or missing. */
2531
+ readonly field: string;
2532
+ /** Human-readable failure reason. */
2502
2533
  readonly reason: string;
2503
2534
  }> {
2504
2535
  get message(): string;
@@ -2513,7 +2544,7 @@ declare class ConfigurationError extends ConfigurationErrorBase<{
2513
2544
  *
2514
2545
  * @internal
2515
2546
  */
2516
- declare const VersionFileErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
2547
+ declare const VersionFileErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2517
2548
  readonly _tag: "VersionFileError";
2518
2549
  } & Readonly<A>;
2519
2550
  /**
@@ -2549,8 +2580,11 @@ declare const VersionFileErrorBase: new <A extends Record<string, any> = {}>(arg
2549
2580
  * @public
2550
2581
  */
2551
2582
  declare class VersionFileError extends VersionFileErrorBase<{
2552
- /** Absolute path to the file that failed. */readonly filePath: string; /** JSONPath expression that failed, if applicable. */
2553
- readonly jsonPath?: string | undefined; /** Human-readable failure reason. */
2583
+ /** Absolute path to the file that failed. */
2584
+ readonly filePath: string;
2585
+ /** JSONPath expression that failed, if applicable. */
2586
+ readonly jsonPath?: string | undefined;
2587
+ /** Human-readable failure reason. */
2554
2588
  readonly reason: string;
2555
2589
  }> {
2556
2590
  get message(): string;
@@ -2564,7 +2598,7 @@ declare class VersionFileError extends VersionFileErrorBase<{
2564
2598
  *
2565
2599
  * @internal
2566
2600
  */
2567
- declare const GitErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
2601
+ declare const GitErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2568
2602
  readonly _tag: "GitError";
2569
2603
  } & Readonly<A>;
2570
2604
  /**
@@ -2596,8 +2630,11 @@ declare const GitErrorBase: new <A extends Record<string, any> = {}>(args: impor
2596
2630
  * @public
2597
2631
  */
2598
2632
  declare class GitError extends GitErrorBase<{
2599
- /** The git command that failed, including arguments. */readonly command: string; /** Working directory in which the command was invoked. */
2600
- readonly cwd: string; /** Human-readable failure reason — typically the captured stderr or thrown error message. */
2633
+ /** The git command that failed, including arguments. */
2634
+ readonly command: string;
2635
+ /** Working directory in which the command was invoked. */
2636
+ readonly cwd: string;
2637
+ /** Human-readable failure reason — typically the captured stderr or thrown error message. */
2601
2638
  readonly reason: string;
2602
2639
  }> {
2603
2640
  get message(): string;
@@ -2611,7 +2648,7 @@ declare class GitError extends GitErrorBase<{
2611
2648
  *
2612
2649
  * @internal
2613
2650
  */
2614
- declare const ChangesetIOErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
2651
+ declare const ChangesetIOErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2615
2652
  readonly _tag: "ChangesetIOError";
2616
2653
  } & Readonly<A>;
2617
2654
  /**
@@ -2643,8 +2680,11 @@ declare const ChangesetIOErrorBase: new <A extends Record<string, any> = {}>(arg
2643
2680
  * @public
2644
2681
  */
2645
2682
  declare class ChangesetIOError extends ChangesetIOErrorBase<{
2646
- /** Absolute path of the file or directory the operation targeted. */readonly path: string; /** The failed operation. */
2647
- readonly operation: "read" | "write" | "delete" | "list"; /** Human-readable failure reason. */
2683
+ /** Absolute path of the file or directory the operation targeted. */
2684
+ readonly path: string;
2685
+ /** The failed operation. */
2686
+ readonly operation: "read" | "write" | "delete" | "list";
2687
+ /** Human-readable failure reason. */
2648
2688
  readonly reason: string;
2649
2689
  }> {
2650
2690
  get message(): string;
@@ -2657,7 +2697,7 @@ declare class ChangesetIOError extends ChangesetIOErrorBase<{
2657
2697
  *
2658
2698
  * @internal
2659
2699
  */
2660
- declare const ReleasePlanErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
2700
+ declare const ReleasePlanErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2661
2701
  readonly _tag: "ReleasePlanError";
2662
2702
  } & Readonly<A>;
2663
2703
  /**
@@ -2671,14 +2711,16 @@ declare const ReleasePlanErrorBase: new <A extends Record<string, any> = {}>(arg
2671
2711
  * @public
2672
2712
  */
2673
2713
  declare class ReleasePlanError extends ReleasePlanErrorBase<{
2674
- /** The phase that failed. */readonly phase: "plan" | "preview" | "apply"; /** Human-readable failure reason. */
2714
+ /** The phase that failed. */
2715
+ readonly phase: "plan" | "preview" | "apply";
2716
+ /** Human-readable failure reason. */
2675
2717
  readonly reason: string;
2676
2718
  }> {
2677
2719
  get message(): string;
2678
2720
  }
2679
2721
  //#endregion
2680
2722
  //#region src/errors/ChangesetConfigError.d.ts
2681
- declare const ChangesetConfigError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
2723
+ declare const ChangesetConfigError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2682
2724
  readonly _tag: "ChangesetConfigError";
2683
2725
  } & Readonly<A>;
2684
2726
  /**
@@ -3197,10 +3239,15 @@ declare const RepoSchema: Schema.filter<typeof Schema.String>;
3197
3239
  * @public
3198
3240
  */
3199
3241
  declare const ChangesetOptionsSchema: Schema.filter<Schema.Struct<{
3200
- /** GitHub repository in `owner/repo` format. */repo: Schema.filter<typeof Schema.String>; /** Whether to include commit hash links in output. */
3201
- commitLinks: Schema.optional<typeof Schema.Boolean>; /** Whether to include pull request links in output. */
3202
- prLinks: Schema.optional<typeof Schema.Boolean>; /** Whether to include issue reference links in output. */
3203
- issueLinks: Schema.optional<typeof Schema.Boolean>; /** Custom issue reference prefixes (e.g., `["#", "GH-"]`). */
3242
+ /** GitHub repository in `owner/repo` format. */
3243
+ repo: Schema.filter<typeof Schema.String>;
3244
+ /** Whether to include commit hash links in output. */
3245
+ commitLinks: Schema.optional<typeof Schema.Boolean>;
3246
+ /** Whether to include pull request links in output. */
3247
+ prLinks: Schema.optional<typeof Schema.Boolean>;
3248
+ /** Whether to include issue reference links in output. */
3249
+ issueLinks: Schema.optional<typeof Schema.Boolean>;
3250
+ /** Custom issue reference prefixes (e.g., `["#", "GH-"]`). */
3204
3251
  issuePrefixes: Schema.optional<Schema.Array$<typeof Schema.String>>;
3205
3252
  /**
3206
3253
  * Per-package release surfaces. Each entry declares `additionalScopes`
@@ -3271,8 +3318,11 @@ interface GitHubCommitInfo {
3271
3318
  pull: number | null;
3272
3319
  /** Markdown-formatted links for the commit, PR, and user. */
3273
3320
  links: {
3274
- /** Link to the commit on GitHub. */commit: string; /** Link to the associated pull request (null if none). */
3275
- pull: string | null; /** Link to the author's GitHub profile (null if unknown). */
3321
+ /** Link to the commit on GitHub. */
3322
+ commit: string;
3323
+ /** Link to the associated pull request (null if none). */
3324
+ pull: string | null;
3325
+ /** Link to the author's GitHub profile (null if unknown). */
3276
3326
  user: string | null;
3277
3327
  };
3278
3328
  }
@@ -3766,8 +3816,20 @@ interface DepsRegenOptions {
3766
3816
  readonly cwd: string;
3767
3817
  /** Override the base branch used to compute the merge-base when `from` is omitted. */
3768
3818
  readonly base?: string;
3769
- /** Restrict regeneration to a single workspace package. */
3819
+ /** Restrict regeneration to a single workspace package. Unioned with {@link DepsRegenOptions.packages}. */
3770
3820
  readonly package?: string;
3821
+ /**
3822
+ * Restrict regeneration to these workspace packages. Like `package`, an
3823
+ * explicit target bypasses the versionable gate but NOT the changeset
3824
+ * ignore list. Unioned with `package` when both are set.
3825
+ */
3826
+ readonly packages?: ReadonlyArray<string>;
3827
+ /**
3828
+ * Drop these packages from scope entirely — no changesets are written for
3829
+ * them and none of their stale pure-dependency changesets are deleted.
3830
+ * Applies to both repo-wide and explicitly-targeted runs (exclude wins).
3831
+ */
3832
+ readonly exclude?: ReadonlyArray<string>;
3771
3833
  /**
3772
3834
  * When `true`, retain `devDependency` rows (the `deps detect` path);
3773
3835
  * when falsy (the `deps regen` default), drop them unconditionally.
@@ -4051,8 +4113,11 @@ declare const ChangesetSummarySchema: Schema.filter<Schema.filter<typeof Schema.
4051
4113
  * @public
4052
4114
  */
4053
4115
  declare const ChangesetSchema: Schema.Struct<{
4054
- /** The changeset summary text. */summary: Schema.filter<Schema.filter<typeof Schema.String>>; /** Unique changeset identifier. */
4055
- id: typeof Schema.String; /** Git commit hash associated with this changeset. */
4116
+ /** The changeset summary text. */
4117
+ summary: Schema.filter<Schema.filter<typeof Schema.String>>;
4118
+ /** Unique changeset identifier. */
4119
+ id: typeof Schema.String;
4120
+ /** Git commit hash associated with this changeset. */
4056
4121
  commit: Schema.optional<Schema.filter<typeof Schema.String>>;
4057
4122
  }>;
4058
4123
  /**
@@ -4129,9 +4194,13 @@ type DependencyType = typeof DependencyTypeSchema.Type;
4129
4194
  * @public
4130
4195
  */
4131
4196
  declare const DependencyUpdateSchema: Schema.Struct<{
4132
- /** Package name (must be non-empty). */name: Schema.refine<string, typeof Schema.String>; /** npm dependency type. */
4133
- type: Schema.Literal<["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"]>; /** Previous version string. */
4134
- oldVersion: typeof Schema.String; /** New version string. */
4197
+ /** Package name (must be non-empty). */
4198
+ name: Schema.refine<string, typeof Schema.String>;
4199
+ /** npm dependency type. */
4200
+ type: Schema.Literal<["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"]>;
4201
+ /** Previous version string. */
4202
+ oldVersion: typeof Schema.String;
4203
+ /** New version string. */
4135
4204
  newVersion: typeof Schema.String;
4136
4205
  }>;
4137
4206
  /**
@@ -4334,11 +4403,17 @@ declare const UrlOrMarkdownLinkSchema: Schema.filter<typeof Schema.String>;
4334
4403
  * @public
4335
4404
  */
4336
4405
  declare const GitHubInfoSchema: Schema.Struct<{
4337
- /** GitHub username of the commit author. */user: Schema.optional<Schema.filter<typeof Schema.String>>; /** Pull request number associated with the commit. */
4338
- pull: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>; /** Markdown-formatted links. */
4406
+ /** GitHub username of the commit author. */
4407
+ user: Schema.optional<Schema.filter<typeof Schema.String>>;
4408
+ /** Pull request number associated with the commit. */
4409
+ pull: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
4410
+ /** Markdown-formatted links. */
4339
4411
  links: Schema.Struct<{
4340
- /** Link to the commit. */commit: Schema.filter<typeof Schema.String>; /** Link to the associated pull request. */
4341
- pull: Schema.optional<Schema.filter<typeof Schema.String>>; /** Link to the author's GitHub profile. */
4412
+ /** Link to the commit. */
4413
+ commit: Schema.filter<typeof Schema.String>;
4414
+ /** Link to the associated pull request. */
4415
+ pull: Schema.optional<Schema.filter<typeof Schema.String>>;
4416
+ /** Link to the author's GitHub profile. */
4342
4417
  user: Schema.optional<Schema.filter<typeof Schema.String>>;
4343
4418
  }>;
4344
4419
  }>;
@@ -4416,7 +4491,9 @@ declare const GlobSchema: Schema.filter<Schema.filter<typeof Schema.String>>;
4416
4491
  * @public
4417
4492
  */
4418
4493
  declare const PackageScopeSchema: Schema.Struct<{
4419
- /** Repo-relative globs naming files outside the package's workspace directory that belong to its release surface. */additionalScopes: Schema.optional<Schema.Array$<Schema.filter<Schema.filter<typeof Schema.String>>>>; /** Files whose JSON fields are bumped in lockstep with this package's version. */
4494
+ /** Repo-relative globs naming files outside the package's workspace directory that belong to its release surface. */
4495
+ additionalScopes: Schema.optional<Schema.Array$<Schema.filter<Schema.filter<typeof Schema.String>>>>;
4496
+ /** Files whose JSON fields are bumped in lockstep with this package's version. */
4420
4497
  versionFiles: Schema.optional<Schema.Array$<Schema.Struct<{
4421
4498
  glob: Schema.filter<typeof Schema.String>;
4422
4499
  paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
@@ -4440,7 +4517,9 @@ interface PackageScope extends Schema.Schema.Type<typeof PackageScopeSchema> {}
4440
4517
  * @public
4441
4518
  */
4442
4519
  declare const PackagesRecordSchema: Schema.Record$<typeof Schema.String, Schema.Struct<{
4443
- /** Repo-relative globs naming files outside the package's workspace directory that belong to its release surface. */additionalScopes: Schema.optional<Schema.Array$<Schema.filter<Schema.filter<typeof Schema.String>>>>; /** Files whose JSON fields are bumped in lockstep with this package's version. */
4520
+ /** Repo-relative globs naming files outside the package's workspace directory that belong to its release surface. */
4521
+ additionalScopes: Schema.optional<Schema.Array$<Schema.filter<Schema.filter<typeof Schema.String>>>>;
4522
+ /** Files whose JSON fields are bumped in lockstep with this package's version. */
4444
4523
  versionFiles: Schema.optional<Schema.Array$<Schema.Struct<{
4445
4524
  glob: Schema.filter<typeof Schema.String>;
4446
4525
  paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
@@ -4558,7 +4637,9 @@ declare const JsonPathSchema: Schema.filter<typeof Schema.String>;
4558
4637
  * @public
4559
4638
  */
4560
4639
  declare const VersionFileConfigSchema: Schema.Struct<{
4561
- /** Glob pattern to match JSON files. */glob: Schema.filter<typeof Schema.String>; /** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
4640
+ /** Glob pattern to match JSON files. */
4641
+ glob: Schema.filter<typeof Schema.String>;
4642
+ /** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
4562
4643
  paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
4563
4644
  }>;
4564
4645
  /**
@@ -4573,7 +4654,9 @@ interface VersionFileConfig extends Schema.Schema.Type<typeof VersionFileConfigS
4573
4654
  * @public
4574
4655
  */
4575
4656
  declare const VersionFilesSchema: Schema.Array$<Schema.Struct<{
4576
- /** Glob pattern to match JSON files. */glob: Schema.filter<typeof Schema.String>; /** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
4657
+ /** Glob pattern to match JSON files. */
4658
+ glob: Schema.filter<typeof Schema.String>;
4659
+ /** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
4577
4660
  paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
4578
4661
  }>>;
4579
4662
  /**
@@ -4611,8 +4694,11 @@ declare const VersionFilesSchema: Schema.Array$<Schema.Struct<{
4611
4694
  * @public
4612
4695
  */
4613
4696
  declare const LegacyVersionFileConfigSchema: Schema.Struct<{
4614
- /** Glob pattern to match JSON files. */glob: Schema.filter<typeof Schema.String>; /** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
4615
- paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>; /** Workspace package name to source the version from, bypassing path-based resolution. */
4697
+ /** Glob pattern to match JSON files. */
4698
+ glob: Schema.filter<typeof Schema.String>;
4699
+ /** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
4700
+ paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
4701
+ /** Workspace package name to source the version from, bypassing path-based resolution. */
4616
4702
  package: Schema.optional<Schema.filter<typeof Schema.String>>;
4617
4703
  }>;
4618
4704
  /**
@@ -4632,8 +4718,11 @@ interface LegacyVersionFileConfig extends Schema.Schema.Type<typeof LegacyVersio
4632
4718
  * @public
4633
4719
  */
4634
4720
  declare const LegacyVersionFilesSchema: Schema.Array$<Schema.Struct<{
4635
- /** Glob pattern to match JSON files. */glob: Schema.filter<typeof Schema.String>; /** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
4636
- paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>; /** Workspace package name to source the version from, bypassing path-based resolution. */
4721
+ /** Glob pattern to match JSON files. */
4722
+ glob: Schema.filter<typeof Schema.String>;
4723
+ /** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
4724
+ paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
4725
+ /** Workspace package name to source the version from, bypassing path-based resolution. */
4637
4726
  package: Schema.optional<Schema.filter<typeof Schema.String>>;
4638
4727
  }>>;
4639
4728
  //#endregion
@@ -6552,7 +6641,7 @@ declare class CommitlintConfig {
6552
6641
  }
6553
6642
  //#endregion
6554
6643
  //#region src/errors/BiomeSyncError.d.ts
6555
- declare const BiomeSyncError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6644
+ declare const BiomeSyncError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6556
6645
  readonly _tag: "BiomeSyncError";
6557
6646
  } & Readonly<A>;
6558
6647
  /**
@@ -6574,7 +6663,7 @@ declare class BiomeSyncError extends BiomeSyncError_base<{
6574
6663
  }
6575
6664
  //#endregion
6576
6665
  //#region src/errors/ConfigNotFoundError.d.ts
6577
- declare const ConfigNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6666
+ declare const ConfigNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6578
6667
  readonly _tag: "ConfigNotFoundError";
6579
6668
  } & Readonly<A>;
6580
6669
  /**
@@ -6595,8 +6684,42 @@ declare class ConfigNotFoundError extends ConfigNotFoundError_base<{
6595
6684
  get message(): string;
6596
6685
  }
6597
6686
  //#endregion
6687
+ //#region src/errors/PublishTargetBindingError.d.ts
6688
+ declare const PublishTargetBindingError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6689
+ readonly _tag: "PublishTargetBindingError";
6690
+ } & Readonly<A>;
6691
+ /**
6692
+ * Raised when publishability detection selects a directory that the package's
6693
+ * `dist/prod/targets.json` binding does not describe.
6694
+ *
6695
+ * @remarks
6696
+ * The bundler's prod build writes `targets.json` naming every byte-group
6697
+ * directory it produced. Once that binding exists it is authoritative: the only
6698
+ * directories whose bytes may be published are the ones it lists. A detector
6699
+ * that returns anything else — most often `publishConfig.directory` pointing at
6700
+ * a **dev** build, because silk mode was misdetected — is about to pack an
6701
+ * unresolved workspace manifest and ship it to a registry.
6702
+ *
6703
+ * That is the `yaml-effect@0.7.1` failure: detection picked `dist/dev/pkg`, the
6704
+ * dev manifest still carried `catalog:` specifiers, and the published package
6705
+ * was uninstallable (`EUNSUPPORTEDPROTOCOL`).
6706
+ *
6707
+ * @since 3.1.0
6708
+ * @public
6709
+ */
6710
+ declare class PublishTargetBindingError extends PublishTargetBindingError_base<{
6711
+ /** The package whose targets were being resolved. */
6712
+ readonly pkg: string;
6713
+ /** The directory detection selected, relative to the package root. */
6714
+ readonly directory: string;
6715
+ /** The group directories the prod binding actually describes. */
6716
+ readonly boundDirectories: ReadonlyArray<string>;
6717
+ }> {
6718
+ get message(): string;
6719
+ }
6720
+ //#endregion
6598
6721
  //#region src/errors/SectionParseError.d.ts
6599
- declare const SectionParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6722
+ declare const SectionParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6600
6723
  readonly _tag: "SectionParseError";
6601
6724
  } & Readonly<A>;
6602
6725
  /**
@@ -6613,7 +6736,7 @@ declare class SectionParseError extends SectionParseError_base<{
6613
6736
  }
6614
6737
  //#endregion
6615
6738
  //#region src/errors/SectionValidationError.d.ts
6616
- declare const SectionValidationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6739
+ declare const SectionValidationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6617
6740
  readonly _tag: "SectionValidationError";
6618
6741
  } & Readonly<A>;
6619
6742
  /**
@@ -6630,7 +6753,7 @@ declare class SectionValidationError extends SectionValidationError_base<{
6630
6753
  }
6631
6754
  //#endregion
6632
6755
  //#region src/errors/SectionWriteError.d.ts
6633
- declare const SectionWriteError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6756
+ declare const SectionWriteError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6634
6757
  readonly _tag: "SectionWriteError";
6635
6758
  } & Readonly<A>;
6636
6759
  /**
@@ -6647,7 +6770,7 @@ declare class SectionWriteError extends SectionWriteError_base<{
6647
6770
  }
6648
6771
  //#endregion
6649
6772
  //#region src/errors/TagFormatError.d.ts
6650
- declare const TagFormatError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6773
+ declare const TagFormatError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6651
6774
  readonly _tag: "TagFormatError";
6652
6775
  } & Readonly<A>;
6653
6776
  /**
@@ -6669,7 +6792,7 @@ declare class TagFormatError extends TagFormatError_base<{
6669
6792
  }
6670
6793
  //#endregion
6671
6794
  //#region src/errors/ToolNotFoundError.d.ts
6672
- declare const ToolNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6795
+ declare const ToolNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6673
6796
  readonly _tag: "ToolNotFoundError";
6674
6797
  } & Readonly<A>;
6675
6798
  /** @public */
@@ -6681,7 +6804,7 @@ declare class ToolNotFoundError extends ToolNotFoundError_base<{
6681
6804
  }
6682
6805
  //#endregion
6683
6806
  //#region src/errors/ToolResolutionError.d.ts
6684
- declare const ToolResolutionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6807
+ declare const ToolResolutionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6685
6808
  readonly _tag: "ToolResolutionError";
6686
6809
  } & Readonly<A>;
6687
6810
  /** @public */
@@ -6693,7 +6816,7 @@ declare class ToolResolutionError extends ToolResolutionError_base<{
6693
6816
  }
6694
6817
  //#endregion
6695
6818
  //#region src/errors/ToolVersionMismatchError.d.ts
6696
- declare const ToolVersionMismatchError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6819
+ declare const ToolVersionMismatchError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6697
6820
  readonly _tag: "ToolVersionMismatchError";
6698
6821
  } & Readonly<A>;
6699
6822
  /** @public */
@@ -6706,7 +6829,7 @@ declare class ToolVersionMismatchError extends ToolVersionMismatchError_base<{
6706
6829
  }
6707
6830
  //#endregion
6708
6831
  //#region src/errors/VersioningDetectionError.d.ts
6709
- declare const VersioningDetectionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6832
+ declare const VersioningDetectionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6710
6833
  readonly _tag: "VersioningDetectionError";
6711
6834
  } & Readonly<A>;
6712
6835
  /**
@@ -6726,7 +6849,7 @@ declare class VersioningDetectionError extends VersioningDetectionError_base<{
6726
6849
  }
6727
6850
  //#endregion
6728
6851
  //#region src/errors/WorkspaceAnalysisError.d.ts
6729
- declare const WorkspaceAnalysisError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6852
+ declare const WorkspaceAnalysisError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
6730
6853
  readonly _tag: "WorkspaceAnalysisError";
6731
6854
  } & Readonly<A>;
6732
6855
  /**
@@ -8096,7 +8219,7 @@ declare const SectionDiff: {
8096
8219
  readonly Unchanged: (args: {
8097
8220
  readonly _tag: "Unchanged";
8098
8221
  }) => any;
8099
- }>(cases: Cases & { [K in Exclude<keyof Cases, "Changed" | "Unchanged">]: never }): (value: {
8222
+ }>(cases: Cases & { [K in Exclude<keyof Cases, "Changed" | "Unchanged">]: never; }): (value: {
8100
8223
  readonly _tag: "Changed";
8101
8224
  readonly added: ReadonlyArray<string>;
8102
8225
  readonly removed: ReadonlyArray<string>;
@@ -8118,7 +8241,7 @@ declare const SectionDiff: {
8118
8241
  readonly removed: ReadonlyArray<string>;
8119
8242
  } | {
8120
8243
  readonly _tag: "Unchanged";
8121
- }, cases: Cases & { [K in Exclude<keyof Cases, "Changed" | "Unchanged">]: never }): import("effect/Unify").Unify<ReturnType<Cases["Changed" | "Unchanged"]>>;
8244
+ }, cases: Cases & { [K in Exclude<keyof Cases, "Changed" | "Unchanged">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Changed" | "Unchanged"]>>;
8122
8245
  };
8123
8246
  readonly Changed: Data.Case.Constructor<{
8124
8247
  readonly _tag: "Changed";
@@ -8178,7 +8301,7 @@ declare const SyncResult: {
8178
8301
  readonly _tag: "Updated";
8179
8302
  readonly diff: SectionDiff;
8180
8303
  }) => any;
8181
- }>(cases: Cases & { [K in Exclude<keyof Cases, "Created" | "Unchanged" | "Updated">]: never }): (value: {
8304
+ }>(cases: Cases & { [K in Exclude<keyof Cases, "Created" | "Unchanged" | "Updated">]: never; }): (value: {
8182
8305
  readonly _tag: "Created";
8183
8306
  } | {
8184
8307
  readonly _tag: "Unchanged";
@@ -8204,7 +8327,7 @@ declare const SyncResult: {
8204
8327
  } | {
8205
8328
  readonly _tag: "Updated";
8206
8329
  readonly diff: SectionDiff;
8207
- }, cases: Cases & { [K in Exclude<keyof Cases, "Created" | "Unchanged" | "Updated">]: never }): import("effect/Unify").Unify<ReturnType<Cases["Created" | "Unchanged" | "Updated"]>>;
8330
+ }, cases: Cases & { [K in Exclude<keyof Cases, "Created" | "Unchanged" | "Updated">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Created" | "Unchanged" | "Updated"]>>;
8208
8331
  };
8209
8332
  readonly Created: Data.Case.Constructor<{
8210
8333
  readonly _tag: "Created";
@@ -8261,7 +8384,7 @@ declare const CheckResult: {
8261
8384
  readonly NotFound: (args: {
8262
8385
  readonly _tag: "NotFound";
8263
8386
  }) => any;
8264
- }>(cases: Cases & { [K in Exclude<keyof Cases, "Found" | "NotFound">]: never }): (value: {
8387
+ }>(cases: Cases & { [K in Exclude<keyof Cases, "Found" | "NotFound">]: never; }): (value: {
8265
8388
  readonly _tag: "Found";
8266
8389
  readonly isUpToDate: boolean;
8267
8390
  readonly diff: SectionDiff;
@@ -8283,7 +8406,7 @@ declare const CheckResult: {
8283
8406
  readonly diff: SectionDiff;
8284
8407
  } | {
8285
8408
  readonly _tag: "NotFound";
8286
- }, cases: Cases & { [K in Exclude<keyof Cases, "Found" | "NotFound">]: never }): import("effect/Unify").Unify<ReturnType<Cases["Found" | "NotFound"]>>;
8409
+ }, cases: Cases & { [K in Exclude<keyof Cases, "Found" | "NotFound">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Found" | "NotFound"]>>;
8287
8410
  };
8288
8411
  readonly Found: Data.Case.Constructor<{
8289
8412
  readonly _tag: "Found";
@@ -8971,7 +9094,7 @@ declare const VersionExtractor: {
8971
9094
  readonly None: (args: {
8972
9095
  readonly _tag: "None";
8973
9096
  }) => any;
8974
- }>(cases: Cases & { [K in Exclude<keyof Cases, "Flag" | "Json" | "None">]: never }): (value: {
9097
+ }>(cases: Cases & { [K in Exclude<keyof Cases, "Flag" | "Json" | "None">]: never; }): (value: {
8975
9098
  readonly _tag: "Flag";
8976
9099
  readonly flag: string;
8977
9100
  readonly parse?: ((output: string) => string) | undefined | undefined;
@@ -9006,7 +9129,7 @@ declare const VersionExtractor: {
9006
9129
  readonly path: string;
9007
9130
  } | {
9008
9131
  readonly _tag: "None";
9009
- }, cases: Cases & { [K in Exclude<keyof Cases, "Flag" | "Json" | "None">]: never }): import("effect/Unify").Unify<ReturnType<Cases["Flag" | "Json" | "None"]>>;
9132
+ }, cases: Cases & { [K in Exclude<keyof Cases, "Flag" | "Json" | "None">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Flag" | "Json" | "None"]>>;
9010
9133
  };
9011
9134
  readonly Flag: Data.Case.Constructor<{
9012
9135
  readonly _tag: "Flag";
@@ -9075,7 +9198,7 @@ declare const ResolutionPolicy: {
9075
9198
  readonly RequireMatch: (args: {
9076
9199
  readonly _tag: "RequireMatch";
9077
9200
  }) => any;
9078
- }>(cases: Cases & { [K in Exclude<keyof Cases, "PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch">]: never }): (value: {
9201
+ }>(cases: Cases & { [K in Exclude<keyof Cases, "PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch">]: never; }): (value: {
9079
9202
  readonly _tag: "PreferGlobal";
9080
9203
  } | {
9081
9204
  readonly _tag: "PreferLocal";
@@ -9105,7 +9228,7 @@ declare const ResolutionPolicy: {
9105
9228
  readonly _tag: "Report";
9106
9229
  } | {
9107
9230
  readonly _tag: "RequireMatch";
9108
- }, cases: Cases & { [K in Exclude<keyof Cases, "PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch">]: never }): import("effect/Unify").Unify<ReturnType<Cases["PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch"]>>;
9231
+ }, cases: Cases & { [K in Exclude<keyof Cases, "PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch"]>>;
9109
9232
  };
9110
9233
  readonly PreferGlobal: Data.Case.Constructor<{
9111
9234
  readonly _tag: "PreferGlobal";
@@ -9173,7 +9296,7 @@ declare const SourceRequirement: {
9173
9296
  readonly OnlyLocal: (args: {
9174
9297
  readonly _tag: "OnlyLocal";
9175
9298
  }) => any;
9176
- }>(cases: Cases & { [K in Exclude<keyof Cases, "Any" | "Both" | "OnlyGlobal" | "OnlyLocal">]: never }): (value: {
9299
+ }>(cases: Cases & { [K in Exclude<keyof Cases, "Any" | "Both" | "OnlyGlobal" | "OnlyLocal">]: never; }): (value: {
9177
9300
  readonly _tag: "Any";
9178
9301
  } | {
9179
9302
  readonly _tag: "Both";
@@ -9203,7 +9326,7 @@ declare const SourceRequirement: {
9203
9326
  readonly _tag: "OnlyGlobal";
9204
9327
  } | {
9205
9328
  readonly _tag: "OnlyLocal";
9206
- }, cases: Cases & { [K in Exclude<keyof Cases, "Any" | "Both" | "OnlyGlobal" | "OnlyLocal">]: never }): import("effect/Unify").Unify<ReturnType<Cases["Any" | "Both" | "OnlyGlobal" | "OnlyLocal"]>>;
9329
+ }, cases: Cases & { [K in Exclude<keyof Cases, "Any" | "Both" | "OnlyGlobal" | "OnlyLocal">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Any" | "Both" | "OnlyGlobal" | "OnlyLocal"]>>;
9207
9330
  };
9208
9331
  readonly Any: Data.Case.Constructor<{
9209
9332
  readonly _tag: "Any";
@@ -9782,8 +9905,19 @@ declare class SilkPublishability {
9782
9905
  * Resolve a package's publish targets via {@link SilkPublishability}, then drop any
9783
9906
  * whose built `directory` package.json is `private: true`. Returned targets keep the
9784
9907
  * detector's original (possibly package-relative) `directory`.
9908
+ *
9909
+ * @remarks
9910
+ * When the prod build has written `dist/prod/targets.json`, that binding is
9911
+ * authoritative: every surviving target's directory must be one of the group
9912
+ * directories it names. A directory outside the binding means detection did
9913
+ * not select the prod output — the `yaml-effect@0.7.1` shape, where a dev
9914
+ * manifest carrying `catalog:` specifiers was packed and published. Rather
9915
+ * than ship those bytes, fail with {@link PublishTargetBindingError}.
9916
+ *
9917
+ * Before the prod build runs there is no binding, and the detector's
9918
+ * placeholder directories are left alone.
9785
9919
  */
9786
- static resolveTargets(pkg: WorkspacePackage, root: string): Effect.Effect<ReadonlyArray<PublishTarget>, never, PublishabilityDetector | FileSystem.FileSystem>;
9920
+ static resolveTargets(pkg: WorkspacePackage, root: string): Effect.Effect<ReadonlyArray<PublishTarget>, PublishTargetBindingError, PublishabilityDetector | FileSystem.FileSystem>;
9787
9921
  /**
9788
9922
  * The publishable, non-ignored packages, resolved through the single
9789
9923
  * {@link SilkPublishability} (which already honors changeset ignore in adaptive mode).
@@ -10288,7 +10422,7 @@ declare class TurboDigest {
10288
10422
  }
10289
10423
  //#endregion
10290
10424
  //#region src/turbo/errors.d.ts
10291
- declare const TurboNotInstalledError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
10425
+ declare const TurboNotInstalledError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
10292
10426
  readonly _tag: "TurboNotInstalledError";
10293
10427
  } & Readonly<A>;
10294
10428
  /**
@@ -10301,7 +10435,7 @@ declare class TurboNotInstalledError extends TurboNotInstalledError_base<{
10301
10435
  }> {
10302
10436
  get message(): string;
10303
10437
  }
10304
- declare const NotATurboRepoError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
10438
+ declare const NotATurboRepoError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
10305
10439
  readonly _tag: "NotATurboRepoError";
10306
10440
  } & Readonly<A>;
10307
10441
  /**
@@ -10314,7 +10448,7 @@ declare class NotATurboRepoError extends NotATurboRepoError_base<{
10314
10448
  }> {
10315
10449
  get message(): string;
10316
10450
  }
10317
- declare const DryRunParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
10451
+ declare const DryRunParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
10318
10452
  readonly _tag: "DryRunParseError";
10319
10453
  } & Readonly<A>;
10320
10454
  /**
@@ -10328,7 +10462,7 @@ declare class DryRunParseError extends DryRunParseError_base<{
10328
10462
  }> {
10329
10463
  get message(): string;
10330
10464
  }
10331
- declare const TurboExecError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
10465
+ declare const TurboExecError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
10332
10466
  readonly _tag: "TurboExecError";
10333
10467
  } & Readonly<A>;
10334
10468
  /**
@@ -10407,5 +10541,5 @@ declare namespace index_d_exports$3 {
10407
10541
  export { AffectedResult, AffectedResultType, CacheDiagnosis, CacheDiagnosisType, DryRunParseError, GlobalHashSummary, GraphNode, MissExplanation, NotATurboRepoError, PackageCacheStatus, TaskGraphResult, TaskGraphResultType, TurboCache, TurboDigest, TurboDryRun, TurboDryRunType, TurboDryTask, TurboDryTaskType, TurboEnvVars, TurboError, TurboExecError, TurboGlobalCacheInputs, TurboInspector, TurboInspectorLive, TurboNotInstalledError };
10408
10542
  }
10409
10543
  //#endregion
10410
- export { AnalyzedWorkspace, BiomeSchemaSync, BiomeSchemaSyncLive, BiomeSyncError, type BiomeSyncOptions, type BiomeSyncResult, ChangesetConfig, ChangesetConfigError, type ChangesetConfigFile, ChangesetConfigLive, ChangesetConfigReader, ChangesetConfigReaderLive, type ChangesetMode, index_d_exports as Changesets, CheckResult, type CheckResultDefinition, type CommentStyle, index_d_exports$1 as Commitlint, type CommitlintPlugin, type CommitlintUserConfig, ConfigDiscovery, ConfigDiscoveryLive, type ConfigDiscoveryOptions, type ConfigLocation, ConfigNotFoundError, type ConfigSource, index_d_exports$2 as Lint, ManagedSection, ManagedSectionLive, type PromptConfig, type PromptSettings, PublishabilityDetectorAdaptiveLive, type PublishablePackage, type RawPackageJson, type RawPublishConfig, type RawPublishTargets, type RawTargetObject, type RawTargetValue, ResolutionPolicy, type ResolutionPolicyDefinition, ResolvedTool, type RuleApplicability, type RuleConfigTuple, type RuleSeverity, type RulesConfig, SavvyBaseSection, SavvyHooksSection, SectionBlock, SectionDefinition, SectionDiff, type SectionDiffDefinition, SectionParseError, SectionValidationError, SectionWriteError, ShellSectionDefinition, type SilkChangesetConfigFile, SilkPublishConfig, SilkPublishability, SilkPublishabilityDetectorLive, SilkWorkspaceAnalyzer, SilkWorkspaceAnalyzerLive, SourceRequirement, type SourceRequirementDefinition, SyncResult, type SyncResultDefinition, TagFormatError, TagStrategy, TagStrategyLive, type TagStrategyType, type TargetBinding, type TargetGroupBinding, type TargetsBinding, ToolCommand, ToolDefinition, ToolDiscovery, ToolDiscoveryLive, ToolNotFoundError, ToolResolutionError, ToolSource, ToolVersionMismatchError, index_d_exports$3 as Turbo, VersionExtractor, type VersionExtractorDefinition, VersioningDetectionError, VersioningStrategy, VersioningStrategyLive, type VersioningStrategyResult, type VersioningStrategyType, WorkspaceAnalysis, WorkspaceAnalysisError, buildSchemaUrl, extractSemver, readTargetsBinding, savvyBasePreamble, savvyHooksHygiene, savvyToolSection };
10544
+ export { AnalyzedWorkspace, BiomeSchemaSync, BiomeSchemaSyncLive, BiomeSyncError, type BiomeSyncOptions, type BiomeSyncResult, ChangesetConfig, ChangesetConfigError, type ChangesetConfigFile, ChangesetConfigLive, ChangesetConfigReader, ChangesetConfigReaderLive, type ChangesetMode, index_d_exports as Changesets, CheckResult, type CheckResultDefinition, type CommentStyle, index_d_exports$1 as Commitlint, type CommitlintPlugin, type CommitlintUserConfig, ConfigDiscovery, ConfigDiscoveryLive, type ConfigDiscoveryOptions, type ConfigLocation, ConfigNotFoundError, type ConfigSource, index_d_exports$2 as Lint, ManagedSection, ManagedSectionLive, type PromptConfig, type PromptSettings, PublishTargetBindingError, PublishabilityDetectorAdaptiveLive, type PublishablePackage, type RawPackageJson, type RawPublishConfig, type RawPublishTargets, type RawTargetObject, type RawTargetValue, ResolutionPolicy, type ResolutionPolicyDefinition, ResolvedTool, type RuleApplicability, type RuleConfigTuple, type RuleSeverity, type RulesConfig, SavvyBaseSection, SavvyHooksSection, SectionBlock, SectionDefinition, SectionDiff, type SectionDiffDefinition, SectionParseError, SectionValidationError, SectionWriteError, ShellSectionDefinition, type SilkChangesetConfigFile, SilkPublishConfig, SilkPublishability, SilkPublishabilityDetectorLive, SilkWorkspaceAnalyzer, SilkWorkspaceAnalyzerLive, SourceRequirement, type SourceRequirementDefinition, SyncResult, type SyncResultDefinition, TagFormatError, TagStrategy, TagStrategyLive, type TagStrategyType, type TargetBinding, type TargetGroupBinding, type TargetsBinding, ToolCommand, ToolDefinition, ToolDiscovery, ToolDiscoveryLive, ToolNotFoundError, ToolResolutionError, ToolSource, ToolVersionMismatchError, index_d_exports$3 as Turbo, VersionExtractor, type VersionExtractorDefinition, VersioningDetectionError, VersioningStrategy, VersioningStrategyLive, type VersioningStrategyResult, type VersioningStrategyType, WorkspaceAnalysis, WorkspaceAnalysisError, buildSchemaUrl, extractSemver, readTargetsBinding, savvyBasePreamble, savvyHooksHygiene, savvyToolSection };
10411
10545
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ChangesetConfigError } from "./errors/ChangesetConfigError.js";
2
2
  import { ChangesetConfigReader, ChangesetConfigReaderLive } from "./services/ChangesetConfigReader.js";
3
+ import { PublishTargetBindingError } from "./errors/PublishTargetBindingError.js";
3
4
  import { ChangesetConfig, ChangesetConfigLive } from "./services/ChangesetConfig.js";
4
5
  import { PublishabilityDetectorAdaptiveLive, SilkPublishability, SilkPublishabilityDetectorLive, readTargetsBinding } from "./services/SilkPublishability.js";
5
6
  import { changesets_exports } from "./changesets/index.js";
@@ -34,4 +35,4 @@ import { SilkWorkspaceAnalyzer, SilkWorkspaceAnalyzerLive } from "./services/Sil
34
35
  import { ToolDiscovery, ToolDiscoveryLive } from "./services/ToolDiscovery.js";
35
36
  import { turbo_exports } from "./turbo/index.js";
36
37
 
37
- export { AnalyzedWorkspace, BiomeSchemaSync, BiomeSchemaSyncLive, BiomeSyncError, ChangesetConfig, ChangesetConfigError, ChangesetConfigLive, ChangesetConfigReader, ChangesetConfigReaderLive, changesets_exports as Changesets, CheckResult, commitlint_exports as Commitlint, ConfigDiscovery, ConfigDiscoveryLive, ConfigNotFoundError, lint_exports as Lint, ManagedSection, ManagedSectionLive, PublishabilityDetectorAdaptiveLive, ResolutionPolicy, ResolvedTool, SavvyBaseSection, SavvyHooksSection, SectionBlock, SectionDefinition, SectionDiff, SectionParseError, SectionValidationError, SectionWriteError, ShellSectionDefinition, SilkPublishConfig, SilkPublishability, SilkPublishabilityDetectorLive, SilkWorkspaceAnalyzer, SilkWorkspaceAnalyzerLive, SourceRequirement, SyncResult, TagFormatError, TagStrategy, TagStrategyLive, ToolCommand, ToolDefinition, ToolDiscovery, ToolDiscoveryLive, ToolNotFoundError, ToolResolutionError, ToolSource, ToolVersionMismatchError, turbo_exports as Turbo, VersionExtractor, VersioningDetectionError, VersioningStrategy, VersioningStrategyLive, WorkspaceAnalysis, WorkspaceAnalysisError, buildSchemaUrl, extractSemver, readTargetsBinding, savvyBasePreamble, savvyHooksHygiene, savvyToolSection };
38
+ export { AnalyzedWorkspace, BiomeSchemaSync, BiomeSchemaSyncLive, BiomeSyncError, ChangesetConfig, ChangesetConfigError, ChangesetConfigLive, ChangesetConfigReader, ChangesetConfigReaderLive, changesets_exports as Changesets, CheckResult, commitlint_exports as Commitlint, ConfigDiscovery, ConfigDiscoveryLive, ConfigNotFoundError, lint_exports as Lint, ManagedSection, ManagedSectionLive, PublishTargetBindingError, PublishabilityDetectorAdaptiveLive, ResolutionPolicy, ResolvedTool, SavvyBaseSection, SavvyHooksSection, SectionBlock, SectionDefinition, SectionDiff, SectionParseError, SectionValidationError, SectionWriteError, ShellSectionDefinition, SilkPublishConfig, SilkPublishability, SilkPublishabilityDetectorLive, SilkWorkspaceAnalyzer, SilkWorkspaceAnalyzerLive, SourceRequirement, SyncResult, TagFormatError, TagStrategy, TagStrategyLive, ToolCommand, ToolDefinition, ToolDiscovery, ToolDiscoveryLive, ToolNotFoundError, ToolResolutionError, ToolSource, ToolVersionMismatchError, turbo_exports as Turbo, VersionExtractor, VersioningDetectionError, VersioningStrategy, VersioningStrategyLive, WorkspaceAnalysis, WorkspaceAnalysisError, buildSchemaUrl, extractSemver, readTargetsBinding, savvyBasePreamble, savvyHooksHygiene, savvyToolSection };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvy-web/silk-effects",
3
- "version": "3.0.3",
3
+ "version": "3.2.0",
4
4
  "private": false,
5
5
  "description": "Shared Effect library for Silk Suite conventions",
6
6
  "homepage": "https://github.com/savvy-web/systems/tree/main/packages/silk-effects",
@@ -1,6 +1,7 @@
1
+ import { PublishTargetBindingError } from "../errors/PublishTargetBindingError.js";
1
2
  import { ChangesetConfig } from "./ChangesetConfig.js";
2
3
  import { Effect, Layer } from "effect";
3
- import { isAbsolute, join } from "node:path";
4
+ import { isAbsolute, join, relative } from "node:path";
4
5
  import { FileSystem } from "@effect/platform";
5
6
  import { PublishTarget, PublishabilityDetector, PublishabilityDetectorLive, WorkspaceDiscovery } from "workspaces-effect";
6
7
 
@@ -119,6 +120,17 @@ var SilkPublishability = class {
119
120
  * Resolve a package's publish targets via {@link SilkPublishability}, then drop any
120
121
  * whose built `directory` package.json is `private: true`. Returned targets keep the
121
122
  * detector's original (possibly package-relative) `directory`.
123
+ *
124
+ * @remarks
125
+ * When the prod build has written `dist/prod/targets.json`, that binding is
126
+ * authoritative: every surviving target's directory must be one of the group
127
+ * directories it names. A directory outside the binding means detection did
128
+ * not select the prod output — the `yaml-effect@0.7.1` shape, where a dev
129
+ * manifest carrying `catalog:` specifiers was packed and published. Rather
130
+ * than ship those bytes, fail with {@link PublishTargetBindingError}.
131
+ *
132
+ * Before the prod build runs there is no binding, and the detector's
133
+ * placeholder directories are left alone.
122
134
  */
123
135
  static resolveTargets(pkg, root) {
124
136
  return Effect.gen(function* () {
@@ -130,6 +142,18 @@ var SilkPublishability = class {
130
142
  const dir = isAbsolute(t.directory) ? t.directory : join(pkg.path, t.directory);
131
143
  if (!(yield* isTargetPrivate(fs, dir))) kept.push(t);
132
144
  }
145
+ const binding = yield* readTargetsBinding(fs, pkg.path);
146
+ if (binding === null) return kept;
147
+ const boundDirectories = binding.groups.map((g) => normalizeDir(g.dir));
148
+ const bound = new Set(boundDirectories);
149
+ for (const t of kept) {
150
+ const relativeDir = normalizeDir(isAbsolute(t.directory) ? relative(pkg.path, t.directory) : t.directory);
151
+ if (!bound.has(relativeDir)) return yield* Effect.fail(new PublishTargetBindingError({
152
+ pkg: pkg.name,
153
+ directory: relativeDir,
154
+ boundDirectories
155
+ }));
156
+ }
133
157
  return kept;
134
158
  });
135
159
  }
@@ -156,6 +180,26 @@ var SilkPublishability = class {
156
180
  });
157
181
  }
158
182
  };
183
+ /**
184
+ * Reduce a directory to a comparable package-relative POSIX path: backslashes to
185
+ * forward slashes, no `./` prefix, no trailing slash. `""` (the package root)
186
+ * normalizes to `.`, matching how a root-directory target is recorded.
187
+ *
188
+ * @remarks
189
+ * Trailing slashes are trimmed with an index scan rather than `/\/+$/`. That
190
+ * regex is unanchored at the start, so the engine retries the match from every
191
+ * position and degrades to O(n²) on a path of many slashes (CodeQL
192
+ * `js/polynomial-redos`). `dir` reaches here from `dist/prod/targets.json`, which
193
+ * the bundler writes but a consumer repo could hand-edit.
194
+ */
195
+ const normalizeDir = (dir) => {
196
+ const slashed = dir.replaceAll("\\", "/");
197
+ const withoutPrefix = slashed.startsWith("./") ? slashed.slice(2) : slashed;
198
+ let end = withoutPrefix.length;
199
+ while (end > 0 && withoutPrefix[end - 1] === "/") end -= 1;
200
+ const normalized = withoutPrefix.slice(0, end);
201
+ return normalized === "" ? "." : normalized;
202
+ };
159
203
  /** True when a built target directory's package.json is `private: true`. Missing/unreadable/malformed → false. */
160
204
  const isTargetPrivate = (fs, targetDir) => fs.readFileString(join(targetDir, "package.json")).pipe(Effect.flatMap((content) => Effect.try({
161
205
  try: () => JSON.parse(content).private === true,