Releases: edge-js/edge
Releases · edge-js/edge
Adding a few global helpers and update dependencies
Fix doc blocks for view rendering
Add newError tag
Make edge.render async and add edge.renderSync for old synchronous API
Allow set tag to mutate existing values
You can now use set tag to mutate existing objects.
@set(user, 'profile.twitterHandle', '@AmanVirk1')
Commits
- feat: allow set tag to mutate existing collections b8e4331
Publish under latest tag
Add support for rendering raw string directly
The new API allows rendering raw strings
edge.renderRaw('Hello {{ username }}', { username: 'virk' })
edge.renderRawAsync('Hello {{ await getUserName() }}', { getUserName: async () => 'virk' })
Drop support for Node 12
Add support for context API and async rendering
New Features
Async rendering was a long pending change and finally we have it. It will allow us to make use of await
expression within the edge templates. Also, the internals of the edge will smartly adjust the code to work with async API. For example: The @each
tag will use the correct loop when rendering in async mode.
await edge.renderAsync('template-path', {})
Next, we have got Context API, similar to the svelte Context API, but with its own edge specific syntax.
Breaking changes
- Remove the
yield
tag. It wasn't used at all - Remove
Edge.claimTag
in favor ofEdge.compiler.claimTag
Commits
- chore: remove npm-audit in favor of synk 18a66ae
- chore: update dependencies fa827ff
- fix: upgrade @poppinss/utils from 2.5.9 to 2.5.10 (#86) c68c0fc
- fix: typos c660205
- feat: add support for the context api bf98b5d
- refactor: restructing some parts of the code c775f0e
- refactor: remove yield tag 89a8bbc
- refactor: finish first phase of refactoring c3cc4a0
- feat: add support for async rendering 5eb5a11
- chore: update dependencies 6bde4fc
- chore(deps): bump ini from 1.3.5 to 1.3.7 (#85) 7a41814