dependabot-npm_and_yarn 0.140.3 → 0.143.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: 50ed1946929dc2eaa7da538b0bad6ee3cdc11f916a7504c46ed7def2e757393b
4
- data.tar.gz: 184eb77d48f2d0e6d7c52f219cfc03efe0dbec2395782b61d2587339b26169aa
3
+ metadata.gz: 7d816558a71e65a586c42d450da095836365a126e7b09d72c09a2fad7ea85bbd
4
+ data.tar.gz: 3af33ca87ef0d6f8d15552b4a2b41b793beda8af15045b2d2f4de17a6b49c67a
5
5
  SHA512:
6
- metadata.gz: f896d915873bc8528e9345d2f9c4eafec2645047d2d12c05f1de9f09eb70e9bf3de86af0ce3709ea02d90e44d059ad15a64c3ce18a5e3b17b88e0456cf429e63
7
- data.tar.gz: 6a3abba23a6a06d4d21f3c29adc87b4cd9a3a55283784d63827d720d346643847680b14853bb8917a7923056ff4f581ec3e9f35705984396758da221190aec2a
6
+ metadata.gz: c1f39bd7b906fbf6d8231ce6e40becb84a405fd111a4f78dd80dc99d071963adc5e72942e86c207fd0637eda0edf64b6efdeb18aacd92acc67d880ac7c42504b
7
+ data.tar.gz: a4e11524bb70bd2ef629f3ff98ea6db13159b16d5e6a110cf97139afcf07e650d66c4051471d17b8cd883d754cf4ae22cbdfe17f0f25d8f1050cc79f4a77249c
@@ -9,15 +9,15 @@
9
9
  "@dependabot/yarn-lib": "^1.21.1",
10
10
  "@npmcli/arborist": "^2.3.0",
11
11
  "detect-indent": "^6.0.0",
12
- "npm": "6.14.12",
12
+ "npm": "6.14.13",
13
13
  "semver": "^7.3.4"
14
14
  },
15
15
  "bin": {
16
16
  "helper": "run.js"
17
17
  },
18
18
  "devDependencies": {
19
- "eslint": "^7.23.0",
20
- "eslint-config-prettier": "^8.1.0",
19
+ "eslint": "^7.24.0",
20
+ "eslint-config-prettier": "^8.2.0",
21
21
  "jest": "^26.6.3",
22
22
  "prettier": "^2.2.1",
23
23
  "rimraf": "^3.0.2"
@@ -3456,9 +3456,9 @@
3456
3456
  }
3457
3457
  },
3458
3458
  "node_modules/eslint": {
3459
- "version": "7.23.0",
3460
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz",
3461
- "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==",
3459
+ "version": "7.24.0",
3460
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz",
3461
+ "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==",
3462
3462
  "dev": true,
3463
3463
  "dependencies": {
3464
3464
  "@babel/code-frame": "7.12.11",
@@ -3510,9 +3510,9 @@
3510
3510
  }
3511
3511
  },
3512
3512
  "node_modules/eslint-config-prettier": {
3513
- "version": "8.1.0",
3514
- "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz",
3515
- "integrity": "sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==",
3513
+ "version": "8.2.0",
3514
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.2.0.tgz",
3515
+ "integrity": "sha512-dWV9EVeSo2qodOPi1iBYU/x6F6diHv8uujxbxr77xExs3zTAlNXvVZKiyLsQGNz7yPV2K49JY5WjPzNIuDc2Bw==",
3516
3516
  "dev": true,
3517
3517
  "bin": {
3518
3518
  "eslint-config-prettier": "bin/cli.js"
@@ -8069,9 +8069,9 @@
8069
8069
  }
8070
8070
  },
