@savvy-web/silk-effects 9.5.4 → 9.6.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.
Files changed (143) hide show
  1. package/_virtual/_rolldown/runtime.js +1 -2
  2. package/changesets/api/categories.js +1 -2
  3. package/changesets/api/changelog.js +1 -2
  4. package/changesets/api/dependency-table.js +1 -2
  5. package/changesets/api/linter.js +1 -2
  6. package/changesets/api/transformer.js +1 -2
  7. package/changesets/categories/index.js +1 -2
  8. package/changesets/categories/types.js +1 -2
  9. package/changesets/changelog/formatting.js +1 -2
  10. package/changesets/changelog/getDependencyReleaseLine.js +1 -2
  11. package/changesets/changelog/getReleaseLine.js +20 -57
  12. package/changesets/changelog/index.js +1 -2
  13. package/changesets/changelog/vanilla.js +1 -2
  14. package/changesets/constants.js +1 -2
  15. package/changesets/errors.js +1 -2
  16. package/changesets/index.js +1 -2
  17. package/changesets/markdownlint/index.js +1 -2
  18. package/changesets/markdownlint/rules/content-structure.js +1 -2
  19. package/changesets/markdownlint/rules/dependency-table-format.js +1 -2
  20. package/changesets/markdownlint/rules/heading-hierarchy.js +1 -2
  21. package/changesets/markdownlint/rules/required-sections.js +1 -2
  22. package/changesets/markdownlint/rules/uncategorized-content.js +1 -2
  23. package/changesets/markdownlint/rules/utils.js +1 -2
  24. package/changesets/remark/plugins/aggregate-dependency-tables.js +1 -2
  25. package/changesets/remark/plugins/contributor-footnotes.js +1 -2
  26. package/changesets/remark/plugins/deduplicate-items.js +1 -2
  27. package/changesets/remark/plugins/issue-link-refs.js +1 -2
  28. package/changesets/remark/plugins/maintenance-note.js +1 -2
  29. package/changesets/remark/plugins/merge-sections.js +1 -2
  30. package/changesets/remark/plugins/normalize-format.js +1 -2
  31. package/changesets/remark/plugins/reorder-sections.js +1 -2
  32. package/changesets/remark/presets.js +1 -2
  33. package/changesets/remark/rules/content-structure.js +1 -2
  34. package/changesets/remark/rules/dependency-table-format.js +1 -2
  35. package/changesets/remark/rules/heading-hierarchy.js +1 -2
  36. package/changesets/remark/rules/required-sections.js +1 -2
  37. package/changesets/remark/rules/uncategorized-content.js +1 -2
  38. package/changesets/schemas/changeset.js +1 -2
  39. package/changesets/schemas/dependency-table.js +1 -2
  40. package/changesets/schemas/deps-regen.js +1 -2
  41. package/changesets/schemas/git.js +1 -2
  42. package/changesets/schemas/github.js +1 -2
  43. package/changesets/schemas/options.js +1 -2
  44. package/changesets/schemas/package-scope.js +1 -2
  45. package/changesets/schemas/primitives.js +1 -2
  46. package/changesets/schemas/release-plan.js +1 -2
  47. package/changesets/schemas/version-files.js +1 -2
  48. package/changesets/services/branch-analyzer.js +1 -2
  49. package/changesets/services/changelog.js +1 -2
  50. package/changesets/services/config-inspector.js +1 -2
  51. package/changesets/services/deps-regen.js +1 -2
  52. package/changesets/services/github.js +1 -2
  53. package/changesets/services/maintenance-reason.js +1 -2
  54. package/changesets/services/release-planner.js +1 -2
  55. package/changesets/utils/commit-parser.js +1 -2
  56. package/changesets/utils/dep-diff.js +1 -2
  57. package/changesets/utils/dependency-section.js +1 -2
  58. package/changesets/utils/dependency-table.js +1 -2
  59. package/changesets/utils/git.js +1 -2
  60. package/changesets/utils/issue-refs.js +1 -2
  61. package/changesets/utils/jsonpath.js +1 -2
  62. package/changesets/utils/logger.js +1 -2
  63. package/changesets/utils/markdown-emit.js +42 -19
  64. package/changesets/utils/markdown-link.js +1 -2
  65. package/changesets/utils/publishability.js +1 -2
  66. package/changesets/utils/remark-pipeline.js +2 -50
  67. package/changesets/utils/section-parser.js +33 -64
  68. package/changesets/utils/strip-frontmatter.js +1 -2
  69. package/changesets/utils/version-blocks.js +1 -2
  70. package/changesets/utils/version-files.js +1 -2
  71. package/changesets/vendor/github-info.js +1 -2
  72. package/commitlint/config/factory.js +1 -2
  73. package/commitlint/config/plugins.js +1 -2
  74. package/commitlint/config/rules.js +1 -2
  75. package/commitlint/config/schema.js +1 -2
  76. package/commitlint/detection/dco.js +1 -2
  77. package/commitlint/detection/scopes.js +1 -2
  78. package/commitlint/formatter/format.js +1 -2
  79. package/commitlint/formatter/messages.js +1 -2
  80. package/commitlint/hook/diagnostics/branch.js +1 -2
  81. package/commitlint/hook/diagnostics/cache.js +1 -2
  82. package/commitlint/hook/diagnostics/commitlint-config.js +1 -2
  83. package/commitlint/hook/diagnostics/open-issues.js +1 -2
  84. package/commitlint/hook/diagnostics/package-manager.js +1 -2
  85. package/commitlint/hook/diagnostics/signing.js +1 -2
  86. package/commitlint/hook/envelope.js +1 -2
  87. package/commitlint/hook/output.js +1 -2
  88. package/commitlint/hook/parse-bash-command.js +1 -2
  89. package/commitlint/hook/rules/closes-trailer.js +1 -2
  90. package/commitlint/hook/rules/forbidden-content.js +1 -2
  91. package/commitlint/hook/rules/plan-leakage.js +1 -2
  92. package/commitlint/hook/rules/signing-flag-conflict.js +1 -2
  93. package/commitlint/hook/rules/soft-wrap.js +1 -2
  94. package/commitlint/hook/rules/types.js +1 -2
  95. package/commitlint/hook/rules/verbosity.js +1 -2
  96. package/commitlint/hook/silence-logger.js +1 -2
  97. package/commitlint/index.js +1 -2
  98. package/commitlint/prompt/config.js +1 -2
  99. package/commitlint/prompt/emojis.js +1 -2
  100. package/commitlint/prompt/prompter.js +1 -2
  101. package/commitlint/static.js +1 -2
  102. package/index.d.ts +87 -251
  103. package/index.js +2 -2
  104. package/lint/Handler.js +1 -2
  105. package/lint/cli/sections.js +1 -2
  106. package/lint/cli/templates/markdownlint.gen.js +1 -2
  107. package/lint/config/Preset.js +1 -2
  108. package/lint/config/createConfig.js +1 -2
  109. package/lint/handlers/Biome.js +1 -2
  110. package/lint/handlers/Markdown.js +1 -2
  111. package/lint/handlers/PackageJson.js +1 -2
  112. package/lint/handlers/PnpmWorkspace.js +1 -2
  113. package/lint/handlers/ShellScripts.js +1 -2
  114. package/lint/handlers/TextFiles.js +1 -2
  115. package/lint/handlers/TypeScript.js +1 -2
  116. package/lint/handlers/Yaml.js +1 -2
  117. package/lint/index.js +1 -2
  118. package/lint/utils/Command.js +1 -2
  119. package/lint/utils/Filter.js +1 -2
  120. package/lint/utils/Workspace.js +1 -2
  121. package/package.json +14 -15
  122. package/repos/constants.js +1 -2
  123. package/repos/errors.js +1 -2
  124. package/repos/index.js +1 -2
  125. package/repos/schemas/drift.js +1 -2
  126. package/repos/schemas/manifest.js +1 -2
  127. package/repos/schemas/reports.js +1 -2
  128. package/repos/services/config-store.js +1 -2
  129. package/repos/services/drift.js +1 -2
  130. package/repos/services/lockdown.js +1 -2
  131. package/repos/services/manager.js +1 -2
  132. package/services/BiomeSchemaSync.js +1 -2
  133. package/services/ChangesetConfig.js +1 -2
  134. package/services/ChangesetConfigReader.js +1 -2
  135. package/services/ConfigDiscovery.js +1 -2
  136. package/services/SilkPublishability.js +147 -6
  137. package/services/SilkWorkspaceAnalyzer.js +1 -2
  138. package/turbo/digest.js +1 -2
  139. package/turbo/errors.js +1 -2
  140. package/turbo/index.js +1 -2
  141. package/turbo/schemas/DryRun.js +1 -2
  142. package/turbo/schemas/results.js +1 -2
  143. package/turbo/services/TurboInspector.js +1 -2
