dependabot-npm_and_yarn 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/README.md +29 -0
- data/helpers/lib/npm/conflicting-dependency-parser.js +43 -13
- data/helpers/lib/yarn/conflicting-dependency-parser.js +148 -11
- data/helpers/package.json +5 -5
- data/helpers/test/npm/conflicting-dependency-parser.test.js +67 -0
- data/helpers/test/npm/fixtures/conflicting-dependency-parser/deeply-nested/package-lock.json +565 -0
- data/helpers/test/npm/fixtures/conflicting-dependency-parser/deeply-nested/package.json +14 -0
- data/helpers/test/npm/fixtures/conflicting-dependency-parser/nested/package-lock.json +188 -0
- data/helpers/test/npm/fixtures/conflicting-dependency-parser/nested/package.json +14 -0
- data/helpers/test/npm/fixtures/conflicting-dependency-parser/simple/package-lock.json +27 -0
- data/helpers/test/npm/fixtures/conflicting-dependency-parser/simple/package.json +14 -0
- data/helpers/test/npm/helpers.js +14 -0
- data/helpers/test/npm/updater.test.js +1 -15
- data/helpers/test/yarn/conflicting-dependency-parser.test.js +84 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/deeply-nested/package.json +14 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/deeply-nested/yarn.lock +496 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/dev-dependencies/package.json +14 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/dev-dependencies/yarn.lock +21 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/nested/package.json +14 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/nested/yarn.lock +172 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/simple/package.json +14 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/simple/yarn.lock +21 -0
- data/helpers/test/yarn/helpers.js +11 -0
- data/helpers/yarn.lock +124 -83
- data/lib/dependabot/npm_and_yarn/file_parser/lockfile_parser.rb +3 -3
- data/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb +1 -1
- data/lib/dependabot/npm_and_yarn/update_checker.rb +1 -1
- data/lib/dependabot/npm_and_yarn/update_checker/conflicting_dependency_resolver.rb +9 -3
- data/lib/dependabot/npm_and_yarn/update_checker/latest_version_finder.rb +3 -1
- metadata +27 -10
@@ -73,7 +73,7 @@ module Dependabot
|
|
73
73
|
next unless semver_version_for(details["version"])
|
74
74
|
next if alias_package?(req)
|
75
75
|
|
76
|
-
#
|
76
|
+
# NOTE: The DependencySet will de-dupe our dependencies, so they
|
77
77
|
# end up unique by name. That's not a perfect representation of
|
78
78
|
# the nested nature of JS resolution, but it makes everything work
|
79
79
|
# comparably to other flat-resolution strategies
|
@@ -92,7 +92,7 @@ module Dependabot
|
|
92
92
|
def package_lock_dependencies
|
93
93
|
dependency_set = Dependabot::NpmAndYarn::FileParser::DependencySet.new
|
94
94
|
|
95
|
-
#
|
95
|
+
# NOTE: The DependencySet will de-dupe our dependencies, so they
|
96
96
|
# end up unique by name. That's not a perfect representation of
|
97
97
|
# the nested nature of JS resolution, but it makes everything work
|
98
98
|
# comparably to other flat-resolution strategies
|
@@ -108,7 +108,7 @@ module Dependabot
|
|
108
108
|
def shrinkwrap_dependencies
|
109
109
|
dependency_set = Dependabot::NpmAndYarn::FileParser::DependencySet.new
|
110
110
|
|
111
|
-
#
|
111
|
+
# NOTE: The DependencySet will de-dupe our dependencies, so they
|
112
112
|
# end up unique by name. That's not a perfect representation of
|
113
113
|
# the nested nature of JS resolution, but it makes everything work
|
114
114
|
# comparably to other flat-resolution strategies
|
@@ -286,7 +286,7 @@ module Dependabot
|
|
286
286
|
lockfile)
|
287
287
|
lockfile_dir = Pathname.new(lockfile.name).dirname
|
288
288
|
modules_path = lockfile_dir.join("node_modules")
|
289
|
-
#
|
289
|
+
# NOTE: don't include the dependency names to prevent opening
|
290
290
|
# multiple issues for each dependency that fails because we unique
|
291
291
|
# issues on the error message (issue detail) on the backend
|
292
292
|
#
|
@@ -43,7 +43,7 @@ module Dependabot
|
|
43
43
|
|
44
44
|
def lowest_resolvable_security_fix_version
|
45
45
|
raise "Dependency not vulnerable!" unless vulnerable?
|
46
|
-
#
|
46
|
+
# NOTE: we currently don't resolve transitive/sub-dependencies as
|
47
47
|
# npm/yarn don't provide any control over updating to a specific
|
48
48
|
# sub-dependency
|
49
49
|
return latest_resolvable_version unless dependency.top_level?
|
@@ -36,16 +36,22 @@ module Dependabot
|
|
36
36
|
)
|
37
37
|
dependency_files_builder.write_temporary_dependency_files
|
38
38
|
|
39
|
-
|
39
|
+
# TODO: Look into using npm/arborist for parsing yarn lockfiles (there's currently partial yarn support)
|
40
|
+
#
|
41
|
+
# Prefer the npm conflicting dependency parser if there's both a npm lockfile and a yarn.lock file as the
|
42
|
+
# npm parser handles edge cases where the package.json is out of sync with the lockfile, something the yarn
|
43
|
+
# parser doesn't deal with at the moment.
|
44
|
+
if dependency_files_builder.package_locks.any? ||
|
45
|
+
dependency_files_builder.shrinkwraps.any?
|
40
46
|
SharedHelpers.run_helper_subprocess(
|
41
47
|
command: NativeHelpers.helper_path,
|
42
|
-
function: "
|
48
|
+
function: "npm:findConflictingDependencies",
|
43
49
|
args: [Dir.pwd, dependency.name, target_version.to_s]
|
44
50
|
)
|
45
51
|
else
|
46
52
|
SharedHelpers.run_helper_subprocess(
|
47
53
|
command: NativeHelpers.helper_path,
|
48
|
-
function: "
|
54
|
+
function: "yarn:findConflictingDependencies",
|
49
55
|
args: [Dir.pwd, dependency.name, target_version.to_s]
|
50
56
|
)
|
51
57
|
end
|
@@ -361,7 +361,9 @@ module Dependabot
|
|
361
361
|
idempotent: true,
|
362
362
|
**SharedHelpers.excon_defaults
|
363
363
|
)
|
364
|
-
|
364
|
+
# NOTE: returns 429 when the login page is rate limited
|
365
|
+
return web_response.body.include?("Forgot password?") ||
|
366
|
+
web_response.status == 429
|
365
367
|
end
|
366
368
|
|
367
369
|
true
|
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.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
|
@@ -172,6 +172,7 @@ extensions: []
|
|
172
172
|
extra_rdoc_files: []
|
173
173
|
files:
|
174
174
|
- helpers/.eslintrc
|
175
|
+
- helpers/README.md
|
175
176
|
- helpers/build
|
176
177
|
- helpers/lib/npm/conflicting-dependency-parser.js
|
177
178
|
- helpers/lib/npm/helpers.js
|
@@ -191,11 +192,27 @@ files:
|
|
191
192
|
- helpers/lib/yarn/updater.js
|
192
193
|
- helpers/package.json
|
193
194
|
- helpers/run.js
|
195
|
+
- helpers/test/npm/conflicting-dependency-parser.test.js
|
196
|
+
- helpers/test/npm/fixtures/conflicting-dependency-parser/deeply-nested/package-lock.json
|
197
|
+
- helpers/test/npm/fixtures/conflicting-dependency-parser/deeply-nested/package.json
|
198
|
+
- helpers/test/npm/fixtures/conflicting-dependency-parser/nested/package-lock.json
|
199
|
+
- helpers/test/npm/fixtures/conflicting-dependency-parser/nested/package.json
|
200
|
+
- helpers/test/npm/fixtures/conflicting-dependency-parser/simple/package-lock.json
|
201
|
+
- helpers/test/npm/fixtures/conflicting-dependency-parser/simple/package.json
|
194
202
|
- helpers/test/npm/fixtures/updater/original/package-lock.json
|
195
203
|
- helpers/test/npm/fixtures/updater/original/package.json
|
196
204
|
- helpers/test/npm/fixtures/updater/updated/package-lock.json
|
197
205
|
- helpers/test/npm/helpers.js
|
198
206
|
- helpers/test/npm/updater.test.js
|
207
|
+
- helpers/test/yarn/conflicting-dependency-parser.test.js
|
208
|
+
- helpers/test/yarn/fixtures/conflicting-dependency-parser/deeply-nested/package.json
|
209
|
+
- helpers/test/yarn/fixtures/conflicting-dependency-parser/deeply-nested/yarn.lock
|
210
|
+
- helpers/test/yarn/fixtures/conflicting-dependency-parser/dev-dependencies/package.json
|
211
|
+
- helpers/test/yarn/fixtures/conflicting-dependency-parser/dev-dependencies/yarn.lock
|
212
|
+
- helpers/test/yarn/fixtures/conflicting-dependency-parser/nested/package.json
|
213
|
+
- helpers/test/yarn/fixtures/conflicting-dependency-parser/nested/yarn.lock
|
214
|
+
- helpers/test/yarn/fixtures/conflicting-dependency-parser/simple/package.json
|
215
|
+
- helpers/test/yarn/fixtures/conflicting-dependency-parser/simple/yarn.lock
|
199
216
|
- helpers/test/yarn/fixtures/updater/original/package.json
|
200
217
|
- helpers/test/yarn/fixtures/updater/original/yarn.lock
|
201
218
|
- helpers/test/yarn/fixtures/updater/updated/yarn.lock
|