Compare commits

..
Author SHA1 Message Date
Dominic Petrick d6e07f9e5f pretend we're on 3.4 2025-01-15 11:17:05 +01:00
Ian Ker-Seymer 8c89e6a0dd Implement logic for stringify Hashes to keep compat with 3.4 2025-01-14 18:27:54 -05:00
Dominic Petrick c2530b233b Exploring 2025-01-14 19:37:19 +01:00
4 changed files with 13 additions and 58 deletions
+1 -3
View File
@@ -29,8 +29,6 @@
## Releasing
* Bump the version in `lib/liquid/version.rb`
* Update the `History.md` file
* Open a PR like [this one](https://github.com/Shopify/liquid/pull/1894) and merge it to `main`
* Bump the version in `lib/liquid/version.rb` and merge it on `main`
* Create a new release using the [GitHub UI](https://github.com/Shopify/liquid/releases/new)
+2 -44
View File
@@ -1,54 +1,12 @@
# Liquid Change Log
## 5.8.0 (unreleased)
## 5.7.0 2025-01-16
### Features
* Add `find`, `find_index`, `has`, and `reject` filters to arrays
* Compatibility with Ruby 3.4
## 5.6.4 2025-01-14
## 5.6.0 (unreleased)
### Fixes
* Add a default `string_scanner` to avoid errors with `Liquid::VariableLookup.parse("foo.bar")` [Ian Ker-Seymer]
## 5.6.3 2025-01-13
* Remove `lru_redux` dependency [Michael Go]
## 5.6.2 2025-01-13
### Fixes
* Preserve the old behavior of requiring floats to start with a digit [Michael Go]
## 5.6.1 2025-01-13
### Performance improvements
* Faster Expression parser / Tokenizer with StringScanner [Michael Go]
## 5.6.0 2024-12-19
### Architectural changes
* Added new `Environment` class to manage configuration and state that was previously stored in `Template` [Ian Ker-Seymer]
* Moved tag registration from `Template` to `Environment` [Ian Ker-Seymer]
* Removed `StrainerFactory` in favor of `Environment`-based strainer creation [Ian Ker-Seymer]
* Consolidated standard tags into a new `Tags` module with `STANDARD_TAGS` constant [Ian Ker-Seymer]
### Performance improvements
* Optimized `Lexer` with a new `Lexer2` implementation using jump tables for faster tokenization, requires Ruby 3.4 [Ian Ker-Seymer]
* Improved variable rendering with specialized handling for different types [Michael Go]
* Reduced array allocations by using frozen empty constants [Michael Go]
### API changes
* Deprecated several `Template` class methods in favor of `Environment` methods [Ian Ker-Seymer]
* Added deprecation warnings system [Ian Ker-Seymer]
* Changed how filters and tags are registered to use Environment [Ian Ker-Seymer]
### Fixes
* Fixed table row handling of break interrupts [Alex Coco]
* Improved variable output handling for arrays [Ian Ker-Seymer]
* Fix Tokenizer to handle null source value (#1873) [Bahar Pourazar]
## 5.5.0 2024-03-21
Please reference the GitHub release for more information.
+9 -10
View File
@@ -90,7 +90,7 @@ module Liquid
obj
end
if RUBY_VERSION >= '3.4'
# if RUBY_VERSION >= '3.4'
def self.to_s(obj, seen = {})
case obj
when Hash
@@ -112,15 +112,15 @@ module Liquid
obj.inspect
end
end
else
def self.to_s(obj, seen = nil)
obj.to_s
end
# else
# def self.to_s(obj, seen = nil)
# obj.to_s
# end
def self.inspect(obj, seen = nil)
obj.inspect
end
end
# def self.inspect(obj, seen = nil)
# obj.inspect
# end
# end
def self.array_inspect(arr, seen = {})
if seen[arr.object_id]
@@ -139,7 +139,6 @@ module Liquid
item_str = inspect(arr[cursor], seen)
str << item_str
cursor += 1
end
str << "]"
+1 -1
View File
@@ -2,5 +2,5 @@
# frozen_string_literal: true
module Liquid
VERSION = "5.7.0"
VERSION = "5.6.4"
end