dependabot-npm_and_yarn 0.106.7 → 0.106.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00c72f1179cc258aaef0f95b50949485a1339ac751c648d3a1bc7ec7f27c739e
|
4
|
+
data.tar.gz: b411e002ad634b342b5a41a59bb2b952b825a7ece6b6cbfddd4ab2580509fc69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e22c0d535f790a504dddbfc37e44bc982a23980dd3ddab6362e8c6671ad1b35ae3a00ec15290715107e13d92e9b860548a34e6831dc05cecb2f04fd0664e497d
|
7
|
+
data.tar.gz: 7ed355fe57b3a89532f4121a4cd923b06b38247725bc22aa5290c66d4a70117cce7019b9ec6a402cf757779cec07ca5b96e86ee06e0dde1d70d712f7d36e84f2
|
@@ -49,6 +49,8 @@ module Dependabot
|
|
49
49
|
/ls-remote (?:(-h -t)|(--tags --heads)) (?<url>.*)/.freeze
|
50
50
|
FORBIDDEN_PACKAGE =
|
51
51
|
%r{(?<package_req>[^/]+) - (Forbidden|Unauthorized)}.freeze
|
52
|
+
FORBIDDEN_PACKAGE_403 = %r{^403\sForbidden\s
|
53
|
+
-\sGET\shttps?://(?<source>[^/]+)/(?<package_req>[^/\s]+)}x.freeze
|
52
54
|
MISSING_PACKAGE = %r{(?<package_req>[^/]+) - Not found}.freeze
|
53
55
|
INVALID_PACKAGE = /Can't install (?<package_req>.*): Missing/.freeze
|
54
56
|
|
@@ -178,10 +180,15 @@ module Dependabot
|
|
178
180
|
handle_missing_package(package_name, error, lockfile)
|
179
181
|
end
|
180
182
|
|
181
|
-
# When the package.json doesn't include a name or
|
182
|
-
# has non url-friendly characters
|
183
|
+
# Invalid package: When the package.json doesn't include a name or
|
184
|
+
# version, or name has non url-friendly characters
|
185
|
+
# Local path error: When installing a git dependency which
|
186
|
+
# is using local file paths for sub-dependencies (e.g. unbuilt yarn
|
187
|
+
# workspace project)
|
188
|
+
sub_dep_local_path_error = "does not contain a package.json file"
|
183
189
|
if error.message.match?(INVALID_PACKAGE) ||
|
184
|
-
error.message.start_with?("Invalid package name")
|
190
|
+
error.message.start_with?("Invalid package name") ||
|
191
|
+
error.message.include?(sub_dep_local_path_error)
|
185
192
|
raise_resolvability_error(error, lockfile)
|
186
193
|
end
|
187
194
|
|
@@ -222,6 +229,15 @@ module Dependabot
|
|
222
229
|
handle_missing_package(package_name, error, lockfile)
|
223
230
|
end
|
224
231
|
|
232
|
+
# Some private registries return a 403 when the user is readonly
|
233
|
+
if error.message.match?(FORBIDDEN_PACKAGE_403)
|
234
|
+
package_name =
|
235
|
+
error.message.match(FORBIDDEN_PACKAGE_403).
|
236
|
+
named_captures["package_req"].
|
237
|
+
gsub("%2f", "/")
|
238
|
+
handle_missing_package(package_name, error, lockfile)
|
239
|
+
end
|
240
|
+
|
225
241
|
if error.message.match?(UNREACHABLE_GIT)
|
226
242
|
dependency_url =
|
227
243
|
error.message.match(UNREACHABLE_GIT).
|
@@ -168,8 +168,13 @@ module Dependabot
|
|
168
168
|
# rubocop:disable Metrics/PerceivedComplexity
|
169
169
|
# rubocop:disable Metrics/MethodLength
|
170
170
|
def handle_yarn_lock_updater_error(error, yarn_lock)
|
171
|
-
# When
|
172
|
-
|
171
|
+
# Invalid package: When package.json doesn't include a name or version
|
172
|
+
# Local path error: When installing a git dependency which
|
173
|
+
# is using local file paths for sub-dependencies (e.g. unbuilt yarn
|
174
|
+
# workspace project)
|
175
|
+
sub_dep_local_path_err = "Package \"\" refers to a non-existing file"
|
176
|
+
if error.message.match?(INVALID_PACKAGE) ||
|
177
|
+
error.message.start_with?(sub_dep_local_path_err)
|
173
178
|
raise_resolvability_error(error, yarn_lock)
|
174
179
|
end
|
175
180
|
|
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.106.
|
4
|
+
version: 0.106.8
|
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.106.
|
19
|
+
version: 0.106.8
|
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.106.
|
26
|
+
version: 0.106.8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|