Compare commits

...
658 Commits
Author SHA1 Message Date
Yang Jun 8a7791be9e docs: add lambdatest to sponsors 2025-10-26 14:53:32 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2858271c8f docs: add skynetigor as a contributor for code (#825)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-10-23 22:23:52 +08:00
semantic-release-bot d22945ed5f chore(release): 10.23.0 [skip ci]
# [10.23.0](https://github.com/harttle/liquidjs/compare/v10.22.0...v10.23.0) (2025-10-23)

### Features

* Export specific tokens as types ([#824](https://github.com/harttle/liquidjs/issues/824)) ([4f7d2fd](https://github.com/harttle/liquidjs/commit/4f7d2fd84a8884e1009b13346d331a99b9721149))
2025-10-23 13:38:41 +00:00
Ihor PanasiukandGitHub 4f7d2fd84a feat: Export specific tokens as types (#824)
* Export specific tokens as types

* Update index.ts
2025-10-23 21:37:20 +08:00
semantic-release-bot 597ce7305f chore(release): 10.22.0 [skip ci]
# [10.22.0](https://github.com/harttle/liquidjs/compare/v10.21.1...v10.22.0) (2025-10-06)

### Bug Fixes

* math filters coerce invalid string to 0, [#813](https://github.com/harttle/liquidjs/issues/813) ([#819](https://github.com/harttle/liquidjs/issues/819)) ([e8e502c](https://github.com/harttle/liquidjs/commit/e8e502c5854c9649bf7611a671a068dc260011d1))

### Features

* allow context access in liquidMethodMissing, [#808](https://github.com/harttle/liquidjs/issues/808) ([#820](https://github.com/harttle/liquidjs/issues/820)) ([e551288](https://github.com/harttle/liquidjs/commit/e55128850e507687f9d85a012fc3a72ac2550f3b))
2025-10-06 14:45:55 +00:00
Yang Jun d7fa8ba5f1 chore: update node version for release workflow 2025-10-06 22:44:24 +08:00
Yang JunandGitHub 1b356d350d chore: fix Github artifact name (#821) 2025-10-06 22:32:34 +08:00
Yang JunandGitHub e55128850e feat: allow context access in liquidMethodMissing, #808 (#820) 2025-10-06 18:34:08 +08:00
Yang JunandGitHub e8e502c585 fix: math filters coerce invalid string to 0, #813 (#819) 2025-10-06 18:31:43 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
b8bc4db46c docs: add StreakingMan as a contributor for doc (#812)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-08-13 19:15:43 +08:00
裸奔狂甩丁丁andGitHub 68d500c18a docs: operators.md zh-cn translation (#811) 2025-08-13 19:14:47 +08:00
semantic-release-bot de12359bfd chore(release): 10.21.1 [skip ci]
## [10.21.1](https://github.com/harttle/liquidjs/compare/v10.21.0...v10.21.1) (2025-05-14)

### Bug Fixes

* block.super with strictVariables, [#806](https://github.com/harttle/liquidjs/issues/806) ([#807](https://github.com/harttle/liquidjs/issues/807)) ([025c40f](https://github.com/harttle/liquidjs/commit/025c40f0f2f13efa62193c61d2fa56943917ac3c))
2025-05-14 17:49:27 +00:00
Yang JunandGitHub 025c40f0f2 fix: block.super with strictVariables, #806 (#807) 2025-05-15 01:47:57 +08:00
Vlad GURDIGAandGitHub 2f414f8e40 docs: Fix formatting bug in echo.md (#805)
DISCLAIMER: This may not be the proper way to approach the issue.

Although the Markdown code is proper, on the website itself it is incorrectly rendered as "{{` and `}}".

The reason for the disclaimer above is that I’m imagining this may be an issue at the content rendering level, and my fix here is just a workaround of that issue. — Given this, I’ll not be offended if this PR of mine is rejected and closed. 🙂
2025-05-10 20:35:07 +08:00
Vlad GURDIGAandGitHub 40c52124d7 docs: Fix typo in options.md (#802)
Looks like just a typo.
2025-05-09 21:16:08 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
ae0c07e60b docs: add gurdiga as a contributor for doc (#804)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-05-09 20:37:59 +08:00
Vlad GURDIGAandGitHub 3b9202465e docs: A lil Markdown fix (#803)
Replaced square brackets with round ones in a link markup.
2025-05-09 20:36:49 +08:00
Harttle fc42ad7548 docs: update financial contributors 2025-04-03 21:27:48 +08:00
allcontributors[bot]andGitHub 050a7fc68e docs: add edh649 as a contributor for doc (#801) 2025-04-02 21:02:42 +08:00
Ed HantonandYang Jun 0fdc5c79da Update register-filters-tags.md
Improve documentation
2025-04-02 21:01:20 +08:00
semantic-release-bot 90d2ecb107 chore(release): 10.21.0 [skip ci]
# [10.21.0](https://github.com/harttle/liquidjs/compare/v10.20.3...v10.21.0) (2025-02-23)

### Features

* add find_index, has, and reject filters ([#799](https://github.com/harttle/liquidjs/issues/799)) ([0deb93e](https://github.com/harttle/liquidjs/commit/0deb93eeae4f530901e9a7d099bcc47207ad7385))
2025-02-23 14:59:29 +00:00
Bruno CarvalhoandGitHub 0deb93eeae feat: add find_index, has, and reject filters (#799)
* feat: add find_index, has, and reject filters

* Minor tweaks

* Change semantics of jekyllStyle, add more tests

* Some docs improvements
2025-02-23 22:57:17 +08:00
semantic-release-bot b0facc71f7 chore(release): 10.20.3 [skip ci]
## [10.20.3](https://github.com/harttle/liquidjs/compare/v10.20.2...v10.20.3) (2025-02-09)

### Bug Fixes

* empty tagToken.args since 10.20.0, fixes [#796](https://github.com/harttle/liquidjs/issues/796) ([38a0f51](https://github.com/harttle/liquidjs/commit/38a0f510b0a14baf35a368e9f07b536253394d06))
2025-02-09 14:51:09 +00:00
HarttleandYang Jun 5cb843f162 chore: migrate actions/upload-artifact to v4 2025-02-09 22:49:40 +08:00
HarttleandYang Jun 38a0f510b0 fix: empty tagToken.args since 10.20.0, fixes #796 2025-02-09 22:49:40 +08:00
Harttle 1a893f8023 docs: migrate to algolia app QJ35YOZTU4, #795 2025-02-09 22:12:04 +08:00
semantic-release-bot bf3bd54051 chore(release): 10.20.2 [skip ci]
## [10.20.2](https://github.com/harttle/liquidjs/compare/v10.20.1...v10.20.2) (2025-01-19)

### Bug Fixes

* consistent range syntax parsing, [#791](https://github.com/harttle/liquidjs/issues/791) ([a490a70](https://github.com/harttle/liquidjs/commit/a490a70da1ca2b479065c6618207bf4789db6b4f))
* context for group_by_exp/where_exp/find_exp, [#790](https://github.com/harttle/liquidjs/issues/790) ([a5070af](https://github.com/harttle/liquidjs/commit/a5070af3e4b4d1ae3b6398c6638b130e50e1cf6e))
2025-01-19 09:59:48 +00:00
HarttleandJun Yang a490a70da1 fix: consistent range syntax parsing, #791 2025-01-19 17:58:00 +08:00
HarttleandJun Yang a5070af3e4 fix: context for group_by_exp/where_exp/find_exp, #790 2025-01-19 17:53:25 +08:00
semantic-release-bot b070594fc7 chore(release): 10.20.1 [skip ci]
## [10.20.1](https://github.com/harttle/liquidjs/compare/v10.20.0...v10.20.1) (2025-01-04)

### Bug Fixes

* break/continue stops whole template, [#783](https://github.com/harttle/liquidjs/issues/783) ([5f1a4cf](https://github.com/harttle/liquidjs/commit/5f1a4cfdc9d6bde31ce86ddc88b8f4bdf52f7893))
* enumerate plain objects in where/where_exp, [#785](https://github.com/harttle/liquidjs/issues/785) ([#788](https://github.com/harttle/liquidjs/issues/788)) ([25ef104](https://github.com/harttle/liquidjs/commit/25ef104446731f4b6cb3a2e78f4d3b99efb635f4))
* preserveTimezones support for RFC2822 date, [#784](https://github.com/harttle/liquidjs/issues/784) ([59cf3c0](https://github.com/harttle/liquidjs/commit/59cf3c08dbc5f2e5b109ffcb5375ae738b5ac386))
2025-01-04 15:42:58 +00:00
Jun YangandGitHub 25ef104446 fix: enumerate plain objects in where/where_exp, #785 (#788) 2025-01-04 23:41:25 +08:00
HarttleandJun Yang 59cf3c08db fix: preserveTimezones support for RFC2822 date, #784 2025-01-04 22:46:07 +08:00
HarttleandJun Yang 5f1a4cfdc9 fix: break/continue stops whole template, #783 2025-01-04 22:15:39 +08:00
semantic-release-bot 8c32ab4f42 chore(release): 10.20.0 [skip ci]
# [10.20.0](https://github.com/harttle/liquidjs/compare/v10.19.1...v10.20.0) (2024-12-28)

### Features

* `size`, `first`, `last` support arraylike objects, [#781](https://github.com/harttle/liquidjs/issues/781) ([35a8442](https://github.com/harttle/liquidjs/commit/35a84421a622b3a6657946b9395839da2b8e154a))
* static variable analysis ([#770](https://github.com/harttle/liquidjs/issues/770)) ([3492ff6](https://github.com/harttle/liquidjs/commit/3492ff63f40abb8ff8adb8b6b0ce29408f99e19b))
2024-12-28 13:53:20 +00:00
Harttle 94a6715667 docs: zh-cn translation for static analyze features 2024-12-28 21:49:29 +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 35a84421a6 feat: size, first, last support arraylike objects, #781 2024-12-28 16:10:06 +08:00
semantic-release-bot bb08cfab1f chore(release): 10.19.1 [skip ci]
## [10.19.1](https://github.com/harttle/liquidjs/compare/v10.19.0...v10.19.1) (2024-12-22)

### Bug Fixes

* add sideEffects=false to package.json ([734eb52](https://github.com/harttle/liquidjs/commit/734eb52b987d46d33cf8f03281a3773a0f1f0e4a))
* inconsistent continue behaviour, fixes [#779](https://github.com/harttle/liquidjs/issues/779) ([e3ef574](https://github.com/harttle/liquidjs/commit/e3ef574674c5a21a37b3ffc929f514c8a3d0b866))
* memoryLimit doesn't work in for tag, [#776](https://github.com/harttle/liquidjs/issues/776) ([2af297f](https://github.com/harttle/liquidjs/commit/2af297f81ac465feb3277ba7b92f7236409370b0))
2024-12-22 08:33:44 +00: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
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
d61855bf72 docs: add timvandam as a contributor for code (#775)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-12-01 09:55:27 +08:00
Tim van DamandJun Yang 734eb52b98 fix: add sideEffects=false to package.json 2024-12-01 09:54:45 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2980260fc1 docs: add santialbo as a contributor for code (#772)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-11-17 21:38:50 +08:00
semantic-release-bot 062b351598 chore(release): 10.19.0 [skip ci]
# [10.19.0](https://github.com/harttle/liquidjs/compare/v10.18.0...v10.19.0) (2024-11-17)

### Features

* allow drops in property access ([#769](https://github.com/harttle/liquidjs/issues/769)) ([11f013b](https://github.com/harttle/liquidjs/commit/11f013bf249f1366306c1f0d728d45a95eb2df1a))
* support Jekyll style `where`, [#768](https://github.com/harttle/liquidjs/issues/768) ([9107eb1](https://github.com/harttle/liquidjs/commit/9107eb1b93f5c11dca0ee0f0d2c1c8243849c3ab))
2024-11-17 13:35:17 +00:00
HarttleandJun Yang 9107eb1b93 feat: support Jekyll style where, #768 2024-11-17 21:33:38 +08:00
Santi AlboandGitHub 11f013bf24 feat: allow drops in property access (#769) 2024-11-17 20:24:45 +08:00
Yang Jun ad039abea0 docs: add Syntax Podcast & Cartelli Emmanuel as contributor 2024-11-12 23:59:40 +08:00
Yang Jun 0b195b21eb test: case for "." path handling 2024-11-12 23:59:40 +08:00
Yang Jun 28b14901d3 docs: add context json for playground default demo, #764 2024-10-25 21:30:00 +08:00
semantic-release-bot 09aca0d7b3 chore(release): 10.18.0 [skip ci]
# [10.18.0](https://github.com/harttle/liquidjs/compare/v10.17.0...v10.18.0) (2024-10-16)

### Features

* expose FilterToken to filter `this`, [#762](https://github.com/harttle/liquidjs/issues/762) ([d705888](https://github.com/harttle/liquidjs/commit/d705888c8d46d9dd95fcb41c0fb7bfbaf647eddd))
2024-10-16 14:08:56 +00:00
Yang Jun d705888c8d feat: expose FilterToken to filter this, #762 2024-10-16 22:07:25 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
59da3fa543 docs: add Neamar as a contributor for doc (#758)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-09-28 00:50:54 +08:00
Matthieu BacconnierandGitHub 4490e4b789 Replace trimValue with trimOutput (#757)
I believe this is a type, as the config has been called trimOutputLeft/Right for 5 years: https://github.com/harttle/liquidjs/blame/83922032b79fd678237de8786f0d75fb33e6312f/src/liquid-options.ts#L54

I'm new to this library, so I could also be missing out on something, in which case feel free to close, but the trimValue options do not exist on Config.
2024-09-28 00:49:37 +08:00
semantic-release-bot 83922032b7 chore(release): 10.17.0 [skip ci]
# [10.17.0](https://github.com/harttle/liquidjs/compare/v10.16.7...v10.17.0) (2024-09-22)

### Features

* support custom key-value separator, [#752](https://github.com/harttle/liquidjs/issues/752) ([6aeed25](https://github.com/harttle/liquidjs/commit/6aeed2586a70a5bd4f878d2cb32547e35677458d))
2024-09-22 13:58:12 +00:00
Yang Jun 8e7284d19c docs: Add PakStyle.pk into financial contributors 2024-09-22 21:56:18 +08:00
Yang JunandJun Yang 6aeed2586a feat: support custom key-value separator, #752 2024-09-22 21:55:44 +08:00
Yang Jun 5ada07c2c6 docs: add Microsoft to sponsors for 6/15 donation 2024-09-15 13:28:50 +08:00
semantic-release-bot e942b5a451 chore(release): 10.16.7 [skip ci]
## [10.16.7](https://github.com/harttle/liquidjs/compare/v10.16.6...v10.16.7) (2024-08-29)

### Bug Fixes

* use CommonJS bundle to support default export ([2543461](https://github.com/harttle/liquidjs/commit/25434618808d8ab437ce4606d59114b4ad849f7f))
* use cwd to resolve npm partials for Node.JS ([e5fbdfe](https://github.com/harttle/liquidjs/commit/e5fbdfe43415c9f78408f1349873c0011f639d82))
2024-08-29 17:10:00 +00:00
Yang Jun e5fbdfe434 fix: use cwd to resolve npm partials for Node.JS 2024-08-30 01:08:39 +08:00
Yang Jun 2543461880 fix: use CommonJS bundle to support default export 2024-08-30 01:08:39 +08:00
semantic-release-bot 26e85ddfaf chore(release): 10.16.6 [skip ci]
## [10.16.6](https://github.com/harttle/liquidjs/compare/v10.16.5...v10.16.6) (2024-08-29)

### Bug Fixes

* expose originalError from LiquidError, [#742](https://github.com/harttle/liquidjs/issues/742) ([86f6bf0](https://github.com/harttle/liquidjs/commit/86f6bf0d3198354af23bcdb298c6625a6c5a4dde))
2024-08-29 03:40:15 +00:00
Yang Jun 86f6bf0d31 fix: expose originalError from LiquidError, #742 2024-08-29 11:37:56 +08:00
Yang Jun 62bb20e433 test: refactor test:demo script into demo/*/test.sh 2024-08-29 01:30:25 +08:00
semantic-release-bot da516a4fd6 chore(release): 10.16.5 [skip ci]
## [10.16.5](https://github.com/harttle/liquidjs/compare/v10.16.4...v10.16.5) (2024-08-27)

### Bug Fixes

* ESM bundle for Node.js, [#739](https://github.com/harttle/liquidjs/issues/739) ([ce84cd6](https://github.com/harttle/liquidjs/commit/ce84cd6f43c8e076ce9d2507b2b7f3395fcd1328))
2024-08-27 16:33:51 +00:00
Yang Jun 3eb307ad86 test: CI test for demos 2024-08-28 00:31:59 +08:00
Yang Jun ce84cd6f43 fix: ESM bundle for Node.js, #739 2024-08-28 00:31:59 +08:00
semantic-release-bot 7c4bd7ee68 chore(release): 10.16.4 [skip ci]
## [10.16.4](https://github.com/harttle/liquidjs/compare/v10.16.3...v10.16.4) (2024-08-23)

### Bug Fixes

* "filter is not a function" for uniq ([68387c3](https://github.com/harttle/liquidjs/commit/68387c31ead77862a634f857a64932ef07b85188))
* memory limit issue for join filter, fix [#737](https://github.com/harttle/liquidjs/issues/737) ([2d59cff](https://github.com/harttle/liquidjs/commit/2d59cff0a6162b462b4d97ebea4e0dbaf6146b65))
2024-08-23 13:29:39 +00: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
Yang Jun 292a93b738 docs: fix liquid snippet lighlight 2024-08-20 09:23:52 +08:00
Yang Jun 5b1658c823 docs: fix styles and escape 2024-08-20 03:35:37 +08:00
Yang Jun b1f0260dcb docs: Add WISMOlabs use case into README 2024-08-18 13:44:20 +08:00
semantic-release-bot 4fdbce2459 chore(release): 10.16.3 [skip ci]
## [10.16.3](https://github.com/harttle/liquidjs/compare/v10.16.2...v10.16.3) (2024-08-16)

### Bug Fixes

* support for NodeJS 15, fixes [#732](https://github.com/harttle/liquidjs/issues/732) ([4548c11](https://github.com/harttle/liquidjs/commit/4548c1140629bf270d163a403c2994d785c7f710))
2024-08-16 16:56:46 +00:00
Jun YangandGitHub e941378535 docs: add internal types in apidoc (#734)
* docs: add internal types in apidoc

* chore: downgrade package-lock version for NodeJS 14

* test: test case when performance uses Date.now
2024-08-17 00:55:24 +08:00
Yang Jun 4548c11406 fix: support for NodeJS 15, fixes #732 2024-08-16 23:40:48 +08:00
semantic-release-bot 22ba21d63f chore(release): 10.16.2 [skip ci]
## [10.16.2](https://github.com/harttle/liquidjs/compare/v10.16.1...v10.16.2) (2024-08-15)

### Bug Fixes

* support for NodeJS 14 ([85bd0d3](https://github.com/harttle/liquidjs/commit/85bd0d35a6d949a02db49ba546407fe5be17db5e))
2024-08-15 17:39:09 +00:00
Yang Jun 85bd0d35a6 fix: support for NodeJS 14 2024-08-16 01:36:42 +08:00
Yang Jun f8bb63a1bb chore: check node 14 on pipeline 2024-08-16 01:36:33 +08:00
Jun YangandGitHub c6a6ef1a1f chore: check node@14 on pipeline, #728 (#731) 2024-08-16 00:55:14 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
6fb707f9c4 docs: add vrugtehagel as a contributor for code (#730)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-08-15 22:40:05 +08:00
KoenandGitHub f03247d420 Import performance object from perf_hooks (#729) 2024-08-15 22:37:46 +08:00
semantic-release-bot ebc8daeec9 chore(release): 10.16.1 [skip ci]
## [10.16.1](https://github.com/harttle/liquidjs/compare/v10.16.0...v10.16.1) (2024-07-25)

### Bug Fixes

* parser throws on non-string input, [#726](https://github.com/harttle/liquidjs/issues/726) ([21a8223](https://github.com/harttle/liquidjs/commit/21a822348f3c315dae56fba2674ad3db0cf2f80d))
2024-07-25 12:07:55 +00:00
Yang Jun 21a822348f fix: parser throws on non-string input, #726 2024-07-25 20:06:12 +08:00
semantic-release-bot fce2899e88 chore(release): 10.16.0 [skip ci]
# [10.16.0](https://github.com/harttle/liquidjs/compare/v10.15.0...v10.16.0) (2024-07-21)

### Features

* locale support for date filter, [#567](https://github.com/harttle/liquidjs/issues/567) ([#723](https://github.com/harttle/liquidjs/issues/723)) ([e4aeb02](https://github.com/harttle/liquidjs/commit/e4aeb023fddf5ead90db209599cfd99450274658))
2024-07-21 16:41:22 +00:00
Jun YangandGitHub e4aeb023fd feat: locale support for date filter, #567 (#723) 2024-07-22 00:39:44 +08:00
semantic-release-bot 542a75fd44 chore(release): 10.15.0 [skip ci]
# [10.15.0](https://github.com/harttle/liquidjs/compare/v10.14.0...v10.15.0) (2024-07-09)

### Bug Fixes

* report error for malformed else/elsif/endif/endfor, [#713](https://github.com/harttle/liquidjs/issues/713) ([22b5a12](https://github.com/harttle/liquidjs/commit/22b5a123333a066aaf7dff580df061e7cd6aa7b2))

### Features

* DoS prevention, [#250](https://github.com/harttle/liquidjs/issues/250) ([e443068](https://github.com/harttle/liquidjs/commit/e443068cb9281883ff0fe9f755a15f52ada4e7e2))
* support in-memory template mapping, inspired by [@jg-rp](https://github.com/jg-rp) [#714](https://github.com/harttle/liquidjs/issues/714) ([df27ac6](https://github.com/harttle/liquidjs/commit/df27ac694739496982012432077fe28b1476662a))
2024-07-09 14:52:55 +00:00
Yang Jun e443068cb9 feat: DoS prevention, #250 2024-07-09 22:51:11 +08:00
Yang Jun fad00aa14e test: edge cases for map fs 2024-07-09 22:51:11 +08:00
Harttle df27ac6947 feat: support in-memory template mapping, inspired by @jg-rp #714 2024-07-08 02:25:25 +08:00
Harttle 834328b9cb docs: add @15fathoms as financial contributor 2024-07-08 02:24:58 +08:00
Harttle 22b5a12333 fix: report error for malformed else/elsif/endif/endfor, #713 2024-07-05 01:23:33 +08:00
Harttle d141c4bdd2 docs: update LiquidJS description about dependency 2024-06-25 22:59:44 +08:00
semantic-release-bot 53489641ac chore(release): 10.14.0 [skip ci]
# [10.14.0](https://github.com/harttle/liquidjs/compare/v10.13.1...v10.14.0) (2024-06-17)

### Bug Fixes

* use drop `valueOf` when evaluated as condition ([#705](https://github.com/harttle/liquidjs/issues/705)) ([a7da93f](https://github.com/harttle/liquidjs/commit/a7da93ff0f2c1c66f9c85b45ffcc1326c23254c7))

### Features

* support catching all errors, [#220](https://github.com/harttle/liquidjs/issues/220) ([#710](https://github.com/harttle/liquidjs/issues/710)) ([3b5627b](https://github.com/harttle/liquidjs/commit/3b5627b04072b1d6703ef5ba782a3a0f26fd2a60))
2024-06-17 14:52:35 +00:00
Jun YangandGitHub 3b5627b040 feat: support catching all errors, #220 (#710) 2024-06-17 22:48:57 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
612da52275 docs: add jsoref as a contributor for doc (#709)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-06-17 17:20:45 +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
Adam TannerandGitHub a7da93ff0f fix: use drop valueOf when evaluated as condition (#705) 2024-06-05 08:28:21 +08:00
semantic-release-bot 513940dfa7 chore(release): 10.13.1 [skip ci]
## [10.13.1](https://github.com/harttle/liquidjs/compare/v10.13.0...v10.13.1) (2024-05-24)

### Bug Fixes

* allow liquidMethodMissing to return any supported value type ([#698](https://github.com/harttle/liquidjs/issues/698)) ([0983f2c](https://github.com/harttle/liquidjs/commit/0983f2c42012b2b97258d0cdcb07b6d43c904814))
* isComparable full interface check ([#701](https://github.com/harttle/liquidjs/issues/701)) ([55e144a](https://github.com/harttle/liquidjs/commit/55e144a0298047349d55d8483a46b2513303d940))
2024-05-24 02:39:11 +00:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
8f700ae10a docs: add GuillermoCasalCaro as a contributor for code (#702)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-05-24 10:37:16 +08:00
55e144a029 fix: isComparable full interface check (#701)
* Improve isComparable function to ensure full Comparable interface implementation

* Deleted trailing commas

---------

Co-authored-by: Guillermo Casal Caro <[email protected]>
2024-05-24 10:35:49 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
6ca5376362 docs: add admtnnr as a contributor for code (#699)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-05-22 12:36:50 +08:00
0983f2c420 fix: allow liquidMethodMissing to return any supported value type (#698)
* fix: allow liquidMethodMissing to return any supported value type

* Update src/drop/drop.ts

Co-authored-by: Jun Yang <[email protected]>

---------

Co-authored-by: Jun Yang <[email protected]>
2024-05-22 12:35:46 +08:00
allcontributors[bot]andJun Yang 12001b6161 docs: update .all-contributorsrc [skip ci] 2024-05-14 18:21:36 +08:00
allcontributors[bot]andJun Yang 7591ddc161 docs: update README.md [skip ci] 2024-05-14 18:21:36 +08:00
Cosmin PopoviciandJun Yang 3b24f079ea docs: update broken link
updated broken link to shopify/liquid differences page
2024-05-14 18:20:54 +08:00
semantic-release-bot bd571d19d1 chore(release): 10.13.0 [skip ci]
# [10.13.0](https://github.com/harttle/liquidjs/compare/v10.12.0...v10.13.0) (2024-05-13)

### Features

* array_to_sentence_string and number_of_words filters from Jekyll, [#443](https://github.com/harttle/liquidjs/issues/443) ([50253a9](https://github.com/harttle/liquidjs/commit/50253a98caf5356d3c33e148be66f34fbe75a204))
* date filters from Jekyll ([4955e75](https://github.com/harttle/liquidjs/commit/4955e75be7f38a3fd15e71f2c192cff6f0d6e2d5))
* escape filters from Jekyll, [#443](https://github.com/harttle/liquidjs/issues/443) ([b12eb8a](https://github.com/harttle/liquidjs/commit/b12eb8ab4b58b002459725b6c0ed00159cdc15e6))
* jsonify, inspect, to_integer, normalize_whitespace filters ([842b45c](https://github.com/harttle/liquidjs/commit/842b45c96a46290a1e1ba43fc5cc7a465f4ba9de))
* slugify filter from Jekyll, [#443](https://github.com/harttle/liquidjs/issues/443) ([47ddc11](https://github.com/harttle/liquidjs/commit/47ddc1193b84bbdeb8d48457bb5aead24d5aff77))
2024-05-13 15:56:11 +00:00
Yang Jun 47ddc1193b feat: slugify filter from Jekyll, #443 2024-05-13 23:54:07 +08:00
Yang Jun 50253a98ca feat: array_to_sentence_string and number_of_words filters from Jekyll, #443 2024-05-13 00:38:52 +08:00
Yang Jun b12eb8ab4b feat: escape filters from Jekyll, #443 2024-05-12 15:05:36 +08:00
Yang Jun 4955e75be7 feat: date filters from Jekyll 2024-05-09 23:37:27 +08:00
Yang Jun 842b45c96a feat: jsonify, inspect, to_integer, normalize_whitespace filters 2024-05-06 21:10:27 +08:00
semantic-release-bot ea0eab93d1 chore(release): 10.12.0 [skip ci]
# [10.12.0](https://github.com/harttle/liquidjs/compare/v10.11.1...v10.12.0) (2024-04-28)

### Bug Fixes

* case/when array equality, [#673](https://github.com/harttle/liquidjs/issues/673) ([2b63035](https://github.com/harttle/liquidjs/commit/2b630353c478368cb36dbfcb38961b25bf48249e))

### Features

* introduce where_exp filter from Jekyll ([8c7cef9](https://github.com/harttle/liquidjs/commit/8c7cef9f95cda765164ada8d58af7d402b3d3143))
2024-04-28 15:18:37 +00:00
Yang JunandJun Yang 76a7fb738e chore: use Node@20 to build 2024-04-28 23:17:01 +08:00
Yang JunandJun Yang 2b630353c4 fix: case/when array equality, #673 2024-04-28 23:17:01 +08:00
Yang JunandJun Yang 8c7cef9f95 feat: introduce where_exp filter from Jekyll 2024-04-28 23:17:01 +08:00
Yang JunandJun Yang 303a0d44b5 docs: add customerio as contributor 2024-04-28 23:17:01 +08:00
semantic-release-bot 28ebe11d26 chore(release): 10.11.1 [skip ci]
## [10.11.1](https://github.com/harttle/liquidjs/compare/v10.11.0...v10.11.1) (2024-04-21)

### Bug Fixes

* allow %Z for TimezoneDate, update docs accordingly [#684](https://github.com/harttle/liquidjs/issues/684) ([e09657c](https://github.com/harttle/liquidjs/commit/e09657c52b5e9920256d73f99455e2e81cadf065))
* Allow `lenientIf` for multiple operands (issue [#682](https://github.com/harttle/liquidjs/issues/682)) ([#683](https://github.com/harttle/liquidjs/issues/683)) ([490ff43](https://github.com/harttle/liquidjs/commit/490ff4309cc231a25be23df5374a5d032aac144e))
2024-04-21 08:09:13 +00:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
fdec831e5c docs: add amedve as a contributor for code (#686)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-04-21 16:07:34 +08:00
Max MedveandGitHub 490ff4309c fix: Allow lenientIf for multiple operands (issue #682) (#683)
* allow `lenientIf` for multiple operands

* update tests
2024-04-21 16:04:38 +08:00
Yang JunandJun Yang e09657c52b fix: allow %Z for TimezoneDate, update docs accordingly #684 2024-04-21 15:57:43 +08:00
semantic-release-bot d48ac56824 chore(release): 10.11.0 [skip ci]
# [10.11.0](https://github.com/harttle/liquidjs/compare/v10.10.2...v10.11.0) (2024-04-14)

### Features

* group_by/group_by_exp/find/find_exp from Jekyll, [#443](https://github.com/harttle/liquidjs/issues/443) ([2b713b7](https://github.com/harttle/liquidjs/commit/2b713b721d1f355309a70ebb5846169c6c03c523))
* pop/shift/unshift filters from Jekyll ([258780e](https://github.com/harttle/liquidjs/commit/258780e9a87ce87534a6bb4336725cb1d38a2998))
2024-04-14 11:36:01 +00:00
Jun Yang 2b713b721d feat: group_by/group_by_exp/find/find_exp from Jekyll, #443 2024-04-14 19:34:07 +08:00
Jun Yang 258780e9a8 feat: pop/shift/unshift filters from Jekyll 2024-04-14 19:34:07 +08:00
Jun Yang 18d55929e5 docs: add docs for push filter 2024-04-14 19:34:07 +08:00
Jun Yang ccd83bc6bd docs: fix build status badge 2024-03-30 21:23:56 +08:00
semantic-release-bot 306b070507 chore(release): 10.10.2 [skip ci]
## [10.10.2](https://github.com/harttle/liquidjs/compare/v10.10.1...v10.10.2) (2024-03-21)

### Bug Fixes

* contains regression ([#677](https://github.com/harttle/liquidjs/issues/677)) ([05223c4](https://github.com/harttle/liquidjs/commit/05223c4378f9474f4e658af36cb8272e161d681f)), closes [#675](https://github.com/harttle/liquidjs/issues/675)
2024-03-21 15:57:46 +00: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
Harttle 01029aba87 docs: try to include all sponsors/backers 2024-03-11 22:06:17 +08:00
semantic-release-bot 902a8e4c22 chore(release): 10.10.1 [skip ci]
## [10.10.1](https://github.com/harttle/liquidjs/compare/v10.10.0...v10.10.1) (2024-02-18)

### Bug Fixes

* in conditionals, don't render anything after an else branch ([#671](https://github.com/harttle/liquidjs/issues/671)) ([f816955](https://github.com/harttle/liquidjs/commit/f81695570491ede77975de2c26a07612a2d62c28))
* Rely on equal for computing contains ([#668](https://github.com/harttle/liquidjs/issues/668)) ([1937aa1](https://github.com/harttle/liquidjs/commit/1937aa1f1dce01ee6332f39a6e658e85cbe4f30b))
2024-02-18 05:33:31 +00:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
08421ea70c docs: add joel-hamilton as a contributor for code (#674)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-02-18 13:31:18 +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
1937aa1f1d fix: Rely on equal for computing contains (#668)
* fix: rely on equal for computing contains

This change allows contains to be computed using the toValue of the items in the array.
Before this change if I had an array of "Drop" `contains` would not match against the value.

* Apply suggestions from code review

Co-authored-by: Jun Yang <[email protected]>

---------

Co-authored-by: Jun Yang <[email protected]>
2024-02-14 10:19:32 +08:00
allcontributors[bot]andJun Yang 4518a19588 docs: update .all-contributorsrc [skip ci] 2024-01-14 20:57:06 +08:00
allcontributors[bot]andJun Yang dafdfbc849 docs: update README.md [skip ci] 2024-01-14 20:57:06 +08:00
fupeng1andJun Yang 3632623456 chore: adjust typings dir 2024-01-14 20:55:59 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
85f5b327fa docs: add brunodccarvalho as a contributor for code (#662)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-12-19 20:08:24 +08:00
semantic-release-bot 9347586cb5 chore(release): 10.10.0 [skip ci]
# [10.10.0](https://github.com/harttle/liquidjs/compare/v10.9.4...v10.10.0) (2023-12-19)

### Features

* Array sum filter ([#661](https://github.com/harttle/liquidjs/issues/661)) ([629d958](https://github.com/harttle/liquidjs/commit/629d958b86a97ddf2921d2285b7c9ea83430004e))
2023-12-19 12:06:51 +00:00
629d958b86 feat: Array sum filter (#661)
* feat(filters): add array sum filter

* docs(filters): array sum filter

* docs: update versoin number in source/filters/sum.md

---------

Co-authored-by: Jun Yang <[email protected]>
2023-12-19 20:05:15 +08:00
Harttle fe978c8cd9 docs: Liquid Drops 2023-11-29 21:53:09 +08:00
semantic-release-bot 8ff9aea8ce chore(release): 10.9.4 [skip ci]
## [10.9.4](https://github.com/harttle/liquidjs/compare/v10.9.3...v10.9.4) (2023-11-04)

### Bug Fixes

* allow unicode to be identifiers, fixes [#655](https://github.com/harttle/liquidjs/issues/655) ([dd7616a](https://github.com/harttle/liquidjs/commit/dd7616acb9a71b77f39d2fa24b6f68a7caef87f1))
2023-11-04 13:36:47 +00:00
Harttle dd7616acb9 fix: allow unicode to be identifiers, fixes #655 2023-11-04 21:33:29 +08:00
allcontributors[bot]andJun Yang d75ac93390 docs: update .all-contributorsrc [skip ci] 2023-10-31 19:57:42 +08:00
allcontributors[bot]andJun Yang 2caeeda1c1 docs: update README.md [skip ci] 2023-10-31 19:57:42 +08:00
Rasmus Wriedt LarsenandJun Yang 6ebf2ee427 docs: fix typo (ans => and) 2023-10-31 19:55:19 +08:00
semantic-release-bot 3bd825afb0 chore(release): 10.9.3 [skip ci]
## [10.9.3](https://github.com/harttle/liquidjs/compare/v10.9.2...v10.9.3) (2023-10-15)

### Bug Fixes

* package version in released files ([67a5b22](https://github.com/harttle/liquidjs/commit/67a5b229ca9ccabb4aee42bbb5c9f03d4076786a))
2023-10-15 13:11:10 +00:00
Harttle 67a5b229ca fix: package version in released files 2023-10-15 21:00:03 +08:00
Harttle c1c72b53d5 test: fix test case 2023-10-15 20:21:32 +08:00
semantic-release-bot 30e364c7d0 chore(release): 10.9.2 [skip ci]
## [10.9.2](https://github.com/harttle/liquidjs/compare/v10.9.1...v10.9.2) (2023-08-28)

### Bug Fixes

* handle windows newlines on `newline_to_br` and `strip_newlines` ([88aa63f](https://github.com/harttle/liquidjs/commit/88aa63fd58b5a5824c031acc6f3e4072bedd262f))
* sort and where bug when using `strictVariables` ([8af682d](https://github.com/harttle/liquidjs/commit/8af682d2ca68de99bafd4a7055e4912eeb318f57))
2023-08-28 13:15:00 +00:00
Francisco SotoandJun Yang 8af682d2ca fix: sort and where bug when using strictVariables 2023-08-28 21:08:45 +08:00
Francisco SotoandJun Yang 88aa63fd58 fix: handle windows newlines on newline_to_br and strip_newlines 2023-08-28 21:08:05 +08:00
semantic-release-bot fce9fcfa68 chore(release): 10.9.1 [skip ci]
## [10.9.1](https://github.com/harttle/liquidjs/compare/v10.9.0...v10.9.1) (2023-08-23)

### Bug Fixes

* map filter allow nil results in strict mode, fixes [#647](https://github.com/harttle/liquidjs/issues/647) ([45adbd7](https://github.com/harttle/liquidjs/commit/45adbd7008296a94da04d21a35917f744a0f4109))
2023-08-23 16:29:27 +00:00
Harttle 45adbd7008 fix: map filter allow nil results in strict mode, fixes #647 2023-08-24 00:20:57 +08:00
semantic-release-bot 942944eae0 chore(release): 10.9.0 [skip ci]
# [10.9.0](https://github.com/harttle/liquidjs/compare/v10.8.4...v10.9.0) (2023-08-22)

### Bug Fixes

* case should allow multiple values separated by or ([b8e7e2d](https://github.com/harttle/liquidjs/commit/b8e7e2d9467b17ca786e6fb422e9579dd178de76))
* for throws undefined var with a null value with strictVariables ([dc6a301](https://github.com/harttle/liquidjs/commit/dc6a3013874872ac85f1fbe5184c74631122d851))
* remove_last was eating an extra character ([fc27313](https://github.com/harttle/liquidjs/commit/fc2731376f8ef59ac7160f97cef1fb5d94f053db))

### Features

* more flexible squared property read expression, fixes [#643](https://github.com/harttle/liquidjs/issues/643) ([#646](https://github.com/harttle/liquidjs/issues/646)) ([660d9be](https://github.com/harttle/liquidjs/commit/660d9be55f8eac16ca5ac77fd0b38b0d7f94961e))
2023-08-22 16:52:37 +00: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
Francisco SotoandJun Yang dc6a301387 fix: for throws undefined var with a null value with strictVariables 2023-08-19 23:54:32 +08:00
allcontributors[bot]andJun Yang 803a0907fc docs: update .all-contributorsrc [skip ci] 2023-08-19 23:53:44 +08:00
allcontributors[bot]andJun Yang 4427ae1fb9 docs: update README.md [skip ci] 2023-08-19 23:53:44 +08:00
David LJandJun Yang 7009a054f3 docs: fix options link in setup tutorial 2023-08-19 23:53:14 +08:00
Francisco SotoandJun Yang b8e7e2d946 fix: case should allow multiple values separated by or
This is supported by Shopify liquid.
2023-08-19 23:52:24 +08:00
allcontributors[bot]andJun Yang 4c30c660ae docs: update .all-contributorsrc [skip ci] 2023-08-17 21:43:59 +08:00
allcontributors[bot]andJun Yang d916981dad docs: update README.md [skip ci] 2023-08-17 21:43:59 +08:00
Francisco SotoandJun Yang fc2731376f fix: remove_last was eating an extra character 2023-08-17 21:43:21 +08:00
allcontributors[bot]andJun Yang 3bd8d2e557 docs: update .all-contributorsrc [skip ci] 2023-08-08 21:59:48 +08:00
allcontributors[bot]andJun Yang 5d91e3d2ef docs: update README.md [skip ci] 2023-08-08 21:59:48 +08:00
Nick ReilinghandGitHub 5facd99a27 chore: grammar/typo fixes for differences.md (#634) 2023-08-08 21:58:39 +08:00
Harttle 3f4f328572 docs: update LiquidJS contributors and users 2023-07-16 14:22:54 +08:00
Harttle a7c94eeeb5 docs: update who's using liquid 2023-07-16 14:05:16 +08:00
semantic-release-bot 2222a1be87 chore(release): 10.8.4 [skip ci]
## [10.8.4](https://github.com/harttle/liquidjs/compare/v10.8.3...v10.8.4) (2023-07-07)

### Bug Fixes

* allow quotes in inline comment tag, fixes [#628](https://github.com/harttle/liquidjs/issues/628) ([bf425c3](https://github.com/harttle/liquidjs/commit/bf425c3adb929e68fa234bee8397560a436595bb))
2023-07-07 14:54:48 +00:00
Jun YangandGitHub bf425c3adb fix: allow quotes in inline comment tag, fixes #628 2023-07-07 22:48:55 +08:00
Harttle c0bc2de76e docs: add package-lock for demos 2023-07-02 22:03:20 +08:00
Harttle 4759371102 docs: remove Patreon from docs 2023-07-02 22:03:20 +08:00
semantic-release-bot e03e053362 chore(release): 10.8.3 [skip ci]
## [10.8.3](https://github.com/harttle/liquidjs/compare/v10.8.2...v10.8.3) (2023-06-16)

### Bug Fixes

* strftime getSuffix works for all dates ([0b4e2a9](https://github.com/harttle/liquidjs/commit/0b4e2a99790347bea0ab5f7d651f2330e3054601))
2023-06-16 14:02:18 +00:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
d8691421b4 docs: add jgarber623 as a contributor for code (#624)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-06-15 21:08:11 +08:00
Jason GarberandJun Yang 0b4e2a9979 fix: strftime getSuffix works for all dates
As written, the strftime module's `getSuffix` method (responsible for
returning a date's ordinal string) works correctly for all dates in a
month _except_ 11, 12, and 13.

The existing code would return a string based on the last digit of the
date. In American English, these three dates use the `th` suffix rather
than `st`, `nd`, or `rd`.

This refactor/bug fix draws inspiration from Rails' ActiveSupport
ordinal inflector:

https://github.com/rails/rails/blob/main/activesupport/lib/active_support/locale/en.rb

The Ruby code above is designed to work with any number, so the bug fix
to this library is simpler.

The test suite is also updated with additional examples to verify the
correctness of these changes.
2023-06-15 21:01:55 +08:00
HarttleandJun Yang e401a30972 chore: split Github Actions workflows 2023-06-05 23:32:35 +08:00
semantic-release-bot 495bef2d0c chore(release): 10.8.2 [skip ci]
## [10.8.2](https://github.com/harttle/liquidjs/compare/v10.8.1...v10.8.2) (2023-06-04)

### Bug Fixes

* sample filter randomness and count=1 case ([fcb930f](https://github.com/harttle/liquidjs/commit/fcb930f0ddf2489fa74cd323f24398d7e9f7717f))
2023-06-04 05:42:37 +00:00
Harttle fcb930f0dd fix: sample filter randomness and count=1 case 2023-06-04 13:34:16 +08:00
semantic-release-bot b4e12232be chore(release): 10.8.1 [skip ci]
## [10.8.1](https://github.com/harttle/liquidjs/compare/v10.8.0...v10.8.1) (2023-06-04)

### Bug Fixes

* incorrect error message for browser UMD bundle ([3a67eb7](https://github.com/harttle/liquidjs/commit/3a67eb7f1cc7e54d2ec94a985eca4c1f147cdd61))
2023-06-04 04:05:53 +00:00
Harttle 3a67eb7f1c fix: incorrect error message for browser UMD bundle 2023-06-04 12:00:32 +08:00
Harttle fc42438283 docs: add Tomáš Hübelbauer as contributor 2023-06-04 11:41:49 +08:00
Harttle 8acf405949 docs: update ace version for LiquidJS playground 2023-06-04 02:24:06 +08:00
Harttle e9da7f39de docs: add contributing.md into docs/.../contribution-guidelines.md 2023-06-04 02:15:36 +08:00
semantic-release-bot 87e83b63fc chore(release): 10.8.0 [skip ci]
# [10.8.0](https://github.com/harttle/liquidjs/compare/v10.7.1...v10.8.0) (2023-06-03)

### Bug Fixes

* proper error message for filter syntax error, [#610](https://github.com/harttle/liquidjs/issues/610) ([0480d33](https://github.com/harttle/liquidjs/commit/0480d3317d0e46519ad2adf4ac43f53cddf467c6))
* sed invocations to work out of the box on macOS ([#615](https://github.com/harttle/liquidjs/issues/615)) ([87d4cc7](https://github.com/harttle/liquidjs/commit/87d4cc7e14ece14161285a740be63afc8a88b63c))

### Features

* Add support for the Jekyll sample filter ([#612](https://github.com/harttle/liquidjs/issues/612)) ([ba8b842](https://github.com/harttle/liquidjs/commit/ba8b84245266589e43c0e70d99e12b981d349809))
* introduce a matrix with latest Ubuntu and macOS to test the build on macOS as well ([82ba548](https://github.com/harttle/liquidjs/commit/82ba54845f4cd4e1e7660c1557e3cfaa22d68924)), closes [#615](https://github.com/harttle/liquidjs/issues/615)
* precise line/col for tokenization Error, [#613](https://github.com/harttle/liquidjs/issues/613) ([e347e60](https://github.com/harttle/liquidjs/commit/e347e603d76c039cec191d417deab34e7ef1f9a7))
2023-06-03 18:09:56 +00: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
Tomáš HübelbauerandJun Yang 82ba54845f feat: introduce a matrix with latest Ubuntu and macOS to test the build on macOS as well
Once #615 is merged, the build script should work on macOS just as well as it does on Ubuntu and with this GitHub Actions matrix we can keep ensuring that it continues to work as it should.
2023-06-03 23:16:33 +08:00
Tomas HubelbauerandJun Yang 05c478c322 docs: explain how to point the Playground at the local build
This should help anyone looking to test their changes they made to LiquidJS via the Playground site also provided in the repository.

I have also added basic information on where the Playground is and how to run it in general.
2023-06-03 23:06:18 +08:00
Tomáš HübelbauerandGitHub 87d4cc7e14 fix: sed invocations to work out of the box on macOS (#615)
* fix: sed invocations to work out of the box on macOS

These fixes make the sed invocations run on macOS but I am not sure if they will break the GNU sed invocations in return…

* fix: add macOS branches to the shell scripts

The sed command line was difficult (impossible?) to be made portable so I just added macOS conditions.

* Prototype the solution using an alias

It seems that this will not work because I keep getting "sedi: command not found".

* fix: use a Bash function instead of an alias to run sed portably

This seems to work on my local so let's see if it runs in the CI on GitHub.

* fix: use 2 spaces like the original scripts did

Not sure why VS Code went with 4.

* fix: use sedi for the build-changelog `1i\` part as well

I am curious if Ubuntu will handle the newline…
2023-06-03 22:56:25 +08:00
Tomáš HübelbauerandGitHub 202556115f chore: sed invocations for docs build to work on macOS (#615)
* fix: sed invocations to work out of the box on macOS

These fixes make the sed invocations run on macOS but I am not sure if they will break the GNU sed invocations in return…

* fix: add macOS branches to the shell scripts

The sed command line was difficult (impossible?) to be made portable so I just added macOS conditions.

* Prototype the solution using an alias

It seems that this will not work because I keep getting "sedi: command not found".

* fix: use a Bash function instead of an alias to run sed portably

This seems to work on my local so let's see if it runs in the CI on GitHub.

* fix: use 2 spaces like the original scripts did

Not sure why VS Code went with 4.

* fix: use sedi for the build-changelog `1i\` part as well

I am curious if Ubuntu will handle the newline…
2023-06-03 22:55:38 +08:00
Tomáš HübelbauerandGitHub db67118a75 test: Add tests for push (#614)
* Add support for the Jekyll sample filter

See https://jekyllrb.com/docs/liquid/filters

I am sorting the array randomly and then picking the first N items or all items if there is no sample limit.

* Add tests for `push`

I thought `push` was broken because it doesn't work on the Playground but that's not the case. Here are the tests to prove it. Taken from the `concat` tests.

* Remove the sample experiment

This got in from another branch lol.

* Recommend the build:dist command over the whole build

This one works for me locally whereas build:docs is reporting some issues.

* Return the full `build` command and explain how to use `commitlint` to workshop the message

I am working on a PR to make `build` run on macOS because it is a part of the pre-commit hook anyway so all contributors should make it work for them.

I have also shown how to check your messages against `commitlint` from the CLI because it is faster than using the VS Code GUI.
2023-05-30 00:06:22 +08:00
Tomáš HübelbauerandGitHub ba8b842452 feat: Add support for the Jekyll sample filter (#612)
* Add support for the Jekyll sample filter

See https://jekyllrb.com/docs/liquid/filters

I am sorting the array randomly and then picking the first N items or all items if there is no sample limit.

* Remove incorrect spaces before parens

Typo and copy-paste meet
2023-05-27 00:55:39 +08:00
Tomas HubelbauerandJun Yang dca9ab52b8 Add support for the Jekyll push filter
See https://jekyllrb.com/docs/liquid/filters
2023-05-24 02:08:49 +08:00
semantic-release-bot 7ceff17fcb chore(release): 10.7.1 [skip ci]
## [10.7.1](https://github.com/harttle/liquidjs/compare/v10.7.0...v10.7.1) (2023-04-24)

### Bug Fixes

* incorrect timezone correction for DST dates, fixes [#604](https://github.com/harttle/liquidjs/issues/604) ([33b3c01](https://github.com/harttle/liquidjs/commit/33b3c010af0cd17a303621331feab0119ca840ce))
* timezoneOffset ignored in date when preserveTimezones is enabled, fixes [#605](https://github.com/harttle/liquidjs/issues/605) ([21ee27b](https://github.com/harttle/liquidjs/commit/21ee27b57503f9d57f228973e1699972484e6089))
2023-04-24 17:31:07 +00:00
HarttleandJun Yang 648b158dbd chore: update CI runs-on 2023-04-25 01:28:48 +08:00
HarttleandJun Yang 33b3c010af fix: incorrect timezone correction for DST dates, fixes #604 2023-04-25 01:28:48 +08:00
HarttleandJun Yang 21ee27b575 fix: timezoneOffset ignored in date when preserveTimezones is enabled, fixes #605 2023-04-25 01:28:48 +08:00
semantic-release-bot c2a8365054 chore(release): 10.7.0 [skip ci]
# [10.7.0](https://github.com/harttle/liquidjs/compare/v10.6.2...v10.7.0) (2023-03-21)

### Bug Fixes

* update remove.md ([#601](https://github.com/harttle/liquidjs/issues/601)) ([1bddd60](https://github.com/harttle/liquidjs/commit/1bddd60b0191032d324526292027bc7fcd190dc1))

### Features

* JSON format by `space` in `json` filter ([7b87ea8](https://github.com/harttle/liquidjs/commit/7b87ea82d3d63420e548743c5a84a073f0cdad22))
2023-03-21 16:57:29 +00:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
b2a1dc972e docs: add mahyar-pasarzangene as a contributor for doc (#602)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-03-22 00:55:05 +08:00
Mahyar PasarzangeneandGitHub 1bddd60b01 fix: update remove.md (#601)
The output was wrong. Filter would replace the rain all over the text.
2023-03-22 00:54:30 +08:00
Jun Yang 7b87ea82d3 feat: JSON format by space in json filter 2023-03-22 00:08:24 +08:00
allcontributors[bot]andJun Yang 8037f7b4a4 docs: update .all-contributorsrc [skip ci] 2023-03-20 23:10:49 +08:00
allcontributors[bot]andJun Yang 75aba92733 docs: update README.md [skip ci] 2023-03-20 23:10:49 +08:00
Jun Yang b9f8d85c65 chore: add PR title checker 2023-03-20 23:09:19 +08:00
BaNganandJun Yang e50267feaa Update differences.md
- Shopify also has `json` filter, I think it is equivalent to liquidJS `json`
2023-03-20 22:58:46 +08:00
Harttle 04d62f070a docs: update docs pipeline 2023-03-20 00:56:44 +08:00
semantic-release-bot d04ccd79c9 chore(release): 10.6.2 [skip ci]
## [10.6.2](https://github.com/harttle/liquidjs/compare/v10.6.1...v10.6.2) (2023-03-19)

### Bug Fixes

* sample FS in render-file.md ([#594](https://github.com/harttle/liquidjs/issues/594)) ([4542ddc](https://github.com/harttle/liquidjs/commit/4542ddcfc3d5e245112a119bf22f0e00cb925791))
2023-03-19 16:43:24 +00:00
HarttleandJun Yang 9d823937cc chore: upload npm errors for failed pipeline 2023-03-20 00:41:06 +08:00
HarttleandJun Yang da93102c1c chore: upgrade API doc to latest typedoc, fixes #593 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
allcontributors[bot]andJun Yang dccb90c591 docs: update .all-contributorsrc [skip ci] 2023-03-19 23:44:13 +08:00
allcontributors[bot]andJun Yang 228a5c3bed docs: update README.md [skip ci] 2023-03-19 23:44:13 +08:00
bobgubkoandGitHub 4542ddcfc3 fix: sample FS in render-file.md (#594) 2023-03-19 23:42:41 +08:00
Jun Yang 2def145cf6 docs: update docs for ownPropertyOnly, #588 2023-03-04 00:21:41 +08:00
semantic-release-bot 14e059c933 chore(release): 10.6.1 [skip ci]
## [10.6.1](https://github.com/harttle/liquidjs/compare/v10.6.0...v10.6.1) (2023-03-02)

### Bug Fixes

* [expression] apply value equal for arrays, [#589](https://github.com/harttle/liquidjs/issues/589) ([9c0dc5f](https://github.com/harttle/liquidjs/commit/9c0dc5fa39a31d477a5c5a2c5212034174bf0516))
* strip_html for multi line <script>/<style>/comments, [#70](https://github.com/harttle/liquidjs/issues/70) ([42d2590](https://github.com/harttle/liquidjs/commit/42d25902e855d3c06d5ead071bf55604f495c205))
2023-03-02 16:17:49 +00: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
Jun Yang d4e519c4a6 chore: update build badge, coverage to 100%, mv DEFAULT_FMT to defaultOptions 2023-02-23 01:05:54 +08:00
semantic-release-bot 5f4a004e90 chore(release): 10.6.0 [skip ci]
# [10.6.0](https://github.com/harttle/liquidjs/compare/v10.5.0...v10.6.0) (2023-02-22)

### Features

* LiquidOptions.dateFormat to override default date format ([#587](https://github.com/harttle/liquidjs/issues/587)) ([3fb6646](https://github.com/harttle/liquidjs/commit/3fb66465c6fe1bf4dc2e1ace9157c23d0fc8f859))
2023-02-22 16:00:10 +00:00
prassieandGitHub 3fb66465c6 feat: LiquidOptions.dateFormat to override default date format (#587)
doc: updates related to LiquidOptions.dateFormat
doc: revamped the date filter doc for easier reference
2023-02-22 23:56:33 +08:00
semantic-release-bot d9cac4efca chore(release): 10.5.0 [skip ci]
# [10.5.0](https://github.com/harttle/liquidjs/compare/v10.4.0...v10.5.0) (2023-02-14)

### Bug Fixes

* "ownPropertyOnly" not respected when passed via "renderOptions" ([d489916](https://github.com/harttle/liquidjs/commit/d489916231779149e110183400e3e597b8ee02ba))

### Features

* Adds support for options to CLI and improves usability ([#586](https://github.com/harttle/liquidjs/issues/586)) ([24c8a1e](https://github.com/harttle/liquidjs/commit/24c8a1e3722e5359f02934e2814f9abfa888ee86))
2023-02-14 15:06:52 +00:00
Harttle 8ef920928c docs: add slavivanov and DaRosenberg into contributor list 2023-02-14 22:57:25 +08:00
Slav IvanovandHarttle d489916231 fix: "ownPropertyOnly" not respected when passed via "renderOptions" 2023-02-14 22:39:38 +08:00
24c8a1e372 feat: Adds support for options to CLI and improves usability (#586)
* Improved UX of CLI

* Updated docs and setup tutorial

* Corrected version number in TODO comments

* Downgraded lock file version

* Restored previous lock file

* Removed --keep-output-type option

* Switch to using async IO to avoid problems stdin in some scenarios

https://stackoverflow.com/questions/40362369/stdin-read-fails-on-some-input

https://stackoverflow.com/questions/40362369/stdin-read-fails-on-some-input

* Addressed feedback from code review

* Changed to curl-like systax for specifing inputs as literals, paths or stdin

---------

Co-authored-by: Daniel Rosenberg <[email protected]>
2023-02-14 22:03:00 +08:00
allcontributors[bot]andJun Yang a6618538d1 docs: update .all-contributorsrc [skip ci] 2023-02-04 11:33:02 +08:00
allcontributors[bot]andJun Yang c0c3c07ba1 docs: update README.md [skip ci] 2023-02-04 11:33:02 +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
Jun Yang 7f76e1311f docs: list sponsors & backers separately on liquidjs.com 2023-01-22 21:37:47 +08:00
semantic-release-bot 312000366d chore(release): 10.4.0 [skip ci]
# [10.4.0](https://github.com/harttle/liquidjs/compare/v10.3.3...v10.4.0) (2023-01-02)

### Features

* support `not` operator, [#575](https://github.com/harttle/liquidjs/issues/575) ([3f21382](https://github.com/harttle/liquidjs/commit/3f21382d43cafa1e32162e58adabd22d5c3709ed))
* support calling `date` without format string, [#573](https://github.com/harttle/liquidjs/issues/573) ([aafaa0b](https://github.com/harttle/liquidjs/commit/aafaa0b4f9e84f466fbcc2cb2ae37fe8704c5272))
2023-01-02 17:42:18 +00: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
semantic-release-bot 964e5e8961 chore(release): 10.3.3 [skip ci]
## [10.3.3](https://github.com/harttle/liquidjs/compare/v10.3.2...v10.3.3) (2022-12-18)

### Bug Fixes

* type compatible with v9 tag definition, support `Context` as scope in various render APIs, [#570](https://github.com/harttle/liquidjs/issues/570) ([fb6a9f8](https://github.com/harttle/liquidjs/commit/fb6a9f8717cd57522d53687da7e4718b28a7f68a))
2022-12-18 04:58:05 +00: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
semantic-release-bot 7526d4062d chore(release): 10.3.2 [skip ci]
## [10.3.2](https://github.com/harttle/liquidjs/compare/v10.3.1...v10.3.2) (2022-12-13)

### Bug Fixes

* re-export error classes, [#569](https://github.com/harttle/liquidjs/issues/569) ([2663ee1](https://github.com/harttle/liquidjs/commit/2663ee16a066c74cbd387fe40154fdeb2136f35a))
2022-12-13 18:16:48 +00:00
HarttleandHarttle 2663ee16a0 fix: re-export error classes, #569 2022-12-14 02:14:03 +08:00
HarttleandHarttle d24655887f docs: update docs and demo for Value usage, fixes #568 2022-12-14 02:14:03 +08:00
semantic-release-bot a9f93d7235 chore(release): 10.3.1 [skip ci]
## [10.3.1](https://github.com/harttle/liquidjs/compare/v10.3.0...v10.3.1) (2022-12-12)

### Bug Fixes

* support `Context` as `evalValue` parameter, [#568](https://github.com/harttle/liquidjs/issues/568) ([0f4916b](https://github.com/harttle/liquidjs/commit/0f4916bc5a93f5e744e4246336c68f2e89774272))
2022-12-12 11:48:42 +00:00
HarttleandHarttle 0f4916bc5a fix: support Context as evalValue parameter, #568 2022-12-12 19:41:29 +08:00
semantic-release-bot f4a033ecea chore(release): 10.3.0 [skip ci]
# [10.3.0](https://github.com/harttle/liquidjs/compare/v10.2.0...v10.3.0) (2022-12-11)

### Features

* support disable outputEscape for specific filters, [#565](https://github.com/harttle/liquidjs/issues/565) ([e6db371](https://github.com/harttle/liquidjs/commit/e6db371519f0fb3b0068347cfb2016aed386c8fa))
2022-12-11 18:35:51 +00:00
Jun Yang 5ac3765612 chore: update liquid options to match raw filters 2022-12-12 02:32:50 +08:00
Jun Yang e6db371519 feat: support disable outputEscape for specific filters, #565 2022-12-12 02:17:18 +08:00
Jun Yang a2d949209d docs: doc for timezone parameter of date filter, #553 2022-12-12 01:35:40 +08:00
dependabot[bot]andJun Yang 08a0c1322c chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /docs
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-12-03 00:20:10 +08:00
semantic-release-bot dad75ee877 chore(release): 10.2.0 [skip ci]
# [10.2.0](https://github.com/harttle/liquidjs/compare/v10.1.0...v10.2.0) (2022-12-02)

### Bug Fixes

* `case` should render multiple `when` statements ([d17813e](https://github.com/harttle/liquidjs/commit/d17813ef5217264bd08f741b0e1f713bedf2d464))

### Features

* add remove_last filter ([6c3f1c1](https://github.com/harttle/liquidjs/commit/6c3f1c1e0c0c5d30ef77eaf20df65e149e51e693))
* add replace_last filter ([b4d1e27](https://github.com/harttle/liquidjs/commit/b4d1e27420fcf36ae6d5dbc92cfe4a26299690f2))
2022-12-02 16:18:42 +00:00
Jun Yang d17813ef52 fix: case should render multiple when statements 2022-12-03 00:14:47 +08:00
Jun Yang 46ffe036a8 docs: zh-cn translation for replace_last, remove_last 2022-12-02 23:54:58 +08:00
dependabot[bot]andJun Yang f47d91a9a6 chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-12-02 23:50:08 +08:00
James PriorandJun Yang 8a1efc0f2e docs: fix remove_first example output 2022-12-02 23:49:59 +08:00
James PriorandJun Yang ff4fd44666 docs: remove_last and replace_last 2022-12-02 23:48:50 +08:00
James PriorandJun Yang 6c3f1c1e0c feat: add remove_last filter 2022-12-02 23:48:50 +08:00
James PriorandJun Yang b4d1e27420 feat: add replace_last filter 2022-12-02 23:48:50 +08:00
semantic-release-bot 6f0a68080c chore(release): 10.1.0 [skip ci]
# [10.1.0](https://github.com/harttle/liquidjs/compare/v10.0.0...v10.1.0) (2022-11-29)

### Features

* timezone name for `opts.timezoneOffset` and `date` argument, fixes [#553](https://github.com/harttle/liquidjs/issues/553) ([89c6c76](https://github.com/harttle/liquidjs/commit/89c6c7676d40f23090472a28cbf2fb22f93daad3))
2022-11-29 16:25:22 +00:00
HarttleandHarttle 89c6c7676d feat: timezone name for opts.timezoneOffset and date argument, fixes #553 2022-11-30 00:20:12 +08:00
Jun Yang b7ab357964 docs: update CHANGELOG 2022-11-27 18:02:07 +08:00
semantic-release-bot 9b9ef374a8 chore(release): 10.0.0 [skip ci]
# [10.0.0](https://github.com/harttle/liquidjs/compare/v9.43.0...v10.0.0) (2022-11-27)

### chore

* rename filters to snake style, [#487](https://github.com/harttle/liquidjs/issues/487) ([ff112a4](https://github.com/harttle/liquidjs/commit/ff112a4750f91475e9eccdb301d7a468e895f6ca))

### Code Refactoring

* `_evalToken` renamed to `evalToken` ([4e1a30a](https://github.com/harttle/liquidjs/commit/4e1a30a20c579408c87f2d28b9b6ec8e1dda65cc))
* change `ownPropertyOnly` default value to `true` ([7eb6216](https://github.com/harttle/liquidjs/commit/7eb621601c2b05d6e379e5ce42219f2b1f556208))
* delay creation of `operatorsTrie` and hide this implementation ([bb58d3e](https://github.com/harttle/liquidjs/commit/bb58d3e549dc5a5e067895ec4a0b3257b434f225))
* remove `toThenable` export ([ffefd91](https://github.com/harttle/liquidjs/commit/ffefd91fbc0195c589c8c34ae80f2017acfe557c))
* remove use of internal `Context` class in `evalValue` argument ([b115077](https://github.com/harttle/liquidjs/commit/b115077e122a7b90e7972d58174d68aea8edd7bf))

### Performance Improvements

* target Node.js 14 for cjs bundle (main entry) ([1f6ce7c](https://github.com/harttle/liquidjs/commit/1f6ce7c8224123cea318d1aa6c12aa091d6e0518))

### BREAKING CHANGES

* `evalToken` now returns a generator (LiquidJS async), which is different from `evalToken` in previous LiquidJS versions.
* main entry need Node.js>=14 to run, you can build LiquidJS by your own by using ESM entry.
* `ownPropertyOnly` default value changed to `true`
* `<liquidjs>.toThenable` is removed, use `<liquidjs>.toPromise` instead
* `evalValue` won't support `Context` as second argument anymore.
* use `operators` instead of `operatorsTrie` as Tokenizer constructor argument, #500
* keys in `<liquidjs>.filters` are now in snake case (instead of camel case), identical to that in Liquid template.
2022-11-27 09:51:43 +00:00
dependabot[bot]andJun Yang 5bbdc08eff chore(deps): bump minimatch from 3.0.4 to 3.1.2
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-11-27 17:47:55 +08:00
Jun Yang 1380ac931a refactor: more consistent tags to make it easier to iterate over, #524 2022-11-27 17:29:44 +08:00
Jun Yang 4e1a30a20c refactor: _evalToken renamed to evalToken
BREAKING CHANGE: `evalToken` now returns a generator (LiquidJS async), which is different from `evalToken` in previous LiquidJS versions.
2022-11-27 14:04:02 +08:00
Jun Yang 92992689cd refactor: Tag class support in registerTag() 2022-11-27 14:04:01 +08:00
Jun Yang 1f6ce7c822 perf: target Node.js 14 for cjs bundle (main entry)
BREAKING CHANGE: main entry need Node.js>=14 to run, you can build LiquidJS by your own by using ESM entry.
2022-11-27 14:04:01 +08:00
Jun Yang 7eb621601c refactor: change ownPropertyOnly default value to true
BREAKING CHANGE: `ownPropertyOnly` default value changed to `true`
2022-11-27 14:04:01 +08:00
Jun Yang ffefd91fbc refactor: remove toThenable export
BREAKING CHANGE: `<liquidjs>.toThenable` is removed, use `<liquidjs>.toPromise` instead
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
Jun Yang bb58d3e549 refactor: delay creation of operatorsTrie and hide this implementation
BREAKING CHANGE: use `operators` instead of `operatorsTrie` as Tokenizer constructor argument, #500
2022-11-27 14:04:01 +08:00
Jun Yang ff112a4750 chore: rename filters to snake style, #487
BREAKING CHANGE: keys in `<liquidjs>.filters` are now in snake case (instead of camel case), identical to that in Liquid template.
2022-11-27 14:04:00 +08:00
semantic-release-bot 907c4dea06 chore(release): 9.43.0 [skip ci]
# [9.43.0](https://github.com/harttle/liquidjs/compare/v9.42.1...v9.43.0) (2022-11-27)

### Features

* support timezone offset argument for date filter, [#553](https://github.com/harttle/liquidjs/issues/553) ([7a71485](https://github.com/harttle/liquidjs/commit/7a714855df9ba188e2e82839d248f6623ce94a87))
2022-11-27 05:50:17 +00:00
Jun Yang 7a714855df feat: support timezone offset argument for date filter, #553 2022-11-27 13:46:51 +08:00
dependabot[bot]andJun Yang cd918ccb85 chore(deps): bump minimatch from 3.0.4 to 3.1.2 in /docs
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-11-14 17:24:50 +08:00
HarttleandHarttle 8061e559ac docs: fix tags sidebar translation 2022-10-23 18:16:55 +08:00
allcontributors[bot]andJun Yang 33e97db903 docs: update .all-contributorsrc [skip ci] 2022-10-22 23:59:12 +08:00
allcontributors[bot]andJun Yang 9cfc8fd2df docs: update README.md [skip ci] 2022-10-22 23:59:12 +08:00
f62b2109f2 docs: add echo and liquid tags Chinese translation (#549)
* docs: add echo and liquid tags chinese translation

* Update docs/source/zh-cn/tags/echo.md

Co-authored-by: Jun Yang <[email protected]>

* Update docs/source/zh-cn/tags/echo.md

Co-authored-by: Jun Yang <[email protected]>

* Update docs/source/zh-cn/tags/echo.md

Co-authored-by: Jun Yang <[email protected]>

* Update Liquid.md

* Update Liquid.md

Co-authored-by: Jun Yang <[email protected]>
2022-10-22 23:56:31 +08:00
semantic-release-bot bf6b5c7da1 chore(release): 9.42.1 [skip ci]
## [9.42.1](https://github.com/harttle/liquidjs/compare/v9.42.0...v9.42.1) (2022-10-21)

### Bug Fixes

* truncatewords should use at least one word, [#537](https://github.com/harttle/liquidjs/issues/537) ([32f613f](https://github.com/harttle/liquidjs/commit/32f613fb43e90f97364ee6a020589992dbb553cf))
2022-10-21 16:58:08 +00:00
dependabot[bot]andJun Yang a58fe449e3 chore(deps): bump minimist and hexo-renderer-swig in /docs
Bumps [minimist](https://github.com/minimistjs/minimist) to 1.2.7 and updates ancestor dependency [hexo-renderer-swig](https://github.com/hexojs/hexo-renderer-swig). These dependencies need to be updated together.


Updates `minimist` from 1.2.5 to 1.2.7
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

Updates `hexo-renderer-swig` from 1.1.0 to 2.0.0
- [Release notes](https://github.com/hexojs/hexo-renderer-swig/releases)
- [Commits](https://github.com/hexojs/hexo-renderer-swig/commits)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
- dependency-name: hexo-renderer-swig
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-22 00:55:15 +08:00
dependabot[bot]andJun Yang 99516cb75f chore(deps): bump semver-regex from 2.0.0 to 3.1.4
Bumps [semver-regex](https://github.com/sindresorhus/semver-regex) from 2.0.0 to 3.1.4.
- [Release notes](https://github.com/sindresorhus/semver-regex/releases)
- [Commits](https://github.com/sindresorhus/semver-regex/compare/v2.0.0...v3.1.4)

---
updated-dependencies:
- dependency-name: semver-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-22 00:53:04 +08:00
dependabot[bot]andJun Yang 850ab0c749 chore(deps): bump ansi-regex from 3.0.0 to 3.0.1
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-22 00:52:53 +08:00
HarttleandHarttle 33c7c8f301 docs: demo for using LiquidJS with webpack 2022-10-22 00:39:18 +08:00
HarttleandHarttle 32f613fb43 fix: truncatewords should use at least one word, #537 2022-10-21 14:40:25 +08:00
Jun YangandGitHub 71a1dc6e72 docs: update README 2022-10-18 03:06:14 +08:00
Jun YangandGitHub 375a19b0fd chore: update funding.yml 2022-10-18 03:01:12 +08:00
Jun YangandGitHub 4e17fdc3b1 docs: update README.md 2022-10-18 02:41:14 +08:00
allcontributors[bot]andJun Yang 01c25044ac docs: update .all-contributorsrc [skip ci] 2022-10-08 23:04:19 +08:00
allcontributors[bot]andJun Yang 4a9b467c1b docs: update README.md [skip ci] 2022-10-08 23:04:19 +08:00
honglandJun Yang 78f2120a85 Update intro-to-liquid.md 2022-10-08 23:02:56 +08:00
dependabot[bot]andJun Yang adfc27c480 chore(deps): bump moment-timezone from 0.5.28 to 0.5.37 in /docs
Bumps [moment-timezone](https://github.com/moment/moment-timezone) from 0.5.28 to 0.5.37.
- [Release notes](https://github.com/moment/moment-timezone/releases)
- [Changelog](https://github.com/moment/moment-timezone/blob/develop/changelog.md)
- [Commits](https://github.com/moment/moment-timezone/compare/0.5.28...0.5.37)

---
updated-dependencies:
- dependency-name: moment-timezone
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-09-02 23:30:27 +08:00
semantic-release-bot 0075be9e6e chore(release): 9.42.0 [skip ci]
# [9.42.0](https://github.com/harttle/liquidjs/compare/v9.41.0...v9.42.0) (2022-08-27)

### Features

* promise in expression & nested property, [#533](https://github.com/harttle/liquidjs/issues/533) [#276](https://github.com/harttle/liquidjs/issues/276) ([bbf00f3](https://github.com/harttle/liquidjs/commit/bbf00f37bf6080d38ebc258d1921d3ff0d504186))
2022-08-27 15:23:22 +00:00
HarttleandHarttle bbf00f37bf feat: promise in expression & nested property, #533 #276 2022-08-27 23:19:16 +08:00
semantic-release-bot 0997530bab chore(release): 9.41.0 [skip ci]
# [9.41.0](https://github.com/harttle/liquidjs/compare/v9.40.0...v9.41.0) (2022-08-24)

### Features

* use evalValue to parse & render expression, [#527](https://github.com/harttle/liquidjs/issues/527) ([071368a](https://github.com/harttle/liquidjs/commit/071368afe1c4fd36ebdb0e1d300c367db1766f7f))
2022-08-24 12:59:20 +00:00
HarttleandHarttle 071368afe1 feat: use evalValue to parse & render expression, #527 2022-08-24 20:46:22 +08:00
dependabot[bot]andJun Yang 2089b9bb6c chore(deps): bump path-parse and path-parse
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) and [path-parse](https://github.com/jbgutierrez/path-parse). These dependencies needed to be updated together.

Updates `path-parse` from 1.0.7 to 1.0.7
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/compare/v1.0.7...v1.0.7)

Updates `path-parse` from 1.0.6 to 1.0.7
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/compare/v1.0.7...v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-08-20 23:58:19 +08:00
semantic-release-bot fd7002f6bb chore(release): 9.40.0 [skip ci]
# [9.40.0](https://github.com/harttle/liquidjs/compare/v9.39.2...v9.40.0) (2022-08-14)

### Bug Fixes

* target ES6 for ESM bundles, fixes [#526](https://github.com/harttle/liquidjs/issues/526) ([905a6dd](https://github.com/harttle/liquidjs/commit/905a6dd1491705c1154b6679a67c1eb1ffe7eef5))

### Features

* export toValueSync & defaultOptions to evaluate expression, see [#527](https://github.com/harttle/liquidjs/issues/527) ([e874b40](https://github.com/harttle/liquidjs/commit/e874b4060b46195e05a5cc6690626bdaa532154c))
2022-08-14 18:43:29 +00:00
HarttleandHarttle 905a6dd149 fix: target ES6 for ESM bundles, fixes #526 2022-08-15 02:34:23 +08:00
HarttleandHarttle e874b4060b feat: export toValueSync & defaultOptions to evaluate expression, see #527 2022-08-15 01:53:48 +08:00
semantic-release-bot 753e8f94c0 chore(release): 9.39.2 [skip ci]
## [9.39.2](https://github.com/harttle/liquidjs/compare/v9.39.1...v9.39.2) (2022-07-21)

### Bug Fixes

* expression support Drop.valueOf, fixes [#522](https://github.com/harttle/liquidjs/issues/522) ([4ad383d](https://github.com/harttle/liquidjs/commit/4ad383d9beb57f5683805decc1851778db64aea4))
2022-07-21 15:04:28 +00:00
dependabot[bot]andJun Yang 0a1d60453e chore(deps): bump terser from 4.6.7 to 4.8.1 in /docs
Bumps [terser](https://github.com/terser/terser) from 4.6.7 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-21 23:01:24 +08:00
HarttleandHarttle 4ad383d9be fix: expression support Drop.valueOf, fixes #522 2022-07-21 01:21:58 +08:00
semantic-release-bot 66eb3b842a chore(release): 9.39.1 [skip ci]
## [9.39.1](https://github.com/harttle/liquidjs/compare/v9.39.0...v9.39.1) (2022-07-14)

### Bug Fixes

* throw ParseError instead of RenderError for invalid assign expression, closes [#519](https://github.com/harttle/liquidjs/issues/519) ([c41a5d5](https://github.com/harttle/liquidjs/commit/c41a5d5babf85ccedbcb3b6f9a3cf5c326f72ae1))
2022-07-14 16:45:29 +00:00
Harttle c41a5d5bab fix: throw ParseError instead of RenderError for invalid assign expression, closes #519 2022-07-15 00:41:51 +08:00
semantic-release-bot 0aca2dd8c1 chore(release): 9.39.0 [skip ci]
# [9.39.0](https://github.com/harttle/liquidjs/compare/v9.38.0...v9.39.0) (2022-07-09)

### Bug Fixes

* for tag not respecting Drop#valueOf(), fixes [#515](https://github.com/harttle/liquidjs/issues/515) ([c3e51ca](https://github.com/harttle/liquidjs/commit/c3e51caa701fd4449ed5257e23569a37ef12dea2))

### Features

* iteration protocols ([a19feea](https://github.com/harttle/liquidjs/commit/a19feea7c46fc476139a150bda051f485328afe8))
2022-07-09 16:31:12 +00:00
Harttle 4289b4e804 refactor: rename toValue to toValueSync 2022-07-10 00:24:00 +08:00
Harttle c3e51caa70 fix: for tag not respecting Drop#valueOf(), fixes #515 2022-07-09 22:21:51 +08:00
James PriorandJun Yang a19feea7c4 feat: iteration protocols 2022-07-09 18:21:54 +08:00
semantic-release-bot e87f068067 chore(release): 9.38.0 [skip ci]
# [9.38.0](https://github.com/harttle/liquidjs/compare/v9.37.0...v9.38.0) (2022-07-07)

### Bug Fixes

* stack overflow on large number of templates, [#513](https://github.com/harttle/liquidjs/issues/513) ([3dc4290](https://github.com/harttle/liquidjs/commit/3dc4290b56265cfafbee8d9836e912d9b8492f90))

### Features

* inline comment tag ([#514](https://github.com/harttle/liquidjs/issues/514)) ([2f87708](https://github.com/harttle/liquidjs/commit/2f8770898963e35ac4491f6975a8abd03dc09067))
2022-07-07 19:06:27 +00:00
dependabot[bot]andJun Yang 392b859381 chore(deps): bump moment from 2.29.2 to 2.29.4 in /docs
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-08 03:00:36 +08:00
Harttle ed95d9a760 chore: update to node 16 2022-07-08 02:56:39 +08:00
Harttle 0f824355fa docs: zh-cn doc for inline comment 2022-07-08 01:59:09 +08:00
Harttle 3dc4290b56 fix: stack overflow on large number of templates, #513 2022-07-08 01:46:51 +08:00
jg-rpandGitHub 2f87708989 feat: inline comment tag (#514)
* style: remove unnecessary intermediate constant

* feat: add inline comment tag

* refactor: use readIdentifier when reading tag names

* docs: add inline comment tag
2022-07-08 01:46:15 +08:00
dependabot[bot]andJun Yang 4a0186d62a chore(deps-dev): bump jsdom from 13.2.0 to 16.5.0
Bumps [jsdom](https://github.com/jsdom/jsdom) from 13.2.0 to 16.5.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/13.2.0...16.5.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-02 20:59:55 +08:00
dependabot[bot]andJun Yang c9e4220c88 chore(deps-dev): bump semantic-release from 17.2.3 to 19.0.3
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 17.2.3 to 19.0.3.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](https://github.com/semantic-release/semantic-release/compare/v17.2.3...v19.0.3)

---
updated-dependencies:
- dependency-name: semantic-release
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-10 23:49:21 +08:00
Jun YangandGitHub bb8f8f569d docs: update security policy 2022-05-17 23:53:20 +08:00
HarttleandHarttle 2f6d84befc test: cases for async variables 2022-05-03 13:31:25 +08:00
semantic-release-bot 463a165e5e chore(release): 9.37.0 [skip ci]
# [9.37.0](https://github.com/harttle/liquidjs/compare/v9.36.2...v9.37.0) (2022-04-21)

### Bug Fixes

* support integer arithmetic for `divided_by`, closes [#465](https://github.com/harttle/liquidjs/issues/465) ([e69a510](https://github.com/harttle/liquidjs/commit/e69a51025efa7dec7d60d0067200a1466988ebbc))

### Features

* automatic output escaping, closes [#500](https://github.com/harttle/liquidjs/issues/500) ([f88490c](https://github.com/harttle/liquidjs/commit/f88490cd3cd0b5316c43c3ca76837544d99ce0b0))
2022-04-21 18:23:02 +00:00
Harttle f88490cd3c feat: automatic output escaping, closes #500 2022-04-22 02:19:36 +08:00
Harttle e69a51025e fix: support integer arithmetic for divided_by, closes #465 2022-04-22 02:19:36 +08:00
allcontributors[bot]andJun Yang ace5309c08 docs: update .all-contributorsrc [skip ci] 2022-04-19 23:55:10 +08:00
allcontributors[bot]andJun Yang 5a90c5bf74 docs: update README.md [skip ci] 2022-04-19 23:55:10 +08:00
semantic-release-bot f6e047867e chore(release): 9.36.2 [skip ci]
## [9.36.2](https://github.com/harttle/liquidjs/compare/v9.36.1...v9.36.2) (2022-04-19)

### Bug Fixes

* lazy createRequire to allow exceptions being catched, fixes [#497](https://github.com/harttle/liquidjs/issues/497) ([b377dad](https://github.com/harttle/liquidjs/commit/b377dad9e34c3de3e0eedc1ee6f17a0e9d919669))
2022-04-19 15:51:00 +00:00
Yahang WuandGitHub c467630e0b docs: fix a broken link for abstract file interface (#498) 2022-04-19 23:48:25 +08:00
Harttle b377dad9e3 fix: lazy createRequire to allow exceptions being catched, fixes #497 2022-04-19 23:44:14 +08:00
semantic-release-bot ecc04c99c5 chore(release): 9.36.1 [skip ci]
## [9.36.1](https://github.com/harttle/liquidjs/compare/v9.36.0...v9.36.1) (2022-04-17)

### Bug Fixes

* contains operator does not support Drop, fixes [#492](https://github.com/harttle/liquidjs/issues/492) ([9e024ff](https://github.com/harttle/liquidjs/commit/9e024ff2bcf17e7ac19c718389d4cef39b8a51f7))
* responsive header ([a56af6b](https://github.com/harttle/liquidjs/commit/a56af6bbfb5b698db55fbeb87e8e0872688fbe19))
* use `createRequire` for ESM, fixes [#334](https://github.com/harttle/liquidjs/issues/334) ([eec381e](https://github.com/harttle/liquidjs/commit/eec381ec72db3858452799b7a3264e240be3044d))
2022-04-17 16:45:54 +00:00
Harttle 9e024ff2bc fix: contains operator does not support Drop, fixes #492 2022-04-18 00:43:18 +08:00
Harttle eec381ec72 fix: use createRequire for ESM, fixes #334 2022-04-18 00:43:17 +08:00
dependabot[bot]andJun Yang c7216c6358 chore(deps): bump ansi-regex from 4.1.0 to 4.1.1 in /docs
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-04-18 00:43:02 +08:00
dependabot[bot]andJun Yang fe78890d35 chore(deps): bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-04-17 23:54:16 +08:00
dependabot[bot]andJun Yang d5771ba42c chore(deps): bump moment from 2.24.0 to 2.29.2 in /docs
Bumps [moment](https://github.com/moment/moment) from 2.24.0 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.24.0...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-04-17 22:02:49 +08:00
dependabot[bot]andJun Yang 776d235fca chore(deps): bump async from 3.1.0 to 3.2.3
Bumps [async](https://github.com/caolan/async) from 3.1.0 to 3.2.3.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/master/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v3.1.0...v3.2.3)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-04-17 21:55:18 +08:00
Harttle a56af6bbfb fix: responsive header 2022-03-17 16:19:57 +08:00
semantic-release-bot 1af8553651 chore(release): 9.36.0 [skip ci]
# [9.36.0](https://github.com/harttle/liquidjs/compare/v9.35.2...v9.36.0) (2022-03-05)

### Features

* Access array item by negative index, closes [#486](https://github.com/harttle/liquidjs/issues/486) ([049685b](https://github.com/harttle/liquidjs/commit/049685b9a0271ba03875e24ff2f6c7870cae62a7))
* allow strip filter with specified char, closes [#390](https://github.com/harttle/liquidjs/issues/390) ([c503cb2](https://github.com/harttle/liquidjs/commit/c503cb23dfbdd6f146d6dea16a84eab3df1f7aa9))
* appropriate error for malformed filters, fixes [#271](https://github.com/harttle/liquidjs/issues/271) ([01014ed](https://github.com/harttle/liquidjs/commit/01014edc491e12d38981045442da9faee598cdf7))
2022-03-05 16:56:21 +00:00
Harttle 049685b9a0 feat: Access array item by negative index, closes #486 2022-03-06 00:52:22 +08:00
Harttle c503cb23df feat: allow strip filter with specified char, closes #390 2022-03-06 00:20:51 +08:00
Harttle 01014edc49 feat: appropriate error for malformed filters, fixes #271 2022-03-05 23:24:16 +08:00
Harttle 27e579e0e2 test: case for {% assign %} invalid value, closes #446 2022-03-05 22:09:36 +08:00
semantic-release-bot d3e3fecf53 chore(release): 9.35.2 [skip ci]
## [9.35.2](https://github.com/harttle/liquidjs/compare/v9.35.1...v9.35.2) (2022-03-02)

### Bug Fixes

* corner case for concat filter without argument, [#481](https://github.com/harttle/liquidjs/issues/481) ([aa95517](https://github.com/harttle/liquidjs/commit/aa955173d4c7adc585e862934429f1f4c5f64969))
* export all builtin tags from LiquidJS, [#464](https://github.com/harttle/liquidjs/issues/464) ([33009bb](https://github.com/harttle/liquidjs/commit/33009bb988eb74c58f390992750d91b967cb3428))
2022-03-02 13:26:07 +00:00
Harttle 33009bb988 fix: export all builtin tags from LiquidJS, #464 2022-03-02 21:21:45 +08:00
Harttle aa955173d4 fix: corner case for concat filter without argument, #481 2022-03-02 21:21:25 +08:00
semantic-release-bot 15b78ebd9d chore(release): 9.35.1 [skip ci]
## [9.35.1](https://github.com/harttle/liquidjs/compare/v9.35.0...v9.35.1) (2022-02-26)

### Bug Fixes

* some filters throw on nil input, see [#481](https://github.com/harttle/liquidjs/issues/481) ([7dfb620](https://github.com/harttle/liquidjs/commit/7dfb620d30f8818685e1cfb8e7492313a0d036ab))
2022-02-26 18:12:38 +00:00
Harttle 575f3e2338 docs: add missing tag/filter links on sidebar/table, #482 2022-02-27 02:07:59 +08:00
Harttle 7dfb620d30 fix: some filters throw on nil input, see #481 2022-02-27 02:07:59 +08:00
dependabot[bot]andJun Yang 21b78d9ba0 chore(deps): bump prismjs from 1.25.0 to 1.27.0 in /docs
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.25.0 to 1.27.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.25.0...v1.27.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-02-27 02:06:04 +08:00
Harttle 5d077f461a chore: add liquid.min.js into Github release 2022-02-24 01:39:27 +08:00
semantic-release-bot 13343040c6 chore(release): 9.35.0 [skip ci]
# [9.35.0](https://github.com/harttle/liquidjs/compare/v9.34.1...v9.35.0) (2022-02-23)

### Bug Fixes

* `url_encode` throws on undefined value, fixes [#479](https://github.com/harttle/liquidjs/issues/479) ([ca3240c](https://github.com/harttle/liquidjs/commit/ca3240c2c4d157095d2ebe0024d0c71bc5e435f8))

### Features

* expose all tags/filters and TimezoneDate, closes [#464](https://github.com/harttle/liquidjs/issues/464) ([dab8a29](https://github.com/harttle/liquidjs/commit/dab8a29070b2508f2e6532717b7663966f610bec))
2022-02-23 17:20:40 +00:00
Harttle ca3240c2c4 fix: url_encode throws on undefined value, fixes #479 2022-02-24 01:14:46 +08:00
Harttle 2b0c5696bc docs: introduce JS script to escape for Hexo, fixes #480 2022-02-24 01:04:50 +08:00
Harttle dab8a29070 feat: expose all tags/filters and TimezoneDate, closes #464 2022-02-23 23:38:21 +08:00
semantic-release-bot f395295721 chore(release): 9.34.1 [skip ci]
## [9.34.1](https://github.com/harttle/liquidjs/compare/v9.34.0...v9.34.1) (2022-02-20)

### Bug Fixes

* array output now join with "" instead of "," ([ab5e245](https://github.com/harttle/liquidjs/commit/ab5e245fba9a0f6936275319d4e5e25aadb0f7c1))
* sort filter unexpectedly modifies original array, [#475](https://github.com/harttle/liquidjs/issues/475) ([dbc0497](https://github.com/harttle/liquidjs/commit/dbc049738633b1b6f578d9d20f830b548ba67a22))
2022-02-20 07:59:53 +00:00
Harttle 200f6648aa style: fix lint 2022-02-20 15:56:23 +08:00
dependabot[bot]andJun Yang 31aa4ec318 chore(deps): bump ssri from 6.0.1 to 6.0.2
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

---
updated-dependencies:
- dependency-name: ssri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-02-20 13:04:22 +08:00
dependabot[bot]andJun Yang 231574903f chore(deps): bump y18n from 3.2.1 to 3.2.2
Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

---
updated-dependencies:
- dependency-name: y18n
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-02-20 13:04:12 +08:00
Harttle dbc0497386 fix: sort filter unexpectedly modifies original array, #475 2022-02-20 13:03:40 +08:00
Harttle ab5e245fba fix: array output now join with "" instead of "," 2022-02-20 13:03:40 +08:00
dependabot[bot]andJun Yang 78ce5662df chore(deps): bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

---
updated-dependencies:
- dependency-name: ini
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-02-20 12:53:30 +08:00
dependabot[bot]andJun Yang 8b880f65a2 chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-02-20 12:30:08 +08:00
dependabot[bot]andJun Yang d605158f96 chore(deps): bump tar from 4.4.13 to 4.4.19
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-02-20 12:29:48 +08:00
dependabot[bot]andJun Yang 1a44b908ce chore(deps): bump npm-user-validate from 1.0.0 to 1.0.1
Bumps [npm-user-validate](https://github.com/npm/npm-user-validate) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/npm/npm-user-validate/releases)
- [Commits](https://github.com/npm/npm-user-validate/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: npm-user-validate
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-02-20 12:29:42 +08:00
Santi AlboandJun Yang a0817e5dd7 docs: fix uniq filter example in the docs 2022-02-18 19:06:01 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
703675e1e0 chore(deps): bump pathval from 1.1.0 to 1.1.1 (#467)
Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/chaijs/pathval/releases)
- [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chaijs/pathval/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: pathval
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 17:57:12 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
819d060a92 chore(deps): bump ajv from 6.12.0 to 6.12.6 in /docs (#468)
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.0 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.0...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 17:57:00 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
c3d7ecbde1 docs: add santialbo as a contributor for doc (#470)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-02-16 17:56:46 +08:00
Jun YangandGitHub 8bdb70878f Merge pull request #469 from santialbo/patch-1
docs: fix example in main docs page
2022-02-16 17:54:10 +08:00
Santi AlboandGitHub 2e1537d50c docs: fix example in main docs page 2022-02-16 10:13:41 +01:00
HarttleandHarttle d4afbc038f docs: add support button on navbar 2022-02-13 15:12:16 +08:00
Damian NowakandGitHub 58d03890b4 docs: whitespace-control: correct typo (#462) 2022-01-29 11:50:37 +08:00
semantic-release-bot e3fb47a90b chore(release): 9.34.0 [skip ci]
# [9.34.0](https://github.com/harttle/liquidjs/compare/v9.33.1...v9.34.0) (2022-01-28)

### Bug Fixes

* where-filter null handling ([#457](https://github.com/harttle/liquidjs/issues/457)) ([9da41c8](https://github.com/harttle/liquidjs/commit/9da41c8a37d9c49ee4a16d5bd520fd6ae01c14ec))

### Features

* `ownPropertyOnly` option to protect prototype, [#454](https://github.com/harttle/liquidjs/issues/454) ([7e99efc](https://github.com/harttle/liquidjs/commit/7e99efc5131e20cf3f59e1fc2c371a15aa4109db))
2022-01-28 17:37:13 +00:00
dependabot[bot]andJun Yang e4ad93ee8c chore(deps): bump node-fetch from 2.6.1 to 2.6.7
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-29 01:32:26 +08:00
HarttleandHarttle 0bdf6792d1 docs: add @tbdrz as contributor 2022-01-29 01:30:48 +08:00
HarttleandHarttle 7e99efc513 feat: ownPropertyOnly option to protect prototype, #454 2022-01-29 01:22:34 +08:00
HarttleandHarttle 527858fc14 docs: better PWA, more responsive, better description 2022-01-29 00:37:43 +08:00
Martin SchusterandGitHub 9da41c8a37 fix: where-filter null handling (#457) 2022-01-28 22:43:38 +08:00
tbdrzandJun Yang 2717dae127 Clear unusefull comments 2022-01-28 22:41:11 +08:00
Harttle 8db6c7b28d docs: tutorial for render tag content 2022-01-23 14:24:58 +08:00
dependabot[bot]andJun Yang 298db97b84 chore(deps): bump shelljs from 0.8.4 to 0.8.5
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-23 00:02:46 +08:00
dependabot[bot]andJun Yang bd8e2b0f96 chore(deps): bump trim-off-newlines from 1.0.1 to 1.0.3
Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/stevemao/trim-off-newlines/releases)
- [Commits](https://github.com/stevemao/trim-off-newlines/compare/v1.0.1...v1.0.3)

---
updated-dependencies:
- dependency-name: trim-off-newlines
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-23 00:02:32 +08:00
HarttleandHarttle 117eaf57c3 docs: add additional filters/tags as differences, closes #331 2022-01-22 23:24:06 +08:00
HarttleandHarttle 1e69d86b0c chore: build docs on master push 2022-01-22 21:59:02 +08:00
HarttleandHarttle cc6b66216d docs: support dark mode 2022-01-22 21:51:49 +08:00
HarttleandHarttle ca82416dea docs: apply network-first cache strategy 2022-01-22 19:04:12 +08:00
HarttleandHarttle 394d5a1ae2 docs: add tutorials for custom filters and tags 2022-01-22 18:52:37 +08:00
HarttleandHarttle 371da3da74 docs: add jekyllInclude to tutorials 2022-01-20 02:04:54 +08:00
semantic-release-bot 7814285479 chore(release): 9.33.1 [skip ci]
## [9.33.1](https://github.com/harttle/liquidjs/compare/v9.33.0...v9.33.1) (2022-01-19)

### Bug Fixes

* liquidjs.version on npm package ([53824a2](https://github.com/harttle/liquidjs/commit/53824a2d00f978214fcd83a48118b7900cf97449))
2022-01-19 17:19:58 +00:00
HarttleandHarttle 53824a2d00 fix: liquidjs.version on npm package 2022-01-20 01:16:52 +08:00
semantic-release-bot 9966d846b5 chore(release): 9.33.0 [skip ci]
# [9.33.0](https://github.com/harttle/liquidjs/compare/v9.32.1...v9.33.0) (2022-01-19)

### Features

* support `offset:continue`, see [#439](https://github.com/harttle/liquidjs/issues/439) ([8c27a84](https://github.com/harttle/liquidjs/commit/8c27a84059384ae730eb0fa1524df04e122e27a0))
* support Jekyll-like include syntax, see [#441](https://github.com/harttle/liquidjs/issues/441) ([388d0fb](https://github.com/harttle/liquidjs/commit/388d0fbbc42fe8cd69faba61c1dc29e9bb5ec2d0))
2022-01-19 16:56:49 +00:00
HarttleandHarttle 8c27a84059 feat: support offset:continue, see #439 2022-01-20 00:12:18 +08:00
HarttleandHarttle 388d0fbbc4 feat: support Jekyll-like include syntax, see #441 2022-01-19 23:07:25 +08:00
semantic-release-bot d71d0a0c20 chore(release): 9.32.1 [skip ci]
## [9.32.1](https://github.com/harttle/liquidjs/compare/v9.32.0...v9.32.1) (2022-01-12)

### Bug Fixes

* remove limit on operator char length ([7677f84](https://github.com/harttle/liquidjs/commit/7677f848c0c57335dd1c4f1e3ec251fbf9b1663f))
2022-01-12 13:27:40 +00:00
allcontributors[bot]andJun Yang 191a0130d2 docs: update .all-contributorsrc [skip ci] 2022-01-12 21:25:24 +08:00
allcontributors[bot]andJun Yang 2c3ebaca0c docs: update README.md [skip ci] 2022-01-12 21:25:24 +08:00
Ameya ApteandJun Yang 7677f848c0 fix: remove limit on operator char length
The matchOperator function has a default value of str.length for the end parameter
2022-01-12 21:24:08 +08:00
semantic-release-bot c7d2e1f1f4 chore(release): 9.32.0 [skip ci]
# [9.32.0](https://github.com/harttle/liquidjs/compare/v9.31.0...v9.32.0) (2022-01-02)

### Features

* support allow_false for `default` filter, see [#435](https://github.com/harttle/liquidjs/issues/435) ([c756191](https://github.com/harttle/liquidjs/commit/c756191f49f9c2b823048367abfdf0adf2bdb875))
2022-01-02 08:35:53 +00:00
HarttleandHarttle c756191f49 feat: support allow_false for default filter, see #435 2022-01-02 16:31:21 +08:00
HarttleandHarttle e94e386c46 docs: update liquidjs.com and README for demo link 2021-12-31 17:49:27 +08:00
semantic-release-bot b7c782b10a chore(release): 9.31.0 [skip ci]
# [9.31.0](https://github.com/harttle/liquidjs/compare/v9.30.0...v9.31.0) (2021-12-19)

### Features

* implement `liquid` and `echo` tags, see [#428](https://github.com/harttle/liquidjs/issues/428) ([fde9924](https://github.com/harttle/liquidjs/commit/fde9924ee622efae4c013d2aa01c6d705c8d5f46))
2021-12-19 14:35:13 +00:00
HarttleandHarttle 49d3f64873 docs: echo & liquid tags 2021-12-19 22:31:02 +08:00
HarttleandHarttle be3463c5f9 docs: add jg-rp as contributor 2021-12-19 21:42:46 +08:00
James PriorandJun Yang fde9924ee6 feat: implement liquid and echo tags, see #428 2021-12-19 21:09:26 +08:00
semantic-release-bot 5b2ea63b14 chore(release): 9.30.0 [skip ci]
# [9.30.0](https://github.com/harttle/liquidjs/compare/v9.29.0...v9.30.0) (2021-12-18)

### Features

* support jekyll-like include, see [#433](https://github.com/harttle/liquidjs/issues/433) ([23279a8](https://github.com/harttle/liquidjs/commit/23279a816a0582ade7f3b15c1c65c74bc147d134))
2021-12-18 07:31:17 +00:00
HarttleandHarttle 23279a816a feat: support jekyll-like include, see #433 2021-12-18 15:26:15 +08:00
HarttleandHarttle 2c14a9541d chore: update node to 14 for check pipeline 2021-12-12 20:10:15 +08:00
HarttleandHarttle c474649748 chore: update node to 14 on pipeline 2021-12-12 11:11:03 +08:00
HarttleandHarttle fad17cfbb3 docs: fix apidoc generation for typescript@4 2021-12-11 21:30:19 +08:00
semantic-release-bot 6322acb88c chore(release): 9.29.0 [skip ci]
# [9.29.0](https://github.com/harttle/liquidjs/compare/v9.28.6...v9.29.0) (2021-12-11)

### Features

* customize globals & strictVariables when calling render, see [#432](https://github.com/harttle/liquidjs/issues/432) ([6801552](https://github.com/harttle/liquidjs/commit/6801552fe6829770cbbfdda051731c8b466ed9ec))
2021-12-11 12:32:58 +00:00
HarttleandHarttle 95fc705b5d chore: upgrade typescript 2021-12-11 20:23:09 +08:00
HarttleandHarttle 6801552fe6 feat: customize globals & strictVariables when calling render, see #432 2021-12-11 20:22:58 +08:00
HarttleandHarttle 6023d9ba10 docs: path traversal vulnerabilities when customizing FS 2021-12-11 12:31:08 +08:00
semantic-release-bot cc4628d804 chore(release): 9.28.6 [skip ci]
## [9.28.6](https://github.com/harttle/liquidjs/compare/v9.28.5...v9.28.6) (2021-12-07)

### Bug Fixes

* size filter does not respect Objects, fixes [#385](https://github.com/harttle/liquidjs/issues/385) ([6c11426](https://github.com/harttle/liquidjs/commit/6c114267a526ef764dfd9bd94de199d2932ad91a))
* throws when using `preserveTimezones` on Node.js, fixes [#431](https://github.com/harttle/liquidjs/issues/431) ([e2ef236](https://github.com/harttle/liquidjs/commit/e2ef236f68273b72a0b1293b0d13728cdb9aa4b8))
2021-12-07 15:50:25 +00:00
HarttleandHarttle 69286c6909 test: coverage to 100% 2021-12-07 23:34:53 +08:00
HarttleandHarttle 6c114267a5 fix: size filter does not respect Objects, fixes #385 2021-12-07 23:05:46 +08:00
HarttleandHarttle e2ef236f68 fix: throws when using preserveTimezones on Node.js, fixes #431 2021-12-07 22:43:47 +08:00
semantic-release-bot 80c2280ee6 chore(release): 9.28.5 [skip ci]
## [9.28.5](https://github.com/harttle/liquidjs/compare/v9.28.4...v9.28.5) (2021-11-05)

### Bug Fixes

* always allow './' and '../' to be relative, even on windows ([44f6b52](https://github.com/harttle/liquidjs/commit/44f6b520d53ba984ecb5fc430d70f698837d1802))
2021-11-05 19:39:58 +00:00
HarttleandHarttle 44f6b520d5 fix: always allow './' and '../' to be relative, even on windows 2021-11-06 03:36:39 +08:00
semantic-release-bot 3d71d9e35a chore(release): 9.28.4 [skip ci]
## [9.28.4](https://github.com/harttle/liquidjs/compare/v9.28.3...v9.28.4) (2021-10-31)

### Bug Fixes

* allow `{%render%}` to reassign argument, [#404](https://github.com/harttle/liquidjs/issues/404) ([124f4c4](https://github.com/harttle/liquidjs/commit/124f4c4485270a5fdfca610808a56ecd98d98417))
2021-10-31 08:36:55 +00:00
AleksandrHovhannisyanandHarttle 124f4c4485 fix: allow {%render%} to reassign argument, #404 2021-10-31 16:28:33 +08:00
dependabot[bot]andJun Yang 432d1c7ccb chore(deps): bump path-parse from 1.0.6 to 1.0.7
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2021-10-28 00:14:13 +08:00
HarttleandHarttle 4b42e63601 docs: update liquidjs for demo/nodejs 2021-10-28 00:03:18 +08:00
semantic-release-bot f809c716eb chore(release): 9.28.3 [skip ci]
## [9.28.3](https://github.com/harttle/liquidjs/compare/v9.28.2...v9.28.3) (2021-10-27)

### Bug Fixes

* relative root (by default) yields LookupError, fixes [#419](https://github.com/harttle/liquidjs/issues/419), [#424](https://github.com/harttle/liquidjs/issues/424), also related to [#395](https://github.com/harttle/liquidjs/issues/395) ([aebeae9](https://github.com/harttle/liquidjs/commit/aebeae9e1bbb8472af7788dfd09a08cb6de58e1c))
2021-10-27 16:01:07 +00:00
HarttleandHarttle aebeae9e1b fix: relative root (by default) yields LookupError, fixes #419, #424, also related to #395 2021-10-27 23:55:39 +08:00
Harttle 564972ba74 docs: add version info in playground.html 2021-10-20 23:20:23 +08:00
semantic-release-bot d0c3cc8b47 chore(release): 9.28.2 [skip ci]
## [9.28.2](https://github.com/harttle/liquidjs/compare/v9.28.1...v9.28.2) (2021-10-16)

### Bug Fixes

* cache ongoing parseFile() calls, fixes [#416](https://github.com/harttle/liquidjs/issues/416) ([8894cbf](https://github.com/harttle/liquidjs/commit/8894cbfe6e0dbad4c07439adcefb6b3e2056be11))
2021-10-16 14:40:58 +00:00
Harttleandharttle b5b2a98d5e chore: fix types 2021-10-16 22:36:46 +08:00
Harttleandharttle 8894cbfe6e fix: cache ongoing parseFile() calls, fixes #416 2021-10-16 21:07:48 +08:00
semantic-release-bot c58a116513 chore(release): 9.28.1 [skip ci]
## [9.28.1](https://github.com/harttle/liquidjs/compare/v9.28.0...v9.28.1) (2021-10-16)

### Bug Fixes

* hardcoded '/' in normalized `options.fs`, fixes [#412](https://github.com/harttle/liquidjs/issues/412), [#408](https://github.com/harttle/liquidjs/issues/408) ([9cfa43b](https://github.com/harttle/liquidjs/commit/9cfa43b8aee6a980f39d99f1cdb2be730ca21731))
2021-10-16 04:32:51 +00:00
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 df6d62fd59 docs: add @JaKXz and @dphm to contributor list, #406, #407 2021-10-15 22:57:04 +08:00
d pham (they/them)andharttle 2438f4b018 docs: typo fix an -> can 2021-10-15 22:55:22 +08:00
Jason KurianandJun Yang 8321a8e982 docs: fix async/await typos in render-file 2021-10-15 22:52:47 +08:00
Harttle 1de6adf308 test: cases for parse(<tpl>, <relative filepath>), #395 2021-10-10 20:37:26 +08:00
Harttle a525f45b46 docs: update filters order on sidebar, fixes #397 2021-10-06 19:17:33 +08:00
semantic-release-bot 529e6d769b chore(release): 9.28.0 [skip ci]
# [9.28.0](https://github.com/harttle/liquidjs/compare/v9.27.1...v9.28.0) (2021-10-06)

### Bug Fixes

* skip root check for renderFile() ([822ba0b](https://github.com/harttle/liquidjs/commit/822ba0be0f1cfbedd50376aff8ac49eee71bd48c))
* support timezoneOffset for date from scope, [#401](https://github.com/harttle/liquidjs/issues/401) ([fd5ef47](https://github.com/harttle/liquidjs/commit/fd5ef474c36212e6a2446012dcd26bca93f84c7b))

### Features

* `relativeReference` for render/include/layout, [#395](https://github.com/harttle/liquidjs/issues/395) ([a3455eb](https://github.com/harttle/liquidjs/commit/a3455ebd0b207141c34630c0af44d917db2ca1dd))
* implement `forloop.name` as found in ruby shopify/liquid ([6dc7fad](https://github.com/harttle/liquidjs/commit/6dc7fada72467418806c1ee4bd7eaf3003690fe6))
2021-10-06 10:45:13 +00: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 24a19c092a docs: add doc entry for concat filter #397 2021-10-06 16:10:09 +08:00
Harttle fd5ef474c3 fix: support timezoneOffset for date from scope, #401 2021-10-06 15:45:41 +08:00
Harttleandharttle 4f6b88c154 docs: add @bglw as contributor 2021-10-04 21:37:37 +08:00
Liam BigelowandJun Yang 6dc7fada72 feat: implement forloop.name as found in ruby shopify/liquid 2021-10-04 21:33:46 +08:00
semantic-release-bot 3b9c7d6fbe chore(release): 9.27.1 [skip ci]
## [9.27.1](https://github.com/harttle/liquidjs/compare/v9.27.0...v9.27.1) (2021-10-04)

### Bug Fixes

* directory info in lookupError message, [#395](https://github.com/harttle/liquidjs/issues/395) ([92bfc65](https://github.com/harttle/liquidjs/commit/92bfc65e0b1d937c00a8368b272223c702132d23))
2021-10-04 04:16:07 +00:00
Harttle 92bfc65e0b fix: directory info in lookupError message, #395 2021-10-04 12:11:54 +08:00
semantic-release-bot 8348036d45 chore(release): 9.27.0 [skip ci]
# [9.27.0](https://github.com/harttle/liquidjs/compare/v9.26.0...v9.27.0) (2021-10-03)

### Bug Fixes

* remove "stream" dependency in browser bundles, [#396](https://github.com/harttle/liquidjs/issues/396) ([3b5eb66](https://github.com/harttle/liquidjs/commit/3b5eb6664f673c29d74cb7645e01dcbdf43c8343))
* renderToNodeStream() now emit 'error' event instead of throw ([afeef1d](https://github.com/harttle/liquidjs/commit/afeef1d7450b2799b3441b0241d2466b892a27ff))

### Features

* add `layouts`, `partials` apart from `root`, [#395](https://github.com/harttle/liquidjs/issues/395) ([b9ae479](https://github.com/harttle/liquidjs/commit/b9ae479b653a34fadb98c324c4683dd1fdd31af1))
* renderFileToNodeStream(filepath, scope) ([68c4cfc](https://github.com/harttle/liquidjs/commit/68c4cfcfb647c22225dd6edede53ad7a5d7c4485))

### Performance Improvements

* make the most of streamed rendering ([aea3441](https://github.com/harttle/liquidjs/commit/aea34418de24cb85ea1acddf68c3683ce7fc9fa8))
2021-10-03 14:41:57 +00:00
harttle afeef1d745 fix: renderToNodeStream() now emit 'error' event instead of throw 2021-10-03 22:32:00 +08:00
harttle 3b5eb6664f fix: remove "stream" dependency in browser bundles, #396 2021-10-03 21:21:35 +08:00
harttle 68c4cfcfb6 feat: renderFileToNodeStream(filepath, scope) 2021-10-03 21:21:25 +08:00
harttle dd325362f9 chore: perf check, will fail if regression > 3% 2021-10-03 19:07:51 +08:00
harttle b9ae479b65 feat: add layouts, partials apart from root, #395 2021-10-03 18:51:14 +08:00
harttle 0cb520d2d1 chore: perf diff against latest release 2021-10-02 22:17:03 +08:00
Harttle 1689576913 docs: add @n1ru4l and @mattvague to contributors for doc 2021-10-01 19:21:03 +08:00
Harttleandharttle aea34418de perf: make the most of streamed rendering 2021-10-01 18:36:57 +08:00
Harttleandharttle 4358c9630f test: coverage to 100% 2021-10-01 15:55:31 +08:00
Harttleandharttle 9a96b4aba3 docs: update badges 2021-10-01 12:39:02 +08:00
Harttleandharttle 70fdb7af48 chore: try fix ci 2021-10-01 00:52:51 +08:00
semantic-release-bot 5099597634 chore(release): 9.26.0 [skip ci]
# [9.26.0](https://github.com/harttle/liquidjs/compare/v9.25.1...v9.26.0) (2021-09-30)

### Features

* orderedFilterParameters, closes [#312](https://github.com/harttle/liquidjs/issues/312) ([10e8c8f](https://github.com/harttle/liquidjs/commit/10e8c8ff7e1cca6df43087953cd8daf4bd618563))
* stream rendering, closed [#361](https://github.com/harttle/liquidjs/issues/361) fixes [#360](https://github.com/harttle/liquidjs/issues/360) ([9012133](https://github.com/harttle/liquidjs/commit/9012133e0717b1813c6a74a6a282f43ba14d0ada))
* timezoneOffset option to specify output timezone, see [#375](https://github.com/harttle/liquidjs/issues/375) ([6b9f872](https://github.com/harttle/liquidjs/commit/6b9f872bccb4b0c636dc7be2088cafa9bc6c900a))

### Performance Improvements

* improve performance by 4x by simplified parseFile ([24f5346](https://github.com/harttle/liquidjs/commit/24f534608489fccc155f30bbaf37397c46278da6))
* parse filenames in parse() insteadof render() ([8273c17](https://github.com/harttle/liquidjs/commit/8273c17dab3dc09858330ce45e3617a650e7fcaa))
2021-09-30 15:57:39 +00:00
Harttleandharttle d742de79ba docs: update docs for website 2021-09-30 23:52:26 +08:00
Harttleandharttle f0e2e07f0b docs: add @c412216887 and @labnol for docs, see #393 #394 2021-09-30 22:33:52 +08:00
一饮一啄皆是人生andJun Yang 4e5dbe120d Update upcase.md
upcase中文描述中,应该是 对已经是大写的字符没有影响
2021-09-30 22:18:10 +08:00
Amit AgarwalandJun Yang 6a1db537d2 Typo fixed
Staring -> Starring
2021-09-30 22:17:46 +08:00
dependabot[bot]andJun Yang 9517f82caf chore(deps): bump prismjs from 1.24.0 to 1.25.0 in /docs
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.24.0...v1.25.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2021-09-30 22:16:34 +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 abaf4af465 docs: update description of LiquidJS 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
dependabot[bot]andJun Yang 91c721e650 chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /docs
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2021-09-26 20:44:44 +08:00
dependabot[bot]andJun Yang 500d397a5a chore(deps): bump prismjs from 1.23.0 to 1.24.0 in /docs
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.23.0...v1.24.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2021-07-26 16:52:01 +08:00
harttle 2e004eddf6 docs: add @ilhamdev0 as contributors 2021-07-26 16:40:03 +08:00
ilhamdev0andJun Yang e3bfe86181 Update layout.md 2021-07-25 23:19:10 +08:00
ilhamdev0andJun Yang 804947ebb9 Update layout.md
Fix typo
2021-07-25 23:19:10 +08:00
Raymond CamdenandJun Yang 4fa5313acc Update options.md
Fix typo
2021-07-24 14:23:26 +08:00
harttle f7313fe563 docs: support data field in playground.html 2021-06-20 21:26:16 +08:00
semantic-release-bot 1c64ff051e chore(release): 9.25.1 [skip ci]
## [9.25.1](https://github.com/harttle/liquidjs/compare/v9.25.0...v9.25.1) (2021-06-20)

### Performance Improvements

* add cross-engines benchmark ([cdceb25](https://github.com/harttle/liquidjs/commit/cdceb25d007b3d30a85e51ac538e12297c73bfcf))
2021-06-20 06:23:36 +00:00
harttle c470d1fe9b chore: migrate from Travis CI to Github Actions 2021-06-20 14:21:34 +08:00
harttle cdceb25d00 perf: add cross-engines benchmark 2021-06-20 13:25:08 +08:00
dependabot[bot]andJun Yang cc9b28307c chore(deps): bump striptags from 3.1.1 to 3.2.0 in /docs
Bumps [striptags](https://github.com/ericnorris/striptags) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/ericnorris/striptags/releases)
- [Commits](https://github.com/ericnorris/striptags/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: striptags
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2021-06-19 12:10:02 +08:00
dependabot[bot]andJun Yang f2ddd6e459 chore(deps): bump glob-parent from 5.1.1 to 5.1.2 in /docs
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2021-06-12 16:42:19 +08:00
dependabot[bot]andJun Yang ecc40a6012 chore(deps): bump normalize-url from 4.3.0 to 4.5.1
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.3.0 to 4.5.1.
- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
- [Commits](https://github.com/sindresorhus/normalize-url/commits)

---
updated-dependencies:
- dependency-name: normalize-url
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2021-06-12 16:42:08 +08:00
dependabot[bot]andJun Yang 659cfde8e1 chore(deps): bump ws from 6.2.1 to 6.2.2
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2021-06-08 21:35:56 +08:00
dependabot[bot]andJun Yang 0acfb8de4d chore(deps): bump hosted-git-info from 2.7.1 to 2.8.9
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.7.1 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.7.1...v2.8.9)

Signed-off-by: dependabot[bot] <[email protected]>
2021-05-09 20:04:52 +08:00
dependabot[bot]andJun Yang c4b2bfb29b chore(deps): bump lodash from 4.17.19 to 4.17.21 in /docs
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <[email protected]>
2021-05-07 22:36:25 +08:00
semantic-release-bot 0d41f7467e chore(release): 9.25.0 [skip ci]
# [9.25.0](https://github.com/harttle/liquidjs/compare/v9.24.2...v9.25.0) (2021-05-07)

### Features

* when tag with multiple values ([8f9639f](https://github.com/harttle/liquidjs/commit/8f9639f))
2021-05-07 06:03:44 +00:00
dependabot[bot]andJun Yang 1d35e3fcfb chore(deps): bump handlebars from 4.5.3 to 4.7.7
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.5.3 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.5.3...v4.7.7)

Signed-off-by: dependabot[bot] <[email protected]>
2021-05-07 14:00:30 +08:00
dependabot[bot]andJun Yang 04c874b174 chore(deps): bump underscore from 1.9.1 to 1.13.1
Bumps [underscore](https://github.com/jashkenas/underscore) from 1.9.1 to 1.13.1.
- [Release notes](https://github.com/jashkenas/underscore/releases)
- [Commits](https://github.com/jashkenas/underscore/compare/1.9.1...1.13.1)

Signed-off-by: dependabot[bot] <[email protected]>
2021-05-07 14:00:01 +08:00
allcontributors[bot]andJun Yang 29f42847a5 docs: update .all-contributorsrc [skip ci] 2021-05-06 22:53:24 +08:00
allcontributors[bot]andJun Yang 426863a9b4 docs: update README.md [skip ci] 2021-05-06 22:53:24 +08:00
Memmie LengletandJun Yang 8f9639f1d6 feat: when tag with multiple values 2021-05-06 22:52:22 +08:00
semantic-release-bot 3e130e01a7 chore(release): 9.24.2 [skip ci]
## [9.24.2](https://github.com/harttle/liquidjs/compare/v9.24.1...v9.24.2) (2021-05-04)

### Bug Fixes

* operator boundary not correctly recognized, fixes [#342](https://github.com/harttle/liquidjs/issues/342) ([3e3d84a](https://github.com/harttle/liquidjs/commit/3e3d84a))
2021-05-04 10:16:44 +00:00
Jun Yang 3e3d84a5ed fix: operator boundary not correctly recognized, fixes #342 2021-05-04 18:13:02 +08:00
dependabot[bot]andJun Yang 69f1a394b1 chore(deps): bump ssri from 6.0.1 to 6.0.2
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <[email protected]>
2021-05-02 15:28:15 +08:00
semantic-release-bot ae8636d95d chore(release): 9.24.1 [skip ci]
## [9.24.1](https://github.com/harttle/liquidjs/compare/v9.24.0...v9.24.1) (2021-05-01)

### Bug Fixes

* make LiquidError context property public ([1fd76ac](https://github.com/harttle/liquidjs/commit/1fd76ac))
2021-05-01 12:03:18 +00:00
Laurin QuastandJun Yang 1fd76acf28 fix: make LiquidError context property public 2021-05-01 20:00:02 +08:00
semantic-release-bot 62f8f707e9 chore(release): 9.24.0 [skip ci]
# [9.24.0](https://github.com/harttle/liquidjs/compare/v9.23.4...v9.24.0) (2021-05-01)

### Features

* add context as a property on the LiquidError error ([9c7cb57](https://github.com/harttle/liquidjs/commit/9c7cb57))
* export errors for better error handling in user-land ([4e394b9](https://github.com/harttle/liquidjs/commit/4e394b9))
2021-05-01 11:11:01 +00:00
Laurin QuastandJun Yang 9c7cb5752b feat: add context as a property on the LiquidError error 2021-05-01 19:07:40 +08:00
Laurin QuastandJun Yang 4e394b9072 feat: export errors for better error handling in user-land 2021-05-01 19:06:33 +08:00
Jun Yang 251a50801c chore: dev via windows+vscode 2021-04-17 11:43:03 +08:00
semantic-release-bot aa5d63fdf7 chore(release): 9.23.4 [skip ci]
## [9.23.4](https://github.com/harttle/liquidjs/compare/v9.23.3...v9.23.4) (2021-04-17)

### Bug Fixes

* capitalize filter not lower case trailing string, fixes [#326](https://github.com/harttle/liquidjs/issues/326) ([6548765](https://github.com/harttle/liquidjs/commit/6548765))
2021-04-17 02:41:31 +00:00
Jun Yang 65487654c4 fix: capitalize filter not lower case trailing string, fixes #326 2021-04-17 10:30:57 +08:00
allcontributors[bot]andJun Yang 8bab7957da docs: update .all-contributorsrc [skip ci] 2021-04-17 10:21:19 +08:00
allcontributors[bot]andJun Yang 666df5a8e6 docs: update README.md [skip ci] 2021-04-17 10:21:19 +08:00
congandJun Yang a4aa9ba0d6 FIX: remove unnecessary code 2021-04-17 10:19:22 +08:00
congandJun Yang f5f54c82bf modified title using passed in variable 2021-04-17 10:19:22 +08:00
congandJun Yang 28f154554b added tsconfig.json 2021-04-17 10:19:22 +08:00
congandJun Yang 2bc03d6a01 added typescript and @types/node packages 2021-04-17 10:19:22 +08:00
ZCandJun Yang 354a971b9e Revert change to line 17
The original is fine, emitter is not needed.
2021-04-17 10:18:39 +08:00
ZCandJun Yang b41be92dfd Update register-filters-tags.md 2021-04-17 10:18:39 +08:00
ZCandJun Yang bad12ea936 Register tags documentation example updated 2021-04-17 10:18:39 +08:00
dependabot[bot]andJun Yang b5a22fa091 chore(deps): bump y18n from 4.0.0 to 4.0.1 in /docs
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <[email protected]>
2021-04-03 00:01:54 +08:00
dependabot[bot]andJun Yang 7d92f25cbb chore(deps): bump y18n from 3.2.1 to 3.2.2
Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <[email protected]>
2021-04-03 00:01:01 +08:00
harttle 4584867b65 docs: clarification on how to disable tags/filters, see #324 2021-03-21 22:30:53 +08:00
harttle 695e3c18bc docs: add versions to tags/filters, see #305 2021-03-21 22:17:17 +08:00
semantic-release-bot 2133ed20d7 chore(release): 9.23.3 [skip ci]
## [9.23.3](https://github.com/harttle/liquidjs/compare/v9.23.2...v9.23.3) (2021-03-21)

### Bug Fixes

* expose TokenKind ([dbc23e8](https://github.com/harttle/liquidjs/commit/dbc23e8))
2021-03-21 11:32:39 +00:00
Matt Vagueandharttle dbc23e8b04 fix: expose TokenKind 2021-03-21 19:29:00 +08:00
semantic-release-bot 1acace5a16 chore(release): 9.23.2 [skip ci]
## [9.23.2](https://github.com/harttle/liquidjs/compare/v9.23.1...v9.23.2) (2021-03-13)

### Bug Fixes

* comparison for empty/nil, fixes [#321](https://github.com/harttle/liquidjs/issues/321) ([99d14e7](https://github.com/harttle/liquidjs/commit/99d14e7))
* newline_to_br filter should output <br /> instead of <br/>, fixes [#320](https://github.com/harttle/liquidjs/issues/320) ([9a9b792](https://github.com/harttle/liquidjs/commit/9a9b792))
2021-03-13 09:17:50 +00: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
dependabot[bot]andJun Yang aff9976042 chore(deps): bump pug-code-gen from 2.0.2 to 2.0.3 in /docs
Bumps [pug-code-gen](https://github.com/pugjs/pug) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/pugjs/pug/releases)
- [Commits](https://github.com/pugjs/pug/compare/[email protected]@2.0.3)

Signed-off-by: dependabot[bot] <[email protected]>
2021-03-09 22:47:42 +08:00
dependabot[bot]andJun Yang cd8cb39329 chore(deps): bump prismjs from 1.21.0 to 1.23.0 in /docs
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.21.0 to 1.23.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.21.0...v1.23.0)

Signed-off-by: dependabot[bot] <[email protected]>
2021-03-09 22:47:32 +08:00
dependabot[bot]andJun Yang 9ed3b98db3 chore(deps): bump elliptic from 6.5.3 to 6.5.4
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <[email protected]>
2021-03-09 22:47:23 +08:00
semantic-release-bot 151ff4cbf3 chore(release): 9.23.1 [skip ci]
## [9.23.1](https://github.com/harttle/liquidjs/compare/v9.23.0...v9.23.1) (2021-02-19)

### Bug Fixes

* lenientIf not working for the umd bundle, closes [#313](https://github.com/harttle/liquidjs/issues/313) ([2e66e8b](https://github.com/harttle/liquidjs/commit/2e66e8b))
2021-02-19 15:29:27 +00:00
harttle 2e66e8b02e fix: lenientIf not working for the umd bundle, closes #313 2021-02-19 23:10:15 +08:00
semantic-release-bot 24306722ec chore(release): 9.23.0 [skip ci]
# [9.23.0](https://github.com/harttle/liquidjs/compare/v9.22.1...v9.23.0) (2021-02-12)

### Bug Fixes

* respect `fs` in parser options, for [#233](https://github.com/harttle/liquidjs/issues/233) ([4e82da6](https://github.com/harttle/liquidjs/commit/4e82da6))

### Features

* support filters in if/unless/case, see [#287](https://github.com/harttle/liquidjs/issues/287) ([2f059f6](https://github.com/harttle/liquidjs/commit/2f059f6))
* support function calls, closes [#222](https://github.com/harttle/liquidjs/issues/222) ([e37824f](https://github.com/harttle/liquidjs/commit/e37824f))
* support layout none, closes [#299](https://github.com/harttle/liquidjs/issues/299) ([81e11bb](https://github.com/harttle/liquidjs/commit/81e11bb))
2021-02-12 14:28:02 +00:00
harttle 2f059f6a25 feat: support filters in if/unless/case, see #287 2021-02-12 22:22:41 +08:00
harttle 4e82da689e fix: respect fs in parser options, for #233 2021-02-12 15:17:21 +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
semantic-release-bot 71d5d24813 chore(release): 9.22.1 [skip ci]
## [9.22.1](https://github.com/harttle/liquidjs/compare/v9.22.0...v9.22.1) (2021-02-05)

### Bug Fixes

* default to precedence 1 for custom operators ([20f559e](https://github.com/harttle/liquidjs/commit/20f559e))
2021-02-05 16:00:50 +00:00
Jason EtcovitchandJun Yang 20f559e545 fix: default to precedence 1 for custom operators 2021-02-05 23:57:36 +08:00
harttle dce75a1a22 docs: fix get started code block 2021-02-05 09:48:28 +08:00
semantic-release-bot 93ec151374 chore(release): 9.22.0 [skip ci]
# [9.22.0](https://github.com/harttle/liquidjs/compare/v9.21.0...v9.22.0) (2021-02-04)

### Features

* compact filter ([f42c217](https://github.com/harttle/liquidjs/commit/f42c217))
2021-02-04 14:52:00 +00:00
Peter deHaanandJun Yang 29db1bb0e2 Update sidebar.yml
Add `compact` filter to sidebar nav.
2021-02-04 22:48:02 +08:00
harttle f42c217fc0 feat: compact filter 2021-02-04 22:47:34 +08:00
semantic-release-bot ec4a711e00 chore(release): 9.21.0 [skip ci]
# [9.21.0](https://github.com/harttle/liquidjs/compare/v9.20.1...v9.21.0) (2021-02-04)

### Features

* add `operators` option for custom operators ([75591cd](https://github.com/harttle/liquidjs/commit/75591cd))
* create trie programmatically in options ([befc33c](https://github.com/harttle/liquidjs/commit/befc33c))
* export OperatorMap type ([bc87e19](https://github.com/harttle/liquidjs/commit/bc87e19))
* export Operators from operator.ts ([6a7c280](https://github.com/harttle/liquidjs/commit/6a7c280))
* rename to defaultOperators and Operators ([8734e2e](https://github.com/harttle/liquidjs/commit/8734e2e))
2021-02-04 13:51:46 +00:00
Peter deHaanandJun Yang 03893d585e Typo: 'where' filter on filters/overview.md 2021-02-04 21:48:28 +08:00
allcontributors[bot]andJun Yang 3b97c38ee5 docs: update .all-contributorsrc [skip ci] 2021-02-04 09:12:26 +08:00
allcontributors[bot]andJun Yang 48a876db49 docs: update README.md [skip ci] 2021-02-04 09:12:26 +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 bc87e19e3e feat: export OperatorMap type 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
semantic-release-bot 5901611af5 chore(release): 9.20.1 [skip ci]
## [9.20.1](https://github.com/harttle/liquidjs/compare/v9.20.0...v9.20.1) (2021-01-24)

### Bug Fixes

* allow string literals contain delimiters, fixes [#288](https://github.com/harttle/liquidjs/issues/288) ([9c40da7](https://github.com/harttle/liquidjs/commit/9c40da7))
2021-01-24 04:52:24 +00:00
harttle 9c40da7369 fix: allow string literals contain delimiters, fixes #288 2021-01-24 12:49:19 +08:00
semantic-release-bot 5e7598ce45 chore(release): 9.20.0 [skip ci]
# [9.20.0](https://github.com/harttle/liquidjs/compare/v9.19.0...v9.20.0) (2021-01-23)

### Features

* support `{{block.super}}`, see [#38](https://github.com/harttle/liquidjs/issues/38) ([a3af44d](https://github.com/harttle/liquidjs/commit/a3af44d))
2021-01-23 19:01:03 +00:00
harttle 42591a04d8 docs: update dist links 2021-01-24 02:57:48 +08:00
harttle a3af44dc10 feat: support {{block.super}}, see #38 2021-01-24 02:57:48 +08:00
dependabot[bot]andJun Yang 0e0dc2adf0 chore(deps): bump ini from 1.3.5 to 1.3.7
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <[email protected]>
2021-01-24 02:36:33 +08:00
harttle 7b909c22a1 docs: demo for globals, for #286 2020-12-22 23:19:09 +08:00
semantic-release-bot 626f911503 chore(release): 9.19.0 [skip ci]
# [9.19.0](https://github.com/harttle/liquidjs/compare/v9.18.0...v9.19.0) (2020-12-18)

### Bug Fixes

* lint ([de32259](https://github.com/harttle/liquidjs/commit/de32259))
* move offset adding complexity inside TimezoneDate ([26b2175](https://github.com/harttle/liquidjs/commit/26b2175))
* simpler timezone regex and non-null offset ([e3ecfe3](https://github.com/harttle/liquidjs/commit/e3ecfe3))

### Features

* add preserveTimezones option ([d70cd2a](https://github.com/harttle/liquidjs/commit/d70cd2a))
* parse and handle date timezone offsets ([c16c787](https://github.com/harttle/liquidjs/commit/c16c787))
2020-12-18 14:07:14 +00: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 26b217542b fix: move offset adding complexity inside TimezoneDate 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
semantic-release-bot 13f5f95d01 chore(release): 9.18.0 [skip ci]
# [9.18.0](https://github.com/harttle/liquidjs/compare/v9.17.0...v9.18.0) (2020-12-17)

### Bug Fixes

* address refactor comments ([6a0ad10](https://github.com/harttle/liquidjs/commit/6a0ad10))

### Features

* add option for keeping variable type in output ([cd92e77](https://github.com/harttle/liquidjs/commit/cd92e77))
2020-12-17 15:17:09 +00:00
harttle c8db5e6259 docs: try fix special chars in changelog.md 2020-12-17 23:08:54 +08:00
allcontributors[bot]andJun Yang 9e511ecd14 docs: update .all-contributorsrc [skip ci] 2020-12-16 10:23:26 +08:00
allcontributors[bot]andJun Yang 45d95bb8d8 docs: update README.md [skip ci] 2020-12-16 10:23:26 +08:00
PixcellandJun Yang 8d3eca6ee2 stringify value in emitter when concatenating it 2020-12-16 10:20:10 +08:00
Alex de WergifosseandJun Yang 6a0ad102a8 fix: address refactor comments 2020-12-16 10:20:10 +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
allcontributors[bot]andJun Yang e84fbf32ad docs: update .all-contributorsrc [skip ci] 2020-12-14 22:49:50 +08:00
allcontributors[bot]andJun Yang 0266b27838 docs: update README.md [skip ci] 2020-12-14 22:49:50 +08:00
semantic-release-bot 090c88eb92 chore(release): 9.17.0 [skip ci]
# [9.17.0](https://github.com/harttle/liquidjs/compare/v9.16.1...v9.17.0) (2020-12-07)

### Bug Fixes

* elsif is not supported for unless, fixes [#268](https://github.com/harttle/liquidjs/issues/268) ([2bbf501](https://github.com/harttle/liquidjs/commit/2bbf501))
* enforce string-type pattern in `replace`, fixes [#243](https://github.com/harttle/liquidjs/issues/243) ([c8afa39](https://github.com/harttle/liquidjs/commit/c8afa39))
* raw block not ignoring {% characters, fixes [#263](https://github.com/harttle/liquidjs/issues/263) ([a492d8e](https://github.com/harttle/liquidjs/commit/a492d8e))

### Features

* passing liquid to FilterImpl, closes [#277](https://github.com/harttle/liquidjs/issues/277) ([f9f595f](https://github.com/harttle/liquidjs/commit/f9f595f))
2020-12-07 16:34:49 +00: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
sschuldenzuckerandJun Yang d8f9091a12 add and use error classes for undefined variables
cleans up funky message-matching code in expression.ts for lenient.
2020-12-06 22:58:08 +08:00
sschuldenzuckerandJun Yang ca18a579a1 Expression: minor type change & simplification
pre-fetching postfix simplifies code for 'lenient'
2020-12-06 22:58:08 +08:00
sschuldenzuckerandJun Yang 6f2b24f7ca implement lenientIf for the unless tag, too 2020-12-06 22:58:08 +08:00
sschuldenzuckerandJun Yang 87d7dd0d37 docs for the lenientIf option 2020-12-06 22:58:08 +08:00
sschuldenzuckerandJun Yang 768fb79e32 Implement lenientIf option (resolve #265; default off)
See description of the option in liquid-options.ts.
2020-12-06 22:58:08 +08:00
sschuldenzuckerandJun Yang c920ebb282 fix test: don't pass {} for Context 2020-12-06 22:58:08 +08:00
Jun YangandGitHub 9706e8b411 docs: add a security policy, see #254 2020-11-29 20:59:00 +08:00
dependabot[bot]andJun Yang 75698eefec chore(deps): bump highlight.js from 9.18.1 to 9.18.5 in /docs
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.1 to 9.18.5.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/9.18.1...9.18.5)

Signed-off-by: dependabot[bot] <[email protected]>
2020-11-25 21:56:22 +08:00
dependabot[bot]andJun Yang dfd358c0a2 chore(deps): bump highlight.js from 9.15.9 to 9.18.5
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.15.9 to 9.18.5.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/9.15.9...9.18.5)

Signed-off-by: dependabot[bot] <[email protected]>
2020-11-25 21:55:58 +08:00
dependabot[bot]andJun Yang 4c70946fa1 chore(deps-dev): bump semantic-release from 15.13.19 to 17.2.3
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.19 to 17.2.3.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](https://github.com/semantic-release/semantic-release/compare/v15.13.19...v17.2.3)

Signed-off-by: dependabot[bot] <[email protected]>
2020-11-20 22:11:04 +08:00
Jun YangandGitHub 9d9c0c1ca7 docs: update the UMD url and jsFiddle demo, see #264 2020-11-08 12:18:37 +08:00
semantic-release-bot a9d3a5a402 chore(release): 9.16.1 [skip ci]
## [9.16.1](https://github.com/harttle/liquidjs/compare/v9.16.0...v9.16.1) (2020-10-09)

### Bug Fixes

* braced property access ([18a807e](https://github.com/harttle/liquidjs/commit/18a807e))
2020-10-09 13:22:06 +00:00
wyoziandJun Yang 30dffb675e Test for broken quoted property access 2020-10-09 21:18:40 +08:00
wyoziandJun Yang e67c3c6924 Make end brace peek stricter and fix the test 2020-10-09 21:18:40 +08:00
wyoziandJun Yang e2e410f334 Add incomplete quoted property access test 2020-10-09 21:18:40 +08:00
wyoziandJun Yang 27ce44238e Test getVariableAsText 2020-10-09 21:18:40 +08:00
wyoziandJun Yang abfaf8a042 Test quoted property access tokenizing 2020-10-09 21:18:40 +08:00
wyoziandJun Yang 18a807ea2e fix: braced property access 2020-10-09 21:18:40 +08:00
harttle a6126c3bea docs: add amit777 as contributor for code 2020-10-08 16:57:59 +08:00
harttle a96d772963 docs: format 2020-10-08 14:40:58 +08:00
semantic-release-bot 732ef2605e chore(release): 9.16.0 [skip ci]
# [9.16.0](https://github.com/harttle/liquidjs/compare/v9.15.1...v9.16.0) (2020-10-08)

### Features

* support jsTruthy, [#255](https://github.com/harttle/liquidjs/issues/255) [#257](https://github.com/harttle/liquidjs/issues/257) ([72ee7b4](https://github.com/harttle/liquidjs/commit/72ee7b4))
2020-10-08 05:15:00 +00:00
harttle 72ee7b4c1e feat: support jsTruthy, #255 #257 2020-10-08 13:11:02 +08:00
Amit GuptaandJun Yang f807383f2a resolved issues raised by hhartle 2020-10-08 12:43:37 +08:00
Amit GuptaandJun 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
semantic-release-bot 8ee9bd7ba8 chore(release): 9.15.1 [skip ci]
## [9.15.1](https://github.com/harttle/liquidjs/compare/v9.15.0...v9.15.1) (2020-10-03)

### Bug Fixes

* allow quoted variable name in capture, fixes [#252](https://github.com/harttle/liquidjs/issues/252) ([5b3f419](https://github.com/harttle/liquidjs/commit/5b3f419))
2020-10-03 14:06:41 +00:00
harttle 5b3f4195f0 fix: allow quoted variable name in capture, fixes #252 2020-10-03 22:03:17 +08:00
dependabot[bot]andJun Yang 236d971705 chore(deps): bump node-fetch from 2.6.0 to 2.6.1
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <[email protected]>
2020-10-03 20:36:06 +08:00
Jun YangandGitHub 0cd4d87d46 docs: update the demo on index page, fixes #247 2020-09-11 22:30:21 +08:00
harttle 1fdfd4a68a docs: show social share on small screens 2020-08-12 20:37:07 +08:00
dependabot[bot]andJun Yang c1f73a9f03 chore(deps): bump prismjs from 1.19.0 to 1.21.0 in /docs
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.19.0 to 1.21.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.19.0...v1.21.0)

Signed-off-by: dependabot[bot] <[email protected]>
2020-08-08 22:14:03 +08:00
semantic-release-bot d8f550e447 chore(release): 9.15.0 [skip ci]
# [9.15.0](https://github.com/harttle/liquidjs/compare/v9.14.1...v9.15.0) (2020-08-04)

### Features

* export toPromise and toValue, see [#158](https://github.com/harttle/liquidjs/issues/158) ([2e5ab98](https://github.com/harttle/liquidjs/commit/2e5ab98))
2020-08-04 16:58:57 +00:00
harttle 2e5ab98bfc feat: export toPromise and toValue, see #158 2020-08-05 00:46:01 +08:00
harttle 0dbb7792d7 docs: fix button style 2020-08-01 22:00:12 +08:00
dependabot[bot]andJun Yang e10ce657dd chore(deps): bump elliptic from 6.5.0 to 6.5.3
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.0 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.0...v6.5.3)

Signed-off-by: dependabot[bot] <[email protected]>
2020-07-30 22:42:19 +08:00
harttle 3713fa08b2 docs: credit Peter deHaan as contributor 2020-07-25 23:31:48 +08:00
harttle c5002d8cad docs: location.hash for source code 2020-07-25 01:23:47 +08:00
dependabot[bot]andJun Yang 00b0a5708c chore(deps): bump lodash from 4.17.15 to 4.17.19 in /docs
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>
2020-07-20 21:14:42 +08:00
semantic-release-bot f82ee8a18c chore(release): 9.14.1 [skip ci]
## [9.14.1](https://github.com/harttle/liquidjs/compare/v9.14.0...v9.14.1) (2020-07-08)

### Bug Fixes

* enumerate Promises (e.g. in for & tablerow) ([#237](https://github.com/harttle/liquidjs/issues/237)) ([941dd66](https://github.com/harttle/liquidjs/commit/941dd66))
2020-07-08 17:40:43 +00:00
dependabot[bot]andJun Yang 632bb6b077 chore(deps): bump npm from 6.13.4 to 6.14.6
Bumps [npm](https://github.com/npm/cli) from 6.13.4 to 6.14.6.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v6.13.4...v6.14.6)

Signed-off-by: dependabot[bot] <[email protected]>
2020-07-09 01:36:21 +08:00
allcontributors[bot]GitHuballcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
0b6ee9bca1 docs: add tejasmanohar as a contributor (#238)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-06-28 09:57:45 +08:00
Tejas ManoharandGitHub 941dd668fe fix: enumerate Promises (e.g. in for & tablerow) (#237)
* fix: enumerate Promise<array> (e.g. in {% for ... %})

Previously, a Promise of an array was not being enumerated in
{% for %}, for example. This is misleading since the library
handles promises elsewhere (e.g. if you {% assign x = promiseArray %}
and then {% for v in x %}, it worked just fine.

This PR makes Promises of arrays handled by changing toEnumerable
to handle then-ables. This affects other iterators, too, e.g. tablerow,
so I put in a test for that as well.
2020-06-28 09:55:56 +08:00
semantic-release-bot 11ffd65503 chore(release): 9.14.0 [skip ci]
# [9.14.0](https://github.com/harttle/liquidjs/compare/v9.13.0...v9.14.0) (2020-06-25)

### Features

* setup universal browser and node builds ([6cf6ffa](https://github.com/harttle/liquidjs/commit/6cf6ffa))
2020-06-25 12:14:45 +00:00
Jun YangandGitHub ce0280ca9f Merge pull request #235 from harttle/all-contributors/add-TrySound
docs: add TrySound as a contributor
2020-06-25 20:10:15 +08:00
allcontributors[bot]andGitHub 1066ef0f76 docs: update .all-contributorsrc [skip ci] 2020-06-25 12:09:50 +00:00
allcontributors[bot]andGitHub 7b38c28d52 docs: update README.md [skip ci] 2020-06-25 12:09:49 +00:00
Jun YangandGitHub 97e7983bd8 Merge pull request #234 from TrySound/proper-modules
feat: setup universal browser and node builds
2020-06-25 20:08:47 +08:00
Bogdan Chadkin 6cf6ffae90 feat: setup universal browser and node builds
In this diff I fixed es modules distribution for bundlers.

Before we had two problems
- bundlers use "module" field to find es module build
- bundlers cannot use provided es module with node target

In this diff I addressed both of them. Now "main" and "module" fields
points to "node" specific versions. "browser" field provides aliases
with browser compatible builds.

All modern browsers support both "module" and "browser" fields.
2020-06-25 13:30:56 +03:00
semantic-release-bot 04873a4e9c chore(release): 9.13.0 [skip ci]
# [9.13.0](https://github.com/harttle/liquidjs/compare/v9.12.0...v9.13.0) (2020-06-25)

### Features

* async filters, closes [#232](https://github.com/harttle/liquidjs/issues/232) ([e36f3ff](https://github.com/harttle/liquidjs/commit/e36f3ff))
2020-06-25 05:56:31 +00:00
harttle 1a08efd402 docs: better style for API doc 2020-06-25 13:15:02 +08:00
harttle e36f3ff291 feat: async filters, closes #232 2020-06-25 12:30:56 +08:00
harttle f3f017bd37 style: spaces and extra NL 2020-05-30 22:13:20 +08:00
harttle 0d20a344b6 docs: manifest for liquidjs.com 2020-05-23 02:14:23 +08:00
Jun YangandGitHub 3acbdfc1b7 Merge pull request #229 from stedman/patch-1
docs: Add hashes to `for` tag documentation
2020-05-23 01:56:13 +08:00
Anthony CiccarelloandJun Yang ed994bdbd5 fix elsif spelling on tags overview in docs 2020-05-23 01:56:03 +08:00
dependabot[bot]andJun Yang 27a4c7666b chore(deps): bump jquery from 3.4.1 to 3.5.0
Bumps [jquery](https://github.com/jquery/jquery) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/jquery/jquery/releases)
- [Commits](https://github.com/jquery/jquery/compare/3.4.1...3.5.0)

Signed-off-by: dependabot[bot] <[email protected]>
2020-05-23 01:55:30 +08:00
harttle 064ea99f49 docs: add credit for @stedman (#229) and @aciccarello (#223) 2020-05-22 11:44:23 +08:00
harttle 71fb8a8b7c chore: +pre-commit hook, -commitlint on travis 2020-05-22 11:41:32 +08:00
Steve Stedman acdd121a61 docs: Add hashes to for tag documentation
This extremely helpful information was found at https://github.com/Shopify/liquid/wiki/Liquid-for-Designers#allowed-collection-types
2020-05-21 11:11:01 -05:00
semantic-release-bot 2de853e814 chore(release): 9.12.0 [skip ci]
# [9.12.0](https://github.com/harttle/liquidjs/compare/v9.11.11...v9.12.0) (2020-05-15)

### Features

* sort by key, see [#227](https://github.com/harttle/liquidjs/issues/227) ([4f17c94](https://github.com/harttle/liquidjs/commit/4f17c94))
2020-05-15 16:59:44 +00:00
harttle 4f17c94988 feat: sort by key, see #227 2020-05-16 00:54:40 +08:00
semantic-release-bot d39f65c564 chore(release): 9.11.11 [skip ci]
## [9.11.11](https://github.com/harttle/liquidjs/compare/v9.11.10...v9.11.11) (2020-05-01)

### Bug Fixes

* properly treat unicode blanks, fixes [#221](https://github.com/harttle/liquidjs/issues/221) ([673b015](https://github.com/harttle/liquidjs/commit/673b015))
2020-05-01 07:20:59 +00:00
harttle 673b015435 fix: properly treat unicode blanks, fixes #221 2020-04-28 20:55:30 +08:00
harttle 2fa4edaa84 docs: more specific description of strftime 2020-04-19 13:15:11 +08:00
dependabot[bot]andJun Yang 83b46bd25d chore(deps): bump https-proxy-agent from 2.2.2 to 2.2.4
Bumps [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) from 2.2.2 to 2.2.4.
- [Release notes](https://github.com/TooTallNate/node-https-proxy-agent/releases)
- [Commits](https://github.com/TooTallNate/node-https-proxy-agent/compare/2.2.2...2.2.4)

Signed-off-by: dependabot[bot] <[email protected]>
2020-04-18 14:58:17 +08:00
harttle 4e34e78176 docs: fix docsearch 2020-04-12 20:45:52 +08:00
harttle 3873ba0783 docs: docsearch 2020-04-11 21:52:55 +08:00
dependabot[bot]andJun Yang 4799a98bf9 chore(deps): bump acorn from 3.3.0 to 6.4.1
Bumps [acorn](https://github.com/acornjs/acorn) from 3.3.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/3.3.0...6.4.1)

Signed-off-by: dependabot[bot] <[email protected]>
2020-04-04 12:17:47 +08:00
semantic-release-bot 0953680112 chore(release): 9.11.10 [skip ci]
## [9.11.10](https://github.com/harttle/liquidjs/compare/v9.11.9...v9.11.10) (2020-04-03)

### Bug Fixes

* respect cache render options ([a93f11d](https://github.com/harttle/liquidjs/commit/a93f11d))
2020-04-03 15:11:24 +00:00
harttle f6789f517c docs: make it clear for extnames, see #214 2020-04-03 23:08:09 +08:00
allcontributors[bot]andJun Yang 5099b2a762 docs: update README.md [skip ci] 2020-04-03 10:44:38 +08:00
Martin SchusterandJun Yang a93f11d25a fix: respect cache render options 2020-04-03 10:42:32 +08:00
harttle 3cf8072df5 docs: fix news date in liquidjs.com 2020-04-01 14:34:13 +08:00
semantic-release-bot bf609b443b chore(release): 9.11.9 [skip ci]
## [9.11.9](https://github.com/harttle/liquidjs/compare/v9.11.8...v9.11.9) (2020-03-31)

### Bug Fixes

* coerce to Array in `map` and `where` filter ([c923598](https://github.com/harttle/liquidjs/commit/c923598))
2020-03-31 18:26:08 +00:00
harttle c923598b40 fix: coerce to Array in map and where filter 2020-04-01 02:22:44 +08:00
semantic-release-bot d65ed408f0 chore(release): 9.11.8 [skip ci]
## [9.11.8](https://github.com/harttle/liquidjs/compare/v9.11.7...v9.11.8) (2020-03-31)

### Bug Fixes

* throw an error if : omitted unintentionally, [#212](https://github.com/harttle/liquidjs/issues/212), [#208](https://github.com/harttle/liquidjs/issues/208) ([8daf281](https://github.com/harttle/liquidjs/commit/8daf281))
2020-03-31 16:05:54 +00:00
harttle e750c35f8c docs: add @cfjedimaster as a contributor 2020-04-01 00:02:17 +08:00
harttle 8daf281fca fix: throw an error if : omitted unintentionally, #212, #208 2020-03-31 14:05:38 +08:00
harttle c30766ffe1 style: eslint fix docs/ 2020-03-31 01:25:31 +08:00
Raymond CamdenandJun Yang bf23116ce5 Update demo.liquid
Fix typo
2020-03-30 21:17:04 +08:00
harttle 983bcf467a docs: add tutorials/options.md 2020-03-29 22:10:52 +08:00
harttle 9ebf11edcf docs: update README to refer to liquidjs.com 2020-03-28 21:09:08 +08:00
semantic-release-bot 8d0ef21267 chore(release): 9.11.7 [skip ci]
## [9.11.7](https://github.com/harttle/liquidjs/compare/v9.11.6...v9.11.7) (2020-03-28)

### Bug Fixes

* try fix travis ([b3db412](https://github.com/harttle/liquidjs/commit/b3db412))
2020-03-28 10:12:33 +00:00
harttle 687d3ad12a chore: try fix travis again 2020-03-28 18:08:30 +08:00
harttle b3db412428 fix: try fix travis 2020-03-28 17:50:51 +08:00
harttle 3e42d6b1b0 docs: website for LiquidJS 2020-03-28 17:21:07 +08:00
semantic-release-bot 0633dbeabb chore(release): 9.11.6 [skip ci]
## [9.11.6](https://github.com/harttle/liquidjs/compare/v9.11.5...v9.11.6) (2020-03-25)

### Bug Fixes

* default filter not applied for empty array ([c371762](https://github.com/harttle/liquidjs/commit/c371762))
2020-03-25 17:42:48 +00:00
harttle c371762c43 fix: default filter not applied for empty array 2020-03-26 01:39:30 +08:00
925 changed files with 62381 additions and 73177 deletions
+501 -3
View File
@@ -7,8 +7,8 @@
"README.md"
],
"imageSize": 100,
"commit": true,
"commitConvention": "eslint",
"commit": false,
"commitConvention": "angular",
"contributors": [
{
"login": "harttle",
@@ -260,8 +260,506 @@
"contributions": [
"code"
]
},
{
"login": "cfjedimaster",
"name": "Raymond Camden",
"avatar_url": "https://avatars3.githubusercontent.com/u/393660?v=4",
"profile": "https://www.raymondcamden.com",
"contributions": [
"doc"
]
},
{
"login": "stedman",
"name": "Steve Stedman",
"avatar_url": "https://avatars1.githubusercontent.com/u/183122?v=4",
"profile": "https://stedman.dev",
"contributions": [
"doc"
]
},
{
"login": "aciccarello",
"name": "Anthony Ciccarello",
"avatar_url": "https://avatars0.githubusercontent.com/u/11273838?v=4",
"profile": "https://ciccarello.me",
"contributions": [
"doc"
]
},
{
"login": "TrySound",
"name": "Bogdan Chadkin",
"avatar_url": "https://avatars0.githubusercontent.com/u/5635476?v=4",
"profile": "https://twitter.com/IAmTrySound",
"contributions": [
"code"
]
},
{
"login": "tejasmanohar",
"name": "Tejas Manohar",
"avatar_url": "https://avatars0.githubusercontent.com/u/5959235?v=4",
"profile": "https://hightouch.io",
"contributions": [
"code"
]
},
{
"login": "pdehaan",
"name": "Peter deHaan",
"avatar_url": "https://avatars2.githubusercontent.com/u/557895?v=4",
"profile": "http://about.me/peterdehaan",
"contributions": [
"doc"
]
},
{
"login": "amit777",
"name": "amit777",
"avatar_url": "https://avatars0.githubusercontent.com/u/2703309?v=4",
"profile": "https://github.com/amit777",
"contributions": [
"code"
]
},
{
"login": "sschuldenzucker",
"name": "Steffen Schuldenzucker",
"avatar_url": "https://avatars3.githubusercontent.com/u/1100776?v=4",
"profile": "http://www.ifi.uzh.ch/en/ce/people/schuldenzucker.html",
"contributions": [
"code"
]
},
{
"login": "Pixcell",
"name": "Pixcell",
"avatar_url": "https://avatars0.githubusercontent.com/u/4005291?v=4",
"profile": "https://github.com/Pixcell",
"contributions": [
"code"
]
},
{
"login": "JasonEtco",
"name": "Jason Etcovitch",
"avatar_url": "https://avatars.githubusercontent.com/u/10660468?v=4",
"profile": "https://jasonet.co",
"contributions": [
"code"
]
},
{
"login": "kayuapi",
"name": "ZC",
"avatar_url": "https://avatars.githubusercontent.com/u/10304328?v=4",
"profile": "https://github.com/kayuapi",
"contributions": [
"doc"
]
},
{
"login": "mems",
"name": "Memmie Lenglet",
"avatar_url": "https://avatars.githubusercontent.com/u/729275?v=4",
"profile": "https://memmie.lenglet.name",
"contributions": [
"code"
]
},
{
"login": "ilhamdev0",
"name": "ilhamdev0",
"avatar_url": "https://avatars.githubusercontent.com/u/57636145?v=4",
"profile": "https://github.com/ilhamdev0",
"contributions": [
"doc"
]
},
{
"login": "c412216887",
"name": "一饮一啄皆是人生",
"avatar_url": "https://avatars.githubusercontent.com/u/29691650?v=4",
"profile": "https://github.com/c412216887",
"contributions": [
"doc"
]
},
{
"login": "labnol",
"name": "Amit Agarwal",
"avatar_url": "https://avatars.githubusercontent.com/u/1344071?v=4",
"profile": "https://digitalinspiration.com/",
"contributions": [
"doc"
]
},
{
"login": "n1ru4l",
"name": "Laurin Quast",
"avatar_url": "https://avatars.githubusercontent.com/u/14338007?v=4",
"profile": "https://n1ru4l.cloud/",
"contributions": [
"code"
]
},
{
"login": "mattvague",
"name": "Matt Vague",
"avatar_url": "https://avatars.githubusercontent.com/u/64985?v=4",
"profile": "https://github.com/mattvague",
"contributions": [
"code"
]
},
{
"login": "bglw",
"name": "Liam Bigelow",
"avatar_url": "https://avatars.githubusercontent.com/u/40188355?v=4",
"profile": "https://github.com/bglw",
"contributions": [
"code"
]
},
{
"login": "JaKXz",
"name": "Jason Kurian",
"avatar_url": "https://avatars.githubusercontent.com/u/2642545?v=4",
"profile": "https://about.me/jasonkurian",
"contributions": [
"doc"
]
},
{
"login": "dphm",
"name": "d pham (they/them)",
"avatar_url": "https://avatars.githubusercontent.com/u/1707217?v=4",
"profile": "https://github.com/dphm",
"contributions": [
"doc"
]
},
{
"login": "AleksandrHovhannisyan",
"name": "Aleksandr Hovhannisyan",
"avatar_url": "https://avatars.githubusercontent.com/u/19352442?v=4",
"profile": "https://www.aleksandrhovhannisyan.com/",
"contributions": [
"code"
]
},
{
"login": "jg-rp",
"name": "jg-rp",
"avatar_url": "https://avatars.githubusercontent.com/u/72664870?v=4",
"profile": "https://github.com/jg-rp",
"contributions": [
"code"
]
},
{
"login": "ameyaapte1",
"name": "Ameya Apte",
"avatar_url": "https://avatars.githubusercontent.com/u/16054747?v=4",
"profile": "https://github.com/ameyaapte1",
"contributions": [
"code"
]
},
{
"login": "tbdrz",
"name": "tbdrz",
"avatar_url": "https://avatars.githubusercontent.com/u/50599116?v=4",
"profile": "https://github.com/tbdrz",
"contributions": [
"doc"
]
},
{
"login": "santialbo",
"name": "Santi Albo",
"avatar_url": "https://avatars.githubusercontent.com/u/1557563?v=4",
"profile": "http://santialbo.com",
"contributions": [
"doc",
"code"
]
},
{
"login": "YahangWu",
"name": "Yahang Wu",
"avatar_url": "https://avatars.githubusercontent.com/u/12295975?v=4",
"profile": "https://github.com/YahangWu",
"contributions": [
"doc"
]
},
{
"login": "hongl-1",
"name": "hongl",
"avatar_url": "https://avatars.githubusercontent.com/u/101576612?v=4",
"profile": "https://github.com/hongl-1",
"contributions": [
"doc"
]
},
{
"login": "zxx-457",
"name": "zxx-457",
"avatar_url": "https://avatars.githubusercontent.com/u/114141362?v=4",
"profile": "https://github.com/zxx-457",
"contributions": [
"doc"
]
},
{
"login": "prassie",
"name": "prassie",
"avatar_url": "https://avatars.githubusercontent.com/u/1357831?v=4",
"profile": "https://github.com/prassie",
"contributions": [
"doc"
]
},
{
"login": "slavivanov",
"name": "Slav Ivanov",
"avatar_url": "https://avatars.githubusercontent.com/u/713329?v=4",
"profile": "http://slavv.com/",
"contributions": [
"code"
]
},
{
"login": "DaRosenberg",
"name": "Daniel Rosenberg",
"avatar_url": "https://avatars.githubusercontent.com/u/3889090?v=4",
"profile": "http://www.orgflow.io/",
"contributions": [
"code"
]
},
{
"login": "bobgubko",
"name": "bobgubko",
"avatar_url": "https://avatars.githubusercontent.com/u/733312?v=4",
"profile": "https://github.com/bobgubko",
"contributions": [
"code"
]
},
{
"login": "bangank36",
"name": "BaNgan",
"avatar_url": "https://avatars.githubusercontent.com/u/10071857?v=4",
"profile": "https://github.com/bangank36",
"contributions": [
"doc"
]
},
{
"login": "mahyar-pasarzangene",
"name": "Mahyar Pasarzangene",
"avatar_url": "https://avatars.githubusercontent.com/u/16485039?v=4",
"profile": "https://github.com/mahyar-pasarzangene",
"contributions": [
"doc"
]
},
{
"login": "TomasHubelbauer",
"name": "Tomáš Hübelbauer",
"avatar_url": "https://avatars.githubusercontent.com/u/6831144?v=4",
"profile": "https://hubelbauer.net/",
"contributions": [
"code",
"doc"
]
},
{
"login": "jgarber623",
"name": "Jason Garber",
"avatar_url": "https://avatars.githubusercontent.com/u/73866?v=4",
"profile": "https://sixtwothree.org",
"contributions": [
"code"
]
},
{
"login": "NReilingh",
"name": "Nick Reilingh",
"avatar_url": "https://avatars.githubusercontent.com/u/2458645?v=4",
"profile": "http://nickreilingh.com/",
"contributions": [
"doc"
]
},
{
"login": "ebobby",
"name": "Francisco Soto",
"avatar_url": "https://avatars.githubusercontent.com/u/170356?v=4",
"profile": "http://ebobby.org",
"contributions": [
"code"
]
},
{
"login": "davidlj95",
"name": "David LJ",
"avatar_url": "https://avatars.githubusercontent.com/u/8050648?v=4",
"profile": "https://www.davidlj95.com",
"contributions": [
"doc"
]
},
{
"login": "RasmusWL",
"name": "Rasmus Wriedt Larsen",
"avatar_url": "https://avatars.githubusercontent.com/u/1054041?v=4",
"profile": "https://github.com/RasmusWL",
"contributions": [
"doc"
]
},
{
"login": "brunodccarvalho",
"name": "Bruno Carvalho",
"avatar_url": "https://avatars.githubusercontent.com/u/24962950?v=4",
"profile": "https://github.com/brunodccarvalho",
"contributions": [
"code"
]
},
{
"login": "fupengl",
"name": "傅鹏",
"avatar_url": "https://avatars.githubusercontent.com/u/20211964?v=4",
"profile": "https://github.com/fupengl",
"contributions": [
"code"
]
},
{
"login": "joel-hamilton",
"name": "Joel Hamilton",
"avatar_url": "https://avatars.githubusercontent.com/u/12899024?v=4",
"profile": "https://github.com/joel-hamilton",
"contributions": [
"code"
]
},
{
"login": "amedve",
"name": "Max Medve",
"avatar_url": "https://avatars.githubusercontent.com/u/23156422?v=4",
"profile": "https://github.com/amedve",
"contributions": [
"code"
]
},
{
"login": "cossssmin",
"name": "Cosmin Popovici",
"avatar_url": "https://avatars.githubusercontent.com/u/1656595?v=4",
"profile": "https://maizzle.com",
"contributions": [
"doc"
]
},
{
"login": "admtnnr",
"name": "Adam Tanner",
"avatar_url": "https://avatars.githubusercontent.com/u/27502?v=4",
"profile": "https://github.com/admtnnr",
"contributions": [
"code"
]
},
{
"login": "GuillermoCasalCaro",
"name": "Guillermo Casal Caro",
"avatar_url": "https://avatars.githubusercontent.com/u/18685581?v=4",
"profile": "https://github.com/GuillermoCasalCaro",
"contributions": [
"code"
]
},
{
"login": "jsoref",
"name": "Josh Soref",
"avatar_url": "https://avatars.githubusercontent.com/u/2119212?v=4",
"profile": "https://github.com/jsoref",
"contributions": [
"doc"
]
},
{
"login": "vrugtehagel",
"name": "Koen",
"avatar_url": "https://avatars.githubusercontent.com/u/41021050?v=4",
"profile": "https://vrugtehagel.nl",
"contributions": [
"code"
]
},
{
"login": "Neamar",
"name": "Matthieu Bacconnier",
"avatar_url": "https://avatars.githubusercontent.com/u/536844?v=4",
"profile": "https://neamar.fr",
"contributions": [
"doc"
]
},
{
"login": "timvandam",
"name": "Tim van Dam",
"avatar_url": "https://avatars.githubusercontent.com/u/35376389?v=4",
"profile": "https://tovd.dev",
"contributions": [
"code"
]
},
{
"login": "edh649",
"name": "Ed Hanton",
"avatar_url": "https://avatars.githubusercontent.com/u/527604?v=4",
"profile": "https://github.com/edh649",
"contributions": [
"doc"
]
},
{
"login": "gurdiga",
"name": "Vlad GURDIGA",
"avatar_url": "https://avatars.githubusercontent.com/u/53922?v=4",
"profile": "https://gurdiga.com",
"contributions": [
"doc"
]
},
{
"login": "StreakingMan",
"name": "裸奔狂甩丁丁",
"avatar_url": "https://avatars.githubusercontent.com/u/30397306?v=4",
"profile": "https://www.streakingman.com",
"contributions": [
"doc"
]
},
{
"login": "skynetigor",
"name": "Ihor Panasiuk",
"avatar_url": "https://avatars.githubusercontent.com/u/20903171?v=4",
"profile": "https://github.com/skynetigor",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"skipCi": true
"skipCi": true,
"commitType": "docs"
}
+1
View File
@@ -3,3 +3,4 @@ dist
demo
coverage
docs
private.*
+23 -1
View File
@@ -7,17 +7,23 @@
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json"
},
"plugins": [
"deprecation",
"mocha",
"standard",
"@typescript-eslint",
"promise"
],
"rules": {
"deprecation/deprecation": "error",
"no-var": 2,
"prefer-const": 2,
"no-unused-vars": "off",
"indent": "off",
"no-mixed-operators": "off",
"no-dupe-class-members": "off",
"no-useless-constructor": "off",
"@typescript-eslint/indent": ["error", 2],
@@ -30,5 +36,21 @@
"@typescript-eslint/no-non-null-assertion": "off",
"import/export": "off",
"@typescript-eslint/no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": false }]
}
},
"overrides": [{
"files": ["**/filters/*.ts"],
"rules": {
"camelcase": "off"
}
}, {
"files": ["**/*.js", "**/*.mjs"],
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}, {
"files": ["test/**/*.ts"],
"rules": {
"deprecation/deprecation": "off"
}
}]
}
+2 -2
View File
@@ -1,7 +1,7 @@
# These are supported funding model platforms
# github: harttle
patreon: harttle
github: harttle
# patreon: harttle
open_collective: liquidjs
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+40
View File
@@ -0,0 +1,40 @@
name: Build
on:
workflow_call:
inputs:
os:
required: true
type: string
bundles:
required: false
type: string
env:
BUNDLES: ${{ inputs.bundles }}
jobs:
build:
name: Build
runs-on: ${{ inputs.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ inputs.os }}
path: dist
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs-${{ inputs.os }}
path: ~/.npm/_logs
+28
View File
@@ -0,0 +1,28 @@
name: CI Build
on:
push:
branches:
- 'master'
- 'test'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
uses: ./.github/workflows/build.yml
with:
os: ${{ matrix.os }}
lint:
uses: ./.github/workflows/lint.yml
test:
needs: build
uses: ./.github/workflows/test.yml
coverage:
uses: ./.github/workflows/coverage.yml
performance:
needs: build
uses: ./.github/workflows/performance.yml
with:
os: ubuntu-latest
docs:
uses: ./.github/workflows/docs.yml
+29
View File
@@ -0,0 +1,29 @@
name: Test Coverage
on: [workflow_dispatch, workflow_call]
jobs:
coverage:
name: Test Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test:coverage
- name: Coverage
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs
path: ~/.npm/_logs
+31
View File
@@ -0,0 +1,31 @@
name: Docs
on: [workflow_dispatch, workflow_call]
jobs:
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Build
run: |
npm ci
npm run build:docs
- name: Publish
if: github.ref == 'refs/heads/master'
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/public
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs
path: ~/.npm/_logs
+25
View File
@@ -0,0 +1,25 @@
name: Lint
on: [workflow_dispatch, workflow_call]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs
path: ~/.npm/_logs
+33
View File
@@ -0,0 +1,33 @@
name: Performance Check
on:
workflow_call:
inputs:
os:
required: true
type: string
jobs:
performance:
name: Performance
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist-${{ inputs.os }}
path: dist
- name: Check Performance
run: npm run perf:diff
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs
path: ~/.npm/_logs
+22
View File
@@ -0,0 +1,22 @@
name: PR Build
on: pull_request
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
uses: ./.github/workflows/build.yml
with:
os: ${{ matrix.os }}
lint:
uses: ./.github/workflows/lint.yml
test:
needs: build
uses: ./.github/workflows/test.yml
coverage:
uses: ./.github/workflows/coverage.yml
performance:
needs: build
uses: ./.github/workflows/performance.yml
with:
os: ubuntu-latest
+14
View File
@@ -0,0 +1,14 @@
name: PR Check
on:
pull_request_target:
types:
- opened
- edited
jobs:
title:
name: Check PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+33
View File
@@ -0,0 +1,33 @@
name: Release
on: workflow_dispatch
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install Dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [ ${{ github.ref == 'refs/heads/master' }} ]; then
npx semantic-release
else
npx semantic-release --dry-run
fi
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs
path: ~/.npm/_logs
+73
View File
@@ -0,0 +1,73 @@
name: Test
on: [workflow_dispatch, workflow_call]
jobs:
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest]
timezone: [Etc/GMT, Asia/Shanghai, America/New_York]
node-version: [22]
include:
- os: macos-latest
timezone: America/New_York
node-versoin: 22
- os: ubuntu-latest
timezone: Etc/GMT
node-version: 20
- os: ubuntu-latest
timezone: Asia/Shanghai
node-version: 18
- os: ubuntu-latest
timezone: Asia/Shanghai
node-version: 16
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist-${{ matrix.os }}
path: dist
- name: Run Test
run: TZ=${{ matrix.timezone }} npm test
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-npm-logs-${{ matrix.os }}-${{ matrix.node-version }}
path: ~/.npm/_logs
demo:
name: Demo Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist-ubuntu-latest
path: dist
- name: Run Demo Test
run: npm run test:demo
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: demo-npm-logs
path: ~/.npm/_logs
+5 -1
View File
@@ -9,8 +9,12 @@ coverage/
# modules
node_modules/
# tmp
docs/public/js/liquid.browser.min.js
docs/themes/navy/layout/partial/all-contributors.swig
docs/themes/navy/layout/partial/financial-contributors.swig
dist/
demo/*/package-lock.json
demo/*/yarn.json
# editors
+4
View File
@@ -0,0 +1,4 @@
module.exports = {
require: "ts-node/register/transpile-only",
reporter: "spec"
}
+4
View File
@@ -0,0 +1,4 @@
{
"exclude": ["dist", "test"],
"reporter": ["html", "lcov"]
}
-20
View File
@@ -1,20 +0,0 @@
language: node_js
node_js:
- "10"
- "8"
jobs:
include:
- stage: test
name: 'Linting'
script:
- npm run lint
- commitlint-travis
- name: 'Coverage'
script: npm run coverage-coveralls
- stage: release
if: branch = master
script: skip
deploy:
provider: script
skip_cleanup: true
script: npx semantic-release
+1044 -4
View File
File diff suppressed because it is too large Load Diff
+56
View File
@@ -0,0 +1,56 @@
# Contributing
1. Build everything and run tests to learn how to do both:
- `npm run build`
- `npm run test`
Tests won't at first unless you've done a build at least once.
Subsequent changes to tests do not need re-builds but changes to the code and
then tests need a build to pick up the new code by the tests.
2. Make your changes and add a test for them
- Build after you've made your changes
- Run tests as per the above to validate your changes
3. Create a pull request
- Ensure the build runs because the Husky pre-commit hook checks it
- `npm run check` checks runs the build, tests, lint and perf tests
- `commitlint` checks the commit message format
If there is a problem you will see it in the pre-commit hook output.
In VS Code, this output will be shown in a new file in a new tab if the
pre-commit hook fails.
If you want to check the commit message without using the VS Code Source
Control UI, you can run `echo "feat: my commit message" > npx commitlint`
directly.
- `git switch -c your_branch_name` (do this in your fork not the main repo)
- `git add .`
- `git commit -m "feat: Adding my change"`
- `git push`
- Go to GitHub and find your fork, open a PR against the upstream from it
## Playground
The Playground runs off the `docs` directory.
`npm run build:docs` is used to build it.
Then, to start the site locally, go to `docs` and run `npm start`, then visit
http://localhost:4000/playground.html.
The Playground uses a local built LiquidJS, which is created during `npm run build:docs`.
To update that, you'll need to run `./bin/build-docs-liquid.sh` each time after making changes.
Then refresh the Playground site for the changes to take effect.
## Performance
If your change can have a performance impact, you can update and run performance cases under `benchmark/`.
1. `npm run build:cjs` to build a CommonJS bundle for the perf test.
2. `npm run perf:diff` to check whether there's a regression compared against `liquidjs@latest`
Further more, `benchmark/` contains different cases to check its ops/sec. Useful when debugging perf regressions, to use it:
- `cd benchmark` go into benchmark project
- `npm ci` install dependencies
- `npm start` run the cases
+192 -106
View File
@@ -1,144 +1,230 @@
# liquidjs
[![npm version](https://img.shields.io/npm/v/liquidjs.svg)](https://www.npmjs.org/package/liquidjs)
[![npm downloads](https://img.shields.io/npm/dm/liquidjs.svg)](https://www.npmjs.org/package/liquidjs)
[![coveralls coverage](https://img.shields.io/coveralls/harttle/liquidjs.svg)](https://coveralls.io/github/harttle/liquidjs?branch=master)
[![travis Build Status](https://travis-ci.org/harttle/liquidjs.svg?branch=master)](https://travis-ci.org/harttle/liquidjs)
[![GitHub issues](https://img.shields.io/github/issues-closed/harttle/liquidjs.svg)](https://github.com/harttle/liquidjs/issues)
[![GitHub contributors](https://img.shields.io/github/contributors/harttle/liquidjs.svg)](https://github.com/harttle/liquidjs/graphs/contributors)
[![Open Collective contributors](https://img.shields.io/opencollective/all/liquidjs)](https://opencollective.com/liquidjs)
[![David dependencies](https://img.shields.io/david/harttle/liquidjs.svg)](https://david-dm.org/harttle/liquidjs)
[![David devDependencies](https://img.shields.io/david/dev/harttle/liquidjs.svg)](https://david-dm.org/harttle/liquidjs?type=dev)
[![DUB license](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/harttle/liquidjs/blob/master/LICENSE)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/harttle/liquidjs)
[![npm version](https://img.shields.io/npm/v/liquidjs.svg?logo=npm&style=flat-square)](https://www.npmjs.org/package/liquidjs)
[![npm downloads](https://img.shields.io/npm/dm/liquidjs.svg?style=flat-square)](https://www.npmjs.org/package/liquidjs)
[![Coverage](https://img.shields.io/coveralls/harttle/liquidjs.svg?style=flat-square)](https://coveralls.io/github/harttle/liquidjs?branch=master)
[![Build Status](https://img.shields.io/github/actions/workflow/status/harttle/liquidjs/ci-build.yml?branch=master&style=flat-square)](https://github.com/harttle/liquidjs/actions/workflows/ci-build.yml?query=branch%3Amaster)
[![DUB license](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](https://github.com/harttle/liquidjs/blob/master/LICENSE)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/harttle/liquidjs)
A simple, expressive, safe and [shopify][shopify/liquid] compatible template engine in pure JavaScript.
**The purpose of this repo** is to provide a standard Liquid implementation for the JavaScript community.
A simple, expressive and safe [Shopify][shopify/liquid] / GitHub Pages compatible template engine in pure JavaScript.
**The purpose of this repo** is to provide a standard Liquid implementation for the JavaScript community so that [Jekyll sites](https://jekyllrb.com), [GitHub Pages](https://pages.github.com/) and [Shopify templates](https://themes.shopify.com/) can be ported to Node.js without pain.
* [Jekyll sites](https://jekyllrb.com), [Github Pages](https://pages.github.com/) and [Shopify templates](https://themes.shopify.com/) can be ported to Node.js without pain.
* All features, filters and tags in [shopify/liquid](https://github.com/Shopify/liquid) are supposed to be built in LiquidJS, though there are still some differences and limitations (see below).
* [Documentation][doc]
* Please star [LiquidJS on GitHub][github]!
* Financial support via [GitHub Sponsors](https://github.com/sponsors/harttle).
> Version 9 has published, [see how to migrate to 9.0.0](https://github.com/harttle/liquidjs/wiki/Migrate-to-9)!
<p align="center"><a href="https://liquidjs.com"><img height="155px" width="155px" src="https://liquidjs.com/icon/mstile-310x310.png" alt="logo"></a></p>
## Get Started
## What's it like?
Install via npm:
Basically there're two types of Liquid syntax: tags enclosed by `{% %}` and outputs enclosed by `{{ }}`. A Liquid template looks like:
```liquid
{% if username %}
{{ username | append: ", welcome to LiquidJS!" | capitalize }}
{% endif %}
```
[A live demo](https://liquidjs.com/playground.html) is also available and here's a [quick tutorial](https://liquidjs.com/tutorials/intro-to-liquid.html) for Liquid syntax.
## Installation
Install from npm in Node.js:
```bash
npm install --save liquidjs
npm install liquidjs
```
```javascript
var { Liquid } = require('liquidjs');
var engine = new Liquid();
engine
.parseAndRender('{{name | capitalize}}', {name: 'alice'})
.then(console.log); // outputs 'Alice'
```
Or include the UMD build, a live demo is available on jsfiddle: <https://jsfiddle.net/x43eb0z6/>. You may need a [Promise polyfill][pp] for Node.js &lt; 4 and ES5 browsers like [IE and Android UC][caniuse-promises].
Or use the UMD bundle from jsDelivr:
```html
<script src="//unpkg.com/liquidjs/dist/liquid.min.js"></script> <!--for production-->
<script src="//unpkg.com/liquidjs/dist/liquid.js"></script> <!--for development-->
<script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>
```
Also available from CLI:
Or render directly from CLI using npx:
```bash
echo '{{"hello" | capitalize}}' | npx liquidjs
npx liquidjs --template 'Hello, {{ name }}!' --context '{"name": "Snake"}'
```
For detailed documents, see:
For more details, refer to the [Setup Guide][setup].
* The [Wiki Page](https://github.com/harttle/liquidjs/wiki) contains tutorials and advanced topics.
* The [API Reference](https://harttle.github.io/liquidjs/classes/_liquid_.liquid.html) provides detailed descriptions for classes, methods and properties.
## Who's Using LiquidJS?
## Differences and Limitations
- [Eleventy](https://www.11ty.dev/): Eleventy, a simpler static site generator.
- [Github Docs](https://github.com/github/docs): The open-source repo for docs.github.com.
- [Opensense](https://www.opensense.com/): The smarter way to send email.
- [Directus](https://docs.directus.io/): an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.
- [Semgrep](https://github.com/returntocorp/semgrep): Lightweight static analysis for many languages.
- [Rock](https://www.rockrms.com/): An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
- [Mitosis](https://github.com/BuilderIO/mitosis): Write components once, run everywhere. Compiles to React, Vue, Qwik, Solid, Angular, Svelte, and more.
- [Pattern Lab](https://patternlab.io/): a frontend workshop environment that helps you build, view, test, and showcase your design system's UI components.
- [Builder.io](https://www.builder.io/m/developers): the first and only headless CMS with a visual editor that lets you drag and drop with your components, directly within your current site or app. Completely API-driven, for cleaner code and simpler workflows.
- [Microsoft Power Pages](https://learn.microsoft.com/en-us/power-pages/introduction): a secure, enterprise-grade, low-code software as a service (SaaS) platform for creating, hosting, and administering modern external-facing business websites.
- [Azure API Management developer portal](https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-developer-portal): an automatically generated, fully customizable website with the documentation of your APIs.
- [WISMOlabs](https://wismolabs.com/): Post Purchase Experience platform for eCommerce retailers enhancing customer satisfaction by using LiquidJS to provide customizable post-purchase experiences through programmable email, SMS, order tracking pages, and webhooks.
* Dynamic file locating (enabled by default), that means layout/partial names are treated as variables in liquidjs. See [#51](https://github.com/harttle/liquidjs/issues/51).
* Truthy and Falsy. All values except `undefined`, `null`, `false` are truthy, whereas in Ruby Liquid all except `nil` and `false` are truthy. See [#26](https://github.com/harttle/liquidjs/pull/26).
* Number. In JavaScript we cannot distinguish or convert between `float` and `integer`, see [#59](https://github.com/harttle/liquidjs/issues/59). And when applied `size` filter, numbers always return 0, which is 8 for integer in ruby, cause they do not have a `length` property.
* [.to_liquid()](https://github.com/Shopify/liquid/wiki/Introduction-to-Drops) is replaced by `.toLiquid()`
* [.to_s()](https://www.rubydoc.info/gems/liquid/Liquid/Drop) is replaced by JavaScript `.toString()`
* Iteration order for objects. The iteration order of JavaScript objects, and thus LiquidJS objects, is a combination of the insertion order for string keys, and ascending order for number-like keys, while the iteration order of Ruby Hash is simply the insertion order.
* Sort stability. The [sort](https://shopify.github.io/liquid/filters/sort/) stability is also not defined in both shopify/liquid and LiquidJS, but it's [considered stable](https://v8.dev/features/stable-sort) for LiquidJS in Node.js 12+ and Google Chrome 70+.
Feel free to create a PR or contact me to add your use case into this list!
Features that available on shopify website but not on shopify/liquid repo will not be implemented in this repo,
but there're some plugins available: <https://github.com/harttle/liquidjs/wiki/Plugins>
## Financial Support
## Related Packages
If you personally love LiquidJS or it's benefiting your business, please consider financially support us via [GitHub Sponsors](https://github.com/sponsors/harttle). Special thanks to our sponsors!
* [gulp-liquidjs](https://www.npmjs.com/package/@tuanpham-dev/gulp-liquidjs): A shopify compatible Liquid template engine for Gulp using liquidjs.
* [grunt-liquify](https://www.npmjs.com/package/grunt-liquify): A Grunt task to process Liquid using liquidjs. Use it to add Liquid magic to your scripts and css assets.
* [react-liquid](https://github.com/aquibm/react-liquid#readme): Liquid templating language component for React
* [@11ty/eleventy](https://www.npmjs.com/package/@11ty/eleventy): A simpler static site generator. An alternative to Jekyll. Written in JavaScript. Transforms a directory of templates (of varying types) into HTML.
## Backers
Love LiquidJS and want to contribute? [Become a backer](https://opencollective.com/liquidjs).
![backers from open-collective](https://opencollective.com/liquidjs/tiers/backer.svg?avatarHeight=97)
<!-- FINANCIAL-CONTRIBUTORS-BEGIN -->
<p align="center" style="line-height: 2.5;">
<a href="https://www.11ty.dev/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/35147177?v=4&s=100" height="80" style="vertical-align: middle;" alt="Eleventy" title="Eleventy"/></a>
<a href="https://www.opensense.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/opensense-inc/bf840ae/logo/256.png?height=100" height="80" style="vertical-align: middle;" alt="Opensense Inc." title="Opensense"/></a>
<a href="https://github.com/microsoft" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/6154722?v=4&s=100" height="80" style="vertical-align: middle;" alt="Microsoft" title="Microsoft"/></a>
<a href="https://sentry.io/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/1396951?v=4&s=100" height="80" style="vertical-align: middle;" alt="Sentry" title="Sentry"/></a>
<a href="https://www.checkoutblocks.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/114603307?v=4&s=100" height="80" style="vertical-align: middle;" alt="Checkout Blocks" title="Checkout Blocks"/></a>
<a href="https://customer.io/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/1152079?v=4&s=100" height="80" style="vertical-align: middle;" alt="Customer IO" title="Customer IO"/></a>
<a href="https://syntax.fm/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/130389858?v=4&s=100" height="80" style="vertical-align: middle;" alt="Syntax Podcast" title="Syntax Podcast"/></a>
<br/>
<a href="https://www.lambdatest.com/?utm_source=liquidjs&utm_medium=sponsor" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://www.lambdatest.com/blue-logo.png" width="240" style="vertical-align: middle;" alt="LambdaTest" title="LambdaTest"/></a>
<a href="https://chudovo.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/Chudovo/avatar/256.png?height=100" width="160" style="vertical-align: middle;background: white;padding: 8px 16px;" alt="Chudovo" title="Chudovo"/></a>
<a href="https://dailycontributors.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/dailycontributors/3c2e057/logo/256.png?height=50&width=100" width="120" style="vertical-align: middle;" alt="Dailycontributors" title="Dailycontributors"/></a>
<a href="https://www.pakstyle.pk/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/pakstyle/2b81605/logo/256.png?height=100" height="80" style="vertical-align: middle;" alt="PakStyle.pk" title="PakStyle.pk"/></a>
<a href="https://www.escorta.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/escortacom/avatar/256.png?height=100" height="45" style="vertical-align: middle;" alt="EscortA.com" title="EscortA.com"/></a>
<br/>
<a href="https://opencollective.com/touchless" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/touchless/273bc74/logo/256.png?height=100" height="80" style="vertical-align: middle;" alt="Touchless" title="Touchless"/></a>
<a href="https://www.dropkiq.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/1bertlol/43a8ea8/logo/256.png?height=100" height="80" style="vertical-align: middle;" alt="Dropkiq" title="Dropkiq"/></a>
<a href="https://about.me/peterdehaan" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars2.githubusercontent.com/u/557895?v=4&s=100" height="80" style="vertical-align: middle;" alt="Peter deHaan" title="Peter deHaan"/></a>
<a href="https://github.com/coni2k" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars0.githubusercontent.com/u/1284601?v=4&s=100" height="80" style="vertical-align: middle;" alt="Serkan Holat" title="Serkan Holat"/></a>
<a href="https://github.com/amit777" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars0.githubusercontent.com/u/2703309?v=4&s=100" height="80" style="vertical-align: middle;" alt="amit777" title="amit777"/></a>
<a href="https://opencollective.com/khaled-salem" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/khaled-salem/avatar/256.png?height=256" height="80" style="vertical-align: middle;" alt="Khaled Salem" title="Khaled Salem"/></a>
<a href="https://github.com/15fathoms" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/79156039?v=4&s=100" height="80" style="vertical-align: middle;" alt="Emmanuel Cartelli" title="Emmanuel Cartelli"/></a>
<a href="https://opencollective.com/cartelli-emmanuel" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/cartelli-emmanuel/avatar/256.png?height=100" height="80" style="vertical-align: middle;" alt="Cartelli Emmanuel" title="Cartelli Emmanuel"/></a>
</p>
<!-- FINANCIAL-CONTRIBUTORS-END -->
## Contributors ✨
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
Contributions of any [kind](https://allcontributors.org/docs/en/emoji-key) are welcome!
Thanks goes to these wonderful people:
Want to contribute? see [Contribution Guidelines][contribution]. Thanks goes to these wonderful people:
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://harttle.land"><img src="https://avatars3.githubusercontent.com/u/4427974?v=4" width="100px;" alt=""/><br /><sub><b>Jun Yang</b></sub></a><br /><a href="#maintenance-harttle" title="Maintenance">🚧</a> <a href="https://github.com/harttle/liquidjs/commits?author=harttle" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/chenos"><img src="https://avatars0.githubusercontent.com/u/2993310?v=4" width="100px;" alt=""/><br /><sub><b>chenos</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=chenos" title="Code">💻</a></td>
<td align="center"><a href="https://zachleat.com/"><img src="https://avatars2.githubusercontent.com/u/39355?v=4" width="100px;" alt=""/><br /><sub><b>Zach Leatherman</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/issues?q=author%3Azachleat" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/thardy"><img src="https://avatars3.githubusercontent.com/u/120636?v=4" width="100px;" alt=""/><br /><sub><b>Tim Hardy</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=thardy" title="Code">💻</a></td>
<td align="center"><a href="https://paulrobertlloyd.com/"><img src="https://avatars3.githubusercontent.com/u/813383?v=4" width="100px;" alt=""/><br /><sub><b>Paul Robert Lloyd</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=paulrobertlloyd" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/issues?q=author%3Apaulrobertlloyd" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://twitter.com/alecdotbiz"><img src="https://avatars2.githubusercontent.com/u/1925840?v=4" width="100px;" alt=""/><br /><sub><b>Alec Larson</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=aleclarson" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/pmalouin"><img src="https://avatars1.githubusercontent.com/u/1411117?v=4" width="100px;" alt=""/><br /><sub><b>Patrick Malouin</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=pmalouin" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/commits?author=pmalouin" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://jaswrks.com"><img src="https://avatars3.githubusercontent.com/u/1563559?v=4" width="100px;" alt=""/><br /><sub><b>jaswrks</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=jaswrks" title="Code">💻</a></td>
<td align="center"><a href="https://oott123.com"><img src="https://avatars2.githubusercontent.com/u/905663?v=4" width="100px;" alt=""/><br /><sub><b>三三</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=oott123" title="Code">💻</a> <a href="#ideas-oott123" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/ssendev"><img src="https://avatars0.githubusercontent.com/u/450793?v=4" width="100px;" alt=""/><br /><sub><b>ssendev</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ssendev" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/commits?author=ssendev" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/wojtask9"><img src="https://avatars3.githubusercontent.com/u/6099236?v=4" width="100px;" alt=""/><br /><sub><b>wojtask9</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=wojtask9" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/thelornenelson"><img src="https://avatars3.githubusercontent.com/u/24596583?v=4" width="100px;" alt=""/><br /><sub><b>Andrew Barclay</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=thelornenelson" title="Code">💻</a></td>
<td align="center"><a href="https://www.stam.pr/"><img src="https://avatars2.githubusercontent.com/u/142338?v=4" width="100px;" alt=""/><br /><sub><b>Cory Mawhorter</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=cmawhorter" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/thehappybug"><img src="https://avatars0.githubusercontent.com/u/3393530?v=4" width="100px;" alt=""/><br /><sub><b>Mehdi Jaffery</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=thehappybug" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/robinbijlani"><img src="https://avatars0.githubusercontent.com/u/2503108?v=4" width="100px;" alt=""/><br /><sub><b>Robin Bijlani</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=robinbijlani" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/issues?q=author%3Arobinbijlani" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://www.rmkennedy.com"><img src="https://avatars3.githubusercontent.com/u/8356669?v=4" width="100px;" alt=""/><br /><sub><b>Ryan Kennedy</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ryaninvents" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/strax"><img src="https://avatars2.githubusercontent.com/u/587213?v=4" width="100px;" alt=""/><br /><sub><b>Sami Kukkonen</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=strax" title="Code">💻</a></td>
<td align="center"><a href="https://ScottFreeCode.github.io/"><img src="https://avatars3.githubusercontent.com/u/16506071?v=4" width="100px;" alt=""/><br /><sub><b>Scott Santucci</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ScottFreeCode" title="Code">💻</a></td>
<td align="center"><a href="http://stevenrescigno.com"><img src="https://avatars3.githubusercontent.com/u/8505293?v=4" width="100px;" alt=""/><br /><sub><b>Steven </b></sub></a><br /><a href="#example-stevenanthonyrevo" title="Examples">💡</a> <a href="https://github.com/harttle/liquidjs/commits?author=stevenanthonyrevo" title="Code">💻</a></td>
<td align="center"><a href="https://efcl.info/"><img src="https://avatars1.githubusercontent.com/u/19714?v=4" width="100px;" alt=""/><br /><sub><b>azu</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=azu" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/wyozi"><img src="https://avatars3.githubusercontent.com/u/4894573?v=4" width="100px;" alt=""/><br /><sub><b>Joonas</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=wyozi" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/jamelait"><img src="https://avatars1.githubusercontent.com/u/14369255?v=4" width="100px;" alt=""/><br /><sub><b>Jamel A.</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=jamelait" title="Code">💻</a></td>
<td align="center"><a href="https://brandonpittman.net"><img src="https://avatars0.githubusercontent.com/u/967145?v=4" width="100px;" alt=""/><br /><sub><b>Brandon Pittman</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=brandonpittman" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/tgrandgent"><img src="https://avatars3.githubusercontent.com/u/17069042?v=4" width="100px;" alt=""/><br /><sub><b>tgrandgent</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=tgrandgent" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/mastodon0"><img src="https://avatars1.githubusercontent.com/u/7924332?v=4" width="100px;" alt=""/><br /><sub><b>Martin Schuster</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=mastodon0" title="Code">💻</a></td>
<td align="center"><a href="http://js.chenlei.me"><img src="https://avatars0.githubusercontent.com/u/6339390?v=4" width="100px;" alt=""/><br /><sub><b>Ray</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=richardo2016" title="Tests">⚠️</a> <a href="https://github.com/harttle/liquidjs/commits?author=richardo2016" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/CriGoT"><img src="https://avatars0.githubusercontent.com/u/1936786?v=4" width="100px;" alt=""/><br /><sub><b>Cristofer Gonzales</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=CriGoT" title="Code">💻</a></td>
</tr>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://harttle.land"><img src="https://avatars3.githubusercontent.com/u/4427974?v=4?s=100" width="100px;" alt="Jun Yang"/><br /><sub><b>Jun Yang</b></sub></a><br /><a href="#maintenance-harttle" title="Maintenance">🚧</a> <a href="https://github.com/harttle/liquidjs/commits?author=harttle" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/chenos"><img src="https://avatars0.githubusercontent.com/u/2993310?v=4?s=100" width="100px;" alt="chenos"/><br /><sub><b>chenos</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=chenos" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://zachleat.com/"><img src="https://avatars2.githubusercontent.com/u/39355?v=4?s=100" width="100px;" alt="Zach Leatherman"/><br /><sub><b>Zach Leatherman</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/issues?q=author%3Azachleat" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/thardy"><img src="https://avatars3.githubusercontent.com/u/120636?v=4?s=100" width="100px;" alt="Tim Hardy"/><br /><sub><b>Tim Hardy</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=thardy" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://paulrobertlloyd.com/"><img src="https://avatars3.githubusercontent.com/u/813383?v=4?s=100" width="100px;" alt="Paul Robert Lloyd"/><br /><sub><b>Paul Robert Lloyd</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=paulrobertlloyd" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/issues?q=author%3Apaulrobertlloyd" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/alecdotbiz"><img src="https://avatars2.githubusercontent.com/u/1925840?v=4?s=100" width="100px;" alt="Alec Larson"/><br /><sub><b>Alec Larson</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=aleclarson" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pmalouin"><img src="https://avatars1.githubusercontent.com/u/1411117?v=4?s=100" width="100px;" alt="Patrick Malouin"/><br /><sub><b>Patrick Malouin</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=pmalouin" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/commits?author=pmalouin" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://jaswrks.com"><img src="https://avatars3.githubusercontent.com/u/1563559?v=4?s=100" width="100px;" alt="jaswrks"/><br /><sub><b>jaswrks</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=jaswrks" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://oott123.com"><img src="https://avatars2.githubusercontent.com/u/905663?v=4?s=100" width="100px;" alt="三三"/><br /><sub><b>三三</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=oott123" title="Code">💻</a> <a href="#ideas-oott123" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ssendev"><img src="https://avatars0.githubusercontent.com/u/450793?v=4?s=100" width="100px;" alt="ssendev"/><br /><sub><b>ssendev</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ssendev" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/commits?author=ssendev" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wojtask9"><img src="https://avatars3.githubusercontent.com/u/6099236?v=4?s=100" width="100px;" alt="wojtask9"/><br /><sub><b>wojtask9</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=wojtask9" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/thelornenelson"><img src="https://avatars3.githubusercontent.com/u/24596583?v=4?s=100" width="100px;" alt="Andrew Barclay"/><br /><sub><b>Andrew Barclay</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=thelornenelson" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.stam.pr/"><img src="https://avatars2.githubusercontent.com/u/142338?v=4?s=100" width="100px;" alt="Cory Mawhorter"/><br /><sub><b>Cory Mawhorter</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=cmawhorter" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/thehappybug"><img src="https://avatars0.githubusercontent.com/u/3393530?v=4?s=100" width="100px;" alt="Mehdi Jaffery"/><br /><sub><b>Mehdi Jaffery</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=thehappybug" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/robinbijlani"><img src="https://avatars0.githubusercontent.com/u/2503108?v=4?s=100" width="100px;" alt="Robin Bijlani"/><br /><sub><b>Robin Bijlani</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=robinbijlani" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/issues?q=author%3Arobinbijlani" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.rmkennedy.com"><img src="https://avatars3.githubusercontent.com/u/8356669?v=4?s=100" width="100px;" alt="Ryan Kennedy"/><br /><sub><b>Ryan Kennedy</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ryaninvents" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/strax"><img src="https://avatars2.githubusercontent.com/u/587213?v=4?s=100" width="100px;" alt="Sami Kukkonen"/><br /><sub><b>Sami Kukkonen</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=strax" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://ScottFreeCode.github.io/"><img src="https://avatars3.githubusercontent.com/u/16506071?v=4?s=100" width="100px;" alt="Scott Santucci"/><br /><sub><b>Scott Santucci</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ScottFreeCode" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://stevenrescigno.com"><img src="https://avatars3.githubusercontent.com/u/8505293?v=4?s=100" width="100px;" alt="Steven "/><br /><sub><b>Steven </b></sub></a><br /><a href="#example-stevenanthonyrevo" title="Examples">💡</a> <a href="https://github.com/harttle/liquidjs/commits?author=stevenanthonyrevo" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://efcl.info/"><img src="https://avatars1.githubusercontent.com/u/19714?v=4?s=100" width="100px;" alt="azu"/><br /><sub><b>azu</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=azu" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wyozi"><img src="https://avatars3.githubusercontent.com/u/4894573?v=4?s=100" width="100px;" alt="Joonas"/><br /><sub><b>Joonas</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=wyozi" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jamelait"><img src="https://avatars1.githubusercontent.com/u/14369255?v=4?s=100" width="100px;" alt="Jamel A."/><br /><sub><b>Jamel A.</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=jamelait" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://brandonpittman.net"><img src="https://avatars0.githubusercontent.com/u/967145?v=4?s=100" width="100px;" alt="Brandon Pittman"/><br /><sub><b>Brandon Pittman</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=brandonpittman" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tgrandgent"><img src="https://avatars3.githubusercontent.com/u/17069042?v=4?s=100" width="100px;" alt="tgrandgent"/><br /><sub><b>tgrandgent</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=tgrandgent" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mastodon0"><img src="https://avatars1.githubusercontent.com/u/7924332?v=4?s=100" width="100px;" alt="Martin Schuster"/><br /><sub><b>Martin Schuster</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=mastodon0" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://js.chenlei.me"><img src="https://avatars0.githubusercontent.com/u/6339390?v=4?s=100" width="100px;" alt="Ray"/><br /><sub><b>Ray</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=richardo2016" title="Tests">⚠️</a> <a href="https://github.com/harttle/liquidjs/commits?author=richardo2016" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/CriGoT"><img src="https://avatars0.githubusercontent.com/u/1936786?v=4?s=100" width="100px;" alt="Cristofer Gonzales"/><br /><sub><b>Cristofer Gonzales</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=CriGoT" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.raymondcamden.com"><img src="https://avatars3.githubusercontent.com/u/393660?v=4?s=100" width="100px;" alt="Raymond Camden"/><br /><sub><b>Raymond Camden</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=cfjedimaster" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://stedman.dev"><img src="https://avatars1.githubusercontent.com/u/183122?v=4?s=100" width="100px;" alt="Steve Stedman"/><br /><sub><b>Steve Stedman</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=stedman" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://ciccarello.me"><img src="https://avatars0.githubusercontent.com/u/11273838?v=4?s=100" width="100px;" alt="Anthony Ciccarello"/><br /><sub><b>Anthony Ciccarello</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=aciccarello" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/IAmTrySound"><img src="https://avatars0.githubusercontent.com/u/5635476?v=4?s=100" width="100px;" alt="Bogdan Chadkin"/><br /><sub><b>Bogdan Chadkin</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=TrySound" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://hightouch.io"><img src="https://avatars0.githubusercontent.com/u/5959235?v=4?s=100" width="100px;" alt="Tejas Manohar"/><br /><sub><b>Tejas Manohar</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=tejasmanohar" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://about.me/peterdehaan"><img src="https://avatars2.githubusercontent.com/u/557895?v=4?s=100" width="100px;" alt="Peter deHaan"/><br /><sub><b>Peter deHaan</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=pdehaan" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/amit777"><img src="https://avatars0.githubusercontent.com/u/2703309?v=4?s=100" width="100px;" alt="amit777"/><br /><sub><b>amit777</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=amit777" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.ifi.uzh.ch/en/ce/people/schuldenzucker.html"><img src="https://avatars3.githubusercontent.com/u/1100776?v=4?s=100" width="100px;" alt="Steffen Schuldenzucker"/><br /><sub><b>Steffen Schuldenzucker</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=sschuldenzucker" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Pixcell"><img src="https://avatars0.githubusercontent.com/u/4005291?v=4?s=100" width="100px;" alt="Pixcell"/><br /><sub><b>Pixcell</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=Pixcell" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://jasonet.co"><img src="https://avatars.githubusercontent.com/u/10660468?v=4?s=100" width="100px;" alt="Jason Etcovitch"/><br /><sub><b>Jason Etcovitch</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=JasonEtco" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kayuapi"><img src="https://avatars.githubusercontent.com/u/10304328?v=4?s=100" width="100px;" alt="ZC"/><br /><sub><b>ZC</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=kayuapi" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://memmie.lenglet.name"><img src="https://avatars.githubusercontent.com/u/729275?v=4?s=100" width="100px;" alt="Memmie Lenglet"/><br /><sub><b>Memmie Lenglet</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=mems" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ilhamdev0"><img src="https://avatars.githubusercontent.com/u/57636145?v=4?s=100" width="100px;" alt="ilhamdev0"/><br /><sub><b>ilhamdev0</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ilhamdev0" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/c412216887"><img src="https://avatars.githubusercontent.com/u/29691650?v=4?s=100" width="100px;" alt="一饮一啄皆是人生"/><br /><sub><b>一饮一啄皆是人生</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=c412216887" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://digitalinspiration.com/"><img src="https://avatars.githubusercontent.com/u/1344071?v=4?s=100" width="100px;" alt="Amit Agarwal"/><br /><sub><b>Amit Agarwal</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=labnol" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://n1ru4l.cloud/"><img src="https://avatars.githubusercontent.com/u/14338007?v=4?s=100" width="100px;" alt="Laurin Quast"/><br /><sub><b>Laurin Quast</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=n1ru4l" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mattvague"><img src="https://avatars.githubusercontent.com/u/64985?v=4?s=100" width="100px;" alt="Matt Vague"/><br /><sub><b>Matt Vague</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=mattvague" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bglw"><img src="https://avatars.githubusercontent.com/u/40188355?v=4?s=100" width="100px;" alt="Liam Bigelow"/><br /><sub><b>Liam Bigelow</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=bglw" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://about.me/jasonkurian"><img src="https://avatars.githubusercontent.com/u/2642545?v=4?s=100" width="100px;" alt="Jason Kurian"/><br /><sub><b>Jason Kurian</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=JaKXz" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dphm"><img src="https://avatars.githubusercontent.com/u/1707217?v=4?s=100" width="100px;" alt="d pham (they/them)"/><br /><sub><b>d pham (they/them)</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=dphm" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.aleksandrhovhannisyan.com/"><img src="https://avatars.githubusercontent.com/u/19352442?v=4?s=100" width="100px;" alt="Aleksandr Hovhannisyan"/><br /><sub><b>Aleksandr Hovhannisyan</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=AleksandrHovhannisyan" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jg-rp"><img src="https://avatars.githubusercontent.com/u/72664870?v=4?s=100" width="100px;" alt="jg-rp"/><br /><sub><b>jg-rp</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=jg-rp" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ameyaapte1"><img src="https://avatars.githubusercontent.com/u/16054747?v=4?s=100" width="100px;" alt="Ameya Apte"/><br /><sub><b>Ameya Apte</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ameyaapte1" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tbdrz"><img src="https://avatars.githubusercontent.com/u/50599116?v=4?s=100" width="100px;" alt="tbdrz"/><br /><sub><b>tbdrz</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=tbdrz" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://santialbo.com"><img src="https://avatars.githubusercontent.com/u/1557563?v=4?s=100" width="100px;" alt="Santi Albo"/><br /><sub><b>Santi Albo</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=santialbo" title="Documentation">📖</a> <a href="https://github.com/harttle/liquidjs/commits?author=santialbo" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/YahangWu"><img src="https://avatars.githubusercontent.com/u/12295975?v=4?s=100" width="100px;" alt="Yahang Wu"/><br /><sub><b>Yahang Wu</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=YahangWu" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hongl-1"><img src="https://avatars.githubusercontent.com/u/101576612?v=4?s=100" width="100px;" alt="hongl"/><br /><sub><b>hongl</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=hongl-1" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zxx-457"><img src="https://avatars.githubusercontent.com/u/114141362?v=4?s=100" width="100px;" alt="zxx-457"/><br /><sub><b>zxx-457</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=zxx-457" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/prassie"><img src="https://avatars.githubusercontent.com/u/1357831?v=4?s=100" width="100px;" alt="prassie"/><br /><sub><b>prassie</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=prassie" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://slavv.com/"><img src="https://avatars.githubusercontent.com/u/713329?v=4?s=100" width="100px;" alt="Slav Ivanov"/><br /><sub><b>Slav Ivanov</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=slavivanov" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.orgflow.io/"><img src="https://avatars.githubusercontent.com/u/3889090?v=4?s=100" width="100px;" alt="Daniel Rosenberg"/><br /><sub><b>Daniel Rosenberg</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=DaRosenberg" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bobgubko"><img src="https://avatars.githubusercontent.com/u/733312?v=4?s=100" width="100px;" alt="bobgubko"/><br /><sub><b>bobgubko</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=bobgubko" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bangank36"><img src="https://avatars.githubusercontent.com/u/10071857?v=4?s=100" width="100px;" alt="BaNgan"/><br /><sub><b>BaNgan</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=bangank36" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mahyar-pasarzangene"><img src="https://avatars.githubusercontent.com/u/16485039?v=4?s=100" width="100px;" alt="Mahyar Pasarzangene"/><br /><sub><b>Mahyar Pasarzangene</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=mahyar-pasarzangene" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://hubelbauer.net/"><img src="https://avatars.githubusercontent.com/u/6831144?v=4?s=100" width="100px;" alt="Tomáš Hübelbauer"/><br /><sub><b>Tomáš Hübelbauer</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=TomasHubelbauer" title="Code">💻</a> <a href="https://github.com/harttle/liquidjs/commits?author=TomasHubelbauer" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://sixtwothree.org"><img src="https://avatars.githubusercontent.com/u/73866?v=4?s=100" width="100px;" alt="Jason Garber"/><br /><sub><b>Jason Garber</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=jgarber623" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://nickreilingh.com/"><img src="https://avatars.githubusercontent.com/u/2458645?v=4?s=100" width="100px;" alt="Nick Reilingh"/><br /><sub><b>Nick Reilingh</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=NReilingh" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://ebobby.org"><img src="https://avatars.githubusercontent.com/u/170356?v=4?s=100" width="100px;" alt="Francisco Soto"/><br /><sub><b>Francisco Soto</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=ebobby" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.davidlj95.com"><img src="https://avatars.githubusercontent.com/u/8050648?v=4?s=100" width="100px;" alt="David LJ"/><br /><sub><b>David LJ</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=davidlj95" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RasmusWL"><img src="https://avatars.githubusercontent.com/u/1054041?v=4?s=100" width="100px;" alt="Rasmus Wriedt Larsen"/><br /><sub><b>Rasmus Wriedt Larsen</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=RasmusWL" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/brunodccarvalho"><img src="https://avatars.githubusercontent.com/u/24962950?v=4?s=100" width="100px;" alt="Bruno Carvalho"/><br /><sub><b>Bruno Carvalho</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=brunodccarvalho" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/fupengl"><img src="https://avatars.githubusercontent.com/u/20211964?v=4?s=100" width="100px;" alt="傅鹏"/><br /><sub><b>傅鹏</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=fupengl" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/joel-hamilton"><img src="https://avatars.githubusercontent.com/u/12899024?v=4?s=100" width="100px;" alt="Joel Hamilton"/><br /><sub><b>Joel Hamilton</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=joel-hamilton" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/amedve"><img src="https://avatars.githubusercontent.com/u/23156422?v=4?s=100" width="100px;" alt="Max Medve"/><br /><sub><b>Max Medve</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=amedve" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://maizzle.com"><img src="https://avatars.githubusercontent.com/u/1656595?v=4?s=100" width="100px;" alt="Cosmin Popovici"/><br /><sub><b>Cosmin Popovici</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=cossssmin" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/admtnnr"><img src="https://avatars.githubusercontent.com/u/27502?v=4?s=100" width="100px;" alt="Adam Tanner"/><br /><sub><b>Adam Tanner</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=admtnnr" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/GuillermoCasalCaro"><img src="https://avatars.githubusercontent.com/u/18685581?v=4?s=100" width="100px;" alt="Guillermo Casal Caro"/><br /><sub><b>Guillermo Casal Caro</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=GuillermoCasalCaro" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jsoref"><img src="https://avatars.githubusercontent.com/u/2119212?v=4?s=100" width="100px;" alt="Josh Soref"/><br /><sub><b>Josh Soref</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=jsoref" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://vrugtehagel.nl"><img src="https://avatars.githubusercontent.com/u/41021050?v=4?s=100" width="100px;" alt="Koen"/><br /><sub><b>Koen</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=vrugtehagel" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://neamar.fr"><img src="https://avatars.githubusercontent.com/u/536844?v=4?s=100" width="100px;" alt="Matthieu Bacconnier"/><br /><sub><b>Matthieu Bacconnier</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=Neamar" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://tovd.dev"><img src="https://avatars.githubusercontent.com/u/35376389?v=4?s=100" width="100px;" alt="Tim van Dam"/><br /><sub><b>Tim van Dam</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=timvandam" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/edh649"><img src="https://avatars.githubusercontent.com/u/527604?v=4?s=100" width="100px;" alt="Ed Hanton"/><br /><sub><b>Ed Hanton</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=edh649" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://gurdiga.com"><img src="https://avatars.githubusercontent.com/u/53922?v=4?s=100" width="100px;" alt="Vlad GURDIGA"/><br /><sub><b>Vlad GURDIGA</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=gurdiga" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.streakingman.com"><img src="https://avatars.githubusercontent.com/u/30397306?v=4?s=100" width="100px;" alt="裸奔狂甩丁丁"/><br /><sub><b>裸奔狂甩丁丁</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=StreakingMan" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/skynetigor"><img src="https://avatars.githubusercontent.com/u/20903171?v=4?s=100" width="100px;" alt="Ihor Panasiuk"/><br /><sub><b>Ihor Panasiuk</b></sub></a><br /><a href="https://github.com/harttle/liquidjs/commits?author=skynetigor" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-enable -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## Contribute Guideline
* **Code Style**: <https://github.com/standard/eslint-config-standard>, `npm run lint` to check locally.
* **Testing**: make sure test cases still pass, use `npm test` to check locally.
* **Commit Message**: align to [The Angular Commit Message Guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits), especially the [Type identifier](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type), to allow the semantic-release bot do the work.
[shopify/liquid]: https://shopify.github.io/liquid/
[caniuse-promises]: http://caniuse.com/#feat=promises
[pp]: https://github.com/taylorhakes/promise-polyfill
[tutorial]: https://shopify.github.io/liquid/basics/introduction/
[plugins]: https://liquidjs.com/tutorials/plugins.html#Plugin-List
[setup]: https://liquidjs.com/tutorials/setup.html
[doc]: https://liquidjs.com
[github]: https://github.com/harttle/liquidjs
[oc]: https://opencollective.com/liquidjs/
[contribution]: https://liquidjs.com/tutorials/contribution-guidelines.html
+13
View File
@@ -0,0 +1,13 @@
# Security Policy
## Supported Versions
Only the latest major version is supported with security updates. It can be changed if many people are relying on a specific version for some reason. If this is the case, welcome to file an issue.
## Reporting a Vulnerability
Please contact yangjvn@126.com to report a vulnerability or change request.
- If the vulnerability in question affects common use cases, it will be treated as a bug and fixed very soon (typically within 1 week).
- Otherwise, it'll be scheduled in the same priority of feature request (which is lower than bugs).
- If the request is declined, you'll receive a reply email anyway (most likely there will be a discussion).
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env node
const Benchmark = require('benchmark')
const data = require('./data/todolist.json')
const path = require('path')
const engines = {
handlebars: require('./engines/handlebars'),
liquid: require('./engines/liquid'),
react: require('./engines/react'),
swig: require('./engines/swig')
}
function crossEngines () {
console.log(' cross engines')
console.log('------------------------')
return new Promise(resolve => {
const suit = new Benchmark.Suite('cross engines')
for (const [name, { load, render }] of Object.entries(engines)) {
const tpl = load(path.resolve(__dirname, `templates/todolist`))
suit.add(name, () => render(tpl, data))
}
suit.on('cycle', event => console.log(String(event.target)))
suit.on('complete', resolve)
suit.run({ async: true })
})
}
module.exports = { crossEngines }
+28
View File
@@ -0,0 +1,28 @@
{
"categories": [{
"color": "red",
"id": "CAT1",
"title": "work"
}, {
"color": "red",
"id": "CAT2",
"title": "emergency"
}, {
"color": "green",
"id": "CAT3",
"title": "sport"
}],
"todos": [{
"title": "fork and clone",
"id": "TODO1",
"category": "work"
}, {
"title": "make it better",
"id": "TODO2",
"category": "sport"
}, {
"title": "make a pull request",
"id": "TODO3",
"category": "work"
}]
}
Regular → Executable
+6 -29
View File
@@ -1,44 +1,21 @@
const Benchmark = require('benchmark')
const { Liquid } = require('..')
const ctx = require('./data/todolist.json')
const { resolve } = require('path')
const engine = new Liquid({
root: __dirname,
root: resolve(__dirname, 'templates'),
extname: '.liquid'
})
engine.registerTag('header', {
parse: function (token) {
const [key, val] = token.args.split(':')
this[key] = val
},
render: function (ctx) {
const title = this.liquid.evalValue(this.content, ctx)
return `<h1>${title}</h1>`
}
})
const ctx = {
todos: ['fork and clone', 'make it better', 'make a pull request'],
title: 'Welcome to liquidjs!'
}
const template = `
{%header content: "welcome to liquid" | capitalize%}
<ul>
{% for todo in todos %}
<li>{{forloop.index}} - {{todo}}</li>
{% endfor %}
</ul>
`
function demo () {
console.log('--- demo ---')
console.log(' demo')
console.log('------------------------')
return new Promise(resolve => {
new Benchmark.Suite('demo')
.add('demo', {
defer: true,
fn: d => engine.parseAndRender(template, ctx).then(x => d.resolve(x))
fn: d => engine.renderFile('todolist', ctx).then(x => d.resolve(x))
})
.on('cycle', event => console.log(String(event.target)))
.on('complete', resolve)
+50
View File
@@ -0,0 +1,50 @@
#!/usr/bin/env node
const { performance } = require('perf_hooks')
const path = require('path')
const FILE_LOCAL = process.argv[2]
const FILE_LATEST = process.argv[3]
console.log(`Local: ${FILE_LOCAL}`)
console.log(`Latest: ${FILE_LATEST}`)
const { createEngine } = require('./engines/create-liquid')
const local = createEngine(require(path.resolve(__dirname, '..', FILE_LOCAL)))
const latest = createEngine(require(path.resolve(__dirname, '..', FILE_LOCAL)))
const data = require('./data/todolist.json')
const tpl = path.resolve(__dirname, `templates/todolist`)
const begin = performance.now()
const tplLocal = local.load(tpl)
const tplLatest = latest.load(tpl)
const tasks = [
{
cycles: 0,
time: 0,
fn: () => latest.render(tplLatest, data)
},
{
cycles: 0,
time: 0,
fn: () => local.render(tplLocal, data)
}
]
while (performance.now() - begin < 20e3) {
const task = tasks[Math.floor(Math.random() * 2)]
task.time -= performance.now()
task.fn()
task.time += performance.now()
task.cycles++
}
const [ latestResult, localResult ] = tasks.map(task => {
task.perf = task.cycles * 1000 / task.time
return task
})
const diff = (localResult.perf - latestResult.perf) / latestResult.perf
console.log(`Local: ${localResult.perf.toFixed(3)} ops/s (${localResult.cycles} cycles)`)
console.log(`Latest: ${latestResult.perf.toFixed(3)} ops/s (${latestResult.cycles} cycles)`)
console.log(`Diff: ${(diff * 100).toFixed(3)}%`)
const THRESHOLD_PERCENT = -3
process.exit(diff * 100 < THRESHOLD_PERCENT ? 1 : 0)
+17
View File
@@ -0,0 +1,17 @@
const { readFileSync } = require('fs')
const { join } = require('path')
function createEngine (pkg) {
const liquid = new pkg.Liquid({
root: join(__dirname, '../templates'),
cache: true,
extname: '.liquid'
})
liquid.registerFilter('url', path => `https://example.com${path}`)
return {
load: path => liquid.parse(readFileSync(path + '.liquid', 'utf8')),
render: (tpl, data) => liquid.renderSync(tpl, data)
}
}
module.exports = { createEngine }
+33
View File
@@ -0,0 +1,33 @@
const handlebars = require('handlebars')
const { readFileSync } = require('fs')
const { join } = require('path')
handlebars.registerPartial(
'todo-icon',
readFileSync(join(__dirname, '../templates/todo-icon.hbs'), 'utf8')
)
handlebars.registerHelper('concat', function (...args) {
return args.filter(x => typeof x === 'string').join('')
})
handlebars.registerHelper('url', function (path) {
return `https://example.com${path}`
})
handlebars.registerHelper('inc', function (num) {
return Number(num) + 1
})
handlebars.registerHelper('capitalize', function (str) {
return str[0].toUpperCase() + str.slice(1).toLowerCase()
})
handlebars.registerHelper('upcase', function (str) {
return str.toUpperCase()
})
module.exports = {
load: path => handlebars.compile(readFileSync(path + '.hbs', 'utf8')),
render: (tpl, data) => tpl(data)
}
+3
View File
@@ -0,0 +1,3 @@
const { createEngine } = require('./create-liquid')
module.exports = createEngine(require('../../dist/liquid.node'))
+20
View File
@@ -0,0 +1,20 @@
const { readFileSync } = require('fs')
const React = require('react')
const ReactDOMServer = require('react-dom/server')
const babel = require('@babel/core')
const requireFromString = require('require-from-string')
const babelConfig = {
presets: ['@babel/preset-react', '@babel/preset-env']
}
module.exports = {
load: path => {
const src = readFileSync(path + '.jsx', 'utf8')
const transformed = babel.transform(src, babelConfig)
return requireFromString(transformed.code)
},
render: (Component, data) => {
return ReactDOMServer.renderToString(React.createElement(Component, data))
}
}
+30
View File
@@ -0,0 +1,30 @@
const swig = require('swig')
swig.setFilter('url', function (path) {
return `https://example.com${path}`
})
swig.setFilter('prepend', function (input, arg) {
return arg + input
})
swig.setFilter('append', function (input, arg) {
return input + arg
})
swig.setFilter('inc', function (num) {
return Number(num) + 1
})
swig.setFilter('capitalize', function (str) {
return str[0].toUpperCase() + str.slice(1).toLowerCase()
})
swig.setFilter('upcase', function (str) {
return str.toUpperCase()
})
module.exports = {
load: path => swig.compileFile(path + '.swig'),
render: (tpl, data) => tpl(data)
}
Regular → Executable
+2
View File
@@ -3,6 +3,7 @@ const { tag } = require('./tag')
const { demo } = require('./demo')
const { layout } = require('./layout')
const { memory } = require('./memory')
const { crossEngines } = require('./cross-engines')
async function main () {
await output()
@@ -10,6 +11,7 @@ async function main () {
await demo()
await layout()
await memory()
await crossEngines()
}
main()
Regular → Executable
+2 -1
View File
@@ -18,7 +18,8 @@ const template = `
`
function layout () {
console.log('--- layout ---')
console.log(' layout')
console.log('------------------------')
return new Promise(resolve => {
new Benchmark.Suite('layout')
.add('cache=false', {
Regular → Executable
+7 -6
View File
@@ -13,7 +13,8 @@ const engine = new Liquid(engineOptions)
const SAMPLE_COUNT = 1024
function memory () {
console.log('--- memory ---')
console.log(' memory')
console.log('------------------------')
html()
todolist()
}
@@ -29,11 +30,11 @@ function html () {
templates.push(engine.parse(str))
}
const diff1 = (getHeapStatistics().used_heap_size - base) / SAMPLE_COUNT
console.log(`${h(str.length)} lorem-html before GC x ${h(diff1)}/tpl (${SAMPLE_COUNT} instances sampled)`)
console.log(`[lorem-html ${h(str.length)}][before GC] ${h(diff1)}/tpl (${SAMPLE_COUNT} runs sampled)`)
global.gc()
const diff2 = (getHeapStatistics().used_heap_size - base) / SAMPLE_COUNT
console.log(`${h(str.length)} lorem-html after GC x ${h(diff2)}/tpl (${SAMPLE_COUNT} instances sampled)`)
console.log(`[lorem-html ${h(str.length)}][after GC] ${h(diff2)}/tpl (${SAMPLE_COUNT} runs sampled)`)
}
function todolist () {
@@ -47,15 +48,15 @@ function todolist () {
templates.push(engine.parse(str))
}
const diff1 = (getHeapStatistics().used_heap_size - base) / SAMPLE_COUNT
console.log(`${h(str.length)} todolist before GC x ${h(diff1)}/tpl (${SAMPLE_COUNT} instances sampled)`)
console.log(`[todolist ${h(str.length)}][before GC] ${h(diff1)}/tpl (${SAMPLE_COUNT} runs sampled)`)
global.gc()
const diff2 = (getHeapStatistics().used_heap_size - base) / SAMPLE_COUNT
console.log(`${h(str.length)} todolist after GC x ${h(diff2)}/tpl (${SAMPLE_COUNT} instances sampled)`)
console.log(`[todolist ${h(str.length)}][after GC] ${h(diff2)}/tpl (${SAMPLE_COUNT} runs sampled)`)
}
function h (size) {
return (size / 1024).toFixed(3) + ' kB'
return (size / 1024).toFixed(3) + ' KB'
}
module.exports = { memory }
Regular → Executable
+2 -1
View File
@@ -4,7 +4,8 @@ const { Liquid } = require('..')
const liquid = new Liquid()
function output () {
console.log('--- output ---')
console.log(' output')
console.log('------------------------')
return new Promise(resolve => {
new Benchmark.Suite('output')
.add('literal', test('{{false}}{{"foo"}}{{32.322}}'))
+3380
View File
File diff suppressed because it is too large Load Diff
+23
View File
@@ -0,0 +1,23 @@
{
"name": "benchmark",
"private": true,
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node --expose-gc index",
"engines": "node -e 'require(\"./cross-engines\").crossEngines()'"
},
"author": "",
"license": "ISC",
"dependencies": {
"@babel/core": "^7.13.14",
"@babel/preset-env": "^7.13.12",
"@babel/preset-react": "^7.13.13",
"handlebars": "^4.7.7",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"require-from-string": "^2.0.2",
"swig": "^1.4.2"
}
}
Regular → Executable
+3 -2
View File
@@ -4,12 +4,13 @@ const { Liquid } = require('..')
const liquid = new Liquid()
function tag () {
console.log('--- tag ---')
console.log(' tag')
console.log('------------------------')
return new Promise(resolve => {
new Benchmark.Suite('tag')
.add('if', test('{% if "foobar" %}foo{% endif %}'))
.add('unless', test('{%unless "foo"%}true{%else%}false{%endunless%}'))
.add('for', test('{% for i in (1..3) %}{{fooloop.index}}{% endfor %}'))
.add('for', test('{% for i in (1..3) %}{{forloop.index}}{% endfor %}'))
.add('switch', test('{%case 3%}{% when 1 %}1{% when 2 %}2{% when 3 %}3{%endcase%}'))
.add('assign', test('{%assign a="foo bar"%}'))
.add('capture', test('{%capture foo%}what is this{%endcapture%}'))
+1
View File
@@ -0,0 +1 @@
<img title="risus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices" src="http://images.example.com/{{id}}.png">
+1
View File
@@ -0,0 +1 @@
<img title="risus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices" src="http://images.example.com/{{id}}.png">
+1
View File
@@ -0,0 +1 @@
<img title="risus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices" src="http://images.example.com/{{todo.id}}.png">
+44
View File
@@ -0,0 +1,44 @@
<section class="todo-list">
<h1>
posuere cubilia Curae; Vestibulum hendrerit malesuada odio. Fusce ut elit
ut augue sollicitudin blandit. Phasellus volutpat lorem. Duis non pede et
neque luctus tincidunt. Duis interdum tempus elit.
<small>Aenean metus. Vestibulum ac lacus. Vivamus porttitor, massa ut.</small>
</h1>
<a href={{url "/add"}} class="todo-add"><i class="fa fa-plus-square"></i>Add Todo</a>
<ul class="filter-category">
{{#each categories }}
<li style="background: {{ color }}">
<a href="/todos/category/{{ id }}">{{ title }}</a>
</li>
{{/each}}
</ul>
{{#each todos }}
<div>
<h2>
Todo {{inc @index}}:
<span class="todo-item content" data-todo-index="{{@index}}">
{{ upcase (concat 'TODO: ' title) }}
</span>
</h2>
{{> todo-icon id=id }}
<p class="description">
Purus eu mi. Proin commodo, massa commodo dapibus elementum,
libero lacus pulvinar eros, ut tincidunt nisl elit ut velit. Cras rutrum
porta purus. Vivamus lorem. Sed turpis enim, faucibus quis, pharetra in,
sagittis sed, magna. Curabitur ultricies felis ut libero. Nullam tincidunt
enim eu nibh. Nunc eget ipsum in sem facilisis convallis. Proin fermentum
</p>
<div class="todo-meta">
{{# if category }}
<span>{{ capitalize category }}</span>
{{/if}}
</div>
<a class="btn btn-primary" href={{ url (concat "/edit/" id) }}><i class="fa fa-pencil"></i> Edit</a>
<a class="btn btn-default"><i class="fa fa-check"></i> Check</a>
<a class="btn ben-danger" href={{ url (concat "/delete/" id) }}><i class="fa fa-trash-o"</i> Trash</a>
</div>
{{/each}}
</section>
+57
View File
@@ -0,0 +1,57 @@
// eslint-disable-next-line
const React = require('react')
function capitalize (str) {
return str[0].toUpperCase() + str.slice(1).toLowerCase()
}
function url (path) {
return `https://example.com${path}`
}
function renderTodoIcon (id) {
return <img title="risus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices" src="http://images.example.com/{id}.png"/>
}
module.exports = ({ categories, todos }) => {
return <section className="todo-list">
<h1>
posuere cubilia Curae; Vestibulum hendrerit malesuada odio. Fusce ut elit
ut augue sollicitudin blandit. Phasellus volutpat lorem. Duis non pede et
neque luctus tincidunt. Duis interdum tempus elit.
<small>Aenean metus. Vestibulum ac lacus. Vivamus porttitor, massa ut.</small>
</h1>
<a href={url('/add')} className="todo-add"><i className="fa fa-plus-square"></i>Add Todo</a>
<ul className="filter-category">
{categories.map((item, i) => {
return <li key={i} style={{ background: item.color }}>
<a href={'/todos/category/' + item.id }>{ item.title }</a>
</li>
})}
</ul>
{todos.map((todo, index0) => {
return <div key={index0}>
<h2>
Todo { index0 + 1 }:
<span className="todo-item content" data-todo-index="{{ forloop.index0 }}">
{ ('TODO: ' + todo.title).toUpperCase() }
</span>
</h2>
{ renderTodoIcon(todo.id) }
<p className="description">
Purus eu mi. Proin commodo, massa commodo dapibus elementum,
libero lacus pulvinar eros, ut tincidunt nisl elit ut velit. Cras rutrum
porta purus. Vivamus lorem. Sed turpis enim, faucibus quis, pharetra in,
sagittis sed, magna. Curabitur ultricies felis ut libero. Nullam tincidunt
enim eu nibh. Nunc eget ipsum in sem facilisis convallis. Proin fermentum
</p>
<div className="todo-meta">
{ todo.category ? <span>{capitalize(todo.category)}</span> : '' }
</div>
<a className="btn btn-primary" href={url('/edit/' + todo.id)}><i className="fa fa-pencil"></i> Edit</a>
<a className="btn btn-default"><i className="fa fa-check"></i> Check</a>
<a className="btn ben-danger" href={url('/delete/' + todo.id)}><i className="fa fa-trash-o"></i> Trash</a>
</div>
})}
</section>
}
+5 -10
View File
@@ -7,8 +7,7 @@
</h1>
<a href={{"/add" | url}} class="todo-add"><i class="fa fa-plus-square"></i>Add Todo</a>
<ul class="filter-category">
{% for i in (0..categories.length) %}
{% assign item=categories[i] %}
{% for item in categories %}
<li style="background: {{ item.color }}">
<a href="/todos/category/{{ item.id }}">{{ item.title }}</a>
</li>
@@ -22,11 +21,7 @@
{{ todo.title | prepend: 'TODO: ' | upcase }}
</span>
</h2>
<img
title="risus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices"
src="{% include "todo-icon", id=todo.id }} %}"
>
{% render "todo-icon", id:todo.id %}
<p class="description">
Purus eu mi. Proin commodo, massa commodo dapibus elementum,
@@ -38,12 +33,12 @@
<div class="todo-meta">
{% if todo.category %}
<span>{{ todo.category.title | capitalize }}</span>
<span>{{ todo.category | capitalize }}</span>
{% endif %}
</div>
<a class="btn btn-primary" href={{"/edit/" | append todo.id | url }}><i class="fa fa-pencil"></i> Edit</a>
<a class="btn btn-primary" href={{"/edit/" | append: todo.id | url }}><i class="fa fa-pencil"></i> Edit</a>
<a class="btn btn-default"><i class="fa fa-check"></i> Check</a>
<a class="btn ben-danger" href={{"/delete/" | append todo.id | url }}><i class="fa fa-trash-o"</i> Trash</a>
<a class="btn ben-danger" href={{"/delete/" | append: todo.id | url }}><i class="fa fa-trash-o"</i> Trash</a>
</div>
{% endfor %}
</section>
+44
View File
@@ -0,0 +1,44 @@
<section class="todo-list">
<h1>
posuere cubilia Curae; Vestibulum hendrerit malesuada odio. Fusce ut elit
ut augue sollicitudin blandit. Phasellus volutpat lorem. Duis non pede et
neque luctus tincidunt. Duis interdum tempus elit.
<small>Aenean metus. Vestibulum ac lacus. Vivamus porttitor, massa ut.</small>
</h1>
<a href={{"/add" | url}} class="todo-add"><i class="fa fa-plus-square"></i>Add Todo</a>
<ul class="filter-category">
{% for item in categories %}
<li style="background: {{ item.color }}">
<a href="/todos/category/{{ item.id }}">{{ item.title }}</a>
</li>
{% endfor %}
</ul>
{% for todo in todos %}
<div>
<h2>
Todo {{ loop.index }}:
<span class="todo-item content" data-todo-index="{{ loop.index0 }}">
{{ todo.title | prepend('TODO: ') | upcase }}
</span>
</h2>
{% include "todo-icon.swig" %}
<p class="description">
Purus eu mi. Proin commodo, massa commodo dapibus elementum,
libero lacus pulvinar eros, ut tincidunt nisl elit ut velit. Cras rutrum
porta purus. Vivamus lorem. Sed turpis enim, faucibus quis, pharetra in,
sagittis sed, magna. Curabitur ultricies felis ut libero. Nullam tincidunt
enim eu nibh. Nunc eget ipsum in sem facilisis convallis. Proin fermentum
</p>
<div class="todo-meta">
{% if todo.category %}
<span>{{ todo.category | capitalize }}</span>
{% endif %}
</div>
<a class="btn btn-primary" href={{"/edit/" | append(todo.id) | url }}><i class="fa fa-pencil"></i> Edit</a>
<a class="btn btn-default"><i class="fa fa-check"></i> Check</a>
<a class="btn ben-danger" href={{"/delete/" | append(todo.id) | url }}><i class="fa fa-trash-o"</i> Trash</a>
</div>
{% endfor %}
</section>
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
rm -rf docs/source/api
typedoc --plugin typedoc-plugin-missing-exports ./src --gitRevision master --out docs/source/api
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
cd docs
cp ../CHANGELOG.md source/tutorials/changelog.md
sed -i \
-e 's/{%/{% raw %}{%{% endraw %}/g' \
-e 's/{{/{% raw %}{{{% endraw %}/g' \
-e '1 s/"/\&quot;/g' \
-e '1 s/</\&lt;/g' \
-e '1 s/>/\&gt;/g' \
source/tutorials/changelog.md
cp source/tutorials/changelog.md source/zh-cn/tutorials/changelog.md
sed -i -e '1i\---\ntitle: Changelog\nauto: true\n---\n' source/tutorials/changelog.md
sed -i -e '1i\---\ntitle: 更新日志\nauto: true\n---\n' source/zh-cn/tutorials/changelog.md
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Run `sed` in a way that's compatible with both macOS (BSD) and Linux (GNU)
sedi() {
if [[ "$OSTYPE" == "darwin"* ]]; then
/usr/bin/sed -i '' "$@"
else
sed -i "$@"
fi
}
# create docs/themes/navy/layout/partial/all-contributors.swig
awk '/ALL-CONTRIBUTORS-LIST:START/{flag=1;next}/ALL-CONTRIBUTORS-LIST:END/{flag=0}flag' README.md | \
sed 's/<br \/>.*<\/td>/<\/a><\/td>/g' | \
sed 's/width="[^"]*"//g' | \
tr -d '\n' | \
sed 's/<\/tr>\s*<tr>//g' \
> docs/themes/navy/layout/partial/all-contributors.swig
# create docs/themes/navy/layout/partial/financial-contributors.swig
awk '/FINANCIAL-CONTRIBUTORS-BEGIN/{flag=1;next}/FINANCIAL-CONTRIBUTORS-END/{flag=0}flag' README.md | \
sed 's/<br \/>.*<\/td>/<\/a><\/td>/g' | \
tr -d '\n' | \
sed 's/<\/tr>\s*<tr>//g' \
> docs/themes/navy/layout/partial/financial-contributors.swig
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
BUNDLES=min npm run build
mkdir -p docs/public/js/
cp dist/liquid.browser.min.js docs/public/js/
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -ex
./bin/build-docs-liquid.sh
./bin/build-contributors.sh
./bin/build-apidoc.sh
./bin/build-changelog.sh
cd docs
npm ci
npm run build
cp CNAME public/
if [ "$HEXO_ALGOLIA_INDEXING_KEY" != "" ]; then
npm run index
fi
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
# Prerequisites:
# 1.imagemagick. try brew install imagemagick
# 2. logo.png in size 512x512
# 3. this script should be run with cwd docs/source/icon/
echo creating apple touch icons...
apple=(57x57 60x60 72x72 76x76 114x114 120x120 144x144 152x152)
for size in "${apple[@]}"; do
echo $size
convert logo.png -resize $size apple-touch-icon-$size.png
done
cp logo.png apple-touch-icon.png
convert logo.png \
\( +clone -alpha extract \
-draw 'fill black polygon 0,0 0,80 80,0 fill white circle 80,80 80,0' \
\( +clone -flip \) -compose Multiply -composite \
\( +clone -flop \) -compose Multiply -composite \
\) -alpha off -compose CopyOpacity -composite apple-touch-icon-precomposed.png
echo creating favicon...
convert logo.png -resize 48x48 ../favicon.ico
favicon=(16x16 32x32 96x96 160x160 196x196)
for size in "${favicon[@]}"; do
echo $size
convert logo.png -resize $size favicon-$size.png
done
echo creating mstile icons...
mstile=(70x70 144x144 150x150 310x310)
for size in "${mstile[@]}"; do
echo $size
convert logo.png -resize $size mstile-$size.png
done
convert mstile-150x150.png -gravity center -background white -extent 310x150 mstile-310x150.png
Regular → Executable
+20 -5
View File
@@ -4,16 +4,19 @@ const isQuote = c => c === '"' || c === "'"
const isOperator = c => '!=<>'.includes(c)
const isNumber = c => c >= '0' && c <= '9'
const isCharacter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
const isVariable = c => '_-?'.includes(c) || isCharacter(c) || isNumber(c)
const isBlank = c => c === '\n' || c === '\t' || c === ' ' || c === '\r'
const isWord = c => '_-?'.includes(c) || isCharacter(c) || isNumber(c)
const isBlank = c => '\n\t \r\v\f'.includes(c)
const isInlineBlank = c => c === '\t' || c === ' ' || c === '\r'
const isSign = c => c === '-' || c === '+'
// See https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/RegExp
const unicodeBlanks = '\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000'
const unicodePunctuation = '“”'
const types = []
for (let i = 0; i < 128; i++) {
const c = String.fromCharCode(i)
let n = 0
if (isVariable(c)) n |= 1
if (isWord(c)) n |= 1
if (isOperator(c)) n |= 2
if (isBlank(c)) n |= 4
if (isQuote(c)) n |= 8
@@ -22,15 +25,27 @@ for (let i = 0; i < 128; i++) {
if (isSign(c)) n |= 64
types.push(n)
}
console.log(`
// **DO NOT CHANGE THIS FILE**
//
// This file is generated by bin/character-gen.js
// bitmask character types to boost performance
// generated by bin/character-gen.js
export const TYPES = [${types.join(', ')}]
export const VARIABLE = 1
export const WORD = 1
export const OPERATOR = 2
export const BLANK = 4
export const QUOTE = 8
export const INLINE_BLANK = 16
export const NUMBER = 32
export const SIGN = 64
export const PUNCTUATION = 128
export function isWord (char: string): boolean {
const code = char.charCodeAt(0)
return code >= 128 ? !TYPES[code] : !!(TYPES[code] & WORD)
}
`.trim())
console.log([...unicodeBlanks].map(char => `TYPES[${char.charCodeAt(0)}]`).join(' = ') + ' = BLANK')
console.log([...unicodePunctuation].map(char => `TYPES[${char.charCodeAt(0)}]`).join(' = ') + ' = PUNCTUATION')
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env node
// In Hexo, content inside markdown code/code fences,
// will not go through nunjucks.
// So we're escaping special chars outside code only.
let backTick = 0
process.stdin.on('data', (buffer) => {
for (const c of buffer.toString()) {
if (c === '`') {
backTick++
}
const shouldEscape = '{%%}'.includes(c) && backTick % 2 === 0
if (shouldEscape) {
const code = c.charCodeAt(0).toString(16)
process.stdout.write(`&#x${code};`)
} else process.stdout.write(c)
}
})
+130 -15
View File
@@ -1,24 +1,139 @@
#!/usr/bin/env node
const fs = require('fs/promises')
const Liquid = require('..').Liquid
const contextArg = process.argv.slice(2)[0]
let context = {}
if (contextArg) {
if (contextArg.endsWith('.json')) {
const fs = require('fs')
context = JSON.parse(fs.readFileSync(contextArg, 'utf8'))
// Preserve compatibility by falling back to legacy CLI behavior if:
// - stdin is redirected (i.e. not connected to a terminal) AND
// - there are either no arguments, or only a single argument which does not start with a dash
// TODO: Remove this fallback for 11.0
let renderPromise = null
if (!process.stdin.isTTY && (process.argv.length === 2 || (process.argv.length === 3 && !process.argv[2].startsWith('-')))) {
renderPromise = renderLegacy()
} else {
renderPromise = render()
}
renderPromise.catch(err => {
process.stderr.write(`${err.message}\n`)
process.exitCode = 1
})
async function render () {
const { program } = require('commander')
program
.name('liquidjs')
.description('Render a Liquid template')
.requiredOption('-t, --template <liquid | @path>', 'liquid template to render (@- to read from stdin)') // TODO: Change to argument in 11.0
.option('-c, --context <json | @path>', 'input context in JSON format (@- to read from stdin)')
.option('-o, --output <path>', 'write rendered output to file (omit to write to stdout)')
.option('--cache [size]', 'cache previously parsed template structures (default cache size: 1024)')
.option('--extname <string>', 'use a default filename extension when resolving partials and layouts')
.option('--jekyll-include', 'use jekyll-style include (pass parameters to include variable of current scope)')
.option('--js-truthy', 'use JavaScript-style truthiness')
.option('--layouts <path...>', 'directories from where to resolve layouts (defaults to --root)')
.option('--lenient-if', 'do not throw on undefined variables in conditional expressions (when using --strict-variables)')
.option('--no-dynamic-partials', 'always treat file paths for partials and layouts as a literal value')
.option('--no-greedy', 'disable greedy matching for --trim* options')
.option('--no-relative-reference', 'require absolute file paths for partials and layouts')
.option('--ordered-filter-parameters', 'respect parameter order when using filters')
.option('--output-delimiter-left <string>', 'left delimiter to use for liquid outputs')
.option('--output-delimiter-right <string>', 'right delimiter to use for liquid outputs')
.option('--partials <path...>', 'directories from where to resolve partials (defaults to --root)')
.option('--preserve-timezones', 'preserve input timezone in date filter')
.option('--root <path...>', 'directories from where to resolve partials and layouts (defaults to ".")')
.option('--strict-filters', 'throw on undefined filters instead of skipping them')
.option('--strict-variables', 'throw on undefined variables instead of rendering them as empty string')
.option('--tag-delimiter-left', 'left delimiter to use for liquid tags')
.option('--tag-delimiter-right', 'right delimiter to use for liquid tags')
.option('--timezone-offset <value>', 'JavaScript timezone name or timezoneOffset value to use in date filter (defaults to local timezone)')
.option('--trim-output-left', 'trim whitespace from left of liquid outputs')
.option('--trim-output-right', 'trim whitespace from right of liquid outputs')
.option('--trim-tag-left', 'trim whitespace from left of liquid tags')
.option('--trim-tag-right', 'trim whitespace from right of liquid tags')
.showHelpAfterError('Use -h or --help for additional information.')
.parse()
const options = program.opts()
if (Object.values(options).filter((value) => value === '@-').length > 1) {
throw new Error(`The stdin input specifier '@-' must only be used once.`)
}
const template = await resolveInputOption(options.template)
const context = await resolveContext(options.context)
const liquid = new Liquid(options)
const output = liquid.parseAndRenderSync(template, context)
if (options.output) {
await fs.writeFile(options.output, output)
} else {
context = JSON.parse(contextArg)
process.stdout.write(output)
}
}
let tpl = ''
process.stdin.on('data', chunk => (tpl += chunk))
process.stdin.on('end', () => render(tpl))
async function render (tpl) {
const liquid = new Liquid()
const html = await liquid.parseAndRender(tpl, context)
process.stdout.write(html)
async function resolveContext (contextOption) {
let contextJson = '{}'
if (contextOption) {
contextJson = await resolveInputOption(contextOption)
}
const context = JSON.parse(contextJson)
return context
}
async function resolveInputOption (option) {
let content = null
if (option) {
if (option === '@-') {
content = await readStream(process.stdin)
} else if (option.startsWith('@')) {
const filePath = option.slice(1)
const stat = await fs.stat(filePath, { throwIfNoEntry: false })
if (!stat || !stat.isFile) {
throw new Error(`'${filePath}' does not exist or is not a file`)
}
content = await fs.readFile(filePath, 'utf8')
} else {
content = option
}
}
return content
}
async function readStream (stream) {
const chunks = []
for await (const chunk of stream) {
chunks.push(chunk)
}
return Buffer.concat(chunks).toString('utf8')
}
// TODO: Remove for 11.0
async function renderLegacy () {
process.stderr.write('Reading template from stdin. This mode will be removed in next major version, use --template option instead.\n')
const contextArg = process.argv.slice(2)[0]
let context = {}
if (contextArg) {
const contextJson = await resolveInputOptionLegacy(contextArg)
context = JSON.parse(contextJson)
}
const template = await readStream(process.stdin)
const liquid = new Liquid()
const output = liquid.parseAndRenderSync(template, context)
process.stdout.write(output)
}
// TODO: Remove for 11.0
async function resolveInputOptionLegacy (option) {
let content = null
if (option) {
const stat = await fs.stat(option).catch(e => null)
if (stat && stat.isFile) {
content = await fs.readFile(option, 'utf8')
} else {
content = option
}
}
return content
}
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
VERSION_LATEST=$(cat package.json | grep '"version":' | head -1 | awk -F'"' '{print $4}')
FILE_LOCAL=dist/liquid.node.js
FILE_LATEST=dist/liquid.node.$VERSION_LATEST.js
URL_LATEST=https://unpkg.com/liquidjs@$VERSION_LATEST/dist/liquid.node.js
if [ ! -f "$FILE_LATEST" ]; then
curl $URL_LATEST > $FILE_LATEST
fi
exec node benchmark/diff.js $FILE_LOCAL $FILE_LATEST
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<title>liquidjs for the browser</title>
<script src="node_modules/liquidjs/dist/liquid.min.js"></script>
<script src="node_modules/liquidjs/dist/liquid.browser.min.js"></script>
</head>
<body>
+451
View File
@@ -0,0 +1,451 @@
{
"name": "liquidjs-demo-browser",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "liquidjs-demo-browser",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"http-server": "^0.11.1",
"liquidjs": "*"
}
},
"node_modules/async": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
"integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
"dependencies": {
"lodash": "^4.17.14"
}
},
"node_modules/call-bind": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
"dependencies": {
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
"set-function-length": "^1.2.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/colors": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
"integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==",
"engines": {
"node": ">=0.1.90"
}
},
"node_modules/commander": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
"integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
"engines": {
"node": ">=14"
}
},
"node_modules/corser": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz",
"integrity": "sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==",
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/debug": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dependencies": {
"ms": "^2.1.1"
}
},
"node_modules/define-data-property": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
"dependencies": {
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"gopd": "^1.0.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/ecstatic": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz",
"integrity": "sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==",
"deprecated": "This package is unmaintained and deprecated. See the GH Issue 259.",
"dependencies": {
"he": "^1.1.1",
"mime": "^1.6.0",
"minimist": "^1.1.0",
"url-join": "^2.0.5"
},
"bin": {
"ecstatic": "lib/ecstatic.js"
}
},
"node_modules/es-define-property": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
"dependencies": {
"get-intrinsic": "^1.2.4"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-errors": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
},
"node_modules/follow-redirects": {
"version": "1.15.6",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/get-intrinsic": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
"dependencies": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3",
"hasown": "^2.0.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
"dependencies": {
"get-intrinsic": "^1.1.3"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-property-descriptors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
"dependencies": {
"es-define-property": "^1.0.0"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-proto": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/hasown": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"dependencies": {
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
"bin": {
"he": "bin/he"
}
},
"node_modules/http-proxy": {
"version": "1.18.1",
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
"dependencies": {
"eventemitter3": "^4.0.0",
"follow-redirects": "^1.0.0",
"requires-port": "^1.0.0"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/http-server": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/http-server/-/http-server-0.11.2.tgz",
"integrity": "sha512-Gp1ka7W4MLjFz8CLhFmUWa+uIf7cq93O4DZv8X0ZmNS1L4P2dbMkmlBeYhb0hGaI3M0Y1xM4waWgnIf/5Hp7dQ==",
"dependencies": {
"colors": "1.0.3",
"corser": "~2.0.0",
"ecstatic": "^3.0.0",
"http-proxy": "^1.8.1",
"opener": "~1.4.0",
"optimist": "0.6.x",
"portfinder": "^1.0.13",
"union": "^0.5.0"
},
"bin": {
"hs": "bin/http-server",
"http-server": "bin/http-server"
}
},
"node_modules/liquidjs": {
"version": "10.16.4",
"resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-10.16.4.tgz",
"integrity": "sha512-5kK5HRZng6crSedS11D1h9Od8pYB5wjWjvJIlbhLVS7n+ITWzQervv27jx+7MkOS2KYfAEhwlEinTsTn4Ae5WQ==",
"dependencies": {
"commander": "^10.0.0"
},
"bin": {
"liquid": "bin/liquid.js",
"liquidjs": "bin/liquid.js"
},
"engines": {
"node": ">=14"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/liquidjs"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/mkdirp": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
"dependencies": {
"minimist": "^1.2.6"
},
"bin": {
"mkdirp": "bin/cmd.js"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/object-inspect": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
"integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/opener": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz",
"integrity": "sha512-4Im9TrPJcjAYyGR5gBe3yZnBzw5n3Bfh1ceHHGNOpMurINKc6RdSIPXMyon4BZacJbJc36lLkhipioGbWh5pwg==",
"bin": {
"opener": "opener.js"
}
},
"node_modules/optimist": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
"integrity": "sha512-snN4O4TkigujZphWLN0E//nQmm7790RYaE53DdL7ZYwee2D8DDo9/EyYiKUfN3rneWUjhJnueija3G9I2i0h3g==",
"dependencies": {
"minimist": "~0.0.1",
"wordwrap": "~0.0.2"
}
},
"node_modules/optimist/node_modules/minimist": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
"integrity": "sha512-iotkTvxc+TwOm5Ieim8VnSNvCDjCK9S8G3scJ50ZthspSxa7jx50jkhYduuAtAjvfDUwSgOwf8+If99AlOEhyw=="
},
"node_modules/portfinder": {
"version": "1.0.32",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz",
"integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==",
"dependencies": {
"async": "^2.6.4",
"debug": "^3.2.7",
"mkdirp": "^0.5.6"
},
"engines": {
"node": ">= 0.12.0"
}
},
"node_modules/qs": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
"dependencies": {
"side-channel": "^1.0.6"
},
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
},
"node_modules/set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
"dependencies": {
"define-data-property": "^1.1.4",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
"gopd": "^1.0.1",
"has-property-descriptors": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/side-channel": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
"dependencies": {
"call-bind": "^1.0.7",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.4",
"object-inspect": "^1.13.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/union": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz",
"integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==",
"dependencies": {
"qs": "^6.4.0"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/url-join": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz",
"integrity": "sha512-c2H1fIgpUdwFRIru9HFno5DT73Ok8hg5oOb5AT3ayIgvCRfxgs2jyt5Slw8kEB7j3QUr6yJmMPDT/odjk7jXow=="
},
"node_modules/wordwrap": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
"integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==",
"engines": {
"node": ">=0.4.0"
}
}
}
}
+1
View File
@@ -5,6 +5,7 @@
"description": "Liquidjs Demo for Browser Usage",
"main": "index.html",
"scripts": {
"test": "echo not implemented",
"start": "http-server -c-1 "
},
"author": "harttle <[email protected]>",
+9
View File
@@ -0,0 +1,9 @@
# Using LiquidJS in ESM
## Get Started
```bash
cd demo/nodejs
npm install
npm start
```
+30
View File
@@ -0,0 +1,30 @@
import { Liquid } from 'liquidjs'
const engine = new Liquid({
extname: '.liquid',
globals: { title: 'LiquidJS Demo' },
// root files for `.render()` and `.parse()`
root: process.cwd(),
// layout files for `{% layout %}`
layouts: process.cwd() + '/layouts',
// partial files for `{% include %}` and `{% render %}`
partials: process.cwd() + '/partials'
})
const ctx = {
todos: ['fork and clone', 'make it better', 'make a pull request']
}
async function main () {
console.log('==========renderFile===========')
const html = await engine.renderFile('todolist', ctx)
console.log(html)
console.log('===========Streamed===========')
const tpls = await engine.parseFile('todolist')
engine.renderToNodeStream(tpls, ctx)
.on('data', data => process.stdout.write(data))
.on('end', () => console.log(''))
}
main()
+7
View File
@@ -0,0 +1,7 @@
<html>
<head><meta name="title" content="{{title}}"></head>
<body>
{% block %}{% endblock %}
{% render "footer.liquid" %}
</body>
</html>
+46
View File
@@ -0,0 +1,46 @@
{
"name": "liquidjs-demo-nodejs",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "liquidjs-demo-nodejs",
"dependencies": {
"hello-liquid": "^1.0.0",
"liquidjs": "^10.16.4"
}
},
"node_modules/commander": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
"integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
"engines": {
"node": ">=14"
}
},
"node_modules/hello-liquid": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/hello-liquid/-/hello-liquid-1.0.0.tgz",
"integrity": "sha512-WNmZp5s647BN2WHPq4FHVH85CcqNVet5DXIVw1UtVMaV+MJHFA+ylge0hqHSw0iOI/Ojrx8KEKZurYZix5PekQ=="
},
"node_modules/liquidjs": {
"version": "10.16.4",
"resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-10.16.4.tgz",
"integrity": "sha512-5kK5HRZng6crSedS11D1h9Od8pYB5wjWjvJIlbhLVS7n+ITWzQervv27jx+7MkOS2KYfAEhwlEinTsTn4Ae5WQ==",
"dependencies": {
"commander": "^10.0.0"
},
"bin": {
"liquid": "bin/liquid.js",
"liquidjs": "bin/liquid.js"
},
"engines": {
"node": ">=14"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/liquidjs"
}
}
}
}
+14
View File
@@ -0,0 +1,14 @@
{
"name": "liquidjs-demo-esm",
"description": "Node.js demo for liquidjs",
"private": true,
"main": "index.mjs",
"scripts": {
"test": "./test.sh",
"start": "node index.mjs"
},
"dependencies": {
"hello-liquid": "^1.0.0",
"liquidjs": "latest"
}
}
+1
View File
@@ -0,0 +1 @@
<small>{{title}}</small>
+1
View File
@@ -0,0 +1 @@
<li>{{index}} - {{todo}}</li>
+3
View File
@@ -0,0 +1,3 @@
set -ex
npm start | grep 'LiquidJS Demo'
+7
View File
@@ -0,0 +1,7 @@
{% layout 'html.liquid' %}
<h1>{% include "hello-liquid" %}</h1>
<ul>
{% for todo in todos %}
{% render 'todo.liquid' with todo, index: forloop.index%}
{% endfor %}
</ul>
+1 -1
View File
@@ -1,4 +1,4 @@
# LiquidJS for Express.js
# Using LiquidJS with Express.js
## Get Started
+1 -1
View File
@@ -15,7 +15,7 @@ app.get('/', function (req, res) {
const todos = ['fork and clone', 'make it better', 'make a pull request']
res.render('todolist', {
todos: todos,
title: 'Welcome to liquidjs!'
title: 'Welcome to LiquidJS!'
})
})
+725
View File
@@ -0,0 +1,725 @@
{
"name": "express-demo",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "express-demo",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"express": "^4.14.0",
"liquidjs": "latest"
}
},
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
"dependencies": {
"mime-types": "~2.1.34",
"negotiator": "0.6.3"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
},
"node_modules/body-parser": {
"version": "1.20.2",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
"integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
"dependencies": {
"bytes": "3.1.2",
"content-type": "~1.0.5",
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "1.2.0",
"http-errors": "2.0.0",
"iconv-lite": "0.4.24",
"on-finished": "2.4.1",
"qs": "6.11.0",
"raw-body": "2.5.2",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
},
"engines": {
"node": ">= 0.8",
"npm": "1.2.8000 || >= 1.4.16"
}
},
"node_modules/bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/call-bind": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
"dependencies": {
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
"set-function-length": "^1.2.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/commander": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
"integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
"engines": {
"node": ">=14"
}
},
"node_modules/content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
"dependencies": {
"safe-buffer": "5.2.1"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/content-type": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cookie": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
"integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cookie-signature": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
},
"node_modules/debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/define-data-property": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
"dependencies": {
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"gopd": "^1.0.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/destroy": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
"engines": {
"node": ">= 0.8",
"npm": "1.2.8000 || >= 1.4.16"
}
},
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
},
"node_modules/encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/es-define-property": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
"dependencies": {
"get-intrinsic": "^1.2.4"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-errors": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
},
"node_modules/etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/express": {
"version": "4.19.2",
"resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
"integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
"dependencies": {
"accepts": "~1.3.8",
"array-flatten": "1.1.1",
"body-parser": "1.20.2",
"content-disposition": "0.5.4",
"content-type": "~1.0.4",
"cookie": "0.6.0",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "2.0.0",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "1.2.0",
"fresh": "0.5.2",
"http-errors": "2.0.0",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "2.4.1",
"parseurl": "~1.3.3",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.7",
"qs": "6.11.0",
"range-parser": "~1.2.1",
"safe-buffer": "5.2.1",
"send": "0.18.0",
"serve-static": "1.15.0",
"setprototypeof": "1.2.0",
"statuses": "2.0.1",
"type-is": "~1.6.18",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
},
"engines": {
"node": ">= 0.10.0"
}
},
"node_modules/finalhandler": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
"integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
"dependencies": {
"debug": "2.6.9",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"on-finished": "2.4.1",
"parseurl": "~1.3.3",
"statuses": "2.0.1",
"unpipe": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/get-intrinsic": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
"dependencies": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3",
"hasown": "^2.0.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
"dependencies": {
"get-intrinsic": "^1.1.3"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-property-descriptors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
"dependencies": {
"es-define-property": "^1.0.0"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-proto": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/hasown": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"dependencies": {
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/http-errors": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
"dependencies": {
"depd": "2.0.0",
"inherits": "2.0.4",
"setprototypeof": "1.2.0",
"statuses": "2.0.1",
"toidentifier": "1.0.1"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/ipaddr.js": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/liquidjs": {
"version": "10.16.4",
"resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-10.16.4.tgz",
"integrity": "sha512-5kK5HRZng6crSedS11D1h9Od8pYB5wjWjvJIlbhLVS7n+ITWzQervv27jx+7MkOS2KYfAEhwlEinTsTn4Ae5WQ==",
"dependencies": {
"commander": "^10.0.0"
},
"bin": {
"liquid": "bin/liquid.js",
"liquidjs": "bin/liquid.js"
},
"engines": {
"node": ">=14"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/liquidjs"
}
},
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
},
"node_modules/methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
},
"node_modules/negotiator": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/object-inspect": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
"integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/on-finished": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
"dependencies": {
"ee-first": "1.1.1"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
},
"node_modules/proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
"dependencies": {
"forwarded": "0.2.0",
"ipaddr.js": "1.9.1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
"dependencies": {
"side-channel": "^1.0.4"
},
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/raw-body": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
"dependencies": {
"bytes": "3.1.2",
"http-errors": "2.0.0",
"iconv-lite": "0.4.24",
"unpipe": "1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/send": {
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
"integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
"dependencies": {
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "1.2.0",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"fresh": "0.5.2",
"http-errors": "2.0.0",
"mime": "1.6.0",
"ms": "2.1.3",
"on-finished": "2.4.1",
"range-parser": "~1.2.1",
"statuses": "2.0.1"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/send/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/serve-static": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
"integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
"dependencies": {
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"parseurl": "~1.3.3",
"send": "0.18.0"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
"dependencies": {
"define-data-property": "^1.1.4",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
"gopd": "^1.0.1",
"has-property-descriptors": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/setprototypeof": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
},
"node_modules/side-channel": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
"dependencies": {
"call-bind": "^1.0.7",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.4",
"object-inspect": "^1.13.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/statuses": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/toidentifier": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
"engines": {
"node": ">=0.6"
}
},
"node_modules/type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
"dependencies": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
"engines": {
"node": ">= 0.8"
}
}
}
}
+3 -3
View File
@@ -1,17 +1,17 @@
{
"name": "express-demo",
"name": "liquidjs-demo-express",
"version": "1.0.0",
"private": true,
"description": "Express Demo Using liquidjs",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "./test.sh"
},
"author": "harttle",
"license": "MIT",
"dependencies": {
"express": "^4.14.0",
"liquidjs": "*"
"liquidjs": "latest"
}
}
+20
View File
@@ -0,0 +1,20 @@
set -x
LOG_FILE=$(mktemp)
npm start > $LOG_FILE 2>&1 &
SERVER_PID=$!
while ! grep -q "Express running" "$LOG_FILE"; do
if ! kill -0 $SERVER_PID; then
echo "Server exited unexpectedly."
cat $LOG_FILE
return 1
fi
sleep 1
done
curl http://127.0.0.1:3000 | grep -q 'Welcome to LiquidJS'
RESULT=$?
killall node
rm $LOG_FILE
if [ $RESULT != 0 ]; then
exit 1
fi
+29 -14
View File
@@ -1,26 +1,41 @@
const { Liquid } = require('liquidjs')
const { Liquid, Tag, Value } = require('liquidjs')
const engine = new Liquid({
extname: '.liquid',
globals: { title: 'NodeJS Demo for LiquidJS' },
// root files for `.render()` and `.parse()`
root: __dirname,
extname: '.liquid'
// layout files for `{% layout %}`
layouts: './layouts',
// partial files for `{% include %}` and `{% render %}`
partials: './partials'
})
engine.registerTag('header', {
parse: function (token) {
const [key, val] = token.args.split(':')
this[key] = val
},
render: async function (scope, emitter) {
const title = await this.liquid.evalValue(this.content, scope)
engine.registerTag('header', class HeaderTag extends Tag {
constructor (token, remainTokens, liquid) {
super(token, remainTokens, liquid)
this.value = new Value(token.args, liquid)
}
* render (ctx, emitter) {
const title = yield this.value.value(ctx)
emitter.write(`<h1>${title}</h1>`)
}
})
const ctx = {
todos: ['fork and clone', 'make it better', 'make a pull request'],
title: 'Welcome to liquidjs!'
todos: ['fork and clone', 'make it better', 'make a pull request']
}
engine.renderFile('todolist', ctx)
.then(console.log)
.catch(err => console.error(err.stack))
async function main () {
console.log('==========renderFile===========')
const html = await engine.renderFile('todolist', ctx)
console.log(html)
console.log('===========Streamed===========')
const tpls = await engine.parseFile('todolist')
engine.renderToNodeStream(tpls, ctx)
.on('data', data => process.stdout.write(data))
.on('end', () => console.log(''))
}
main()
+7
View File
@@ -0,0 +1,7 @@
<html>
<head><meta name="title" content="{{title}}"></head>
<body>
{% block %}{% endblock %}
{% render "footer.liquid" %}
</body>
</html>
+12
View File
@@ -0,0 +1,12 @@
{
"name": "liquidjs-demo-nodejs",
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"liquidjs": {
"version": "9.32.1",
"resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-9.32.1.tgz",
"integrity": "sha512-U/ymmm4M3sNJszHlF0Gzneky17qk+vWmu3nFkWKdniQhqaZNk6eZQdbcKkFGFPN4I9ijrBRjDsLBLysu292j8w=="
}
}
}
+2 -1
View File
@@ -4,9 +4,10 @@
"private": true,
"main": "index.js",
"scripts": {
"test": "./test.sh",
"start": "node index.js"
},
"dependencies": {
"liquidjs": "*"
"liquidjs": "latest"
}
}
+1
View File
@@ -0,0 +1 @@
<small>{{title}}</small>
+1
View File
@@ -0,0 +1 @@
<li>{{index}} - {{todo}}</li>
+3
View File
@@ -0,0 +1,3 @@
set -ex
npm start | grep 'NodeJS Demo for LiquidJS'
+4 -4
View File
@@ -1,7 +1,7 @@
{%header content: "welcome to liquid" | capitalize%}
{% layout 'html.liquid' %}
{%header title | capitalize%}
<ul>
{% for todo in todos %}
<li>{{forloop.index}} - {{todo}}</li>
{% render 'todo.liquid' with todo, index: forloop.index%}
{% endfor %}
</ul>
</ul>
+5 -2506
View File
File diff suppressed because it is too large Load Diff
+16
View File
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<title>React Demo for LiquidJS</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
+4043
View File
File diff suppressed because it is too large Load Diff
+23 -12
View File
@@ -1,20 +1,25 @@
{
"name": "react-liquidjs",
"name": "liquidjs-demo-react",
"version": "0.1.0",
"private": true,
"dependencies": {
"html-react-parser": "^0.4.7",
"liquidjs": "^9.1.0",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-promise": "^2.0.3",
"react-scripts": "2.0.4"
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"liquidjs": "latest",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-promise": "^3.0.2",
"react-router-dom": "^6.26.1",
"vite": "^5.4.2",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^5.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"start": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"test": "vitest",
"test:coverage": "vitest run --coverage --watch=false"
},
"browserslist": [
">0.2%",
@@ -23,6 +28,12 @@
"not op_mini all"
],
"devDependencies": {
"@babel/core": "^7.8.7"
"@babel/core": "^7.8.7",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@testing-library/react": "^16.0.0",
"@types/react": "^18.3.4",
"@vitest/coverage-v8": "^2.0.5",
"jsdom": "^25.0.0",
"vitest": "^2.0.5"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

-41
View File
@@ -1,41 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="result"></div>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
-15
View File
@@ -1,15 +0,0 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
-23
View File
@@ -1,23 +0,0 @@
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import tpl from './views/demo.liquid';
import Parser from 'html-react-parser';
import { engine } from './engine';
export class App extends Component {
async componentDidMount() {
const html = await engine.renderFile(tpl.toString(), {name: 'alice', logo: logo })
this.setState({ html }) // outputs "Alice"
}
state = { html: '' }
render() {
return (
<div className="App">
{Parser(`${this.state.html}`)}
</div>
);
}
}
-9
View File
@@ -1,9 +0,0 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
ReactDOM.unmountComponentAtNode(div);
});
+9
View File
@@ -0,0 +1,9 @@
import { expect, test } from 'vitest'
import { render, screen } from '@testing-library/react'
import { App } from './App';
test('App rendered correctly', async () => {
render(<App/>)
const h2 = await screen.findByTestId('heading')
expect(h2.textContent).toEqual('Welcome to Liquid')
})
+23
View File
@@ -0,0 +1,23 @@
import { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import demo from './views/demo.liquid?raw';
import { engine } from './engine';
const template = engine.parse(demo)
export class App extends Component {
state = { html: '' }
async componentDidMount() {
const html = await engine.render(template, {name: 'liquid', logo })
this.setState({ html })
}
render() {
return (
<div className="App" dangerouslySetInnerHTML={{__html: this.state.html}}>
</div>
)
}
}
+9
View File
@@ -0,0 +1,9 @@
import { expect, test } from 'vitest'
import { render, screen } from '@testing-library/react'
import { App } from './AppWithHooks';
test('AppWithHooks rendered correctly', async () => {
render(<App/>)
const h2 = await screen.findByTestId('heading')
expect(h2.textContent).toEqual('Welcome to Liquid (hooks)')
})
@@ -1,34 +1,28 @@
/*
* function Component with Hooks: Modify ./index.js to apply this file
*/
import React, { useState, useLayoutEffect } from 'react';
import { useState, useLayoutEffect } from 'react';
import './App.css';
import logo from './logo.svg';
import tplsrc from './views/showing-click-times.liquid';
import Parser from 'html-react-parser';
import showingClickTimes from './views/showing-click-times.liquid?raw';
import { engine } from './engine';
import { Context } from './Context';
import { ClickButton } from './ClickButton';
const fetchTpl = engine.getTemplate(tplsrc.toString())
const tpl = engine.parse(showingClickTimes)
export function App() {
const [state, setState] = useState({
logo: logo,
name: 'alice',
logo,
name: 'liquid',
clickCount: 0,
html: ''
});
useLayoutEffect(() => {
fetchTpl
.then(tpl => engine.render(tpl, state))
.then(html => setState({...state, html}))
engine.render(tpl, state).then(html => setState({...state, html}))
}, [state.clickCount])
return (
<div className="App">
{Parser(`${state.html}`)}
<div dangerouslySetInnerHTML={{__html: state.html}}></div>
<Context.Provider
value={{
count: () => setState({...state, clickCount: state.clickCount + 1})
-5
View File
@@ -1,5 +0,0 @@
button {
position: fixed;
right: 20px;
bottom: 20px;
}
@@ -1,5 +1,3 @@
import './ClickButton.css';
import React from 'react';
import { Context } from './Context';
export function ClickButton() {
-3
View File
@@ -1,3 +0,0 @@
import React from "react";
export const Context = React.createContext()
+7
View File
@@ -0,0 +1,7 @@
import React from "react"
interface ContextValue {
count?: () => void
}
export const Context = React.createContext<ContextValue>({})
@@ -1,8 +1,7 @@
import path from 'path';
import { Liquid } from 'liquidjs';
export const engine = new Liquid({
root: path.resolve(__dirname, 'views/'), // dirs to lookup layouts/includes
root: 'views/',
extname: '.liquid' // the extname used for layouts/includes, defaults
});
-13
View File
@@ -1,13 +0,0 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import * as serviceWorker from './serviceWorker';
import { App } from './App';
// import { App } from './AppWithHooks';
ReactDOM.render(<App />, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.unregister();
+20
View File
@@ -0,0 +1,20 @@
import { createRoot } from 'react-dom/client';
import {
BrowserRouter as Router,
Routes,
Route,
} from "react-router-dom";
import './index.css';
import { App } from './App';
import { App as AppWithHooks } from './AppWithHooks';
const container = document.getElementById('root');
const root = createRoot(container!);
root.render(
<Router>
<Routes>
<Route path="/" Component={App}/>
<Route path="/with-hooks" Component={AppWithHooks}/>
</Routes>
</Router>
);

Some files were not shown because too many files have changed in this diff Show More