dependabot-npm_and_yarn 0.267.0 → 0.268.0
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: 473cf091eca02d2d3e0ff9920708779183b7a9a9dba2771c35ffe602eda18003
|
4
|
+
data.tar.gz: 3ff951a1e1970c6818b615b5f10b78950e5cc53c01b3a2b9540a28f3451ac294
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73a7da3b2062a4adaa70d33616698d418bcda9684e8cf301279bac6756537079136872cc68d6623af7f1ea8bd09197d7ac98edd287da6aafef63f1f6f25243c1
|
7
|
+
data.tar.gz: 68e3d2e1a3b50ccad6359b961a1e3093d6095d08fb8e79175aa83025c57716f080ca03dd5aea9e4f1dead654fa881cf4f20698971150ac5b361a25efbaa74b04
|
@@ -79,6 +79,14 @@ module Dependabot
|
|
79
79
|
INVALID_AUTH_TOKEN =
|
80
80
|
/401 Unauthorized - GET (?<url>.*) - unauthenticated: User cannot be authenticated with the token provided./
|
81
81
|
NPM_PACKAGE_REGISTRY = "https://npm.pkg.github.com"
|
82
|
+
EOVERRIDE = /EOVERRIDE\n *.* Override for (?<deps>.*) conflicts with direct dependency/
|
83
|
+
NESTED_ALIAS = /nested aliases not supported/
|
84
|
+
PEER_DEPS_PATTERNS = T.let([/Cannot read properties of null/,
|
85
|
+
/ERESOLVE overriding peer dependency/].freeze, T::Array[Regexp])
|
86
|
+
|
87
|
+
ERROR_E401 = /code E401/
|
88
|
+
ERROR_E403 = /code E403/
|
89
|
+
ERROR_EAI_AGAIN = /request to (?<url>.*) failed, reason: getaddrinfo EAI_AGAIN/
|
82
90
|
|
83
91
|
# TODO: look into fixing this in npm, seems like a bug in the git
|
84
92
|
# downloader introduced in npm 7
|
@@ -392,7 +400,23 @@ module Dependabot
|
|
392
400
|
# rubocop:disable Metrics/MethodLength
|
393
401
|
sig { params(error: Exception).returns(T.noreturn) }
|
394
402
|
def handle_npm_updater_error(error)
|
403
|
+
Dependabot.logger.warn("NPM : " + error.message)
|
404
|
+
|
395
405
|
error_message = error.message
|
406
|
+
|
407
|
+
# message groups which are related to peer dependency resolution failure. Peer deps can be updated
|
408
|
+
# with --legacy-peer-deps flag, but it is not recommended as the flag can mess up dependency resolution
|
409
|
+
# and introduce breaking changes. So we let the update fail.
|
410
|
+
peerdep_group = Regexp.union(PEER_DEPS_PATTERNS)
|
411
|
+
if error_message.match(peerdep_group)
|
412
|
+
raise Dependabot::DependencyFileNotResolvable,
|
413
|
+
"Error while updating peer dependency."
|
414
|
+
end
|
415
|
+
|
416
|
+
if error_message.match?(ERROR_E401) || error_message.match?(ERROR_E403)
|
417
|
+
raise Dependabot::PrivateSourceAuthenticationFailure, error_message
|
418
|
+
end
|
419
|
+
|
396
420
|
if error_message.match?(MISSING_PACKAGE)
|
397
421
|
package_name = T.must(error_message.match(MISSING_PACKAGE))
|
398
422
|
.named_captures["package_req"]
|
@@ -516,6 +540,11 @@ module Dependabot
|
|
516
540
|
raise Dependabot::PrivateSourceAuthenticationFailure, msg
|
517
541
|
end
|
518
542
|
|
543
|
+
if (git_source = error_message.match(ERROR_EAI_AGAIN))
|
544
|
+
msg = "Network Error. Access to #{git_source.named_captures.fetch('url')} failed."
|
545
|
+
raise Dependabot::PrivateSourceTimedOut, msg
|
546
|
+
end
|
547
|
+
|
519
548
|
if (registry_source = error_message.match(INVALID_AUTH_TOKEN) ||
|
520
549
|
error_message.match(MISSING_AUTH_TOKEN)) &&
|
521
550
|
T.must(registry_source.named_captures.fetch("url")).include?(NPM_PACKAGE_REGISTRY)
|
@@ -523,6 +552,16 @@ module Dependabot
|
|
523
552
|
raise Dependabot::InvalidGitAuthToken, T.must(msg)
|
524
553
|
end
|
525
554
|
|
555
|
+
if (dep = error_message.match(EOVERRIDE))
|
556
|
+
msg = "Override for #{dep.named_captures.fetch('deps')} conflicts with direct dependency"
|
557
|
+
raise Dependabot::DependencyFileNotResolvable, msg
|
558
|
+
end
|
559
|
+
|
560
|
+
if error_message.match(NESTED_ALIAS)
|
561
|
+
msg = "Nested aliases are not supported in NPM versions earlier than 6.9.0."
|
562
|
+
raise Dependabot::DependencyFileNotResolvable, msg
|
563
|
+
end
|
564
|
+
|
526
565
|
raise error
|
527
566
|
end
|
528
567
|
# rubocop:enable Metrics/AbcSize
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-npm_and_yarn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.268.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-02 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.
|
19
|
+
version: 0.268.0
|
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.
|
26
|
+
version: 0.268.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -345,7 +345,7 @@ licenses:
|
|
345
345
|
- MIT
|
346
346
|
metadata:
|
347
347
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
348
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
348
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.268.0
|
349
349
|
post_install_message:
|
350
350
|
rdoc_options: []
|
351
351
|
require_paths:
|