dependabot-linguist 0.212.0 → 0.217.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +38 -2
  3. data/Gemfile.lock +100 -108
  4. data/Makefile +4 -2
  5. data/README.md +32 -4
  6. data/SECURITY.md +3 -2
  7. data/dependabot-linguist.gemspec +9 -7
  8. data/exe/dependabot-linguist +1 -1
  9. data/lib/dependabot/linguist/dependabot_file_validator.rb +43 -7
  10. data/lib/dependabot/linguist/dependabot_patch.rb +14 -2
  11. data/lib/dependabot/linguist/file_fetchers/bundler.rb +54 -0
  12. data/lib/dependabot/linguist/file_fetchers/git_submodules.rb +9 -7
  13. data/lib/dependabot/linguist/file_fetchers/go_modules.rb +2 -2
  14. data/lib/dependabot/linguist/language.rb +18 -14
  15. data/lib/dependabot/linguist/languages_to_ecosystems/contexts.rb +22 -21
  16. data/lib/dependabot/linguist/languages_to_ecosystems/languages.yaml +172 -21
  17. data/lib/dependabot/linguist/languages_to_ecosystems/manager_ecosystem_maps.rb +17 -17
  18. data/lib/dependabot/linguist/linguist_patch.rb +1 -1
  19. data/lib/dependabot/linguist/repository.rb +7 -2
  20. data/lib/dependabot/linguist/version.rb +1 -1
  21. metadata +17 -210
  22. data/lib/dependabot/linguist/file_fetchers/base.rb +0 -48
  23. data/smoke-test/README.md +0 -58
  24. data/smoke-test/bundler/Gemfile +0 -9
  25. data/smoke-test/bundler/Gemfile.lock +0 -47
  26. data/smoke-test/bundler/dependabot-all-updates-test-staging.gemspec +0 -10
  27. data/smoke-test/cargo/Cargo.lock +0 -90
  28. data/smoke-test/cargo/Cargo.toml +0 -8
  29. data/smoke-test/composer/composer.json +0 -5
  30. data/smoke-test/composer/composer.lock +0 -72
  31. data/smoke-test/composer/vendor/autoload.php +0 -7
  32. data/smoke-test/composer/vendor/composer/ClassLoader.php +0 -445
  33. data/smoke-test/composer/vendor/composer/LICENSE +0 -21
  34. data/smoke-test/composer/vendor/composer/autoload_classmap.php +0 -13
  35. data/smoke-test/composer/vendor/composer/autoload_namespaces.php +0 -9
  36. data/smoke-test/composer/vendor/composer/autoload_psr4.php +0 -9
  37. data/smoke-test/composer/vendor/composer/autoload_real.php +0 -55
  38. data/smoke-test/composer/vendor/composer/autoload_static.php +0 -23
  39. data/smoke-test/composer/vendor/composer/installed.json +0 -57
  40. data/smoke-test/composer/vendor/phpmailer/phpmailer/.gitignore +0 -3
  41. data/smoke-test/composer/vendor/phpmailer/phpmailer/LICENSE +0 -504
  42. data/smoke-test/composer/vendor/phpmailer/phpmailer/README.md +0 -112
  43. data/smoke-test/composer/vendor/phpmailer/phpmailer/changelog.md +0 -530
  44. data/smoke-test/composer/vendor/phpmailer/phpmailer/class.phpmailer.php +0 -2758
  45. data/smoke-test/composer/vendor/phpmailer/phpmailer/class.pop3.php +0 -417
  46. data/smoke-test/composer/vendor/phpmailer/phpmailer/class.smtp.php +0 -1075
  47. data/smoke-test/composer/vendor/phpmailer/phpmailer/composer.json +0 -32
  48. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/Callback_function_notes.txt +0 -17
  49. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/DomainKeys_notes.txt +0 -55
  50. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt +0 -23
  51. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/extending.html +0 -148
  52. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/faq.html +0 -67
  53. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/generatedocs.sh +0 -4
  54. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/pop3_article.txt +0 -39
  55. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/use_gmail.txt +0 -44
  56. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/contents.html +0 -20
  57. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/images/phpmailer.gif +0 -0
  58. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.gif +0 -0
  59. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/index.html +0 -50
  60. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_db_smtp_basic.php +0 -58
  61. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_mail_advanced.php +0 -30
  62. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_mail_basic.php +0 -41
  63. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_pop_before_smtp_advanced.php +0 -39
  64. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_pop_before_smtp_basic.php +0 -49
  65. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_sendmail_advanced.php +0 -33
  66. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_sendmail_basic.php +0 -43
  67. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_advanced.php +0 -42
  68. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_advanced_no_auth.php +0 -36
  69. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_basic.php +0 -58
  70. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_basic_no_auth.php +0 -53
  71. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_gmail_advanced.php +0 -42
  72. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_gmail_basic.php +0 -59
  73. data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/class.html2text.inc +0 -489
  74. data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/htmlfilter.php +0 -861
  75. data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/ntlm_sasl_client.php +0 -185
  76. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php +0 -26
  77. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-br.php +0 -25
  78. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php +0 -25
  79. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php +0 -25
  80. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-cz.php +0 -24
  81. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php +0 -24
  82. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-dk.php +0 -25
  83. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php +0 -25
  84. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php +0 -25
  85. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php +0 -26
  86. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php +0 -26
  87. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php +0 -24
  88. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php +0 -24
  89. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php +0 -26
  90. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php +0 -25
  91. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php +0 -24
  92. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-no.php +0 -24
  93. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php +0 -24
  94. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php +0 -26
  95. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php +0 -24
  96. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-se.php +0 -25
  97. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php +0 -25
  98. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php +0 -26
  99. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php +0 -25
  100. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php +0 -25
  101. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/contents.html +0 -10
  102. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/phpmailerTest.php +0 -1084
  103. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/test.png +0 -0
  104. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/test_callback.php +0 -84
  105. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/testemail.php +0 -48
  106. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/LGPLv3.txt +0 -165
  107. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/contents.html +0 -14
  108. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/aikido.gif +0 -0
  109. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/bkgrnd.gif +0 -0
  110. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/phpmailer.gif +0 -0
  111. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/index.php +0 -427
  112. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/clipboard.swf +0 -0
  113. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushBash.js +0 -59
  114. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCSharp.js +0 -64
  115. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCpp.js +0 -99
  116. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCss.js +0 -93
  117. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushDelphi.js +0 -57
  118. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushDiff.js +0 -43
  119. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushGroovy.js +0 -69
  120. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushJScript.js +0 -51
  121. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushJava.js +0 -55
  122. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPerl.js +0 -74
  123. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPhp.js +0 -91
  124. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPlain.js +0 -35
  125. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPython.js +0 -56
  126. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushRuby.js +0 -57
  127. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushScala.js +0 -53
  128. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushSql.js +0 -68
  129. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushVb.js +0 -58
  130. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushXml.js +0 -71
  131. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shCore.js +0 -30
  132. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shLegacy.js +0 -30
  133. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/src/shCore.js +0 -1949
  134. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/src/shLegacy.js +0 -172
  135. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/help.png +0 -0
  136. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/magnifier.png +0 -0
  137. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/page_white_code.png +0 -0
  138. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/page_white_copy.png +0 -0
  139. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/printer.png +0 -0
  140. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shCore.css +0 -321
  141. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeDefault.css +0 -191
  142. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeDjango.css +0 -193
  143. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeEmacs.css +0 -192
  144. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeFadeToGrey.css +0 -193
  145. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeMidnight.css +0 -192
  146. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeRDark.css +0 -192
  147. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/wrapping.png +0 -0
  148. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/test.html +0 -46
  149. data/smoke-test/dependabot-file/no-config/.github/TARGET.yaml +0 -14
  150. data/smoke-test/dependabot-file/no-config/bundler/Gemfile +0 -9
  151. data/smoke-test/dependabot-file/no-config/bundler/Gemfile.lock +0 -47
  152. data/smoke-test/dependabot-file/no-config/bundler/dependabot-all-updates-test-staging.gemspec +0 -10
  153. data/smoke-test/dependabot-file/no-config/cargo/Cargo.lock +0 -90
  154. data/smoke-test/dependabot-file/no-config/cargo/Cargo.toml +0 -8
  155. data/smoke-test/dependabot-file/no-config/composer/composer.json +0 -5
  156. data/smoke-test/dependabot-file/no-config/composer/composer.lock +0 -72
  157. data/smoke-test/dependabot-file/over-config/.github/TARGET.yaml +0 -17
  158. data/smoke-test/dependabot-file/over-config/.github/dependabot.yaml +0 -12
  159. data/smoke-test/dependabot-file/over-config/bundler/Gemfile +0 -9
  160. data/smoke-test/dependabot-file/over-config/bundler/Gemfile.lock +0 -47
  161. data/smoke-test/dependabot-file/over-config/bundler/dependabot-all-updates-test-staging.gemspec +0 -10
  162. data/smoke-test/dependabot-file/over-config/cargo/Cargo.lock +0 -90
  163. data/smoke-test/dependabot-file/over-config/cargo/Cargo.toml +0 -8
  164. data/smoke-test/dependabot-file/over-config/composer/composer.json +0 -5
  165. data/smoke-test/dependabot-file/over-config/composer/composer.lock +0 -72
  166. data/smoke-test/dependabot-file/overer-config/.github/TARGET.yaml +0 -19
  167. data/smoke-test/dependabot-file/overer-config/.github/dependabot.yaml +0 -12
  168. data/smoke-test/dependabot-file/overer-config/bundler/Gemfile +0 -9
  169. data/smoke-test/dependabot-file/overer-config/bundler/Gemfile.lock +0 -47
  170. data/smoke-test/dependabot-file/overer-config/bundler/dependabot-all-updates-test-staging.gemspec +0 -10
  171. data/smoke-test/dependabot-file/overer-config/cargo/Cargo.lock +0 -90
  172. data/smoke-test/dependabot-file/overer-config/cargo/Cargo.toml +0 -8
  173. data/smoke-test/dependabot-file/overer-config/composer/composer.json +0 -5
  174. data/smoke-test/dependabot-file/overer-config/composer/composer.lock +0 -72
  175. data/smoke-test/dependabot-file/partial-config/.github/TARGET.yaml +0 -17
  176. data/smoke-test/dependabot-file/partial-config/.github/dependabot.yaml +0 -7
  177. data/smoke-test/dependabot-file/partial-config/bundler/Gemfile +0 -9
  178. data/smoke-test/dependabot-file/partial-config/bundler/Gemfile.lock +0 -47
  179. data/smoke-test/dependabot-file/partial-config/bundler/dependabot-all-updates-test-staging.gemspec +0 -10
  180. data/smoke-test/dependabot-file/partial-config/cargo/Cargo.lock +0 -90
  181. data/smoke-test/dependabot-file/partial-config/cargo/Cargo.toml +0 -8
  182. data/smoke-test/dependabot-file/partial-config/composer/composer.json +0 -5
  183. data/smoke-test/dependabot-file/partial-config/composer/composer.lock +0 -72
  184. data/smoke-test/docker/Dockerfile +0 -19
  185. data/smoke-test/elm/elm-package.json +0 -15
  186. data/smoke-test/elm/elm.json +0 -31
  187. data/smoke-test/github-actions/both/.github/workflows/this.yaml +0 -11
  188. data/smoke-test/github-actions/both/yaml/action.yml +0 -13
  189. data/smoke-test/github-actions/invalid/invalid_file.yaml +0 -0
  190. data/smoke-test/github-actions/workflow/.github/workflows/this.yaml +0 -11
  191. data/smoke-test/github-actions/yaml/action.yml +0 -13
  192. data/smoke-test/gitsubmodule/.gitmodules +0 -4
  193. data/smoke-test/gomod/go.mod +0 -16
  194. data/smoke-test/gomod/go.sum +0 -18
  195. data/smoke-test/gomod/gomain.go +0 -14
  196. data/smoke-test/gradle/.gitignore +0 -1
  197. data/smoke-test/gradle/build.gradle +0 -65
  198. data/smoke-test/maven/pom.xml +0 -65
  199. data/smoke-test/mix/mix.exs +0 -24
  200. data/smoke-test/mix/mix.lock +0 -5
  201. data/smoke-test/npm/package-lock.json +0 -166
  202. data/smoke-test/npm/package.json +0 -22
  203. data/smoke-test/npm/removed/package-lock.json +0 -44
  204. data/smoke-test/npm/removed/package.json +0 -15
  205. data/smoke-test/nuget/project.csproj +0 -14
  206. data/smoke-test/pip/pip/requirements.txt +0 -5
  207. data/smoke-test/pip/pip-compile/requirements.in +0 -2
  208. data/smoke-test/pip/pip-compile/requirements.txt +0 -16
  209. data/smoke-test/pip/pipenv/Pipfile +0 -13
  210. data/smoke-test/pip/pipenv/Pipfile.lock +0 -86
  211. data/smoke-test/pip/poetry/poetry.lock +0 -33
  212. data/smoke-test/pip/poetry/pyproject.toml +0 -18
  213. data/smoke-test/pub/pubspec.lock +0 -40
  214. data/smoke-test/pub/pubspec.yaml +0 -10
  215. data/smoke-test/terraform/main.tf +0 -143
