theme-check 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/theme_check/json_printer.rb +1 -1
- data/lib/theme_check/tags.rb +18 -2
- data/lib/theme_check/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c21a0e8261a92b4eff6c415ca4205bb9e5f0b91c48cd9f2e4f6fb6a14adfe69c
|
4
|
+
data.tar.gz: 8dd16b772e87d56a174b9053c2fc4791457d79774b30e4b8813178224e8e7db2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03ac611f090d34741494bad1c9dd199ae90716c7bf10c2a99c0ae6e28aa5456d53c342ac3888bf683d4cfecb37605595586d720393f220f695379b6c1d5e3186
|
7
|
+
data.tar.gz: bc21703838ffa3606830505bfdc7d76b0fd675f402b7c062fe3ddd893ff62bb451fe57d44e77de8c6f99886546c0a261de9146d02833c81a10ec1c0c9e5ffc4e
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,10 @@
|
|
1
1
|
|
2
|
+
v1.10.2 / 2022-03-07
|
3
|
+
====================
|
4
|
+
|
5
|
+
* Handle nil paths in json_printer's sort_by ([#561](https://github.com/shopify/theme-check/issues/561))
|
6
|
+
* Prevent bad render tags from passing theme-check ([#559](https://github.com/shopify/theme-check/issues/559))
|
7
|
+
|
2
8
|
v1.10.1 / 2022-02-24
|
3
9
|
====================
|
4
10
|
|
data/lib/theme_check/tags.rb
CHANGED
@@ -125,7 +125,23 @@ module ThemeCheck
|
|
125
125
|
end
|
126
126
|
|
127
127
|
class Render < Liquid::Tag
|
128
|
-
SYNTAX =
|
128
|
+
SYNTAX = %r{
|
129
|
+
(
|
130
|
+
## for {% render "snippet" %}
|
131
|
+
#{Liquid::QuotedString}+ |
|
132
|
+
## for {% render block %}
|
133
|
+
## We require the variable # segment to be at the beginning of the
|
134
|
+
## string (with \A). This is to prevent code like {% render !foo! %}
|
135
|
+
## from parsing
|
136
|
+
\A#{Liquid::VariableSegment}+
|
137
|
+
)
|
138
|
+
## for {% render "snippet" with product as p %}
|
139
|
+
## or {% render "snippet" for products p %}
|
140
|
+
(\s+(with|#{Liquid::Render::FOR})\s+(#{Liquid::QuotedFragment}+))?
|
141
|
+
(\s+(?:as)\s+(#{Liquid::VariableSegment}+))?
|
142
|
+
## variables passed into the tag (e.g. {% render "snippet", var1: value1, var2: value2 %}
|
143
|
+
## are not matched by this regex and are handled by Liquid::Render.initialize
|
144
|
+
}xo
|
129
145
|
|
130
146
|
disable_tags "include"
|
131
147
|
|
@@ -134,7 +150,7 @@ module ThemeCheck
|
|
134
150
|
def initialize(tag_name, markup, options)
|
135
151
|
super
|
136
152
|
|
137
|
-
raise SyntaxError, options[:locale].t("errors.syntax.render") unless markup =~ SYNTAX
|
153
|
+
raise Liquid::SyntaxError, options[:locale].t("errors.syntax.render") unless markup =~ SYNTAX
|
138
154
|
|
139
155
|
template_name = Regexp.last_match(1)
|
140
156
|
with_or_for = Regexp.last_match(3)
|
data/lib/theme_check/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: theme-check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc-André Cournoyer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|