Dust filter functions previously took one argument, the string to filter. They now accept a second argument, which is the current context.
Helpers
Dust helpers can now return primitives.
Helpers act like references or sections depending on if they have a body. When they have no body, they act like a reference and look in params.filters for filters to use. When they have a body, they act like a section. You can return thenables and streams normally.
In previous versions, setting dust.config.cache to false would blow away the entire cache on every render. Now, setting it to false just prevents new templates from being added and cached templates from being used. Setting it back to true means that previously-cached templates will be ready to use.
dust.onLoad
We have added a callback(null, compiledTemplate) signature to dust.onLoad.
Calling the onLoad callback with a compiled template function will use this template to satisfy the load request. The template is not automatically registered under any name when passed to the callback, so the onLoad function should handle registration as it needs.
You can still call the callback with uncompiled template source and Dust will compile and store it, while respecting your dust.config.cache setting.
#753 {?exists} and {^exists} resolve Promises and check if the result exists (#753) (@samuelms1)
v2.7.4 (2016/09/13 02:52 +00:00)
#744 Don't use instanceof to determine if a Context is a Context. Instead use a flag on the instance itself so it can survive object merges. (@sethkinast)
Previously returning a primitive would crash rendering with no way to recover. You can still return a Chunk and do more complex work if you need to.
Helpers act like references or sections depending on if they have a body. When they have no body, they act like a reference and look in params.filters for filters to use. When they have a body, they act like a section. You can return thenables and streams normally.
#655 Update CommonJS example to make use of new onLoad behavior (@sethkinast)
#653 Fix array iteration when context is undefined (@sethkinast)
#641 Add a cb(null, compiledTemplate) signature to dust.onLoad
Calling the onLoad callback with a compiled template function will use this template to satisfy the load request. The template is not automatically registered under any name when passed to the callback, so the onLoad function should handle registration as it needs.
dust.cache behavior has been changed slightly. Before, setting it to false would blow away the entire cache on every render. Now, setting it to false just prevents new templates from being added and cached templates from being used, but if it's set to true again previously-cached templates will be ready to use. (@sethkinast)
This version was pushed to npm by krakenjs, a new releaser for dustjs-linkedin since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/aagaio/goof/network/alerts).
Bumps dustjs-linkedin from 2.5.0 to 3.0.0.
Release notes
Sourced from dustjs-linkedin's releases.
... (truncated)
Changelog
Sourced from dustjs-linkedin's changelog.
Closes #674 (
@sethkinast
)Previously returning a primitive would crash rendering with no way to recover. You can still return a Chunk and do more complex work if you need to.
Helpers act like references or sections depending on if they have a body. When they have no body, they act like a reference and look in
params.filters
for filters to use. When they have a body, they act like a section. You can return thenables and streams normally.{
@return
value="" filters="|s" /} {@return
value=""}{.} World{/return}Closes #645 (
@sethkinast
)Closes #663 (
@sethkinast
)Closes #649 Closes #602 Closes #642 (
@sethkinast
)Closes #659 (
@sethkinast
)Calling the
onLoad
callback with a compiled template function will use this template to satisfy the load request. The template is not automatically registered under any name when passed to the callback, so theonLoad
function should handle registration as it needs.dust.cache
behavior has been changed slightly. Before, setting it to false would blow away the entire cache on every render. Now, setting it to false just prevents new templates from being added and cached templates from being used, but if it's set to true again previously-cached templates will be ready to use. (@sethkinast
)dust.render
anddust.stream
now accept a compiled template function in addition to a template name.dust.compile
no longer requires a template name, and will compile an anonymous template without one (so--name
is no longer required for dustc either)dust.load
is removed from the public APIdust.renderSource
is moved to the compiler, so it's only included in dust-full now (Fixes #412)dust.compileFn
is moved to the compiler, so it's only included in dust-full nowdust.isTemplateFn
dust.config.cache = true
, set tofalse
to disable caching and load templates again every time (Fixes #451)dust.config.cjs = false
, set totrue
to compile templates as CommonJS modules--cjs
flag todustc
dust.compiler
(but leave it exposed until 2.8) (@sethkinast
)... (truncated)
Commits
2e8795c
Release v3.0.06f98371
merge from 2.7db6d8b9
Merge pull request #805 from sumeetkakkar/fix/proto-pollutionddb6523
fix for prototype pollution vulnerability822222e
Release v2.7.5d0f955d
Decrease security vulnerabilities by upgrading cli dependency (#754 #748)e0e25f7
Merge pull request #756 from danactive/mastereeb1c17
Decrease security vulnerabilities by upgrading cli dependency (#754 #748)d485a72
{?exists} and {^exists} resolve Promises and check if the result exists (#753)9a08207
Release v2.7.4Maintainer changes
This version was pushed to npm by krakenjs, a new releaser for dustjs-linkedin since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/aagaio/goof/network/alerts).