dependabot-npm_and_yarn 0.119.3 → 0.120.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/helpers/package.json +2 -2
- data/helpers/yarn.lock +8 -8
- data/lib/dependabot/npm_and_yarn/file_fetcher.rb +2 -3
- data/lib/dependabot/npm_and_yarn/file_updater/npmrc_builder.rb +2 -2
- data/lib/dependabot/npm_and_yarn/file_updater/yarn_lockfile_updater.rb +1 -1
- data/lib/dependabot/npm_and_yarn/requirement.rb +1 -5
- data/lib/dependabot/npm_and_yarn/update_checker/latest_version_finder.rb +2 -0
- data/lib/dependabot/npm_and_yarn/update_checker/subdependency_version_resolver.rb +0 -3
- data/lib/dependabot/npm_and_yarn/update_checker/version_resolver.rb +2 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a40a9df4943b269d53644e0a34f3e667978e5bf777f1a3a2937e558171cbc45d
|
4
|
+
data.tar.gz: c8d9d332a154a859a9c008f576c89ff780f07374e3f4d99ac5002b940207727f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c3cc1b09ae101fc24ef9f87e4fce546443dc52d2e46e9b523930880e49f4d334132852d9cc7e2e266dd95ec38a8c7806f7091b977591c499b276dd19a500a01
|
7
|
+
data.tar.gz: bc1b6a47fa83857f08863bc4f644ad0322882bc79a3f2c1826e6bd902522ff34fc9885b2b80d7aaad1013dbd2db06ac614323e714adf4a7a0e69524c1e0d7831
|
data/helpers/package.json
CHANGED
data/helpers/yarn.lock
CHANGED
@@ -2064,10 +2064,10 @@ eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
|
|
2064
2064
|
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
|
2065
2065
|
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
|
2066
2066
|
|
2067
|
-
eslint@^7.
|
2068
|
-
version "7.
|
2069
|
-
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.
|
2070
|
-
integrity sha512
|
2067
|
+
eslint@^7.9.0:
|
2068
|
+
version "7.9.0"
|
2069
|
+
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.9.0.tgz#522aeccc5c3a19017cf0cb46ebfd660a79acf337"
|
2070
|
+
integrity sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==
|
2071
2071
|
dependencies:
|
2072
2072
|
"@babel/code-frame" "^7.0.0"
|
2073
2073
|
"@eslint/eslintrc" "^0.1.3"
|
@@ -5393,10 +5393,10 @@ prettier-linter-helpers@^1.0.0:
|
|
5393
5393
|
dependencies:
|
5394
5394
|
fast-diff "^1.1.2"
|
5395
5395
|
|
5396
|
-
prettier@^2.1.
|
5397
|
-
version "2.1.
|
5398
|
-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.
|
5399
|
-
integrity sha512-
|
5396
|
+
prettier@^2.1.2:
|
5397
|
+
version "2.1.2"
|
5398
|
+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
|
5399
|
+
integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==
|
5400
5400
|
|
5401
5401
|
pretty-format@^26.4.2:
|
5402
5402
|
version "26.4.2"
|
@@ -31,7 +31,6 @@ module Dependabot
|
|
31
31
|
|
32
32
|
private
|
33
33
|
|
34
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
35
34
|
def fetch_files
|
36
35
|
fetched_files = []
|
37
36
|
fetched_files << package_json
|
@@ -48,8 +47,6 @@ module Dependabot
|
|
48
47
|
fetched_files.uniq
|
49
48
|
end
|
50
49
|
|
51
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
52
|
-
|
53
50
|
def package_json
|
54
51
|
@package_json ||= fetch_file_from_host("package.json")
|
55
52
|
end
|
@@ -173,6 +170,7 @@ module Dependabot
|
|
173
170
|
].uniq
|
174
171
|
end
|
175
172
|
|
173
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
176
174
|
# rubocop:disable Metrics/AbcSize
|
177
175
|
def path_dependency_details_from_manifest(file)
|
178
176
|
return [] unless file.name.end_with?("package.json")
|
@@ -208,6 +206,7 @@ module Dependabot
|
|
208
206
|
raise Dependabot::DependencyFileNotParseable, file.path
|
209
207
|
end
|
210
208
|
# rubocop:enable Metrics/AbcSize
|
209
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
211
210
|
|
212
211
|
def path_dependency_details_from_npm_lockfile(parsed_lockfile)
|
213
212
|
path_starts = NPM_PATH_DEPENDENCY_STARTS
|
@@ -127,7 +127,6 @@ module Dependabot
|
|
127
127
|
build_npmrc_content_from_lockfile
|
128
128
|
end
|
129
129
|
|
130
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
131
130
|
def credential_lines_for_npmrc
|
132
131
|
lines = []
|
133
132
|
registry_credentials.each do |cred|
|
@@ -154,8 +153,8 @@ module Dependabot
|
|
154
153
|
# Work around a suspected yarn bug
|
155
154
|
["always-auth = true"] + lines
|
156
155
|
end
|
157
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
158
156
|
|
157
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
159
158
|
def registry_scopes(registry)
|
160
159
|
# Central registries don't just apply to scopes
|
161
160
|
return if CENTRAL_REGISTRIES.include?(registry)
|
@@ -182,6 +181,7 @@ module Dependabot
|
|
182
181
|
|
183
182
|
scopes.map { |scope| "@#{scope}:registry=https://#{registry}" }
|
184
183
|
end
|
184
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
185
185
|
|
186
186
|
def registry_credentials
|
187
187
|
credentials.select { |cred| cred.fetch("type") == "npm_registry" }
|
@@ -171,7 +171,7 @@ module Dependabot
|
|
171
171
|
# Local path error: When installing a git dependency which
|
172
172
|
# is using local file paths for sub-dependencies (e.g. unbuilt yarn
|
173
173
|
# workspace project)
|
174
|
-
sub_dep_local_path_err =
|
174
|
+
sub_dep_local_path_err = 'Package "" refers to a non-existing file'
|
175
175
|
if error_message.match?(INVALID_PACKAGE) ||
|
176
176
|
error_message.start_with?(sub_dep_local_path_err)
|
177
177
|
raise_resolvability_error(error_message, yarn_lock)
|
@@ -56,7 +56,6 @@ module Dependabot
|
|
56
56
|
|
57
57
|
private
|
58
58
|
|
59
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
60
59
|
def convert_js_constraint_to_ruby_constraint(req_string)
|
61
60
|
return req_string if req_string.match?(/^([A-Za-uw-z]|v[^\d])/)
|
62
61
|
|
@@ -72,7 +71,6 @@ module Dependabot
|
|
72
71
|
else ruby_range(req_string)
|
73
72
|
end
|
74
73
|
end
|
75
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
76
74
|
|
77
75
|
def convert_tilde_req(req_string)
|
78
76
|
version = req_string.gsub(/^~\>?[\s=]*/, "")
|
@@ -112,11 +110,10 @@ module Dependabot
|
|
112
110
|
"~> #{parts.join('.')}"
|
113
111
|
end
|
114
112
|
|
115
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
116
113
|
def convert_caret_req(req_string)
|
117
114
|
version = req_string.gsub(/^\^[\s=]*/, "")
|
118
115
|
parts = version.split(".")
|
119
|
-
parts
|
116
|
+
parts.fill("x", parts.length...3)
|
120
117
|
first_non_zero = parts.find { |d| d != "0" }
|
121
118
|
first_non_zero_index =
|
122
119
|
first_non_zero ? parts.index(first_non_zero) : parts.count - 1
|
@@ -133,7 +130,6 @@ module Dependabot
|
|
133
130
|
|
134
131
|
[">= #{version}", "< #{upper_bound}"]
|
135
132
|
end
|
136
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
137
133
|
end
|
138
134
|
end
|
139
135
|
end
|
@@ -167,6 +167,7 @@ module Dependabot
|
|
167
167
|
wants_latest_dist_tag?(latest) ? latest : nil
|
168
168
|
end
|
169
169
|
|
170
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
170
171
|
def related_to_current_pre?(version)
|
171
172
|
current_version = dependency.version
|
172
173
|
if current_version &&
|
@@ -188,6 +189,7 @@ module Dependabot
|
|
188
189
|
false
|
189
190
|
end
|
190
191
|
end
|
192
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
191
193
|
|
192
194
|
def specified_dist_tag_requirement?
|
193
195
|
dependency.requirements.any? do |req|
|
@@ -82,7 +82,6 @@ module Dependabot
|
|
82
82
|
version_class.new(updated_version)
|
83
83
|
end
|
84
84
|
|
85
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
86
85
|
def run_yarn_updater(path, lockfile_name)
|
87
86
|
SharedHelpers.with_git_configured(credentials: credentials) do
|
88
87
|
Dir.chdir(path) do
|
@@ -107,8 +106,6 @@ module Dependabot
|
|
107
106
|
sleep(rand(3.0..10.0)) && retry
|
108
107
|
end
|
109
108
|
|
110
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
111
|
-
|
112
109
|
def run_npm_updater(path, lockfile_name)
|
113
110
|
SharedHelpers.with_git_configured(credentials: credentials) do
|
114
111
|
Dir.chdir(path) do
|
@@ -130,6 +130,7 @@ module Dependabot
|
|
130
130
|
)
|
131
131
|
end
|
132
132
|
|
133
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
133
134
|
def resolve_latest_previous_version(dep, updated_version)
|
134
135
|
return dep.version if dep.version
|
135
136
|
|
@@ -160,6 +161,7 @@ module Dependabot
|
|
160
161
|
latest_previous_version
|
161
162
|
end
|
162
163
|
end
|
164
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
163
165
|
|
164
166
|
def part_of_tightly_locked_monorepo?
|
165
167
|
monorepo_dep_names =
|
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.120.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-25 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.120.1
|
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.120.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.91.0
|
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: 0.
|
110
|
+
version: 0.91.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: vcr
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|