Skip to content

Commit

Permalink
Merge pull request #18725 from Homebrew/dependabot/bundler/Library/Ho…
Browse files Browse the repository at this point in the history
…mebrew/json-2.8.1

build(deps-dev): bump json from 2.7.6 to 2.8.1 in /Library/Homebrew
  • Loading branch information
MikeMcQuaid authored Nov 8, 2024
2 parents 7681fba + ba3f426 commit f119d2e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GEM
bindata (~> 2)
erubi (1.13.0)
hana (1.3.7)
json (2.7.6)
json (2.8.1)
json_schemer (2.3.0)
bigdecimal
hana (~> 1.3)
Expand Down
14 changes: 6 additions & 8 deletions Library/Homebrew/cmd/outdated.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ def run
end

json = {
"formulae" => json_info(formulae),
"casks" => json_info(casks),
formulae: json_info(formulae),
casks: json_info(casks),
}
puts JSON.pretty_generate(json)
# json v2.8.1 is inconsistent it how it renders empty arrays,
# so we use `[]` for consistency:
puts JSON.pretty_generate(json).gsub(/\[\n\n\s*\]/, "[]")

outdated = formulae + casks

else
outdated = if args.formula?
outdated_formulae
Expand Down Expand Up @@ -170,10 +171,7 @@ def json_version(version)
"v1" => :v1,
"v2" => :v2,
}

raise UsageError, "invalid JSON version: #{version}" unless version_hash.include?(version)

version_hash[version]
version_hash.fetch(version) { raise UsageError, "invalid JSON version: #{version}" }
end

sig { returns(T::Array[Formula]) }
Expand Down
4 changes: 1 addition & 3 deletions Library/Homebrew/test/support/fixtures/cask/everything.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"token": "everything",
"full_token": "everything",
"old_tokens": [

],
"old_tokens": [],
"tap": "homebrew/cask",
"name": [
"Everything"
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/vendor/bundle/bundler/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def self.extension_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.3.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/erubi-1.13.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/hana-1.3.7/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/json-2.7.6")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/json-2.7.6/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/json-2.8.1")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/json-2.8.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/regexp_parser-2.9.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simpleidn-0.2.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/json_schemer-2.3.0/lib")
Expand Down

0 comments on commit f119d2e

Please sign in to comment.