Update dependency teddy to v2 - #47
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/teddy-2.x
branch
2 times, most recently
from
September 7, 2026 18:16
fb49a99 to
5068306
Compare
renovate
Bot
force-pushed
the
renovate/teddy-2.x
branch
from
September 15, 2026 15:44
5068306 to
0be0761
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains the following updates:
1.1.4→2.0.2Release Notes
rooseveltframework/teddy (teddy)
v2.0.2Compare Source
teddy.precompileandteddy.registerPrecompiled, which let a browser render from the JavaScript Teddy would otherwise have built for a template at runtime. Aformatoption writes it as an ES module, as CommonJS, or as a plain script.import teddy from 'teddy'being unable to read a template from the filesystem in the ESM build.v2.0.1Compare Source
<loop>whosethroughnames a{variable}in the middle of its path, rather than at its head, rendering nothing. Fixed the same in the value of a condition: An<if>, or a one lineif-, whose value named a{variable}anywhere but at its head was compared against the text as written rather than against what the variable resolved to.v2.0.0Compare Source
{variable|s}will no longer repair malformed markup that arrived through the model. Teddy handed its own output back to an HTML parser on every pass, which silently closed unclosed tags and reordered crossed ones along the way, so a model value of<p>unclosedcame out as<p>unclosed</p>. It now comes out as given, which is what the|sflag says it does. Well formed markup is unaffected. If you were relying on Teddy to tidy markup coming out of your model, it will no longer do that for you.teddy.setMaxPasses()and themaxPassesparam. Teddy no longer makes passes over a template, so there was nothing left for it to limit. A template that includes itself is now reported as that, naming the templates leading round the loop, rather than as having run out of passes.{variable}naming one of two model keys that differ only in case resolving to whichever of them came last, which depended on the order the keys happened to be in rather than on anything in the template. An exact match now wins. Lookups are otherwise unchanged and remain case insensitive:{Something}still findssomething, and only a model holding bothSomethingandsomethingis affected.<include><arg>, or a<loop>keyorval— leaving behind an existing key that differed from it only in case, so that which of the two a later lookup found depended on the order the keys were in. The one being set now wins. This was most visible in the browser, where attribute names are lowercased and a model key ofescapeTestwould sit next to an<arg escapeTest>that had becomeescapetest.{a{b}|s}, a variable whose name is built from another variable and which also carries a flag, rendering its value twice with a|between the copies. The name was being handed to the regular expression engine as written rather than matched as text, so the|in the flag was read as alternation.|s. The rendered page carries Teddy's own markers for the blocks it lifted out of parsing, and those were being mistaken for blocks of their own on the way through, so a<pre>or<noteddy>in a page rendered through a layout came out empty.teddy.setCache()never being found again unless the model value it was keyed on happened to be a string. The value names an entry, and a name is a string, so a number used as one becomes its own digits; reading it back compared the two strictly and never matched. A key whose value was0or an empty string was also skipped, as though the model had said nothing about it, and now counts.v1.2.1Compare Source
<include>tags inside a<loop>so that the included partial's<if>,<unless>, one line conditionals, and nested<loop>tags can read the loop'skeyandval. Previously the partial's contents were parsed against the model as it stood outside the loop, so a partial could print the loop'svalthrough a{variable}but any tag that branched on it behaved as though it were not there. Includes are now expanded by the loop, once per iteration, against that iteration's model, which is how partials behave in other templating engines.v1.2.0Compare Source
teddy.clearTemplates()was called. Caching is now off by default, which is how most other templating engines (e.g. ejs or pug) treat their own caching, so a template that changes on disk is picked up on the next render.view cachesetting, which it enables in production and disables in development, and Teddy now uses it. That means production keeps caching and development stops needing a restart.teddy.setTemplateare unaffected. Those are always kept, since registering one by hand is the only way to supply a template in the browser.teddy.setCacheTemplates(true)when instantiating Teddy, or passcache: truein the model on each render.teddy.setCacheTemplates(boolean)to control the above, and support for acacheoption in the model, which takes precedence over both that setter and Express'sview cache.teddy.clearTemplates()to now clear the templates that were read from the filesystem, not just the ones registered by hand.<include>resolving its partial through the template registry rather than through the loader, which meant an included template could not be re-read after it changed.<p if-a true='class="x"' if-b true='data-y="z"'>now applies both outcomes.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.