export interface RewriteSpecifierResult { /** Whether the dependency string was modified. */ changed: boolean; /** The resulting dependency string (unchanged when `changed` is false). */ result: string; } /** * Rewrites the version specifier of a single PEP 508 dependency string so that * it references `newVersion`, when the dependency matches `packageName`. * * Behavior: * - Bumps the version of `==`, `===`, `~=` and `>=` clauses to `newVersion`, * preserving the operator and the original component precision. Trailing `.*` * prefix-match wildcards are preserved (e.g. `==1.1.*` becomes `==1.4.*`). * - Leaves `>`, `<`, `<=`, `!=` clauses untouched. * - Leaves dependencies with no version specifier untouched (the build step * pins those automatically in publish mode). * - Throws when the resulting specifier no longer allows `newVersion` (e.g. a * `<` ceiling below the release), so the developer can fix the constraint. * * @param dependency - The original dependency string (e.g. `lib1~=1.1`). * @param packageName - The package name being released. * @param newVersion - The newly released version (e.g. `1.4.0`). */ export declare function rewriteDependencySpecifier(dependency: string, packageName: string, newVersion: string): RewriteSpecifierResult; //# sourceMappingURL=version-utils.d.ts.map