Commit Graph
102 Commits
Author SHA1 Message Date
Yang JunandGitHub f41c1fc02f fix: enforce root containment for renderFile/parseFile lookups (#870)
Made-with: Cursor
2026-04-07 23:18:53 +08:00
Yang JunandGitHub 529dd67eeb fix: use realpath for fs.contains (#867)
* fix: use realpath for fs.contains

* chore: reset file mode changes

Made-with: Cursor

* fix: Windows compat for contains/containsSync and toLiquidAsync arg order

Made-with: Cursor
2026-04-06 14:40:35 +08:00
3cd024d652 fix: path traversal vulnerability, #851 (#855)
* Fix Path Traversal fallback

* Update loader.ts

Fixed nested

* Update loader.ts

padding fix

* refactor: reuse root enforcing

* docs: update test case and docs

---------

Co-authored-by: MorielHarush <[email protected]>
2026-03-08 02:36:09 +08:00
Yang JunandGitHub e55128850e feat: allow context access in liquidMethodMissing, #808 (#820) 2025-10-06 18:34:08 +08:00
HarttleandYang Jun 38a0f510b0 fix: empty tagToken.args since 10.20.0, fixes #796 2025-02-09 22:49:40 +08:00
Jun YangandGitHub 25ef104446 fix: enumerate plain objects in where/where_exp, #785 (#788) 2025-01-04 23:41:25 +08:00
JamesandGitHub 3492ff63f4 feat: static variable analysis (#770)
* feat: static variable analysis

* Accept any iterable from `children`, `arguments`, etc.

* Test analysis of standard tags

* Use `TagToken.tokenizer` instead of creating a new one

* Test analysis of netsted tags

* Group variables by their root value

* Test analysis of nested globals and locals

* Analyze included and rendered templates WIP

* Use existing tokenizer when constructing `Hash`

* Improve test coverage

* Analyze variables from `layout` and `block` tags

* Test analysis of Jekyll style includes

* Handle variables that start with a nested variable

* Async analysis

* Test non-standard tag end to end

* Implement convenience analysis methods on the `Liquid` class

* More analysis convenience methods

* Accept string or template array

* Draft static analysis docs

* Deduplicate variables names

* Fix isolated scope global variable map

* Coerce variables to strings instead of extending String

* Private map instead of extending Map

* Fix e2e test

* Tentatively implement analysis of aliased variables

* Fix nested variable segments array

* Update docs sidebar
2024-12-28 21:35:28 +08:00
HarttleandJun Yang e3ef574674 fix: inconsistent continue behaviour, fixes #779 2024-12-22 16:32:08 +08:00
Harttle 2af297f81a fix: memoryLimit doesn't work in for tag, #776 2024-12-22 15:46:56 +08:00
Yang Jun 0b195b21eb test: case for "." path handling 2024-11-12 23:59:40 +08:00
Yang Jun d705888c8d feat: expose FilterToken to filter this, #762 2024-10-16 22:07:25 +08:00
Yang Jun 86f6bf0d31 fix: expose originalError from LiquidError, #742 2024-08-29 11:37:56 +08:00
Yang Jun ce84cd6f43 fix: ESM bundle for Node.js, #739 2024-08-28 00:31:59 +08:00
Yang Jun 68387c31ea fix: "filter is not a function" for uniq 2024-08-23 21:27:53 +08:00
Yang Jun 2d59cff0a6 fix: memory limit issue for join filter, fix #737 2024-08-23 21:27:53 +08:00
Jun YangandGitHub c6a6ef1a1f chore: check node@14 on pipeline, #728 (#731) 2024-08-16 00:55:14 +08:00
Yang Jun 21a822348f fix: parser throws on non-string input, #726 2024-07-25 20:06:12 +08:00
Harttle 22b5a12333 fix: report error for malformed else/elsif/endif/endfor, #713 2024-07-05 01:23:33 +08:00
a0ea372764 docs: fix some spelling (#708)
* spelling: according

Signed-off-by: Josh Soref <[email protected]>

* spelling: asynchronously

Signed-off-by: Josh Soref <[email protected]>

* spelling: background

Signed-off-by: Josh Soref <[email protected]>

* spelling: camel

Signed-off-by: Josh Soref <[email protected]>

* spelling: cannot

Signed-off-by: Josh Soref <[email protected]>

* spelling: case-sensitive

Signed-off-by: Josh Soref <[email protected]>

* spelling: comparison

Signed-off-by: Josh Soref <[email protected]>

* spelling: demos

Signed-off-by: Josh Soref <[email protected]>

* spelling: forloop

Signed-off-by: Josh Soref <[email protected]>

* spelling: formatters

Signed-off-by: Josh Soref <[email protected]>

* spelling: github

Signed-off-by: Josh Soref <[email protected]>

* spelling: guidelines

Signed-off-by: Josh Soref <[email protected]>

* spelling: hashes

Signed-off-by: Josh Soref <[email protected]>

* spelling: https

Signed-off-by: Josh Soref <[email protected]>

* spelling: javascript

Signed-off-by: Josh Soref <[email protected]>

* spelling: keep

Signed-off-by: Josh Soref <[email protected]>

* spelling: natural

Signed-off-by: Josh Soref <[email protected]>

* spelling: neither

Signed-off-by: Josh Soref <[email protected]>

* spelling: no longer

Signed-off-by: Josh Soref <[email protected]>

* spelling: nonexistent

Signed-off-by: Josh Soref <[email protected]>

* spelling: output

Signed-off-by: Josh Soref <[email protected]>

* spelling: polymorphism

Signed-off-by: Josh Soref <[email protected]>

* spelling: precache

Signed-off-by: Josh Soref <[email protected]>

* spelling: programmatically

Signed-off-by: Josh Soref <[email protected]>

* spelling: punctuation

Signed-off-by: Josh Soref <[email protected]>

* spelling: registration

Signed-off-by: Josh Soref <[email protected]>

* spelling: rendered

Signed-off-by: Josh Soref <[email protected]>

* spelling: synchronously

Signed-off-by: Josh Soref <[email protected]>

* spelling: thrown

Signed-off-by: Josh Soref <[email protected]>

* spelling: trimmed

Signed-off-by: Josh Soref <[email protected]>

* spelling: unbalanced

Signed-off-by: Josh Soref <[email protected]>

* chore: use example.com

* chore: fix reference for sidebar.registration

---------

Signed-off-by: Josh Soref <[email protected]>
Co-authored-by: Harttle <[email protected]>
2024-06-17 17:19:46 +08:00
Jun YangandGitHub 05223c4378 fix: contains regression (#677)
* fix: `contains` regression on string-like objects, #675

* chore: fix build docs on macos
2024-03-21 23:56:10 +08:00
f816955704 fix: in conditionals, don't render anything after an else branch (#671)
* fix: only render the first 'else' template in the case of multiples

* fix: empty else block and cases with when conditions

* fix: don't render elsif after else

* chore: Update src/tags/unless.ts

* chore: Update src/tags/if.ts

* chore: Update src/tags/case.ts

---------

Co-authored-by: Jun Yang <[email protected]>
2024-02-18 13:30:16 +08:00
Harttle dd7616acb9 fix: allow unicode to be identifiers, fixes #655 2023-11-04 21:33:29 +08:00
Jun YangandGitHub 660d9be55f feat: more flexible squared property read expression, fixes #643 (#646)
* fix: more flexible squared property read expression, fixes #643

* fix: unecessary error wrapping in browser bundles

* style: update code style and types

* perf: use token.value when evalToken
2023-08-23 00:45:49 +08:00
Jun YangandGitHub bf425c3adb fix: allow quotes in inline comment tag, fixes #628 2023-07-07 22:48:55 +08:00
Harttle 3a67eb7f1c fix: incorrect error message for browser UMD bundle 2023-06-04 12:00:32 +08:00
HarttleandJun Yang e347e603d7 feat: precise line/col for tokenization Error, #613 2023-06-04 02:06:42 +08:00
HarttleandJun Yang 0480d3317d fix: proper error message for filter syntax error, #610 2023-06-04 02:06:42 +08:00
HarttleandJun Yang 33b3c010af fix: incorrect timezone correction for DST dates, fixes #604 2023-04-25 01:28:48 +08:00
HarttleandJun Yang 9d823937cc chore: upload npm errors for failed pipeline 2023-03-20 00:41:06 +08:00
HarttleandJun Yang c6cde9cd10 chore: migrate test cases from Chai to Jest 2023-03-20 00:41:06 +08:00
Harttle 771b9b9eba style: fix code style 2023-03-03 00:14:38 +08:00
Harttle 9c0dc5fa39 fix: [expression] apply value equal for arrays, #589 2023-03-02 23:44:56 +08:00
Harttle 42d25902e8 fix: strip_html for multi line <script>/<style>/comments, #70 2023-03-02 23:01:15 +08:00
prassieandGitHub a55f44f095 Added documentation for date ordinals support in date filter via %q (#581)
* Added date ordinals support in date filter via %q

* fix: validation regex for default date format

* fix: validation regex for default date format
2023-02-04 11:31:30 +08:00
HarttleandHarttle 3f21382d43 feat: support not operator, #575 2023-01-03 01:34:03 +08:00
HarttleandHarttle aafaa0b4f9 feat: support calling date without format string, #573 2023-01-03 00:53:33 +08:00
Jun Yang fb6a9f8717 fix: type compatible with v9 tag definition, support Context as scope in various render APIs, #570 2022-12-18 12:48:06 +08:00
Jun Yang d17813ef52 fix: case should render multiple when statements 2022-12-03 00:14:47 +08:00
Jun Yang 92992689cd refactor: Tag class support in registerTag() 2022-11-27 14:04:01 +08:00
Jun Yang b115077e12 refactor: remove use of internal Context class in evalValue argument
BREAKING CHANGE: `evalValue` won't support `Context` as second argument anymore.
2022-11-27 14:04:01 +08:00
HarttleandHarttle bbf00f37bf feat: promise in expression & nested property, #533 #276 2022-08-27 23:19:16 +08:00
HarttleandHarttle 071368afe1 feat: use evalValue to parse & render expression, #527 2022-08-24 20:46:22 +08:00
HarttleandHarttle e874b4060b feat: export toValueSync & defaultOptions to evaluate expression, see #527 2022-08-15 01:53:48 +08:00
Harttle c41a5d5bab fix: throw ParseError instead of RenderError for invalid assign expression, closes #519 2022-07-15 00:41:51 +08:00
Harttle 3dc4290b56 fix: stack overflow on large number of templates, #513 2022-07-08 01:46:51 +08:00
Harttle e69a51025e fix: support integer arithmetic for divided_by, closes #465 2022-04-22 02:19:36 +08:00
Harttle 9e024ff2bc fix: contains operator does not support Drop, fixes #492 2022-04-18 00:43:18 +08:00
Harttle 049685b9a0 feat: Access array item by negative index, closes #486 2022-03-06 00:52:22 +08:00
Harttle aa955173d4 fix: corner case for concat filter without argument, #481 2022-03-02 21:21:25 +08:00
Harttle 7dfb620d30 fix: some filters throw on nil input, see #481 2022-02-27 02:07:59 +08:00