dependabot-npm_and_yarn 0.111.32 → 0.111.33

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36fe3057697357e54603c4c6b48e95330fff335e948f6b5f940f2b8cc86c8c8f
4
- data.tar.gz: e66ba6f5996829574009795e58ea0cc8dd732a36400824139c2d9cfd1f794418
3
+ metadata.gz: c3418d01282243df4616c8e93d261e29bce786f320c1a71ea6c1f3b72d729278
4
+ data.tar.gz: ecfedfbc21ed21a4aa39b03379055734b820684a531e9b46d4e641c10f6675a6
5
5
  SHA512:
6
- metadata.gz: f9defbf821d5ee3b77ce2e36bdfd783154879a078a81367ef0a4085f6fbe3269ad694f365c6242aa2346003331fa05cf21f65d8e6e2725b83926ad2796608a92
7
- data.tar.gz: 7f4f306e24f6229631d9bc2888dfa9f327d8e2bebb10a67354b124d575d279ffa6a1f78d136a00417ae17b0c3ec16e99260e503bcd4269ee0a6a2765521633c0
6
+ metadata.gz: 45e68447467cadb41b253975253c49fcd94a5e7f0d9c98d1624253c0570769c886539c4436d9f8f094c8a2b31f63f6968b1e243d78966e21102efd316ee3e8a1
7
+ data.tar.gz: edfb14f30217ac3505ff336e11bb0339ecd5834c491eda9b198f5a5521fbdf4e2071946e68aa766923e941e86d1dfa3ea2975be9193e573cf41cf2e7cd9427e4
@@ -26,7 +26,7 @@ module Dependabot
26
26
  https://registry.yarnpkg.com
27
27
  ).freeze
28
28
  GIT_URL_REGEX = %r{
29
- (?:^|^git.*?|^github:|^bitbucket:|^gitlab:|github\.com/)
29
+ (?<git_prefix>^|^git.*?|^github:|^bitbucket:|^gitlab:|github\.com/)
30
30
  (?<username>[a-z0-9-]+)/
31
31
  (?<repo>[a-z0-9_.-]+)
32
32
  (
@@ -255,9 +255,20 @@ module Dependabot
255
255
 
256
256
  def git_source_for(requirement)
257
257
  details = requirement.match(GIT_URL_REGEX).named_captures
258
+ url =
259
+ if details.fetch("git_prefix").include?("://")
260
+ requirement.split("#").first
261
+ elsif details.fetch("git_prefix").include?("bitbucket")
262
+ "https://bitbucket.org/#{details['username']}/#{details['repo']}"
263
+ elsif details.fetch("git_prefix").include?("gitlab")
264
+ "https://gitlab.com/#{details['username']}/#{details['repo']}"
265
+ else
266
+ "https://github.com/#{details['username']}/#{details['repo']}"
267
+ end
268
+
258
269
  {
259
270
  type: "git",
260
- url: "https://github.com/#{details['username']}/#{details['repo']}",
271
+ url: url,
261
272
  branch: nil,
262
273
  ref: details["ref"] || "master"
263
274
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-npm_and_yarn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.111.32
4
+ version: 0.111.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.111.32
19
+ version: 0.111.33
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.111.32
26
+ version: 0.111.33
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement