Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to v1.1.0 #3128

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

## [Unreleased]

## [1.1.0] - 2024-10-02

### Added

- Explicitly type each child node field in the Ruby API.
- Add the `main_script` option to the parse APIs, which controls whether or not shebangs are considered.
- Add the `partial_script` options to the parse APIs, which controls whether or not jumps that would otherwise be considered invalid are allowed. This is useful for parsing things like ERB sources, where you know it will be evaluated in a different context. Note that this functionality is replacing the previous idiom of passing in a list of scopes to indicate an `eval` context, because that behavior has changed upstream in `ruby/ruby`.
- Add `ArgumentsNode#contains_multiple_splats?`.
- Add `ArgumentsNode#contains_forwarding?`.
- Accept all valid Ruby versions for the `version` option on parse APIs.
- Accept version shorthands like `"3.3"` and `"3.4"` for the `version` option on parse APIs.
- Support a max depth to protect against malicious payloads without hitting the stack limit.

### Changed

- Fix some token incompatibilities in the `parser` translation.
- Fix up parsing tempfiles on Windows.
- Fix up handling UTF-8 characters in file paths on Windows.
- Do not warn for a `\r` at the end of a shebang on Windows.
- Properly handle erroring for parsing a directory on Windows.
- When a numbered reference is out of range, warn instead of raise.
- Allow returns in default parameter values.
- Reject many more invalid syntax patterns.

## [1.0.0] - 2024-08-28

### Added
Expand Down Expand Up @@ -567,7 +591,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/v1.0.0...HEAD
[unreleased]: https://github.com/ruby/prism/compare/v1.1.0...HEAD
[1.1.0]: https://github.com/ruby/prism/compare/v1.0.0...v1.1.0
[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
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 (1.0.0)
prism (1.1.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion bin/prism
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ module Prism
["3.3.0", ["3.3"]],
["3.4.0-dev", ["3.4", "typecheck"]],
["jruby-9.4.5.0", ["jruby"]],
["truffleruby-24.0.0", ["truffleruby"]]
["truffleruby-24.1.0", ["truffleruby"]]
].each do |ruby_version, gemfiles|
gemfiles.each do |gemfile|
system(
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 "1.0.0"
#define EXPECTED_PRISM_VERSION "1.1.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 (1.0.0)
prism (1.1.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 (1.0.0)
prism (1.1.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 (1.0.0)
prism (1.1.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 (1.0.0)
prism (1.1.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 (1.0.0)
prism (1.1.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 (1.0.0)
prism (1.1.0)

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

GEM
remote: https://rubygems.org/
Expand All @@ -24,6 +24,7 @@ PLATFORMS
universal-java-20
universal-java-21
universal-java-22
universal-java-23

DEPENDENCIES
parser
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 (1.0.0)
prism (1.1.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 0
#define PRISM_VERSION_MINOR 1

/**
* 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 "1.0.0"
#define PRISM_VERSION "1.1.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": "1.0.0",
"version": "1.1.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 = "1.0.0"
spec.version = "1.1.0"
spec.authors = ["Shopify"]
spec.email = ["ruby@shopify.com"]

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 = "1.0.0"
version = "1.1.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(), "1.0.0");
assert_eq!(&cstring.to_string_lossy(), "1.1.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 = "1.0.0"
version = "1.1.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 = "1.0.0", path = "../ruby-prism-sys" }
ruby-prism-sys = { version = "1.1.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 @@ -101,7 +101,7 @@ public class Loader {
expect((byte) 'M', "incorrect prism header");

expect((byte) 1, "prism major version does not match");
expect((byte) 0, "prism minor version does not match");
expect((byte) 1, "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
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 = 1;
const MINOR_VERSION = 0;
const MINOR_VERSION = 1;
const PATCH_VERSION = 0;

// The DataView getFloat64 function takes an optional second argument that
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 @@ -10,7 +10,7 @@ module Prism

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

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