import { Context, Effect, FileSystem, Layer, Path, Schema } from "effect"; import { ChildProcessSpawner } from "effect/unstable/process"; import { PublishabilityDetector, WorkspaceDiscovery, WorkspaceDiscoveryFailure, WorkspacePackage, WorkspaceSnapshotAtFailure, WorkspaceSnapshotWorktreeFailure, WorkspaceSnapshots, WorkspaceStateSnapshot, WorkspacesOptions } from "@effected/workspaces"; import { Git } from "@effected/git"; import * as PlatformError from "effect/PlatformError"; import "@effected/templates"; import "@effected/commands"; //#region ../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts // ## Interfaces /** * Info associated with nodes by the ecosystem. * * This space is guaranteed to never be specified by unist or specifications * implementing unist. * But you can use it in utilities and plugins to store data. * * This type can be augmented to register custom data. * For example: * * ```ts * declare module 'unist' { * interface Data { * // `someNode.data.myId` is typed as `number | undefined` * myId?: number | undefined * } * } * ``` */ interface Data$5 {} /** * One place in a source file. */ interface Point$1 { /** * Line in a source file (1-indexed integer). */ line: number; /** * Column in a source file (1-indexed integer). */ column: number; /** * Character in a source file (0-indexed integer). */ offset?: number | undefined; } /** * Position of a node in a source document. * * A position is a range between two points. */ interface Position$1 { /** * Place of the first character of the parsed source region. */ start: Point$1; /** * Place of the first character after the parsed source region. */ end: Point$1; } /** * Abstract unist node. * * The syntactic unit in unist syntax trees are called nodes. * * This interface is supposed to be extended. * If you can use {@link Literal} or {@link Parent}, you should. * But for example in markdown, a `thematicBreak` (`***`), is neither literal * nor parent, but still a node. */ interface Node$3 { /** * Node type. */ type: string; /** * Info from the ecosystem. */ data?: Data$5 | undefined; /** * Position of a node in a source document. * * Nodes that are generated (not in the original source document) must not * have a position. */ position?: Position$1 | undefined; } //#endregion //#region ../../node_modules/.pnpm/unified-lint-rule@3.0.1/node_modules/unified-lint-rule/lib/index.d.ts /** * Severity label; * `'off'`: `0`, `'on'` and `warn`: `1`, `'error'`: `2`. */ type Label$1 = "error" | "on" | "off" | "warn"; /** * Severity number; * `0`: `'off'`, `1`: `'on'` and `warn`, `2`: `'error'`. */ type Severity$1 = 0 | 1 | 2; //#endregion //#region ../../node_modules/.pnpm/vfile-message@4.0.3/node_modules/vfile-message/lib/index.d.ts /** * Message. */ declare class VFileMessage extends Error { /** * Create a message for `reason`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {Options | null | undefined} [options] * @returns * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns * Instance of `VFileMessage`. */ constructor(reason: string, options?: Options$2 | null | undefined); /** * Create a message for `reason`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {Options | null | undefined} [options] * @returns * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns * Instance of `VFileMessage`. */ constructor(reason: string, parent: Node$3 | NodeLike$1 | null | undefined, origin?: string | null | undefined); /** * Create a message for `reason`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {Options | null | undefined} [options] * @returns * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns * Instance of `VFileMessage`. */ constructor(reason: string, place: Point$1 | Position$1 | null | undefined, origin?: string | null | undefined); /** * Create a message for `reason`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {Options | null | undefined} [options] * @returns * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns * Instance of `VFileMessage`. */ constructor(reason: string, origin?: string | null | undefined); /** * Create a message for `reason`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {Options | null | undefined} [options] * @returns * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns * Instance of `VFileMessage`. */ constructor(cause: Error | VFileMessage, parent: Node$3 | NodeLike$1 | null | undefined, origin?: string | null | undefined); /** * Create a message for `reason`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {Options | null | undefined} [options] * @returns * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns * Instance of `VFileMessage`. */ constructor(cause: Error | VFileMessage, place: Point$1 | Position$1 | null | undefined, origin?: string | null | undefined); /** * Create a message for `reason`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {Options | null | undefined} [options] * @returns * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns * Instance of `VFileMessage`. */ constructor(cause: Error | VFileMessage, origin?: string | null | undefined); /** * Stack of ancestor nodes surrounding the message. * * @type {Array | undefined} */ ancestors: Array | undefined; /** * Starting column of message. * * @type {number | undefined} */ column: number | undefined; /** * State of problem. * * * `true` β€” error, file not usable * * `false` β€” warning, change may be needed * * `undefined` β€” change likely not needed * * @type {boolean | null | undefined} */ fatal: boolean | null | undefined; /** * Path of a file (used throughout the `VFile` ecosystem). * * @type {string | undefined} */ file: string | undefined; /** * Starting line of error. * * @type {number | undefined} */ line: number | undefined; /** * Place of message. * * @type {Point | Position | undefined} */ place: Point$1 | Position$1 | undefined; /** * Reason for message, should use markdown. * * @type {string} */ reason: string; /** * Category of message (example: `'my-rule'`). * * @type {string | undefined} */ ruleId: string | undefined; /** * Namespace of message (example: `'my-package'`). * * @type {string | undefined} */ source: string | undefined; /** * Specify the source value that’s being reported, which is deemed * incorrect. * * @type {string | undefined} */ actual: string | undefined; /** * Suggest acceptable values that can be used instead of `actual`. * * @type {Array | undefined} */ expected: Array | undefined; /** * Long form description of the message (you should use markdown). * * @type {string | undefined} */ note: string | undefined; /** * Link to docs for the message. * * > πŸ‘‰ **Note**: this must be an absolute URL that can be passed as `x` * > to `new URL(x)`. * * @type {string | undefined} */ url: string | undefined; } type NodeLike$1 = object & { type: string; position?: Position$1 | undefined; }; /** * Configuration. */ type Options$2 = { /** * Stack of (inclusive) ancestor nodes surrounding the message (optional). */ ancestors?: Array | null | undefined; /** * Original error cause of the message (optional). */ cause?: Error | null | undefined; /** * Place of message (optional). */ place?: Point$1 | Position$1 | null | undefined; /** * Category of message (optional, example: `'my-rule'`). */ ruleId?: string | null | undefined; /** * Namespace of who sent the message (optional, example: `'my-package'`). */ source?: string | null | undefined; }; //#endregion //#region ../../node_modules/.pnpm/vfile-message@4.0.3/node_modules/vfile-message/index.d.ts type Options$1 = Options$2; //#endregion //#region ../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.d.ts declare class VFile { /** * Create a new virtual file. * * `options` is treated as: * * * `string` or `Uint8Array` β€” `{value: options}` * * `URL` β€” `{path: options}` * * `VFile` β€” shallow copies its data over to the new file * * `object` β€” all fields are shallow copied over to the new file * * Path related fields are set in the following order (least specific to * most specific): `history`, `path`, `basename`, `stem`, `extname`, * `dirname`. * * You cannot set `dirname` or `extname` without setting either `history`, * `path`, `basename`, or `stem` too. * * @param {Compatible | null | undefined} [value] * File value. * @returns * New instance. */ constructor(value?: Compatible$1 | null | undefined); /** * Base of `path` (default: `process.cwd()` or `'/'` in browsers). * * @type {string} */ cwd: string; /** * Place to store custom info (default: `{}`). * * It’s OK to store custom data directly on the file but moving it to * `data` is recommended. * * @type {Data} */ data: Data$4; /** * List of file paths the file moved between. * * The first is the original path and the last is the current path. * * @type {Array} */ history: Array; /** * List of messages associated with the file. * * @type {Array} */ messages: Array; /** * Raw value. * * @type {Value} */ value: Value$1; /** * Source map. * * This type is equivalent to the `RawSourceMap` type from the `source-map` * module. * * @type {Map | null | undefined} */ map: Map$1 | null | undefined; /** * Custom, non-string, compiled, representation. * * This is used by unified to store non-string results. * One example is when turning markdown into React nodes. * * @type {unknown} */ result: unknown; /** * Whether a file was saved to disk. * * This is used by vfile reporters. * * @type {boolean} */ stored: boolean; /** * Set basename (including extname) (`'index.min.js'`). * * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'` * on windows). * Cannot be nullified (use `file.path = file.dirname` instead). * * @param {string} basename * Basename. * @returns {undefined} * Nothing. */ set basename(basename: string); /** * Get the basename (including extname) (example: `'index.min.js'`). * * @returns {string | undefined} * Basename. */ get basename(): string | undefined; /** * Set the full path (example: `'~/index.min.js'`). * * Cannot be nullified. * You can set a file URL (a `URL` object with a `file:` protocol) which will * be turned into a path with `url.fileURLToPath`. * * @param {URL | string} path * Path. * @returns {undefined} * Nothing. */ set path(path: string | URL); /** * Get the full path (example: `'~/index.min.js'`). * * @returns {string} * Path. */ get path(): string; /** * Set the parent path (example: `'~'`). * * Cannot be set if there’s no `path` yet. * * @param {string | undefined} dirname * Dirname. * @returns {undefined} * Nothing. */ set dirname(dirname: string | undefined); /** * Get the parent path (example: `'~'`). * * @returns {string | undefined} * Dirname. */ get dirname(): string | undefined; /** * Set the extname (including dot) (example: `'.js'`). * * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'` * on windows). * Cannot be set if there’s no `path` yet. * * @param {string | undefined} extname * Extname. * @returns {undefined} * Nothing. */ set extname(extname: string | undefined); /** * Get the extname (including dot) (example: `'.js'`). * * @returns {string | undefined} * Extname. */ get extname(): string | undefined; /** * Set the stem (basename w/o extname) (example: `'index.min'`). * * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'` * on windows). * Cannot be nullified (use `file.path = file.dirname` instead). * * @param {string} stem * Stem. * @returns {undefined} * Nothing. */ set stem(stem: string); /** * Get the stem (basename w/o extname) (example: `'index.min'`). * * @returns {string | undefined} * Stem. */ get stem(): string | undefined; /** * Create a fatal message for `reason` associated with the file. * * The `fatal` field of the message is set to `true` (error; file not usable) * and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {never} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {never} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {never} * Never. * @throws {VFileMessage} * Message. */ fail(reason: string, options?: Options$1 | null | undefined): never; /** * Create a fatal message for `reason` associated with the file. * * The `fatal` field of the message is set to `true` (error; file not usable) * and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {never} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {never} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {never} * Never. * @throws {VFileMessage} * Message. */ fail(reason: string, parent: Node$3 | NodeLike | null | undefined, origin?: string | null | undefined): never; /** * Create a fatal message for `reason` associated with the file. * * The `fatal` field of the message is set to `true` (error; file not usable) * and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {never} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {never} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {never} * Never. * @throws {VFileMessage} * Message. */ fail(reason: string, place: Point$1 | Position$1 | null | undefined, origin?: string | null | undefined): never; /** * Create a fatal message for `reason` associated with the file. * * The `fatal` field of the message is set to `true` (error; file not usable) * and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {never} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {never} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {never} * Never. * @throws {VFileMessage} * Message. */ fail(reason: string, origin?: string | null | undefined): never; /** * Create a fatal message for `reason` associated with the file. * * The `fatal` field of the message is set to `true` (error; file not usable) * and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {never} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {never} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {never} * Never. * @throws {VFileMessage} * Message. */ fail(cause: Error | VFileMessage, parent: Node$3 | NodeLike | null | undefined, origin?: string | null | undefined): never; /** * Create a fatal message for `reason` associated with the file. * * The `fatal` field of the message is set to `true` (error; file not usable) * and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {never} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {never} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {never} * Never. * @throws {VFileMessage} * Message. */ fail(cause: Error | VFileMessage, place: Point$1 | Position$1 | null | undefined, origin?: string | null | undefined): never; /** * Create a fatal message for `reason` associated with the file. * * The `fatal` field of the message is set to `true` (error; file not usable) * and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {never} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {never} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {never} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {never} * Never. * @throws {VFileMessage} * Message. */ fail(cause: Error | VFileMessage, origin?: string | null | undefined): never; /** * Create an info message for `reason` associated with the file. * * The `fatal` field of the message is set to `undefined` (info; change * likely not needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ info(reason: string, options?: Options$1 | null | undefined): VFileMessage; /** * Create an info message for `reason` associated with the file. * * The `fatal` field of the message is set to `undefined` (info; change * likely not needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ info(reason: string, parent: Node$3 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage; /** * Create an info message for `reason` associated with the file. * * The `fatal` field of the message is set to `undefined` (info; change * likely not needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ info(reason: string, place: Point$1 | Position$1 | null | undefined, origin?: string | null | undefined): VFileMessage; /** * Create an info message for `reason` associated with the file. * * The `fatal` field of the message is set to `undefined` (info; change * likely not needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ info(reason: string, origin?: string | null | undefined): VFileMessage; /** * Create an info message for `reason` associated with the file. * * The `fatal` field of the message is set to `undefined` (info; change * likely not needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ info(cause: Error | VFileMessage, parent: Node$3 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage; /** * Create an info message for `reason` associated with the file. * * The `fatal` field of the message is set to `undefined` (info; change * likely not needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ info(cause: Error | VFileMessage, place: Point$1 | Position$1 | null | undefined, origin?: string | null | undefined): VFileMessage; /** * Create an info message for `reason` associated with the file. * * The `fatal` field of the message is set to `undefined` (info; change * likely not needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ info(cause: Error | VFileMessage, origin?: string | null | undefined): VFileMessage; /** * Create a message for `reason` associated with the file. * * The `fatal` field of the message is set to `false` (warning; change may be * needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ message(reason: string, options?: Options$1 | null | undefined): VFileMessage; /** * Create a message for `reason` associated with the file. * * The `fatal` field of the message is set to `false` (warning; change may be * needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ message(reason: string, parent: Node$3 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage; /** * Create a message for `reason` associated with the file. * * The `fatal` field of the message is set to `false` (warning; change may be * needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ message(reason: string, place: Point$1 | Position$1 | null | undefined, origin?: string | null | undefined): VFileMessage; /** * Create a message for `reason` associated with the file. * * The `fatal` field of the message is set to `false` (warning; change may be * needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ message(reason: string, origin?: string | null | undefined): VFileMessage; /** * Create a message for `reason` associated with the file. * * The `fatal` field of the message is set to `false` (warning; change may be * needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ message(cause: Error | VFileMessage, parent: Node$3 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage; /** * Create a message for `reason` associated with the file. * * The `fatal` field of the message is set to `false` (warning; change may be * needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ message(cause: Error | VFileMessage, place: Point$1 | Position$1 | null | undefined, origin?: string | null | undefined): VFileMessage; /** * Create a message for `reason` associated with the file. * * The `fatal` field of the message is set to `false` (warning; change may be * needed) and the `file` field is set to the current file path. * The message is added to the `messages` field on `file`. * * > πŸͺ¦ **Note**: also has obsolete signatures. * * @overload * @param {string} reason * @param {MessageOptions | null | undefined} [options] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {string} reason * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Node | NodeLike | null | undefined} parent * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {Point | Position | null | undefined} place * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @overload * @param {Error | VFileMessage} cause * @param {string | null | undefined} [origin] * @returns {VFileMessage} * * @param {Error | VFileMessage | string} causeOrReason * Reason for message, should use markdown. * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] * Configuration (optional). * @param {string | null | undefined} [origin] * Place in code where the message originates (example: * `'my-package:my-rule'` or `'my-rule'`). * @returns {VFileMessage} * Message. */ message(cause: Error | VFileMessage, origin?: string | null | undefined): VFileMessage; /** * Serialize the file. * * > **Note**: which encodings are supported depends on the engine. * > For info on Node.js, see: * > . * * @param {string | null | undefined} [encoding='utf8'] * Character encoding to understand `value` as when it’s a `Uint8Array` * (default: `'utf-8'`). * @returns {string} * Serialized file. */ toString(encoding?: string | null | undefined): string; } type NodeLike = object & { type: string; position?: Position$1 | undefined; }; //#endregion //#region ../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/index.d.ts // See: declare const emptyObjectSymbol$1: unique symbol; /** * Things that can be passed to the constructor. */ type Compatible$1 = Options | URL | VFile | Value$1; /** * Raw source map. * * See: * . */ interface Map$1 { /** * The generated file this source map is associated with. */ file: string; /** * A string of base64 VLQs which contain the actual mappings. */ mappings: string; /** * An array of identifiers which can be referenced by individual mappings. */ names: Array; /** * An array of contents of the original source files. */ sourcesContent?: Array | undefined; /** * The URL root from which all sources are relative. */ sourceRoot?: string | undefined; /** * An array of URLs to the original source files. */ sources: Array; /** * Which version of the source map spec this map is following. */ version: number; } /** * This map registers the type of the `data` key of a `VFile`. * * This type can be augmented to register custom `data` types. * * @example * declare module 'vfile' { * interface DataMap { * // `file.data.name` is typed as `string` * name: string * } * } */ interface DataMap { [emptyObjectSymbol$1]?: never; } /** * Custom info. * * Known attributes can be added to {@linkcode DataMap} */ type Data$4 = Record & Partial; /** * Configuration. */ interface Options { /** * Arbitrary fields that will be shallow copied over to the new file. */ [key: string]: unknown; /** * Set `basename` (name). */ basename?: string | null | undefined; /** * Set `cwd` (working directory). */ cwd?: string | null | undefined; /** * Set `data` (associated info). */ data?: Data$4 | null | undefined; /** * Set `dirname` (path w/o basename). */ dirname?: string | null | undefined; /** * Set `extname` (extension with dot). */ extname?: string | null | undefined; /** * Set `history` (paths the file moved between). */ history?: Array | null | undefined; /** * Set `path` (current path). */ path?: URL | string | null | undefined; /** * Set `stem` (name without extension). */ stem?: string | null | undefined; /** * Set `value` (the contents of the file). */ value?: Value$1 | null | undefined; } /** * Contents of the file. * * Can either be text or a `Uint8Array` structure. */ type Value$1 = Uint8Array | string; //#endregion //#region ../../node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.d.ts /** * Ware. */ type Middleware = (...input: Array) => any; /** * Pipeline. */ type Pipeline$2 = { /** * Run the pipeline. */ run: Run; /** * Add middleware. */ use: Use; }; /** * Call all middleware. * * Calls `done` on completion with either an error or the output of the * last middleware. * * > πŸ‘‰ **Note**: as the length of input defines whether async functions get a * > `next` function, * > it’s recommended to keep `input` at one value normally. */ type Run = (...input: Array) => void; /** * Add middleware. */ type Use = (fn: Middleware) => Pipeline$2; //#endregion //#region ../../node_modules/.pnpm/trough@2.2.0/node_modules/trough/index.d.ts type Pipeline$1 = Pipeline$2; //#endregion //#region ../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.d.ts declare const CallableInstance: new (property: string | symbol) => (...parameters: Parameters) => Result; //#endregion //#region ../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.d.ts /** * @template {Node | undefined} [ParseTree=undefined] * Output of `parse` (optional). * @template {Node | undefined} [HeadTree=undefined] * Input for `run` (optional). * @template {Node | undefined} [TailTree=undefined] * Output for `run` (optional). * @template {Node | undefined} [CompileTree=undefined] * Input of `stringify` (optional). * @template {CompileResults | undefined} [CompileResult=undefined] * Output of `stringify` (optional). * @extends {CallableInstance<[], Processor>} */ declare class Processor extends CallableInstance<[], Processor> { /** * Create a processor. */ constructor(); /** * Compiler to use (deprecated). * * @deprecated * Use `compiler` instead. * @type {( * Compiler< * CompileTree extends undefined ? Node : CompileTree, * CompileResult extends undefined ? CompileResults : CompileResult * > | * undefined * )} */ Compiler: (Compiler | undefined); /** * Parser to use (deprecated). * * @deprecated * Use `parser` instead. * @type {( * Parser | * undefined * )} */ Parser: (Parser | undefined); /** * Internal list of configured plugins. * * @deprecated * This is a private internal property and should not be used. * @type {Array>>} */ attachers: Array<[plugin: Plugin$1, ...parameters: unknown[]]>; /** * Compiler to use. * * @type {( * Compiler< * CompileTree extends undefined ? Node : CompileTree, * CompileResult extends undefined ? CompileResults : CompileResult * > | * undefined * )} */ compiler: (Compiler | undefined); /** * Internal state to track where we are while freezing. * * @deprecated * This is a private internal property and should not be used. * @type {number} */ freezeIndex: number; /** * Internal state to track whether we’re frozen. * * @deprecated * This is a private internal property and should not be used. * @type {boolean | undefined} */ frozen: boolean | undefined; /** * Internal state. * * @deprecated * This is a private internal property and should not be used. * @type {Data} */ namespace: Data$3; /** * Parser to use. * * @type {( * Parser | * undefined * )} */ parser: (Parser | undefined); /** * Internal list of configured transformers. * * @deprecated * This is a private internal property and should not be used. * @type {Pipeline} */ transformers: Pipeline; /** * Copy a processor. * * @deprecated * This is a private internal method and should not be used. * @returns {Processor} * New *unfrozen* processor ({@linkcode Processor}) that is * configured to work the same as its ancestor. * When the descendant processor is configured in the future it does not * affect the ancestral processor. */ copy(): Processor; /** * Configure the processor with info available to all plugins. * Information is stored in an object. * * Typically, options can be given to a specific plugin, but sometimes it * makes sense to have information shared with several plugins. * For example, a list of HTML elements that are self-closing, which is * needed during all phases. * * > **Note**: setting information cannot occur on *frozen* processors. * > Call the processor first to create a new unfrozen processor. * * > **Note**: to register custom data in TypeScript, augment the * > {@linkcode Data} interface. * * @example * This example show how to get and set info: * * ```js * import {unified} from 'unified' * * const processor = unified().data('alpha', 'bravo') * * processor.data('alpha') // => 'bravo' * * processor.data() // => {alpha: 'bravo'} * * processor.data({charlie: 'delta'}) * * processor.data() // => {charlie: 'delta'} * ``` * * @template {keyof Data} Key * * @overload * @returns {Data} * * @overload * @param {Data} dataset * @returns {Processor} * * @overload * @param {Key} key * @returns {Data[Key]} * * @overload * @param {Key} key * @param {Data[Key]} value * @returns {Processor} * * @param {Data | Key} [key] * Key to get or set, or entire dataset to set, or nothing to get the * entire dataset (optional). * @param {Data[Key]} [value] * Value to set (optional). * @returns {unknown} * The current processor when setting, the value at `key` when getting, or * the entire dataset when getting without key. */ data(): Data$3; /** * Configure the processor with info available to all plugins. * Information is stored in an object. * * Typically, options can be given to a specific plugin, but sometimes it * makes sense to have information shared with several plugins. * For example, a list of HTML elements that are self-closing, which is * needed during all phases. * * > **Note**: setting information cannot occur on *frozen* processors. * > Call the processor first to create a new unfrozen processor. * * > **Note**: to register custom data in TypeScript, augment the * > {@linkcode Data} interface. * * @example * This example show how to get and set info: * * ```js * import {unified} from 'unified' * * const processor = unified().data('alpha', 'bravo') * * processor.data('alpha') // => 'bravo' * * processor.data() // => {alpha: 'bravo'} * * processor.data({charlie: 'delta'}) * * processor.data() // => {charlie: 'delta'} * ``` * * @template {keyof Data} Key * * @overload * @returns {Data} * * @overload * @param {Data} dataset * @returns {Processor} * * @overload * @param {Key} key * @returns {Data[Key]} * * @overload * @param {Key} key * @param {Data[Key]} value * @returns {Processor} * * @param {Data | Key} [key] * Key to get or set, or entire dataset to set, or nothing to get the * entire dataset (optional). * @param {Data[Key]} [value] * Value to set (optional). * @returns {unknown} * The current processor when setting, the value at `key` when getting, or * the entire dataset when getting without key. */ data(dataset: Data$3): Processor; /** * Configure the processor with info available to all plugins. * Information is stored in an object. * * Typically, options can be given to a specific plugin, but sometimes it * makes sense to have information shared with several plugins. * For example, a list of HTML elements that are self-closing, which is * needed during all phases. * * > **Note**: setting information cannot occur on *frozen* processors. * > Call the processor first to create a new unfrozen processor. * * > **Note**: to register custom data in TypeScript, augment the * > {@linkcode Data} interface. * * @example * This example show how to get and set info: * * ```js * import {unified} from 'unified' * * const processor = unified().data('alpha', 'bravo') * * processor.data('alpha') // => 'bravo' * * processor.data() // => {alpha: 'bravo'} * * processor.data({charlie: 'delta'}) * * processor.data() // => {charlie: 'delta'} * ``` * * @template {keyof Data} Key * * @overload * @returns {Data} * * @overload * @param {Data} dataset * @returns {Processor} * * @overload * @param {Key} key * @returns {Data[Key]} * * @overload * @param {Key} key * @param {Data[Key]} value * @returns {Processor} * * @param {Data | Key} [key] * Key to get or set, or entire dataset to set, or nothing to get the * entire dataset (optional). * @param {Data[Key]} [value] * Value to set (optional). * @returns {unknown} * The current processor when setting, the value at `key` when getting, or * the entire dataset when getting without key. */ data(key: Key): Data$2[Key]; /** * Configure the processor with info available to all plugins. * Information is stored in an object. * * Typically, options can be given to a specific plugin, but sometimes it * makes sense to have information shared with several plugins. * For example, a list of HTML elements that are self-closing, which is * needed during all phases. * * > **Note**: setting information cannot occur on *frozen* processors. * > Call the processor first to create a new unfrozen processor. * * > **Note**: to register custom data in TypeScript, augment the * > {@linkcode Data} interface. * * @example * This example show how to get and set info: * * ```js * import {unified} from 'unified' * * const processor = unified().data('alpha', 'bravo') * * processor.data('alpha') // => 'bravo' * * processor.data() // => {alpha: 'bravo'} * * processor.data({charlie: 'delta'}) * * processor.data() // => {charlie: 'delta'} * ``` * * @template {keyof Data} Key * * @overload * @returns {Data} * * @overload * @param {Data} dataset * @returns {Processor} * * @overload * @param {Key} key * @returns {Data[Key]} * * @overload * @param {Key} key * @param {Data[Key]} value * @returns {Processor} * * @param {Data | Key} [key] * Key to get or set, or entire dataset to set, or nothing to get the * entire dataset (optional). * @param {Data[Key]} [value] * Value to set (optional). * @returns {unknown} * The current processor when setting, the value at `key` when getting, or * the entire dataset when getting without key. */ data(key: Key, value: Data$2[Key]): Processor; /** * Freeze a processor. * * Frozen processors are meant to be extended and not to be configured * directly. * * When a processor is frozen it cannot be unfrozen. * New processors working the same way can be created by calling the * processor. * * It’s possible to freeze processors explicitly by calling `.freeze()`. * Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`, * `.stringify()`, `.process()`, or `.processSync()` are called. * * @returns {Processor} * The current processor. */ freeze(): Processor; /** * Parse text to a syntax tree. * * > **Note**: `parse` freezes the processor if not already *frozen*. * * > **Note**: `parse` performs the parse phase, not the run phase or other * > phases. * * @param {Compatible | undefined} [file] * file to parse (optional); typically `string` or `VFile`; any value * accepted as `x` in `new VFile(x)`. * @returns {ParseTree extends undefined ? Node : ParseTree} * Syntax tree representing `file`. */ parse(file?: Compatible | undefined): ParseTree extends undefined ? Node$2 : ParseTree; /** * Process the given file as configured on the processor. * * > **Note**: `process` freezes the processor if not already *frozen*. * * > **Note**: `process` performs the parse, run, and stringify phases. * * @overload * @param {Compatible | undefined} file * @param {ProcessCallback>} done * @returns {undefined} * * @overload * @param {Compatible | undefined} [file] * @returns {Promise>} * * @param {Compatible | undefined} [file] * File (optional); typically `string` or `VFile`]; any value accepted as * `x` in `new VFile(x)`. * @param {ProcessCallback> | undefined} [done] * Callback (optional). * @returns {Promise | undefined} * Nothing if `done` is given. * Otherwise a promise, rejected with a fatal error or resolved with the * processed file. * * The parsed, transformed, and compiled value is available at * `file.value` (see note). * * > **Note**: unified typically compiles by serializing: most * > compilers return `string` (or `Uint8Array`). * > Some compilers, such as the one configured with * > [`rehype-react`][rehype-react], return other values (in this case, a * > React tree). * > If you’re using a compiler that doesn’t serialize, expect different * > result values. * > * > To register custom results in TypeScript, add them to * > {@linkcode CompileResultMap}. * * [rehype-react]: https://github.com/rehypejs/rehype-react */ process(file: Compatible | undefined, done: ProcessCallback>): undefined; /** * Process the given file as configured on the processor. * * > **Note**: `process` freezes the processor if not already *frozen*. * * > **Note**: `process` performs the parse, run, and stringify phases. * * @overload * @param {Compatible | undefined} file * @param {ProcessCallback>} done * @returns {undefined} * * @overload * @param {Compatible | undefined} [file] * @returns {Promise>} * * @param {Compatible | undefined} [file] * File (optional); typically `string` or `VFile`]; any value accepted as * `x` in `new VFile(x)`. * @param {ProcessCallback> | undefined} [done] * Callback (optional). * @returns {Promise | undefined} * Nothing if `done` is given. * Otherwise a promise, rejected with a fatal error or resolved with the * processed file. * * The parsed, transformed, and compiled value is available at * `file.value` (see note). * * > **Note**: unified typically compiles by serializing: most * > compilers return `string` (or `Uint8Array`). * > Some compilers, such as the one configured with * > [`rehype-react`][rehype-react], return other values (in this case, a * > React tree). * > If you’re using a compiler that doesn’t serialize, expect different * > result values. * > * > To register custom results in TypeScript, add them to * > {@linkcode CompileResultMap}. * * [rehype-react]: https://github.com/rehypejs/rehype-react */ process(file?: Compatible | undefined): Promise>; /** * Process the given file as configured on the processor. * * An error is thrown if asynchronous transforms are configured. * * > **Note**: `processSync` freezes the processor if not already *frozen*. * * > **Note**: `processSync` performs the parse, run, and stringify phases. * * @param {Compatible | undefined} [file] * File (optional); typically `string` or `VFile`; any value accepted as * `x` in `new VFile(x)`. * @returns {VFileWithOutput} * The processed file. * * The parsed, transformed, and compiled value is available at * `file.value` (see note). * * > **Note**: unified typically compiles by serializing: most * > compilers return `string` (or `Uint8Array`). * > Some compilers, such as the one configured with * > [`rehype-react`][rehype-react], return other values (in this case, a * > React tree). * > If you’re using a compiler that doesn’t serialize, expect different * > result values. * > * > To register custom results in TypeScript, add them to * > {@linkcode CompileResultMap}. * * [rehype-react]: https://github.com/rehypejs/rehype-react */ processSync(file?: Compatible | undefined): VFileWithOutput; /** * Run *transformers* on a syntax tree. * * > **Note**: `run` freezes the processor if not already *frozen*. * * > **Note**: `run` performs the run phase, not other phases. * * @overload * @param {HeadTree extends undefined ? Node : HeadTree} tree * @param {RunCallback} done * @returns {undefined} * * @overload * @param {HeadTree extends undefined ? Node : HeadTree} tree * @param {Compatible | undefined} file * @param {RunCallback} done * @returns {undefined} * * @overload * @param {HeadTree extends undefined ? Node : HeadTree} tree * @param {Compatible | undefined} [file] * @returns {Promise} * * @param {HeadTree extends undefined ? Node : HeadTree} tree * Tree to transform and inspect. * @param {( * RunCallback | * Compatible * )} [file] * File associated with `node` (optional); any value accepted as `x` in * `new VFile(x)`. * @param {RunCallback} [done] * Callback (optional). * @returns {Promise | undefined} * Nothing if `done` is given. * Otherwise, a promise rejected with a fatal error or resolved with the * transformed tree. */ run(tree: HeadTree extends undefined ? Node$2 : HeadTree, done: RunCallback): undefined; /** * Run *transformers* on a syntax tree. * * > **Note**: `run` freezes the processor if not already *frozen*. * * > **Note**: `run` performs the run phase, not other phases. * * @overload * @param {HeadTree extends undefined ? Node : HeadTree} tree * @param {RunCallback} done * @returns {undefined} * * @overload * @param {HeadTree extends undefined ? Node : HeadTree} tree * @param {Compatible | undefined} file * @param {RunCallback} done * @returns {undefined} * * @overload * @param {HeadTree extends undefined ? Node : HeadTree} tree * @param {Compatible | undefined} [file] * @returns {Promise} * * @param {HeadTree extends undefined ? Node : HeadTree} tree * Tree to transform and inspect. * @param {( * RunCallback | * Compatible * )} [file] * File associated with `node` (optional); any value accepted as `x` in * `new VFile(x)`. * @param {RunCallback} [done] * Callback (optional). * @returns {Promise | undefined} * Nothing if `done` is given. * Otherwise, a promise rejected with a fatal error or resolved with the * transformed tree. */ run(tree: HeadTree extends undefined ? Node$2 : HeadTree, file: Compatible | undefined, done: RunCallback): undefined; /** * Run *transformers* on a syntax tree. * * > **Note**: `run` freezes the processor if not already *frozen*. * * > **Note**: `run` performs the run phase, not other phases. * * @overload * @param {HeadTree extends undefined ? Node : HeadTree} tree * @param {RunCallback} done * @returns {undefined} * * @overload * @param {HeadTree extends undefined ? Node : HeadTree} tree * @param {Compatible | undefined} file * @param {RunCallback} done * @returns {undefined} * * @overload * @param {HeadTree extends undefined ? Node : HeadTree} tree * @param {Compatible | undefined} [file] * @returns {Promise} * * @param {HeadTree extends undefined ? Node : HeadTree} tree * Tree to transform and inspect. * @param {( * RunCallback | * Compatible * )} [file] * File associated with `node` (optional); any value accepted as `x` in * `new VFile(x)`. * @param {RunCallback} [done] * Callback (optional). * @returns {Promise | undefined} * Nothing if `done` is given. * Otherwise, a promise rejected with a fatal error or resolved with the * transformed tree. */ run(tree: HeadTree extends undefined ? Node$2 : HeadTree, file?: Compatible | undefined): Promise; /** * Run *transformers* on a syntax tree. * * An error is thrown if asynchronous transforms are configured. * * > **Note**: `runSync` freezes the processor if not already *frozen*. * * > **Note**: `runSync` performs the run phase, not other phases. * * @param {HeadTree extends undefined ? Node : HeadTree} tree * Tree to transform and inspect. * @param {Compatible | undefined} [file] * File associated with `node` (optional); any value accepted as `x` in * `new VFile(x)`. * @returns {TailTree extends undefined ? Node : TailTree} * Transformed tree. */ runSync(tree: HeadTree extends undefined ? Node$2 : HeadTree, file?: Compatible | undefined): TailTree extends undefined ? Node$2 : TailTree; /** * Compile a syntax tree. * * > **Note**: `stringify` freezes the processor if not already *frozen*. * * > **Note**: `stringify` performs the stringify phase, not the run phase * > or other phases. * * @param {CompileTree extends undefined ? Node : CompileTree} tree * Tree to compile. * @param {Compatible | undefined} [file] * File associated with `node` (optional); any value accepted as `x` in * `new VFile(x)`. * @returns {CompileResult extends undefined ? Value : CompileResult} * Textual representation of the tree (see note). * * > **Note**: unified typically compiles by serializing: most compilers * > return `string` (or `Uint8Array`). * > Some compilers, such as the one configured with * > [`rehype-react`][rehype-react], return other values (in this case, a * > React tree). * > If you’re using a compiler that doesn’t serialize, expect different * > result values. * > * > To register custom results in TypeScript, add them to * > {@linkcode CompileResultMap}. * * [rehype-react]: https://github.com/rehypejs/rehype-react */ stringify(tree: CompileTree extends undefined ? Node$2 : CompileTree, file?: Compatible | undefined): CompileResult extends undefined ? Value : CompileResult; /** * Configure the processor to use a plugin, a list of usable values, or a * preset. * * If the processor is already using a plugin, the previous plugin * configuration is changed based on the options that are passed in. * In other words, the plugin is not added a second time. * * > **Note**: `use` cannot be called on *frozen* processors. * > Call the processor first to create a new unfrozen processor. * * @example * There are many ways to pass plugins to `.use()`. * This example gives an overview: * * ```js * import {unified} from 'unified' * * unified() * // Plugin with options: * .use(pluginA, {x: true, y: true}) * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`): * .use(pluginA, {y: false, z: true}) * // Plugins: * .use([pluginB, pluginC]) * // Two plugins, the second with options: * .use([pluginD, [pluginE, {}]]) * // Preset with plugins and settings: * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}}) * // Settings only: * .use({settings: {position: false}}) * ``` * * @template {Array} [Parameters=[]] * @template {Node | string | undefined} [Input=undefined] * @template [Output=Input] * * @overload * @param {Preset | null | undefined} [preset] * @returns {Processor} * * @overload * @param {PluggableList} list * @returns {Processor} * * @overload * @param {Plugin} plugin * @param {...(Parameters | [boolean])} parameters * @returns {UsePlugin} * * @param {PluggableList | Plugin | Preset | null | undefined} value * Usable value. * @param {...unknown} parameters * Parameters, when a plugin is given as a usable value. * @returns {Processor} * Current processor. */ use(preset?: Preset | null | undefined): Processor; /** * Configure the processor to use a plugin, a list of usable values, or a * preset. * * If the processor is already using a plugin, the previous plugin * configuration is changed based on the options that are passed in. * In other words, the plugin is not added a second time. * * > **Note**: `use` cannot be called on *frozen* processors. * > Call the processor first to create a new unfrozen processor. * * @example * There are many ways to pass plugins to `.use()`. * This example gives an overview: * * ```js * import {unified} from 'unified' * * unified() * // Plugin with options: * .use(pluginA, {x: true, y: true}) * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`): * .use(pluginA, {y: false, z: true}) * // Plugins: * .use([pluginB, pluginC]) * // Two plugins, the second with options: * .use([pluginD, [pluginE, {}]]) * // Preset with plugins and settings: * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}}) * // Settings only: * .use({settings: {position: false}}) * ``` * * @template {Array} [Parameters=[]] * @template {Node | string | undefined} [Input=undefined] * @template [Output=Input] * * @overload * @param {Preset | null | undefined} [preset] * @returns {Processor} * * @overload * @param {PluggableList} list * @returns {Processor} * * @overload * @param {Plugin} plugin * @param {...(Parameters | [boolean])} parameters * @returns {UsePlugin} * * @param {PluggableList | Plugin | Preset | null | undefined} value * Usable value. * @param {...unknown} parameters * Parameters, when a plugin is given as a usable value. * @returns {Processor} * Current processor. */ use(list: PluggableList): Processor; /** * Configure the processor to use a plugin, a list of usable values, or a * preset. * * If the processor is already using a plugin, the previous plugin * configuration is changed based on the options that are passed in. * In other words, the plugin is not added a second time. * * > **Note**: `use` cannot be called on *frozen* processors. * > Call the processor first to create a new unfrozen processor. * * @example * There are many ways to pass plugins to `.use()`. * This example gives an overview: * * ```js * import {unified} from 'unified' * * unified() * // Plugin with options: * .use(pluginA, {x: true, y: true}) * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`): * .use(pluginA, {y: false, z: true}) * // Plugins: * .use([pluginB, pluginC]) * // Two plugins, the second with options: * .use([pluginD, [pluginE, {}]]) * // Preset with plugins and settings: * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}}) * // Settings only: * .use({settings: {position: false}}) * ``` * * @template {Array} [Parameters=[]] * @template {Node | string | undefined} [Input=undefined] * @template [Output=Input] * * @overload * @param {Preset | null | undefined} [preset] * @returns {Processor} * * @overload * @param {PluggableList} list * @returns {Processor} * * @overload * @param {Plugin} plugin * @param {...(Parameters | [boolean])} parameters * @returns {UsePlugin} * * @param {PluggableList | Plugin | Preset | null | undefined} value * Usable value. * @param {...unknown} parameters * Parameters, when a plugin is given as a usable value. * @returns {Processor} * Current processor. */ use(plugin: Plugin$1, ...parameters: Parameters_1 | [boolean]): UsePlugin; } type Pipeline = Pipeline$1; type Node$2 = Node$3; type Compatible = Compatible$1; type Value = Value$1; type CompileResultMap$1 = CompileResultMap; type Data$3 = Data$2; type Settings$1 = Settings; /** * Acceptable results from compilers. * * To register custom results, add them to * {@linkcode CompileResultMap }. */ type CompileResults = CompileResultMap$1[keyof CompileResultMap$1]; /** * A **compiler** handles the compiling of a syntax tree to something else * (in most cases, text) (TypeScript type). * * It is used in the stringify phase and called with a {@linkcode Node } * and {@linkcode VFile } representation of the document to compile. * It should return the textual representation of the given tree (typically * `string`). * * > **Note**: unified typically compiles by serializing: most compilers * > return `string` (or `Uint8Array`). * > Some compilers, such as the one configured with * > [`rehype-react`][rehype-react], return other values (in this case, a * > React tree). * > If you’re using a compiler that doesn’t serialize, expect different * > result values. * > * > To register custom results in TypeScript, add them to * > {@linkcode CompileResultMap }. * * [rehype-react]: https://github.com/rehypejs/rehype-react */ type Compiler = (tree: Tree, file: VFile) => Result; /** * A **parser** handles the parsing of text to a syntax tree. * * It is used in the parse phase and is called with a `string` and * {@linkcode VFile } of the document to parse. * It must return the syntax tree representation of the given file * ({@linkcode Node }). */ type Parser = (document: string, file: VFile) => Tree; /** * Union of the different ways to add plugins and settings. */ type Pluggable = (Plugin$1, any, any> | PluginTuple, any, any> | Preset); /** * List of plugins and presets. */ type PluggableList = Array; /** * Single plugin. * * Plugins configure the processors they are applied on in the following * ways: * * * they change the processor, such as the parser, the compiler, or by * configuring data * * they specify how to handle trees and files * * In practice, they are functions that can receive options and configure the * processor (`this`). * * > **Note**: plugins are called when the processor is *frozen*, not when * > they are applied. */ type Plugin$1 = ((this: Processor, ...parameters: PluginParameters) => Input extends string ? Output extends Node$2 | undefined ? undefined | void : never : Output extends CompileResults ? Input extends Node$2 | undefined ? undefined | void : never : Transformer | undefined | void); /** * Tuple of a plugin and its configuration. * * The first item is a plugin, the rest are its parameters. */ type PluginTuple = ([plugin: Plugin$1, ...parameters: TupleParameters]); /** * Sharable configuration. * * They can contain plugins and settings. */ type Preset = { /** * List of plugins and presets (optional). */ plugins?: PluggableList | undefined; /** * Shared settings for parsers and compilers (optional). */ settings?: Settings$1 | undefined; }; /** * Callback called when the process is done. * * Called with either an error or a result. */ type ProcessCallback = (error?: Error | undefined, file?: File | undefined) => undefined; /** * Callback called when transformers are done. * * Called with either an error or results. */ type RunCallback = (error?: Error | undefined, tree?: Tree | undefined, file?: VFile | undefined) => undefined; /** * Callback passed to transforms. * * If the signature of a `transformer` accepts a third argument, the * transformer may perform asynchronous operations, and must call it. */ type TransformCallback = (error?: Error | undefined, tree?: Output | undefined, file?: VFile | undefined) => undefined; /** * Transformers handle syntax trees and files. * * They are functions that are called each time a syntax tree and file are * passed through the run phase. * When an error occurs in them (either because it’s thrown, returned, * rejected, or passed to `next`), the process stops. * * The run phase is handled by [`trough`][trough], see its documentation for * the exact semantics of these functions. * * > **Note**: you should likely ignore `next`: don’t accept it. * > it supports callback-style async work. * > But promises are likely easier to reason about. * * [trough]: https://github.com/wooorm/trough#function-fninput-next */ type Transformer = (tree: Input, file: VFile, next: TransformCallback) => (Promise | Promise // For some reason this is needed separately. | Output | Error | undefined | void); /** * Create a processor based on the input/output of a {@link Plugin plugin}. */ type UsePlugin = (Input extends string ? Output extends Node$2 | undefined ? Processor : Processor : Output extends CompileResults ? Input extends Node$2 | undefined ? Processor : Processor : Input extends Node$2 | undefined ? Output extends Node$2 | undefined ? Processor : Processor : Processor); /** * Type to generate a {@linkcode VFile } corresponding to a compiler result. * * If a result that is not acceptable on a `VFile` is used, that will * be stored on the `result` field of {@linkcode VFile }. */ type VFileWithOutput = (Result extends Value | undefined ? VFile : VFile & { result: Result; }); //#endregion //#region ../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/index.d.ts // See: declare const emptyObjectSymbol: unique symbol; /** * Interface of known results from compilers. * * Normally, compilers result in text ({@linkcode Value} of `vfile`). * When you compile to something else, such as a React node (as in, * `rehype-react`), you can augment this interface to include that type. * * ```ts * import type {ReactNode} from 'somewhere' * * declare module 'unified' { * interface CompileResultMap { * // Register a new result (value is used, key should match it). * ReactNode: ReactNode * } * } * * export {} // You may not need this, but it makes sure the file is a module. * ``` * * Use {@linkcode CompileResults} to access the values. */ interface CompileResultMap { // Note: if `Value` from `VFile` is changed, this should too. Uint8Array: Uint8Array; string: string; } /** * Interface of known data that can be supported by all plugins. * * Typically, options can be given to a specific plugin, but sometimes it makes * sense to have information shared with several plugins. * For example, a list of HTML elements that are self-closing, which is needed * during all phases. * * To type this, do something like: * * ```ts * declare module 'unified' { * interface Data { * htmlVoidElements?: Array | undefined * } * } * * export {} // You may not need this, but it makes sure the file is a module. * ``` */ interface Data$2 { settings?: Settings | undefined; } /** * Interface of known extra options, that can be supported by parser and * compilers. * * This exists so that users can use packages such as `remark`, which configure * both parsers and compilers (in this case `remark-parse` and * `remark-stringify`), and still provide options for them. * * When you make parsers or compilers, that could be packaged up together, * you should support `this.data('settings')` as input and merge it with * explicitly passed `options`. * Then, to type it, using `remark-stringify` as an example, do something like: * * ```ts * declare module 'unified' { * interface Settings { * bullet: '*' | '+' | '-' * // … * } * } * * export {} // You may not need this, but it makes sure the file is a module. * ``` */ interface Settings { [emptyObjectSymbol]?: never; } //#endregion //#region ../../node_modules/.pnpm/unified-lint-rule@3.0.1/node_modules/unified-lint-rule/index.d.ts type Label = Label$1; type Severity = Severity$1; type Plugin = (config?: [level: Label | Severity | boolean, option?: Option] | Label | Option | Severity) => ((tree: Tree, file: VFile, next: TransformCallback) => undefined) | undefined; //#endregion //#region ../../node_modules/.pnpm/@effected+glob@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/glob/index.d.ts //#region src/GlobPattern.d.ts declare const GlobPatternError_base: Schema.Class; readonly limit: Schema.Number; readonly actual: Schema.Number; }>, import("effect/Cause").YieldableError>; /** * Typed failure raised when a glob pattern trips a compile-time guard: * over-length, brace-expansion budget exhaustion, or nesting past the depth * cap. Malformed input is never a defect β€” this is the only failure the * package's fallible boundaries ({@link GlobPattern.compile} and * `GlobSet.compile`) can produce. * * @public */ declare class GlobPatternError extends GlobPatternError_base { get message(): string; } //#endregion //#region ../../node_modules/.pnpm/@effected+walker@0.5.0_@effected+glob@0.4.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/walker/index.d.ts declare const DescendError_base: Schema.Class; /** The offending directory, relative to `cwd` (`""` is the walk's base). */ readonly path: Schema.String; /** The depth cap, present when `reason` is `"depthExceeded"`. */ readonly limit: Schema.optionalKey; }>, import("effect/Cause").YieldableError>; /** * Typed failure raised by {@link descend}: a directory mid-walk was unreadable * (under `onUnreadable: "fail"`), or the walk descended past `maxDepth`. Depth * exhaustion is a typed failure, never a truncation β€” silent truncation * silently changes match semantics. * * @public */ declare class DescendError extends DescendError_base { get message(): string; } declare const GlobExpansionError_base: Schema.Class; }>, import("effect/Cause").YieldableError>; /** * Typed failure raised by {@link compileAndExpand}: the single error the * compile+expand recipe fails with, so a caller catches one tag rather than * folding two error channels by hand. * * @remarks * One tag, two genuinely different causes β€” "your pattern is malformed" and * "that directory is unreadable" are different problems with different fixes, * so `cause` keeps the underlying typed error intact * rather than flattening it into a string. Discriminate on `cause._tag` * (`"GlobPatternError"` vs `"DescendError"`), or read * {@link GlobExpansionError.stage} when only the phase matters; either way the * original payload β€” a guard's `limit`/`actual`, a descent's `path` β€” is still * there. `cause` is also the native `Error` cause, so error chaining and * stack-printing work without extra wiring. * * @public */ declare class GlobExpansionError extends GlobExpansionError_base { /** * Which phase failed β€” `"compile"` when the pattern itself was rejected, * `"descend"` when the filesystem walk failed. A convenience over * `cause._tag` for callers that only need the phase. */ get stage(): "compile" | "descend"; get message(): string; } //#endregion //#region ../silk-effects/dist/dev/pkg/index.d.ts //#endregion //#region src/changesets/categories/types.d.ts /** * Schema for a section category that defines how changes are grouped in release notes. * * @remarks * A section category has four fields: * - `heading` -- the display heading used in CHANGELOG output (e.g., `"Features"`, `"Bug Fixes"`) * - `priority` -- an integer controlling display order (lower = higher priority) * - `commitTypes` -- conventional commit type prefixes that map to this category (e.g., `["feat"]`) * - `description` -- a brief human-readable description for documentation * * Categories with an empty `commitTypes` array are resolved through other means: * `BREAKING_CHANGES` is resolved via the `!` suffix on any commit type, and * `OTHER` is the fallback for unrecognized types. * * @example * ```typescript * import { Schema } from "effect"; * import { SectionCategorySchema } from "@savvy-web/changesets"; * import type { SectionCategory } from "@savvy-web/changesets"; * * const category: SectionCategory = Schema.decodeUnknownSync(SectionCategorySchema)({ * heading: "Features", * priority: 2, * commitTypes: ["feat"], * description: "New functionality", * }); * ``` * * @see {@link SectionCategory} for the inferred TypeScript type * @see {@link CATEGORIES} for all predefined categories * * @public */ declare const SectionCategorySchema: Schema.Struct<{ /** Display heading used in CHANGELOG output. */ readonly heading: Schema.String; /** Priority for ordering (lower = higher priority). */ readonly priority: Schema.Number; /** Conventional commit types that map to this category. */ readonly commitTypes: Schema.$Array; /** Brief description for documentation. */ readonly description: Schema.String; }>; /** * A section category defines how changes are grouped in release notes. * * @remarks * Inferred from {@link SectionCategorySchema}. Use this type to annotate * variables and parameters that hold category data. * * @public */ interface SectionCategory extends Schema.Schema.Type {} //#endregion //#region src/changesets/api/categories.d.ts /** * Static class wrapper for section category operations. * * Provides methods for resolving conventional commit types to changelog * section categories, validating section headings, and accessing the * canonical set of 13 section categories used throughout the pipeline. * * @remarks * This class wraps the pure functions and constants from the internal * `categories/` module. Each {@link SectionCategory} is defined by the * {@link SectionCategorySchema} Effect Schema, which provides runtime * validation at system boundaries. The class itself is stateless; all * methods and properties are `static`. * * Categories control how changelog entries are grouped and ordered. * Lower priority numbers appear first in the output. The 13 built-in * categories cover all conventional commit types plus special cases * like dependency updates and breaking changes. * * @example Looking up categories from commit metadata * ```typescript * import { Categories } from "\@savvy-web/changesets"; * import type { SectionCategory } from "\@savvy-web/changesets"; * * // Resolve a conventional commit type to its category * const feature: SectionCategory = Categories.fromCommitType("feat"); * // feature.heading === "Features" * // feature.priority === 2 * * // Breaking changes always win regardless of commit type * const breaking: SectionCategory = Categories.fromCommitType("fix", undefined, true); * // breaking.heading === "Breaking Changes" * // breaking.priority === 1 * * // The special scope "deps" on "chore" maps to Dependencies * const deps: SectionCategory = Categories.fromCommitType("chore", "deps"); * // deps.heading === "Dependencies" * ``` * * @example Validating section headings * ```typescript * import { Categories } from "\@savvy-web/changesets"; * * const headings: readonly string[] = Categories.allHeadings(); * // ["Breaking Changes", "Features", "Bug Fixes", ...] * * const valid: boolean = Categories.isValidHeading("Bug Fixes"); * // true * * const unknown: boolean = Categories.isValidHeading("Miscellaneous"); * // false * ``` * * @example Reverse-lookup from heading text * ```typescript * import { Categories } from "\@savvy-web/changesets"; * import type { SectionCategory } from "\@savvy-web/changesets"; * * const category: SectionCategory | undefined = Categories.fromHeading("Features"); * if (category) { * const commitTypes: readonly string[] = category.commitTypes; * // ["feat"] * } * ``` * * @see {@link SectionCategory} for the category shape (heading, priority, commitTypes, description) * @see {@link SectionCategorySchema} for the Effect Schema that validates category data * * @public */ declare class Categories { private constructor(); /** * Breaking changes -- backward-incompatible changes (priority 1). * * @remarks * Mapped from any commit type when the `breaking` flag is `true`. * Always appears first in changelog output. */ static readonly BREAKING_CHANGES: SectionCategory; /** * Features -- new functionality (priority 2). * * @remarks * Mapped from the `feat` commit type. */ static readonly FEATURES: SectionCategory; /** * Bug Fixes -- bug corrections (priority 3). * * @remarks * Mapped from the `fix` commit type. */ static readonly BUG_FIXES: SectionCategory; /** * Performance -- performance improvements (priority 4). * * @remarks * Mapped from the `perf` commit type. */ static readonly PERFORMANCE: SectionCategory; /** * Documentation -- documentation changes (priority 5). * * @remarks * Mapped from the `docs` commit type. */ static readonly DOCUMENTATION: SectionCategory; /** * Refactoring -- code restructuring (priority 6). * * @remarks * Mapped from the `refactor` commit type. */ static readonly REFACTORING: SectionCategory; /** * Tests -- test additions or modifications (priority 7). * * @remarks * Mapped from the `test` commit type. */ static readonly TESTS: SectionCategory; /** * Build System -- build configuration changes (priority 8). * * @remarks * Mapped from the `build` commit type. */ static readonly BUILD_SYSTEM: SectionCategory; /** * CI -- continuous integration changes (priority 9). * * @remarks * Mapped from the `ci` commit type. */ static readonly CI: SectionCategory; /** * Dependencies -- dependency updates (priority 10). * * @remarks * Mapped from `chore(deps)` and similar dependency-scoped commits. */ static readonly DEPENDENCIES: SectionCategory; /** * Maintenance -- general maintenance (priority 11). * * @remarks * Mapped from the `chore` commit type (without the `deps` scope). */ static readonly MAINTENANCE: SectionCategory; /** * Reverts -- reverted changes (priority 12). * * @remarks * Mapped from the `revert` commit type. */ static readonly REVERTS: SectionCategory; /** * Other -- uncategorized changes (priority 13). * * @remarks * Fallback category for unrecognized commit types. Always appears * last in changelog output. */ static readonly OTHER: SectionCategory; /** * All 13 categories ordered by priority (ascending, 1-13). * * @remarks * This array is frozen and sorted from highest priority (Breaking Changes) * to lowest (Other). Useful for iterating over categories in display order. */ static readonly ALL: readonly SectionCategory[]; /** * Resolve a conventional commit type to its section category. * * @remarks * Resolution follows a precedence chain: * * 1. If `breaking` is `true`, always returns {@link Categories.BREAKING_CHANGES} * 2. If `type` is `"chore"` and `scope` is `"deps"`, returns {@link Categories.DEPENDENCIES} * 3. Otherwise, looks up `type` in the `commitTypes` arrays of all categories * 4. Falls back to {@link Categories.OTHER} for unrecognized types * * @param type - The conventional commit type (e.g., `"feat"`, `"fix"`, `"chore"`) * @param scope - Optional commit scope (e.g., `"deps"` from `chore(deps):`) * @param breaking - Whether the commit includes a breaking change indicator (`!`) * @returns The resolved {@link SectionCategory} */ static fromCommitType(type: string, scope?: string, breaking?: boolean): SectionCategory; /** * Look up a category by its section heading text. * * @remarks * Comparison is case-insensitive. For example, both `"Bug Fixes"` and * `"bug fixes"` will match {@link Categories.BUG_FIXES}. * * @param heading - The heading text (e.g., `"Features"`, `"Bug Fixes"`) * @returns The matching {@link SectionCategory}, or `undefined` if the heading * does not correspond to any known category */ static fromHeading(heading: string): SectionCategory | undefined; /** * Get all valid section heading strings in priority order. * * @remarks * Returns the `heading` field from each category in {@link Categories.ALL}, * preserving priority order. Useful for building validation sets or * rendering category pickers. * * @returns Readonly array of heading strings (e.g., `["Breaking Changes", "Features", ...]`) */ static allHeadings(): readonly string[]; /** * Check whether a heading string matches a known category. * * @remarks * Comparison is case-insensitive. Equivalent to * `Categories.fromHeading(heading) !== undefined`. * * @param heading - The heading text to validate * @returns `true` if the heading matches a known category, `false` otherwise */ static isValidHeading(heading: string): boolean; } //#endregion //#region ../../node_modules/.pnpm/@changesets+types@7.0.0/node_modules/@changesets/types/dist/index.d.mts //#region src/index.d.ts type MaybePromise = T | Promise; type VersionType$1 = "major" | "minor" | "patch" | "none"; type AccessType = "public" | "restricted"; type Release = { name: string; type: VersionType$1; }; interface ComprehensiveReleaseBase { name: string; type: "major" | "minor" | "patch" | "none"; changesets: string[]; oldVersion: string | undefined; newVersion: string | undefined; } interface ComprehensiveMajorRelease extends ComprehensiveReleaseBase { type: "major"; oldVersion: string; newVersion: string; } interface ComprehensiveMinorRelease extends ComprehensiveReleaseBase { type: "minor"; oldVersion: string; newVersion: string; } interface ComprehensivePatchRelease extends ComprehensiveReleaseBase { type: "patch"; oldVersion: string; newVersion: string; } interface ComprehensiveNoneRelease extends ComprehensiveReleaseBase { type: "none"; oldVersion: string | undefined; newVersion: string | undefined; } type ComprehensiveRelease = ComprehensiveMajorRelease | ComprehensiveMinorRelease | ComprehensivePatchRelease | ComprehensiveNoneRelease; type Changeset$1 = { summary: string; releases: Array; }; type NewChangeset = Changeset$1 & { id: string; }; type ReleasePlan = { changesets: NewChangeset[]; releases: ComprehensiveRelease[]; preState: PreState | undefined; }; type PackageJSON = { name: string; version: string; dependencies?: { [key: string]: string; }; peerDependencies?: { [key: string]: string; }; devDependencies?: { [key: string]: string; }; optionalDependencies?: { [key: string]: string; }; resolutions?: { [key: string]: string; }; private?: boolean; publishConfig?: { access?: AccessType; directory?: string; registry?: string; [registry: `${string}:registry`]: string; }; }; type PackageGroup = ReadonlyArray; type Fixed = ReadonlyArray; type Linked = ReadonlyArray; interface PrivatePackages { version: boolean; tag: boolean; } type Config = { changelog: false | readonly [string, null | Record]; commit: false | readonly [string, null | Record]; fixed: Fixed; linked: Linked; access: AccessType; baseBranch: string; changedFilePatterns: readonly string[]; /** * The formatter to use to format changesets and changelogs. Set `false` to disable formatting. * The default value of `"auto"` will auto-detect the formatter based on the project's configuration files. */ format: "auto" | "prettier" | "oxfmt" | "deno" | "dprint" | false; /** Features enabled for Private packages */ privatePackages: PrivatePackages; /** The minimum bump type to trigger automatic update of internal dependencies that are part of the same release */ updateInternalDependencies: "patch" | "minor"; ignore: ReadonlyArray; /** This is supposed to be used with pnpm's `link-workspace-packages: false` and Berry's `enableTransparentWorkspaces: false` */ bumpVersionsWithWorkspaceProtocolOnly?: boolean; ___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH: Required; snapshot: { useCalculatedVersion: boolean; prereleaseTemplate: string | null; }; }; type ExperimentalOptions = { onlyUpdatePeerDependentsWhenOutOfRange?: boolean; updateInternalDependents?: "always" | "out-of-range"; }; type NewChangesetWithCommit = NewChangeset & { commit?: string; }; type ModCompWithPackage = ComprehensiveRelease & { packageJson: PackageJSON; dir: string; }; type GetReleaseLine = (changeset: NewChangesetWithCommit, type: VersionType$1, changelogOpts: null | Record) => MaybePromise; type GetDependencyReleaseLine = (changesets: NewChangesetWithCommit[], dependenciesUpdated: ModCompWithPackage[], changelogOpts: null | Record) => MaybePromise; type ChangelogFunctions = { getReleaseLine: GetReleaseLine; getDependencyReleaseLine: GetDependencyReleaseLine; }; type PreState = { mode: "pre" | "exit"; tag: string; }; //#endregion //#region src/changesets/api/changelog.d.ts /** * Static class wrapper for changelog formatting operations. * * Delegates to the Changesets-compatible `getReleaseLine` and * `getDependencyReleaseLine` functions. Internally, these use the * {@link ChangelogService} Effect service layer, which coordinates * the {@link GitHubService} (for commit/PR metadata) to produce * structured changelog entries. * * @remarks * This class provides the same formatting capabilities as the * `\@savvy-web/changesets/changelog` subpath export, but through a * class-based API rather than the Changesets default-export convention. * The underlying formatter parses conventional commit prefixes from the * changeset summary to determine the section category (via * {@link Categories}), resolves GitHub metadata (authors, PR links, * commit hashes), and produces markdown output grouped by category. * * The `options` parameter must include a `repo` field in `"owner/repo"` * format (e.g., `"savvy-web/changesets"`) so that GitHub links can be * constructed. Additional options are defined by {@link ChangesetOptionsSchema}. * * @example Formatting a single changeset release line * ```typescript * import { Changelog } from "\@savvy-web/changesets"; * * const changeset = { * id: "brave-pandas-learn", * summary: "feat: add token refresh endpoint", * releases: [{ name: "\@savvy-web/auth", type: "minor" as const }], * commit: "abc1234567890abcdef1234567890abcdef123456", * }; * * const line: string = await Changelog.formatReleaseLine(changeset, "minor", { * repo: "savvy-web/auth", * }); * // line contains a markdown bullet under the "Features" section heading * ``` * * @example Formatting dependency update lines * ```typescript * import { Changelog } from "\@savvy-web/changesets"; * * const changesets = [ * { * id: "cool-dogs-fly", * summary: "chore(deps): update effect to 3.20.0", * releases: [{ name: "\@savvy-web/core", type: "patch" as const }], * commit: "def4567890abcdef1234567890abcdef456789ab", * }, * ]; * * const dependenciesUpdated = [ * { * name: "\@savvy-web/utils", * type: "patch" as const, * oldVersion: "1.2.0", * newVersion: "1.2.1", * changesets: ["cool-dogs-fly"], * packageJson: { name: "\@savvy-web/utils", version: "1.2.1" }, * }, * ]; * * const depLines: string = await Changelog.formatDependencyReleaseLine( * changesets, * dependenciesUpdated, * { repo: "savvy-web/core" }, * ); * // depLines contains a markdown table of dependency changes * ``` * * @see {@link ChangelogService} for the underlying Effect service * @see {@link Categories} for how commit types map to section headings * @see {@link ChangesetOptionsSchema} for the full options schema * * @public */ declare class Changelog { private constructor(); /** * Format a single changeset into a changelog release line. * * @remarks * Parses the changeset summary for a conventional commit prefix * (e.g., `"feat: ..."`, `"fix!: ..."`), resolves the corresponding * {@link SectionCategory}, and produces a markdown bullet item with * optional GitHub metadata (author, PR link, commit hash). * * @param changeset - The changeset to format, including its `id`, `summary`, * `releases` array, and optional `commit` hash * @param versionType - The semantic version bump type (`"major"`, `"minor"`, or `"patch"`) * @param options - Configuration object; must include `repo` in `"owner/repo"` format. * Pass `null` to use defaults (no GitHub link resolution). * @returns A promise resolving to the formatted markdown string */ static formatReleaseLine(changeset: NewChangesetWithCommit, versionType: VersionType$1, options: Record | null): Promise; /** * Format dependency update release lines into a markdown table. * * @remarks * Generates a structured dependency table showing package names, * version transitions, and dependency types. The table is placed * under the "Dependencies" section heading in the changelog. * * @param changesets - The changesets that triggered the dependency updates * @param dependenciesUpdated - Array of updated dependencies with their * old/new versions and package metadata * @param options - Configuration object; must include `repo` in `"owner/repo"` format. * Pass `null` to use defaults. * @returns A promise resolving to the formatted markdown string containing * the dependency update table */ static formatDependencyReleaseLine(changesets: NewChangesetWithCommit[], dependenciesUpdated: ModCompWithPackage[], options: Record | null): Promise; } //#endregion //#region ../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts // ## Interfaces /** * Info associated with nodes by the ecosystem. * * This space is guaranteed to never be specified by unist or specifications * implementing unist. * But you can use it in utilities and plugins to store data. * * This type can be augmented to register custom data. * For example: * * ```ts * declare module 'unist' { * interface Data { * // `someNode.data.myId` is typed as `number | undefined` * myId?: number | undefined * } * } * ``` */ interface Data$1 {} /** * One place in a source file. */ interface Point { /** * Line in a source file (1-indexed integer). */ line: number; /** * Column in a source file (1-indexed integer). */ column: number; /** * Character in a source file (0-indexed integer). */ offset?: number | undefined; } /** * Position of a node in a source document. * * A position is a range between two points. */ interface Position { /** * Place of the first character of the parsed source region. */ start: Point; /** * Place of the first character after the parsed source region. */ end: Point; } /** * Abstract unist node. * * The syntactic unit in unist syntax trees are called nodes. * * This interface is supposed to be extended. * If you can use {@link Literal} or {@link Parent}, you should. * But for example in markdown, a `thematicBreak` (`***`), is neither literal * nor parent, but still a node. */ interface Node$1 { /** * Node type. */ type: string; /** * Info from the ecosystem. */ data?: Data$1 | undefined; /** * Position of a node in a source document. * * Nodes that are generated (not in the original source document) must not * have a position. */ position?: Position | undefined; } //#endregion //#region ../../node_modules/.pnpm/@types+mdast@4.0.4/node_modules/@types/mdast/index.d.ts // ## Enumeration /** * How phrasing content is aligned * ({@link https://drafts.csswg.org/css-text/ | [CSSTEXT]}). * * * `'left'`: See the * {@link https://drafts.csswg.org/css-text/#valdef-text-align-left | left} * value of the `text-align` CSS property * * `'right'`: See the * {@link https://drafts.csswg.org/css-text/#valdef-text-align-right | right} * value of the `text-align` CSS property * * `'center'`: See the * {@link https://drafts.csswg.org/css-text/#valdef-text-align-center | center} * value of the `text-align` CSS property * * `null`: phrasing content is aligned as defined by the host environment * * Used in GFM tables. */ type AlignType = "center" | "left" | "right" | null; /** * Explicitness of a reference. * * `'shortcut'`: the reference is implicit, its identifier inferred from its * content * `'collapsed'`: the reference is explicit, its identifier inferred from its * content * `'full'`: the reference is explicit, its identifier explicitly set */ type ReferenceType = "shortcut" | "collapsed" | "full"; // ## Mixin /** * Node with a fallback. */ interface Alternative { /** * Equivalent content for environments that cannot represent the node as * intended. */ alt?: string | null | undefined; } /** * Internal relation from one node to another. * * Whether the value of `identifier` is expected to be a unique identifier or * not depends on the type of node including the Association. * An example of this is that they should be unique on {@link Definition}, * whereas multiple {@link LinkReference}s can be non-unique to be associated * with one definition. */ interface Association { /** * Relation of association. * * `identifier` is a source value: character escapes and character * references are not parsed. * * It can match another node. * * Its value must be normalized. * To normalize a value, collapse markdown whitespace (`[\t\n\r ]+`) to a space, * trim the optional initial and/or final space, and perform Unicode-aware * case-folding. */ identifier: string; /** * Relation of association, in parsed form. * * `label` is a `string` value: it works just like `title` on {@link Link} * or a `lang` on {@link Code}: character escapes and character references * are parsed. * * It can match another node. */ label?: string | null | undefined; } /** * Marker that is associated to another node. */ interface Reference extends Association { /** * Explicitness of the reference. */ referenceType: ReferenceType; } /** * Reference to resource. */ interface Resource { /** * URL to the referenced resource. */ url: string; /** * Advisory information for the resource, such as would be appropriate for * a tooltip. */ title?: string | null | undefined; } // ## Interfaces /** * Info associated with mdast nodes by the ecosystem. * * This space is guaranteed to never be specified by unist or mdast. * But you can use it in utilities and plugins to store data. * * This type can be augmented to register custom data. * For example: * * ```ts * declare module 'mdast' { * interface Data { * // `someNode.data.myId` is typed as `number | undefined` * myId?: number | undefined * } * } * ``` */ interface Data extends Data$1 {} // ## Content maps /** * Union of registered mdast nodes that can occur where block content is * expected. * * To register custom mdast nodes, add them to {@link BlockContentMap}. * They will be automatically added here. */ type BlockContent = BlockContentMap[keyof BlockContentMap]; /** * Registry of all mdast nodes that can occur where {@link BlockContent} is * expected. * * This interface can be augmented to register custom node types: * * ```ts * declare module 'mdast' { * interface BlockContentMap { * // Allow using MDX ESM nodes defined by `remark-mdx`. * mdxjsEsm: MdxjsEsm; * } * } * ``` * * For a union of all block content, see {@link RootContent}. */ interface BlockContentMap { blockquote: Blockquote; code: Code; heading: Heading; html: Html; list: List; paragraph: Paragraph; table: Table; thematicBreak: ThematicBreak; } /** * Union of registered mdast nodes that can occur where definition content is * expected. * * To register custom mdast nodes, add them to {@link DefinitionContentMap}. * They will be automatically added here. */ type DefinitionContent = DefinitionContentMap[keyof DefinitionContentMap]; /** * Registry of all mdast nodes that can occur where {@link DefinitionContent} * is expected. * * This interface can be augmented to register custom node types: * * ```ts * declare module 'mdast' { * interface DefinitionContentMap { * custom: Custom; * } * } * ``` * * For a union of all definition content, see {@link RootContent}. */ interface DefinitionContentMap { definition: Definition; footnoteDefinition: FootnoteDefinition; } /** * Union of registered mdast nodes that can occur where list content is * expected. * * To register custom mdast nodes, add them to {@link ListContentMap}. * They will be automatically added here. */ type ListContent = ListContentMap[keyof ListContentMap]; /** * Registry of all mdast nodes that can occur where {@link ListContent} * is expected. * * This interface can be augmented to register custom node types: * * ```ts * declare module 'mdast' { * interface ListContentMap { * custom: Custom; * } * } * ``` * * For a union of all list content, see {@link RootContent}. */ interface ListContentMap { listItem: ListItem; } /** * Union of registered mdast nodes that can occur where phrasing content is * expected. * * To register custom mdast nodes, add them to {@link PhrasingContentMap}. * They will be automatically added here. */ type PhrasingContent = PhrasingContentMap[keyof PhrasingContentMap]; /** * Registry of all mdast nodes that can occur where {@link PhrasingContent} * is expected. * * This interface can be augmented to register custom node types: * * ```ts * declare module 'mdast' { * interface PhrasingContentMap { * // Allow using MDX JSX (text) nodes defined by `remark-mdx`. * mdxJsxTextElement: MDXJSXTextElement; * } * } * ``` * * For a union of all phrasing content, see {@link RootContent}. */ interface PhrasingContentMap { break: Break; delete: Delete; emphasis: Emphasis; footnoteReference: FootnoteReference; html: Html; image: Image; imageReference: ImageReference; inlineCode: InlineCode; link: Link; linkReference: LinkReference; strong: Strong; text: Text; } /** * Union of registered mdast nodes that can occur in {@link Root}. * * To register custom mdast nodes, add them to {@link RootContentMap}. * They will be automatically added here. */ type RootContent = RootContentMap[keyof RootContentMap]; /** * Registry of all mdast nodes that can occur as children of {@link Root}. * * > **Note**: {@link Root} does not need to be an entire document. * > it can also be a fragment. * * This interface can be augmented to register custom node types: * * ```ts * declare module 'mdast' { * interface RootContentMap { * // Allow using toml nodes defined by `remark-frontmatter`. * toml: TOML; * } * } * ``` * * For a union of all {@link Root} children, see {@link RootContent}. */ interface RootContentMap { blockquote: Blockquote; break: Break; code: Code; definition: Definition; delete: Delete; emphasis: Emphasis; footnoteDefinition: FootnoteDefinition; footnoteReference: FootnoteReference; heading: Heading; html: Html; image: Image; imageReference: ImageReference; inlineCode: InlineCode; link: Link; linkReference: LinkReference; list: List; listItem: ListItem; paragraph: Paragraph; strong: Strong; table: Table; tableCell: TableCell; tableRow: TableRow; text: Text; thematicBreak: ThematicBreak; yaml: Yaml$1; } /** * Union of registered mdast nodes that can occur where row content is * expected. * * To register custom mdast nodes, add them to {@link RowContentMap}. * They will be automatically added here. */ type RowContent = RowContentMap[keyof RowContentMap]; /** * Registry of all mdast nodes that can occur where {@link RowContent} * is expected. * * This interface can be augmented to register custom node types: * * ```ts * declare module 'mdast' { * interface RowContentMap { * custom: Custom; * } * } * ``` * * For a union of all row content, see {@link RootContent}. */ interface RowContentMap { tableCell: TableCell; } /** * Union of registered mdast nodes that can occur where table content is * expected. * * To register custom mdast nodes, add them to {@link TableContentMap}. * They will be automatically added here. */ type TableContent = TableContentMap[keyof TableContentMap]; /** * Registry of all mdast nodes that can occur where {@link TableContent} * is expected. * * This interface can be augmented to register custom node types: * * ```ts * declare module 'mdast' { * interface TableContentMap { * custom: Custom; * } * } * ``` * * For a union of all table content, see {@link RootContent}. */ interface TableContentMap { tableRow: TableRow; } // ## Abstract nodes /** * Abstract mdast node that contains the smallest possible value. * * This interface is supposed to be extended if you make custom mdast nodes. * * For a union of all registered mdast literals, see {@link Literals}. */ interface Literal extends Node { /** * Plain-text value. */ value: string; } /** * Abstract mdast node. * * This interface is supposed to be extended. * If you can use {@link Literal} or {@link Parent}, you should. * But for example in markdown, a thematic break (`***`) is neither literal nor * parent, but still a node. * * To register custom mdast nodes, add them to {@link RootContentMap} and other * places where relevant (such as {@link ElementContentMap}). * * For a union of all registered mdast nodes, see {@link Nodes}. */ interface Node extends Node$1 { /** * Info from the ecosystem. */ data?: Data | undefined; } /** * Abstract mdast node that contains other mdast nodes (*children*). * * This interface is supposed to be extended if you make custom mdast nodes. * * For a union of all registered mdast parents, see {@link Parents}. */ interface Parent extends Node { /** * List of children. */ children: RootContent[]; } // ## Concrete nodes /** * Markdown block quote. */ interface Blockquote extends Parent { /** * Node type of mdast block quote. */ type: "blockquote"; /** * Children of block quote. */ children: Array; /** * Data associated with the mdast block quote. */ data?: BlockquoteData | undefined; } /** * Info associated with mdast block quote nodes by the ecosystem. */ interface BlockquoteData extends Data {} /** * Markdown break. */ interface Break extends Node { /** * Node type of mdast break. */ type: "break"; /** * Data associated with the mdast break. */ data?: BreakData | undefined; } /** * Info associated with mdast break nodes by the ecosystem. */ interface BreakData extends Data {} /** * Markdown code (flow) (block). */ interface Code extends Literal { /** * Node type of mdast code (flow). */ type: "code"; /** * Language of computer code being marked up. */ lang?: string | null | undefined; /** * Custom information relating to the node. * * If the lang field is present, a meta field can be present. */ meta?: string | null | undefined; /** * Data associated with the mdast code (flow). */ data?: CodeData | undefined; } /** * Info associated with mdast code (flow) (block) nodes by the ecosystem. */ interface CodeData extends Data {} /** * Markdown definition. */ interface Definition extends Node, Association, Resource { /** * Node type of mdast definition. */ type: "definition"; /** * Data associated with the mdast definition. */ data?: DefinitionData | undefined; } /** * Info associated with mdast definition nodes by the ecosystem. */ interface DefinitionData extends Data {} /** * Markdown GFM delete (strikethrough). */ interface Delete extends Parent { /** * Node type of mdast GFM delete. */ type: "delete"; /** * Children of GFM delete. */ children: PhrasingContent[]; /** * Data associated with the mdast GFM delete. */ data?: DeleteData | undefined; } /** * Info associated with mdast GFM delete nodes by the ecosystem. */ interface DeleteData extends Data {} /** * Markdown emphasis. */ interface Emphasis extends Parent { /** * Node type of mdast emphasis. */ type: "emphasis"; /** * Children of emphasis. */ children: PhrasingContent[]; /** * Data associated with the mdast emphasis. */ data?: EmphasisData | undefined; } /** * Info associated with mdast emphasis nodes by the ecosystem. */ interface EmphasisData extends Data {} /** * Markdown GFM footnote definition. */ interface FootnoteDefinition extends Parent, Association { /** * Node type of mdast GFM footnote definition. */ type: "footnoteDefinition"; /** * Children of GFM footnote definition. */ children: Array; /** * Data associated with the mdast GFM footnote definition. */ data?: FootnoteDefinitionData | undefined; } /** * Info associated with mdast GFM footnote definition nodes by the ecosystem. */ interface FootnoteDefinitionData extends Data {} /** * Markdown GFM footnote reference. */ interface FootnoteReference extends Association, Node { /** * Node type of mdast GFM footnote reference. */ type: "footnoteReference"; /** * Data associated with the mdast GFM footnote reference. */ data?: FootnoteReferenceData | undefined; } /** * Info associated with mdast GFM footnote reference nodes by the ecosystem. */ interface FootnoteReferenceData extends Data {} /** * Markdown heading. */ interface Heading extends Parent { /** * Node type of mdast heading. */ type: "heading"; /** * Heading rank. * * A value of `1` is said to be the highest rank and `6` the lowest. */ depth: 1 | 2 | 3 | 4 | 5 | 6; /** * Children of heading. */ children: PhrasingContent[]; /** * Data associated with the mdast heading. */ data?: HeadingData | undefined; } /** * Info associated with mdast heading nodes by the ecosystem. */ interface HeadingData extends Data {} /** * Markdown HTML. */ interface Html extends Literal { /** * Node type of mdast HTML. */ type: "html"; /** * Data associated with the mdast HTML. */ data?: HtmlData | undefined; } /** * Info associated with mdast HTML nodes by the ecosystem. */ interface HtmlData extends Data {} /** * Markdown image. */ interface Image extends Alternative, Node, Resource { /** * Node type of mdast image. */ type: "image"; /** * Data associated with the mdast image. */ data?: ImageData | undefined; } /** * Info associated with mdast image nodes by the ecosystem. */ interface ImageData extends Data {} /** * Markdown image reference. */ interface ImageReference extends Alternative, Node, Reference { /** * Node type of mdast image reference. */ type: "imageReference"; /** * Data associated with the mdast image reference. */ data?: ImageReferenceData | undefined; } /** * Info associated with mdast image reference nodes by the ecosystem. */ interface ImageReferenceData extends Data {} /** * Markdown code (text) (inline). */ interface InlineCode extends Literal { /** * Node type of mdast code (text). */ type: "inlineCode"; /** * Data associated with the mdast code (text). */ data?: InlineCodeData | undefined; } /** * Info associated with mdast code (text) (inline) nodes by the ecosystem. */ interface InlineCodeData extends Data {} /** * Markdown link. */ interface Link extends Parent, Resource { /** * Node type of mdast link. */ type: "link"; /** * Children of link. */ children: PhrasingContent[]; /** * Data associated with the mdast link. */ data?: LinkData | undefined; } /** * Info associated with mdast link nodes by the ecosystem. */ interface LinkData extends Data {} /** * Markdown link reference. */ interface LinkReference extends Parent, Reference { /** * Node type of mdast link reference. */ type: "linkReference"; /** * Children of link reference. */ children: PhrasingContent[]; /** * Data associated with the mdast link reference. */ data?: LinkReferenceData | undefined; } /** * Info associated with mdast link reference nodes by the ecosystem. */ interface LinkReferenceData extends Data {} /** * Markdown list. */ interface List extends Parent { /** * Node type of mdast list. */ type: "list"; /** * Whether the items have been intentionally ordered (when `true`), or that * the order of items is not important (when `false` or not present). */ ordered?: boolean | null | undefined; /** * The starting number of the list, when the `ordered` field is `true`. */ start?: number | null | undefined; /** * Whether one or more of the children are separated with a blank line from * its siblings (when `true`), or not (when `false` or not present). */ spread?: boolean | null | undefined; /** * Children of list. */ children: ListContent[]; /** * Data associated with the mdast list. */ data?: ListData | undefined; } /** * Info associated with mdast list nodes by the ecosystem. */ interface ListData extends Data {} /** * Markdown list item. */ interface ListItem extends Parent { /** * Node type of mdast list item. */ type: "listItem"; /** * Whether the item is a tasklist item (when `boolean`). * * When `true`, the item is complete. * When `false`, the item is incomplete. */ checked?: boolean | null | undefined; /** * Whether one or more of the children are separated with a blank line from * its siblings (when `true`), or not (when `false` or not present). */ spread?: boolean | null | undefined; /** * Children of list item. */ children: Array; /** * Data associated with the mdast list item. */ data?: ListItemData | undefined; } /** * Info associated with mdast list item nodes by the ecosystem. */ interface ListItemData extends Data {} /** * Markdown paragraph. */ interface Paragraph extends Parent { /** * Node type of mdast paragraph. */ type: "paragraph"; /** * Children of paragraph. */ children: PhrasingContent[]; /** * Data associated with the mdast paragraph. */ data?: ParagraphData | undefined; } /** * Info associated with mdast paragraph nodes by the ecosystem. */ interface ParagraphData extends Data {} /** * Document fragment or a whole document. * * Should be used as the root of a tree and must not be used as a child. */ interface Root extends Parent { /** * Node type of mdast root. */ type: "root"; /** * Data associated with the mdast root. */ data?: RootData | undefined; } /** * Info associated with mdast root nodes by the ecosystem. */ interface RootData extends Data {} /** * Markdown strong. */ interface Strong extends Parent { /** * Node type of mdast strong. */ type: "strong"; /** * Children of strong. */ children: PhrasingContent[]; /** * Data associated with the mdast strong. */ data?: StrongData | undefined; } /** * Info associated with mdast strong nodes by the ecosystem. */ interface StrongData extends Data {} /** * Markdown GFM table. */ interface Table extends Parent { /** * Node type of mdast GFM table. */ type: "table"; /** * How cells in columns are aligned. */ align?: AlignType[] | null | undefined; /** * Children of GFM table. */ children: TableContent[]; /** * Data associated with the mdast GFM table. */ data?: TableData | undefined; } /** * Info associated with mdast GFM table nodes by the ecosystem. */ interface TableData extends Data {} /** * Markdown GFM table row. */ interface TableRow extends Parent { /** * Node type of mdast GFM table row. */ type: "tableRow"; /** * Children of GFM table row. */ children: RowContent[]; /** * Data associated with the mdast GFM table row. */ data?: TableRowData | undefined; } /** * Info associated with mdast GFM table row nodes by the ecosystem. */ interface TableRowData extends Data {} /** * Markdown GFM table cell. */ interface TableCell extends Parent { /** * Node type of mdast GFM table cell. */ type: "tableCell"; /** * Children of GFM table cell. */ children: PhrasingContent[]; /** * Data associated with the mdast GFM table cell. */ data?: TableCellData | undefined; } /** * Info associated with mdast GFM table cell nodes by the ecosystem. */ interface TableCellData extends Data {} /** * Markdown text. */ interface Text extends Literal { /** * Node type of mdast text. */ type: "text"; /** * Data associated with the mdast text. */ data?: TextData | undefined; } /** * Info associated with mdast text nodes by the ecosystem. */ interface TextData extends Data {} /** * Markdown thematic break (horizontal rule). */ interface ThematicBreak extends Node { /** * Node type of mdast thematic break. */ type: "thematicBreak"; /** * Data associated with the mdast thematic break. */ data?: ThematicBreakData | undefined; } /** * Info associated with mdast thematic break nodes by the ecosystem. */ interface ThematicBreakData extends Data {} /** * Markdown YAML. */ interface Yaml$1 extends Literal { /** * Node type of mdast YAML. */ type: "yaml"; /** * Data associated with the mdast YAML. */ data?: YamlData | undefined; } /** * Info associated with mdast YAML nodes by the ecosystem. */ interface YamlData extends Data {} //#endregion //#region src/changesets/schemas/dependency-table.d.ts /** * Valid dependency table actions. * * @remarks * Represents the three possible operations on a dependency: `"added"` for * new dependencies, `"updated"` for version changes, and `"removed"` for * deletions. Used in the "Action" column of dependency tables. * * @example * ```typescript * import { Schema } from "effect"; * import { DependencyActionSchema } from "@savvy-web/changesets"; * import type { DependencyAction } from "@savvy-web/changesets"; * * const action: DependencyAction = Schema.decodeUnknownSync(DependencyActionSchema)("updated"); * ``` * * @public */ declare const DependencyActionSchema: Schema.Literals; /** * Inferred type for {@link DependencyActionSchema}. * * @remarks * One of `"added"`, `"updated"`, or `"removed"`. * * @public */ type DependencyAction = typeof DependencyActionSchema.Type; /** * Extended dependency types for table format. * * @remarks * Unlike {@link DependencyTypeSchema} (which uses plural npm field names like * `"dependencies"`), this schema uses singular forms (`"dependency"`) and adds * four additional types with no `package.json` dependency-field counterpart: * `"workspace"` for monorepo workspace references, `"config"` for * configuration toolchain updates (e.g., ESLint, TypeScript), `"runtime"` for * language-runtime upgrades (e.g., the Node.js engine itself), and * `"packageManager"` for the package manager's own self-upgrade (pnpm, bun, * npm). `"runtime"` and `"packageManager"` are release-neutral β€” like * `devDependency` rows they document toolchain movement without implying a * consumer-facing version bump. * * @example * ```typescript * import { Schema } from "effect"; * import { DependencyTableTypeSchema } from "@savvy-web/changesets"; * import type { DependencyTableType } from "@savvy-web/changesets"; * * const tableType: DependencyTableType = Schema.decodeUnknownSync( * DependencyTableTypeSchema * )("workspace"); * ``` * * @see {@link DependencyTypeSchema} for the plural npm-field variant * * @public */ declare const DependencyTableTypeSchema: Schema.Literals; /** * Inferred type for {@link DependencyTableTypeSchema}. * * @remarks * One of `"dependency"`, `"devDependency"`, `"peerDependency"`, * `"optionalDependency"`, `"workspace"`, `"config"`, `"runtime"`, or * `"packageManager"`. * * @public */ type DependencyTableType = typeof DependencyTableTypeSchema.Type; /** * The canonical accepted-value pattern for a dependency-table From/To cell: * the em-dash sentinel (U+2014), a bare/`~`/`^` semver, or β€” as a last-resort * fallback when a `catalog:`/`workspace:` specifier could not be resolved to a * concrete version β€” a pnpm protocol string. Non-overlapping alternatives keep * this free of polynomial backtracking (CodeQL). * * @public */ declare const VERSION_RE: RegExp; /** * Version string or em dash (U+2014) sentinel for added/removed entries. * * @remarks * Accepts either a semver-like version string (with optional `~` or `^` * prefix and pre-release/build suffixes) or the em dash character `\u2014` * which serves as a sentinel: the "From" column uses `\u2014` for newly * added dependencies, and the "To" column uses it for removed ones. * * @example * ```typescript * import { Schema } from "effect"; * import { VersionOrEmptySchema } from "@savvy-web/changesets"; * * // Succeeds β€” semver version * Schema.decodeUnknownSync(VersionOrEmptySchema)("^3.19.1"); * * // Succeeds β€” em dash sentinel for "no version" * Schema.decodeUnknownSync(VersionOrEmptySchema)("\u2014"); * * // Throws ParseError β€” arbitrary text * Schema.decodeUnknownSync(VersionOrEmptySchema)("latest"); * ``` * * @public */ declare const VersionOrEmptySchema: Schema.String; /** * Schema for a single dependency table row. * * @remarks * Represents one row of a dependency update table in a CHANGELOG. * Each row captures the dependency name, its type, the change action, * and the "from" and "to" version strings. For added dependencies the * `from` field is an em dash; for removed dependencies the `to` field * is an em dash. * * @example * ```typescript * import { Schema } from "effect"; * import { DependencyTableRowSchema } from "@savvy-web/changesets"; * import type { DependencyTableRow } from "@savvy-web/changesets"; * * const row: DependencyTableRow = Schema.decodeUnknownSync(DependencyTableRowSchema)({ * dependency: "effect", * type: "dependency", * action: "updated", * from: "3.18.0", * to: "3.19.1", * }); * * // Newly added dependency β€” "from" is em dash * const addedRow: DependencyTableRow = Schema.decodeUnknownSync(DependencyTableRowSchema)({ * dependency: "@effect/cli", * type: "dependency", * action: "added", * from: "\u2014", * to: "0.50.0", * }); * ``` * * @see {@link DependencyTableRow} for the inferred TypeScript type * @see {@link DependencyTableSchema} for a non-empty array of rows * * @public */ declare const DependencyTableRowSchema: Schema.Struct<{ /** Package or toolchain name. */ readonly dependency: Schema.String; /** Dependency type. */ readonly type: Schema.Literals; /** Change action. */ readonly action: Schema.Literals; /** Previous version (em dash for added). */ readonly from: Schema.String; /** New version (em dash for removed). */ readonly to: Schema.String; }>; /** * Inferred type for {@link DependencyTableRowSchema}. * * @public */ interface DependencyTableRow extends Schema.Schema.Type {} /** * Schema for a dependency table (non-empty array of rows). * * @remarks * Validates that the table contains at least one row. Used to represent * the full dependency update table in a changeset or CHANGELOG entry. * * @example * ```typescript * import { Schema } from "effect"; * import { DependencyTableSchema } from "@savvy-web/changesets"; * * const table = Schema.decodeUnknownSync(DependencyTableSchema)([ * { * dependency: "effect", * type: "dependency", * action: "updated", * from: "3.18.0", * to: "3.19.1", * }, * { * dependency: "typescript", * type: "config", * action: "updated", * from: "5.6.0", * to: "5.7.2", * }, * ]); * * // Throws ParseError β€” empty array * Schema.decodeUnknownSync(DependencyTableSchema)([]); * ``` * * @see {@link DependencyTableRowSchema} for the individual row schema * * @public */ declare const DependencyTableSchema: Schema.$Array; /** Change action. */ readonly action: Schema.Literals; /** Previous version (em dash for added). */ readonly from: Schema.String; /** New version (em dash for removed). */ readonly to: Schema.String; }>>; //#endregion //#region src/changesets/api/dependency-table.d.ts /** * Static class for dependency table manipulation. * * Wraps the internal utility functions that operate on dependency tables -- * the structured markdown tables that appear in the "Dependencies" section * of changelogs. Each row in a dependency table represents a single package * change with its name, type, action, and version transition. * * @remarks * The typical workflow for processing dependency tables is: * * 1. **Parse** an mdast `Table` node into typed {@link DependencyTableRow} objects * 2. **Collapse** duplicate rows (same package updated multiple times) into single entries * 3. **Sort** rows by dependency type, then alphabetically by package name * 4. **Serialize** back to an mdast `Table` node or directly to a markdown string * * The {@link DependencyTable.aggregate} method combines the collapse and sort * steps into a single call, which is the most common usage pattern. * * Each {@link DependencyTableRow} is validated by the {@link DependencyTableRowSchema} * Effect Schema at system boundaries, ensuring that dependency names, types, * actions, and version strings conform to expected formats. * * @example Parse, aggregate, and serialize a dependency table * ```typescript * import { DependencyTable } from "\@savvy-web/changesets"; * import type { DependencyTableRow } from "\@savvy-web/changesets"; * import type { Table } from "mdast"; * * // Given an mdast Table node from a parsed CHANGELOG * declare const tableNode: Table; * * // Parse into typed rows * const rows: DependencyTableRow[] = DependencyTable.parse(tableNode); * * // Collapse duplicates and sort by type, then name * const aggregated: DependencyTableRow[] = DependencyTable.aggregate(rows); * * // Serialize back to an mdast Table node for further AST manipulation * const outputNode: Table = DependencyTable.serialize(aggregated); * * // Or serialize directly to a markdown string * const markdown: string = DependencyTable.toMarkdown(aggregated); * ``` * * @example Step-by-step collapse and sort * ```typescript * import { DependencyTable } from "\@savvy-web/changesets"; * import type { DependencyTableRow } from "\@savvy-web/changesets"; * * declare const rows: DependencyTableRow[]; * * // Collapse duplicate entries (same package appears multiple times) * const collapsed: DependencyTableRow[] = DependencyTable.collapse(rows); * * // Sort by dependency type, then alphabetically by name * const sorted: DependencyTableRow[] = DependencyTable.sort(collapsed); * ``` * * @see {@link DependencyTableRow} for the row shape (dependency, type, action, from, to) * @see {@link DependencyTableRowSchema} for the Effect Schema that validates row data * @see {@link DependencyTableSchema} for the non-empty array schema * * @public */ declare class DependencyTable { private constructor(); /** * Parse an mdast `Table` node into typed dependency table rows. * * @remarks * Extracts the text content from each table cell and maps it to the * corresponding {@link DependencyTableRow} fields. The first row is * treated as the header and skipped. Rows that do not have the expected * number of columns are ignored. * * @param tableNode - An mdast `Table` node from a parsed markdown AST * @returns Array of {@link DependencyTableRow} objects, one per data row */ static parse(tableNode: Table): DependencyTableRow[]; /** * Serialize typed dependency table rows into an mdast `Table` node. * * @remarks * Produces a well-formed mdast `Table` with a header row * (`Dependency | Type | Action | From | To`) followed by one data row * per input entry. The resulting node can be inserted into a remark AST * for further processing or stringification. * * @param rows - Array of {@link DependencyTableRow} objects to serialize * @returns An mdast `Table` node ready for AST insertion */ static serialize(rows: DependencyTableRow[]): Table; /** * Serialize typed dependency table rows directly to a markdown string. * * @remarks * Convenience method that combines {@link DependencyTable.serialize} with * remark stringification. Produces a GFM-compatible markdown table string. * * @param rows - Array of {@link DependencyTableRow} objects to render * @returns A markdown string containing the formatted table */ static toMarkdown(rows: DependencyTableRow[]): string; /** * Collapse duplicate dependency rows into single entries. * * @remarks * When a package appears in multiple rows (e.g., updated in separate * changesets), this method merges them by keeping the earliest `from` * version and the latest `to` version, producing a single row that * represents the net change. * * @param rows - Array of {@link DependencyTableRow} objects, possibly with duplicates * @returns A new array with duplicate packages collapsed into single rows */ static collapse(rows: DependencyTableRow[]): DependencyTableRow[]; /** * Sort dependency rows by action, type, and package name. * * @remarks * Applies a three-level stable sort: * 1. **Action** β€” `removed` first, then `updated`, then `added` * 2. **Type** β€” alphabetically (e.g., `config` before `dependency`) * 3. **Dependency name** β€” alphabetically within each action+type group * * @param rows - Array of {@link DependencyTableRow} objects to sort * @returns A new array sorted by action, type, then name */ static sort(rows: DependencyTableRow[]): DependencyTableRow[]; /** * Collapse duplicate rows and then sort the result. * * @remarks * Equivalent to calling {@link DependencyTable.collapse} followed by * {@link DependencyTable.sort}. This is the recommended method for * preparing dependency table data for final output, as it produces * a clean, deduplicated, and consistently ordered table. * * @param rows - Array of {@link DependencyTableRow} objects to aggregate * @returns A new array with duplicates collapsed and rows sorted */ static aggregate(rows: DependencyTableRow[]): DependencyTableRow[]; } //#endregion //#region src/changesets/api/linter.d.ts /** * Class-based API wrapper for changeset linting. * * Provides a static class interface that runs all five remark-lint rules * against changeset markdown files and returns structured diagnostics. * * @internal */ /** * A single lint diagnostic message produced by changeset validation. * * @remarks * Each `LintMessage` corresponds to one remark-lint rule violation found * during changeset validation. Messages include source location information * (file, line, column) for integration with editors, CI reporters, and * the Effect CLI's `lint` and `check` commands. * * The five rules that produce lint messages are: * * - **heading-hierarchy** -- ensures headings follow a valid nesting order * - **required-sections** -- checks that mandatory sections are present * - **content-structure** -- validates the structure of section content * - **dependency-table-format** -- enforces the machine-generated dependency-table format for `## Dependencies` sections * - **uncategorized-content** -- flags content outside recognized section headings * * @public */ interface LintMessage { /** * File path that was validated. * * @remarks * Set to the actual filesystem path when using {@link ChangesetLinter.validateFile} * or {@link ChangesetLinter.validate}. Defaults to `""` when using * {@link ChangesetLinter.validateContent} without an explicit path. */ file: string; /** * Identifier of the remark-lint rule that produced this message. * * @remarks * Corresponds to one of the five built-in rules: `"heading-hierarchy"`, * `"required-sections"`, `"content-structure"`, `"dependency-table-format"`, * or `"uncategorized-content"`. Falls back to `"unknown"` if the underlying * vfile message has no rule ID. */ rule: string; /** * Line number where the issue was detected (1-based). * * @remarks * Line numbers are relative to the content after YAML frontmatter * stripping. Defaults to `1` if the underlying rule does not provide * position information. */ line: number; /** * Column number where the issue was detected (1-based). * * @remarks * Defaults to `1` if the underlying rule does not provide position * information. */ column: number; /** * Human-readable description of the lint violation. * * @remarks * Suitable for display in terminal output, editor diagnostics, or * CI annotations. Includes enough context to understand the issue * without referencing the source file. */ message: string; } /** * Static class for linting changeset markdown files. * * Runs the five remark-lint rules (heading-hierarchy, required-sections, * content-structure, dependency-table-format, uncategorized-content) against * changeset markdown and returns structured {@link LintMessage} diagnostics. * * @remarks * This class implements the pre-validation layer of the three-layer * pipeline. It validates that changeset markdown conforms to the * expected structure before the changelog formatter processes it. * * YAML frontmatter (the `---` delimited block at the top of changeset * files containing package bump declarations) is automatically stripped * before validation, since frontmatter is managed by Changesets itself * and is not part of the markdown structure being validated. * * The class provides three granularity levels: * * - {@link ChangesetLinter.validateContent} -- validate a markdown string directly * - {@link ChangesetLinter.validateFile} -- validate a single file by path * - {@link ChangesetLinter.validate} -- validate all changeset files in a directory * * @example Validate a single file and report errors * ```typescript * import { ChangesetLinter } from "\@savvy-web/changesets"; * import type { LintMessage } from "\@savvy-web/changesets"; * * const messages: LintMessage[] = ChangesetLinter.validateFile( * ".changeset/brave-pandas-learn.md", * ); * * if (messages.length > 0) { * for (const msg of messages) { * console.error(`${msg.file}:${msg.line}:${msg.column} [${msg.rule}] ${msg.message}`); * } * process.exitCode = 1; * } * ``` * * @example Validate all changesets in a directory * ```typescript * import { ChangesetLinter } from "\@savvy-web/changesets"; * import type { LintMessage } from "\@savvy-web/changesets"; * * const allMessages: LintMessage[] = ChangesetLinter.validate(".changeset"); * * const errorsByFile = new Map(); * for (const msg of allMessages) { * const existing = errorsByFile.get(msg.file) ?? []; * existing.push(msg); * errorsByFile.set(msg.file, existing); * } * * for (const [file, msgs] of errorsByFile) { * console.error(`${file}: ${msgs.length} issue(s)`); * } * ``` * * @example Validate markdown content directly (useful in tests) * ```typescript * import { ChangesetLinter } from "\@savvy-web/changesets"; * import type { LintMessage } from "\@savvy-web/changesets"; * * const content = [ * "---", * '"\@savvy-web/core": patch', * "---", * "", * "## Bug Fixes", * "", * "Fixed an edge case in token validation.", * ].join("\n"); * * const messages: LintMessage[] = ChangesetLinter.validateContent(content); * // messages.length === 0 (valid changeset) * ``` * * @see {@link LintMessage} for the diagnostic message shape * @see {@link Categories} for the valid section headings checked by the rules * * @public */ declare class ChangesetLinter { private constructor(); /** * Validate a single changeset file by path. * * @remarks * Reads the file synchronously, strips YAML frontmatter, and runs all * five lint rules. The file path is preserved in each returned * {@link LintMessage} for error reporting. * * @param filePath - Absolute or relative path to the changeset `.md` file * @returns Array of {@link LintMessage} diagnostics (empty if the file is valid) */ static validateFile(filePath: string): LintMessage[]; /** * Validate a markdown string directly. * * @remarks * Strips YAML frontmatter (if present) and runs all five lint rules * against the remaining content. This method is useful for validating * changeset content that is already in memory, such as in test suites * or editor integrations. * * @param content - Raw markdown content (may include YAML frontmatter) * @param filePath - File path for error reporting; defaults to `""` * when validating in-memory content * @returns Array of {@link LintMessage} diagnostics (empty if the content is valid) */ static validateContent(content: string, filePath?: string): LintMessage[]; /** * Validate all changeset `.md` files in a directory. * * @remarks * Scans the directory for `*.md` files (excluding `README.md`) and runs * {@link ChangesetLinter.validateFile} on each. Results are aggregated * into a single array. The directory is read synchronously. * * This is the method used by the Effect CLI's `lint` and `check` * subcommands to validate the `.changeset/` directory. * * @param dir - Path to the directory containing changeset files * (typically `.changeset/`) * @returns Aggregated array of {@link LintMessage} diagnostics from all files */ static validate(dir: string): LintMessage[]; } //#endregion //#region src/changesets/services/maintenance-reason.d.ts /** * A group co-member whose own changesets forced this release. * * @public */ declare const MaintenanceTriggerSchema: Schema.Struct<{ /** Package name of the triggering co-member. */ readonly name: Schema.String; /** The co-member's new version in the same release plan. */ readonly version: Schema.String; }>; /** * A group co-member whose own changesets forced this release. * * @public */ type MaintenanceTrigger = typeof MaintenanceTriggerSchema.Type; /** * Why a package is releasing with no changesets of its own. * * @public */ declare const MaintenanceReasonSchema: Schema.Struct<{ /** Coupling that forced the release; `"unspecified"` when undetermined. */ readonly kind: Schema.Literals; /** Triggering co-members; empty for `"unspecified"`. */ readonly triggers: Schema.$Array>; }>; /** * Why a package is releasing with no changesets of its own. * * @public */ type MaintenanceReason = typeof MaintenanceReasonSchema.Type; /** * Derive the {@link MaintenanceReason} for a release, or `undefined` when the * release has its own changesets (not a maintenance release). * * @param release - The release to classify. * @param plan - The full release plan (source of group co-members). * @param config - Resolved changesets config (`fixed` / `linked` groups). * @returns The reason, or `undefined` for releases with their own changesets. * * @remarks * Group entries are matched with {@link ChangesetConfig.matches} β€” exact names * and trailing `"@scope/*"` prefixes only, a subset of the micromatch globs * changesets accepts. A group entry using richer glob syntax (e.g. `"pkg-*"`) * will not match here; the release then degrades gracefully to the * `"unspecified"` fallback sentence instead of naming its triggers. * * Co-members releasing as `type: "none"` are never triggers β€” they carry no * version bump (and, per `@changesets/types`, no guaranteed `newVersion`), so * naming one would print an unchanged version as the cause of the release. * * @public */ declare function deriveMaintenanceReason(release: ComprehensiveRelease, plan: ReleasePlan, config: Config): MaintenanceReason | undefined; //#endregion //#region src/changesets/remark/plugins/maintenance-note.d.ts /** * Options for {@link MaintenanceNotePlugin}. * * @public */ interface MaintenanceNoteOptions { /** Version heading text to target (e.g. `"2.3.1"`). */ readonly version: string; /** Why the package released with no changesets of its own. */ readonly reason: MaintenanceReason; } declare const MaintenanceNotePlugin: Plugin$1<[MaintenanceNoteOptions], Root>; //#endregion //#region src/changesets/api/transformer.d.ts /** * Optional per-file behavior for {@link ChangelogTransformer}. * * @public */ interface TransformOptions { /** Insert a Maintenance note into this version block when it ends up empty. */ readonly maintenance?: MaintenanceNoteOptions; /** * Whether to aggregate `Thanks \@user!` attributions into a `### Thanks` * section (default `true`). When `false`, inline attributions and any * existing Thanks section are stripped and no section is emitted. * Mirrors the `thanks` changelog option in `.changeset/config.json`. */ readonly thanks?: boolean; } /** * Static class for post-processing CHANGELOG.md files. * * Implements the third layer of the three-layer pipeline by running * the {@link SilkChangesetTransformPreset} plugins (currently seven) in a * fixed order to clean up, normalize, and enhance changelog output produced * by the formatter layer. * * @remarks * See {@link SilkChangesetTransformPreset} for the ordered plugin list and * the rationale behind each plugin's position. * * The transformer operates on the full CHANGELOG.md content (all versions), * not just the latest release block. It is idempotent -- running it multiple * times produces the same output. * * @example Transform changelog content in memory * ```typescript * import { ChangelogTransformer } from "\@savvy-web/changesets"; * * const rawChangelog = [ * "# Changelog", * "", * "## 1.2.0", * "", * "### Features", * "", * "- Added new auth endpoint", * "", * "### Features", * "", * "- Added rate limiting", * ].join("\n"); * * const cleaned: string = ChangelogTransformer.transformContent(rawChangelog); * // Duplicate "Features" sections are merged into one * ``` * * @example Transform a CHANGELOG.md file in-place * ```typescript * import { ChangelogTransformer } from "\@savvy-web/changesets"; * * // Reads, transforms, and writes back to the same path * ChangelogTransformer.transformFile("CHANGELOG.md"); * ``` * * @example Check for changes without writing (dry-run pattern) * ```typescript * import { readFileSync } from "node:fs"; * import { ChangelogTransformer } from "\@savvy-web/changesets"; * * const original: string = readFileSync("CHANGELOG.md", "utf-8"); * const transformed: string = ChangelogTransformer.transformContent(original); * * if (original !== transformed) { * console.error("CHANGELOG.md needs transformation"); * process.exitCode = 1; * } * ``` * * @see {@link Categories} for the priority order used by ReorderSectionsPlugin * @see {@link ChangesetLinter} for the pre-validation layer (layer 1) * @see {@link Changelog} for the formatter layer (layer 2) * * @public */ declare class ChangelogTransformer { private constructor(); /** * Transform CHANGELOG markdown content by running the * {@link SilkChangesetTransformPreset} plugins. * * @remarks * The input is parsed with `remark-parse` and `remark-gfm` (for table * support), processed through every plugin in {@link SilkChangesetTransformPreset} * in order, and emitted back to markdown through the canonical * `@effected/markdown` stringifier. The operation is synchronous and * idempotent. * * @param content - Raw CHANGELOG markdown string (may contain multiple * version blocks, GFM tables, footnotes, and reference links) * @param options - Optional transformation options, including maintenance note configuration * @returns The transformed markdown string with dependency tables aggregated, * sections merged, reordered, deduplicated, and normalized */ static transformContent(content: string, options?: TransformOptions): string; /** * Transform a CHANGELOG file in-place. * * @remarks * Reads the file synchronously, runs all transform plugins via * {@link ChangelogTransformer.transformContent}, and writes the result * back to the same path. The file is overwritten atomically (single * `writeFileSync` call). * * This is the method used by the Effect CLI's `transform` subcommand * when invoked without the `--dry-run` or `--check` flags. * * @param filePath - Absolute or relative path to the CHANGELOG.md file * @param options - Optional transformation options, including maintenance note configuration */ static transformFile(filePath: string, options?: TransformOptions): void; } //#endregion //#region src/changesets/changelog/index.d.ts /** * Changesets API `ChangelogFunctions` implementation. * * This object satisfies the `ChangelogFunctions` contract from * `\@changesets/types`. Each method validates options, runs the * corresponding Effect program with the merged service layer, and * returns a `Promise`. * * @internal */ declare const changelogFunctions$1: ChangelogFunctions; //#endregion //#region src/changesets/changelog/vanilla.d.ts /** * The stock `\@changesets/changelog-git` changelog implementation. * * @remarks * This is the exact upstream default export (identity-equal, pinned by * test), typed against this package's re-exported {@link ChangelogFunctions} * interface. Use it wherever the plain changesets rendering is wanted * instead of the silk section-aware formatter β€” e.g. in * `.changeset/config.json` via a changelog module that forwards it, or * programmatically from a release pipeline. * * @example * ```typescript * import { Changesets } from "@savvy-web/silk-effects"; * * const line = await Changesets.vanillaChangelogFunctions.getReleaseLine( * { id: "x", summary: "Fix a thing", releases: [{ name: "pkg", type: "patch" }] }, * "patch", * null, * ); * ``` * * @public */ declare const vanillaChangelogFunctions: ChangelogFunctions; //#endregion //#region src/changesets/errors.d.ts /** * Tagged errors for \@savvy-web/changesets. * * @remarks * All errors in this module extend Effect's `Data.TaggedError`, enabling * type-safe error handling via `Effect.catchTag`. Each error class carries * structured metadata (not just a string message) so that callers can * programmatically inspect failure details. * * The `*Base` exports are anonymous base classes generated by * `Data.TaggedError()`. They are exported solely for api-extractor * compatibility and should not be used directly. * * @see {@link https://effect.website/docs/data-types/data#taggerror | Effect TaggedError documentation} * */ /** * Base class for {@link ChangesetValidationError}. * * @privateRemarks * This export is required for api-extractor documentation generation. * Effect's Data.TaggedError creates an anonymous base class that must be * explicitly exported to avoid "forgotten export" warnings. Do not delete. * * @internal */ declare const ChangesetValidationErrorBase: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "ChangesetValidationError"; } & Readonly; /** * Changeset file validation failure. * * @remarks * Raised when a changeset markdown file fails structural validation * (e.g., missing summary, invalid heading, malformed dependency table). * Carries an array of structured issues, each with a JSON-path pointing * to the problematic field and a human-readable message. * * @example * ```typescript * import { Effect } from "effect"; * import { ChangesetValidationError } from "@savvy-web/changesets"; * * declare const program: Effect.Effect; * * const handled = program.pipe( * Effect.catchTag("ChangesetValidationError", (err) => { * for (const issue of err.issues) { * console.error(`${issue.path}: ${issue.message}`); * } * return Effect.void; * }), * ); * ``` * * @see {@link ChangesetSchema} for the schema that drives validation * * @public */ declare class ChangesetValidationError extends ChangesetValidationErrorBase<{ /** File path of the changeset that failed validation. */ readonly file?: string | undefined; /** Individual validation issues found. */ readonly issues: ReadonlyArray<{ /** JSON-path to the problematic field. */ readonly path: string; /** Human-readable description of the issue. */ readonly message: string; }>; }> { get message(): string; } /** * Base class for {@link GitHubApiError}. * * @privateRemarks * This export is required for api-extractor documentation generation. * Effect's Data.TaggedError creates an anonymous base class that must be * explicitly exported to avoid "forgotten export" warnings. Do not delete. * * @internal */ declare const GitHubApiErrorBase: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "GitHubApiError"; } & Readonly; /** * GitHub API request failure. * * @remarks * Raised when a call to the GitHub API (via `\@changesets/get-github-info`) * fails due to network issues, authentication errors, rate limiting, or * server errors. Use the {@link GitHubApiError.isRetryable | isRetryable} * property to determine whether a retry strategy should be applied. * Rate-limited responses (403/429) and server errors (5xx) are considered * retryable. * * @example * ```typescript * import { Effect, Schedule } from "effect"; * import { GitHubApiError } from "@savvy-web/changesets"; * * declare const program: Effect.Effect; * * const withRetry = program.pipe( * Effect.catchTag("GitHubApiError", (err) => { * if (err.isRetryable) { * return Effect.retry(program, Schedule.exponential("1 second")); * } * return Effect.fail(err); * }), * ); * ``` * * @see {@link GitHubService} for the Effect service that may produce this error * * @public */ declare class GitHubApiError extends GitHubApiErrorBase<{ /** The API operation that failed (e.g., `"getInfo"`). */ readonly operation: string; /** HTTP status code, if available. */ readonly statusCode?: number | undefined; /** Human-readable failure reason. */ readonly reason: string; }> { get message(): string; /** Whether this error is a rate-limit response (403 or 429). */ get isRateLimited(): boolean; /** Whether this error is eligible for retry (server errors or rate limits). */ get isRetryable(): boolean; } /** * Base class for {@link MarkdownParseError}. * * @privateRemarks * This export is required for api-extractor documentation generation. * Effect's Data.TaggedError creates an anonymous base class that must be * explicitly exported to avoid "forgotten export" warnings. Do not delete. * * @internal */ declare const MarkdownParseErrorBase: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "MarkdownParseError"; } & Readonly; /** * Markdown parsing failure. * * @remarks * Raised when a markdown file cannot be parsed into an AST by the unified/remark * pipeline. Carries optional source file location information (line, column) * for diagnostic display. * * @example * ```typescript * import { Effect } from "effect"; * import { MarkdownParseError } from "@savvy-web/changesets"; * * declare const program: Effect.Effect; * * const handled = program.pipe( * Effect.catchTag("MarkdownParseError", (err) => { * console.error(err.message); * return Effect.succeed(""); * }), * ); * ``` * * * @public */ declare class MarkdownParseError extends MarkdownParseErrorBase<{ /** Source file path, if known. */ readonly source?: string | undefined; /** Human-readable failure reason. */ readonly reason: string; /** Line number where the error occurred (1-based). */ readonly line?: number | undefined; /** Column number where the error occurred (1-based). */ readonly column?: number | undefined; }> { get message(): string; } /** * Base class for {@link ConfigurationError}. * * @privateRemarks * This export is required for api-extractor documentation generation. * Effect's Data.TaggedError creates an anonymous base class that must be * explicitly exported to avoid "forgotten export" warnings. Do not delete. * * @internal */ declare const ConfigurationErrorBase: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "ConfigurationError"; } & Readonly; /** * Invalid or missing configuration. * * @remarks * Raised when the changeset configuration (typically from `.changeset/config.json`) * is missing required fields, has invalid values, or cannot be parsed. The `field` * property identifies which configuration field is problematic, and `reason` * provides an actionable message. * * @example * ```typescript * import { Effect } from "effect"; * import { ConfigurationError, validateChangesetOptions } from "@savvy-web/changesets"; * * const program = validateChangesetOptions({ repo: "invalid" }).pipe( * Effect.catchTag("ConfigurationError", (err) => { * console.error(`Field "${err.field}": ${err.reason}`); * return Effect.fail(err); * }), * ); * ``` * * @see {@link ChangesetOptionsSchema} for the expected configuration shape * @see {@link validateChangesetOptions} for the validation function that produces this error * * @public */ declare class ConfigurationError extends ConfigurationErrorBase<{ /** Configuration field that is invalid or missing. */ readonly field: string; /** Human-readable failure reason. */ readonly reason: string; }> { get message(): string; } /** * Base class for {@link VersionFileError}. * * @privateRemarks * This export is required for api-extractor documentation generation. * Effect's Data.TaggedError creates an anonymous base class that must be * explicitly exported to avoid "forgotten export" warnings. Do not delete. * * @internal */ declare const VersionFileErrorBase: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "VersionFileError"; } & Readonly; /** * Version file update failure. * * @remarks * Raised when a JSON file targeted by the `versionFiles` configuration option * cannot be read, parsed, or updated at the specified JSONPath. Common causes * include missing files, invalid JSON, or JSONPath expressions that do not * match any field in the target file. * * @example * ```typescript * import { Effect } from "effect"; * import { VersionFileError } from "@savvy-web/changesets"; * * declare const program: Effect.Effect; * * const handled = program.pipe( * Effect.catchTag("VersionFileError", (err) => { * console.error(`Failed to update ${err.filePath}: ${err.reason}`); * if (err.jsonPath) { * console.error(` at JSONPath: ${err.jsonPath}`); * } * return Effect.void; * }), * ); * ``` * * @see {@link VersionFilesSchema} for the configuration that drives version file updates * @see {@link JsonPathSchema} for JSONPath expression validation * * @public */ declare class VersionFileError extends VersionFileErrorBase<{ /** Absolute path to the file that failed. */ readonly filePath: string; /** JSONPath expression that failed, if applicable. */ readonly jsonPath?: string | undefined; /** Human-readable failure reason. */ readonly reason: string; }> { get message(): string; } /** * Base class for {@link GitError}. * * @privateRemarks * Effect's `Data.TaggedError` creates an anonymous base class that * api-extractor cannot follow without an explicit export. * * @internal */ declare const GitErrorBase: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "GitError"; } & Readonly; /** * Git command failure. * * @remarks * Raised by services that shell out to `git` β€” `BranchAnalyzer` is the * canonical consumer. Captures the failing command, the working directory * it was invoked in, and the underlying reason (often the captured stderr * from the child process) so callers can produce actionable diagnostics. * * @example * ```typescript * import { Effect } from "effect"; * import { GitError } from "@savvy-web/changesets"; * * declare const program: Effect.Effect; * * const handled = program.pipe( * Effect.catchTag("GitError", (err) => * Effect.logError(`git failed in ${err.cwd}: ${err.command}\n${err.reason}`) * ), * ); * ``` * * @see {@link BranchAnalyzer} which produces these errors when computing * merge bases or running `git diff` * * @public */ declare class GitError extends GitErrorBase<{ /** The git command that failed, including arguments. */ readonly command: string; /** Working directory in which the command was invoked. */ readonly cwd: string; /** Human-readable failure reason β€” typically the captured stderr or thrown error message. */ readonly reason: string; }> { get message(): string; } /** * Base class for {@link ChangesetIOError}. * * @privateRemarks * Effect's `Data.TaggedError` creates an anonymous base class that * api-extractor cannot follow without an explicit export. * * @internal */ declare const ChangesetIOErrorBase: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "ChangesetIOError"; } & Readonly; /** * Changeset file I/O failure. * * @remarks * Raised by {@link DepsRegen} when reading, writing, listing, or deleting * `.changeset/*.md` files fails. Deletion failures during * {@link DepsRegenShape.execute} are tolerated (stale changesets are * skip-and-continue, so an interrupted run stays safely re-runnable); * read, list, and write failures are loud. * * @example * ```typescript * import { Effect } from "effect"; * import { ChangesetIOError } from "@savvy-web/changesets"; * * declare const program: Effect.Effect; * * const handled = program.pipe( * Effect.catchTag("ChangesetIOError", (err) => * Effect.logError(`changeset ${err.operation} failed at ${err.path}: ${err.reason}`) * ), * ); * ``` * * @see {@link DepsRegen} which produces these errors during plan/execute * * @public */ declare class ChangesetIOError extends ChangesetIOErrorBase<{ /** Absolute path of the file or directory the operation targeted. */ readonly path: string; /** The failed operation. */ readonly operation: "read" | "write" | "delete" | "list"; /** Human-readable failure reason. */ readonly reason: string; }> { get message(): string; } /** * Base class for {@link ReleasePlanError}. * * @privateRemarks * Required export for api-extractor (anonymous Data.TaggedError base). Do not delete. * * @internal */ declare const ReleasePlanErrorBase: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "ReleasePlanError"; } & Readonly; /** * Release planning, preview, or apply failure. * * @remarks * Wraps any failure from the underlying `@changesets/*` machinery * (`getReleasePlan`, `applyReleasePlan`, config resolution) into a typed * Effect error, tagged with the phase that failed. * * @public */ declare class ReleasePlanError extends ReleasePlanErrorBase<{ /** The phase that failed. */ readonly phase: "plan" | "preview" | "apply"; /** Human-readable failure reason. */ readonly reason: string; }> { get message(): string; } //#endregion //#region src/errors/ChangesetConfigError.d.ts declare const ChangesetConfigError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "ChangesetConfigError"; } & Readonly; /** * Raised when the `.changeset/config.json` file cannot be read or decoded. * * @remarks * Returned by `ChangesetConfigReader.read` when the file is missing, * contains invalid JSON, or fails Effect Schema validation. * * @since 0.1.0 * @public */ declare class ChangesetConfigError extends ChangesetConfigError_base<{ readonly path: string; readonly reason: string; }> { get message(): string; } //#endregion //#region src/schemas/VersioningSchemas.d.ts /** * Standard changesets configuration matching the `@changesets/config@4.0.0` spec. * * @remarks * Represents the parsed `.changeset/config.json` file. All fields are optional * to allow partial configs. Use {@link (SilkChangesetConfigFile:type)} when the Silk changelog * adapter is detected. * * @since 0.1.0 */ /** @public */ declare const ChangesetConfigFile: Schema.Struct<{ readonly changelog: Schema.optional, Schema.Literal]>>; readonly commit: Schema.optional]>>; readonly fixed: Schema.optional>>; readonly linked: Schema.optional>>; readonly access: Schema.optional>; readonly baseBranch: Schema.optional; readonly updateInternalDependencies: Schema.optional>; readonly ignore: Schema.optional>; readonly privatePackages: Schema.optional; readonly version: Schema.optional; }>, Schema.Literal]>>; readonly prettier: Schema.optional; readonly changedFilePatterns: Schema.optional>; readonly bumpVersionsWithWorkspaceProtocolOnly: Schema.optional; readonly snapshot: Schema.optional; readonly prereleaseTemplate: Schema.optional; }>>; }>; /** * @since 0.1.0 * @public */ type ChangesetConfigFile = typeof ChangesetConfigFile.Type; /** * Extended changeset config for repos using the `@savvy-web/changesets` changelog adapter. * * @remarks * Extends {@link (ChangesetConfigFile:type)} with a `_isSilk` marker flag that is automatically * set to `true`. Detected by {@link ChangesetConfigReader} when the `changelog` field * references `@savvy-web/changesets`. * * @since 0.1.0 */ /** @public */ declare const SilkChangesetConfigFile: Schema.Struct<{ readonly changelog: Schema.optional, Schema.Literal]>>; readonly commit: Schema.optional]>>; readonly fixed: Schema.optional>>; readonly linked: Schema.optional>>; readonly access: Schema.optional>; readonly baseBranch: Schema.optional; readonly updateInternalDependencies: Schema.optional>; readonly ignore: Schema.optional>; readonly privatePackages: Schema.optional; readonly version: Schema.optional; }>, Schema.Literal]>>; readonly prettier: Schema.optional; readonly changedFilePatterns: Schema.optional>; readonly bumpVersionsWithWorkspaceProtocolOnly: Schema.optional; readonly snapshot: Schema.optional; readonly prereleaseTemplate: Schema.optional; }>>; readonly _isSilk: Schema.withConstructorDefault>; }>; /** * @since 0.1.0 * @public */ type SilkChangesetConfigFile = typeof SilkChangesetConfigFile.Type; //#endregion //#region src/services/ChangesetConfigReader.d.ts /** * The {@link ChangesetConfigReader} service shape. * * @since 3.2.0 * @public */ interface ChangesetConfigReaderShape { /** * Read and decode `.changeset/config.json` from the given workspace root. * * @param root - Absolute path to the workspace root containing the `.changeset/` directory. * @returns An `Effect` that succeeds with the decoded config or fails with {@link ChangesetConfigError}. * * @since 0.1.0 */ readonly read: (root: string) => Effect.Effect; } declare const ChangesetConfigReader_base: Context.ServiceClass; /** * Service that reads and decodes the `.changeset/config.json` for a given workspace root. * * @remarks * Automatically detects whether the config uses the Silk changelog adapter * (`@savvy-web/changesets`) and decodes as {@link (SilkChangesetConfigFile:type)} or the * standard {@link (ChangesetConfigFile:type)} accordingly. * * @example * ```typescript * const result = await Effect.runPromise( * Effect.gen(function* () { * const reader = yield* ChangesetConfigReader; * return yield* reader.read(process.cwd()); * }).pipe( * Effect.provide(ChangesetConfigReader.layer), * Effect.provide(NodeServices.layer), * ) * ); * ``` * * @since 0.1.0 * @public */ declare class ChangesetConfigReader extends ChangesetConfigReader_base { /** * Production implementation of {@link ChangesetConfigReader}. * * @remarks * Requires the core `FileSystem` service. Provide `NodeServices.layer` (or * `NodeFileSystem.layer`) from `@effect/platform-node` to satisfy this dependency. * * @since 0.1.0 * @public */ static readonly layer: Layer.Layer; } //#endregion //#region src/changesets/services/config-inspector.d.ts /** A `versionFiles` entry expanded to its absolute target paths. @public */ declare const ResolvedVersionFileSchema: Schema.Struct<{ readonly glob: Schema.String; readonly paths: Schema.$Array; readonly matchedFiles: Schema.$Array; }>; /** A `versionFiles` entry expanded to its absolute target paths. @public */ type ResolvedVersionFile = typeof ResolvedVersionFileSchema.Type; /** A package's resolved release surface. @public */ declare const ResolvedPackageScopeSchema: Schema.Struct<{ readonly name: Schema.String; readonly workspaceDir: Schema.String; readonly version: Schema.String; readonly additionalScopes: Schema.$Array; readonly additionalScopeFiles: Schema.$Array; readonly versionFiles: Schema.$Array; readonly matchedFiles: Schema.$Array; }>>; }>; /** A package's resolved release surface. @public */ type ResolvedPackageScope = typeof ResolvedPackageScopeSchema.Type; /** Structured representation of a resolved `.changeset/config.json`. @public */ declare const InspectedConfigSchema: Schema.Struct<{ readonly configPath: Schema.String; readonly projectDir: Schema.String; readonly changelog: Schema.NullOr; readonly baseBranch: Schema.String; readonly access: Schema.Literals; readonly ignore: Schema.$Array; readonly packages: Schema.$Array; readonly additionalScopeFiles: Schema.$Array; readonly versionFiles: Schema.$Array; readonly matchedFiles: Schema.$Array; }>>; }>>; readonly legacyVersionFilesUsed: Schema.Boolean; }>; /** Structured representation of a resolved `.changeset/config.json`. @public */ type InspectedConfig = typeof InspectedConfigSchema.Type; /** Reason a path was attributed to a package (or left unmapped). @public */ declare const ClassificationReasonSchema: Schema.Union, Schema.Struct<{ readonly kind: Schema.Literal<"additionalScope">; readonly glob: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"versionFile">; readonly glob: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"unmappedHint">; readonly hint: Schema.String; }>, Schema.Null]>; /** Reason a path was attributed to a package (or left unmapped). @public */ type ClassificationReason = typeof ClassificationReasonSchema.Type; /** The result of classifying a single path against a resolved config. @public */ declare const ClassificationSchema: Schema.Struct<{ readonly path: Schema.String; readonly package: Schema.NullOr; readonly reason: Schema.Union, Schema.Struct<{ readonly kind: Schema.Literal<"additionalScope">; readonly glob: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"versionFile">; readonly glob: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"unmappedHint">; readonly hint: Schema.String; }>, Schema.Null]>; }>; /** The result of classifying a single path against a resolved config. @public */ type Classification = typeof ClassificationSchema.Type; /** * Effect service interface for inspecting a project's changeset config. * * @public */ interface ConfigInspectorShape { /** * Read, validate, and normalize `.changeset/config.json` in the given * project directory. * * @param cwd - Absolute path to the project root (containing `.changeset/`) * @returns An Effect that succeeds with {@link InspectedConfig} or fails * with {@link ConfigurationError} */ readonly inspect: (cwd: string) => Effect.Effect; /** * Classify each repo-relative path against the resolved config. * * @param cwd - Absolute path to the project root * @param paths - Repo-relative file paths to classify * @returns An Effect that succeeds with a {@link Classification} per * input path, in the same order */ readonly classify: (cwd: string, paths: ReadonlyArray) => Effect.Effect, ConfigurationError>; /** * Drop the cached {@link InspectedConfig} for every previously-inspected * root, and refresh the underlying `WorkspaceDiscovery` snapshot. Callers * that hold this service across multiple logical operations in a single * process (e.g. a long-lived MCP server) must call this before an * operation that needs to observe on-disk edits made since the last * `inspect`/`classify` call β€” the cache never expires on its own. * * @returns An Effect that clears the cache and succeeds with `void`. */ readonly refresh: () => Effect.Effect; /** * Drop the cached {@link InspectedConfig} for ONE root β€” the workspace * containing `directory` β€” leaving every other root's cache and discovery * memo untouched. The per-root counterpart to * {@link ConfigInspectorShape.refresh} for a long-lived host serving many * roots (the savvy-mcp server): refreshing before a per-call `inspect` * should not discard sibling worktrees' state that did not change. * * @remarks * Best-effort by design: a `directory` in no workspace is ignored here and * fails with a proper `ConfigurationError` at the subsequent * `inspect`/`classify` call instead. * * @param directory - Absolute path to the project root (or any directory * inside it). * @returns An Effect that clears that root's cache and succeeds with * `void`. */ readonly refreshIn: (directory: string) => Effect.Effect; } declare const ConfigInspector_base: Context.ServiceClass; /** * Effect service tag for {@link ConfigInspectorShape}. * * @example * ```typescript * import { Effect } from "effect"; * import { ConfigInspector } from "@savvy-web/changesets"; * * const program = Effect.gen(function* () { * const inspector = yield* ConfigInspector; * const config = yield* inspector.inspect(process.cwd()); * return config.packages.map((p) => p.name); * }); * * Effect.runPromise(program.pipe(Effect.provide(ConfigInspector.layer))); * ``` * * @public */ declare class ConfigInspector extends ConfigInspector_base { /** * Production layer for {@link ConfigInspector}. * * Requires {@link ChangesetConfigReader} and `WorkspaceDiscovery` * in the environment. * * @public */ static readonly layer: Layer.Layer; } /** * Test factory β€” build a {@link ConfigInspector} that returns a fixed * {@link InspectedConfig} without touching the filesystem. * * Tests that need to exercise the inspect/classify logic against real files * should compose `ConfigInspector.layer` with test layers for * `ChangesetConfigReader` and `WorkspaceDiscovery` instead. * * @public */ declare function makeConfigInspectorTest(fixed: InspectedConfig): Layer.Layer; //#endregion //#region src/changesets/services/branch-analyzer.d.ts /** Git diff status as reported by `--name-status`. @public */ declare const FileStatusSchema: Schema.Literals; /** Git diff status as reported by `--name-status`. @public */ type FileStatus = typeof FileStatusSchema.Type; /** One file entry in the branch analysis output. @public */ declare const BranchFileEntrySchema: Schema.Struct<{ readonly path: Schema.String; readonly status: Schema.Literals; readonly package: Schema.NullOr; readonly reason: Schema.Union, Schema.Struct<{ readonly kind: Schema.Literal<"additionalScope">; readonly glob: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"versionFile">; readonly glob: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"unmappedHint">; readonly hint: Schema.String; }>, Schema.Null]>; }>; /** One file entry in the branch analysis output. @public */ type BranchFileEntry = typeof BranchFileEntrySchema.Type; /** Structured result of analyzing the current branch against its base. @public */ declare const BranchAnalysisSchema: Schema.Struct<{ readonly baseBranch: Schema.String; readonly mergeBaseSha: Schema.String; readonly files: Schema.$Array; readonly package: Schema.NullOr; readonly reason: Schema.Union, Schema.Struct<{ readonly kind: Schema.Literal<"additionalScope">; readonly glob: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"versionFile">; readonly glob: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"unmappedHint">; readonly hint: Schema.String; }>, Schema.Null]>; }>>; readonly packagesAffected: Schema.$Array; readonly unmappedFiles: Schema.$Array; }>; /** Structured result of analyzing the current branch against its base. @public */ type BranchAnalysis = typeof BranchAnalysisSchema.Type; /** * Effect service interface for branch analysis. * * @public */ interface BranchAnalyzerShape { /** * Compute the branch's diff against its base and classify every changed * file against the project's release-surface config. * * @param cwd - Absolute path to the project root * @param opts - Optional overrides * @returns An Effect that succeeds with {@link BranchAnalysis} or fails * with {@link ConfigurationError} or {@link GitError} */ readonly analyzeBranch: (cwd: string, opts?: { readonly baseBranch?: string; }) => Effect.Effect; } declare const BranchAnalyzer_base: Context.ServiceClass; /** * Effect service tag for {@link BranchAnalyzerShape}. * * @example * ```typescript * import { Effect } from "effect"; * import { BranchAnalyzer, ConfigInspector } from "@savvy-web/changesets"; * * const program = Effect.gen(function* () { * const analyzer = yield* BranchAnalyzer; * const analysis = yield* analyzer.analyzeBranch(process.cwd()); * return analysis.packagesAffected; * }); * * Effect.runPromise( * program.pipe( * Effect.provide(BranchAnalyzer.layer), * Effect.provide(ConfigInspector.layer), * // ... + ChangesetConfigReader.layer + kit workspace layers + NodeServices.layer * ), * ); * ``` * * @public */ declare class BranchAnalyzer extends BranchAnalyzer_base { /** * Production layer for {@link BranchAnalyzer}. * * Requires {@link ConfigInspector} (which in turn requires * `ChangesetConfigReader` and `WorkspaceDiscovery`) and a * `ChildProcessSpawner` (satisfied by `NodeServices.layer`) for the * internally-composed `@effected/git` layer. * * @public */ static readonly layer: Layer.Layer; } /** * Test factory β€” build a {@link BranchAnalyzer} that returns a fixed * {@link BranchAnalysis} for any input. * * @public */ declare function makeBranchAnalyzerTest(fixed: BranchAnalysis): Layer.Layer; //#endregion //#region src/changesets/schemas/options.d.ts /** * Schema for a GitHub repository in `owner/repo` format. * * @remarks * Validates that the string matches the `owner/repository` format used * by GitHub. Both the owner and repository segments accept alphanumeric * characters, dots, underscores, and hyphens. * * @example * ```typescript * import { Schema } from "effect"; * import { RepoSchema } from "@savvy-web/changesets"; * * // Succeeds * Schema.decodeUnknownSync(RepoSchema)("microsoft/vscode"); * * // Throws ParseError β€” missing slash * Schema.decodeUnknownSync(RepoSchema)("vscode"); * ``` * * @see {@link ChangesetOptionsSchema} which uses this for the `repo` field * * @public */ declare const RepoSchema: Schema.String; /** * Schema for changeset configuration options. * * @remarks * The `repo` field is required; all other fields are optional with sensible * defaults applied by the changelog formatter at runtime. * * Two related fields describe release surfaces: * * - `packages` (new, recommended) β€” a record keyed by package name with * per-package `additionalScopes` and `versionFiles`. This is the shape * introduced in 0.9.0 and the only shape that will be accepted in 1.0.0. * - `versionFiles` (deprecated) β€” a flat array of entries each carrying * their own `package` field. Still accepted in 0.9.0 with a deprecation * warning emitted by `ConfigInspector` at config-load time; removed in * 1.0.0. * * A config that declares **both** `packages` and the deprecated * `versionFiles` field is rejected β€” the user must pick one. * * @example * ```typescript * import { Schema } from "effect"; * import { ChangesetOptionsSchema } from "@savvy-web/changesets"; * import type { ChangesetOptions } from "@savvy-web/changesets"; * * // New per-package shape (recommended) * const opts: ChangesetOptions = Schema.decodeUnknownSync(ChangesetOptionsSchema)({ * repo: "savvy-web/changesets", * packages: { * "@savvy-web/changesets": { * additionalScopes: ["plugin/**"], * versionFiles: [{ glob: "plugin/.claude-plugin/plugin.json", paths: ["$.version"] }], * }, * }, * }); * ``` * * @see {@link ChangesetOptions} for the inferred TypeScript type * @see {@link validateChangesetOptions} for Effect-idiomatic validation with detailed error messages * @see {@link PackagesRecordSchema} for the new `packages` shape * @see {@link LegacyVersionFilesSchema} for the deprecated `versionFiles` shape * * @public */ declare const ChangesetOptionsSchema: Schema.Struct<{ /** GitHub repository in `owner/repo` format. */ readonly repo: Schema.String; /** Whether to include commit hash links in output. */ readonly commitLinks: Schema.optional; /** Whether to include pull request links in output. */ readonly prLinks: Schema.optional; /** Whether to include issue reference links in output. */ readonly issueLinks: Schema.optional; /** Custom issue reference prefixes (e.g., `["#", "GH-"]`). */ readonly issuePrefixes: Schema.optional>; /** * Whether to credit contributors with `Thanks \@user!` attributions * (aggregated into a `### Thanks` section by the transform pipeline). * Defaults to `true`; set `false` to strip attribution entirely β€” * no inline thanks and no Thanks section. PR references are kept * either way. */ readonly thanks: Schema.optional; /** * Per-package release surfaces. Each entry declares `additionalScopes` * (globs outside the workspace dir that belong to the package) and * `versionFiles` (files bumped in lockstep with the package's version). */ readonly packages: Schema.optional>; readonly versionFiles: Schema.optional>; }>>>; }>>>; /** * DEPRECATED. Top-level flat array of version-file entries each with * their own `package` field. Migrate to `packages[].versionFiles`. * Removed in 1.0.0. * * @deprecated 0.9.0 β€” migrate to `packages`. Removed in 1.0.0. */ readonly versionFiles: Schema.optional>; readonly package: Schema.optional; }>>>; }>; /** * Inferred type for {@link ChangesetOptionsSchema}. * * @remarks * The `repo` field is always present; all other fields are optional. * * @public */ interface ChangesetOptions extends Schema.Schema.Type {} //#endregion //#region src/changesets/vendor/github-info.d.ts /** * Structured result from the GitHub commit info API. * * @remarks * Represents the data returned by `\@changesets/get-github-info` for a * single commit. Includes the commit author's GitHub username, the * associated pull request number (if any), and pre-formatted markdown * links for use in changelog entries. * * @example * ```typescript * import type { GitHubCommitInfo } from "\@savvy-web/changesets"; * * const info: GitHubCommitInfo = { * user: "octocat", * pull: 42, * links: { * commit: "[`abc1234`](https://github.com/owner/repo/commit/abc1234)", * pull: "[#42](https://github.com/owner/repo/pull/42)", * user: "[\@octocat](https://github.com/octocat)", * }, * }; * ``` * * @public */ interface GitHubCommitInfo { /** The GitHub username of the commit author (null if unknown). */ user: string | null; /** The pull request number associated with this commit (null if none). */ pull: number | null; /** Markdown-formatted links for the commit, PR, and user. */ links: { /** Link to the commit on GitHub. */ commit: string; /** Link to the associated pull request (null if none). */ pull: string | null; /** Link to the author's GitHub profile (null if unknown). */ user: string | null; }; } //#endregion //#region src/changesets/services/github.d.ts /** * Service interface for GitHub API operations. * * Describes the single `getInfo` operation that resolves a commit hash to * its associated GitHub metadata (pull-request number, author, and links). * * @remarks * The `getInfo` method may fail with a {@link GitHubApiError} when the * GitHub API is unreachable or the commit is not found. Callers should * handle this error channel β€” the changelog formatters recover gracefully * by omitting attribution when the call fails. * * @public */ interface GitHubServiceShape { /** * Fetch commit metadata from the GitHub API. * * @param params - The commit hash and repository identifier. Must include * `commit` (full SHA-1 hash) and `repo` (in `owner/repo` format). * @returns An `Effect` that resolves to {@link GitHubCommitInfo} or fails with {@link GitHubApiError} */ readonly getInfo: (params: { commit: string; repo: string; }) => Effect.Effect; } declare const GitHubService_base: Context.ServiceClass; /** * Effect service tag for GitHub API operations. * * Provides dependency-injected access to GitHub commit metadata lookups. * Use `yield* GitHubService` inside an `Effect.gen` block to obtain the * service instance. * * @remarks * This tag follows the standard Effect `Context.Service` pattern. Two layers * are provided out of the box: * * - `GitHubService.layer` β€” production layer backed by the GitHub REST API * - {@link makeGitHubTest} β€” factory for deterministic test layers * * @example * ```typescript * import { Effect } from "effect"; * import { GitHubService } from "\@savvy-web/changesets"; * * const program = Effect.gen(function* () { * const github = yield* GitHubService; * const info = yield* github.getInfo({ * commit: "abc1234567890", * repo: "savvy-web/changesets", * }); * console.log(info.user, info.pull, info.links); * }); * * // Provide the live layer and run * Effect.runPromise(program.pipe(Effect.provide(GitHubService.layer))); * ``` * * @example Creating a test layer with canned responses * ```typescript * import { Effect } from "effect"; * import type { GitHubCommitInfo } from "\@savvy-web/changesets"; * import { GitHubService, makeGitHubTest } from "\@savvy-web/changesets"; * * const testResponses = new Map([ * ["abc1234", { user: "octocat", pull: 42, links: { pull: "#42", user: "\@octocat" } }], * ]); * * const TestLayer = makeGitHubTest(testResponses); * * const program = Effect.gen(function* () { * const github = yield* GitHubService; * return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" }); * }); * * Effect.runPromise(program.pipe(Effect.provide(TestLayer))); * ``` * * @see {@link GitHubServiceShape} for the service interface * @see {@link makeGitHubTest} for creating test layers * * @public */ declare class GitHubService extends GitHubService_base { /** * Production layer for {@link GitHubService}. * * Delegates to `\@changesets/get-github-info` to fetch commit metadata * from the GitHub REST API. Requires a `GITHUB_TOKEN` environment variable * to be set for authenticated requests. * * @remarks * This layer is used by the `\@savvy-web/changesets/changelog` entry point * to resolve commit hashes into PR numbers and author attribution. It is * used by the changelog formatter's * `MainLayer`. * * @example * ```typescript * import { Effect } from "effect"; * import { GitHubService } from "\@savvy-web/changesets"; * * const program = Effect.gen(function* () { * const github = yield* GitHubService; * return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" }); * }); * * Effect.runPromise(program.pipe(Effect.provide(GitHubService.layer))); * ``` * * @public */ static readonly layer: Layer.Layer; } /** * Create a test layer for {@link GitHubService} with pre-configured responses. * * Returns a `Layer` that resolves commit hashes from the provided `Map`. * Lookups for commits not present in the map fail with a * {@link GitHubApiError}. * * @remarks * This helper is the recommended way to test code that depends on * `GitHubService` without making real API calls. Provide the layer * via `Effect.provide` in your test setup. * * @param responses - A `Map` of full commit hash to {@link GitHubCommitInfo} objects * @returns A `Layer` providing the {@link GitHubService} with deterministic responses * * @example * ```typescript * import { Effect } from "effect"; * import type { GitHubCommitInfo } from "\@savvy-web/changesets"; * import { GitHubService, makeGitHubTest } from "\@savvy-web/changesets"; * * const responses = new Map([ * ["abc1234", { user: "octocat", pull: 42, links: { pull: "#42", user: "\@octocat" } }], * ]); * * const TestGitHub = makeGitHubTest(responses); * * const program = Effect.gen(function* () { * const github = yield* GitHubService; * return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" }); * }); * * // In a Vitest test: * const result = await Effect.runPromise(program.pipe(Effect.provide(TestGitHub))); * // result.user === "octocat" * ``` * * @public */ declare function makeGitHubTest(responses: Map): Layer.Layer; //#endregion //#region src/changesets/services/changelog.d.ts /** * Service interface for changelog formatting. * * Describes the two operations a `ChangelogService` implementation must * provide: formatting individual release lines and formatting dependency * update tables. * * @remarks * Both methods return `Effect.Effect` values that require additional * services in their environment (`R` channel). `formatReleaseLine` needs * {@link GitHubService} (for commit metadata) * (for markdown parsing), while `formatDependencyReleaseLine` only needs * {@link GitHubService}. * * @public */ interface ChangelogServiceShape { /** * Format a single changeset into a markdown release line. * * @param changeset - The changeset to format, including its commit hash and summary * @param versionType - The semantic version bump type (`major`, `minor`, or `patch`) * @param options - Validated changeset configuration options (must include `repo`) * @returns An `Effect` that resolves to a formatted markdown string */ readonly formatReleaseLine: (changeset: NewChangesetWithCommit, versionType: VersionType$1, options: ChangesetOptions) => Effect.Effect; /** * Format dependency update release lines as a markdown table. * * @param changesets - The changesets that triggered the dependency updates * @param dependenciesUpdated - The list of updated dependencies with version info * @param options - Validated changeset configuration options (must include `repo`) * @returns An `Effect` that resolves to a formatted markdown table string, or empty string if no updates */ readonly formatDependencyReleaseLine: (changesets: NewChangesetWithCommit[], dependenciesUpdated: ModCompWithPackage[], options: ChangesetOptions) => Effect.Effect; } declare const ChangelogService_base: Context.ServiceClass; /** * Effect service tag for changelog formatting. * * Provides dependency-injected access to the two Changesets API formatter * functions: `formatReleaseLine` and `formatDependencyReleaseLine`. * * @remarks * This is an abstract service tag β€” it has no default `Layer`. The concrete * implementation is the `\@savvy-web/changesets/changelog` subpath export, * which wires the formatting logic through `Effect.runPromise` for the * Changesets CLI. For direct Effect usage, build your own layer or use * the class-based `Changelog` wrapper. * * @example * ```typescript * import { Effect } from "effect"; * import type { ChangesetOptions } from "\@savvy-web/changesets"; * import { ChangelogService } from "\@savvy-web/changesets"; * * const program = Effect.gen(function* () { * const changelog = yield* ChangelogService; * const line = yield* changelog.formatReleaseLine(changeset, "minor", options); * return line; * }); * ``` * * @see {@link ChangelogServiceShape} for the service interface * * @public */ declare class ChangelogService extends ChangelogService_base {} //#endregion //#region src/services/ChangesetConfig.d.ts /** * Changeset operating mode for a workspace root. * @public */ type ChangesetMode = "silk" | "vanilla" | "none"; /** * The {@link ChangesetConfig} service shape. * * @since 3.2.0 * @public */ interface ChangesetConfigShape { readonly mode: (root: string) => Effect.Effect; readonly versionPrivate: (root: string) => Effect.Effect; readonly ignorePatterns: (root: string) => Effect.Effect>; readonly isIgnored: (name: string, root: string) => Effect.Effect; readonly fixed: (root: string) => Effect.Effect>>; /** * Drop the cached read for every previously-read root. Callers that hold * this service across multiple logical operations in a single process * (e.g. a long-lived MCP server) must call this before an operation that * needs to observe an on-disk edit made since the last accessor call β€” * the cache never expires on its own. */ readonly refresh: () => Effect.Effect; } declare const ChangesetConfig_base: Context.ServiceClass; /** * Accessor service over a workspace root's `.changeset/config.json`. * * @remarks * Reads through {@link ChangesetConfigReader} (FileSystem-based) with a per-root cache. * Every accessor is total (error channel `never`): a missing or unreadable config collapses * to `mode: "none"` and empty/false defaults. * * @since 0.4.0 * @public */ declare class ChangesetConfig extends ChangesetConfig_base { /** * The one ignore matcher: exact name match, or `@scope/*` wildcard. * * `"@scope/*"` matches `"@scope/anything"` (prefix kept includes the trailing slash), * but not the bare scope `"@scope"`. */ static matches(name: string, pattern: string): boolean; /** * Production layer for {@link ChangesetConfig}, reading via {@link ChangesetConfigReader}, cached per root. * * @remarks * Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide * `ChangesetConfigReader.layer` + a platform layer (`NodeServices.layer`). * * @since 0.4.0 * @public */ static readonly layer: Layer.Layer; } //#endregion //#region src/changesets/utils/dep-diff.d.ts /** * A workspace package's worth of dependency-table rows. * * @public */ interface WorkspaceDependencyDiff { /** The workspace package whose `package.json` changed. */ readonly package: string; /** Repo-relative path of the package directory (taken from the `after` snapshot). */ readonly relativePath: string; /** One row per dependency change, sorted by the existing `sortDependencyRows` convention. */ readonly rows: ReadonlyArray; } /** * Diff two workspace snapshots and return per-package dependency-table rows, * comparing already-resolved specifier values per side. * * @param before - Snapshot at the older ref (typically the merge base). A * workspace package absent here reports every declared dep as `"added"`. * @param after - Snapshot at the newer ref (typically the working tree). * @returns One {@link WorkspaceDependencyDiff} entry per workspace package * that has at least one row. Packages with no resolved-value changes are * omitted. * * @public */ declare function computeWorkspaceDependencyDiffs(before: WorkspaceStateSnapshot, after: WorkspaceStateSnapshot): ReadonlyArray; //#endregion //#region src/changesets/services/deps-regen.d.ts /** * Strict detection of "pure dependency changesets" per the documented * rules: single-package frontmatter, single `## Dependencies` heading, * no other body content beyond that section. * * @param content - Raw `.changeset/*.md` file contents. * @returns `{ isPure, package }` β€” `isPure` is `true` only for a * single-package, Dependencies-only changeset; `package` is the sole * frontmatter package name (or `null` when not pure). * * @public */ declare function isPureDependencyChangeset(content: string): { isPure: boolean; package: string | null; }; /** * Every package name a changeset's YAML frontmatter releases, parsed with the * same lenient `"@pkg": bump` line grammar {@link isPureDependencyChangeset} * uses. A file with no frontmatter, or one whose lines all fail the grammar, * yields an empty list β€” this feeds an informational surface, so lenient * degradation beats a typed failure. * * @param content - Raw `.changeset/*.md` file contents. * * @public */ declare function parseChangesetPackages(content: string): ReadonlyArray; /** * A prose-only changeset that coexists with the run: it releases at least one * package in scope for this run but was left untouched because it carries no * `## Dependencies` section. Purely informational (#279) β€” surfaced so the * regen/detect result accounts for every changeset touching an in-scope * package, instead of leaving prose entries invisible and forcing a manual * `.changeset/` cross-check. * * @public */ interface CoexistingChangeset { /** Absolute path of the untouched prose changeset. */ readonly file: string; /** The in-scope packages its frontmatter releases (out-of-scope names are dropped). */ readonly packages: ReadonlyArray; } /** * A complete, side-effect-free regen plan: which stale pure-dependency * changesets to delete, which fresh changesets to write (carrying the * already-resolved diff), which mixed changesets were left untouched, and * which coexisting prose changesets reference in-scope packages. * * @public */ interface RegenPlan { readonly toDelete: ReadonlyArray<{ readonly file: string; readonly package: string; }>; readonly toWrite: ReadonlyArray<{ readonly file: string; readonly package: string; readonly diff: WorkspaceDependencyDiff; }>; readonly skippedMixed: ReadonlyArray; /** Informational: untouched prose changesets releasing in-scope packages (#279). */ readonly coexisting: ReadonlyArray; } /** * The result of applying a {@link RegenPlan}: the files actually deleted * and written, plus the mixed changesets that were skipped and the * coexisting prose changesets carried through from the plan. * * @public */ interface RegenResult { readonly deleted: ReadonlyArray; readonly written: ReadonlyArray; readonly skippedMixed: ReadonlyArray; /** Informational: untouched prose changesets releasing in-scope packages (#279). */ readonly coexisting: ReadonlyArray; } /** * Options for {@link DepsRegenShape.plan}. * * @public */ interface DepsRegenOptions { /** Project root (containing `.changeset/`). */ readonly cwd: string; /** Override the base branch used to compute the merge-base when `from` is omitted. */ readonly base?: string; /** Restrict regeneration to a single workspace package. Unioned with {@link DepsRegenOptions.packages}. */ readonly package?: string; /** * Restrict regeneration to these workspace packages. Like `package`, an * explicit target bypasses the versionable gate but NOT the changeset * ignore list. Unioned with `package` when both are set. */ readonly packages?: ReadonlyArray; /** * Drop these packages from scope entirely β€” no changesets are written for * them and none of their stale pure-dependency changesets are deleted. * Applies to both repo-wide and explicitly-targeted runs (exclude wins). */ readonly exclude?: ReadonlyArray; /** * When `true`, retain `devDependency` rows (the `deps detect` path); * when falsy (the `deps regen` default), drop them unconditionally. * Protocol resolution runs regardless. */ readonly includeDevDeps?: boolean; /** * Older ref to diff from. Defaults to `git merge-base HEAD`. */ readonly from?: string; /** * Newer ref to diff to. Defaults to the working tree (staged + unstaged * + untracked) via `WorkspaceSnapshots.worktree`. */ readonly to?: string; } /** * Every failure {@link DepsRegenShape.plan} can surface: this package's * {@link GitError} (merge-base resolution) and {@link ChangesetIOError} * (an unreadable `.changeset` directory), plus `@effected/workspaces`' * typed discovery and snapshot failures (a snapshot read failing for * either ref, a catalog-assembly failure, or an unfindable root). * * @public */ type DepsRegenPlanError = GitError | ChangesetIOError | WorkspaceDiscoveryFailure | WorkspaceSnapshotAtFailure | WorkspaceSnapshotWorktreeFailure; /** * Effect service interface for the deps regen/detect orchestration. * * @public */ interface DepsRegenShape { /** * Compute a complete {@link RegenPlan}. Read-only against the filesystem: * only inspects the existing `.changeset/*.md` files to detect * stale/mixed changesets. * * @param options - See {@link DepsRegenOptions}. * @returns An Effect yielding the plan, or failing with * {@link DepsRegenPlanError}. */ readonly plan: (options: DepsRegenOptions) => Effect.Effect; /** * Apply a {@link RegenPlan}: write fresh changesets first, then delete * stale ones. Writes fail loudly with {@link ChangesetIOError}; deletion * failures are tolerated (skip-and-continue) so an interrupted run stays * safely re-runnable. * * @param plan - The plan produced by {@link DepsRegenShape.plan}. * @returns An Effect yielding a {@link RegenResult}. */ readonly execute: (plan: RegenPlan) => Effect.Effect; } declare const DepsRegen_base: Context.ServiceClass; /** * Effect service tag for {@link DepsRegenShape}. * * @example * ```typescript * import { Effect } from "effect"; * import { Changesets } from "@savvy-web/silk-effects"; * * const program = Effect.gen(function* () { * const svc = yield* Changesets.DepsRegen; * const plan = yield* svc.plan({ cwd: process.cwd() }); * return yield* svc.execute(plan); * }); * ``` * * @public */ declare class DepsRegen extends DepsRegen_base { /** * Production layer for {@link DepsRegen}. * * Requires `WorkspaceSnapshots`, `WorkspaceDiscovery`, * `PublishabilityDetector` (all from `@effected/workspaces`), * `Git` (from `@effected/git`, backing merge-base resolution), * {@link ConfigInspector}, {@link ChangesetConfig}, and * `FileSystem.FileSystem` (resolved once at construction and closed over by * the shape, keeping `plan`/`execute` themselves requirement-free). * * @public */ static readonly layer: Layer.Layer; } /** * Build the batteries-included {@link DepsRegen} layer over a * `@effected/workspaces` kit graph bound to `options.cwd`. * * @remarks * The kit's root-consuming services (`WorkspaceDiscovery`, * `WorkspaceSnapshots`, `WorkspaceRoot`) resolve their workspace root from * the layer they were built with β€” single-root by design. {@link DepsRegenDefault} * is this builder bound with no options (root from `process.cwd()`, read * lazily); pass an explicit `cwd` when planning against a different root * (fixtures, multi-repo hosts). * * The graph is `Workspaces.layerWithGitAndConfigDependenciesSubprocess` β€” * `layerWithGit`'s service set with config-dependency hook replay in catalog * assembly, so hook-injected catalogs resolve to ranges (#539). The subprocess * replay is chosen over the in-process one because silk's consumers (the * `savvy` CLI, the `savvy-mcp` server) are bundled, and a bundler compiles the * in-process replay's computed dynamic `import()` into a context module that * cannot resolve at runtime. The kit mints a fresh layer reference per call, * so the graph is bound ONCE per builder call and shared across every internal * branch β€” layer memoization by reference constructs each kit service exactly * once. * * @public */ declare function makeDepsRegenDefault(options?: WorkspacesOptions): Layer.Layer; /** * Batteries-included {@link DepsRegen} layer: silk's opinionated default * composition of the full dependency graph, root-bound to `process.cwd()` * (see {@link makeDepsRegenDefault} for an explicit root). Only the platform * services remain β€” note that `WorkspaceSnapshots` reads git history, so * this layer genuinely requires `ChildProcessSpawner` in addition to * `FileSystem`/`Path`: provide a git-capable platform layer * (`NodeServices.layer`), not a bare filesystem-only layer. * * Gating uses silk's adaptive publishability detector * (`SilkPublishability.layerAdaptive`), so the default semantics * are "versionable minus ignored" β€” identical to the savvy CLI and MCP * runtimes. Consumers who need to swap any dependency (test detectors, * alternate config sources) should keep composing {@link DepsRegen.layer} * directly; this layer is purely additive. * * @example * ```typescript * import { NodeServices } from "@effect/platform-node"; * import { Layer } from "effect"; * import { Changesets } from "@savvy-web/silk-effects"; * * const depsRegen = Changesets.DepsRegenDefault.pipe(Layer.provide(NodeServices.layer)); * ``` * * @public */ declare const DepsRegenDefault: Layer.Layer; //#endregion //#region src/changesets/schemas/release-plan.d.ts /** A semantic-version bump level (the `"none"` plan type is filtered out upstream). @public */ declare const BumpTypeSchema: Schema.Literals; /** A semantic-version bump level. @public */ type BumpType = Schema.Schema.Type; /** One package's previewed release: version transition + rendered changelog block. @public */ declare const PreviewReleaseSchema: Schema.Struct<{ readonly name: Schema.String; readonly type: Schema.Literals; readonly oldVersion: Schema.String; readonly newVersion: Schema.String; readonly changesetIds: Schema.$Array; readonly changelogEntry: Schema.String; }>; /** One package's previewed release. @public */ type PreviewRelease = Schema.Schema.Type; /** A parsed pending changeset (id + summary + the packages it bumps). @public */ declare const PendingChangesetSchema: Schema.Struct<{ readonly id: Schema.String; readonly summary: Schema.String; readonly releases: Schema.$Array; }>>; }>; /** A parsed pending changeset. @public */ type PendingChangeset = Schema.Schema.Type; /** Read-only preview of what the next release would produce. @public */ declare const ChangesetPreviewSchema: Schema.Struct<{ readonly preMode: Schema.NullOr>; readonly releases: Schema.$Array; readonly oldVersion: Schema.String; readonly newVersion: Schema.String; readonly changesetIds: Schema.$Array; readonly changelogEntry: Schema.String; }>>; readonly changesets: Schema.$Array; }>>; }>>; }>; /** Read-only preview of what the next release would produce. @public */ type ChangesetPreview = Schema.Schema.Type; /** One applied package release (version transition). @public */ declare const AppliedReleaseEntrySchema: Schema.Struct<{ readonly name: Schema.String; readonly type: Schema.Literals; readonly oldVersion: Schema.String; readonly newVersion: Schema.String; }>; /** A single versionFiles update applied (or planned, when dry). @public */ declare const VersionFileUpdateRecordSchema: Schema.Struct<{ readonly filePath: Schema.String; readonly version: Schema.String; }>; /** Result of {@link ReleasePlanner.apply}. @public */ declare const AppliedReleaseSchema: Schema.Struct<{ readonly dryRun: Schema.Boolean; readonly touchedFiles: Schema.$Array; readonly releases: Schema.$Array; readonly oldVersion: Schema.String; readonly newVersion: Schema.String; }>>; readonly versionFileUpdates: Schema.$Array>; }>; /** Result of a native apply. @public */ type AppliedRelease = Schema.Schema.Type; //#endregion //#region src/changesets/services/release-planner.d.ts /** The `ReleasePlanner` service surface. @public */ interface ReleasePlannerShape { /** Compute the in-memory release plan (read-only). */ readonly plan: (root: string) => Effect.Effect; /** * Render a non-destructive preview of the next release. * * @remarks * Rendering `changelogEntry` means resolving the configured changelog module, * so `changelogModules` matters here for the same reason it does on `apply`. */ readonly preview: (root: string, options?: { /** * Map configured changelog ids to absolute module paths. When set, * `config.changelog[0]` must be a key of this map (rewritten before the * engine call; unmapped ids fail) and the engine's `format` integration * is disabled β€” callers in no-`node_modules` contexts own formatting. */ readonly changelogModules?: Readonly>; }) => Effect.Effect; /** Natively apply the release (destructive unless `dryRun`). */ readonly apply: (root: string, options?: { readonly dryRun?: boolean; /** * Map configured changelog ids to absolute module paths. When set, * `config.changelog[0]` must be a key of this map (rewritten before the * engine call; unmapped ids fail) and the engine's `format` integration * is disabled β€” callers in no-`node_modules` contexts own formatting. */ readonly changelogModules?: Readonly>; }) => Effect.Effect; } declare const ReleasePlanner_base: Context.ServiceClass; /** Effect service tag for the release planner. @public */ declare class ReleasePlanner extends ReleasePlanner_base { /** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */ static readonly layer: Layer.Layer; } /** * Test factory β€” supply fixed results for any subset of methods. Unsupplied * methods fail with a `ReleasePlanError`. * * @public */ declare function makeReleasePlannerTest(fixed: { readonly plan?: ReleasePlan; readonly preview?: ChangesetPreview; readonly apply?: AppliedRelease; }): Layer.Layer; //#endregion //#region src/changesets/schemas/changeset.d.ts /** * Schema for a changeset summary (1--1000 characters). * * @remarks * Enforces that every changeset has a non-empty summary and caps length * at 1000 characters. Longer descriptions should go in the changeset body, * not the summary line. Validation messages guide users toward correct usage. * * @example * ```typescript * import { Schema } from "effect"; * import { ChangesetSummarySchema } from "@savvy-web/changesets"; * * // Succeeds β€” valid summary * const summary = Schema.decodeUnknownSync(ChangesetSummarySchema)( * "Fix authentication timeout in login flow" * ); * * // Throws ParseError β€” empty string * Schema.decodeUnknownSync(ChangesetSummarySchema)(""); * ``` * * @public */ declare const ChangesetSummarySchema: Schema.String; /** * Schema for a changeset object. * * @remarks * Represents a single changeset entry as consumed by the changelog formatter. * The `summary` is the human-readable description, `id` is a unique identifier * (typically the changeset filename without extension), and `commit` is the * optional git SHA that introduced the changeset. * * @example * ```typescript * import { Schema } from "effect"; * import { ChangesetSchema } from "@savvy-web/changesets"; * import type { Changeset } from "@savvy-web/changesets"; * * const changeset: Changeset = Schema.decodeUnknownSync(ChangesetSchema)({ * summary: "Add retry logic to API client", * id: "brave-dogs-laugh", * commit: "a1b2c3d", * }); * ``` * * @see {@link Changeset} for the inferred TypeScript type * @see {@link ChangesetSummarySchema} for summary validation rules * @see {@link CommitHashSchema} for commit hash format requirements * * @public */ declare const ChangesetSchema: Schema.Struct<{ /** The changeset summary text. */ readonly summary: Schema.String; /** Unique changeset identifier. */ readonly id: Schema.String; /** Git commit hash associated with this changeset. */ readonly commit: Schema.optional; }>; /** * Inferred type for {@link ChangesetSchema}. * * @remarks * Use this interface when you need to type a variable or parameter as a * decoded changeset object. It is structurally equivalent to the output * of `Schema.decodeUnknownSync(ChangesetSchema)(...)`. * * @public */ interface Changeset extends Schema.Schema.Type {} /** * Schema for npm dependency types. * * @remarks * Represents the four standard `package.json` dependency fields using their * plural key names as they appear in the manifest. For the singular, * table-oriented variant that includes `workspace` and `config` types, * see {@link DependencyTableTypeSchema}. * * @example * ```typescript * import { Schema } from "effect"; * import { DependencyTypeSchema } from "@savvy-web/changesets"; * import type { DependencyType } from "@savvy-web/changesets"; * * const depType: DependencyType = Schema.decodeUnknownSync(DependencyTypeSchema)( * "devDependencies" * ); * ``` * * @see {@link DependencyTableTypeSchema} for the extended singular-form variant * * @public */ declare const DependencyTypeSchema: Schema.Literals; /** * Inferred type for {@link DependencyTypeSchema}. * * @remarks * One of `"dependencies"`, `"devDependencies"`, `"peerDependencies"`, * or `"optionalDependencies"`. * * @public */ type DependencyType = typeof DependencyTypeSchema.Type; /** * Schema for a dependency update entry. * * @remarks * Represents a single dependency version change as reported by * the Changesets API. Captures the package name, which dependency * field it belongs to, and the old and new version strings. * * @example * ```typescript * import { Schema } from "effect"; * import { DependencyUpdateSchema } from "@savvy-web/changesets"; * import type { DependencyUpdate } from "@savvy-web/changesets"; * * const update: DependencyUpdate = Schema.decodeUnknownSync(DependencyUpdateSchema)({ * name: "effect", * type: "dependencies", * oldVersion: "3.18.0", * newVersion: "3.19.1", * }); * ``` * * @see {@link DependencyUpdate} for the inferred TypeScript type * @see {@link DependencyTableRowSchema} for the table-formatted variant * * @public */ declare const DependencyUpdateSchema: Schema.Struct<{ /** Package name (must be non-empty). */ readonly name: Schema.String; /** npm dependency type. */ readonly type: Schema.Literals; /** Previous version string. */ readonly oldVersion: Schema.String; /** New version string. */ readonly newVersion: Schema.String; }>; /** * Inferred type for {@link DependencyUpdateSchema}. * * @remarks * Use this interface when you need to type a variable or parameter as a * decoded dependency update object. * * @public */ interface DependencyUpdate extends Schema.Schema.Type {} //#endregion //#region src/changesets/schemas/git.d.ts /** * Schema for a git commit hash (at least 7 lowercase hex characters). * * @remarks * Accepts both abbreviated (7-character) and full (40-character) SHA-1 hashes. * Only lowercase hexadecimal characters are allowed; uppercase letters will * fail validation. This matches the output of `git rev-parse --short` and * `git log --format=%h`. * * @example * ```typescript * import { Schema } from "effect"; * import { CommitHashSchema } from "@savvy-web/changesets"; * * // Succeeds β€” abbreviated hash * const short = Schema.decodeUnknownSync(CommitHashSchema)("a1b2c3d"); * * // Succeeds β€” full 40-character SHA * const full = Schema.decodeUnknownSync(CommitHashSchema)( * "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2" * ); * * // Throws ParseError β€” too short * Schema.decodeUnknownSync(CommitHashSchema)("a1b2c3"); * * // Throws ParseError β€” uppercase not allowed * Schema.decodeUnknownSync(CommitHashSchema)("A1B2C3D"); * ``` * * @see {@link ChangesetSchema} which uses this for the optional `commit` field * * @public */ declare const CommitHashSchema: Schema.String; /** * Semantic version bump type. * * @remarks * Represents the four possible version bump levels used by Changesets: * - `"major"` -- breaking changes (e.g., 1.x.x to 2.0.0) * - `"minor"` -- new features (e.g., 1.1.x to 1.2.0) * - `"patch"` -- bug fixes (e.g., 1.1.1 to 1.1.2) * - `"none"` -- no version bump (internal changes only) * * @example * ```typescript * import { Schema } from "effect"; * import { VersionTypeSchema } from "@savvy-web/changesets"; * import type { VersionType } from "@savvy-web/changesets"; * * const bump: VersionType = Schema.decodeUnknownSync(VersionTypeSchema)("minor"); * ``` * * @public */ declare const VersionTypeSchema: Schema.Literals; /** * Inferred type for {@link VersionTypeSchema}. * * @remarks * One of `"major"`, `"minor"`, `"patch"`, or `"none"`. * * @public */ type VersionType = typeof VersionTypeSchema.Type; //#endregion //#region src/changesets/schemas/github.d.ts /** * Schema for a GitHub username. * * @remarks * Validates against GitHub's username rules: alphanumeric characters and * hyphens only, cannot start or end with a hyphen. Does not enforce the * 39-character maximum length since GitHub may change that limit. * * @example * ```typescript * import { Schema } from "effect"; * import { UsernameSchema } from "@savvy-web/changesets"; * * // Succeeds * Schema.decodeUnknownSync(UsernameSchema)("octocat"); * Schema.decodeUnknownSync(UsernameSchema)("my-user-123"); * * // Throws ParseError β€” starts with hyphen * Schema.decodeUnknownSync(UsernameSchema)("-invalid"); * ``` * * @see {@link GitHubInfoSchema} which uses this for the `user` field * * @public */ declare const UsernameSchema: Schema.String; /** * Schema for a GitHub issue or PR number (positive integer). * * @remarks * Built on {@link PositiveInteger}, this schema adds GitHub-specific * annotations for documentation tooling. Issue and PR numbers in GitHub * are always positive integers starting from 1. * * @example * ```typescript * import { Schema } from "effect"; * import { IssueNumberSchema } from "@savvy-web/changesets"; * * // Succeeds * const prNum = Schema.decodeUnknownSync(IssueNumberSchema)(42); * * // Throws ParseError β€” zero is not a valid issue number * Schema.decodeUnknownSync(IssueNumberSchema)(0); * ``` * * @see {@link GitHubInfoSchema} which uses this for the `pull` field * * @public */ declare const IssueNumberSchema: Schema.Number; /** * Schema accepting either a plain URL or a markdown link `[text](url)`. * * @remarks * The `\@changesets/get-github-info` vendor module returns links in two * possible formats depending on context: a bare URL string or a markdown * link like `[#42](https://github.com/owner/repo/pull/42)`. This schema * accepts both, validating that the URL portion is parseable by the * `URL` constructor. * * @example * ```typescript * import { Schema } from "effect"; * import { UrlOrMarkdownLinkSchema } from "@savvy-web/changesets"; * * // Succeeds β€” plain URL * Schema.decodeUnknownSync(UrlOrMarkdownLinkSchema)( * "https://github.com/owner/repo/pull/42" * ); * * // Succeeds β€” markdown link * Schema.decodeUnknownSync(UrlOrMarkdownLinkSchema)( * "[#42](https://github.com/owner/repo/pull/42)" * ); * * // Throws ParseError β€” not a URL or markdown link * Schema.decodeUnknownSync(UrlOrMarkdownLinkSchema)("not-a-url"); * ``` * * @see {@link GitHubInfoSchema} which uses this for commit, pull, and user links * * @public */ declare const UrlOrMarkdownLinkSchema: Schema.String; /** * Schema for a GitHub info response from `\@changesets/get-github-info`. * * @remarks * Represents the structured data returned when querying GitHub for commit * metadata. The `user` and `pull` fields are optional because not every * commit is associated with a pull request or a known GitHub user (e.g., * bot commits or squash-merged commits without a linked PR). * * The `links` object contains pre-formatted markdown or URL strings for * the commit, pull request, and user profile -- ready for insertion into * CHANGELOG entries. * * @example * ```typescript * import { Schema } from "effect"; * import { GitHubInfoSchema } from "@savvy-web/changesets"; * import type { GitHubInfo } from "@savvy-web/changesets"; * * const info: GitHubInfo = Schema.decodeUnknownSync(GitHubInfoSchema)({ * user: "octocat", * pull: 42, * links: { * commit: "[`a1b2c3d`](https://github.com/owner/repo/commit/a1b2c3d)", * pull: "[#42](https://github.com/owner/repo/pull/42)", * user: "[@octocat](https://github.com/octocat)", * }, * }); * ``` * * @see {@link GitHubInfo} for the inferred TypeScript type * @see {@link GitHubService} for the Effect service that produces these values * * @public */ declare const GitHubInfoSchema: Schema.Struct<{ /** GitHub username of the commit author. */ readonly user: Schema.optional; /** Pull request number associated with the commit. */ readonly pull: Schema.optional; /** Markdown-formatted links. */ readonly links: Schema.Struct<{ /** Link to the commit. */ readonly commit: Schema.String; /** Link to the associated pull request. */ readonly pull: Schema.optional; /** Link to the author's GitHub profile. */ readonly user: Schema.optional; }>; }>; /** * Inferred type for {@link GitHubInfoSchema}. * * @remarks * Contains optional `user` (GitHub username), optional `pull` (PR number), * and a required `links` object with pre-formatted commit, pull, and user * links. * * @public */ interface GitHubInfo extends Schema.Schema.Type {} //#endregion //#region src/changesets/schemas/package-scope.d.ts /** * Schema for a single repo-relative glob pattern. * * @remarks * Globs in `additionalScopes` must be repo-relative β€” absolute paths and * parent traversal (`../`) are rejected outright because they cannot be * meaningfully resolved against the project workspace. Negation patterns * (`!path/**`) are accepted; minimatch handles them at match time. * * @example * ```typescript * import { Schema } from "effect"; * import { GlobSchema } from "@savvy-web/changesets"; * * Schema.decodeUnknownSync(GlobSchema)("plugin/**"); // ok * Schema.decodeUnknownSync(GlobSchema)("!plugin/cache/**"); // ok (negation) * Schema.decodeUnknownSync(GlobSchema)("/absolute/path"); // throws * Schema.decodeUnknownSync(GlobSchema)("../sibling/**"); // throws * ``` * * @public */ declare const GlobSchema: Schema.String; /** * Schema for a single entry in the `packages` record β€” the per-package * release-surface declaration. * * @remarks * Both fields are optional. An empty object (`{}`) is a valid PackageScope * and means "this package uses only its workspace directory as its release * surface." * * - `additionalScopes` β€” repo-relative globs naming files outside the * package's workspace directory that belong to the package's release * surface. The contract is "a path belongs to exactly one package" β€” if * two packages declare overlapping additionalScopes, the config is * rejected by `ConfigInspector`. * - `versionFiles` β€” files whose JSON fields are bumped in lockstep with * this package's version. Each entry uses the new {@link VersionFileConfigSchema} * shape (no `package` field; the parent record key names the owner). * * @example * ```typescript * import { Schema } from "effect"; * import { PackageScopeSchema } from "@savvy-web/changesets"; * * const scope = Schema.decodeUnknownSync(PackageScopeSchema)({ * additionalScopes: ["plugin/**", "!plugin/.cache/**"], * versionFiles: [ * { glob: "plugin/.claude-plugin/plugin.json", paths: ["$.version"] }, * ], * }); * ``` * * @see {@link PackageScope} for the inferred TypeScript type * @see {@link GlobSchema} for individual glob validation rules * @see {@link VersionFileConfigSchema} for the version-file entry shape * * @public */ declare const PackageScopeSchema: Schema.Struct<{ /** Repo-relative globs naming files outside the package's workspace directory that belong to its release surface. */ readonly additionalScopes: Schema.optional>; /** Files whose JSON fields are bumped in lockstep with this package's version. */ readonly versionFiles: Schema.optional>; }>>>; }>; /** * Inferred type for {@link PackageScopeSchema}. * * @public */ interface PackageScope extends Schema.Schema.Type {} /** * Schema for the `packages` record on the changelog options. * * @remarks * Keys are package names. The schema itself does not validate that keys * resolve to known workspace packages β€” that check is performed by * `ConfigInspector` at config-load time, where `WorkspaceDiscovery` is * available to enumerate the workspace. * * @public */ declare const PackagesRecordSchema: Schema.$Record>; /** Files whose JSON fields are bumped in lockstep with this package's version. */ readonly versionFiles: Schema.optional>; }>>>; }>>; //#endregion //#region src/changesets/schemas/primitives.d.ts /** * A non-empty string schema. * * @remarks * Validates that a string has at least one character. Used as the base * constraint for package names, dependency identifiers, and other fields * that must not be blank. * * @example * ```typescript * import { Schema } from "effect"; * import { NonEmptyString } from "@savvy-web/changesets"; * * // Succeeds β€” non-empty string * const name = Schema.decodeUnknownSync(NonEmptyString)("react"); * * // Throws ParseError β€” empty string * Schema.decodeUnknownSync(NonEmptyString)(""); * ``` * * @see {@link ChangesetSummarySchema} for a length-bounded variant used for changeset summaries * * @public */ declare const NonEmptyString: Schema.String; /** * A positive integer schema. * * @remarks * Validates that a number is both an integer and strictly greater than zero. * Used as the base constraint for GitHub issue numbers and similar * identifiers that must be positive whole numbers. * * @example * ```typescript * import { Schema } from "effect"; * import { PositiveInteger } from "@savvy-web/changesets"; * * // Succeeds β€” positive integer * const issueNum = Schema.decodeUnknownSync(PositiveInteger)(42); * * // Throws ParseError β€” zero is not positive * Schema.decodeUnknownSync(PositiveInteger)(0); * * // Throws ParseError β€” floats are not integers * Schema.decodeUnknownSync(PositiveInteger)(3.14); * ``` * * @see {@link IssueNumberSchema} which builds on this for GitHub issue/PR numbers * * @public */ declare const PositiveInteger: Schema.Number; //#endregion //#region src/changesets/schemas/version-files.d.ts /** * Schema for a JSONPath expression starting with `$.`. * * @remarks * Supports property access (`$.foo.bar`), array wildcard (`$.foo[*].bar`), * and array index access (`$.foo[0].bar`). The expression must begin with * `$.` followed by at least one property segment. * * @example * ```typescript * import { Schema } from "effect"; * import { JsonPathSchema } from "@savvy-web/changesets"; * * // Succeeds β€” simple property access * Schema.decodeUnknownSync(JsonPathSchema)("$.version"); * * // Succeeds β€” nested property access * Schema.decodeUnknownSync(JsonPathSchema)("$.metadata.version"); * * // Throws ParseError β€” missing "$." prefix * Schema.decodeUnknownSync(JsonPathSchema)("version"); * ``` * * @see {@link VersionFileConfigSchema} which uses this for the `paths` field * * @public */ declare const JsonPathSchema: Schema.String; /** * Schema for a single version file configuration entry β€” **new shape**. * * @remarks * Used inside `packages[*].versionFiles` (i.e., underneath a parent * record key that names the owning package). Has no `package` field * because the parent key already supplies that information. * * @example * ```typescript * import { Schema } from "effect"; * import { VersionFileConfigSchema } from "@savvy-web/changesets"; * * const entry = Schema.decodeUnknownSync(VersionFileConfigSchema)({ * glob: "plugin/.claude-plugin/plugin.json", * paths: ["$.version"], * }); * ``` * * @see {@link VersionFileConfig} for the inferred TypeScript type * @see {@link LegacyVersionFileConfigSchema} for the deprecated shape * used by the top-level `versionFiles[]` array * @see {@link JsonPathSchema} for JSONPath validation rules * * @public */ declare const VersionFileConfigSchema: Schema.Struct<{ /** Glob pattern to match JSON files. */ readonly glob: Schema.String; /** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */ readonly paths: Schema.optional>; }>; /** * Inferred type for {@link VersionFileConfigSchema} (new shape). * * @public */ interface VersionFileConfig extends Schema.Schema.Type {} /** * Schema for an array of new-shape {@link VersionFileConfigSchema} entries. * * @public */ declare const VersionFilesSchema: Schema.$Array>; }>>; /** * Schema for a single version file configuration entry β€” **legacy shape**. * * @remarks * DEPRECATED. Used only for parsing the top-level `versionFiles[]` array on * the changelog options block. Carries an optional `package` field so the * owning package can be named inline (alternatively, the runtime falls back * to longest-prefix path matching against workspace package directories). * * Accepted in 0.9.0 with a deprecation warning emitted by `ConfigInspector` * at config-load time. Removed in 1.0.0 β€” migrate to the new * {@link VersionFileConfigSchema} under * `changelog[1].packages[].versionFiles`. * * @example * ```typescript * import { Schema } from "effect"; * import { LegacyVersionFileConfigSchema } from "@savvy-web/changesets"; * * // Owner named inline via the `package` field * const entry = Schema.decodeUnknownSync(LegacyVersionFileConfigSchema)({ * glob: "plugin/.claude-plugin/plugin.json", * paths: ["$.version"], * package: "@savvy-web/changesets", * }); * ``` * * @see {@link VersionFileConfigSchema} for the replacement (new) shape * @see {@link LegacyVersionFileConfig} for the inferred TypeScript type * * @deprecated 0.9.0 β€” migrate to {@link VersionFileConfigSchema} inside * `packages[*].versionFiles`. Removed in 1.0.0. * @public */ declare const LegacyVersionFileConfigSchema: Schema.Struct<{ /** Glob pattern to match JSON files. */ readonly glob: Schema.String; /** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */ readonly paths: Schema.optional>; /** Workspace package name to source the version from, bypassing path-based resolution. */ readonly package: Schema.optional; }>; /** * Inferred type for {@link LegacyVersionFileConfigSchema} (deprecated shape). * * @deprecated 0.9.0 β€” migrate to {@link VersionFileConfig}. Removed in 1.0.0. * @public */ interface LegacyVersionFileConfig extends Schema.Schema.Type {} /** * Schema for an array of legacy {@link LegacyVersionFileConfigSchema} * entries β€” used by the deprecated top-level `versionFiles[]` array on * `ChangesetOptionsSchema`. * * @deprecated 0.9.0 β€” migrate to {@link VersionFilesSchema} inside * `packages[*].versionFiles`. Removed in 1.0.0. * @public */ declare const LegacyVersionFilesSchema: Schema.$Array>; /** Workspace package name to source the version from, bypassing path-based resolution. */ readonly package: Schema.optional; }>>; //#endregion //#region src/changesets/utils/dependency-table.d.ts /** * Serialize dependency table rows to a markdown table string. * * @remarks * Combines {@link serializeDependencyTable} with the canonical * `@effected/markdown` emit boundary to produce a ready-to-use GFM markdown * table string. The result is trimmed of leading/trailing whitespace. * * @param rows - Array of `DependencyTableRow` objects * @returns Markdown table string (GFM format) * * @example * ```typescript * import { serializeDependencyTableToMarkdown } from "../utils/dependency-table.js"; * import type { DependencyTableRow } from "../schemas/dependency-table.js"; * * const rows: DependencyTableRow[] = [ * { dependency: "effect", type: "dependency", action: "updated", from: "3.18.0", to: "3.19.0" }, * ]; * const md = serializeDependencyTableToMarkdown(rows); * // "| Dependency | Type | Action | From | To |\n| --- | --- | ..." * ``` * * @internal */ declare function serializeDependencyTableToMarkdown(rows: DependencyTableRow[]): string; //#endregion //#region src/changesets/utils/git.d.ts /** * Run `git merge-base HEAD`, returning the SHA. Errors propagate * as {@link GitError}. * * @internal */ declare function gitMergeBase(cwd: string, base: string): Effect.Effect; //#endregion //#region src/changesets/utils/publishability.d.ts /** * Compute the set of currently-publishable workspace package names. * * @remarks * Uses the currently-active {@link SilkPublishability} β€” wire the * `SilkPublishability.layer` layer to get silk semantics. * * The kit's `PublishabilityDetector.detect` contract no longer receives the * workspace root β€” the ignore/mode-aware `SilkPublishability.layerAdaptive` * derives the `.changeset/config.json` root per package from the package's * own discovery coordinates (`pkg.path` ascended by `pkg.relativePath`). * The `root` parameter is retained for signature stability * but is no longer consulted. Mirrors * {@link SilkPublishability.listPublishable}, which keeps the same inert * single-root parameter for the same reason. * * @param packages - The workspace packages to evaluate * @param _root - Retained for signature stability; no longer consulted * @returns An Effect yielding a `Set` of publishable package names * * @public */ declare function listPublishablePackageNames(packages: ReadonlyArray, _root: string): Effect.Effect, never, PublishabilityDetector>; //#endregion //#region src/changesets/utils/version-files.d.ts /** * Result of a single version file update. * * @remarks * Captures the details of what was changed in a JSON file, including * the previous values for audit/logging purposes. * * @internal */ interface VersionFileUpdate { /** Absolute path to the updated file. */ filePath: string; /** JSONPath expressions that were updated. */ jsonPaths: readonly string[]; /** The version that was written. */ version: string; /** Previous values found at those paths. */ previousValues: unknown[]; } /** * A discovered workspace package with its version. * * @remarks * Maps file paths to the correct version via longest-prefix matching in * {@link VersionFiles.resolveVersion}. * * @public */ interface WorkspaceVersion { /** Package name. */ name: string; /** Absolute path to the package directory. */ path: string; /** Current version from package.json. */ version: string; } /** * Static utility class for version file operations. * * @remarks * Orchestrates the full version file update workflow: reading config, * discovering workspace versions, resolving globs, and updating JSON * files at specified JSONPath locations. Designed to be called from * the CLI `version` command. * * Version resolution uses longest-prefix matching: for a file at * `/repo/packages/ui/tauri.conf.json`, if workspace `packages/ui` * has version `2.0.0`, that version is used rather than the root version. * * @example * ```typescript * import { Effect } from "effect"; * import { VersionFiles } from "../utils/version-files.js"; * * const configs = VersionFiles.extractVersionFiles(parsedConfig); * if (configs) { * const updates = yield* VersionFiles.processVersionFiles("/path/to/project", configs); * for (const update of updates) { * yield* Effect.log(`Updated ${update.filePath} to ${update.version}`); * } * } * ``` * * @internal */ declare class VersionFiles { /** * Extract and validate `versionFiles` from a pre-parsed changeset config object. * * @remarks * Accepts a config object (already parsed from `.changeset/config.json`), * extracts the `changelog` tuple's second element (options object), and * validates the `versionFiles` key against `LegacyVersionFilesSchema`. Returns * `undefined` if `changelog` is not a tuple, the `versionFiles` key is * absent, or the array is empty. Schema validation errors are logged as * warnings but do not throw. * * File reading and JSONC parsing are delegated to the caller * (e.g., `ChangesetConfigReader` from `\@savvy-web/silk-effects`). * * @param config - Pre-parsed changeset config object * @returns Parsed config array, or `undefined` if not configured */ static extractVersionFiles(config: { changelog?: string | false | readonly unknown[] | undefined; }): readonly LegacyVersionFileConfig[] | undefined; /** * Discover all workspace packages and their current versions. * * @remarks * Accepts a pre-resolved list of workspace packages (e.g., from * `WorkspaceDiscovery.listPackages()`). The root package is always * included if not already present in the packages list. * Deduplicates by absolute path and skips entries without a version. * * @param cwd - Project root directory * @param packages - Pre-resolved workspace packages * @returns Array of workspace packages with versions */ static discoverVersions(cwd: string, packages: ReadonlyArray<{ name: string; version: string; path: string; }>): Effect.Effect; /** * Determine which workspace version applies to a given file path * using longest-prefix matching. * * @remarks * For each workspace, checks whether the file is contained within * it (i.e., the relative path does not start with `..`). Among all * matching workspaces, the one with the longest absolute path wins * (most specific match). Falls back to `rootVersion` if no workspace * contains the file. * * @param filePath - Absolute path to the file * @param workspaces - Discovered workspace versions * @param rootVersion - Fallback version from project root * @returns The version string to use */ static resolveVersion(filePath: string, workspaces: WorkspaceVersion[], rootVersion: string): string; /** * Resolve glob patterns to absolute file paths. * * @remarks * Compiles each config's glob with `@effected/glob` and expands it against * a filesystem walk rooted at `cwd` via `@effected/walker`'s `descend` * (literal patterns fast-path a direct stat; magic patterns walk from * their literal prefix). The `node_modules` and `.git` directories are * always ignored. Returns tuples pairing each resolved absolute path with * its originating config, per-glob results sorted by relative path. * * @param configs - Version file configurations * @param cwd - Project root directory * @returns Effect of `[filePath, config]` tuples */ static resolveGlobs(configs: readonly LegacyVersionFileConfig[], cwd: string): Effect.Effect, GlobExpansionError, FileSystem.FileSystem>; /** * Detect indentation from file content. * * @remarks * Looks for the first line starting with whitespace followed by a * double-quote (typical JSON property). Defaults to 2 spaces if * no indentation pattern is found. * * @param content - Raw file content * @returns Detected indent string (defaults to 2 spaces) */ static detectIndent(content: string): string; /** * Update a JSON (or JSONC) file at specified JSONPath locations, * preserving the original formatting byte-for-byte. * * @remarks * The write is performed with `jsonc-effect`'s format-preserving * `modify`/`applyEdits` rather than a `JSON.parse`/`JSON.stringify` * round-trip (which always explodes inline arrays one-element-per-line and * drops comments). Each JSONPath expression is resolved to concrete * `(string | number)[]` paths against the parsed document, and each * concrete path becomes a minimal text edit that touches only the target * value's span β€” so inline arrays, comments, * indentation, and the trailing-newline preference all survive; a one-line * version bump produces a one-line diff. * * Insertion semantics: a concrete, wildcard-free JSONPath whose leaf * property does not exist yet is inserted after the last sibling using the * document's detected indent (the one case where indent detection still * matters). Wildcard expressions only ever update existing matches. Returns * `undefined` (no write) when nothing was updated or inserted. * * @param filePath - Absolute path to the JSON file * @param jsonPaths - JSONPath expressions to update * @param version - New version string * @returns Update result, or `undefined` if no changes were made * * @see {@link jsonPathResolve} for concrete-path enumeration * @see {@link VersionFiles.applyVersionEdit} for the per-path edit */ static updateFile(filePath: string, jsonPaths: readonly string[], version: string): Effect.Effect; /** * Compute the full update for a document without touching the filesystem: * the edited content, the previous values at every matched path, and how * many locations actually changed. * * @remarks * This is the single decision path shared by {@link VersionFiles.updateFile} * and the dry-run branches of the two process methods, so a preview reports * exactly the files a real run would write β€” including pending inserts of a * not-yet-existing wildcard-free leaf, and excluding same-value no-ops. * * @param original - Document text as read from disk * @param jsonPaths - JSONPath expressions to update * @param version - New version string * @returns The updated content, previous values, and changed-location count */ private static computeUpdate; /** * Compute the format-preserving edit for a single concrete path, returning * the updated document, or `undefined` when nothing changed. * * @remarks * Delegates to `@effected/jsonc`'s `JsoncModifier.modify` + * `JsoncEdit.applyAll` (whose edit spans touch only the target value), so * every other byte of the document is preserved. When the leaf * of a wildcard-free path does not exist, `modify` inserts the property * after the last sibling using the supplied formatting options β€” the only * case where the detected indent matters. A path whose parent is missing or * not an object cannot be navigated; the resulting modification error is * caught and reported as "no change" so the file is left alone. * * @param content - Current document text * @param concretePath - A wildcard-free `(string | number)[]` path * @param version - New version string * @param indentUnit - One indentation level, for inserted text * @param eol - End-of-line sequence, for inserted text * @returns The updated document, or `undefined` if the path was unchanged */ private static applyVersionEdit; /** * Orchestrate the full version file update flow. * * @remarks * Combines {@link VersionFiles.discoverVersions}, * {@link VersionFiles.resolveGlobs}, {@link VersionFiles.resolveVersion}, * and {@link VersionFiles.updateFile} into a single operation. In dry-run * mode, files are read and JSONPaths are resolved but no writes occur. * * @param cwd - Project root directory * @param configs - Validated version file configurations * @param dryRun - If true, do not write files (default: `false`) * @returns Effect of update results; a file that cannot be read or parsed * is a defect (the legacy path treats it as a caller bug, as the * previous synchronous `throw` did) */ static processVersionFiles(cwd: string, configs: readonly LegacyVersionFileConfig[], dryRun?: boolean, packages?: ReadonlyArray<{ name: string; version: string; path: string; }>): Effect.Effect; /** * Apply version-file updates from the resolved (post-`ConfigInspector`) * representation. Each {@link ResolvedPackageScope} already names the * owning package and carries its current version plus the materialized * file paths, so no glob expansion or path-prefix workspace resolution * is needed here β€” the inspector has done that work. * * @remarks * This is the 0.9.0 successor to {@link VersionFiles.processVersionFiles}. * The old method stays in place to handle the deprecated top-level * `versionFiles[]` shape (read by `cli/commands/init.ts` for its * validation pass), and is removed alongside the legacy schema in * 1.0.0. * * @param scopes - Per-package resolved scopes from {@link ConfigInspector.inspect} * @param dryRun - When `true`, do not write files * @returns Array of update results, one per file that actually had a * matching JSONPath * * @internal */ static processResolvedVersionFiles(scopes: ReadonlyArray, dryRun?: boolean): Effect.Effect; /** * Apply one version file's update, shared by both process entry points. * * @remarks * Fails TYPED with `VersionFileError`, carrying the offending `filePath`. The two callers then * choose their own posture, which is not the same and must not be unified: * {@link VersionFiles.processVersionFiles} (legacy) turns it into a DEFECT, * matching the synchronous throw it had under `node:fs`, while * {@link VersionFiles.processResolvedVersionFiles} leaves it typed because * `ReleasePlanner.apply` converts it to a `ReleasePlanError` β€” a defect there * would bypass the inspector's catch and crash `apply()`. * * @internal */ private static applyOne; /** Render a `PlatformError` the way the old `node:fs` catch rendered an `Error`. */ private static describeFailure; } //#endregion //#region ../../node_modules/.pnpm/micromark-util-types@2.0.2/node_modules/micromark-util-types/index.d.ts /** * Enum of allowed token types. */ type TokenType = keyof TokenTypeMap; // Note: when changing the next interface, you likely also have to change // `micromark-util-symbol`. /** * Map of allowed token types. */ interface TokenTypeMap { // Note: these are compiled away. attentionSequence: 'attentionSequence'; // To do: remove. space: 'space'; // To do: remove. data: 'data'; whitespace: 'whitespace'; lineEnding: 'lineEnding'; lineEndingBlank: 'lineEndingBlank'; linePrefix: 'linePrefix'; lineSuffix: 'lineSuffix'; atxHeading: 'atxHeading'; atxHeadingSequence: 'atxHeadingSequence'; atxHeadingText: 'atxHeadingText'; autolink: 'autolink'; autolinkEmail: 'autolinkEmail'; autolinkMarker: 'autolinkMarker'; autolinkProtocol: 'autolinkProtocol'; characterEscape: 'characterEscape'; characterEscapeValue: 'characterEscapeValue'; characterReference: 'characterReference'; characterReferenceMarker: 'characterReferenceMarker'; characterReferenceMarkerNumeric: 'characterReferenceMarkerNumeric'; characterReferenceMarkerHexadecimal: 'characterReferenceMarkerHexadecimal'; characterReferenceValue: 'characterReferenceValue'; codeFenced: 'codeFenced'; codeFencedFence: 'codeFencedFence'; codeFencedFenceSequence: 'codeFencedFenceSequence'; codeFencedFenceInfo: 'codeFencedFenceInfo'; codeFencedFenceMeta: 'codeFencedFenceMeta'; codeFlowValue: 'codeFlowValue'; codeIndented: 'codeIndented'; codeText: 'codeText'; codeTextData: 'codeTextData'; codeTextPadding: 'codeTextPadding'; codeTextSequence: 'codeTextSequence'; content: 'content'; definition: 'definition'; definitionDestination: 'definitionDestination'; definitionDestinationLiteral: 'definitionDestinationLiteral'; definitionDestinationLiteralMarker: 'definitionDestinationLiteralMarker'; definitionDestinationRaw: 'definitionDestinationRaw'; definitionDestinationString: 'definitionDestinationString'; definitionLabel: 'definitionLabel'; definitionLabelMarker: 'definitionLabelMarker'; definitionLabelString: 'definitionLabelString'; definitionMarker: 'definitionMarker'; definitionTitle: 'definitionTitle'; definitionTitleMarker: 'definitionTitleMarker'; definitionTitleString: 'definitionTitleString'; emphasis: 'emphasis'; emphasisSequence: 'emphasisSequence'; emphasisText: 'emphasisText'; escapeMarker: 'escapeMarker'; hardBreakEscape: 'hardBreakEscape'; hardBreakTrailing: 'hardBreakTrailing'; htmlFlow: 'htmlFlow'; htmlFlowData: 'htmlFlowData'; htmlText: 'htmlText'; htmlTextData: 'htmlTextData'; image: 'image'; label: 'label'; labelText: 'labelText'; labelLink: 'labelLink'; labelImage: 'labelImage'; labelMarker: 'labelMarker'; labelImageMarker: 'labelImageMarker'; labelEnd: 'labelEnd'; link: 'link'; paragraph: 'paragraph'; reference: 'reference'; referenceMarker: 'referenceMarker'; referenceString: 'referenceString'; resource: 'resource'; resourceDestination: 'resourceDestination'; resourceDestinationLiteral: 'resourceDestinationLiteral'; resourceDestinationLiteralMarker: 'resourceDestinationLiteralMarker'; resourceDestinationRaw: 'resourceDestinationRaw'; resourceDestinationString: 'resourceDestinationString'; resourceMarker: 'resourceMarker'; resourceTitle: 'resourceTitle'; resourceTitleMarker: 'resourceTitleMarker'; resourceTitleString: 'resourceTitleString'; setextHeading: 'setextHeading'; setextHeadingText: 'setextHeadingText'; setextHeadingLine: 'setextHeadingLine'; setextHeadingLineSequence: 'setextHeadingLineSequence'; strong: 'strong'; strongSequence: 'strongSequence'; strongText: 'strongText'; thematicBreak: 'thematicBreak'; thematicBreakSequence: 'thematicBreakSequence'; blockQuote: 'blockQuote'; blockQuotePrefix: 'blockQuotePrefix'; blockQuoteMarker: 'blockQuoteMarker'; blockQuotePrefixWhitespace: 'blockQuotePrefixWhitespace'; listOrdered: 'listOrdered'; listUnordered: 'listUnordered'; listItemIndent: 'listItemIndent'; listItemMarker: 'listItemMarker'; listItemPrefix: 'listItemPrefix'; listItemPrefixWhitespace: 'listItemPrefixWhitespace'; listItemValue: 'listItemValue'; chunkDocument: 'chunkDocument'; chunkContent: 'chunkContent'; chunkFlow: 'chunkFlow'; chunkText: 'chunkText'; chunkString: 'chunkString'; } //#endregion //#region ../../node_modules/.pnpm/markdownlint@0.41.1_supports-color@8.1.1/node_modules/markdownlint/lib/markdownlint.d.mts /** * Function to implement rule logic. */ type RuleFunction = (params: RuleParams, onError: RuleOnError) => void; /** * Rule parameters. */ type RuleParams = { /** * File/string name. */ name: string; /** * Markdown parser data. */ parsers: MarkdownParsers; /** * File/string lines. */ lines: readonly string[]; /** * Front matter lines. */ frontMatterLines: readonly string[]; /** * Rule configuration. */ config: RuleConfiguration; /** * Version of the markdownlint library. */ version: string; }; /** * Markdown parser data. */ type MarkdownParsers = { /** * Markdown parser data from markdown-it (only present when Rule.parser is "markdownit"). */ markdownit: ParserMarkdownIt; /** * Markdown parser data from micromark (only present when Rule.parser is "micromark"). */ micromark: ParserMicromark; }; /** * Markdown parser data from markdown-it. */ type ParserMarkdownIt = { /** * Token objects from markdown-it. */ tokens: MarkdownItToken[]; }; /** * Markdown parser data from micromark. */ type ParserMicromark = { /** * Token objects from micromark. */ tokens: MicromarkToken[]; }; /** * markdown-it base token. */ type MarkdownItBaseToken = { /** * HTML attributes. */ attrs: string[][] | null; /** * Block-level token. */ block: boolean; /** * Child nodes. */ children: MarkdownItBaseToken[] | null; /** * Tag contents. */ content: string; /** * Ignore element. */ hidden: boolean; /** * Fence info. */ info: string; /** * Nesting level. */ level: number; /** * Beginning/ending line numbers. */ map: number[] | null; /** * Markup text. */ markup: string; /** * Arbitrary data. */ meta: Object; /** * Level change. */ nesting: number; /** * HTML tag name. */ tag: string; /** * Token type. */ type: string; }; /** * markdown-it extended token. */ type MarkdownItExtendedToken = { /** * Child nodes. */ children: MarkdownItExtendedToken[] | null; /** * Line number (1-based). */ lineNumber: number; /** * Line content. */ line: string; }; /** * markdown-it token. */ type MarkdownItToken = MarkdownItBaseToken & MarkdownItExtendedToken; type MicromarkTokenType = TokenType; /** * micromark token. */ type MicromarkToken = { /** * Token type. */ type: MicromarkTokenType; /** * Start line (1-based). */ startLine: number; /** * Start column (1-based). */ startColumn: number; /** * End line (1-based). */ endLine: number; /** * End column (1-based). */ endColumn: number; /** * Token text. */ text: string; /** * Child tokens. */ children: MicromarkToken[]; /** * Parent token. */ parent: MicromarkToken | null; }; /** * Error-reporting callback. */ type RuleOnError = (onErrorInfo: RuleOnErrorInfo) => void; /** * Fix information for RuleOnError callback. */ type RuleOnErrorInfo = { /** * Line number (1-based). */ lineNumber: number; /** * Detail about the error. */ detail?: string | undefined; /** * Context for the error. */ context?: string | undefined; /** * Link to more information. */ information?: URL | undefined; /** * Column number (1-based) and length. */ range?: number[] | undefined; /** * Fix information. */ fixInfo?: RuleOnErrorFixInfo | undefined; }; /** * Fix information for RuleOnErrorInfo. */ type RuleOnErrorFixInfo = { /** * Line number (1-based). */ lineNumber?: number | undefined; /** * Column of the fix (1-based). */ editColumn?: number | undefined; /** * Count of characters to delete. */ deleteCount?: number | undefined; /** * Text to insert (after deleting). */ insertText?: string | undefined; }; /** * Rule definition. */ type Rule$2 = { /** * Rule name(s). */ names: string[]; /** * Rule description. */ description: string; /** * Link to more information. */ information?: URL | undefined; /** * Rule tag(s). */ tags: string[]; /** * Parser used. */ parser: "markdownit" | "micromark" | "none"; /** * True if asynchronous. */ asynchronous?: boolean | undefined; /** * Rule implementation. */ function: RuleFunction; }; /** * Rule configuration. */ type RuleConfiguration = boolean | any; //#endregion //#region ../../node_modules/.pnpm/markdownlint@0.41.1_supports-color@8.1.1/node_modules/markdownlint/lib/exports.d.mts type Rule$1 = Rule$2; //#endregion //#region src/changesets/markdownlint/rules/content-structure.d.ts /** * markdownlint rule: `changeset-content-structure` (CSH003). * * Validates content quality inside changeset markdown files by inspecting * micromark tokens for three categories of structural problems: * * 1. **Empty sections** -- an `atxHeading` (h2) followed immediately by another * h2 or the end of the token stream with no intervening content tokens. * 2. **Code blocks without a language identifier** -- a `codeFenced` token whose * opening fence child lacks a `codeFencedFenceInfo` token. * 3. **Empty list items** -- a `listItemPrefix` token with no subsequent * `content` token before the next prefix or end of list. * * @remarks * This rule mirrors the remark-lint rule `remarkLintContentStructure` but uses * markdownlint's micromark token API so it can run inside markdownlint-cli2 and * the VS Code markdownlint extension. * * @example * ```json * { * "changeset-content-structure": true * } * ``` * * @see {@link https://github.com/savvy-web/systems/blob/main/packages/silk-effects/docs/rules/CSH003.md | CSH003 rule documentation} * @see `src/remark/rules/content-structure.ts` for the corresponding remark-lint rule * * @public */ declare const ContentStructureRule$1: Rule$1; //#endregion //#region src/changesets/markdownlint/rules/dependency-table-format.d.ts /** * The markdownlint `Rule` object for CSH005 (`changeset-dependency-table-format`). * * @public */ declare const DependencyTableFormatRule$1: Rule$1; //#endregion //#region src/changesets/markdownlint/rules/heading-hierarchy.d.ts /** * markdownlint rule: `changeset-heading-hierarchy` (CSH001). * * Validates heading structure in changeset markdown files by inspecting * `atxHeading` micromark tokens for three constraints: * * 1. **No h1 headings** -- h1 is reserved for the version title generated by * the changelog formatter. * 2. **Start at h2** -- the first heading in a changeset must be h2. * 3. **No depth skips** -- heading levels must increase sequentially * (h2 then h3, not h2 then h4). * * @remarks * This rule mirrors the remark-lint rule `remarkLintHeadingHierarchy` but uses * markdownlint's micromark token API so it can run inside markdownlint-cli2 and * the VS Code markdownlint extension. * * @example * ```json * { * "changeset-heading-hierarchy": true * } * ``` * * @see {@link https://github.com/savvy-web/systems/blob/main/packages/silk-effects/docs/rules/CSH001.md | CSH001 rule documentation} * @see `src/remark/rules/heading-hierarchy.ts` for the corresponding remark-lint rule * * @public */ declare const HeadingHierarchyRule$1: Rule$1; //#endregion //#region src/changesets/markdownlint/rules/required-sections.d.ts /** * markdownlint rule: `changeset-required-sections` (CSH002). * * Validates that every h2 (`atxHeading` with depth 2) in a changeset markdown * file matches a known category heading from the category system. When an * unrecognized heading is found, the error detail lists all valid headings. * * @remarks * Heading comparison is case-insensitive. The set of valid headings is provided * by `allHeadings()` and `isValidHeading()` from the category system * (`src/categories/index.ts`). This rule inspects `atxHeading` micromark * tokens and extracts their text via the {@link getHeadingText} utility. * * This rule mirrors the remark-lint rule `remarkLintRequiredSections` but uses * markdownlint's micromark token API so it can run inside markdownlint-cli2 and * the VS Code markdownlint extension. * * @example * ```json * { * "changeset-required-sections": true * } * ``` * * @see {@link https://github.com/savvy-web/systems/blob/main/packages/silk-effects/docs/rules/CSH002.md | CSH002 rule documentation} * @see `src/remark/rules/required-sections.ts` for the corresponding remark-lint rule * * @public */ declare const RequiredSectionsRule$1: Rule$1; //#endregion //#region src/changesets/markdownlint/rules/uncategorized-content.d.ts /** * markdownlint rule: `changeset-uncategorized-content` (CSH004). * * Detects content that appears before the first h2 heading in a changeset * markdown file. All substantive content must be placed under a categorized * section (`## heading`). * * @remarks * The rule iterates over the top-level micromark token stream and stops at the * first `atxHeading` with depth 2. Any token encountered before that heading * that is not a `lineEnding`, `lineEndingBlank`, or `htmlFlow` (HTML comments) * triggers an error. This ensures that changeset content is always grouped * under a recognized category heading. * * This rule mirrors the remark-lint rule `remarkLintUncategorizedContent` but * uses markdownlint's micromark token API so it can run inside * markdownlint-cli2 and the VS Code markdownlint extension. * * @example * ```json * { * "changeset-uncategorized-content": true * } * ``` * * @see {@link https://github.com/savvy-web/systems/blob/main/packages/silk-effects/docs/rules/CSH004.md | CSH004 rule documentation} * @see `src/remark/rules/uncategorized-content.ts` for the corresponding remark-lint rule * * @public */ declare const UncategorizedContentRule$1: Rule$1; //#endregion //#region src/changesets/markdownlint/index.d.ts /** * All changeset rules as an array for markdownlint-cli2 `customRules` config. * * @example * ```json * { * "customRules": ["@savvy-web/changesets/markdownlint"] * } * ``` * * @public */ declare const SilkChangesetsRules: Rule$1[]; //#endregion //#region src/changesets/remark/plugins/aggregate-dependency-tables.d.ts declare const AggregateDependencyTablesPlugin: Plugin$1<[], Root>; //#endregion //#region src/changesets/remark/plugins/contributor-footnotes.d.ts /** * Options for {@link ContributorFootnotesPlugin}. * * @public */ interface ContributorFootnotesOptions { /** * Whether to emit the aggregated `### Thanks` section. Defaults to * `true`. When `false`, inline attributions and any existing Thanks * section are stripped and nothing is emitted. */ readonly thanks?: boolean; } declare const ContributorFootnotesPlugin: Plugin$1<[ContributorFootnotesOptions?], Root>; //#endregion //#region src/changesets/remark/plugins/deduplicate-items.d.ts declare const DeduplicateItemsPlugin: Plugin$1<[], Root>; //#endregion //#region src/changesets/remark/plugins/issue-link-refs.d.ts declare const IssueLinkRefsPlugin: Plugin$1<[], Root>; //#endregion //#region src/changesets/remark/plugins/merge-sections.d.ts declare const MergeSectionsPlugin: Plugin$1<[], Root>; //#endregion //#region src/changesets/remark/plugins/normalize-format.d.ts declare const NormalizeFormatPlugin: Plugin$1<[], Root>; //#endregion //#region src/changesets/remark/plugins/reorder-sections.d.ts declare const ReorderSectionsPlugin: Plugin$1<[], Root>; //#endregion //#region src/changesets/remark/presets.d.ts /** * Remark preset collections for changeset lint rules and transform plugins. * * @remarks * Presets bundle related remark plugins into ordered arrays for convenient * consumption. Each preset is a `readonly` tuple so that TypeScript can * narrow element types. Iterate and `.use()` each entry with `unified()`. * * @see {@link SilkChangesetPreset} for lint rules * @see {@link SilkChangesetTransformPreset} for transform plugins */ /** * Preset combining all changeset lint rules for convenient consumption. * * @remarks * Includes the following rules in order: * * 1. {@link HeadingHierarchyRule} (CSH001) -- no h1, no depth skips * 2. {@link RequiredSectionsRule} (CSH002) -- h2 headings must match a known category * 3. {@link ContentStructureRule} (CSH003) -- non-empty sections, code fence languages, non-empty list items * 4. {@link UncategorizedContentRule} (CSH004) -- no content before the first h2 heading * 5. {@link DependencyTableFormatRule} (CSH005) -- dependency table column/value validation * * Rule execution order is not significant for lint rules; all rules run * independently over the same AST and report warnings to the virtual file. * * @example * ```typescript * import { SilkChangesetPreset } from "\@savvy-web/changesets/remark"; * import remarkParse from "remark-parse"; * import { unified } from "unified"; * import { read } from "to-vfile"; * * const processor = unified().use(remarkParse); * for (const rule of SilkChangesetPreset) { * processor.use(rule); * } * * const file = await read("changeset.md"); * const result = await processor.process(file); * console.log(result.messages); // lint warnings * ``` * * @see {@link SilkChangesetTransformPreset} for the corresponding transform preset * * @public */ declare const SilkChangesetPreset: readonly [Plugin, Plugin, Plugin, Plugin, Plugin]; /** * Ordered array of all transform plugins in the correct execution order. * * @remarks * Plugin ordering is significant -- each plugin may depend on the output of * earlier plugins in the pipeline: * * 1. {@link AggregateDependencyTablesPlugin} -- merge duplicate dependency sections (must run first so downstream plugins see a single Dependencies section) * 2. {@link MergeSectionsPlugin} -- merge duplicate h3 headings (must run before reorder so that priority is computed on consolidated sections) * 3. {@link ReorderSectionsPlugin} -- sort sections by category priority (Breaking Changes first, Other last) * 4. {@link DeduplicateItemsPlugin} -- remove duplicate list items within each section * 5. {@link ContributorFootnotesPlugin} -- extract inline `Thanks \@user!` attributions and aggregate them into a summary paragraph per version block * 6. {@link IssueLinkRefsPlugin} -- convert inline `[#N](url)` links to reference-style `[#N]` with definitions at the end of each version block * 7. {@link NormalizeFormatPlugin} -- final cleanup removing empty sections and empty lists * * @example * ```typescript * import { SilkChangesetTransformPreset } from "\@savvy-web/changesets/remark"; * import remarkGfm from "remark-gfm"; * import remarkParse from "remark-parse"; * import remarkStringify from "remark-stringify"; * import { unified } from "unified"; * import { read } from "to-vfile"; * * const processor = unified().use(remarkParse).use(remarkGfm); * for (const plugin of SilkChangesetTransformPreset) { * processor.use(plugin); * } * processor.use(remarkStringify); * * const file = await read("CHANGELOG.md"); * const result = await processor.process(file); * console.log(String(result)); * ``` * * @see {@link SilkChangesetPreset} for the corresponding lint preset * * @public */ declare const SilkChangesetTransformPreset: readonly [Plugin$1<[], Root>, Plugin$1<[], Root>, Plugin$1<[], Root>, Plugin$1<[], Root>, Plugin$1<[ContributorFootnotesOptions?], Root>, Plugin$1<[], Root>, Plugin$1<[], Root>]; //#endregion //#region src/changesets/remark/rules/content-structure.d.ts declare const ContentStructureRule: Plugin; //#endregion //#region src/changesets/remark/rules/dependency-table-format.d.ts declare const DependencyTableFormatRule: Plugin; //#endregion //#region src/changesets/remark/rules/heading-hierarchy.d.ts declare const HeadingHierarchyRule: Plugin; //#endregion //#region src/changesets/remark/rules/required-sections.d.ts declare const RequiredSectionsRule: Plugin; //#endregion //#region src/changesets/remark/rules/uncategorized-content.d.ts declare const UncategorizedContentRule: Plugin; declare namespace index_d_exports { export { AggregateDependencyTablesPlugin, AppliedRelease, AppliedReleaseEntrySchema, AppliedReleaseSchema, BranchAnalysis, BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerShape, BranchFileEntry, BranchFileEntrySchema, BumpType, BumpTypeSchema, Categories, Changelog, ChangelogService, ChangelogServiceShape, ChangelogTransformer, Changeset, ChangesetIOError, ChangesetLinter, ChangesetOptions, ChangesetOptionsSchema, ChangesetPreview, ChangesetPreviewSchema, ChangesetSchema, ChangesetSummarySchema, ChangesetValidationError, Classification, ClassificationReason, ClassificationReasonSchema, ClassificationSchema, CoexistingChangeset, CommitHashSchema, ConfigInspector, ConfigInspectorShape, ConfigurationError, ContentStructureRule, ContributorFootnotesPlugin, DeduplicateItemsPlugin, DependencyAction, DependencyActionSchema, DependencyTable, DependencyTableFormatRule, DependencyTableRow, DependencyTableRowSchema, DependencyTableSchema, DependencyTableType, DependencyTableTypeSchema, DependencyType, DependencyTypeSchema, DependencyUpdate, DependencyUpdateSchema, DepsRegen, DepsRegenDefault, DepsRegenOptions, DepsRegenPlanError, DepsRegenShape, FileStatus, FileStatusSchema, GitError, GitHubApiError, GitHubCommitInfo, GitHubInfo, GitHubInfoSchema, GitHubService, GitHubServiceShape, GlobSchema, HeadingHierarchyRule, InspectedConfig, InspectedConfigSchema, IssueLinkRefsPlugin, IssueNumberSchema, JsonPathSchema, LegacyVersionFileConfig, LegacyVersionFileConfigSchema, LegacyVersionFilesSchema, LintMessage, MaintenanceNoteOptions, MaintenanceNotePlugin, MaintenanceReason, MaintenanceReasonSchema, MaintenanceTrigger, MaintenanceTriggerSchema, MarkdownParseError, ContentStructureRule$1 as MarkdownlintContentStructureRule, DependencyTableFormatRule$1 as MarkdownlintDependencyTableFormatRule, HeadingHierarchyRule$1 as MarkdownlintHeadingHierarchyRule, RequiredSectionsRule$1 as MarkdownlintRequiredSectionsRule, UncategorizedContentRule$1 as MarkdownlintUncategorizedContentRule, MergeSectionsPlugin, NonEmptyString, NormalizeFormatPlugin, PackageScope, PackageScopeSchema, PackagesRecordSchema, PendingChangeset, PendingChangesetSchema, PositiveInteger, PreviewRelease, PreviewReleaseSchema, RegenPlan, RegenResult, ReleasePlanError, ReleasePlanner, ReleasePlannerShape, ReorderSectionsPlugin, RepoSchema, RequiredSectionsRule, ResolvedPackageScope, ResolvedPackageScopeSchema, ResolvedVersionFile, ResolvedVersionFileSchema, SectionCategory, SectionCategorySchema, SilkChangesetPreset, SilkChangesetTransformPreset, SilkChangesetsRules, TransformOptions, UncategorizedContentRule, UrlOrMarkdownLinkSchema, UsernameSchema, VERSION_RE, VersionFileConfig, VersionFileConfigSchema, VersionFileError, VersionFileUpdate, VersionFileUpdateRecordSchema, VersionFiles, VersionFilesSchema, VersionOrEmptySchema, VersionType, VersionTypeSchema, WorkspaceDependencyDiff, WorkspaceVersion, changelogFunctions$1 as changelogFunctions, computeWorkspaceDependencyDiffs, deriveMaintenanceReason, gitMergeBase, isPureDependencyChangeset, listPublishablePackageNames, makeBranchAnalyzerTest, makeConfigInspectorTest, makeDepsRegenDefault, makeGitHubTest, makeReleasePlannerTest, parseChangesetPackages, serializeDependencyTableToMarkdown, vanillaChangelogFunctions }; } //#endregion //#region src/changesets/changelog.d.ts declare const changelogFunctions: typeof index_d_exports.changelogFunctions; export = changelogFunctions; //# sourceMappingURL=changesets-changelog.d.cts.map