class Dependabot::Uv::FileUpdater::LockFileUpdater
def replace_dep(dep, content, new_r, old_r)
def replace_dep(dep, content, new_r, old_r) new_req = new_r[:requirement] old_req = old_r[:requirement] declaration_regex = declaration_regex(dep, old_r) declaration_match = content.match(declaration_regex) if declaration_match declaration = declaration_match[:declaration] new_declaration = T.must(declaration).sub(old_req, new_req) content.sub(T.must(declaration), new_declaration) else content end end