@@ -23,17 +23,21 @@ module Dependabot
23
23
 
24
24
  YML_FILE_PATH = ".github/dependabot.yml"
25
25
 
26
+ CONFIG_FILE_PATH = ".github/.dependabot-linguist"
27
+
28
+ # rubocop:disable Layout/IndentationWidth, Layout/ElseAlignment, Layout/EndAlignment
29
+
26
30
  def dependabot_file_path
27
31
  @dependabot_file_path ||= if @repo.blob_at(@repo.head.target_id, YML_FILE_PATH)
28
32
  # the yml extension is preferred by GitHub, so even though this
29
33
  # returns the same as the `else`, check it before YAML.
30
- YML_FILE_PATH # rubocop:disable Layout/IndentationWidth
31
- elsif @repo.blob_at(@repo.head.target_id, YAML_FILE_PATH) # rubocop:disable Layout/ElseAlignment
34
+ YML_FILE_PATH
35
+ elsif @repo.blob_at(@repo.head.target_id, YAML_FILE_PATH)
32
36
  YAML_FILE_PATH
33
- else # rubocop:disable Layout/ElseAlignment
37
+ else
34
38
  @existing_config = { "version" => 2, "updates" => [] }
35
39
  YML_FILE_PATH
36
- end # rubocop:disable Layout/EndAlignment
40
+ end
37
41
  end
