Harttle
a3455ebd0b
feat: relativeReference for render/include/layout, #395
...
- `relativeReference` is enabled by default, set to `false` to disable
- Referenced files are still constrained within root/partias/layouts
- fix: relative filenames are not constrained (which allows arbitrary filesystem read)
Example Usage:
{% render "../foo/bar.html" %}
Note:
../foo/bar.html' should also be within `partials` (or `root` if `partials` not set)
2021-10-06 17:36:37 +08:00
Harttle
fd5ef474c3
fix: support timezoneOffset for date from scope, #401
2021-10-06 15:45:41 +08:00
harttle
68c4cfcfb6
feat: renderFileToNodeStream(filepath, scope)
2021-10-03 21:21:25 +08:00
Harttle and harttle
4358c9630f
test: coverage to 100%
2021-10-01 15:55:31 +08:00
Harttle and Jun Yang
10e8c8ff7e
feat: orderedFilterParameters, closes #312
2021-09-30 22:15:09 +08:00
Harttle and Jun Yang
9012133e07
feat: stream rendering, closed #361 fixes #360
2021-09-30 22:15:09 +08:00
harttle
8273c17dab
perf: parse filenames in parse() insteadof render()
2021-09-30 22:15:09 +08:00
harttle
24f5346084
perf: improve performance by 4x by simplified parseFile
...
- previously deprecated `getTemplate()` and `getTemplateSync()` not no longer supported
- `opts` no longer support dynamic set in `parseFile()`, `renderFile()` arguments
2021-09-27 23:04:41 +08:00
Harttle and harttle
6b9f872bcc
feat: timezoneOffset option to specify output timezone, see #375
2021-09-27 01:54:31 +08:00
harttle
2f059f6a25
feat: support filters in if/unless/case, see #287
2021-02-12 22:22:41 +08:00
harttle
e37824fd8a
feat: support function calls, closes #222
2021-02-12 13:47:30 +08:00
Jason Etcovitch and Jun Yang
befc33c4eb
feat: create trie programmatically in options
2021-02-04 09:11:28 +08:00
Jason Etcovitch and Jun Yang
8734e2e6ce
feat: rename to defaultOperators and Operators
2021-02-04 09:11:28 +08:00
Jason Etcovitch and Jun Yang
6a7c280f04
feat: export Operators from operator.ts
2021-02-04 09:11:28 +08:00
Jason Etcovitch and Jun Yang
75591cdbfc
feat: add operators option for custom operators
2021-02-04 09:11:28 +08:00
harttle
9c40da7369
fix: allow string literals contain delimiters, fixes #288
2021-01-24 12:49:19 +08:00
Alex de Wergifosse and Jun Yang
b8e4b3337b
test: add tests for keepOutputType option
2020-12-16 10:20:10 +08:00
Alex de Wergifosse and Jun Yang
cd92e77726
feat: add option for keeping variable type in output
2020-12-16 10:20:10 +08:00
harttle
ef43120d6e
test: fix test cases after rebase
2020-12-08 00:20:43 +08:00
harttle
f9f595f0f4
feat: passing liquid to FilterImpl, closes #277
2020-12-08 00:17:27 +08:00
harttle
a492d8e23d
fix: raw block not ignoring {% characters, fixes #263
2020-12-08 00:12:20 +08:00
wyozi and Jun Yang
30dffb675e
Test for broken quoted property access
2020-10-09 21:18:40 +08:00
wyozi and Jun Yang
e67c3c6924
Make end brace peek stricter and fix the test
2020-10-09 21:18:40 +08:00
wyozi and Jun Yang
e2e410f334
Add incomplete quoted property access test
2020-10-09 21:18:40 +08:00
wyozi and Jun Yang
27ce44238e
Test getVariableAsText
2020-10-09 21:18:40 +08:00
wyozi and Jun Yang
abfaf8a042
Test quoted property access tokenizing
2020-10-09 21:18:40 +08:00
harttle
72ee7b4c1e
feat: support jsTruthy, #255 #257
2020-10-08 13:11:02 +08:00
Amit Gupta and Jun Yang
f807383f2a
resolved issues raised by hhartle
2020-10-08 12:43:37 +08:00
Amit Gupta and Jun Yang
02bfed1c57
Added jsTruthy flag to constuctor in order to enable JS style truthiness evaluation
2020-10-08 12:43:37 +08:00
harttle
b11df79b91
test: make it pass regardless timezone, #257
2020-10-08 09:38:10 +08:00
harttle
2e5ab98bfc
feat: export toPromise and toValue, see #158
2020-08-05 00:46:01 +08:00
harttle
8daf281fca
fix: throw an error if : omitted unintentionally, #212 , #208
2020-03-31 14:05:38 +08:00
harttle
479c63350a
fix: throws on invalid arguments for prepend/append, fixes #208
2020-03-24 23:57:26 +08:00
harttle
d2d6a38235
perf: introduce AST to avoid reparse
2020-03-15 02:51:25 +08:00
harttle
f7ef9b61c1
refactor: remove src/render/value.ts
2020-03-14 19:04:18 +08:00
harttle
3dfdf982c9
perf: remove transient strings to reduce memory
2020-03-14 19:04:18 +08:00
harttle
6de933897e
fix: concurrent write on LRU cache ( #200 )
2020-03-10 01:09:41 +08:00
harttle
2c428221cb
test: cases for TagMap
2020-03-07 00:58:39 +08:00
harttle
f57156bccd
fix: stable sort for undefined keys, fixes #191
2020-03-05 02:04:58 +08:00
harttle
6ea6881f08
feat: with & for in render tag, closes #195
2020-03-04 07:08:54 +08:00
harttle
df8a919f71
feat: move filters/tags to instances, fixes #188
2020-03-03 00:02:29 +08:00
harttle
870e7ec6aa
feat: globals shared between tags, see #185
2020-02-08 04:59:23 +08:00
harttle
fc0cf6fe7b
fix: expression and string literal parser, #186
2020-02-08 03:15:55 +08:00
harttle
ba5ff3f41c
feat: full syntax for strftime, close #177
...
- strftime syntax: <flags><width><modifier><conversion>
- new conversions: %n, %t
- fixed conversions: %N
- flags: _ ^ - 0 # :
- modifiers: E, O (ignored)
2019-12-15 02:28:33 +00:00
harttle
c69ad538d4
test: remove mock for strftime cases
2019-12-14 18:34:14 +00:00
harttle
60ec74f55d
feat: nested property for the where filter, #178
2019-12-13 01:15:29 +08:00
harttle
f82da11f5a
fix: reading .first, .last of Array, closes #175
2019-11-16 01:14:09 +08:00
harttle
b82fa9ed2b
pref: remove await/async from internal async calls
2019-10-26 08:57:33 -05:00
harttle
7fb01ad69a
feat: renderSync, parseAndRenderSync and renderFileSync, see #48
2019-08-26 10:15:43 -05:00
harttle
76019e9e18
refactor: rewrite expression evaluation, fix #130
2019-08-26 10:15:43 -05:00