dependabot-go_modules 0.125.2 → 0.125.7
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.
- checksums.yaml +4 -4
- data/helpers/build +1 -0
- data/lib/dependabot/go_modules/file_parser.rb +23 -2
- data/lib/dependabot/go_modules/requirement.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6dda4cd88811bb7ec0f14ebbe79a3a81e79aeb3c1d838c16cae91efac49beea
|
4
|
+
data.tar.gz: 62198ba73d600dccb1fa1ce3fa55c70e182e4a25614830a5d2fda5fa7eaf653c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fb4d18080186d3a34d4ec8ff639a74084944567605849e0cee487aa9b285c2c1a732a6fd6f4f661659e190aefd0269bb7e6ffdef63ca9fa244d9205aa2a9de2
|
7
|
+
data.tar.gz: 0df0561ec6e2e86380f848a1e1e0fb0f52c68bbd54d847147e6ad1808ed1a0aba1e18965b7784c1b5b5d25c52ce6fb1c10b8119117e08c1a152dc4dd7fd121fc
|
data/helpers/build
CHANGED
@@ -139,8 +139,9 @@ module Dependabot
|
|
139
139
|
def handle_parser_error(path, stderr)
|
140
140
|
case stderr
|
141
141
|
when /go: .*: unknown revision/m
|
142
|
-
line = stderr.lines.grep(/unknown revision/).first
|
143
|
-
|
142
|
+
line = stderr.lines.grep(/unknown revision/).first.strip
|
143
|
+
handle_github_unknown_revision(line) if line.start_with?("go: github.com/")
|
144
|
+
raise Dependabot::DependencyFileNotResolvable, line
|
144
145
|
when /go: .*: unrecognized import path/m
|
145
146
|
line = stderr.lines.grep(/unrecognized import/).first
|
146
147
|
raise Dependabot::DependencyFileNotResolvable, line.strip
|
@@ -156,6 +157,26 @@ module Dependabot
|
|
156
157
|
end
|
157
158
|
end
|
158
159
|
|
160
|
+
GITHUB_REPO_REGEX = %r{github.com/[^@]*}.freeze
|
161
|
+
def handle_github_unknown_revision(line)
|
162
|
+
repo_path = line.scan(GITHUB_REPO_REGEX).first
|
163
|
+
return unless repo_path
|
164
|
+
|
165
|
+
# Query for _any_ version of this module, to know if it doesn't exist (or is private)
|
166
|
+
# or we were just given a bad revision by this manifest
|
167
|
+
SharedHelpers.in_a_temporary_directory do
|
168
|
+
SharedHelpers.with_git_configured(credentials: credentials) do
|
169
|
+
File.write("go.mod", "module dummy\n")
|
170
|
+
|
171
|
+
env = { "GOPRIVATE" => "*" }
|
172
|
+
_, _, status = Open3.capture3(env, SharedHelpers.escape_command("go get #{repo_path}"))
|
173
|
+
raise Dependabot::DependencyFileNotResolvable, line if status.success?
|
174
|
+
|
175
|
+
raise Dependabot::GitDependenciesNotReachable, [repo_path]
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
159
180
|
def rev_identifier?(dep)
|
160
181
|
dep["Version"]&.match?(GIT_VERSION_REGEX)
|
161
182
|
end
|
@@ -132,7 +132,7 @@ module Dependabot
|
|
132
132
|
"~> #{parts.join('.')}"
|
133
133
|
end
|
134
134
|
|
135
|
-
#
|
135
|
+
# NOTE: Dep's caret notation implementation doesn't distinguish between
|
136
136
|
# pre and post-1.0.0 requirements (unlike in JS)
|
137
137
|
def convert_caret_req(req_string)
|
138
138
|
version = req_string.gsub(/^\^?v?/, "")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-go_modules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.125.
|
4
|
+
version: 0.125.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dependabot-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.125.
|
19
|
+
version: 0.125.7
|
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.125.
|
26
|
+
version: 0.125.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,42 +100,42 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 1.4.2
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 1.4.2
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: simplecov
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.20.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.20.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: simplecov-console
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.8.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 0.8.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: vcr
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|