38
42
 
39
43
  def existing_config
@@ -42,6 +46,33 @@ module Dependabot
42
46
  @existing_config ||= YAML.safe_load(@repo.blob_at(@repo.head.target_id, dependabot_file_path).content)
43
47
  end
44
48
 
49
+ def meta_config
50
+ @meta_config ||= if @repo.blob_at(@repo.head.target_id, CONFIG_FILE_PATH)
51
+ YAML.safe_load(@repo.blob_at(@repo.head.target_id, CONFIG_FILE_PATH).content)
52
+ else
53
+ {}
54
+ end
55
+ end
56
+
57
+ # rubocop:enable Layout/IndentationWidth, Layout/ElseAlignment, Layout/EndAlignment
58
+
59
+ # Is a yaml config file exists that looks like
60
+ #
61
+ # ignore:
62
+ # directory:
63
+ # /path/to/somewhere:
64
+ # - some_ecosystem
65
+ # ecosystem:
66
+ # some_other_ecosystem:
67
+ # - /path/to/somewhere_else
68
+ #
69
+ # then both (some_ecosystem, "/path/to/somewhere") and
70
+ # (some_other_ecosystem, "/path/to/somewhere_else")
71
+ # should be "ignored" by this system.
72
+ def ecodir_is_ignored(eco, dir)
73
+ ((((meta_config["ignore"] || {})["directory"] || {})[dir] || []).any? eco) || ((((meta_config["ignore"] || {})["ecosystem"] || {})[eco] || []).any? dir)
74
+ end
75
+
45
76
  def confirm_config_version_is_valid
46
77
  raise StandardError("The existing config has a version other than 2") unless existing_config["version"] == 2
47
78
  end
@@ -83,6 +114,7 @@ module Dependabot
83
114
  this[ConfigDriftStatus::UNDISCOVERED] = []
