Skip to content

Commit

Permalink
Merge pull request #1749 from ruby/bump-version
Browse files Browse the repository at this point in the history
Increment version to 0.16.0
  • Loading branch information
kddnewton authored Oct 30, 2023
2 parents 4bdafcc + 67c449f commit f4a464e
Show file tree
Hide file tree
Showing 16 changed files with 68 additions and 20 deletions.
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

## [Unreleased]

## [0.16.0] - 2023-10-30

### Added

- `InterpolatedMatchLastLineNode#options` and `MatchLastLineNode#options` are added, which are the same methods as are exposed on `InterpolatedRegularExpressionNode` and `RegularExpressionNode`.
- The project can now be compiled with `wasi-sdk` to expose a WebAssembly interface.
- `ArgumentsNode#keyword_splat?` is added to indicate if the arguments node has a keyword splat.
- The C API `pm_prettyprint` has a much improved output which lines up closely with `Node#inspect`.
- Prism now ships with `RBS` and `RBI` type signatures (in the `/sig` and `/rbi` directories, respectively).
- `Prism::parse_comments` and `Prism::parse_file_comments` APIs are added to extract only the comments from the source code.

### Changed

- **BREAKING**: `Multi{Target,Write}Node#targets` is split up now into `lefts`, `rest`, and `rights`. This is to avoid having to scan the list in the case that there are splat nodes.
- Some bugs are fixed on `Multi{Target,Write}Node` accidentally creating additional nesting when not necessary.
- **BREAKING**: `RequiredDestructuredParameterNode` has been removed in favor of using `MultiTargetNode` in those places.
- **BREAKING**: `HashPatternNode#assocs` has been renamed to `HashPatternNode#elements`. `HashPatternNode#kwrest` has been renamed to `HashPatternNode#rest`.

## [0.15.1] - 2023-10-18

### Changed
Expand Down Expand Up @@ -201,7 +219,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.15.1...HEAD
[unreleased]: https://github.com/ruby/prism/compare/v0.16.0...HEAD
[0.16.0]: https://github.com/ruby/prism/compare/v0.15.1...v0.16.0
[0.15.1]: https://github.com/ruby/prism/compare/v0.15.0...v0.15.1
[0.15.0]: https://github.com/ruby/prism/compare/v0.14.0...v0.15.0
[0.14.0]: https://github.com/ruby/prism/compare/v0.13.0...v0.14.0
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
prism (0.15.1)
prism (0.16.0)

GEM
remote: https://rubygems.org/
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ See the [CONTRIBUTING.md](CONTRIBUTING.md) file for more information. We additio
* [Heredocs](docs/heredocs.md)
* [JavaScript](docs/javascript.md)
* [Mapping](docs/mapping.md)
* [Releasing](docs/releasing.md)
* [Ripper](docs/ripper.md)
* [Ruby API](docs/ruby_api.md)
* [Serialization](docs/serialization.md)
Expand Down
27 changes: 27 additions & 0 deletions docs/releasing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Releasing

To release a new version of Prism, perform the following steps:

## Preparation

* Update the CHANGELOG.md file.
* Add a new section for the new version at the top of the file.
* Fill in the relevant changes — it may be easiest to click the link for the `Unreleased` heading to find the commits.
* Update the links at the bottom of the file.
* Update the version in the following files:
* `prism.gemspec` in the `Gem::Specification#version=` method call
* `ext/prism/extension.h` in the `EXPECTED_PRISM_VERSION` macro
* `include/prism/version.h` in the version macros
* `javascript/package.json` in the `version` field
* `rust/prism-sys/tests/utils_tests.rs` in the `version_test` function
* `templates/java/org/prism/Loader.java.erb` in the `load` function
* `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.
* Update `rust/prism-sys/Cargo.toml` to match the new version and run `cargo build`
* Update `rust/prism/Cargo.toml` to match the new version and run `cargo build`
* Commit all of the updated files.

## Publishing

* Run `bundle exec rake release` to publish the gem to [rubygems.org](rubygems.org). Note that you must have access to the `prism` gem to do this.
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.15.1"
#define EXPECTED_PRISM_VERSION "0.16.0"

#include <ruby.h>
#include <ruby/encoding.h>
Expand Down
6 changes: 3 additions & 3 deletions include/prism/version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define PRISM_VERSION_MAJOR 0
#define PRISM_VERSION_MINOR 15
#define PRISM_VERSION_PATCH 1
#define PRISM_VERSION "0.15.1"
#define PRISM_VERSION_MINOR 16
#define PRISM_VERSION_PATCH 0
#define PRISM_VERSION "0.16.0"
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.15.2",
"version": "0.16.0",
"description": "Prism Ruby parser",
"type": "module",
"main": "src/index.js",
Expand Down
3 changes: 2 additions & 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.15.1"
spec.version = "0.16.0"
spec.authors = ["Shopify"]
spec.email = ["[email protected]"]

Expand Down Expand Up @@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
"docs/javascript.md",
"docs/mapping.md",
"docs/prism.png",
"docs/releasing.md",
"docs/ripper.md",
"docs/ruby_api.md",
"docs/serialization.md",
Expand Down
2 changes: 1 addition & 1 deletion rust/prism-sys/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/prism-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "prism-sys"
version = "0.15.1"
version = "0.16.0"
edition = "2021"
license-file = "../../LICENSE.md"
repository = "https://github.com/ruby/prism"
Expand Down
2 changes: 1 addition & 1 deletion rust/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.15.1");
assert_eq!(&cstring.to_string_lossy(), "0.16.0");
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions rust/prism/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/prism/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "prism"
version = "0.15.1"
version = "0.16.0"
edition = "2021"
license-file = "../../LICENSE.md"
repository = "https://github.com/ruby/prism"
Expand Down
4 changes: 2 additions & 2 deletions templates/java/org/prism/Loader.java.erb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public class Loader {
expect((byte) 'M', "incorrect prism header");

expect((byte) 0, "prism version does not match");
expect((byte) 15, "prism version does not match");
expect((byte) 1, "prism version does not match");
expect((byte) 16, "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
4 changes: 2 additions & 2 deletions templates/javascript/src/deserialize.js.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as nodes from "./nodes.js";

const MAJOR_VERSION = 0;
const MINOR_VERSION = 15;
const PATCH_VERSION = 1;
const MINOR_VERSION = 16;
const PATCH_VERSION = 0;

class SerializationBuffer {
constructor(source, array) {
Expand Down
4 changes: 2 additions & 2 deletions templates/lib/prism/serialize.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ end
module Prism
module Serialize
MAJOR_VERSION = 0
MINOR_VERSION = 15
PATCH_VERSION = 1
MINOR_VERSION = 16
PATCH_VERSION = 0

def self.load(input, serialized)
input = input.dup
Expand Down

0 comments on commit f4a464e

Please sign in to comment.