Commit Graph
332 Commits
Author SHA1 Message Date
Harttleandharttle d4df3a0b53 refactor: make loader.shouldLoadRelative public 2021-10-16 12:30:09 +08:00
Harttleandharttle 9cfa43b8ae fix: hardcoded '/' in normalized options.fs, fixes #412, #408
Changes including:
- will not call fs.resolve when normalizing `fs`
- removed hardcoded `/`
- mandatory `fs.dirname` for relative reference
- mandatory `fs.sep`, defaults to '/'
2021-10-16 12:10:55 +08:00
Harttle 1de6adf308 test: cases for parse(<tpl>, <relative filepath>), #395 2021-10-10 20:37:26 +08:00
Harttle 822ba0be0f fix: skip root check for renderFile() 2021-10-06 18:38:58 +08:00
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
Liam BigelowandJun Yang 6dc7fada72 feat: implement forloop.name as found in ruby shopify/liquid 2021-10-04 21:33:46 +08:00
harttle afeef1d745 fix: renderToNodeStream() now emit 'error' event instead of throw 2021-10-03 22:32:00 +08:00
harttle 68c4cfcfb6 feat: renderFileToNodeStream(filepath, scope) 2021-10-03 21:21:25 +08:00
harttle b9ae479b65 feat: add layouts, partials apart from root, #395 2021-10-03 18:51:14 +08:00
Harttleandharttle 4358c9630f test: coverage to 100% 2021-10-01 15:55:31 +08:00
HarttleandJun Yang 10e8c8ff7e feat: orderedFilterParameters, closes #312 2021-09-30 22:15:09 +08:00
Steve StedmanandJun Yang fb787e8847 Fix: respect parameter order when using "for ... reversed" (#231)
* fix: spelling

* fix: respect param order for reversed

* docs: add for-reversed order details

* perf: improve performance by 4x by simplified parseFile

BREAKING CHANGES:
- previously deprecated `getTemplate()` and `getTemplateSync()` not no longer supported
- `opts` no longer support dynamic set in `parseFile()`, `renderFile()` arguments

* perf: parse filenames in parse() insteadof render()

* docs: update description of LiquidJS

Co-authored-by: harttle <[email protected]>
2021-09-30 22:15:09 +08:00
HarttleandJun 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
Harttleandharttle 6b9f872bcc feat: timezoneOffset option to specify output timezone, see #375 2021-09-27 01:54:31 +08:00
harttle cdceb25d00 perf: add cross-engines benchmark 2021-06-20 13:25:08 +08:00
Memmie LengletandJun Yang 8f9639f1d6 feat: when tag with multiple values 2021-05-06 22:52:22 +08:00
Jun Yang 3e3d84a5ed fix: operator boundary not correctly recognized, fixes #342 2021-05-04 18:13:02 +08:00
Jun Yang 251a50801c chore: dev via windows+vscode 2021-04-17 11:43:03 +08:00
Jun Yang 65487654c4 fix: capitalize filter not lower case trailing string, fixes #326 2021-04-17 10:30:57 +08:00
Jun Yang 9a9b792c63 fix: newline_to_br filter should output <br /> instead of <br/>, fixes #320 2021-03-13 17:14:10 +08:00
Jun Yang 99d14e76d7 fix: comparison for empty/nil, fixes #321 2021-03-13 17:14:08 +08:00
harttle 2e66e8b02e fix: lenientIf not working for the umd bundle, closes #313 2021-02-19 23:10:15 +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
harttle 81e11bb9c4 feat: support layout none, closes #299 2021-02-12 01:57:30 +08:00
Jason EtcovitchandJun Yang 20f559e545 fix: default to precedence 1 for custom operators 2021-02-05 23:57:36 +08:00
harttle f42c217fc0 feat: compact filter 2021-02-04 22:47:34 +08:00
Jason EtcovitchandJun Yang befc33c4eb feat: create trie programmatically in options 2021-02-04 09:11:28 +08:00
Jason EtcovitchandJun Yang 8734e2e6ce feat: rename to defaultOperators and Operators 2021-02-04 09:11:28 +08:00
Jason EtcovitchandJun Yang 18055c8855 test: add LiquidOptions#operators test 2021-02-04 09:11:28 +08:00
Jason EtcovitchandJun Yang 6a7c280f04 feat: export Operators from operator.ts 2021-02-04 09:11:28 +08:00
Jason EtcovitchandJun 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
harttle a3af44dc10 feat: support {{block.super}}, see #38 2021-01-24 02:57:48 +08:00
JoonasandJun Yang de32259bb9 fix: lint 2020-12-18 22:03:58 +08:00
JoonasandJun Yang d70cd2a1ea feat: add preserveTimezones option 2020-12-18 22:03:58 +08:00
JoonasandJun Yang e3ecfe3adc fix: simpler timezone regex and non-null offset 2020-12-18 22:03:58 +08:00
wyoziandJun Yang c16c787861 feat: parse and handle date timezone offsets 2020-12-18 22:03:58 +08:00
Alex de WergifosseandJun Yang b8e4b3337b test: add tests for keepOutputType option 2020-12-16 10:20:10 +08:00
Alex de WergifosseandJun Yang cd92e77726 feat: add option for keeping variable type in output 2020-12-16 10:20:10 +08:00
harttle e15803fae4 test: fix e2e test 2020-12-08 00:30:32 +08:00
harttle 117673a725 style: make eslint check .ts files 2020-12-08 00:24:07 +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 2bbf50171b fix: elsif is not supported for unless, fixes #268 2020-12-08 00:16:36 +08:00
harttle a492d8e23d fix: raw block not ignoring {% characters, fixes #263 2020-12-08 00:12:20 +08:00
harttle c8afa39a01 fix: enforce string-type pattern in replace, fixes #243 2020-12-08 00:08:31 +08:00