diff --git a/CHANGELOG.md b/CHANGELOG.md index aa17d500bb..70fcead8d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,27 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [Unreleased] +## [1.5.0] - 2025-09-12 + +### Added + +- Add `Prism::Translation::ParserCurrent`. +- Add `Integer::to_u32_digits` for the Rust API. +- Add `pm_comment_type_t` field for the Rust API. +- Support leading logical operators for CRuby 3.5+. + +### Changed + +- Mark Prism as ractor-safe. +- Enforce a minimum version for the parser translation layer. +- Many fixes to the parser translation layer. +- Accept a newline after the `defined?` keyword. +- Reject `true && not true`. +- Make `it = it` assign nil to match parse.y behavior [Bug #21139]. +- Some fixes to the ruby parser translation layer. +- Ensure call nodes have the correct ending location. +- Reject `foo && return bar`. + ## [1.4.0] - 2025-03-18 ### Added @@ -649,7 +670,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a - 🎉 Initial release! 🎉 -[unreleased]: https://github.com/ruby/prism/compare/v1.4.0...HEAD +[unreleased]: https://github.com/ruby/prism/compare/v1.5.0...HEAD +[1.5.0]: https://github.com/ruby/prism/compare/v1.4.0...v1.5.0 [1.4.0]: https://github.com/ruby/prism/compare/v1.3.0...v1.4.0 [1.3.0]: https://github.com/ruby/prism/compare/v1.2.0...v1.3.0 [1.2.0]: https://github.com/ruby/prism/compare/v1.1.0...v1.2.0 diff --git a/Gemfile.lock b/Gemfile.lock index d5f084d244..4279f2928b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prism (1.4.0) + prism (1.5.0) GEM remote: https://rubygems.org/ diff --git a/ext/prism/extension.h b/ext/prism/extension.h index 506da2fd6f..f4cb9c438d 100644 --- a/ext/prism/extension.h +++ b/ext/prism/extension.h @@ -1,7 +1,7 @@ #ifndef PRISM_EXT_NODE_H #define PRISM_EXT_NODE_H -#define EXPECTED_PRISM_VERSION "1.4.0" +#define EXPECTED_PRISM_VERSION "1.5.0" #include #include diff --git a/gemfiles/2.7/Gemfile.lock b/gemfiles/2.7/Gemfile.lock index 4e0fad2836..dbca77fc1d 100644 --- a/gemfiles/2.7/Gemfile.lock +++ b/gemfiles/2.7/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.4.0) + prism (1.5.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.0/Gemfile.lock b/gemfiles/3.0/Gemfile.lock index 4ab2703d8f..81e70a2ded 100644 --- a/gemfiles/3.0/Gemfile.lock +++ b/gemfiles/3.0/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.4.0) + prism (1.5.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.1/Gemfile.lock b/gemfiles/3.1/Gemfile.lock index cfac077d43..138eef976e 100644 --- a/gemfiles/3.1/Gemfile.lock +++ b/gemfiles/3.1/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.4.0) + prism (1.5.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.2/Gemfile.lock b/gemfiles/3.2/Gemfile.lock index 7426a7f177..9fb6602c60 100644 --- a/gemfiles/3.2/Gemfile.lock +++ b/gemfiles/3.2/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.4.0) + prism (1.5.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.3/Gemfile.lock b/gemfiles/3.3/Gemfile.lock index 2bff716955..5e04141827 100644 --- a/gemfiles/3.3/Gemfile.lock +++ b/gemfiles/3.3/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.4.0) + prism (1.5.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.4/Gemfile.lock b/gemfiles/3.4/Gemfile.lock index d44f56683c..4092a91ae1 100644 --- a/gemfiles/3.4/Gemfile.lock +++ b/gemfiles/3.4/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.4.0) + prism (1.5.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.5/Gemfile.lock b/gemfiles/3.5/Gemfile.lock index 7644ef668a..88f55dad89 100644 --- a/gemfiles/3.5/Gemfile.lock +++ b/gemfiles/3.5/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.4.0) + prism (1.5.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/jruby/Gemfile.lock b/gemfiles/jruby/Gemfile.lock index dc74ae64f5..8015a5ab54 100644 --- a/gemfiles/jruby/Gemfile.lock +++ b/gemfiles/jruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.4.0) + prism (1.5.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/truffleruby/Gemfile.lock b/gemfiles/truffleruby/Gemfile.lock index b46b447775..de5b39c52d 100644 --- a/gemfiles/truffleruby/Gemfile.lock +++ b/gemfiles/truffleruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.4.0) + prism (1.5.0) GEM remote: https://rubygems.org/ diff --git a/include/prism/version.h b/include/prism/version.h index 0a2a8c8fce..697c7b5ad6 100644 --- a/include/prism/version.h +++ b/include/prism/version.h @@ -14,7 +14,7 @@ /** * The minor version of the Prism library as an int. */ -#define PRISM_VERSION_MINOR 4 +#define PRISM_VERSION_MINOR 5 /** * The patch version of the Prism library as an int. @@ -24,6 +24,6 @@ /** * The version of the Prism library as a constant string. */ -#define PRISM_VERSION "1.4.0" +#define PRISM_VERSION "1.5.0" #endif diff --git a/javascript/package.json b/javascript/package.json index 75c1e78468..5db7c6f312 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@ruby/prism", - "version": "1.4.0", + "version": "1.5.0", "description": "Prism Ruby parser", "type": "module", "main": "src/index.js", diff --git a/prism.gemspec b/prism.gemspec index 4daa511300..74b9971a00 100644 --- a/prism.gemspec +++ b/prism.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "prism" - spec.version = "1.4.0" + spec.version = "1.5.0" spec.authors = ["Shopify"] spec.email = ["ruby@shopify.com"] diff --git a/rust/Cargo.lock b/rust/Cargo.lock index e51c0878e9..91caea4e74 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -224,7 +224,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "ruby-prism" -version = "1.4.0" +version = "1.5.0" dependencies = [ "ruby-prism-sys", "serde", @@ -233,7 +233,7 @@ dependencies = [ [[package]] name = "ruby-prism-sys" -version = "1.4.0" +version = "1.5.0" dependencies = [ "bindgen", "cc", diff --git a/rust/ruby-prism-sys/Cargo.toml b/rust/ruby-prism-sys/Cargo.toml index ae76e11a7e..371e6613ad 100644 --- a/rust/ruby-prism-sys/Cargo.toml +++ b/rust/ruby-prism-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism-sys" -version = "1.4.0" +version = "1.5.0" edition = "2021" license-file = "../../LICENSE.md" repository = "https://github.com/ruby/prism" diff --git a/rust/ruby-prism-sys/tests/utils_tests.rs b/rust/ruby-prism-sys/tests/utils_tests.rs index 8ab12d620c..f25e4cbae5 100644 --- a/rust/ruby-prism-sys/tests/utils_tests.rs +++ b/rust/ruby-prism-sys/tests/utils_tests.rs @@ -12,7 +12,7 @@ fn version_test() { CStr::from_ptr(version) }; - assert_eq!(&cstring.to_string_lossy(), "1.4.0"); + assert_eq!(&cstring.to_string_lossy(), "1.5.0"); } #[test] diff --git a/rust/ruby-prism/Cargo.toml b/rust/ruby-prism/Cargo.toml index 4ef5d0f4b1..3c20917f4a 100644 --- a/rust/ruby-prism/Cargo.toml +++ b/rust/ruby-prism/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism" -version = "1.4.0" +version = "1.5.0" edition = "2021" license-file = "../../LICENSE.md" repository = "https://github.com/ruby/prism" @@ -26,7 +26,7 @@ serde = { version = "1.0", features = ["derive"] } serde_yaml = "0.9" [dependencies] -ruby-prism-sys = { version = "1.4.0", path = "../ruby-prism-sys" } +ruby-prism-sys = { version = "1.5.0", path = "../ruby-prism-sys" } [features] default = ["vendored"] diff --git a/templates/java/org/prism/Loader.java.erb b/templates/java/org/prism/Loader.java.erb index 629c8bbb8c..3109feba18 100644 --- a/templates/java/org/prism/Loader.java.erb +++ b/templates/java/org/prism/Loader.java.erb @@ -101,7 +101,7 @@ public class Loader { expect((byte) 'M', "incorrect prism header"); expect((byte) 1, "prism major version does not match"); - expect((byte) 4, "prism minor version does not match"); + expect((byte) 5, "prism minor version does not match"); expect((byte) 0, "prism patch version does not match"); expect((byte) 1, "Loader.java requires no location fields in the serialized output"); diff --git a/templates/javascript/src/deserialize.js.erb b/templates/javascript/src/deserialize.js.erb index 643dd0dab5..1559dfa2e3 100644 --- a/templates/javascript/src/deserialize.js.erb +++ b/templates/javascript/src/deserialize.js.erb @@ -1,7 +1,7 @@ import * as nodes from "./nodes.js"; const MAJOR_VERSION = 1; -const MINOR_VERSION = 4; +const MINOR_VERSION = 5; const PATCH_VERSION = 0; // The DataView getFloat64 function takes an optional second argument that diff --git a/templates/lib/prism/serialize.rb.erb b/templates/lib/prism/serialize.rb.erb index 104b60f484..a5909e15bb 100644 --- a/templates/lib/prism/serialize.rb.erb +++ b/templates/lib/prism/serialize.rb.erb @@ -10,7 +10,7 @@ module Prism # The minor version of prism that we are expecting to find in the serialized # strings. - MINOR_VERSION = 4 + MINOR_VERSION = 5 # The patch version of prism that we are expecting to find in the serialized # strings.