8071
8071
  "node_modules/npm": {
8072
- "version": "6.14.12",
8073
- "resolved": "https://registry.npmjs.org/npm/-/npm-6.14.12.tgz",
8074
- "integrity": "sha512-La0TNNm1TLYaSeOyit+p3xGTRYYRsHae6/RG69MVXurZsWna9jccPP7FOi/u7V9WdiCV5OOojrfMD+WstO5MZQ==",
8072
+ "version": "6.14.13",
8073
+ "resolved": "https://registry.npmjs.org/npm/-/npm-6.14.13.tgz",
8074
+ "integrity": "sha512-SRl4jJi0EBHY2xKuu98FLRMo3VhYQSA6otyLnjSEiHoSG/9shXCFNJy9tivpUJvtkN9s6VDdItHa5Rn+fNBzag==",
8075
8075
  "bundleDependencies": [
8076
8076
  "abbrev",
8077
8077
  "ansicolors",
@@ -8460,7 +8460,7 @@
8460
8460
  "glob": "^7.1.6",
8461
8461
  "graceful-fs": "^4.2.4",
8462
8462
  "has-unicode": "~2.0.1",
8463
- "hosted-git-info": "^2.8.8",
8463
+ "hosted-git-info": "^2.8.9",
8464
8464
  "iferr": "^1.0.2",
8465
8465
  "imurmurhash": "*",
8466
8466
  "infer-owner": "^1.0.4",
@@ -8537,7 +8537,7 @@
8537
8537
  "slide": "~1.1.6",
8538
8538
  "sorted-object": "~2.0.1",
8539
8539
  "sorted-union-stream": "~2.1.3",
8540
- "ssri": "^6.0.1",
8540
+ "ssri": "^6.0.2",
8541
8541
  "stringify-package": "^1.0.1",
8542
8542
  "tar": "^4.4.13",
8543
8543
  "text-table": "~0.2.0",
@@ -9994,7 +9994,7 @@
9994
9994
  "license": "ISC"
9995
9995
  },
9996
9996
  "node_modules/npm/node_modules/hosted-git-info": {
9997
- "version": "2.8.8",
9997
+ "version": "2.8.9",
9998
9998
  "inBundle": true,
9999
9999
  "license": "ISC"
10000
10000
  },
@@ -11853,7 +11853,7 @@
11853
11853
  }
11854
11854
  },
11855
11855
  "node_modules/npm/node_modules/ssri": {
11856
- "version": "6.0.1",
11856
+ "version": "6.0.2",
11857
11857
  "inBundle": true,
11858
11858
  "license": "ISC",
11859
11859
  "dependencies": {
@@ -18891,9 +18891,9 @@
18891
18891
  }
18892
18892
  },
18893
18893
  "eslint": {
18894
- "version": "7.23.0",
18895
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz",
18896
- "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==",
18894
+ "version": "7.24.0",
18895
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz",
18896
+ "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==",
18897
18897
  "dev": true,
18898
18898
  "requires": {
18899
18899
  "@babel/code-frame": "7.12.11",
@@ -19026,9 +19026,9 @@
19026
19026
  }
19027
19027
  },
19028
19028
  "eslint-config-prettier": {
19029
- "version": "8.1.0",
19030
- "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz",
19031
- "integrity": "sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==",
19029
+ "version": "8.2.0",
19030
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.2.0.tgz",
19031
+ "integrity": "sha512-dWV9EVeSo2qodOPi1iBYU/x6F6diHv8uujxbxr77xExs3zTAlNXvVZKiyLsQGNz7yPV2K49JY5WjPzNIuDc2Bw==",
19032
19032
  "dev": true,
19033
19033
  "requires": {}
19034
19034
  },
@@ -22425,9 +22425,9 @@
22425
22425
  }
22426
22426
  },
22427
22427
  "npm": {
22428
- "version": "6.14.12",
22429
- "resolved": "https://registry.npmjs.org/npm/-/npm-6.14.12.tgz",
22430
- "integrity": "sha512-La0TNNm1TLYaSeOyit+p3xGTRYYRsHae6/RG69MVXurZsWna9jccPP7FOi/u7V9WdiCV5OOojrfMD+WstO5MZQ==",
22428
+ "version": "6.14.13",
22429
+ "resolved": "https://registry.npmjs.org/npm/-/npm-6.14.13.tgz",
22430
+ "integrity": "sha512-SRl4jJi0EBHY2xKuu98FLRMo3VhYQSA6otyLnjSEiHoSG/9shXCFNJy9tivpUJvtkN9s6VDdItHa5Rn+fNBzag==",
22431
22431
  "requires": {
22432
22432
  "abbrev": "~1.1.1",
22433
22433
  "ansicolors": "~0.3.2",
@@ -22459,7 +22459,7 @@
22459
22459
  "glob": "^7.1.6",
22460
22460
  "graceful-fs": "^4.2.4",
22461
22461
  "has-unicode": "~2.0.1",
22462
- "hosted-git-info": "^2.8.8",
22462
+ "hosted-git-info": "^2.8.9",
22463
22463
  "iferr": "^1.0.2",
22464
22464
  "imurmurhash": "*",
22465
22465
  "infer-owner": "^1.0.4",
@@ -22536,7 +22536,7 @@
22536
22536
  "slide": "~1.1.6",
22537
22537
  "sorted-object": "~2.0.1",
22538
22538
  "sorted-union-stream": "~2.1.3",
22539
- "ssri": "^6.0.1",
22539
+ "ssri": "^6.0.2",
22540
22540
  "stringify-package": "^1.0.1",
22541
22541
  "tar": "^4.4.13",
22542
22542
  "text-table": "~0.2.0",
@@ -23576,7 +23576,7 @@
23576
23576
  "bundled": true
23577
23577
  },
23578
23578
  "hosted-git-info": {
23579
- "version": "2.8.8",
23579
+ "version": "2.8.9",
23580
23580
  "bundled": true
23581
23581
  },
23582
23582
  "http-cache-semantics": {
@@ -24980,7 +24980,7 @@
24980
24980
  }
24981
24981
  },
24982
24982
  "ssri": {
24983
- "version": "6.0.1",
24983
+ "version": "6.0.2",
24984
24984
  "bundled": true,
24985
24985
  "requires": {
24986
24986
  "figgy-pudding": "^3.5.1"
data/helpers/package.json CHANGED
@@ -12,12 +12,12 @@
12
12
  "@dependabot/yarn-lib": "^1.21.1",
13
13
  "@npmcli/arborist": "^2.3.0",
14
14
  "detect-indent": "^6.0.0",
15
- "npm": "6.14.12",
15
+ "npm": "6.14.13",
16
16
  "semver": "^7.3.4"
17
17
  },
18
18
  "devDependencies": {
19
- "eslint": "^7.23.0",
20
- "eslint-config-prettier": "^8.1.0",
19
+ "eslint": "^7.24.0",
20
+ "eslint-config-prettier": "^8.2.0",
21
21
  "jest": "^26.6.3",
22
22
  "prettier": "^2.2.1",
23
23
  "rimraf": "^3.0.2"
@@ -252,10 +252,9 @@ module Dependabot
252
252
 
253
253
  return unless resolved_url
254
254
  return unless resolved_url.start_with?("http")
255
- return if CENTRAL_REGISTRIES.any? { |u| resolved_url.start_with?(u) }
256
255
  return if resolved_url.match?(/(?<!pkg\.)github/)
257
256
 
258
- private_registry_source_for(resolved_url, name)
257
+ registry_source_for(resolved_url, name)
259
258
  end
260
259
 
261
260
  def requirement_for(requirement)
@@ -287,7 +286,7 @@ module Dependabot
287
286
  }
288
287
  end
289
288
 
290
- def private_registry_source_for(resolved_url, name)
289
+ def registry_source_for(resolved_url, name)
291
290
  url =
292
291
  if resolved_url.include?("/~/")
293
292
  # Gemfury format
@@ -305,7 +304,7 @@ module Dependabot
305
304
  else resolved_url.split("/")[0..2].join("/")
306
305
  end
307
306
 
308
- { type: "private_registry", url: url }
307
+ { type: "registry", url: url }
309
308
  end
310
309
 
311
310
  def url_for_relevant_cred(resolved_url)
@@ -39,7 +39,7 @@ module Dependabot
39
39
 
40
40
  case source_type
41
41
  when "git" then find_source_from_git_url
42
- when "private_registry" then find_source_from_registry
42
+ when "registry" then find_source_from_registry
43
43
  else raise "Unexpected source type: #{source_type}"
44
44
  end
45
45
  end
@@ -45,9 +45,9 @@ module Dependabot
45
45
  end
46
46
 
47
47
  def initialize(*requirements)
48
- requirements = requirements.flatten.flat_map do |req_string|
49
- convert_js_constraint_to_ruby_constraint(req_string)
50
- end
48
+ requirements = requirements.flatten.
49
+ flat_map { |req_string| req_string.split(",").map(&:strip) }.
50
+ flat_map { |req_string| convert_js_constraint_to_ruby_constraint(req_string) }
51
51
 
52
52
  super(requirements)
53
53
  end
@@ -106,7 +106,7 @@ module Dependabot
106
106
 
107
107
  def filter_ignored_versions(versions_array)
108
108
  filtered = versions_array.reject do |v, _|
109
- ignore_reqs.any? { |r| r.satisfied_by?(v) }
109
+ ignore_requirements.any? { |r| r.satisfied_by?(v) }
110
110
  end
111
111
 
112
112
  raise AllVersionsIgnored if @raise_on_ignored && filtered.empty? && versions_array.any?
@@ -201,7 +201,7 @@ module Dependabot
201
201
  return false if related_to_current_pre?(ver) ^ ver.prerelease?
202
202
  return false if current_version_greater_than?(ver)
203
203
  return false if current_requirement_greater_than?(ver)
204
- return false if ignore_reqs.any? { |r| r.satisfied_by?(ver) }
204
+ return false if ignore_requirements.any? { |r| r.satisfied_by?(ver) }
205
205
  return false if yanked?(ver)
206
206
 
207
207
  true
@@ -388,8 +388,8 @@ module Dependabot
388
388
  )
