dependabot-bun 0.397.0 → 0.399.0
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/package-lock.json +46 -40
- data/lib/dependabot/bun/constraint_helper.rb +29 -4
- data/lib/dependabot/bun/requirement.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d59bf33354551f9161677330979c54091111a200a40fca829414ef1a248dee2e
|
|
4
|
+
data.tar.gz: 9242abc5d378aa15d36df47f5e2e6affdc746488b1fa9f7dee8b37a1cdd67c25
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c53fd5237fb74ca862b33716177c4a151f8eafcd44471d174c93a003bd511669536198d03513bc61316e880d288d2c5eb00c769fe5633f4cadd21df8e5438cb
|
|
7
|
+
data.tar.gz: c9fb0790b0f0945e034fa514a7c02344bfd58ee7f410e4e90cf3d4c3186320556883edae4fc76ca0b4ea321e24879360256ebf7c89e91c80861f9ed7f36610b8
|
data/helpers/package-lock.json
CHANGED
|
@@ -889,38 +889,41 @@
|
|
|
889
889
|
}
|
|
890
890
|
},
|
|
891
891
|
"node_modules/@humanfs/core": {
|
|
892
|
-
"version": "0.19.
|
|
893
|
-
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.
|
|
894
|
-
"integrity": "sha512-
|
|
892
|
+
"version": "0.19.2",
|
|
893
|
+
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz",
|
|
894
|
+
"integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==",
|
|
895
895
|
"dev": true,
|
|
896
|
+
"license": "Apache-2.0",
|
|
897
|
+
"dependencies": {
|
|
898
|
+
"@humanfs/types": "^0.15.0"
|
|
899
|
+
},
|
|
896
900
|
"engines": {
|
|
897
901
|
"node": ">=18.18.0"
|
|
898
902
|
}
|
|
899
903
|
},
|
|
900
904
|
"node_modules/@humanfs/node": {
|
|
901
|
-
"version": "0.16.
|
|
902
|
-
"resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.
|
|
903
|
-
"integrity": "sha512-
|
|
905
|
+
"version": "0.16.8",
|
|
906
|
+
"resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz",
|
|
907
|
+
"integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==",
|
|
904
908
|
"dev": true,
|
|
909
|
+
"license": "Apache-2.0",
|
|
905
910
|
"dependencies": {
|
|
906
|
-
"@humanfs/core": "^0.19.
|
|
907
|
-
"@
|
|
911
|
+
"@humanfs/core": "^0.19.2",
|
|
912
|
+
"@humanfs/types": "^0.15.0",
|
|
913
|
+
"@humanwhocodes/retry": "^0.4.0"
|
|
908
914
|
},
|
|
909
915
|
"engines": {
|
|
910
916
|
"node": ">=18.18.0"
|
|
911
917
|
}
|
|
912
918
|
},
|
|
913
|
-
"node_modules/@humanfs/
|
|
914
|
-
"version": "0.
|
|
915
|
-
"resolved": "https://registry.npmjs.org/@
|
|
916
|
-
"integrity": "sha512-
|
|
919
|
+
"node_modules/@humanfs/types": {
|
|
920
|
+
"version": "0.15.0",
|
|
921
|
+
"resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz",
|
|
922
|
+
"integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==",
|
|
917
923
|
"dev": true,
|
|
924
|
+
"license": "Apache-2.0",
|
|
918
925
|
"engines": {
|
|
919
|
-
"node": ">=18.18"
|
|
920
|
-
},
|
|
921
|
-
"funding": {
|
|
922
|
-
"type": "github",
|
|
923
|
-
"url": "https://github.com/sponsors/nzakas"
|
|
926
|
+
"node": ">=18.18.0"
|
|
924
927
|
}
|
|
925
928
|
},
|
|
926
929
|
"node_modules/@humanwhocodes/module-importer": {
|
|
@@ -6018,9 +6021,10 @@
|
|
|
6018
6021
|
}
|
|
6019
6022
|
},
|
|
6020
6023
|
"node_modules/ip-address": {
|
|
6021
|
-
"version": "10.
|
|
6022
|
-
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.
|
|
6023
|
-
"integrity": "sha512-
|
|
6024
|
+
"version": "10.7.2",
|
|
6025
|
+
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.2.tgz",
|
|
6026
|
+
"integrity": "sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==",
|
|
6027
|
+
"license": "MIT",
|
|
6024
6028
|
"engines": {
|
|
6025
6029
|
"node": ">= 12"
|
|
6026
6030
|
}
|
|
@@ -17047,29 +17051,31 @@
|
|
|
17047
17051
|
}
|
|
17048
17052
|
},
|
|
17049
17053
|
"@humanfs/core": {
|
|
17050
|
-
"version": "0.19.
|
|
17051
|
-
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.
|
|
17052
|
-
"integrity": "sha512-
|
|
17053
|
-
"dev": true
|
|
17054
|
+
"version": "0.19.2",
|
|
17055
|
+
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz",
|
|
17056
|
+
"integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==",
|
|
17057
|
+
"dev": true,
|
|
17058
|
+
"requires": {
|
|
17059
|
+
"@humanfs/types": "^0.15.0"
|
|
17060
|
+
}
|
|
17054
17061
|
},
|
|
17055
17062
|
"@humanfs/node": {
|
|
17056
|
-
"version": "0.16.
|
|
17057
|
-
"resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.
|
|
17058
|
-
"integrity": "sha512-
|
|
17063
|
+
"version": "0.16.8",
|
|
17064
|
+
"resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz",
|
|
17065
|
+
"integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==",
|
|
17059
17066
|
"dev": true,
|
|
17060
17067
|
"requires": {
|
|
17061
|
-
"@humanfs/core": "^0.19.
|
|
17062
|
-
"@
|
|
17063
|
-
|
|
17064
|
-
"dependencies": {
|
|
17065
|
-
"@humanwhocodes/retry": {
|
|
17066
|
-
"version": "0.3.1",
|
|
17067
|
-
"resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz",
|
|
17068
|
-
"integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==",
|
|
17069
|
-
"dev": true
|
|
17070
|
-
}
|
|
17068
|
+
"@humanfs/core": "^0.19.2",
|
|
17069
|
+
"@humanfs/types": "^0.15.0",
|
|
17070
|
+
"@humanwhocodes/retry": "^0.4.0"
|
|
17071
17071
|
}
|
|
17072
17072
|
},
|
|
17073
|
+
"@humanfs/types": {
|
|
17074
|
+
"version": "0.15.0",
|
|
17075
|
+
"resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz",
|
|
17076
|
+
"integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==",
|
|
17077
|
+
"dev": true
|
|
17078
|
+
},
|
|
17073
17079
|
"@humanwhocodes/module-importer": {
|
|
17074
17080
|
"version": "1.0.1",
|
|
17075
17081
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
|
|
@@ -20860,9 +20866,9 @@
|
|
|
20860
20866
|
}
|
|
20861
20867
|
},
|
|
20862
20868
|
"ip-address": {
|
|
20863
|
-
"version": "10.
|
|
20864
|
-
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.
|
|
20865
|
-
"integrity": "sha512-
|
|
20869
|
+
"version": "10.7.2",
|
|
20870
|
+
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.2.tgz",
|
|
20871
|
+
"integrity": "sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w=="
|
|
20866
20872
|
},
|
|
20867
20873
|
"is-arguments": {
|
|
20868
20874
|
"version": "1.1.0",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
require "sorbet-runtime"
|
|
5
|
+
require "dependabot/bun/requirement"
|
|
5
6
|
|
|
6
7
|
module Dependabot
|
|
7
8
|
module Bun
|
|
@@ -179,11 +180,35 @@ module Dependabot
|
|
|
179
180
|
def self.find_highest_version_from_constraint_expression(constraint_expression, dependabot_versions = nil)
|
|
180
181
|
parsed_constraints = parse_constraints(constraint_expression, dependabot_versions)
|
|
181
182
|
|
|
182
|
-
return nil
|
|
183
|
+
return nil if parsed_constraints.nil? || parsed_constraints.empty?
|
|
184
|
+
|
|
185
|
+
parsed_versions = parsed_constraints.filter_map { |parsed| parsed[:version] }
|
|
186
|
+
parsed_versions = parsed_versions.map { |version| Version.new(version) }
|
|
187
|
+
candidates = T.let(parsed_versions + (dependabot_versions || []), T::Array[Dependabot::Version])
|
|
183
188
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
189
|
+
return candidates.max&.to_s if unconstrained_expression?(constraint_expression)
|
|
190
|
+
|
|
191
|
+
matching_versions_for(constraint_expression, candidates).max&.to_s
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
sig do
|
|
195
|
+
params(
|
|
196
|
+
constraint_expression: T.nilable(String),
|
|
197
|
+
candidates: T::Array[Dependabot::Version]
|
|
198
|
+
).returns(T::Array[Dependabot::Version])
|
|
199
|
+
end
|
|
200
|
+
def self.matching_versions_for(constraint_expression, candidates)
|
|
201
|
+
requirements = Requirement.requirements_array(constraint_expression)
|
|
202
|
+
candidates.select do |version|
|
|
203
|
+
requirements.any? { |requirement| requirement.satisfied_by?(version) }
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
sig { params(constraint_expression: T.nilable(String)).returns(T::Boolean) }
|
|
208
|
+
def self.unconstrained_expression?(constraint_expression)
|
|
209
|
+
constraint_expression.to_s.split("||").map(&:strip).any? do |group|
|
|
210
|
+
SEMVER_CONSTANTS.include?(group)
|
|
211
|
+
end
|
|
187
212
|
end
|
|
188
213
|
|
|
189
214
|
# Parse all constraints (split by logical OR `||`) and convert to Ruby-compatible constraints.
|
|
@@ -12,7 +12,7 @@ module Dependabot
|
|
|
12
12
|
class Requirement < Dependabot::Requirement
|
|
13
13
|
extend T::Sig
|
|
14
14
|
|
|
15
|
-
AND_SEPARATOR = /(?<=[a-zA-Z0-9*])\s
|
|
15
|
+
AND_SEPARATOR = /(?<=[a-zA-Z0-9*])\s++(?:&++\s++)?(?!\s*+[,|-])/
|
|
16
16
|
OR_SEPARATOR = /(?<=[a-zA-Z0-9*])\s*\|+/
|
|
17
17
|
|
|
18
18
|
# Override the version pattern to allow a 'v' prefix
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dependabot-bun
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.399.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.399.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.399.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: debug
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -355,7 +355,7 @@ licenses:
|
|
|
355
355
|
- MIT
|
|
356
356
|
metadata:
|
|
357
357
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
|
358
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
|
358
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.399.0
|
|
359
359
|
rdoc_options: []
|
|
360
360
|
require_paths:
|
|
361
361
|
- lib
|