84
115
  this.freeze
85
116
  ecodir_list.each do |checking_ecodir|
117
+ next if ecodir_is_ignored(checking_ecodir[0], checking_ecodir[1])
86
118
  if !existing_config.empty? && !existing_config["updates"].nil?
87
119
  existed_ecodir = nil
88
120
  existing_config["updates"].each do |existing_ecodir|
@@ -105,6 +137,7 @@ module Dependabot
105
137
  existing_config["updates"].each do |existing_ecodir|
106
138
  existed_ecodir = nil
107
139
  ecodir_list.each do |checking_ecodir|
140
+ break if ecodir_is_ignored(checking_ecodir[0], checking_ecodir[1])
108
141
  existed_ecodir = checking_ecodir if self.class.checking_exists(checking_ecodir, existing_ecodir)
109
142
  break unless existed_ecodir.nil?
110
143
  end
@@ -128,7 +161,7 @@ module Dependabot
128
161
 
129
162
  def new_config
130
163
  confirm_config_version_is_valid
131
- @new_config ||= existing_config.clone.tap do |this|
164
+ @new_config ||= YAML.safe_load(existing_config.to_yaml).tap do |this|
132
165
  this["updates"] = [] if this["updates"].nil?
133
166
  # If "remove_undiscovered" is set, then set this to reject any
134
167
  # updates that are in the list of those undiscovered. Removing
@@ -169,7 +202,9 @@ module Dependabot
169
202
  end
170
203
 
171
204
  def write_new_config
172
- File.open("#{@repo.path.delete_suffix("/.git/")}/#{dependabot_file_path}", "w") { |file| file.write(new_config.to_yaml) } if new_config != existing_config
205
+ full_file_path = "#{@repo.path.delete_suffix("/.git/")}/#{dependabot_file_path}"
206
+ FileUtils.mkdir_p File.dirname(full_file_path)
207
+ File.open(full_file_path, "w") { |file| file.write(new_config.to_yaml) } if new_config != existing_config
173
208
  end
174
209
 
175
210
  # The expected environment to run this final step in should have 'git' AND
@@ -178,8 +213,9 @@ module Dependabot
178
213
  # credentials being provided to this class.
179
214
  def commit_new_config
180
215
  new_branch = @repo.create_branch("dependabot-linguist_auto-config-update")
216
+ in_repo = "cd #{@repo.path.delete_suffix("/.git/")} &&"
217
+ `#{"#{in_repo} git checkout #{new_branch.name}"}`
181
218
  write_new_config
182
- in_repo = "cd #{@repo.path} &&"
183
219
  `#{"#{in_repo} git add #{dependabot_file_path}"}`
184
220
  `#{"#{in_repo} git commit -m \"Auto update #{dependabot_file_path} -- dependabot-linguist\""}`
185
221
  `#{"#{in_repo} git push --set-upstream #{@repo.remotes["origin"].name} #{new_branch.name}"}`
@@ -1,8 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ #########################################################################################
4
+ # _____ _ _ _ _____ _ _ #
5
+ # | __ \ | | | | | | | __ \ | | | | #
6
+ # | | | | ___ _ __ ___ _ __ __| | __ _| |__ ___ | |_ | |__) |_ _| |_ ___| |__ #
7
+ # | | | |/ _ \ '_ \ / _ \ '_ \ / _` |/ _` | '_ \ / _ \| __| | ___/ _` | __/ __| '_ \ #
8
+ # | |__| | __/ |_) | __/ | | | (_| | (_| | |_) | (_) | |_ | | | (_| | || (__| | | | #
9
+ # |_____/ \___| .__/ \___|_| |_|\__,_|\__,_|_.__/ \___/ \__| |_| \__,_|\__\___|_| |_| #
10
+ # | | #
11
+ # |_| #
12
+ #########################################################################################
13
+
3
14
  # Direct the requiring of the files that patch dependabot via this.
4
- # https://github.com/dependabot/dependabot-core/tree/v0.212.0
15
+ # The current target version for dependabot is 0.217.0
16
+ # https://github.com/dependabot/dependabot-core/tree/v0.217.0
5
17
 
6
- require_relative "file_fetchers/base"
18
+ require_relative "file_fetchers/bundler"
7
19
  require_relative "file_fetchers/go_modules"
