Jake Olney and Melanie Wang
489e3ca7bf
update tablerow to tablerowloop
2022-06-27 15:10:23 -04:00
Jake Olney and Melanie Wang
65542f9e4f
small change for for syntax keyword
2022-06-27 15:10:23 -04:00
Jake Olney and Melanie Wang
d497bfffe9
update for and tablerow
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
ebafb0a3fe
changes from example feedback
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
4ec9db3f99
iain feedback
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
95eb5d6036
add inline_comment
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
7ba40d48c0
fix lint error
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
9020dbcd41
shaina feedback
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
73f7467258
fix lint errors
2022-06-27 15:10:21 -04:00
Jake Olney and Melanie Wang
f3aa5fbd7c
add yard tags
2022-06-27 15:10:21 -04:00
Dylan Thacker-Smith and GitHub
eb70bb9b87
Refactor Liquid::Variable to respect disabling liquid-c nodes ( #1584 )
...
parse_context.parse_expression is overriden in liquid-c and will avoid
parsing to a Liquid::C::Expression when parsing with
`disable_liquid_c_nodes: true`
2022-06-21 15:19:56 -04:00
Dylan Thacker-Smith and GitHub
4d8e55dbc4
Merge pull request #1580 from Shopify/rubocop-autocorrect
...
Rubocop autocorrect Gemspec/DeprecatedAttributeAssignment offense
2022-06-06 11:53:06 -04:00
Dylan Thacker-Smith
f697093e94
Use stricter rubocop-shopify version constraint
...
to reduce CI failures being introduced without a code change.
2022-06-06 11:20:05 -04:00
Dylan Thacker-Smith
7594bed88a
Rubocop autocorrect Gemspec/DeprecatedAttributeAssignment offense
2022-06-06 11:09:47 -04:00
Dylan Thacker-Smith and GitHub
f64471eb4e
Merge pull request #1569 from Shopify/registers-refactor
...
Rename and alias Liquid::StaticRegisters to Liquid::Registers
2022-06-06 10:26:11 -04:00
Andy Waite and GitHub
d4c24f3ce2
Merge pull request #1578 from Shopify/andyw8/drop-support-for-ruby2.5-and-2.6
...
Drop support for Ruby 2.5 and 2.6
2022-05-26 12:51:44 -04:00
Andy Waite
3bbb7aa7ba
Reword Ruby breaking change notice
2022-05-19 10:10:44 -04:00
Andy Waite
102bac2e33
Regenerate .rubocop_todo.yml
2022-05-18 15:25:59 -04:00
Andy Waite
e69f729f76
Use latest rubocop-shopify
2022-05-18 15:25:34 -04:00
Andy Waite
4ec0b85d80
Drop support for Ruby 2.5 and 2.6
2022-05-18 15:23:32 -04:00
Dylan Thacker-Smith
f77c766262
Rename Liquid::Registers @registers to @changes
...
since it doesn't represent all the registers
2022-05-04 17:25:53 -04:00
Dylan Thacker-Smith
7bc14ae2be
Remove unused class Liquid::Register to avoid confusion
2022-05-04 17:25:52 -04:00
Dylan Thacker-Smith
41c19929ad
Rename and alias Liquid::StaticRegisters to Liquid::Registers
2022-05-04 17:25:52 -04:00
Dylan Thacker-Smith and GitHub
05d768c6ab
Merge pull request #1498 from Shopify/feature/new-comment-syntax
...
Add `#` inline comment tag.
2022-04-28 09:46:59 -04:00
Dylan Thacker-Smith
54414dfd83
Add changelog entry, making the next release a feature release
2022-04-28 09:43:08 -04:00
Dylan Thacker-Smith
23a8438fa6
Use liquid-c master branch again, it now has inline comment support
2022-04-28 09:39:16 -04:00
Dylan Thacker-Smith
21f3337dec
Test a blank line in a comment tag
2022-04-28 09:38:44 -04:00
Charles-P. Clermont and Dylan Thacker-Smith
1f0a0ad55c
Add # inline comment tag.
...
This commit adds a new tag named `#` that behaves like a comment.
Therefore it behaves as you'd expect any tag would work. The difference
with the comment tag is that the comment is in the tag markup and that
there is no block delimiter.
What it looks like in practice:
```liquid
{%- # this is an inline comment -%}
{% # this too is an inline comment %}
{% liquid
# required args:
assign product = product
# optional args:
assign should_show_border = should_show_border | default: true
assign should_show_cursor = should_show_cursor | default: true
%}
{% liquid
# This is a very long comment that spans multiple lines.
# It looks very similar to what it would look like if you wrote
# ruby code instead of liquid. But it doesn't have all the clunk
# of having an open tag and a close tag with so many characters.
%}
```
Co-authored-by: Dylan Thacker-Smith <[email protected] >
2022-04-28 09:38:44 -04:00
Dylan Thacker-Smith and GitHub
36dce29776
Avoid evaluating the template name in the render tag ( #1568 )
2022-04-21 16:10:42 -04:00
Dylan Thacker-Smith and GitHub
8b68630a11
Merge pull request #1474 from Shopify/clarify-warn-error-mode-doc
...
Clarify that the error_mode: :warn parse option is only for strict errors
2022-04-21 12:25:36 -04:00
Chris AtLee and GitHub
8882338aa1
Merge pull request #1553 from Shopify/catlee/shared_partial_cache
...
Ensure that partial caches are shared with subcontexts
2022-04-08 10:09:49 -04:00
Chris AtLee and Dylan Thacker-Smith
6c2c621712
Ensure that partial caches are shared with subcontexts
...
Make Context use StaticRegisters by default. This makes it easier to
ensure that all subcontexts share the same static registers.
Co-authored-by: Dylan Thacker-Smith <[email protected] >
2022-04-08 10:05:58 -04:00
Dylan Thacker-Smith and GitHub
1cae1e497f
Merge pull request #1560 from ghousemohamed/fix-typo
...
Fix typo: syntetic -> synthetic
2022-04-05 20:15:09 -04:00
Dylan Thacker-Smith and GitHub
ed7dae50aa
Merge pull request #1562 from ghousemohamed/bump-actions-checkout-to-v3
...
Bump actions/checkout to v3
2022-04-05 19:46:41 -04:00
Ghouse Mohamed
7e99432bd1
Bumped actions/checkout to v3
2022-04-04 03:57:24 +05:30
Ghouse Mohamed
6c187b8470
Fix typo: syntetic -> synthetic
2022-03-27 23:18:01 +05:30
Dylan Thacker-Smith and GitHub
6e07f73f68
History.md: Remove non-fix from fixes section of recent release. ( #1556 )
2022-03-23 11:59:50 -04:00
Marc-André Cournoyer and GitHub
f64af57b7b
Merge pull request #1540 from Watson1978/remove-redundant-regexp
...
Remove redundant regexp
2022-03-22 14:52:49 -04:00
Marc-André Cournoyer and GitHub
c60c3c7802
Merge pull request #1554 from Shopify/bump-5.3.0
...
Update changelog & bump version for 5.3.0 release
v5.3.0
2022-03-22 13:30:28 -04:00
Marc-André Cournoyer
11625b1bc9
Update release date
2022-03-22 13:24:02 -04:00
Marc-André Cournoyer
ec6fb4d5fa
Update changelog & bump version for 5.3.0 release
2022-03-17 15:39:04 -04:00
Watson
fad58ef436
Use String#match? instead of String#=~ to reduce allocation for backreferecne
...
## Test code
```ruby
require 'benchmark/ips'
WhitespaceOrNothing = /\A\s*\z/
token = " " * 20
token =~ WhitespaceOrNothing
Benchmark.ips do |x|
x.report("=~") {
token =~ WhitespaceOrNothing
}
x.report("match?") {
token.match?(WhitespaceOrNothing)
}
x.compare!
end
```
## Result
```
Warming up --------------------------------------
=~ 271.356k i/100ms
match? 579.655k i/100ms
Calculating -------------------------------------
=~ 2.717M (± 0.4%) i/s - 13.839M in 5.092947s
match? 5.695M (± 1.6%) i/s - 28.983M in 5.090640s
Comparison:
match?: 5694747.3 i/s
=~: 2717370.9 i/s - 2.10x (± 0.00) slower
```
2022-03-16 12:44:27 +09:00
Watson
22568080b1
Revert "Use strip & empty? to detect Whitespaces"
...
This reverts commit dd7ed00ec4 .
2022-03-16 12:33:45 +09:00
Watson
dd7ed00ec4
Use strip & empty? to detect Whitespaces
...
## Test code
```ruby
require 'benchmark/ips'
WhitespaceOrNothing = /\A\s*\z/
token = " " * 20
Benchmark.ips do |x|
x.report("WhitespaceOrNothing") {
token =~ WhitespaceOrNothing
}
x.report("strip & empty?") {
token.strip.empty?
}
x.compare!
end
```
## Result
```
Warming up --------------------------------------
WhitespaceOrNothing 266.391k i/100ms
strip & empty? 1.044M i/100ms
Calculating -------------------------------------
WhitespaceOrNothing 2.705M (± 0.4%) i/s - 13.586M in 5.023453s
strip & empty? 10.400M (± 1.1%) i/s - 52.182M in 5.017990s
Comparison:
strip & empty?: 10400286.2 i/s
WhitespaceOrNothing: 2704552.3 i/s - 3.85x (± 0.00) slower
```
2022-03-12 19:24:56 +09:00
Watson
1667c1180e
Use start_with? and end_with? to detect SQUARE_BRAKET
...
## Test code
```ruby
require 'benchmark/ips'
SQUARE_BRACKETED = /\A\[(.*)\]\z/m
markup = "[product.catchall]"
Benchmark.ips do |x|
x.report("SQUARE_BRACKETED") {
if markup =~ SQUARE_BRACKETED
Regexp.last_match(1)
end
}
x.report("start/end_with?") {
if markup&.start_with?('[') && markup&.end_with?(']')
markup[1..-2]
end
}
x.compare!
end
```
## Result
```
Warming up --------------------------------------
SQUARE_BRACKETED 261.300k i/100ms
start/end_with? 548.813k i/100ms
Calculating -------------------------------------
SQUARE_BRACKETED 2.632M (± 0.6%) i/s - 13.326M in 5.064085s
start/end_with? 5.471M (± 0.5%) i/s - 27.441M in 5.015770s
Comparison:
start/end_with?: 5470994.1 i/s
SQUARE_BRACKETED: 2631642.3 i/s - 2.08x (± 0.00) slower
```
2022-03-12 18:14:16 +09:00
Thierry Joyal and GitHub
7357dcf185
Merge pull request #1536 from Shopify/flaky-profiler-test-v2
...
Add artificial execution time in profiler tests
2022-03-07 10:06:13 -05:00
Thierry Joyal and GitHub
68c3827ef2
Merge pull request #1525 from Shopify/standardfilter/fix-missing-context-on-iterations
...
[StandardFilter] Fix missing @context on iterations
2022-03-07 09:19:18 -05:00
Thierry Joyal
4af38bc549
[StandardFilter] Fix missing @context on iterations
2022-03-07 09:17:07 -05:00
Thierry Joyal
df241abf70
Add artificial execution time in profiler tests
2022-03-07 08:50:03 -05:00
10f8337209
Test Ruby 3.1 in CI ( #1533 )
...
Co-authored-by: Dylan Thacker-Smith <[email protected] >
2022-03-04 13:23:04 -05:00