From 817a8e39d969dee6640d8e316d990739e4576566 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Thu, 10 Oct 2024 14:28:53 -0400 Subject: [PATCH] Bump to v1.2.0 --- CHANGELOG.md | 18 +++++++++++++++++- Gemfile.lock | 2 +- ext/prism/extension.h | 2 +- gemfiles/2.7/Gemfile.lock | 2 +- gemfiles/3.0/Gemfile.lock | 2 +- gemfiles/3.1/Gemfile.lock | 2 +- gemfiles/3.2/Gemfile.lock | 2 +- gemfiles/3.3/Gemfile.lock | 2 +- gemfiles/3.4/Gemfile.lock | 2 +- gemfiles/jruby/Gemfile.lock | 2 +- gemfiles/truffleruby/Gemfile.lock | 2 +- include/prism/version.h | 4 ++-- javascript/package.json | 2 +- prism.gemspec | 2 +- rust/Cargo.lock | 4 ++-- rust/ruby-prism-sys/Cargo.toml | 2 +- rust/ruby-prism-sys/tests/utils_tests.rs | 2 +- rust/ruby-prism/Cargo.toml | 4 ++-- templates/java/org/prism/Loader.java.erb | 2 +- templates/javascript/src/deserialize.js.erb | 2 +- templates/lib/prism/serialize.rb.erb | 2 +- 21 files changed, 40 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7c13df245..3d198e79b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [Unreleased] +## [1.2.0] - 2024-10-10 + +### Added + +- Introduce `Prism::CodeUnitsCache`. + +### Changed + +- Properly handle lexing global variables that begin with `$-`. +- Properly reject invalid multi writes within parentheses. +- Fix unary `*` binding power. +- Set `contains_keywords` flag for implicit `gets` calls when `-p` is used. +- Properly reject invalid non-associative operator patterns. +- Do not warn about unused variables declared on negative lines. + ## [1.1.0] - 2024-10-02 ### Added @@ -591,7 +606,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.1.0...HEAD +[unreleased]: https://github.com/ruby/prism/compare/v1.2.0...HEAD +[1.2.0]: https://github.com/ruby/prism/compare/v1.1.0...v1.2.0 [1.1.0]: https://github.com/ruby/prism/compare/v1.0.0...v1.1.0 [1.0.0]: https://github.com/ruby/prism/compare/v0.30.0...v1.0.0 [0.30.0]: https://github.com/ruby/prism/compare/v0.29.0...v0.30.0 diff --git a/Gemfile.lock b/Gemfile.lock index 94afd833d2..a4bf9f8ffa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prism (1.1.0) + prism (1.2.0) GEM remote: https://rubygems.org/ diff --git a/ext/prism/extension.h b/ext/prism/extension.h index f3d41462dd..5241f8dc1e 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.1.0" +#define EXPECTED_PRISM_VERSION "1.2.0" #include #include diff --git a/gemfiles/2.7/Gemfile.lock b/gemfiles/2.7/Gemfile.lock index f0affb1961..8a781b0298 100644 --- a/gemfiles/2.7/Gemfile.lock +++ b/gemfiles/2.7/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.1.0) + prism (1.2.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.0/Gemfile.lock b/gemfiles/3.0/Gemfile.lock index 4d65d2fffd..2e4832cf31 100644 --- a/gemfiles/3.0/Gemfile.lock +++ b/gemfiles/3.0/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.1.0) + prism (1.2.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.1/Gemfile.lock b/gemfiles/3.1/Gemfile.lock index c2716a5efd..1b46ad7004 100644 --- a/gemfiles/3.1/Gemfile.lock +++ b/gemfiles/3.1/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.1.0) + prism (1.2.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.2/Gemfile.lock b/gemfiles/3.2/Gemfile.lock index e548d4288a..cb86aa3062 100644 --- a/gemfiles/3.2/Gemfile.lock +++ b/gemfiles/3.2/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.1.0) + prism (1.2.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.3/Gemfile.lock b/gemfiles/3.3/Gemfile.lock index 6748849c3b..59feebfe9c 100644 --- a/gemfiles/3.3/Gemfile.lock +++ b/gemfiles/3.3/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.1.0) + prism (1.2.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.4/Gemfile.lock b/gemfiles/3.4/Gemfile.lock index 9b4fe386d7..ed27cb31ce 100644 --- a/gemfiles/3.4/Gemfile.lock +++ b/gemfiles/3.4/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.1.0) + prism (1.2.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/jruby/Gemfile.lock b/gemfiles/jruby/Gemfile.lock index 2ef9948e49..0435e9328f 100644 --- a/gemfiles/jruby/Gemfile.lock +++ b/gemfiles/jruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.1.0) + prism (1.2.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/truffleruby/Gemfile.lock b/gemfiles/truffleruby/Gemfile.lock index 05a6af5f69..2ccb7db588 100644 --- a/gemfiles/truffleruby/Gemfile.lock +++ b/gemfiles/truffleruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.1.0) + prism (1.2.0) GEM remote: https://rubygems.org/ diff --git a/include/prism/version.h b/include/prism/version.h index a75cb4646d..e3fd9308cd 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 1 +#define PRISM_VERSION_MINOR 2 /** * 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.1.0" +#define PRISM_VERSION "1.2.0" #endif diff --git a/javascript/package.json b/javascript/package.json index d2a5e251a1..3f2c36943f 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@ruby/prism", - "version": "1.1.0", + "version": "1.2.0", "description": "Prism Ruby parser", "type": "module", "main": "src/index.js", diff --git a/prism.gemspec b/prism.gemspec index f63d38fb41..1a0547f5bc 100644 --- a/prism.gemspec +++ b/prism.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "prism" - spec.version = "1.1.0" + spec.version = "1.2.0" spec.authors = ["Shopify"] spec.email = ["ruby@shopify.com"] diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 1284f4baad..f115b3be1a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -267,7 +267,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "ruby-prism" -version = "1.1.0" +version = "1.2.0" dependencies = [ "ruby-prism-sys", "serde", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "ruby-prism-sys" -version = "1.1.0" +version = "1.2.0" dependencies = [ "bindgen", "cc", diff --git a/rust/ruby-prism-sys/Cargo.toml b/rust/ruby-prism-sys/Cargo.toml index d74a96cc25..264dc6e5ca 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.1.0" +version = "1.2.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 5fc1e3dfda..3a75068579 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.1.0"); + assert_eq!(&cstring.to_string_lossy(), "1.2.0"); } #[test] diff --git a/rust/ruby-prism/Cargo.toml b/rust/ruby-prism/Cargo.toml index 3c81a7c9bb..d3497dec3d 100644 --- a/rust/ruby-prism/Cargo.toml +++ b/rust/ruby-prism/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism" -version = "1.1.0" +version = "1.2.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.1.0", path = "../ruby-prism-sys" } +ruby-prism-sys = { version = "1.2.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 2cb75d41ea..032cf017c2 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) 1, "prism minor version does not match"); + expect((byte) 2, "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 5ace6d08e9..36f5c8fc7c 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 = 1; +const MINOR_VERSION = 2; 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 448135efec..3750fdaa7b 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 = 1 + MINOR_VERSION = 2 # The patch version of prism that we are expecting to find in the serialized # strings.