@@ -4,7 +4,7 @@ import { toString } from "mdast-util-to-string";
4
4
  import { lintRule } from "unified-lint-rule";
5
5
  import { visit } from "unist-util-visit";
6
6
 
7
- //#region src/changesets/remark/rules/required-sections.ts
7
+ // src/changesets/remark/rules/required-sections.ts
8
8
  const RequiredSectionsRule = lintRule("remark-lint:changeset-required-sections", (tree, file) => {
9
9
  visit(tree, "heading", (node) => {
10
10
  if (node.depth !== 2) return;
@@ -13,5 +13,4 @@ const RequiredSectionsRule = lintRule("remark-lint:changeset-required-sections",
13
13
  });
14
14
  });
15
15
 
16
- //#endregion
17
16
  export { RequiredSectionsRule };
@@ -1,7 +1,7 @@
1
1
  import { RULE_DOCS } from "../../constants.js";
2
2
  import { lintRule } from "unified-lint-rule";
3
3
 
4
- //#region src/changesets/remark/rules/uncategorized-content.ts
4
+ // src/changesets/remark/rules/uncategorized-content.ts
5
5
  /**
6
6
  * Node types to ignore when detecting uncategorized content (e.g., HTML comments).
7
7
  *
@@ -27,5 +27,4 @@ const UncategorizedContentRule = lintRule("remark-lint:changeset-uncategorized-c
27
27
  }
28
28
  });
29
29
 
30
- //#endregion
31
30
  export { UncategorizedContentRule };
@@ -1,7 +1,7 @@
1
1
  import { CommitHashSchema } from "./git.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/changesets/schemas/changeset.ts
4
+ // src/changesets/schemas/changeset.ts
5
5
  /**
6
6
  * Effect schemas for changeset entries and dependency updates.
7
7
  *
@@ -145,5 +145,4 @@ const DependencyUpdateSchema = Schema.Struct({
145
145
  newVersion: Schema.String
146
146
  });
147
147
 
148
- //#endregion
149
148
  export { ChangesetSchema, ChangesetSummarySchema, DependencyTypeSchema, DependencyUpdateSchema };
@@ -1,7 +1,7 @@
1
1
  import { NonEmptyString } from "./primitives.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/changesets/schemas/dependency-table.ts
4
+ // src/changesets/schemas/dependency-table.ts
5
5
  /**
6
6
  * Effect schemas for structured dependency table entries.
7
7
  *
@@ -213,5 +213,4 @@ const DependencyTableRowSchema = Schema.Struct({
213
213
  */
214
214
  const DependencyTableSchema = Schema.Array(DependencyTableRowSchema).check(Schema.isMinLength(1));
215
215
 
216
- //#endregion
217
216
  export { DependencyActionSchema, DependencyTableRowSchema, DependencyTableSchema, DependencyTableTypeSchema, VERSION_RE, VersionOrEmptySchema };
@@ -2,7 +2,7 @@ import { NonEmptyString } from "./primitives.js";
2
2
  import { DependencyActionSchema, DependencyTableTypeSchema } from "./dependency-table.js";
3
3
  import { Schema } from "effect";
4
4
 
5
- //#region src/changesets/schemas/deps-regen.ts
5
+ // src/changesets/schemas/deps-regen.ts
6
6
  /**
7
7
  * Result schemas for DepsRegen: the side-effect-free regen plan and the result
8
8
  * of applying it.
@@ -74,5 +74,4 @@ const RegenResultSchema = Schema.Struct({
74
74
  coexisting: Schema.Array(CoexistingChangesetSchema)
75
75
  }).annotate({ identifier: "RegenResult" });
76
76
 
77
- //#endregion
78
77
  export { CoexistingChangesetSchema, RegenDiffRowSchema, RegenPlanSchema, RegenResultSchema };
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- //#region src/changesets/schemas/git.ts
3
+ // src/changesets/schemas/git.ts
4
4
  /**
5
5
  * Git-related Effect schemas for commit hashes and version bump types.
6
6
  *
@@ -69,5 +69,4 @@ const VersionTypeSchema = Schema.Literals([
69
69
  "none"
70
70
  ]);
71
71
 
72
- //#endregion
73
72
  export { CommitHashSchema, VersionTypeSchema };
@@ -2,7 +2,7 @@ import { PositiveInteger } from "./primitives.js";
2
2
  import { MARKDOWN_LINK_PATTERN } from "../utils/markdown-link.js";
3
3
  import { Schema } from "effect";
4
4
 
5
- //#region src/changesets/schemas/github.ts
5
+ // src/changesets/schemas/github.ts
6
6
  /**
7
7
  * GitHub-related Effect schemas for usernames, issue numbers, and API responses.
8
8
  *
@@ -170,5 +170,4 @@ const GitHubInfoSchema = Schema.Struct({
170
170
  })
171
171
  });
172
172
 
173
- //#endregion
174
173
  export { GitHubInfoSchema, IssueNumberSchema, UrlOrMarkdownLinkSchema, UsernameSchema };
@@ -3,7 +3,7 @@ import { LegacyVersionFilesSchema } from "./version-files.js";
3
3
  import { PackagesRecordSchema } from "./package-scope.js";
4
4
  import { Effect, Schema } from "effect";
5
5
 
6
- //#region src/changesets/schemas/options.ts
6
+ // src/changesets/schemas/options.ts
7
7
  /**
8
8
  * Changeset configuration option schemas and validation.
9
9
  *
@@ -185,5 +185,4 @@ function validateChangesetOptions(input) {
185
185
  })));
186
186
  }
187
187
 
188
- //#endregion
189
188
  export { ChangesetOptionsSchema, RepoSchema, validateChangesetOptions };
@@ -1,7 +1,7 @@
1
1
  import { VersionFileConfigSchema } from "./version-files.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/changesets/schemas/package-scope.ts
4
+ // src/changesets/schemas/package-scope.ts
5
5
  /**
6
6
  * Schemas for the per-package release-surface configuration introduced in
7
7
  * \@savvy-web/changesets 0.9.0.
@@ -120,5 +120,4 @@ const PackageScopeSchema = Schema.Struct({
120
120
  */
121
121
  const PackagesRecordSchema = Schema.Record(Schema.String, PackageScopeSchema);
122
122
 
123
- //#endregion
124
123
  export { GlobSchema, PackageScopeSchema, PackagesRecordSchema };
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- //#region src/changesets/schemas/primitives.ts
3
+ // src/changesets/schemas/primitives.ts
4
4
  /**
5
5
  * Primitive reusable schemas for common constrained types.
6
6
  *
@@ -67,5 +67,4 @@ const NonEmptyString = Schema.String.check(Schema.isMinLength(1));
67
67
  */
68
68
  const PositiveInteger = Schema.Number.check(Schema.isInt(), Schema.isGreaterThan(0));
69
69
 
70
- //#endregion
71
70
  export { NonEmptyString, PositiveInteger };
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- //#region src/changesets/schemas/release-plan.ts
3
+ // src/changesets/schemas/release-plan.ts
4
4
  /**
5
5
  * Result schemas for the {@link ReleasePlanner} service — the structured
6
6
  * preview of pending releases and the result of a native apply.
@@ -56,5 +56,4 @@ const AppliedReleaseSchema = Schema.Struct({
56
56
  versionFileUpdates: Schema.Array(VersionFileUpdateRecordSchema)
57
57
  }).annotate({ identifier: "AppliedRelease" });
58
58
 
59
- //#endregion
60
59
  export { AppliedReleaseEntrySchema, AppliedReleaseSchema, BumpTypeSchema, ChangesetPreviewSchema, PendingChangesetSchema, PreviewReleaseSchema, VersionFileUpdateRecordSchema };
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- //#region src/changesets/schemas/version-files.ts
3
+ // src/changesets/schemas/version-files.ts
4
4
  /**
5
5
  * Schemas for `versionFiles` configuration entries.
6
6
  *
@@ -146,5 +146,4 @@ const LegacyVersionFileConfigSchema = Schema.Struct({
146
146
  */
147
147
  const LegacyVersionFilesSchema = Schema.Array(LegacyVersionFileConfigSchema);
148
148
 
149
- //#endregion
150
149
  export { JsonPathSchema, LegacyVersionFileConfigSchema, LegacyVersionFilesSchema, VersionFileConfigSchema, VersionFilesSchema };
@@ -3,7 +3,7 @@ import { ClassificationReasonSchema, ConfigInspector } from "./config-inspector.
3
3
  import { Context, Effect, Layer, Option, Schema } from "effect";
4
4
  import { Git } from "@effected/git";
5
5
 
6
- //#region src/changesets/services/branch-analyzer.ts
6
+ // src/changesets/services/branch-analyzer.ts
7
7
  /** Git diff status as reported by `--name-status`. @public */
8
8
  const FileStatusSchema = Schema.Literals([
9
9
  "added",
@@ -163,5 +163,4 @@ function makeBranchAnalyzerTest(fixed) {
163
163
  return Layer.succeed(BranchAnalyzer, { analyzeBranch: () => Effect.succeed(fixed) });
164
164
  }
165
165
 
166
- //#endregion
167
166
  export { BranchAnalysisSchema, BranchAnalyzer, BranchFileEntrySchema, FileStatusSchema, makeBranchAnalyzerTest };
@@ -1,6 +1,6 @@
1
1
  import { Context } from "effect";
2
2
 
3
- //#region src/changesets/services/changelog.ts
3
+ // src/changesets/services/changelog.ts
4
4
  /**
5
5
  * Effect service tag for changelog formatting.
6
6
  *
@@ -33,5 +33,4 @@ import { Context } from "effect";
33
33
  */
34
34
  var ChangelogService = class extends Context.Service()("ChangelogService") {};
35
35
 
36
- //#endregion
37
36
  export { ChangelogService };
@@ -9,7 +9,7 @@ import { GlobPattern, GlobPatternOptions } from "@effected/glob";
9
9
  import { compileAndExpand } from "@effected/walker";
10
10
  import { WorkspaceDiscovery } from "@effected/workspaces";
11
11
 
12
- //#region src/changesets/services/config-inspector.ts
12
+ // src/changesets/services/config-inspector.ts
13
13
  /**
14
14
  * `ConfigInspector` service — surface the project's `.changeset/config.json`
15
15
  * in a structured, validated form that agents and tooling can consume.
@@ -580,5 +580,4 @@ function makeConfigInspectorTest(fixed) {
580
580
  });
581
581
  }
582
582
 
583
- //#endregion
584
583
  export { ClassificationReasonSchema, ClassificationSchema, ConfigInspector, InspectedConfigSchema, ResolvedPackageScopeSchema, ResolvedVersionFileSchema, makeConfigInspectorTest };
@@ -13,7 +13,7 @@ import { Git } from "@effected/git";
13
13
  import { LockfileReader, PublishabilityDetector, WorkspaceCatalogs, WorkspaceDiscovery, WorkspaceSnapshots, Workspaces } from "@effected/workspaces";
14
14
  import { Yaml } from "@effected/yaml";
15
15
 
16
- //#region src/changesets/services/deps-regen.ts
16
+ // src/changesets/services/deps-regen.ts
17
17
  /**
18
18
  * `Changesets.DepsRegen` service — lift the `deps regen` / `deps detect`
19
19
  * orchestration out of the CLI into a `Context.Service` with a
@@ -542,5 +542,4 @@ function makeDepsRegenDefault(options) {
542
542
  */
543
543
  const DepsRegenDefault = makeDepsRegenDefault();
544
544
 
545
- //#endregion
546
545
  export { DepsRegen, DepsRegenDefault, depsChangesetFilename, isPureDependencyChangeset, makeDepsRegenDefault, parseChangesetPackages };
@@ -2,7 +2,7 @@ import { GitHubApiError } from "../errors.js";
2
2
  import { getGitHubInfo } from "../vendor/github-info.js";
3
3
  import { Context, Effect, Layer } from "effect";
4
4
 
5
- //#region src/changesets/services/github.ts
5
+ // src/changesets/services/github.ts
6
6
  /**
7
7
  * GitHub service for fetching commit metadata.
8
8
  *
@@ -160,5 +160,4 @@ function makeGitHubTest(responses) {
160
160
  } });
161
161
  }
162
162
 
163
- //#endregion
164
163
  export { GitHubService, makeGitHubTest };
@@ -1,7 +1,7 @@
1
1
  import { ChangesetConfig } from "../../services/ChangesetConfig.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/changesets/services/maintenance-reason.ts
4
+ // src/changesets/services/maintenance-reason.ts
5
5
  /**
6
6
  * A group co-member whose own changesets forced this release.
7
7
  *
@@ -70,5 +70,4 @@ function deriveMaintenanceReason(release, plan, config) {
70
70
  };
71
71
  }
72
72
 
73
- //#endregion
74
73
  export { MaintenanceReasonSchema, MaintenanceTriggerSchema, deriveMaintenanceReason };
@@ -13,7 +13,7 @@ import { readPreState } from "@changesets/pre";
13
13
  import { readChangesets } from "@changesets/read";
14
14
  import { getPackages } from "@manypkg/get-packages";
15
15
 
16
- //#region src/changesets/services/release-planner.ts
16
+ // src/changesets/services/release-planner.ts
17
17
  /**
18
18
  * `ReleasePlanner` service — drive the genuine changesets release engine to
19
19
  * compute a plan, render a read-only preview, or natively apply a release.
@@ -509,5 +509,4 @@ function applyEffect(root, dryRun, changelogModules, snapshot, onStepOption, ins
509
509
  });
510
510
  }
511
511
 
512
- //#endregion
513
512
  export { ReleasePlanner, extractVersionBlock, makeReleasePlannerTest, withChangelogModules };
@@ -1,4 +1,4 @@
1
- //#region src/changesets/utils/commit-parser.ts
1
+ // src/changesets/utils/commit-parser.ts
2
2
  /**
3
3
  * Matches conventional commit format: `type(scope)!: description`.
4
4
  *
@@ -58,5 +58,4 @@ function parseCommitMessage(message) {
58
58
  return { description: message };
59
59
  }
60
60
 
61
- //#endregion
62
61
  export { parseCommitMessage };
@@ -2,7 +2,7 @@ import { sortDependencyRows } from "./dependency-table.js";
2
2
  import { Option } from "effect";
3
3
  import { WorkspaceStateSnapshot } from "@effected/workspaces";
4
4
 
5
- //#region src/changesets/utils/dep-diff.ts
5
+ // src/changesets/utils/dep-diff.ts
6
6
  /**
7
7
  * Compute per-workspace-package dependency-table rows from two
8
8
  * {@link WorkspaceStateSnapshot}s, resolving `catalog:` / `workspace:`
@@ -151,5 +151,4 @@ function computeWorkspaceDependencyDiffs(before, after) {
151
151
  return result;
152
152
  }
153
153
 
154
- //#endregion
155
154
  export { computeWorkspaceDependencyDiffs };
@@ -1,4 +1,4 @@
1
- //#region src/changesets/utils/dependency-section.ts
1
+ // src/changesets/utils/dependency-section.ts
2
2
  /**
3
3
  * Scan a `## Dependencies` section starting at the node AFTER its heading.
4
4
  *
@@ -30,5 +30,4 @@ function scanDependencySection(nodes, startIndex, adapter) {
30
30
  };
31
31
  }
32
32
 
33
- //#endregion
34
33
  export { scanDependencySection };
@@ -3,7 +3,7 @@ import { stringifyMarkdown } from "./remark-pipeline.js";
3
3
  import { Schema } from "effect";
4
4
  import { toString } from "mdast-util-to-string";
5
5
 
6
- //#region src/changesets/utils/dependency-table.ts
6
+ // src/changesets/utils/dependency-table.ts
7
7
  /**
8
8
  * Dependency table utilities for parsing, serializing, collapsing, and sorting
9
9
  * dependency table rows between MDAST table nodes and typed representations.
@@ -354,5 +354,4 @@ function sortDependencyRows(rows) {
354
354
  });
355
355
  }
356
356
 
357
- //#endregion
358
357
  export { collapseDependencyRows, parseDependencyTable, serializeDependencyTable, serializeDependencyTableToMarkdown, sortDependencyRows };
@@ -3,7 +3,7 @@ import { Effect, Option } from "effect";
3
3
  import { basename } from "node:path";
4
4
  import { Git } from "@effected/git";
5
5
 
6
- //#region src/changesets/utils/git.ts
6
+ // src/changesets/utils/git.ts
7
7
  /**
8
8
  * Git helpers for the changesets deps regen/detect orchestration.
9
9
  *
@@ -105,5 +105,4 @@ function gitShowFileAtRef(cwd, ref, path) {
105
105
  });
106
106
  }
107
107
 
108
- //#endregion
109
108
  export { gitListChangesetFilesAtRef, gitMergeBase, gitResolveRef, gitShowFileAtRef };
@@ -1,6 +1,6 @@
1
1
  import { collectReferenceLists, keywordFamily } from "@effected/github-references";
2
2
 
3
- //#region src/changesets/utils/issue-refs.ts
3
+ // src/changesets/utils/issue-refs.ts
4
4
  /**
5
5
  * The output category each keyword family lands in.
6
6
  *
@@ -66,5 +66,4 @@ function parseIssueReferences(commitMessage) {
66
66
  return references;
67
67
  }
68
68
 
69
- //#endregion
70
69
  export { parseIssueReferences };
@@ -1,4 +1,4 @@
1
- //#region src/changesets/utils/jsonpath.ts
1
+ // src/changesets/utils/jsonpath.ts
2
2
  /**
3
3
  * Tokenize a JSONPath string into segments.
4
4
  *
@@ -148,5 +148,4 @@ function jsonPathResolve(obj, path) {
148
148
  return walkJsonPath(obj, path).map((entry) => entry.path);
149
149
  }
150
150
 
151
- //#endregion
152
151
  export { jsonPathGet, jsonPathResolve, parseJsonPath };
@@ -1,6 +1,6 @@
1
1
  import { Context, Effect } from "effect";
2
2
 
3
- //#region src/changesets/utils/logger.ts
3
+ // src/changesets/utils/logger.ts
4
4
  /**
5
5
  * Warning output for changelog generation, parameterised by a
6
6
  * {@link ChangesetLogMode} reference instead of an ambient environment read.
@@ -60,5 +60,4 @@ function logWarning(message, ...args) {
60
60
  });
61
61
  }
62
62
 
63
- //#endregion
64
63
  export { ChangesetLogMode, logWarning };
@@ -1,7 +1,7 @@
1
1
  import { Result } from "effect";
2
- import { Markdown, Mdast } from "@effected/markdown";
2
+ import { Code, Markdown, MarkdownTransform, Mdast } from "@effected/markdown";
3
3
 
4
- //#region src/changesets/utils/markdown-emit.ts
4
+ // src/changesets/utils/markdown-emit.ts
5
5
  /**
6
6
  * Unwrap a `Result` from the kit's emit boundary, converting a typed failure
7
7
  * into a defect.
@@ -37,26 +37,16 @@ function unwrap(result, context) {
37
37
  * the kit's own per-node fidelity field, `fenceChar`, post-decode. It has to
38
38
  * happen post-decode: `Mdast.fromMdast` drops non-mdast fields from foreign
39
39
  * trees, so a `fenceChar` set on the plain tree would never survive the
40
- * boundary. Nodes are copied only where a default is applied; everything
41
- * else is returned by reference.
40
+ * boundary. `MarkdownTransform.map` rebuilds only the paths to a changed
41
+ * code node; every other subtree is returned by reference.
42
42
  *
43
43
  * @internal
44
44
  */
45
45
  function ensureFencedCode(node) {
46
- let result = node;
47
- const children = node.children;
48
- if (children !== void 0) {
49
- const mapped = children.map(ensureFencedCode);
50
- if (mapped.some((child, index) => child !== children[index])) result = {
51
- ...node,
52
- children: mapped
53
- };
54
- }
55
- if (result.type === "code" && result.lang === void 0 && result.fenceChar === void 0) return {
56
- ...result,
46
+ return MarkdownTransform.map(node, { code: (code) => code.lang === void 0 && code.fenceChar === void 0 ? new Code({
47
+ ...code,
57
48
  fenceChar: "`"
58
- };
59
- return result;
49
+ }) : code });
60
50
  }
61
51
  /**
62
52
  * Serialize a plain MDAST tree to canonical markdown.
@@ -81,6 +71,39 @@ function emitMarkdown(tree) {
81
71
  const fenced = ensureFencedCode(unwrap(Mdast.fromMdastResult(tree), "markdown emit: mdast tree failed to decode"));
82
72
  return unwrap(Markdown.stringifyResult(fenced), "markdown emit: canonical stringify failed");
83
73
  }
74
+ /**
75
+ * Parse markdown text straight into `@effected/markdown`'s node classes (GFM
76
+ * dialect, frontmatter capture off).
77
+ *
78
+ * @remarks
79
+ * Synchronous for the same reason as {@link emitMarkdown}; the kit's parser
80
+ * is total over text, so a failure here is a defect (the nesting-depth
81
+ * hardening guard), not an operational condition.
82
+ *
83
+ * @param text - The markdown source
84
+ * @returns The parsed kit root
85
+ *
86
+ * @internal
87
+ */
88
+ function parseKitMarkdown(text) {
89
+ const parsed = unwrap(Markdown.parseResult(text), "markdown parse: canonical parse failed");
90
+ return unwrap(Mdast.fromMdastResult(Mdast.toMdast(parsed)), "markdown parse: fidelity strip failed");
91
+ }
92
+ /**
93
+ * Serialize a kit root, or a single kit block node, to canonical markdown.
94
+ *
95
+ * @remarks
96
+ * The kit-tree twin of {@link emitMarkdown}: the same fence normalization,
97
+ * then `Markdown.stringifyResult`. A lone block node emits byte-identically
98
+ * to a one-child root, trailing newline included.
99
+ *
100
+ * @param node - The kit root or block node to serialize
101
+ * @returns Canonical markdown text
102
+ *
103
+ * @internal
104
+ */
105
+ function emitKitMarkdown(node) {
106
+ return unwrap(Markdown.stringifyResult(ensureFencedCode(node)), "markdown emit: canonical stringify failed");
107
+ }
84
108
 
85
- //#endregion
86
- export { emitMarkdown };
109
+ export { emitKitMarkdown, emitMarkdown, parseKitMarkdown };
@@ -1,4 +1,4 @@
1
- //#region src/changesets/utils/markdown-link.ts
1
+ // src/changesets/utils/markdown-link.ts
2
2
  /**
3
3
  * Pattern matching markdown link format: `[text](url)`.
4
4
  *
@@ -39,5 +39,4 @@ function extractUrlFromMarkdown(linkOrUrl) {
39
39
  return match ? match[2] : linkOrUrl;
40
40
  }
41
41
 
42
- //#endregion
43
42
  export { MARKDOWN_LINK_PATTERN, extractUrlFromMarkdown };
@@ -1,7 +1,7 @@
1
1
  import { Effect } from "effect";
2
2
  import { PublishabilityDetector } from "@effected/workspaces";
3
3
 
4
- //#region src/changesets/utils/publishability.ts
4
+ // src/changesets/utils/publishability.ts
5
5
  /**
6
6
  * Compute the set of currently-publishable workspace package names.
7
7
  *
@@ -33,5 +33,4 @@ function listPublishablePackageNames(packages, _root) {
33
33
  });
34
34
  }
35
35
 
36
- //#endregion
37
36
  export { listPublishablePackageNames };
@@ -3,54 +3,7 @@ import remarkGfm from "remark-gfm";
3
3
  import remarkParse from "remark-parse";
4
4
  import { unified } from "unified";
5
5
 
6
- //#region src/changesets/utils/remark-pipeline.ts
7
- /**
8
- * Create a unified processor configured with remark-parse and remark-gfm.
9
- *
10
- * @remarks
11
- * Each call creates a fresh processor instance. The plugin chain is:
12
- * 1. `remark-parse` — markdown to MDAST
13
- * 2. `remark-gfm` — GitHub Flavored Markdown extensions (tables, etc.)
14
- *
15
- * The processor carries no compiler: stringification goes through
16
- * {@link stringifyMarkdown}, never `processor.stringify`.
17
- *
18
- * @privateRemarks
19
- * Return type is intentionally inferred because the unified `Processor`
20
- * generic signature is complex and parameterized by the plugin chain.
21
- *
22
- * @returns A configured unified processor
23
- *
24
- * @internal
25
- */
26
- function createRemarkProcessor() {
27
- return unified().use(remarkParse).use(remarkGfm);
28
- }
29
- /**
30
- * Parse a markdown string into an MDAST AST synchronously.
31
- *
32
- * @remarks
33
- * Uses {@link createRemarkProcessor} internally. The returned tree
34
- * includes GFM extensions (tables, strikethrough, etc.) thanks to
35
- * the remark-gfm plugin.
36
- *
37
- * @param content - Raw markdown string
38
- * @returns The parsed MDAST root node
39
- *
40
- * @example
41
- * ```typescript
42
- * import { parseMarkdown } from "../utils/remark-pipeline.js";
43
- *
44
- * const tree = parseMarkdown("## Version 1.0.0\n\nInitial release.");
45
- * // tree.type === "root"
46
- * // tree.children[0].type === "heading"
47
- * ```
48
- *
49
- * @internal
50
- */
51
- function parseMarkdown(content) {
52
- return createRemarkProcessor().parse(content);
53
- }
6
+ // src/changesets/utils/remark-pipeline.ts
54
7
  /**
55
8
  * Stringify an MDAST AST back to markdown text synchronously.
56
9
  *
@@ -79,5 +32,4 @@ function stringifyMarkdown(tree) {
79
32
  return emitMarkdown(tree);
80
33
  }
81
34
 
82
- //#endregion
83
- export { createRemarkProcessor, parseMarkdown, stringifyMarkdown };
35
+ export { stringifyMarkdown };