dependabot-core 0.88.1 → 0.88.2

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: dfa99aadbbebedcd52e0382d2b13a3ec6d5775fc4062cd1d7879129226d5dde1
4
- data.tar.gz: 8a135682758a7f56aba2bd17e61c5c03a00668be57cd68165791888a8decfe59
3
+ metadata.gz: b9f51e92139b3710eeebe403d5f9f297cb54ef3827f394d4202e4e7299b6dc43
4
+ data.tar.gz: 7f8da80af805d23332ec203771fa69d344289fd65ea6ea7da6c7bf2d29dba166
5
5
  SHA512:
6
- metadata.gz: 21b2cfb915ab34353e97976ba1bf99ebe9842dd39ac8442b8ccf167ab6eebf123e99a115f24f6946f63d3b05be4b0883ab886e04d2bf95b814f62a68623bf52c
7
- data.tar.gz: 64c2ec9504666622992b32c504600e4d99b4a9b659827640668007ceb3321331c93fd8a3878c8144543058204fd4b7079abfa7cbb6ce27f8719256034ef883d0
6
+ metadata.gz: 3c6ecd99abe5b0a1902700d54800eb2bc5fa6a67e714b98a5990a481e1691d5b46a63283ad5b3ceec70f387a752bc5fd5b22913aa662bdf9c5830985a4d2ca8d
7
+ data.tar.gz: 5d6561c25397309c2ecf8eb6aeb026d464e6a890acac22a720d123e5ac8f310792090b90c7012315ddd1a2d8d9380c93cf4122b504720375698ffe9e9b3346f6
@@ -1,3 +1,7 @@
1
+ ## v0.88.2, 10 January 2019
2
+
3
+ - JS: Handle ~ and ^ version requirements with blank minor.patch version
4
+
1
5
  ## v0.88.1, 9 January 2019
2
6
 
3
7
  - Better handling of directories in changelog finder
@@ -84,7 +84,23 @@ module Dependabot
84
84
 
85
85
  def convert_hyphen_req(req_string)
86
86
  lower_bound, upper_bound = req_string.split(/\s+-\s+/)
87
- [">= #{lower_bound}", "<= #{upper_bound}"]
87
+ lower_bound_parts = lower_bound.split(".")
88
+ lower_bound_parts.fill("0", lower_bound_parts.length...3)
89
+
90
+ upper_bound_parts = upper_bound.split(".")
91
+ upper_bound_range =
92
+ if upper_bound_parts.length < 3
93
+ # When upper bound is a partial version treat these as an X-range
94
+ if upper_bound_parts[-1].to_i.positive?
95
+ upper_bound_parts[-1] = upper_bound_parts[-1].to_i + 1
96
+ end
97
+ upper_bound_parts.fill("0", upper_bound_parts.length...3)
98
+ "< #{upper_bound_parts.join('.')}.a"
99
+ else
100
+ "<= #{upper_bound_parts.join('.')}"
101
+ end
102
+
103
+ [">= #{lower_bound_parts.join('.')}", upper_bound_range]
88
104
  end
89
105
 
90
106
  def ruby_range(req_string)
@@ -97,13 +113,17 @@ module Dependabot
97
113
  "~> #{parts.join('.')}"
98
114
  end
99
115
 
116
+ # rubocop:disable Metrics/PerceivedComplexity
100
117
  def convert_caret_req(req_string)
101
118
  version = req_string.gsub(/^\^/, "")
102
119
  parts = version.split(".")
103
- parts = parts.fill(0, parts.length...3)
120
+ parts = parts.fill("x", parts.length...3)
104
121
  first_non_zero = parts.find { |d| d != "0" }
105
122
  first_non_zero_index =
106
123
  first_non_zero ? parts.index(first_non_zero) : parts.count - 1
124
+ # If the requirement has a blank minor or patch version increment the
125
+ # previous index value with 1
126
+ first_non_zero_index -= 1 if first_non_zero == "x"
107
127
  upper_bound = parts.map.with_index do |part, i|
108
128
  if i < first_non_zero_index then part
109
129
  elsif i == first_non_zero_index then (part.to_i + 1).to_s
@@ -114,6 +134,7 @@ module Dependabot
114
134
 
115
135
  [">= #{version}", "< #{upper_bound}"]
116
136
  end
137
+ # rubocop:enable Metrics/PerceivedComplexity
117
138
  end
118
139
  end
119
140
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.88.1"
4
+ VERSION = "0.88.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.88.1
4
+ version: 0.88.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-09 00:00:00.000000000 Z
11
+ date: 2019-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-ecr