Class: Dependabot::NpmAndYarn::FileFetcher
- Inherits:
-
FileFetchers::Base
- Object
- FileFetchers::Base
- Dependabot::NpmAndYarn::FileFetcher
- Defined in:
- lib/dependabot/npm_and_yarn/file_fetcher.rb,
lib/dependabot/npm_and_yarn/file_fetcher/path_dependency_builder.rb
Defined Under Namespace
Classes: PathDependencyBuilder
Constant Summary collapse
- NPM_PATH_DEPENDENCY_STARTS =
Npm always prefixes file paths in the lockfile “version” with “file:” even when a naked path is used (e.g. “../dep”)
%w(file:).freeze
- PATH_DEPENDENCY_STARTS =
“link:” is only supported by Yarn but is interchangeable with “file:” when it specifies a path. Only include Yarn “link:”‘s that start with a path and ignore symlinked package names that have been registered with “yarn link”, e.g. “react”
%w(file: link:. link:/ link:~/ / ./ ../ ~/).freeze
- PATH_DEPENDENCY_CLEAN_REGEX =
/^file:|^link:/.freeze
Class Method Summary collapse
Class Method Details
.required_files_in?(filenames) ⇒ Boolean
24 25 26 |
# File 'lib/dependabot/npm_and_yarn/file_fetcher.rb', line 24 def self.required_files_in?(filenames) filenames.include?("package.json") end |
.required_files_message ⇒ Object
28 29 30 |
# File 'lib/dependabot/npm_and_yarn/file_fetcher.rb', line 28 def self. "Repo must contain a package.json." end |