Commit Graph
103 Commits
Author SHA1 Message Date
Harttle 7dfb620d30 fix: some filters throw on nil input, see #481 2022-02-27 02:07:59 +08:00
Harttle ca3240c2c4 fix: url_encode throws on undefined value, fixes #479 2022-02-24 01:14:46 +08:00
Harttle ab5e245fba fix: array output now join with "" instead of "," 2022-02-20 13:03:40 +08:00
HarttleandHarttle 7e99efc513 feat: ownPropertyOnly option to protect prototype, #454 2022-01-29 01:22:34 +08:00
James PriorandJun Yang fde9924ee6 feat: implement liquid and echo tags, see #428 2021-12-19 21:09:26 +08:00
HarttleandHarttle 23279a816a feat: support jekyll-like include, see #433 2021-12-18 15:26:15 +08:00
HarttleandHarttle e2ef236f68 fix: throws when using preserveTimezones on Node.js, fixes #431 2021-12-07 22:43:47 +08:00
Harttleandharttle 8894cbfe6e fix: cache ongoing parseFile() calls, fixes #416 2021-10-16 21:07:48 +08: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 822ba0be0f fix: skip root check for renderFile() 2021-10-06 18:38:58 +08:00
Harttle fd5ef474c3 fix: support timezoneOffset for date from scope, #401 2021-10-06 15:45:41 +08:00
harttle afeef1d745 fix: renderToNodeStream() now emit 'error' event instead of throw 2021-10-03 22:32:00 +08:00
harttle 68c4cfcfb6 feat: renderFileToNodeStream(filepath, scope) 2021-10-03 21:21:25 +08:00
Jun Yang 3e3d84a5ed fix: operator boundary not correctly recognized, fixes #342 2021-05-04 18:13:02 +08:00
Jun Yang 251a50801c chore: dev via windows+vscode 2021-04-17 11:43:03 +08:00
Jun Yang 9a9b792c63 fix: newline_to_br filter should output <br /> instead of <br/>, fixes #320 2021-03-13 17:14:10 +08:00
Jun Yang 99d14e76d7 fix: comparison for empty/nil, fixes #321 2021-03-13 17:14:08 +08:00
harttle 2e66e8b02e fix: lenientIf not working for the umd bundle, closes #313 2021-02-19 23:10:15 +08:00
harttle e37824fd8a feat: support function calls, closes #222 2021-02-12 13:47:30 +08:00
harttle 9c40da7369 fix: allow string literals contain delimiters, fixes #288 2021-01-24 12:49:19 +08:00
harttle e15803fae4 test: fix e2e test 2020-12-08 00:30:32 +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
wyoziandJun Yang 18a807ea2e fix: braced property access 2020-10-09 21:18:40 +08:00
harttle 5b3f4195f0 fix: allow quoted variable name in capture, fixes #252 2020-10-03 22:03:17 +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 673b015435 fix: properly treat unicode blanks, fixes #221 2020-04-28 20:55:30 +08:00
harttle d2d6a38235 perf: introduce AST to avoid reparse 2020-03-15 02:51:25 +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
harttle 76019e9e18 refactor: rewrite expression evaluation, fix #130 2019-08-26 10:15:43 -05:00
harttle ae45c4622e fix: break/continue omitting output before them, #123
BREAKING CHANGE: remove default export, now should be used like import
{Liquid} from 'liquidjs'
2019-08-26 10:15:43 -05:00
harttle 88c89fe3b3 style: introduce @typescript-eslint/recommended 2019-07-06 14:33:34 +08:00
harttle d8ba009773 chore: fix building 2019-05-12 21:29:58 +08:00
Jun Yang 4a8088d4e4 feat: promise support for drops, working on #65 2019-03-10 18:05:52 +08:00
harttle b4acdb463a fix: math filters now return number, resolves #110
* fix linting
* numbers are no longer fixed:
    i.e. {{0.3 | minus 0.1}} now renders as 0.19999
    Stick to JavaScript number behavior, see: 8.0.0
2019-02-28 13:02:51 +08:00
harttle 7bee9fc92d feat: exported Drop interface for #107
Deprecate snake_cased options and APIs, sed #109
2019-02-28 00:05:08 +08:00
harttle 875f71d5f2 chore: a simple liquid_method_missing case for #97 2019-02-24 23:08:53 +08:00
harttle 88c9e96392 feat: nil/null/empty/blank literals, resolves #102 2019-02-24 21:50:01 +08:00
harttle 5b6100d12b refactor: strictly typed 2019-02-23 00:49:54 +08:00
harttle 852c6ad453 refactor: remove mock-fs from dev dependency 2019-02-19 22:28:27 +08:00
harttle f432aade6a chore(TypeScript): remove mock-fs 2019-02-17 21:37:13 +08:00
harttle fc9ebdb90f chore(TypeScript): fix linting and generate .d.ts 2019-02-17 18:20:04 +08:00
harttle 677e8511e6 chore(TypeScript): refactor objects into classes
fix: `Nil`(null, undefined) now renders as empty string
change: `parser.parseValue()` renamed to `parser.parseOutput`
change: registered tags/filters become static and shared across different liquid instances
2019-02-17 04:55:30 +08:00
harttle 1cc7249a71 chore(TypeScript): ship Liquid to class
BREAKING CHANGE: calling `Liquid()` without `new` now becomes invalid
2019-02-14 23:53:40 +08:00
harttle 8a881ac69a style: align to [email protected] 2019-01-28 18:06:47 +08:00