Skip to content

Commit

Permalink
Merge pull request #2377 from ruby/bump-version
Browse files Browse the repository at this point in the history
Bump to v0.22.0
  • Loading branch information
kddnewton authored Feb 7, 2024
2 parents a884fd1 + ef2c894 commit 1fcec44
Show file tree
Hide file tree
Showing 22 changed files with 58 additions and 26 deletions.
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

## [Unreleased]

## [0.22.0] - 2024-02-07

### Added

- More support for `Prism::RipperCompat` is added.
- Support for Ruby 2.7 has been added, and the minimum Ruby requirement has been lowered to 2.7.

### Changed

- The error for an invalid source encoding has a new `:argument` level to indicate it raises an argument error.
- `BeginNode` nodes that are used when a class, singleton class, module, method definition, or block have an inline `rescue`/`ensure`/`else` now have their opening locations set to the beginning of the respective keyword.
- Improved error messages for invalid characters.
- `Prism.parse_file` and similar APIs will raise more appropriate errors when the file does not exist or cannot be mapped.
- Correctly handle the `recover` parameter for `Prism::Translation::Parser`.

## [0.21.0] - 2024-02-05

### Added
Expand Down Expand Up @@ -341,7 +356,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/v0.21.0...HEAD
[unreleased]: https://github.com/ruby/prism/compare/v0.22.0...HEAD
[0.22.0]: https://github.com/ruby/prism/compare/v0.21.0...v0.22.0
[0.21.0]: https://github.com/ruby/prism/compare/v0.20.0...v0.21.0
[0.20.0]: https://github.com/ruby/prism/compare/v0.19.0...v0.20.0
[0.19.0]: https://github.com/ruby/prism/compare/v0.18.0...v0.19.0
Expand Down
4 changes: 1 addition & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
prism (0.21.0)
prism (0.22.0)

GEM
remote: https://rubygems.org/
Expand All @@ -13,8 +13,6 @@ GEM
nokogiri (1.16.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.2-java)
racc (~> 1.4)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
Expand Down
18 changes: 18 additions & 0 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ To release a new version of Prism, perform the following steps:
* `templates/javascript/src/deserialize.js.erb` in the version constants
* `templates/lib/prism/serialize.rb.erb` in the version constants
* Run `bundle install` to update the `Gemfile.lock` file.

```sh
bundle install
```

* Run `bundle install` with the various other gemfiles:

```sh
chruby ruby-2.7.8 && BUNDLE_GEMFILE=gemfiles/2.7/Gemfile bundle install
chruby ruby-3.0.6 && BUNDLE_GEMFILE=gemfiles/3.0/Gemfile bundle install
chruby ruby-3.1.4 && BUNDLE_GEMFILE=gemfiles/3.1/Gemfile bundle install
chruby ruby-3.2.3 && BUNDLE_GEMFILE=gemfiles/3.2/Gemfile bundle install
chruby ruby-3.3.0 && BUNDLE_GEMFILE=gemfiles/3.3/Gemfile bundle install
chruby ruby-3.4.0-dev && BUNDLE_GEMFILE=gemfiles/3.4/Gemfile bundle install
chruby jruby-9.4.5.0 && BUNDLE_GEMFILE=gemfiles/jruby/Gemfile bundle install
chruby truffleruby-23.1.2 && BUNDLE_GEMFILE=gemfiles/truffleruby/Gemfile bundle install
```

* Update `rust/ruby-prism-sys/Cargo.toml` to match the new version and run `cargo build`
* Update `rust/ruby-prism/Cargo.toml` to match the new version and run `cargo build`
* Commit all of the updated files.
Expand Down
2 changes: 1 addition & 1 deletion ext/prism/extension.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef PRISM_EXT_NODE_H
#define PRISM_EXT_NODE_H

#define EXPECTED_PRISM_VERSION "0.21.0"
#define EXPECTED_PRISM_VERSION "0.22.0"

#include <ruby.h>
#include <ruby/encoding.h>
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/2.7/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.21.0)
prism (0.22.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.0/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.21.0)
prism (0.22.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.1/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.21.0)
prism (0.22.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.2/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.21.0)
prism (0.22.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.3/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.21.0)
prism (0.22.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.4/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.21.0)
prism (0.22.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/jruby/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.21.0)
prism (0.22.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/truffleruby/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.21.0)
prism (0.22.0)

GEM
remote: https://rubygems.org/
Expand Down
4 changes: 2 additions & 2 deletions include/prism/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* The minor version of the Prism library as an int.
*/
#define PRISM_VERSION_MINOR 21
#define PRISM_VERSION_MINOR 22

/**
* The patch version of the Prism library as an int.
Expand All @@ -24,6 +24,6 @@
/**
* The version of the Prism library as a constant string.
*/
#define PRISM_VERSION "0.21.0"
#define PRISM_VERSION "0.22.0"

#endif
2 changes: 1 addition & 1 deletion javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ruby/prism",
"version": "0.21.0",
"version": "0.22.0",
"description": "Prism Ruby parser",
"type": "module",
"main": "src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion prism.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "prism"
spec.version = "0.21.0"
spec.version = "0.22.0"
spec.authors = ["Shopify"]
spec.email = ["[email protected]"]

Expand Down
4 changes: 2 additions & 2 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/ruby-prism-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ruby-prism-sys"
version = "0.21.0"
version = "0.22.0"
edition = "2021"
license-file = "../../LICENSE.md"
repository = "https://github.com/ruby/prism"
Expand Down
2 changes: 1 addition & 1 deletion rust/ruby-prism-sys/tests/utils_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn version_test() {
CStr::from_ptr(version)
};

assert_eq!(&cstring.to_string_lossy(), "0.21.0");
assert_eq!(&cstring.to_string_lossy(), "0.22.0");
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions rust/ruby-prism/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ruby-prism"
version = "0.21.0"
version = "0.22.0"
edition = "2021"
license-file = "../../LICENSE.md"
repository = "https://github.com/ruby/prism"
Expand All @@ -26,7 +26,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"

[dependencies]
ruby-prism-sys = { version = "0.21.0", path = "../ruby-prism-sys" }
ruby-prism-sys = { version = "0.22.0", path = "../ruby-prism-sys" }

[features]
default = ["vendored"]
Expand Down
2 changes: 1 addition & 1 deletion templates/java/org/prism/Loader.java.erb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public class Loader {
expect((byte) 'M', "incorrect prism header");

expect((byte) 0, "prism version does not match");
expect((byte) 21, "prism version does not match");
expect((byte) 22, "prism version does not match");
expect((byte) 0, "prism version does not match");

expect((byte) 1, "Loader.java requires no location fields in the serialized output");
Expand Down
2 changes: 1 addition & 1 deletion templates/javascript/src/deserialize.js.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as nodes from "./nodes.js";

const MAJOR_VERSION = 0;
const MINOR_VERSION = 21;
const MINOR_VERSION = 22;
const PATCH_VERSION = 0;

class SerializationBuffer {
Expand Down
2 changes: 1 addition & 1 deletion templates/lib/prism/serialize.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Prism

# The minor version of prism that we are expecting to find in the serialized
# strings.
MINOR_VERSION = 21
MINOR_VERSION = 22

# The patch version of prism that we are expecting to find in the serialized
# strings.
Expand Down

0 comments on commit 1fcec44

Please sign in to comment.