[Snyk(Unlimited)] Upgrade dustjs-linkedin from 2.5.0 to 2.7.5 #3173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade dustjs-linkedin from 2.5.0 to 2.7.5.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.The recommended version fixes:
npm:dustjs-linkedin:20160819
SNYK-JS-MORGAN-72579
Release notes
Package name: dustjs-linkedin
Version 2.7.5
No content.
No content.
Notable Changes
Filters
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.Notable Changes
dust.config.cache
In previous versions, setting
dust.config.cache
tofalse
would blow away the entire cache on every render. Now, setting it tofalse
just prevents new templates from being added and cached templates from being used. Setting it back totrue
means that previously-cached templates will be ready to use.dust.onLoad
We have added a
callback(null, compiledTemplate)
signature todust.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 theonLoad
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.dust.makeBase
dust.makeBase
is now aliased todust.context
.Errata
Dust 2.7.0 broke backwards compatibility with older Dust compilers. This regression has been fixed so templates compiled with older versions of Dust will continue to work with Dust 2.7.1; you can use an older compiler if needed.
Supported Runtimes
With this release we are dropping official support for:
No explicit changes have been made to break Dust in these environments, but we will no longer run tests and may break them going forward.
Notable Changes
More flexible rendering
You can pass Dust body functions directly to
dust.render
anddust.stream
, instead of the template name.This means that you can also compile templates without having to name them-- just pass the compiled function directly to
dust.render
. You can decide if a function is eligible to be passed as a renderable by callingdust.isTemplateFn()
.CommonJS templates
Dust can now compile templates into CommonJS modules. Set
dust.config.cjs
totrue
, or use the--cjs
flag with dustc.Streams in context
You can include a ReadableStream directly in your Dust context and Dust will iterate over it like an array.
As long as you stream the results instead of rendering, Dust will flush data from the Stream as it is output.
Caching
You can disable caching of templates (useful for development) by setting
dust.config.cache = false
. If caching is disabled, you must write adust.onLoad
function to tell Dust how to load partials, since it wouldn't be possible to load them in advance and cache them.Errata
The exposed compiler options such as
dust.optimizers
are deprecated. They are now exposed under, e.g.dust.compiler.optimizers
. In Dust 2.8.0 the old options will be removed.dust.load
, an undocumented but public function, has been made private. Consider usingdust.onLoad
to define special behavior to load a template.Templates compiled with earlier Dust versions should be recompiled before using 2.7.0.
No content.
Notable Changes
dustc --watch
now reruns the compilation when a watched template changesContext#clone
,Context#pop
, andContext#resolve
.This release fixes two small issues:
{<foo}{/foo}
leaked compiler data into the template.Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs