Skip to content

Commit

Permalink
Merge pull request #249 from Shopify/vs/upgrade_to_latest_prism
Browse files Browse the repository at this point in the history
Upgrade Prism requirement to v0.17.1
  • Loading branch information
vinistock authored Nov 3, 2023
2 parents a6f1c2d + ae0305a commit 085d4b2
Show file tree
Hide file tree
Showing 5 changed files with 7,562 additions and 12,667 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
rbi (0.1.3)
prism (>= 0.15.1, < 0.17)
prism (>= 0.17.1, < 0.18)
sorbet-runtime (>= 0.5.9204)

GEM
Expand All @@ -27,7 +27,7 @@ GEM
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
prism (0.16.0)
prism (0.17.1)
racc (1.7.1)
rainbow (3.1.1)
rake (13.1.0)
Expand Down
14 changes: 6 additions & 8 deletions lib/rbi/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -606,19 +606,17 @@ def parse_params(node)
end

node.keywords.each do |param|
next unless param.is_a?(Prism::KeywordParameterNode)

value = param.value
params << if value
KwOptParam.new(
case param
when Prism::RequiredKeywordParameterNode
params << KwParam.new(
param.name.to_s.delete_suffix(":"),
node_string!(value),
loc: node_loc(param),
comments: node_comments(param),
)
else
KwParam.new(
when Prism::OptionalKeywordParameterNode
params << KwOptParam.new(
param.name.to_s.delete_suffix(":"),
node_string!(param.value),
loc: node_loc(param),
comments: node_comments(param),
)
Expand Down
2 changes: 1 addition & 1 deletion rbi.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
"Rakefile",
]

spec.add_dependency("prism", ">= 0.15.1", "< 0.17")
spec.add_dependency("prism", ">= 0.17.1", "< 0.18")
spec.add_dependency("sorbet-runtime", ">= 0.5.9204")
end
Loading

0 comments on commit 085d4b2

Please sign in to comment.