diff --git a/Gemfile.lock b/Gemfile.lock index 7be4a9f0f..2496dc8ff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,6 +9,7 @@ PATH constant_resolver (>= 0.2.0) parallel parser + parser-prism sorbet-runtime (>= 0.5.9914) zeitwerk (>= 2.6.1) @@ -60,15 +61,11 @@ GEM method_source (>= 0.6.7) rake (>= 0.9.2.2) method_source (1.0.0) - mini_portile2 (2.8.4) minitest (5.16.2) minitest-focus (1.3.1) minitest (>= 4, < 6) mocha (1.14.0) netrc (0.11.0) - nokogiri (1.15.3) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) nokogiri (1.15.3-x86_64-darwin) racc (~> 1.4) nokogiri (1.15.3-x86_64-linux) @@ -76,7 +73,11 @@ GEM parallel (1.22.1) parser (3.2.2.0) ast (~> 2.4.1) + parser-prism (0.1.0) + parser + prism prettier_print (0.1.0) + prism (0.20.0) pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) @@ -179,7 +180,6 @@ GEM zeitwerk (2.6.4) PLATFORMS - ruby x86_64-darwin x86_64-darwin-20 x86_64-linux diff --git a/lib/packwerk/parsers/ruby.rb b/lib/packwerk/parsers/ruby.rb index b218e20c2..1c0998840 100644 --- a/lib/packwerk/parsers/ruby.rb +++ b/lib/packwerk/parsers/ruby.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "parser" -require "parser/current" +require "parser/prism" module Packwerk module Parsers @@ -11,7 +11,7 @@ class Ruby include ParserInterface - class RaiseExceptionsParser < Parser::CurrentRuby + class RaiseExceptionsParser < Parser::Prism extend T::Sig sig { params(builder: T.untyped).void } diff --git a/packwerk.gemspec b/packwerk.gemspec index e1b8edb6e..3ea8f7467 100644 --- a/packwerk.gemspec +++ b/packwerk.gemspec @@ -50,6 +50,7 @@ Gem::Specification.new do |spec| # For Ruby parsing spec.add_dependency("ast") spec.add_dependency("parser") + spec.add_dependency("parser-prism") # For ERB parsing spec.add_dependency("better_html")