Class: Dependabot::Uv::FileUpdater

Inherits:
FileUpdaters::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/uv/file_updater.rb,
lib/dependabot/uv/file_updater/lock_file_updater.rb,
lib/dependabot/uv/file_updater/pyproject_preparer.rb,
lib/dependabot/uv/file_updater/compile_file_updater.rb,
lib/dependabot/uv/file_updater/requirement_replacer.rb,
lib/dependabot/uv/file_updater/requirement_file_updater.rb

Defined Under Namespace

Classes: CompileFileUpdater, LockFileUpdater, PyprojectPreparer, RequirementFileUpdater, RequirementReplacer

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.updated_files_regexObject



20
21
22
23
24
25
26
27
# File 'lib/dependabot/uv/file_updater.rb', line 20

def self.updated_files_regex
  [
    /^.*\.txt$/,               # Match any .txt files (e.g., requirements.txt) at any level
    /^.*\.in$/,                # Match any .in files at any level
    /^.*pyproject\.toml$/,     # Match pyproject.toml at any level
    /^.*uv\.lock$/             # Match uv.lock at any level
  ]
end

Instance Method Details

#updated_dependency_filesObject



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/dependabot/uv/file_updater.rb', line 30

def updated_dependency_files
  updated_files = updated_pip_compile_based_files
  updated_files += updated_uv_lock_files

  if updated_files.none? ||
     updated_files.sort_by(&:name) == dependency_files.sort_by(&:name)
    raise "No files have changed!"
  end

  updated_files
end