389
389
  end
390
390
 
391
- def ignore_reqs
392
- ignored_versions.map { |req| requirement_class.new(req.split(",")) }
391
+ def ignore_requirements
392
+ ignored_versions.flat_map { |req| requirement_class.requirements_array(req) }
393
393
  end
394
394
 
395
395
  def version_class
@@ -62,8 +62,8 @@ module Dependabot
62
62
 
63
63
  def registry_url
64
64
  protocol =
65
- if private_registry_source_url
66
- private_registry_source_url.split("://").first
65
+ if registry_source_url
66
+ registry_source_url.split("://").first
67
67
  else
68
68
  "https"
69
69
  end
@@ -92,10 +92,10 @@ module Dependabot
92
92
  end
93
93
 
94
94
  def locked_registry
95
- return unless private_registry_source_url
95
+ return unless registry_source_url
96
96
 
97
97
  lockfile_registry =
98
- private_registry_source_url.
98
+ registry_source_url.
99
99
  gsub("https://", "").
100
100
  gsub("http://", "")
101
101
  detailed_registry =
@@ -210,7 +210,7 @@ module Dependabot
210
210
  dependency.name.gsub("/", "%2F")
211
211
  end
212
212
 
213
- def private_registry_source_url
213
+ def registry_source_url
214
214
  sources = dependency.requirements.
215
215
  map { |r| r.fetch(:source) }.uniq.compact
216
216
 
@@ -218,8 +218,8 @@ module Dependabot
218
218
  # it's unclear how we should proceed
219
219
  raise "Multiple sources! #{sources.join(', ')}" if sources.map { |s| [s[:type], s[:url]] }.uniq.count > 1
220
220
 
221
- # Otherwise we just take the URL of the first private registry
222
- sources.find { |s| s[:type] == "private_registry" }&.fetch(:url)
221
+ # Otherwise we just take the URL of the first registry
222
+ sources.find { |s| s[:type] == "registry" }&.fetch(:url)
223
223
  end
224
224
  end
225
225
  end
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.140.3
4
+ version: 0.143.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-12 00:00:00.000000000 Z
11
+ date: 2021-04-21 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.140.3
19
+ version: 0.143.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.140.3
26
+ version: 0.143.0
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: 1.12.0
103
+ version: 1.13.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: 1.12.0
110
+ version: 1.13.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -284,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
284
  - !ruby/object:Gem::Version
285
285
  version: 2.5.0
286
286
  requirements: []
287
- rubygems_version: 3.2.3
287
+ rubygems_version: 3.2.15
288
288
  signing_key:
289
289
  specification_version: 4
290
290
  summary: JS support for dependabot