Skip to content

Commit

Permalink
Merge pull request #3020 from ruby/bump-version
Browse files Browse the repository at this point in the history
Bump to v1.0.0
  • Loading branch information
kddnewton committed Aug 28, 2024
2 parents bc21c9f + 1d9e66a commit 163a265
Show file tree
Hide file tree
Showing 21 changed files with 58 additions and 28 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]

## [1.0.0] - 2024-08-28

### Added

- Add `Node#breadth_first_search`.
- Add `Node#node_id`.
- Add `ArgumentsNode#contains_splat?`.
- Passing the special value `false` for the `encoding` option tells Prism to ignore magic encoding comments.
- Expose flags on every node type (allows checking static literal and newline).
- Implement mismatched indentation warning.
- Add C API for receiving a callback when parsing shebangs with additional flags.

### Changed

- **BREAKING**: Some fields are renamed that had illogical names. The previous names all now emit deprecation warnings.
- `CaseMatchNode#consequent` was renamed to `CaseMatchNode#else_clause`
- `CaseNode#consequent` was renamed to `CaseNode#else_clause`
- `IfNode#consequent` was renamed to `IfNode#subsequent`
- `RescueNode#consequent` was renamed to `RescueNode#subsequent`
- `UnlessNode#consequent` was renamed to `UnlessNode#else_clause`
- Block exits are now allowed in loop predicates (e.g., `while _ && break do end`).
- Multi-writes are now disallowed when not at the statement level.
- Ensure that range operators are non-associative.
- (JavaScript) Correctly deserialize encoded strings.
- Properly support parsing regular expressions in extended mode.
- Use gmake on FreeBSD.
- Parsing streams now handles NUL bytes in the middle of the stream.
- Properly detect invalid returns.

## [0.30.0] - 2024-06-07

### Added
Expand Down Expand Up @@ -538,7 +567,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.30.0...HEAD
[unreleased]: https://github.com/ruby/prism/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/ruby/prism/compare/v0.30.0...v1.0.0
[0.30.0]: https://github.com/ruby/prism/compare/v0.29.0...v0.30.0
[0.29.0]: https://github.com/ruby/prism/compare/v0.28.0...v0.29.0
[0.28.0]: https://github.com/ruby/prism/compare/v0.27.0...v0.28.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.30.0)
prism (1.0.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.30.0"
#define EXPECTED_PRISM_VERSION "1.0.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.30.0)
prism (1.0.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.30.0)
prism (1.0.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.30.0)
prism (1.0.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.30.0)
prism (1.0.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.30.0)
prism (1.0.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.30.0)
prism (1.0.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.30.0)
prism (1.0.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.30.0)
prism (1.0.0)

GEM
remote: https://rubygems.org/
Expand Down
6 changes: 3 additions & 3 deletions include/prism/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
/**
* The major version of the Prism library as an int.
*/
#define PRISM_VERSION_MAJOR 0
#define PRISM_VERSION_MAJOR 1

/**
* The minor version of the Prism library as an int.
*/
#define PRISM_VERSION_MINOR 30
#define PRISM_VERSION_MINOR 0

/**
* 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.30.0"
#define PRISM_VERSION "1.0.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.30.0",
"version": "1.0.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.30.0"
spec.version = "1.0.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.30.0"
version = "1.0.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.30.0");
assert_eq!(&cstring.to_string_lossy(), "1.0.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.30.0"
version = "1.0.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.30.0", path = "../ruby-prism-sys" }
ruby-prism-sys = { version = "1.0.0", path = "../ruby-prism-sys" }

[features]
default = ["vendored"]
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 @@ -100,8 +100,8 @@ public class Loader {
expect((byte) 'S', "incorrect prism header");
expect((byte) 'M', "incorrect prism header");

expect((byte) 0, "prism major version does not match");
expect((byte) 30, "prism minor version does not match");
expect((byte) 1, "prism major version does not match");
expect((byte) 0, "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");
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,7 +1,7 @@
import * as nodes from "./nodes.js";

const MAJOR_VERSION = 0;
const MINOR_VERSION = 30;
const MAJOR_VERSION = 1;
const MINOR_VERSION = 0;
const PATCH_VERSION = 0;

// The DataView getFloat64 function takes an optional second argument that
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 @@ -6,11 +6,11 @@ module Prism
module Serialize
# The major version of prism that we are expecting to find in the serialized
# strings.
MAJOR_VERSION = 0
MAJOR_VERSION = 1

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

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

0 comments on commit 163a265

Please sign in to comment.