From 61a306cd5c888947f23c89492bec1250d293ea17 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Fri, 3 Nov 2023 11:00:14 -0400 Subject: [PATCH] Bump to version 0.17.0 --- CHANGELOG.md | 13 ++++++++++++- Gemfile.lock | 2 +- ext/prism/extension.h | 2 +- include/prism/version.h | 4 ++-- javascript/package.json | 2 +- prism.gemspec | 2 +- rust/prism-sys/Cargo.lock | 2 +- rust/prism-sys/Cargo.toml | 2 +- rust/prism-sys/tests/utils_tests.rs | 2 +- rust/prism/Cargo.lock | 4 ++-- rust/prism/Cargo.toml | 2 +- templates/java/org/prism/Loader.java.erb | 2 +- templates/javascript/src/deserialize.js.erb | 2 +- templates/lib/prism/serialize.rb.erb | 2 +- 14 files changed, 27 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1de2e07bb0..bcb5aa6ef30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [Unreleased] +## [0.17.0] - 2023-11-03 + +### Added + +- We now properly support forwarding arguments into arrays, like `def foo(*) = [*]`. +- We now have much better documentation for the C and Ruby APIs. +- We now properly provide an error message when attempting to assign to numbered parameters from within regular expression named capture groups, as in `/(?<_1>)/ =~ ""`. + ### Changed - **BREAKING**: `KeywordParameterNode` is split into `OptionalKeywordParameterNode` and `RequiredKeywordParameterNode`. `RequiredKeywordParameterNode` has no `value` field. +- **BREAKING**: Most of the `Prism::` APIs now accept a bunch of keyword options. The options we now support are: `filepath`, `encoding`, `line`, `frozen_string_literal`, `verbose`, and `scopes`. See [the pull request](https://github.com/ruby/prism/pull/1763) for more details. +- **BREAKING**: Comments are now split into three different classes instead of a single class, and the `type` field has been removed. They are: `InlineComment`, `EmbDocComment`, and `DATAComment`. ## [0.16.0] - 2023-10-30 @@ -223,7 +233,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.16.0...HEAD +[unreleased]: https://github.com/ruby/prism/compare/v0.17.0...HEAD +[0.17.0]: https://github.com/ruby/prism/compare/v0.16.0...v0.17.0 [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 diff --git a/Gemfile.lock b/Gemfile.lock index 08db1e4aaed..4e363afa95f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prism (0.16.0) + prism (0.17.0) GEM remote: https://rubygems.org/ diff --git a/ext/prism/extension.h b/ext/prism/extension.h index 45d446bc409..fb629de2eb6 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 "0.16.0" +#define EXPECTED_PRISM_VERSION "0.17.0" #include #include diff --git a/include/prism/version.h b/include/prism/version.h index 2e5e84cdf14..37ac3b76a7b 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 16 +#define PRISM_VERSION_MINOR 17 /** * 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 "0.16.0" +#define PRISM_VERSION "0.17.0" #endif diff --git a/javascript/package.json b/javascript/package.json index b3fda11b4cf..764fd6dac70 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@ruby/prism", - "version": "0.16.0", + "version": "0.17.0", "description": "Prism Ruby parser", "type": "module", "main": "src/index.js", diff --git a/prism.gemspec b/prism.gemspec index e402736c724..8031f40cb18 100644 --- a/prism.gemspec +++ b/prism.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "prism" - spec.version = "0.16.0" + spec.version = "0.17.0" spec.authors = ["Shopify"] spec.email = ["ruby@shopify.com"] diff --git a/rust/prism-sys/Cargo.lock b/rust/prism-sys/Cargo.lock index e1567e36114..bb06c250ea4 100644 --- a/rust/prism-sys/Cargo.lock +++ b/rust/prism-sys/Cargo.lock @@ -167,7 +167,7 @@ dependencies = [ [[package]] name = "prism-sys" -version = "0.16.0" +version = "0.17.0" dependencies = [ "bindgen", "cc", diff --git a/rust/prism-sys/Cargo.toml b/rust/prism-sys/Cargo.toml index 8d0180d0bc1..5cdbaa1f25d 100644 --- a/rust/prism-sys/Cargo.toml +++ b/rust/prism-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prism-sys" -version = "0.16.0" +version = "0.17.0" edition = "2021" license-file = "../../LICENSE.md" repository = "https://github.com/ruby/prism" diff --git a/rust/prism-sys/tests/utils_tests.rs b/rust/prism-sys/tests/utils_tests.rs index 840da9356fc..414500cc1bd 100644 --- a/rust/prism-sys/tests/utils_tests.rs +++ b/rust/prism-sys/tests/utils_tests.rs @@ -12,7 +12,7 @@ fn version_test() { CStr::from_ptr(version) }; - assert_eq!(&cstring.to_string_lossy(), "0.16.0"); + assert_eq!(&cstring.to_string_lossy(), "0.17.0"); } #[test] diff --git a/rust/prism/Cargo.lock b/rust/prism/Cargo.lock index 1a659faa063..d9792bc9523 100644 --- a/rust/prism/Cargo.lock +++ b/rust/prism/Cargo.lock @@ -195,7 +195,7 @@ dependencies = [ [[package]] name = "prism" -version = "0.16.0" +version = "0.17.0" dependencies = [ "prism-sys", "serde", @@ -204,7 +204,7 @@ dependencies = [ [[package]] name = "prism-sys" -version = "0.16.0" +version = "0.17.0" dependencies = [ "bindgen", "cc", diff --git a/rust/prism/Cargo.toml b/rust/prism/Cargo.toml index 326ee079923..6df979972ce 100644 --- a/rust/prism/Cargo.toml +++ b/rust/prism/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prism" -version = "0.16.0" +version = "0.17.0" edition = "2021" license-file = "../../LICENSE.md" repository = "https://github.com/ruby/prism" diff --git a/templates/java/org/prism/Loader.java.erb b/templates/java/org/prism/Loader.java.erb index c8a15296010..a3fa120a306 100644 --- a/templates/java/org/prism/Loader.java.erb +++ b/templates/java/org/prism/Loader.java.erb @@ -96,7 +96,7 @@ public class Loader { expect((byte) 'M', "incorrect prism header"); expect((byte) 0, "prism version does not match"); - expect((byte) 16, "prism version does not match"); + expect((byte) 17, "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"); diff --git a/templates/javascript/src/deserialize.js.erb b/templates/javascript/src/deserialize.js.erb index 12b4ac58b63..fcd4045f9a4 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 = 0; -const MINOR_VERSION = 16; +const MINOR_VERSION = 17; const PATCH_VERSION = 0; class SerializationBuffer { diff --git a/templates/lib/prism/serialize.rb.erb b/templates/lib/prism/serialize.rb.erb index 32bc7411789..e31e514743c 100644 --- a/templates/lib/prism/serialize.rb.erb +++ b/templates/lib/prism/serialize.rb.erb @@ -20,7 +20,7 @@ module Prism # The minor version of prism that we are expecting to find in the serialized # strings. - MINOR_VERSION = 16 + MINOR_VERSION = 17 # The patch version of prism that we are expecting to find in the serialized # strings.