Skip to content

Update dependency teddy to v2 - #47

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/teddy-2.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/teddy-2.x

Conversation

@renovate

@renovate renovate Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
teddy (source) 1.1.42.0.2 age confidence

Release Notes

rooseveltframework/teddy (teddy)

v2.0.2

Compare Source

  • Added teddy.precompile and teddy.registerPrecompiled, which let a browser render from the JavaScript Teddy would otherwise have built for a template at runtime. A format option writes it as an ES module, as CommonJS, or as a plain script.
  • Fixed import teddy from 'teddy' being unable to read a template from the filesystem in the ESM build.
  • Improved performance in various places.
  • Updated dependencies.

v2.0.1

Compare Source

  • Fixed a <loop> whose through names 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 line if-, 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.
  • Updated dependencies.

v2.0.0

Compare Source

  • Breaking: Removed support for non-well formed templates. A template, and any markup arriving through the model, now has to be complete on its own.
    • Related: {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>unclosed came out as <p>unclosed</p>. It now comes out as given, which is what the |s flag 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.
  • Breaking: Removed teddy.setMaxPasses() and the maxPasses param. 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.
  • Fixed a {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 finds something, and only a model holding both Something and something is affected.
  • Fixed a value set into the model during a render — an <include> <arg>, or a <loop> key or val — 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 of escapeTest would sit next to an <arg escapeTest> that had become escapetest.
  • Fixed {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.
  • Fixed a non-parsed block being emptied when the markup holding it was passed on through another variable, which is what a layout does when it is handed its page as an argument and writes it out with |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.
  • Fixed a whole template cache set with 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 was 0 or an empty string was also skipped, as though the model had said nothing about it, and now counts.
  • Improved performance considerably in several places.
  • Updated dependencies.

v1.2.1

Compare Source

  • Fixed <include> tags inside a <loop> so that the included partial's <if>, <unless>, one line conditionals, and nested <loop> tags can read the loop's key and val. Previously the partial's contents were parsed against the model as it stood outside the loop, so a partial could print the loop's val through 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.
  • Updated dependencies.

v1.2.0

Compare Source

  • Breaking: Disabled template caching for templates read from the filesystem by default. Teddy used to keep every template it read and never read it again, so editing a template had no effect until the process restarted or 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.
    • If you use Teddy as an Express view engine you do not need to do anything: Express supplies its own view cache setting, 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.
    • Templates registered with teddy.setTemplate are unaffected. Those are always kept, since registering one by hand is the only way to supply a template in the browser.
    • To get the old behavior back, call teddy.setCacheTemplates(true) when instantiating Teddy, or pass cache: true in the model on each render.
  • Added teddy.setCacheTemplates(boolean) to control the above, and support for a cache option in the model, which takes precedence over both that setter and Express's view cache.
  • Altered teddy.clearTemplates() to now clear the templates that were read from the filesystem, not just the ones registered by hand.
  • Fixed <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.
  • Fixed one line conditionals so that a sequence of them on the same element is evaluated in full, rather than all but one being discarded. <p if-a true='class="x"' if-b true='data-y="z"'> now applies both outcomes.
  • Improved performance considerably in several places.
  • Made various improvements to the automated test suite.
  • Updated dependencies.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/teddy-2.x branch 2 times, most recently from fb49a99 to 5068306 Compare September 7, 2026 18:16
@renovate
renovate Bot force-pushed the renovate/teddy-2.x branch from 5068306 to 0be0761 Compare September 15, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

0 participants