-
-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: upgrade 2x performant LiquidJS v9 #1058
Conversation
Beautiful, thank you! Are you saying this isn’t a breaking change for any of the template language syntax? |
Fixes #469 |
For the template language syntax part. There should be no breaking changes except for some undocumented features (I mean some fault tolerance provided by LiquidJS but not by Shopify/liquid or Jekyll like #212). Additionally, the filters should be more robust after all these bug fixes. For the Liquid API part, it's breaking. Many methods are changed to async and some are removed or replaced. |
Updating Liquid would also update strftime used by the date filter. I was confused why the strftime docs didn't match what I was seeing. |
@aciccarello Thank you to point it out. I've updated the doc for more specific description of strftime. Basically it should be conformant to Ruby's core DateTime#strftime. If there's still anything unexpected, feel free to open an issue on harttle/liquidjs. |
Shipping this! Thank you! |
There're substantial performance improvements in v9 and many bugfixes from v6 to v9. There're some API changes and some of them can be indicated in this PR:
engine.renderer.renderTemplates()
can be used only in generator tags as you can see inaddPairedShortcode()
. The difference is subtle here but generator tags provides a major performance boost and provide code reuse between sync/async.evalValue
is now changed to async and anotherevalValueSync()
is added for sync calls.evalValue()
in parseArguments()
) are nolonger static.A good thing I find is that for people using Liquid via
setEngineLib()
will not be affected.Another thing is, the patch is automatically formatted by your git hooks, is it supposed to be this way or should I disable those hooks and re-submit? Thank you for you time!