- Put your changes here...
- Made client-side Teddy parser a bit more tolerant of bad markup.
- Fixed a bug which caused client-side Teddy to rename yet more form elements accidentally.
- Fixed a bug which caused client-side Teddy to handle array length lookups differently from
cheerio
-driven Teddy. - Fixed a bug which caused client-side Teddy to crash if extra spaces were in markup attribute lists.
- Fixed a bug which caused client-side Teddy to return the wrong data with 2 or more layers of object lookups if the object keys were camelCase.
- Fixed a bug which caused client-side Teddy to rename some form elements accidentally.
- Updated various dependencies.
- Fixed a bug which caused client-side Teddy to fail in some situations like putting a
<loop>
in a<select>
element. - Deprecated a test that tests for passing numeric arguments to include tags, since this violates HTML grammar and never should've worked to begin with. It may still work with
cheerio
-driven Teddy becausecheerio
's parser is more forgiving than a standards-compliant one unless and untilcheerio
deprecates support for that itself. Client-side Teddy will not support it, so for consistency the test has been removed. - Updated various dependencies.
- Fixed a bug which caused the
cheerio
-driven modules to not work client-side if you choose to use them there. - Updated various dependencies.
- Finsihed work on
cheerioPolyfill.js
which makes it possible for Teddy to execute in client-side contexts without usingcheerio
, allowing for a very small bundle size for client-side Teddy (17kb minified). - Fixed client-side tests to test Teddy in the browser properly.
- Refactored tests to improve maintainability.
- Updated various dependencies.
- Removed
xregexp
andhtml-entities
dependencies. Also Replacedcheerio
withcheerio/slim
. These changes have reduced bundle size significantly. - Began work on
cheerioPolyfill.js
which will allow Teddy to execute in client-side contexts without usingcheerio
. This will result in even smaller bundle sizes (currently around 16kb minified), however the work is unfinished. - Updated various dependencies.
- Downgraded
cheerio
to prevent webpack errors when using Teddy on frontend. - Updated various dependencies.
- Added new setting
teddy.setEmptyVarBehavior('hide')
that will make it possible for variables which don't resolve to display as empty strings instead of displaying the variable.
- Added support for template literal
${templateLiteral}
variables. - Fixed bug that caused Teddy to crash if you attempted to loop through a Set.
- Replaced internal HTML entities scanner with the
html-entities
npm package. - Updated various dependencies.
- Fixed issue with rendering variables with empty strings piped through variables with flags.
- Updated various dependencies.
- Fixed issue with rendering special characters correctly when piped through a teddy noparse flagged variable.
- Updated various dependencies.
- Fixed issue causing server-side comments to not be stripped from templates parsed as strings instead of as files.
- Updated various dependencies.
- Fixed issue causing the template caching feature to not work properly in Express apps.
- Updated various dependencies.
- Fixed scenario where one-line if with only a false condition could crash if it's fed by arguments from an include element.
- Fixed crash associated with embedding JSON strings in script tags.
- Fixed bug causing "{}" to be inappropriately stripped from templates.
- Reduced unminified bundle size from 2.4mb to 1.5mb and added a minified bundle that reduces it further to 449kb.
- Improved logging and refactored the code a bit.
- Updated various dependencies.
- Fixed crash that could occur in an unusual edge case.
- Various dependencies bumped.
- Restored template-level caching feature with an improved API.
- Restored compile method but now with an API similar to other templating systems. It will now take a template string and return a function which when given model data will render HTML from the template and model data.
- Now hosting the Teddy playground on https://rooseveltframework.github.io/teddy/playground.html. Thanks to jsDelivr for CDN hosting.
- Various dependencies bumped.
- Significant performance improvements.
- Added a new
<cache>
element that can be used to improve template parsing performance further. - Various dependencies bumped.
- Fixed memory leak related to the no parse block feature.
- Various dependencies bumped.
- Breaking:
<include>
elements will no longer automatically disable escaping content of<arg>
variables. Use{var|s}
to disable escaping yourself. - Breaking: One-line if statements like
if-something=''
will now evaluate as true ifsomething
is present in the model. - Breaking: You can no longer apply more than one one-line if statement to the same element.
- Breaking: Boolean logic will no longer allow you to query the same variable twice in the same if statement or use the same boolean logic operator twice in the same if statement.
- Breaking: You can no longer use Teddy tags in elements that interpret child text as plain text, e.g.
<style>
,<script>
,<textarea>
, etc. - Breaking: Removed the
noparse
andnoteddy
attribute feature from<include>
tags. - Breaking: Removed Teddy's internal minifier since third party HTML minifiers are better.
- Breaking: Removed caching feature. A better-designed one may arrive in the future.
- Breaking: Server-side comments will now always be removed, even if they are contained in a no-parse block. To preserve them for display, you must manually escape them with HTML entities.
- Breaking:
teddy.compile
was removed as a public method. To set a new template, you must now callteddy.setTemplate
to create it. Accordingly theteddy.compileAtEveryRender
method has been removed as well. - Breaking: The
|p
flag will now also apply the same logic as|s
as well. If you have any{variables}
written like{variable|s|p}
, you can now optionally write it as{variable|p}
instead to get identical functionality. - Breaking: The
in
attribute as a synonym forthrough
in<loop>
has been removed. - Significant stability improvements; lots of bugs fixed.
- Some performance improvements, some performance downgrades (notably looping through large datasets is slightly slower now).
- Simplified API.
maxPasses
default changed from 25000 to 1000.- Various dependencies bumped.
- Fixed bug with one-line-ifs. See #540
- Various dependencies bumped.
- Fixed an issue where model content could get printed without being escaped even when the
|s
flag is not present. - Various dependencies bumped.
- Fixed bug in client-side support where file extensions would be inappropriately appended to template names in some cases.
- Dropped Node 15 support. Added Node 16 support.
- Various dependencies bumped.
- Closed #404
- Various dependencies bumped.
- Closed #421
- Closed #412
- Closed #418
- Closed many unreported bugs.
- Wrote a test for #404
- Wrote a test for #357 but upon further investigation now consider it a wontfix.
- Various dependencies bumped.
- Fixed some Windows-exclusive bugs related to how newlines are parsed in Windows vs. other operating systems.
- Various dependencies bumped.
- CI improvements.
- Undo accidental removal of package-lock.json.
- Removed postinstall script since it created a problematic prompt to install webpack-cli during npm installs.
- Variables with spaces in them will now be parsed.
- Fixed issue where one line if statements couldn't use variables as part of the condition.
- Fixed issue where recursive variable resolution could cause an infinite loop.
- Signifcant performance improvements.
- Total rewrite into a much cleaner codebase:
- Less reliance on regex and more reliance on character counting in base algorithm.
- Code now split into separate files for development but bundled into a single JS file with Webpack during deployment.
- Various dependencies bumped.
- CI improvements.