Merge pull request #16677 from Homebrew/dependabot/bundler/Library/Homebrew/rbi-0.1.9
This commit is contained in:
commit
4b197b9648
@ -45,15 +45,15 @@ GEM
|
|||||||
elftools (>= 1.2)
|
elftools (>= 1.2)
|
||||||
plist (3.7.1)
|
plist (3.7.1)
|
||||||
prettier_print (1.2.1)
|
prettier_print (1.2.1)
|
||||||
prism (0.21.0)
|
prism (0.24.0)
|
||||||
pry (0.14.2)
|
pry (0.14.2)
|
||||||
coderay (~> 1.1)
|
coderay (~> 1.1)
|
||||||
method_source (~> 1.0)
|
method_source (~> 1.0)
|
||||||
public_suffix (5.0.4)
|
public_suffix (5.0.4)
|
||||||
racc (1.7.3)
|
racc (1.7.3)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
rbi (0.1.8)
|
rbi (0.1.9)
|
||||||
prism (>= 0.18.0, < 0.22)
|
prism (>= 0.18.0, < 0.25)
|
||||||
sorbet-runtime (>= 0.5.9204)
|
sorbet-runtime (>= 0.5.9204)
|
||||||
rdiscount (2.2.7.3)
|
rdiscount (2.2.7.3)
|
||||||
regexp_parser (2.9.0)
|
regexp_parser (2.9.0)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1157,6 +1157,10 @@ class RBI::Node
|
|||||||
sig { params(node: ::RBI::Node).void }
|
sig { params(node: ::RBI::Node).void }
|
||||||
def replace(node); end
|
def replace(node); end
|
||||||
|
|
||||||
|
# source://rbi//lib/rbi/rewriters/filter_versions.rb#94
|
||||||
|
sig { params(version: ::Gem::Version).returns(T::Boolean) }
|
||||||
|
def satisfies_version?(version); end
|
||||||
|
|
||||||
# source://rbi//lib/rbi/printer.rb#162
|
# source://rbi//lib/rbi/printer.rb#162
|
||||||
sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
|
sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
|
||||||
def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
||||||
@ -1192,6 +1196,10 @@ class RBI::NodeWithComments < ::RBI::Node
|
|||||||
# source://rbi//lib/rbi/printer.rb#188
|
# source://rbi//lib/rbi/printer.rb#188
|
||||||
sig { override.returns(T::Boolean) }
|
sig { override.returns(T::Boolean) }
|
||||||
def oneline?; end
|
def oneline?; end
|
||||||
|
|
||||||
|
# source://rbi//lib/rbi/rewriters/filter_versions.rb#104
|
||||||
|
sig { returns(T::Array[::Gem::Requirement]) }
|
||||||
|
def version_requirements; end
|
||||||
end
|
end
|
||||||
|
|
||||||
# source://rbi//lib/rbi/model.rb#601
|
# source://rbi//lib/rbi/model.rb#601
|
||||||
@ -1736,6 +1744,78 @@ class RBI::Rewriters::Deannotate < ::RBI::Visitor
|
|||||||
def deannotate_node(node); end
|
def deannotate_node(node); end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations
|
||||||
|
# in comments. As an example:
|
||||||
|
#
|
||||||
|
# ~~~rb
|
||||||
|
# tree = Parser.parse_string(<<~RBI)
|
||||||
|
# class Foo
|
||||||
|
# # @version > 0.3.0
|
||||||
|
# def bar
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# # @version <= 0.3.0
|
||||||
|
# def bar(arg1)
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# RBI
|
||||||
|
#
|
||||||
|
# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1"))
|
||||||
|
#
|
||||||
|
# assert_equal(<<~RBI, tree.string)
|
||||||
|
# class Foo
|
||||||
|
# # @version > 0.3.0
|
||||||
|
# def bar
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# RBI
|
||||||
|
# ~~~
|
||||||
|
#
|
||||||
|
# Supported operators:
|
||||||
|
# - equals `=`
|
||||||
|
# - not equals `!=`
|
||||||
|
# - greater than `>`
|
||||||
|
# - greater than or equal to `>=`
|
||||||
|
# - less than `<`
|
||||||
|
# - less than or equal to `<=`
|
||||||
|
# - pessimistic or twiddle-wakka`~>`
|
||||||
|
#
|
||||||
|
# And/or logic:
|
||||||
|
# - "And" logic: put multiple versions on the same line
|
||||||
|
# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0
|
||||||
|
# - "Or" logic: put multiple versions on subsequent lines
|
||||||
|
# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0
|
||||||
|
# ```
|
||||||
|
# # @version < 0.3.0
|
||||||
|
# # @version > 1.0.0
|
||||||
|
# ```
|
||||||
|
# Prerelease versions:
|
||||||
|
# - Prerelease versions are considered less than their non-prerelease counterparts
|
||||||
|
# - e.g. `0.4.0-prerelease` is less than `0.4.0`
|
||||||
|
#
|
||||||
|
# RBI with no versions:
|
||||||
|
# - RBI with no version annotations are automatically counted towards ALL versions
|
||||||
|
#
|
||||||
|
# source://rbi//lib/rbi/rewriters/filter_versions.rb#57
|
||||||
|
class RBI::Rewriters::FilterVersions < ::RBI::Visitor
|
||||||
|
# source://rbi//lib/rbi/rewriters/filter_versions.rb#73
|
||||||
|
sig { params(version: ::Gem::Version).void }
|
||||||
|
def initialize(version); end
|
||||||
|
|
||||||
|
# source://rbi//lib/rbi/rewriters/filter_versions.rb#79
|
||||||
|
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
||||||
|
def visit(node); end
|
||||||
|
|
||||||
|
class << self
|
||||||
|
# source://rbi//lib/rbi/rewriters/filter_versions.rb#66
|
||||||
|
sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void }
|
||||||
|
def filter(tree, version); end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# source://rbi//lib/rbi/rewriters/filter_versions.rb#60
|
||||||
|
RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String)
|
||||||
|
|
||||||
# source://rbi//lib/rbi/rewriters/group_nodes.rb#6
|
# source://rbi//lib/rbi/rewriters/group_nodes.rb#6
|
||||||
class RBI::Rewriters::GroupNodes < ::RBI::Visitor
|
class RBI::Rewriters::GroupNodes < ::RBI::Visitor
|
||||||
# source://rbi//lib/rbi/rewriters/group_nodes.rb#10
|
# source://rbi//lib/rbi/rewriters/group_nodes.rb#10
|
||||||
@ -1820,7 +1900,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct
|
|||||||
def to_s; end
|
def to_s; end
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
# source://sorbet-runtime/0.5.11247/lib/types/struct.rb#13
|
# source://sorbet-runtime/0.5.11258/lib/types/struct.rb#13
|
||||||
def inherited(s); end
|
def inherited(s); end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -2037,7 +2117,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
|
|||||||
def to_s; end
|
def to_s; end
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
# source://sorbet-runtime/0.5.11247/lib/types/struct.rb#13
|
# source://sorbet-runtime/0.5.11258/lib/types/struct.rb#13
|
||||||
def inherited(s); end
|
def inherited(s); end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -2738,6 +2818,10 @@ class RBI::Tree < ::RBI::NodeWithComments
|
|||||||
sig { returns(T::Boolean) }
|
sig { returns(T::Boolean) }
|
||||||
def empty?; end
|
def empty?; end
|
||||||
|
|
||||||
|
# source://rbi//lib/rbi/rewriters/filter_versions.rb#118
|
||||||
|
sig { params(version: ::Gem::Version).void }
|
||||||
|
def filter_versions!(version); end
|
||||||
|
|
||||||
# source://rbi//lib/rbi/rewriters/group_nodes.rb#38
|
# source://rbi//lib/rbi/rewriters/group_nodes.rb#38
|
||||||
sig { void }
|
sig { void }
|
||||||
def group_nodes!; end
|
def group_nodes!; end
|
||||||
@ -71,10 +71,10 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
|
|||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.4.0/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.4.0/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.7.1/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.7.1/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/prettier_print-1.2.1/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/prettier_print-1.2.1/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/prism-0.21.0")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/prism-0.24.0")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/prism-0.21.0/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/prism-0.24.0/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/pry-0.14.2/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/pry-0.14.2/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbi-0.1.8/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbi-0.1.9/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/rdiscount-2.2.7.3")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/rdiscount-2.2.7.3")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rdiscount-2.2.7.3/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rdiscount-2.2.7.3/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rexml-3.2.6/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rexml-3.2.6/lib")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user