8
20
  require_relative "file_fetchers/git_submodules"
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ #########################################################################################
4
+ # _____ _ _ _ _____ _ _ #
5
+ # | __ \ | | | | | | | __ \ | | | | #
6
+ # | | | | ___ _ __ ___ _ __ __| | __ _| |__ ___ | |_ | |__) |_ _| |_ ___| |__ #
7
+ # | | | |/ _ \ '_ \ / _ \ '_ \ / _` |/ _` | '_ \ / _ \| __| | ___/ _` | __/ __| '_ \ #
8
+ # | |__| | __/ |_) | __/ | | | (_| | (_| | |_) | (_) | |_ | | | (_| | || (__| | | | #
9
+ # |_____/ \___| .__/ \___|_| |_|\__,_|\__,_|_.__/ \___/ \__| |_| \__,_|\__\___|_| |_| #
10
+ # | | #
11
+ # |_| #
12
+ #########################################################################################
13
+
14
+ # Patches Dependabot::GitSubmodules::FileFetcher.path_gemspec_paths
15
+
16
+ # To fix https://github.com/Skenvy/dependabot-linguist/issues/6 we need to patch
17
+ # ::Dependabot::Bundler::FileFetcher::fetch_path_gemspec_paths to stop it throwing
18
+ # a Bundler::GemfileNotFound error, thrown from assuming that ::Bundler::root will
19
+ # be run at the location the Gemfile.lock, and thus the Gemfile, exist. Currently
20
+ # ::Bundler::LockfileParser::initialize during fetch_path_gemspec_paths will go;
21
+ # ::Bundler::LockfileParser::parse_source, ::Bundler::Source::Rubygems::from_lock,
22
+ # ::Bundler::Source::Rubygems::initialize, ::Bundler::Source::Rubygems::cache_path,
23
+ # ::Bundler::app_cache, ::Bundler::root, ::Bundler::SharedHelpers::root, before
24
+ # landing at ::Bundler::SharedHelpers::find_gemfile where it can read from ENV
25
+ # `ENV["BUNDLE_GEMFILE"]`, or fail to locate an adjacent "Gemfile".
26
+
27
+ # See https://github.com/CloutKhan/dependabot-bundler error demo for more details.
28
+
29
+ # Instead of having the entire fetch_path_gemspec_paths in here, we can just wrap
30
+ # the only place it's used, inside path_gemspec_paths -- with setting the ENV.
31
+
32
+ require "dependabot/errors"
33
+ require "dependabot/bundler"
34
+
35
+ # rubocop:disable Style/Documentation
36
+
37
+ module Dependabot
38
+ module Bundler
39
+ class FileFetcher
40
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/bundler/lib/dependabot/bundler/file_fetcher.rb#L148-L150
41
+ def path_gemspec_paths
42
+ swap_bundle_gemfile = ENV.fetch("BUNDLE_GEMFILE", nil)
43
+ repo_dir_gemfile = "#{@repo_contents_path}#{source.directory}/Gemfile"
44
+ ENV["BUNDLE_GEMFILE"] = repo_dir_gemfile
45
+ raise(Dependabot::DependencyFileNotFound, Pathname.new(File.join(directory, "Gemfile")).cleanpath.to_path) unless File.exist?(repo_dir_gemfile)
46
+ result = fetch_path_gemspec_paths.map { |path| Pathname.new(path) }
47
+ ENV["BUNDLE_GEMFILE"] = swap_bundle_gemfile
48
+ result
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ # rubocop:enable Style/Documentation
@@ -12,8 +12,6 @@
12
12
  #########################################################################################
13
13
 
14
14
  # Patches Dependabot::GitSubmodules::FileFetcher.(fetch_files, gitmodules_file)
15
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/git_submodules/lib/dependabot/git_submodules/file_fetcher.rb#L21-L26
16
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/git_submodules/lib/dependabot/git_submodules/file_fetcher.rb#L28-L30
17
15
 
18
16
  # This patches out the network calls that might fail if you've used a private
19
17
  # repo as a submodule. It still validates the `.gitmodules` exists. If you ARE
@@ -21,9 +19,11 @@
21
19
  # "Allowing Dependabot to access private dependencies" at the below link
22
20
  # https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization#allowing-dependabot-to-access-private-dependencies
23
21
 
24
- # required_files_in? only asserts the presence of a `.gitmodules` file if the
25
- # submodule referenced is private, then the network calls in `submodule_refs`
26
- # might break the runner. If Dependabot::FileFetchers::Base.load_cloned_file_if_present
22
+ # Dependabot::GitSubmodules::FileFetcher::required_files_in? only asserts the
23
+ # presence of a `.gitmodules` file if the submodule referenced is private, then
24
+ # the network calls in `submodule_refs` might break the runner.
25
+
26
+ # If Dependabot::FileFetchers::Base.load_cloned_file_if_present
27
27
  # can't see the file, it'll `raise Dependabot::DependencyFileNotFound`, which
28
28
  # will make Dependabot::FileFetchers::Base.fetch_file_if_present `return` which
29
29
  # will add nil to the list of fetched_files -- i.e.
@@ -36,9 +36,9 @@
36
36
  # So we need to be more cautious with this and check it first.
37
37
 
38
38
  # Dependabot::FileFetchers::Base.load_cloned_file_if_present
39
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/common/lib/dependabot/file_fetchers/base.rb#L117-L137
39
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/common/lib/dependabot/file_fetchers/base.rb#L135-L155
40
40
  # Dependabot::FileFetchers::Base.fetch_file_if_present
41
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/common/lib/dependabot/file_fetchers/base.rb#L93-L115
41
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/common/lib/dependabot/file_fetchers/base.rb#L111-L133
42
42
 
43
43
  require "dependabot/errors"
44
44
  require "dependabot/git_submodules"
@@ -48,11 +48,13 @@ require "dependabot/git_submodules"
48
48
  module Dependabot
49
49
  module GitSubmodules
50
50
  class FileFetcher
51
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/git_submodules/lib/dependabot/git_submodules/file_fetcher.rb#L21-L26
51
52
  def fetch_files
52
53
  raise(Dependabot::DependencyFileNotFound, Pathname.new(File.join(directory, ".gitmodules")).cleanpath.to_path) if gitmodules_file.nil?
53
54
  [gitmodules_file]
54
55
  end
55
56
 
57
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/git_submodules/lib/dependabot/git_submodules/file_fetcher.rb#L28-L30
56
58
  def gitmodules_file
57
59
  @gitmodules_file ||= fetch_file_if_present(".gitmodules")
58
60
  end
@@ -12,9 +12,8 @@
12
12
  #########################################################################################
13
13
 
14
14
  # Patches Dependabot::GoModules::FileFetcher.fetch_files
