Skip to content

Commit

Permalink
Bump to version 0.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed Dec 14, 2023
1 parent 9e249fb commit 5d346f4
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 16 deletions.
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

## [Unreleased]

## [0.19.0] - 2023-12-14

### Added

- `ArrayNode` now has a `contains_splat?` flag if it has a splatted element in it.
- All of the remaining encodings have been implemented.
- Allow forwarding `&` in a method that has a `...` parameter.
- Many statements that are found in non-statement positions are being properly rejected now.
- Void values are now properly checked.
- Referencing a parameter in its own default value is now properly rejected.
- `DATA`/`__END__` is now parsed as its own field on parse result (`data_loc`) as opposed to as a comment.
- Blank `*` now properly forwards into arrays.
- `ImplicitRestNode` is introduced to represent the implicit rest of a destructure.
- We now support negative start lines.
- `StringNode#heredoc?`, `InterpolatedStringNode#heredoc?`, `XStringNode#heredoc?`, and `InterpolatedXStringNode#heredoc?` are introduced.
- `NumberedParametersNode` is introduced to represent the implicit set of parameters when numbered parameters are used.
- `Prism::parse_success?` and `Prism::parse_failure?` are introduced to bypass reifying the AST.
- We now emit a warning for constant assignments in method definitions.
- We now provide flags on strings and xstrings to indicate the correct encoding.
- The hash pattern `rest` field now more accurately parses `**` and `**nil`.
- The equality operators are now properly parsed as non-associative.

### Changed

- **BREAKING**: Many fields have changed positions within their nodes. This impacts the C API and the Ruby API if you are manually creating nodes through the initializer.
- **BREAKING**: Almost all of the error messages have been updated to begin with lowercase characters to match ruby/spec.
- Unterminated strings with only plain content are now always `StringNode` as opposed to `InterpolatedStringNode`
- **BREAKING**: Call node has been split up when it is in the target position into `CallTargetNode` and `IndexTargetNode`.

## [0.18.0] - 2023-11-21

### Added
Expand Down Expand Up @@ -267,7 +296,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.18.0...HEAD
[unreleased]: https://github.com/ruby/prism/compare/v0.19.0...HEAD
[0.19.0]: https://github.com/ruby/prism/compare/v0.18.0...v0.19.0
[0.18.0]: https://github.com/ruby/prism/compare/v0.17.1...v0.18.0
[0.17.1]: https://github.com/ruby/prism/compare/v0.17.0...v0.17.1
[0.17.0]: https://github.com/ruby/prism/compare/v0.16.0...v0.17.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.18.0)
prism (0.19.0)

GEM
remote: https://rubygems.org/
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.18.0"
#define EXPECTED_PRISM_VERSION "0.19.0"

#include <ruby.h>
#include <ruby/encoding.h>
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 18
#define PRISM_VERSION_MINOR 19

/**
* 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.18.0"
#define PRISM_VERSION "0.19.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.18.0",
"version": "0.19.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.18.0"
spec.version = "0.19.0"
spec.authors = ["Shopify"]
spec.email = ["[email protected]"]

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.18.0"
version = "0.19.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.18.0");
assert_eq!(&cstring.to_string_lossy(), "0.19.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.18.0"
version = "0.19.0"
edition = "2021"
license-file = "../../LICENSE.md"
repository = "https://github.com/ruby/prism"
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) 18, "prism version does not match");
expect((byte) 19, "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 = 18;
const MINOR_VERSION = 19;
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 = 18
MINOR_VERSION = 19

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

0 comments on commit 5d346f4

Please sign in to comment.