Commit Graph
279 Commits
Author SHA1 Message Date
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 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
harttle 5b3f4195f0 fix: allow quoted variable name in capture, fixes #252 2020-10-03 22:03:17 +08:00
harttle 2e5ab98bfc feat: export toPromise and toValue, see #158 2020-08-05 00:46:01 +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
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
harttle e36f3ff291 feat: async filters, closes #232 2020-06-25 12:30:56 +08:00
harttle 4f17c94988 feat: sort by key, see #227 2020-05-16 00:54:40 +08: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
Martin SchusterandJun Yang a93f11d25a fix: respect cache render options 2020-04-03 10:42:32 +08:00
harttle c923598b40 fix: coerce to Array in map and where filter 2020-04-01 02:22:44 +08:00
harttle 8daf281fca fix: throw an error if : omitted unintentionally, #212, #208 2020-03-31 14:05:38 +08:00
harttle 3e42d6b1b0 docs: website for LiquidJS 2020-03-28 17:21:07 +08:00
harttle c371762c43 fix: default filter not applied for empty array 2020-03-26 01:39:30 +08:00
harttle 479c63350a fix: throws on invalid arguments for prepend/append, fixes #208 2020-03-24 23:57:26 +08:00
Cristofer GonzalesandJun Yang 93433a8b30 fix: return variable name in include error 2020-03-23 23:26:31 +08:00
harttle d2d6a38235 perf: introduce AST to avoid reparse 2020-03-15 02:51:25 +08:00
harttle f7ef9b61c1 refactor: remove src/render/value.ts 2020-03-14 19:04:18 +08:00
harttle 3dfdf982c9 perf: remove transient strings to reduce memory 2020-03-14 19:04:18 +08:00
harttle 0f25017d5d test: test case for array index, #201 2020-03-11 01:09:58 +08:00
harttle 6de933897e fix: concurrent write on LRU cache (#200) 2020-03-10 01:09:41 +08:00
harttle 2c428221cb test: cases for TagMap 2020-03-07 00:58:39 +08:00
harttle f57156bccd fix: stable sort for undefined keys, fixes #191 2020-03-05 02:04:58 +08:00
harttle 61dac49b04 feat: async cache.read()/write(), remove .has() 2020-03-05 01:47:53 +08:00
harttle 6ea6881f08 feat: with & for in render tag, closes #195 2020-03-04 07:08:54 +08:00
harttle aa27a6cd7b feat: support json filter, closes #192 2020-03-04 03:42:18 +08:00
harttle df8a919f71 feat: move filters/tags to instances, fixes #188 2020-03-03 00:02:29 +08:00
harttle 185312dbff feat: "today" when using date filter, fixes #193 2020-02-21 01:48:10 +08:00
harttle 870e7ec6aa feat: globals shared between tags, see #185 2020-02-08 04:59:23 +08:00
harttle fc0cf6fe7b fix: expression and string literal parser, #186 2020-02-08 03:15:55 +08:00
harttle 5f9abdc8c6 test: integration cases for opts.fs, see #181 2020-01-04 13:53:08 +08:00
harttle ba5ff3f41c feat: full syntax for strftime, close #177
- strftime syntax: <flags><width><modifier><conversion>
- new conversions: %n, %t
- fixed conversions: %N
- flags: _ ^ - 0 # :
- modifiers: E, O (ignored)
2019-12-15 02:28:33 +00:00
harttle c69ad538d4 test: remove mock for strftime cases 2019-12-14 18:34:14 +00:00
harttle 60ec74f55d feat: nested property for the where filter, #178 2019-12-13 01:15:29 +08:00
harttle f82da11f5a fix: reading .first, .last of Array, closes #175 2019-11-16 01:14:09 +08:00
harttle 2dd43559b5 feat: support require.resolve for lookup, see #168 2019-11-07 18:46:37 +08:00
Jun Yang d5e7b047bb feat: Support for the "render" tag #163 2019-10-27 00:06:16 +08:00
harttle b82fa9ed2b pref: remove await/async from internal async calls 2019-10-26 08:57:33 -05:00
harttle d2c8d133ff fix: unless content is not waited, fixes #160 2019-10-02 22:30:35 +08:00
harttle 0426d08fd0 style: fix linting 2019-08-26 10:15:43 -05:00
harttle 7fb01ad69a feat: renderSync, parseAndRenderSync and renderFileSync, see #48 2019-08-26 10:15:43 -05:00