export type MavenAppliedChange = { groupId: string; artifactId: string; newVersion: string; type: ('direct' | 'property'); property?: string; }; /** * One entry in {@link updateMavenVersions}' `applied` list: a version that was changed and * where. `type` discriminates the edit site — `'direct'` for a dependency's own ``, * `'property'` for a `${property}` reference (then `property` names the resolved property). * @typedef {{ * groupId: string, * artifactId: string, * newVersion: string, * type: ('direct'|'property'), * property?: string * }} MavenAppliedChange */ /** * Stable edit-site key for a Maven change: same key => same commit/PR. Deps whose versions * resolve to one `${property}` share the property key and are therefore inseparable. * @param {string} manifestPath * @param {MavenAppliedChange} applied * @returns {string} */ export declare function mavenChangeKey(manifestPath: string, applied: MavenAppliedChange): string; /** * Maps every edit-site key to the canonical, version-less purls of the dependencies that * share it, without mutating content. Used to detect whether bumping a retained remediation * would also affect an excluded dep. * @param {string} pomContent * @param {string} manifestPath * @returns {Map} editSiteKey → canonical purls */ export declare function mavenDepsForEditSite(pomContent: string, manifestPath: string): Map; /** * Updates dependency versions in a Maven pom.xml while preserving file formatting. * * Uses `fast-xml-parser` to understand the XML structure (dependencies and properties), * then performs position-based string splice to replace version strings without altering * any other formatting, comments, whitespace, or indentation. * * Supports `${property}` indirection: when a dependency's `` is a property * reference, the updater resolves the property chain (including recursive references) * and updates the terminal property value in `` instead. * * @param {string} pomContent - the raw pom.xml file content * @param {import('../remediate.js').VersionChangeRequest[]} versionChanges - list of version changes to apply * @returns {{content: string, applied: MavenAppliedChange[], skipped: Array<{groupId: string, artifactId: string, newVersion: string, reason: string}>}} the updated content and * lists of applied and skipped changes */ export declare function updateMavenVersions(pomContent: string, versionChanges: import('../remediate.js').VersionChangeRequest[]): { content: string; applied: MavenAppliedChange[]; skipped: Array<{ groupId: string; artifactId: string; newVersion: string; reason: string; }>; };