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)
NOTE: Despite being a minor release, this update includes a breaking change that we had to make to fix a security issue ( CVE-2020-11022). Please follow the blog post & the upgrade guide for more details.
I've formatted this as a FAQ, please feel free to open an issue for any additional question and I'll add the response here.
Q: What impact will this have on me?
In most cases, you shouldn't notice any change.
The only exception I can think of is if you pull code directly from https://github.com/visionmedia/debug, e.g. via a "debug": "visionmedia/debug"-type version entry in your package.json - in which case, you should still be fine due to the automatic redirection Github sets up, but you should also update any references as soon as possible.
Q: What are the security implications of this change?
If you pull code directly from the old URL, you should update the URL to https://github.com/debug-js/debug as soon as possible. The old organization has many approved owners and thus a new repository could (in theory) be created at the old URL, circumventing Github's automatic redirect that is in place now and serving malicious code. I (@qix-) also wouldn't have access to that repository, so while I don't think it would happen, it's still something to consider.
Even in such a case, however, the officially released package on npm (debug) would not be affected. That package is still very much under control (even more than it used to be).
Q: What should I do if I encounter an issue related to the migration?
Search the issues first to see if someone has already reported it, and then open a new issue if someone has not.
Q: Why was this done as a 'patch' release? Isn't this breaking?
No, it shouldn't be breaking. The package on npm shouldn't be affected (aside from this patch release) and any references to the old repository should automatically redirect.
Thus, according to all of the "APIs" (loosely put) involved, nothing should have broken.
fix: check prototype property access in strict-mode (#1736) - b6d3de7
fix: escape property names in compat mode (#1736) - f058970
refactor: In spec tests, use expectTemplate over equals and shouldThrow (#1683) - 77825f8
chore: start testing on Node.js 12 and 13 - 3789a30
(POSSIBLY) BREAKING CHANGES:
the changes from version 4.6.0 now also apply
in when using the compile-option "strict: true". Access to prototype properties is forbidden completely by default, specific properties or methods
can be allowed via runtime-options. See #1633 for details. If you are using Handlebars as documented, you should not be accessing prototype properties
from your template anyway, so the changes should not be a problem for you. Only the use of undocumented features can break your build.
That is why we only bump the patch version despite mentioning breaking changes.
Bumps the npm_and_yarn group with 14 updates in the /. directory:
2.5.0
3.0.0
0.0.5
1.4.0
2.2.4
3.5.0
4.17.4
4.17.21
0.7.3
2.0.0
1.278.1
1.1064.0
4.1.1
4.3.4
4.12.4
4.18.2
6.5.2
6.11.0
1.9.0
1.20.2
4.0.11
4.7.7
4.0.4
4.2.0
0.0.8
1.2.8
11.1.5
18.7.0
Updates
dustjs-linkedin
from 2.5.0 to 3.0.0Release 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.
Updates
express-fileupload
from 0.0.5 to 1.4.0Release notes
Sourced from express-fileupload's releases.
... (truncated)
Commits
Maintainer changes
This version was pushed to npm by richardgirges, a new releaser for express-fileupload since your current version.
Updates
jquery
from 2.2.4 to 3.5.0Release notes
Sourced from jquery's releases.
Commits
7a0a850
3.5.08570a08
Release: Update AUTHORS.txtda3dd85
Ajax: Do not execute scripts for unsuccessful HTTP responses065143c
Ajax: Overwrite s.contentType with content-type header value, if any1a4f10d
Tests: Blacklist one focusin test in IE9e15d6b
Event: Use only one focusin/out handler per matching window & document966a709
Manipulation: Skip the select wrapper for <option> outside of IE 91d61fd9
Manipulation: Make jQuery.htmlPrefilter an identity function04bf577
Selector: Update Sizzle from 2.3.4 to 2.3.57506c9c
Build: Resolve Travis config warningsMaintainer changes
This version was pushed to npm by mgol, a new releaser for jquery since your current version.
Updates
lodash
from 4.17.4 to 4.17.21Commits
f299b52
Bump to v4.17.21c4847eb
Improve performance oftoNumber
,trim
andtrimEnd
on large input strings3469357
Prevent command injection through_.template
'svariable
optionded9bc6
Bump to v4.17.20.63150ef
Documentation fixes.00f0f62
test.js: Remove trailing comma.846e434
Temporarily use a custom fork oflodash-cli
.5d046f3
Re-enable Travis tests on4.17
branch.aa816b3
Remove/npm-package
.d7fbc52
Bump to v4.17.19Maintainer changes
This version was pushed to npm by bnjmnt4n, a new releaser for lodash since your current version.
Updates
ms
from 0.7.3 to 2.0.0Release notes
Sourced from ms's releases.
Commits
9b88d15
2.0.094b995c
Invalidated cache for slack badgebcf5715
Bumped dependencies to the latest versionb1eaab7
Ignored logs coming from npmcaae298
Limit str to 100 to avoid ReDoS of 0.3s (#89)b83b36d
chore(package): update eslint to version 3.19.0 (#88)3f2a4d7
chore(package): update husky to version 0.13.3 (#86)7daf984
1.0.0ee91f30
More suitable name for file containing testse818c35
Removed browser testingUpdates
snyk
from 1.278.1 to 1.1064.0Commits
bd96e74
Merge pull request #4221 from snyk/fix/quote-args80d97a9
fix: escape child process argumentsc028b50
Merge pull request #4216 from snyk/feat/unmanaged-deps-severity-thresholdcc329fd
feat: support sev.threshold for unm.-deps3daf5c7
Merge pull request #4214 from snyk/feat/base64-default2df2037
Merge pull request #4219 from snyk/fix/gradle-use-lenient-configafc1ccb
fix: use lenient config in gradle plugin85bb57f
Merge pull request #4215 from snyk/feat/upgrade-policy-engine-v0.12.2ef864be
feat: upgrade snyk-iac-test to v0.37.0369fe11
feat: base64 default for sast analysisMaintainer changes
This version was pushed to npm by snyk-admin, a new releaser for snyk since your current version.
Updates
debug
from 4.1.1 to 4.3.4Release notes
Sourced from debug's releases.
... (truncated)
Commits
da66c86
4.3.49b33412
replace deprecated String.prototype.substr() (#876)c0805cc
add section about configuring JS console to show debug messages (#866)043d3cd
4.3.34079aae
update license and more maintainership information19b36c0
update repository location + maintainership informationf851b00
adds README section regarding usage in child procs (#850)d177f2b
Remove accidental epizeuxise47f96d
4.3.21e9d38c
cache enabled status per-logger (#799)Maintainer changes
This version was pushed to npm by qix, a new releaser for debug since your current version.
Updates
express
from 4.12.4 to 4.18.2Release notes
Sourced from express's releases.
... (truncated)
Changelog
Sourced from express's changelog.
... (truncated)
Commits
8368dc1
4.18.261f4049
docs: replace Freenode with Libera Chatbb7907b
build: Node.js@18.10f56ce73
build: supertest@6.3.024b3dc5
deps: qs@6.11.0689d175
deps: body-parser@1.20.1340be0f
build: eslint@8.24.033e8dc3
docs: use Node.js name style644f646
build: supertest@6.2.4ecd7572
build: Node.js@14.20Updates
xml2js
from 0.4.19 to 0.4.23Commits
Updates
qs
from 6.5.2 to 6.11.0Changelog
Sourced from qs's changelog.
... (truncated)
Commits
56763c1
v6.11.0ddd3e29
[readme] fix version badgec313472
[New] [Fix]stringify
: revert 0e903c0; addcommaRoundTrip
option95bc018
v6.10.50e903c0
[Fix]stringify
: witharrayFormat: comma
, properly include an explicit `[...ba9703c
v6.10.44e44019
[Fix]stringify
: witharrayFormat: comma
, include an explicit[]
on a s...113b990
[Dev Deps] updateobject-inspect
c77f38f
[Dev Deps] updateeslint
,@ljharb/eslint-config
,aud
,has-symbol
,tape
2cf45b2
[meta] usenpmignore
to autogenerate an npmignore fileUpdates
body-parser
from 1.9.0 to 1.20.2Release notes
Sourced from body-parser's releases.
... (truncated)
Changelog
Sourced from body-parser's changelog.
... (truncated)
Commits
ee91374
1.20.2368a93a
Fix strict json error message on Node.js 19+0385872
deps: raw-body@2.5.22c35b41
build: eslint@8.34.0f0646c2
build: Node.js@18.14f345fb1
build: Node.js@14.216842efc
deps: content-type@~1.0.55af7315
build: eslint-plugin-promise@6.1.18e605b3
build: supertest@6.3.3cba6e77
build: mocha@10.2.0Updates
handlebars
from 4.0.11 to 4.7.7Changelog
Sourced from handlebars's changelog.