Skip to content

Bump @ruby/prism from 1.9.0 to 2.1.0 in /javascript/packages/linter - #2847

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/javascript/packages/linter/ruby/prism-2.0.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/javascript/packages/linter/ruby/prism-2.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Bumps @ruby/prism from 1.9.0 to 2.1.0.

Release notes

Sourced from @​ruby/prism's releases.

v2.1.0

Added

  • Add Version::CRuby4_0 to the Rust bindings. Version::CRuby3_5 remains available but is deprecated in favor of the new name; both select Ruby 4.0 syntax.
  • Let embedders set the allocation size for the first block allocated in an arena via PM_ARENA_INITIAL_SIZE.
  • Let embedders set the minimum initial size for the constant pool via PM_CONSTANT_POOL_MIN_CAPACITY.

v2.0.0

Highlights

  • Significant performance and memory usage improvements.
  • Precompiled platform-specific variants on rubygems.org.
  • Many documentation improvements, including a new playground.
  • Prism now ships accurate and complete RBS and RBI definitions.
  • The license is now owned by the Ruby developers.
  • Prism now ships an official C++ interface.

Added

  • Support for parsing Ruby 4.1 syntax:
    • Add support for &nil to declare that a method accepts no block.
    • Thoroughly implement void value expression check.
    • Allow trailing commas in method signatures like def foo(a,); end.
    • Reject END { break } and END { next }.
    • a /b/ no longer warns about ambiguous /.
  • version: "nearest" is now supported. It behaves similarly to version: "current" but will not raise when the version is unsupported, instead falling back to the nearest syntax version prism currently supports.
  • raise_error was added as a valid option. Prism will raise a SyntaxError when given syntax-invalid code. When true is given, prism decides the formatting (tty?, NO_COLOR, etc.). If you need a specific style, :plain, :style, and :color are also supported values.
  • Added Prism::ParseResult#continuable to check if the parsed source can become valid by appending more code.
  • Prism.find takes a Method, UnboundMethod, Proc, or Thread::Backtrace::Location and returns the associated prism AST node.
  • ForwardingSuperNode now has keyword_loc.
  • Allow pattern matching with prism nodes to match on location slices, like node in Prism::StringNode[content: "foo"].
  • Prism.parse_file and similar now accept anything responding to to_path (like Pathname) directly.
  • attach_comments was added as a valid option. Each comment is attached to the node that ends latest on the comment's line before it, otherwise to the innermost node that contains it (or to that node's statements, if only whitespace and comments come between the comment and the statements), otherwise to the top-level statements. The attached comments are available through Node#comments and through pm_node_comments_size and pm_node_comment in the C API, as well as pm_parser_comment_attachment, pm_parser_comment_ranges_size, and pm_parser_comment_range, which expose the attachments grouped by node. When the option is set, the comments on the parse result are sorted by start offset.
  • StringQuery#keyword? was added to check if the string query matches a keyword.
  • Source#checksum was added to retrieve the checksum of the source content.

Changed

Note that for this major version, almost every change listed below is breaking.

  • Prism now defaults to version: "nearest" instead of version: "latest", so code is parsed with the syntax of the running Ruby (or the closest version prism supports). Pass version: "latest" to keep the previous behavior.
  • MissingNode has been replaced by ErrorRecoveryNode. ErrorRecoveryNode wraps unexpected nodes, so when walking syntax-invalid code you will now only need to handle this one specific node type.
  • Some fields were renamed for consistency. Previous names are aliased and will continue to work in the Ruby layer.
    • InNode#{in,then}_loc -> InNode#{in,then}_keyword_loc
    • MatchPredicateNode#operator_loc -> MatchPredicateNode#keyword_loc
    • UnlessNode#keyword_loc -> UnlessNode#unless_keyword_loc
    • UntilNode#{keyword,closing}_loc -> UntilNode#{until,end}_keyword_loc
    • WhenNode#keyword_loc -> WhenNode#when_keyword_loc
    • WhileNode#{keyword,closing}_loc -> WhileNode#{while,end}_keyword_loc
  • Optional locations like StringNode#closing_loc in 'foo that were empty for syntax-invalid code will now be nil instead.

... (truncated)

Changelog

Sourced from @​ruby/prism's changelog.

[2.1.0] - 2026-10-28

Added

  • Add Version::CRuby4_0 to the Rust bindings. Version::CRuby3_5 remains available but is deprecated in favor of the new name; both select Ruby 4.0 syntax.
  • Let embedders set the allocation size for the first block allocated in an arena via PM_ARENA_INITIAL_SIZE.
  • Let embedders set the minimum initial size for the constant pool via PM_CONSTANT_POOL_MIN_CAPACITY.

[2.0.0] - 2026-10-21

Highlights

  • Significant performance and memory usage improvements.
  • Precompiled platform-specific variants on rubygems.org.
  • Many documentation improvements, including a new playground.
  • Prism now ships accurate and complete RBS and RBI definitions.
  • The license is now owned by the Ruby developers.
  • Prism now ships an official C++ interface.

Added

  • Support for parsing Ruby 4.1 syntax:
    • Add support for &nil to declare that a method accepts no block.
    • Thoroughly implement void value expression check.
    • Allow trailing commas in method signatures like def foo(a,); end.
    • Reject END { break } and END { next }.
    • a /b/ no longer warns about ambiguous /.
  • version: "nearest" is now supported. It behaves similarly to version: "current" but will not raise when the version is unsupported, instead falling back to the nearest syntax version prism currently supports.
  • raise_error was added as a valid option. Prism will raise a SyntaxError when given syntax-invalid code. When true is given, prism decides the formatting (tty?, NO_COLOR, etc.). If you need a specific style, :plain, :style, and :color are also supported values.
  • Added Prism::ParseResult#continuable to check if the parsed source can become valid by appending more code.
  • Prism.find takes a Method, UnboundMethod, Proc, or Thread::Backtrace::Location and returns the associated prism AST node.
  • ForwardingSuperNode now has keyword_loc.
  • Allow pattern matching with prism nodes to match on location slices, like node in Prism::StringNode[content: "foo"].
  • Prism.parse_file and similar now accept anything responding to to_path (like Pathname) directly.
  • attach_comments was added as a valid option. Each comment is attached to the node that ends latest on the comment's line before it, otherwise to the innermost node that contains it (or to that node's statements, if only whitespace and comments come between the comment and the statements), otherwise to the top-level statements. The attached comments are available through Node#comments and through pm_node_comments_size and pm_node_comment in the C API, as well as pm_parser_comment_attachment, pm_parser_comment_ranges_size, and pm_parser_comment_range, which expose the attachments grouped by node. When the option is set, the comments on the parse result are sorted by start offset.
  • StringQuery#keyword? was added to check if the string query matches a keyword.
  • Source#checksum was added to retrieve the checksum of the source content.

Changed

Note that for this major version, almost every change listed below is breaking.

  • Prism now defaults to version: "nearest" instead of version: "latest", so code is parsed with the syntax of the running Ruby (or the closest version prism supports). Pass version: "latest" to keep the previous behavior.
  • MissingNode has been replaced by ErrorRecoveryNode. ErrorRecoveryNode wraps unexpected nodes, so when walking syntax-invalid code you will now only need to handle this one specific node type.
  • Some fields were renamed for consistency. Previous names are aliased and will continue to work in the Ruby layer.
    • InNode#{in,then}_loc -> InNode#{in,then}_keyword_loc
    • MatchPredicateNode#operator_loc -> MatchPredicateNode#keyword_loc
    • UnlessNode#keyword_loc -> UnlessNode#unless_keyword_loc
    • UntilNode#{keyword,closing}_loc -> UntilNode#{until,end}_keyword_loc
    • WhenNode#keyword_loc -> WhenNode#when_keyword_loc

... (truncated)

Commits
  • ca15cb3 Bump to v2.1.0
  • f654777 Bump org.apache.maven.plugins:maven-surefire-plugin
  • 841eb2b Move fuzz tests under test
  • 9016780 Move cpp tests under test
  • 19762c9 Test embedded in CI
  • 7ed8c71 Let an embedder set PM_CONSTANT_POOL_MIN_CAPACITY
  • ff42521 Include sys/types.h before inttypes.h again, for newlib
  • f7a062e Let an embedder set PM_ARENA_INITIAL_SIZE
  • 557cffe Avoid vsnprintf when possible
  • 30a2555 Scratch arena
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript JavaScript source across the javascript/ packages labels Oct 24, 2026
@github-actions github-actions Bot added the linter @herb-tools/linter for HTML+ERB templates label Oct 24, 2026
Bumps [@ruby/prism](https://github.com/ruby/prism) from 1.9.0 to 2.1.0.
- [Release notes](https://github.com/ruby/prism/releases)
- [Changelog](https://github.com/ruby/prism/blob/main/CHANGELOG.md)
- [Commits](ruby/prism@v1.9.0...v2.1.0)

---
updated-dependencies:
- dependency-name: "@ruby/prism"
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot changed the title Bump @ruby/prism from 1.9.0 to 2.0.0 in /javascript/packages/linter Bump @ruby/prism from 1.9.0 to 2.1.0 in /javascript/packages/linter Oct 31, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/javascript/packages/linter/ruby/prism-2.0.0 branch from 480d681 to 8a75469 Compare October 31, 2026 19:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript JavaScript source across the javascript/ packages linter @herb-tools/linter for HTML+ERB templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants