diff --git a/CHANGELOG.md b/CHANGELOG.md index 948ea76b56..4070ee860c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [Unreleased] +## [1.6.0] - 2025-10-16 + +### Added + +- Add support for passing `"current"` as the version option to `Prism.*` APIs. + +### Changed + +- Remove a compiler warning for a missing unsigned cast for a shift value. + ## [1.5.2] - 2025-10-09 ### Changed @@ -685,7 +695,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.5.2...HEAD +[unreleased]: https://github.com/ruby/prism/compare/v1.6.0...HEAD +[1.6.0]: https://github.com/ruby/prism/compare/v1.5.2...v1.6.0 [1.5.2]: https://github.com/ruby/prism/compare/v1.5.1...v1.5.2 [1.5.1]: https://github.com/ruby/prism/compare/v1.5.0...v1.5.1 [1.5.0]: https://github.com/ruby/prism/compare/v1.4.0...v1.5.0 diff --git a/Gemfile.lock b/Gemfile.lock index fd87e1034e..d9879c8976 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prism (1.5.2) + prism (1.6.0) GEM remote: https://rubygems.org/ @@ -9,7 +9,7 @@ GEM ast (2.4.3) benchmark-ips (2.14.0) date (3.4.1) - erb (5.0.3) + erb (5.1.1) ffi (1.17.2) mini_portile2 (2.8.9) nokogiri (1.18.10) diff --git a/docs/releasing.md b/docs/releasing.md index f6bc69013d..426f5f1132 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -49,6 +49,7 @@ bundle install ```sh for VERSION in "2.7" "3.0" "3.1" "3.2" "3.3" "3.4"; do docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/$VERSION/Gemfile" "ruby:$VERSION" bundle update; done docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/3.5/Gemfile" ruby:3.5.0-preview1 bundle update +docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/jruby/Gemfile" jruby:latest bundle update BUNDLE_GEMFILE=gemfiles/truffleruby/Gemfile chruby-exec truffleruby -- bundle update ``` @@ -73,26 +74,4 @@ git push ## Publishing * Update the GitHub release page with a copy of the latest entry in the `CHANGELOG.md` file. -* Publish the gem to [rubygems.org](rubygems.org). Note that you must have access to the `prism` gem to do this. - -```sh -bundle exec rake release -``` - -* Generate the `wasm` artifact (or download it from GitHub actions and put it in `javascript/src/prism.wasm`). - -```sh -make wasm -``` - -* Publish the JavaScript package to [npmjs.com](npmjs.com). Note that you must have access to the `@ruby/prism` package to do this. - -```sh -npm publish -``` - -* Publish the rust crate to [crates.io](crates.io). Note that you must have access to the `ruby-prism-sys` and `ruby-prism` crates to do this. - -```sh -bundle exec rake cargo:publish:real -``` +* Push a new tag to the GitHub repository, following the `vX.Y.Z` format. diff --git a/ext/prism/extension.h b/ext/prism/extension.h index 1f15b775ff..70017a4ae3 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.5.2" +#define EXPECTED_PRISM_VERSION "1.6.0" #include #include diff --git a/gemfiles/2.7/Gemfile.lock b/gemfiles/2.7/Gemfile.lock index ec55ee7fd6..1b21359158 100644 --- a/gemfiles/2.7/Gemfile.lock +++ b/gemfiles/2.7/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.6.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.0/Gemfile.lock b/gemfiles/3.0/Gemfile.lock index 6931a2ae25..20fb203a12 100644 --- a/gemfiles/3.0/Gemfile.lock +++ b/gemfiles/3.0/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.6.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.1/Gemfile.lock b/gemfiles/3.1/Gemfile.lock index 89c201eb62..f38e75df4d 100644 --- a/gemfiles/3.1/Gemfile.lock +++ b/gemfiles/3.1/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.6.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.2/Gemfile.lock b/gemfiles/3.2/Gemfile.lock index 5dc9eef55b..0215cd8eff 100644 --- a/gemfiles/3.2/Gemfile.lock +++ b/gemfiles/3.2/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.6.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.3/Gemfile.lock b/gemfiles/3.3/Gemfile.lock index 4d0316184d..d2e2ea06ef 100644 --- a/gemfiles/3.3/Gemfile.lock +++ b/gemfiles/3.3/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.6.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.4/Gemfile.lock b/gemfiles/3.4/Gemfile.lock index 0c062f7708..0d67386419 100644 --- a/gemfiles/3.4/Gemfile.lock +++ b/gemfiles/3.4/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.6.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.5/Gemfile.lock b/gemfiles/3.5/Gemfile.lock index b239919e13..953068d2d5 100644 --- a/gemfiles/3.5/Gemfile.lock +++ b/gemfiles/3.5/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.6.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/jruby/Gemfile.lock b/gemfiles/jruby/Gemfile.lock index 31d22f163f..77fe3e8fc8 100644 --- a/gemfiles/jruby/Gemfile.lock +++ b/gemfiles/jruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.6.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/truffleruby/Gemfile.lock b/gemfiles/truffleruby/Gemfile.lock index a9c0f1a057..9a34d6570a 100644 --- a/gemfiles/truffleruby/Gemfile.lock +++ b/gemfiles/truffleruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.6.0) GEM remote: https://rubygems.org/ diff --git a/include/prism/version.h b/include/prism/version.h index c0d82dc8e2..f202b0f4d7 100644 --- a/include/prism/version.h +++ b/include/prism/version.h @@ -14,16 +14,16 @@ /** * The minor version of the Prism library as an int. */ -#define PRISM_VERSION_MINOR 5 +#define PRISM_VERSION_MINOR 6 /** * The patch version of the Prism library as an int. */ -#define PRISM_VERSION_PATCH 2 +#define PRISM_VERSION_PATCH 0 /** * The version of the Prism library as a constant string. */ -#define PRISM_VERSION "1.5.2" +#define PRISM_VERSION "1.6.0" #endif diff --git a/javascript/package.json b/javascript/package.json index 43a9553852..c7f074e449 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@ruby/prism", - "version": "1.5.2", + "version": "1.6.0", "description": "Prism Ruby parser", "type": "module", "main": "src/index.js", diff --git a/prism.gemspec b/prism.gemspec index 8f6075ad96..168f8211ff 100644 --- a/prism.gemspec +++ b/prism.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "prism" - spec.version = "1.5.2" + spec.version = "1.6.0" spec.authors = ["Shopify"] spec.email = ["ruby@shopify.com"] diff --git a/rust/Cargo.lock b/rust/Cargo.lock index a3f8b92980..ee9187661a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -224,7 +224,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "ruby-prism" -version = "1.5.2" +version = "1.6.0" dependencies = [ "ruby-prism-sys", "serde", @@ -233,7 +233,7 @@ dependencies = [ [[package]] name = "ruby-prism-sys" -version = "1.5.2" +version = "1.6.0" dependencies = [ "bindgen", "cc", diff --git a/rust/ruby-prism-sys/Cargo.toml b/rust/ruby-prism-sys/Cargo.toml index f21c38ccff..64228ddf63 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.5.2" +version = "1.6.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 99e5fda9d0..a5f1b916ba 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.5.2"); + assert_eq!(&cstring.to_string_lossy(), "1.6.0"); } #[test] diff --git a/rust/ruby-prism/Cargo.toml b/rust/ruby-prism/Cargo.toml index 1e758164fb..b7c4a8ecda 100644 --- a/rust/ruby-prism/Cargo.toml +++ b/rust/ruby-prism/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism" -version = "1.5.2" +version = "1.6.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.5.2", path = "../ruby-prism-sys" } +ruby-prism-sys = { version = "1.6.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 a5e06c6125..6c52d36feb 100644 --- a/templates/java/org/prism/Loader.java.erb +++ b/templates/java/org/prism/Loader.java.erb @@ -101,8 +101,8 @@ public class Loader { expect((byte) 'M', "incorrect prism header"); expect((byte) 1, "prism major version does not match"); - expect((byte) 5, "prism minor version does not match"); - expect((byte) 2, "prism patch version does not match"); + expect((byte) 6, "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 046bad448b..a058d6cfeb 100644 --- a/templates/javascript/src/deserialize.js.erb +++ b/templates/javascript/src/deserialize.js.erb @@ -1,8 +1,8 @@ import * as nodes from "./nodes.js"; const MAJOR_VERSION = 1; -const MINOR_VERSION = 5; -const PATCH_VERSION = 2; +const MINOR_VERSION = 6; +const PATCH_VERSION = 0; // The DataView getFloat64 function takes an optional second argument that // specifies whether the number is little-endian or big-endian. It does not diff --git a/templates/lib/prism/serialize.rb.erb b/templates/lib/prism/serialize.rb.erb index 271631b5ac..526be67431 100644 --- a/templates/lib/prism/serialize.rb.erb +++ b/templates/lib/prism/serialize.rb.erb @@ -10,11 +10,11 @@ module Prism # The minor version of prism that we are expecting to find in the serialized # strings. - MINOR_VERSION = 5 + MINOR_VERSION = 6 # The patch version of prism that we are expecting to find in the serialized # strings. - PATCH_VERSION = 2 + PATCH_VERSION = 0 # Deserialize the dumped output from a request to parse or parse_file. #