15
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/go_modules/lib/dependabot/go_modules/file_fetcher.rb#L19-L41
16
15
 
17
- # Patch to remove the online requirement for fetching go modules
16
+ # Patched to remove the online requirement for fetching go modules
18
17
 
19
18
  # See the git_submodule patch for a comment explaining the reorder pattern,
20
19
  # due to `go_mod` being acquired via `fetch_file_if_present` and hitting
@@ -28,6 +27,7 @@ require "dependabot/go_modules"
28
27
  module Dependabot
29
28
  module GoModules
30
29
  class FileFetcher
30
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/go_modules/lib/dependabot/go_modules/file_fetcher.rb#L30-L50
31
31
  def fetch_files
32
32
  raise(Dependabot::DependencyFileNotFound, Pathname.new(File.join(directory, "go.mod")).cleanpath.to_path) if go_mod.nil?
33
33
  fetched_files = [go_mod]
@@ -11,26 +11,29 @@
11
11
  # |___/ #
12
12
  #####################################################################
13
13
 
14
- # Patches the class Linguist::Language to selectively "ungroup"
15
- # and change the type of "languages" to a detectable type.
16
- # https://github.com/github/linguist/blob/v7.23.0/lib/linguist/language.rb
17
-
18
- # Patch https://github.com/github/linguist/blob/v7.23.0/lib/linguist/blob_helper.rb#L220
19
- # Need to remove the "(^|/)\.gitmodules$" string (plus one of the adjacent "|") as we
20
- # can't rely on the gitmodules to be unvendored in a `.gitattributes` and patching
21
- # https://github.com/github/linguist/blob/v7.23.0/lib/linguist/lazy_blob.rb#L35-L38 or
22
- # https://github.com/github/linguist/blob/v7.23.0/lib/linguist/lazy_blob.rb#L56-L62
23
- # would be too cumbersome. It also seems easier than duplicating the vendor patterns
24
- # from https://github.com/github/linguist/blob/v7.23.0/lib/linguist/vendor.yml
25
- # See https://ruby-doc.org/core-2.7.0/Regexp.html
26
- # We also need to remove the "(^|/)\.github/" string (plus one of the adjacent "|"),
27
- # to capture yaml files under .github/workflows/*.yaml
14
+ # Patches the class Linguist::Language to selectively "ungroup" and
15
+ # change the type of "languages" to a detectable type. This patches
16
+ # the class with new functions, so there are no links to the "orig".
17
+
18
+ # Patch Linguist::BlobHelper::VendoredRegexp. Need to remove the
19
+ # "(^|/)\.gitmodules$" string (plus one of the adjacent "|") as we
20
+ # can't rely on the gitmodules to be unvendored in a `.gitattributes`.
21
+ # Need to remove the "(^|/)\.github/" string (plus the adjacent "|"),
22
+ # to capture yaml files under `.github/workflows/*.yaml`
23
+ # See https://ruby-doc.org/core-3.1.0/Regexp.html
24
+
25
+ # Patching either Linguist::LazyBlob::git_attributes or
26
+ # Linguist::LazyBlob::vendored? would be too cumbersome.
27
+ # It also seems easier than duplicating the vendor patterns from
28
+ # https://github.com/github/linguist/blob/v7.25.0/lib/linguist/vendor.yml
28
29
 
29
30
  require "linguist"
30
31
 
31
32
  # rubocop:disable Style/Documentation
32
33
 
33
34
  module Linguist
35
+ # https://github.com/github/linguist/blob/v7.25.0/lib/linguist/language.rb
36
+
34
37
  class Language
35
38
  def ungroup_language
36
39
  @group_name = self.name
@@ -55,6 +58,7 @@ module Linguist
55
58
  end
56
59
 
57
60
  module BlobHelper
61
+ # https://github.com/github/linguist/blob/v7.25.0/lib/linguist/blob_helper.rb#L220
58
62
  VendoredRegexp = Regexp.new(VendoredRegexp.source.gsub("(^|/)\\.gitmodules$|", "").gsub("|(^|/)\\.github/", ""))
59
63
  end
60
64
  end
@@ -8,7 +8,7 @@
8
8
  # as it's source directory is not the directory it is valid to "fetch" from.
9
9
 
10
10
  # For a list of "linguist languages", see
11
- # https://github.com/github/linguist/blob/v7.23.0/lib/linguist/languages.yml
11
+ # https://github.com/github/linguist/blob/v7.25.0/lib/linguist/languages.yml
12
12
 
13
13
  require_relative "manager_ecosystem_maps"
14
14
 
@@ -23,6 +23,7 @@ module Dependabot
23
23
  # is derived from inspecting the rules the file fetcher class actually
24
24
  # uses itself to determine if it can "fetch files" for a directory.
25
25
  # Possibly also based on the `def self.required_files_message` message.
26
+ # Or alternatively the `def self.required_files_in?`, the actual check!
26
27
  FETCH_FILES = "def fetch_files"
27
28
  # PRIMARY_LANGUAGES implies that the language should be the main or only
28
29
  # languages that that package manager could be used for, and the presence
@@ -60,7 +61,7 @@ module Dependabot
60
61
 
61
62
  ##
62
63
  CONTEXT_RULES[PackageManagers::BUNDLER][ContextRule::FETCH_FILES] = [
63
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/bundler/lib/dependabot/bundler/file_fetcher.rb#L22-L24
64
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/bundler/lib/dependabot/bundler/file_fetcher.rb#L22-L24
64
65
  "Gemfile.lock", # Gemfile.lock
65
66
  "Ruby" # Gemfile or .gemspec
66
67
  ]
@@ -69,7 +70,7 @@ module Dependabot
69
70
 
70
71
  ##
71
72
  CONTEXT_RULES[PackageManagers::CARGO][ContextRule::FETCH_FILES] = [
72
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/cargo/lib/dependabot/cargo/file_fetcher.rb#L19-L21
73
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/cargo/lib/dependabot/cargo/file_fetcher.rb#L19-L21
73
74
  "TOML" # Cargo.toml and Cargo.lock
74
75
  ]
75
76
  CONTEXT_RULES[PackageManagers::CARGO][ContextRule::PRIMARY_LANGUAGES] = ["Rust"]
@@ -77,7 +78,7 @@ module Dependabot
77
78
 
78
79
  ##
79
80
  CONTEXT_RULES[PackageManagers::COMPOSER][ContextRule::FETCH_FILES] = [
80
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/composer/lib/dependabot/composer/file_fetcher.rb#L16-L18
81
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/composer/lib/dependabot/composer/file_fetcher.rb#L16-L18
81
82
  "JSON" # composer.json and composer.lock
82
83
  ]
83
84
  CONTEXT_RULES[PackageManagers::COMPOSER][ContextRule::PRIMARY_LANGUAGES] = ["PHP"]
@@ -85,7 +86,7 @@ module Dependabot
85
86
 
86
87
  ##
87
88
  CONTEXT_RULES[PackageManagers::DOCKER][ContextRule::FETCH_FILES] = [
88
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/docker/lib/dependabot/docker/file_fetcher.rb#L17-L19
89
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/docker/lib/dependabot/docker/file_fetcher.rb#L19-L21
89
90
  "Dockerfile", # Dockerfile
90
91
  "YAML" # .yaml, if kubernetes option is set
91
92
  ]
@@ -94,7 +95,7 @@ module Dependabot
94
95
 
95
96
  ##
96
97
  CONTEXT_RULES[PackageManagers::HEX][ContextRule::FETCH_FILES] = [
97
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/hex/lib/dependabot/hex/file_fetcher.rb#L20-L22
98
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/hex/lib/dependabot/hex/file_fetcher.rb#L19-L21
98
99
  "Elixir" # mix.lock and mix.exs by extension
99
100
  ]
100
101
  CONTEXT_RULES[PackageManagers::HEX][ContextRule::PRIMARY_LANGUAGES] = ["Elixir"]
@@ -102,7 +103,7 @@ module Dependabot
102
103
 
103
104
  ##
104
105
  CONTEXT_RULES[PackageManagers::ELM_PACKAGE][ContextRule::FETCH_FILES] = [
105
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/elm/lib/dependabot/elm/file_fetcher.rb#L13-L15
106
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/elm/lib/dependabot/elm/file_fetcher.rb#L13-L15
106
107
  "JSON" # elm-package.json or an elm.json, only seeks via .json extension though.
107
108
  ]
108
109
  CONTEXT_RULES[PackageManagers::ELM_PACKAGE][ContextRule::PRIMARY_LANGUAGES] = ["Elm"]
@@ -110,7 +111,7 @@ module Dependabot
110
111
 
111
112
  ##
112
113
  CONTEXT_RULES[PackageManagers::GIT_SUBMODULE][ContextRule::FETCH_FILES] = [
113
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/git_submodules/lib/dependabot/git_submodules/file_fetcher.rb#L15-L17
114
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/git_submodules/lib/dependabot/git_submodules/file_fetcher.rb#L15-L17
114
115
  "Git Config" # ".gitmodules"
115
116
  ]
116
117
  CONTEXT_RULES[PackageManagers::GIT_SUBMODULE][ContextRule::PRIMARY_LANGUAGES] = []
@@ -118,7 +119,7 @@ module Dependabot
118
119
 
119
120
  ##
120
121
  CONTEXT_RULES[PackageManagers::GITHUB_ACTIONS][ContextRule::FETCH_FILES] = [
121
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/github_actions/lib/dependabot/github_actions/file_fetcher.rb#L15-L17
122
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/github_actions/lib/dependabot/github_actions/file_fetcher.rb#L15-L17
122
123
  # "YAML", but this is handled without linguist
123
124
  ]
124
125
  CONTEXT_RULES[PackageManagers::GITHUB_ACTIONS][ContextRule::PRIMARY_LANGUAGES] = []
@@ -126,7 +127,7 @@ module Dependabot
126
127
 
127
128
  ##
128
129
  CONTEXT_RULES[PackageManagers::GO_MODULES][ContextRule::FETCH_FILES] = [
129
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/go_modules/lib/dependabot/go_modules/file_fetcher.rb#L13-L15
130
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/go_modules/lib/dependabot/go_modules/file_fetcher.rb#L13-L15
130
131
  "Go Checksums", # go.sum
131
132
  "Go Module" # go.mod
132
133
  ]
@@ -134,7 +135,7 @@ module Dependabot
134
135
  CONTEXT_RULES[PackageManagers::GO_MODULES][ContextRule::RELEVANT_LANGUAGES] = []
135
136
 
136
137
  CONTEXT_RULES[PackageManagers::GRADLE][ContextRule::FETCH_FILES] = [
137
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/gradle/lib/dependabot/gradle/file_fetcher.rb#L23-L25
138
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/gradle/lib/dependabot/gradle/file_fetcher.rb#L27-L29
138
139
  "Gradle", # for any `.gradle` file
139
140
  "Kotlin" # for any `.kts` file"
140
141
  ]
@@ -144,7 +145,7 @@ module Dependabot
144
145
  ]
145
146
 
146
147
  CONTEXT_RULES[PackageManagers::MAVEN][ContextRule::FETCH_FILES] = [
147
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/maven/lib/dependabot/maven/file_fetcher.rb#L17-L19
148
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/maven/lib/dependabot/maven/file_fetcher.rb#L17-L19
148
149
  "Maven POM" # for `pom.xml` files
149
150
  ]
150
151
  CONTEXT_RULES[PackageManagers::MAVEN][ContextRule::PRIMARY_LANGUAGES] = []
@@ -154,7 +155,7 @@ module Dependabot
154
155
 
155
156
  ##
156
157
  CONTEXT_RULES[PackageManagers::NPM][ContextRule::FETCH_FILES] = [
157
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb#L36-L51
158
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb#L31-L33
158
159
  "JSON", # "package.json" or "package-lock.json" or "npm-shrinkwrap.json" but only by extension
159
160
  "NPM Config" # ".npmrc"
160
161
  ]
@@ -163,7 +164,7 @@ module Dependabot
163
164
 
164
165
  ##
165
166
  CONTEXT_RULES[PackageManagers::NUGET][ContextRule::FETCH_FILES] = [
166
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/nuget/lib/dependabot/nuget/file_fetcher.rb#L20-L22
167
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/nuget/lib/dependabot/nuget/file_fetcher.rb#L20-L22
167
168
  "XML" # .csproj, .vbproj and .fsproj
168
169
  # Nothing looks for a packages.config
169
170
  ]
@@ -172,7 +173,7 @@ module Dependabot
172
173
 
173
174
  ##
174
175
  CONTEXT_RULES[PackageManagers::PIP][ContextRule::FETCH_FILES] = [
175
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/python/lib/dependabot/python/file_fetcher.rb#L35-L38
176
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/python/lib/dependabot/python/file_fetcher.rb#L35-L38
176
177
  # Besides the other pip related package managers, there is no language for `requirements` files. RIP.
177
178
  "Text" # for `.txt`
178
179
  ]
@@ -181,7 +182,7 @@ module Dependabot
181
182
 
182
183
  ##
183
184
  CONTEXT_RULES[PackageManagers::PIPENV][ContextRule::FETCH_FILES] = [
184
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/python/lib/dependabot/python/file_fetcher.rb#L35-L38
185
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/python/lib/dependabot/python/file_fetcher.rb#L35-L38
185
186
  "JSON", # Pipfile.lock
186
187
  "TOML" # Pipfile
187
188
  ]
@@ -190,7 +191,7 @@ module Dependabot
190
191
 
191
192
  ##
192
193
  CONTEXT_RULES[PackageManagers::PIP_COMPILE][ContextRule::FETCH_FILES] = [
193
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/python/lib/dependabot/python/file_fetcher.rb#L35-L38
194
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/python/lib/dependabot/python/file_fetcher.rb#L35-L38
194
195
  # Already captured by the other pip related package manager paths
195
196
  ]
196
197
  CONTEXT_RULES[PackageManagers::PIP_COMPILE][ContextRule::PRIMARY_LANGUAGES] = ["Python"]
@@ -198,7 +199,7 @@ module Dependabot
198
199
 
199
200
  ##
200
201
  CONTEXT_RULES[PackageManagers::POETRY][ContextRule::FETCH_FILES] = [
201
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/python/lib/dependabot/python/file_fetcher.rb#L35-L38
202
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/python/lib/dependabot/python/file_fetcher.rb#L35-L38
202
203
  # pyproject.lock has none and setup.py is vague.
203
204
  "TOML" # poetry.lock and pyproject.toml by extension
204
205
  ]
@@ -207,7 +208,7 @@ module Dependabot
207
208
 
208
209
  ##
209
210
  CONTEXT_RULES[PackageManagers::PUB][ContextRule::FETCH_FILES] = [
210
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/pub/lib/dependabot/pub/file_fetcher.rb#L15-L17
211
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/pub/lib/dependabot/pub/file_fetcher.rb#L15-L17
211
212
  "YAML" # pubspec.yaml, but only by extension.
212
213
  ]
213
214
  CONTEXT_RULES[PackageManagers::PUB][ContextRule::PRIMARY_LANGUAGES] = ["Dart"]
@@ -215,7 +216,7 @@ module Dependabot
215
216
 
216
217
  ##
217
218
  CONTEXT_RULES[PackageManagers::TERRAFORM][ContextRule::FETCH_FILES] = [
218
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/terraform/lib/dependabot/terraform/file_fetcher.rb#L19-L21
219
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/terraform/lib/dependabot/terraform/file_fetcher.rb#L19-L21
219
220
  "HCL" # .tf and .hcl
220
221
  ]
221
222
  CONTEXT_RULES[PackageManagers::TERRAFORM][ContextRule::PRIMARY_LANGUAGES] = []
@@ -223,7 +224,7 @@ module Dependabot
223
224
 
224
225
  ##
225
226
  CONTEXT_RULES[PackageManagers::YARN][ContextRule::FETCH_FILES] = [
226
- # https://github.com/dependabot/dependabot-core/blob/v0.212.0/npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb#L36-L51
227
+ # https://github.com/dependabot/dependabot-core/blob/v0.217.0/npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb#L31-L33
227
228
  "YAML" # yarn.lock
228
229
  ]
229
230
  CONTEXT_RULES[PackageManagers::YARN][ContextRule::PRIMARY_LANGUAGES] = ["JavaScript", "TypeScript"]