Skip to content

chore(deps): update dependency djlint to v1.49.10 - #392

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

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

Conversation

@renovate

@renovate renovate Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

This PR contains the following updates:

Package Change Age Confidence
djlint (changelog) 1.46.6 → 1.49.10 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

djlint/djLint (djlint)

v1.49.10

Compare Source

Packaging
  • Ship a py.typed marker, so type checkers read the annotations of djlint.api.
  • Importing djlint.api no longer builds the command line, which takes a little off the start of editors and other programs that use djLint from Python. The command line moved out of the djlint package itself, which still hands out main, process and process_stdin when they are asked for.

v1.49.9

Compare Source

Bug fixes
  • A U+2028, U+2029, U+0085 or form feed in the arguments of a call or the value of a {% set %} that is not JSON, as in a string passed to {{ url("…", x) }}, is kept as written. It was rewritten as a line break, which changed the string.
  • H057 reports a video whose only track has an empty kind, as in <track kind=""> or <track kind>. Browsers read an empty kind as metadata, not subtitles, so such a track carries no captions. H057 took it for a subtitles track.
  • The error about a number setting that is not a number names the file the value was read from, such as djlint.toml, .djlintrc or the file --configuration names. It always said pyproject.toml.

v1.49.8

Compare Source

Feature
  • A mako profile for Mako templates. Mako needs a control line, such as % if x: or % endfor, and a ## comment to start a line of their own, and other profiles joined them onto other lines, which broke the template. Under the mako profile they always keep their own lines, and the lines between % if and % endif, or between a <%block> or <%def> tag and its closing tag, are indented like any other block. The code in a ${} expression is left as written, and so are the attributes of a tag that depend on control lines, Python blocks, <%doc> and <%text>, and a script or style holding Mako syntax under --format-js or --format-css. The linter runs the HTML rules. The all profile handles Mako's lines the same way.
  • Twig's {% apply %}, {% sandbox %} and {% guard %} blocks and Django's old {% ifequal %} and {% ifnotequal %} blocks indent their contents like other blocks.
Bug fixes
  • A number setting written in a config file as a list, a table or null, as max_line_length = [100] or "indent": null, is reported and falls back to its default, as a string that is no number already did. djLint failed instead.
  • An end tag that closes no open block, such as the end of a custom block djLint does not know, as in {% endtoc %}, or a stray {% endif %}, stays at the level of the markup around it. It moved one level to the left, and so did everything after it.
  • A string written as adjacent literals, as in {{ _("Hello " "world") }} or {% set x = "a" "b" %}, or in triple quotes, keeps its quotes. They were dropped, which left {{ _(Hello world) }}, a variable name rather than a string.
Performance
  • A tag whose quoted value runs over thousands of lines, as when its closing quote is missing, no longer slows formatting down. Forty thousand such lines took over seven seconds and now take about one.
  • Text with many ${ that never close no longer slows formatting down. Three thousand of them in one paragraph took ten seconds and now take a tenth of one.

v1.49.7

Compare Source

Feature
  • djLint warns about a setting that has no effect: max_blank_lines together with preserve_blank_lines, which takes precedence, and --prefer-configuration without --configuration. The warning goes to stderr once per run, so the language server does not repeat it on every change.
Bug fixes
  • A closing tag missing its >, as in </p at the end of a line, again runs to the next >, as browsers read it. Since 1.49.5, the tag on the next line was taken for an opening tag, so each paragraph after such a line was indented one level deeper than the one before.

v1.49.6

Compare Source

Docs
  • djlint --help groups the options by what they are for: modes, files, configuration, the linter, output, layout, rewrites, and CSS and JavaScript. They used to come in one long list in no particular order.

v1.49.5

Compare Source

Performance
  • A file with many tags that are never closed formats in under a second. A thousand lines that each start with <p data-x="a took 40 seconds, 1,500 lines of <p took over a minute, and 2,000 ran out of memory. Thousands of <script>, <style> or <textarea> tags that are never closed no longer slow down formatting or linting either: linting 4,000 of them took up to 23 seconds.
Bug fixes
  • --format-js leaves a <script> alone when its type is neither JavaScript nor JSON, such as a client-side template in <script type="text/template">. It was formatted as JavaScript, which broke the template. Scripts without a type, modules, text/babel and JSON types such as application/ld+json are formatted as before.
  • A <script> or <style> tag with attributes too long for one line has them spread over lines also when its contents take several lines, as any other tag does. With --format-js or --format-css, one run spread them and the next joined them again.
  • With --format-js or --format-css, the contents of a script or style that follows other markup on its line, as in <span>a</span><script>, are indented below that line. After </noscript><script>, the next run indented the rest of the file one level deeper.
  • With --format-js, JavaScript that js-beautify lays out differently on each run, such as a ternary written over several lines, settles on one layout, so a second run leaves it alone.
  • --format-css no longer takes a <style inside a JavaScript string, as in new RegExp("<style(.*?)>"), for a style tag. It formatted the rest of the script as CSS.
  • --format-js and --format-css no longer read a <script> or <style> written inside an HTML comment, as in <!-- <script> -->, as the start of a block. Everything from it to the next real closing tag was formatted as JavaScript or CSS.
Docs
  • djlint --help describes each option more clearly. It now gives the defaults that come from .editorconfig, lists the all profile, and names what a value holds, such as --ignore CODES. --warn no longer claims to turn errors into warnings: it only changes the exit code. The configuration page uses the same wording.
  • The help and the docs for --max-blank-lines say that it has no effect with --preserve-blank-lines, which keeps every blank line.

v1.49.4

Compare Source

Performance
  • A template with hundreds of lines that each open a {{, {% set %} or {% include %} left unclosed, as in {{ 'a on every line, formats in well under a second. Four hundred such lines took from 45 seconds to seven minutes. Linting such lines with T002 no longer slows down the same way.
  • A tag holding thousands of template tags written without spaces, as in <script {%a%}{%a%}…>, formats and lints in well under a second. It took tens of seconds.
Bug fixes
  • Formatting a template a second time no longer changes it in the cases below, so djlint --check passes right after djlint --reformat.
  • An element or a template block is put on one line only when the whole line fits within --max-line-length, its indentation and any text beside it included. A line that fit only without its indentation was joined, and the next run spread its attributes.
  • A tag whose attributes fit within --max-attribute-length once a style or srcset value loses its trailing ; or extra spaces stays on one line. It was spread, and the next run joined it again.
  • A {% blocktrans trimmed %} inside a {% filter %} no longer ends the filter early. Everything after it lost its indentation, and the next run indented the {% endfilter %} again.
  • An empty <script> or <style> written across lines, whose attributes are longer than --max-attribute-length, has them spread when it is put on one line. It took a second run.
  • A tag written in a string inside a {{ }}, {% %} or mako ${ } that spans lines, as in HTML('<a class="x" href="y">') on a line of its own, no longer has its attributes spread over several lines. That put line breaks into the string, which in mako is an error, and the next run moved them again.
  • A template tag in an attribute value that holds the value's own quote and an apostrophe, as in value="{{ _("Students' list") }}" or mako's value="${_("Students' list")}", no longer upsets the layout of the lines that follow. The quote was read as the end of the value and the apostrophe as the start of another.
  • A stray quote in a tag, as in <button "="" title="x"> or id="a"", no longer stops djLint from reading the tags after it. Only a quote after = opens a value, as browsers read it. Before, the rest of the file was skipped: the linter reported its elements as orphans (H025) and the formatter indented them differently on each run. A quote inside a bare value, as in title=a'b, is part of the value for the same reason.
  • A > in a string of a template tag inside an attribute value, as in data-x="{{ "a > b" }}", no longer ends the tag. The formatter took out the space beside it, which changed the string.
  • Text inside a template tag in an attribute value is left as written. The formatter collapsed the spaces in class="{{ "a b" }}", closed up "a = b", joined a line break in a string in a style or srcset, split a style at a ; or a srcset at a , inside a template tag, and with --format-js or --format-css took a > in one for the end of the <script> or <style> tag.
  • A tag with a single attribute is no longer spread over several lines because its line is longer than --max-line-length, as the rule for long lines intends. A lone style was split at each ;, and the next run could join it again.
  • A tag with a style or srcset attribute that has no value no longer stops the formatter with an error when its attributes are spread over several lines.
  • A type="text/javascript" or type="text/css" is dropped, and a form's method lowercased, also when the value is written without quotes or with spaces around =. It used to take a second run.
  • A call written on the line after {{, with }} on a line of its own, stays where it was written. It used to be pulled up onto the {{ line with its arguments a level too deep, which the next run corrected.
  • A template tag written across lines inside an attribute value keeps its layout, including the indentation of the line it closes on.
  • Whitespace inside a quoted string that spans lines in a template tag, as in {% set %} or {% trans %}, is kept, also when the string holds a %}, {%, }} or {{, or a comment before it holds a quote. It was stripped or replaced with indentation, which changed the string.
  • A short template block written across lines stays that way also when it holds a string whose quotes the formatter rewrites, as in {% if x %} followed by {{ _('Deleted') }} on its own line. It used to be put on one line.
  • The formatter drops a type only where it is the element's default: text/javascript on a <script>, and text/css on a <style> or a <link rel="stylesheet">. A <script type="text/css">, a <style type="text/javascript">, a custom element such as <script-x>, and a <link> that is not a stylesheet keep theirs, as does a <link> whose rel a template tag helps write or comes after one (a rel inside a {# #} comment does not count). So does an attribute with a longer name, such as @type or @method. A type or method next to a template tag written with -, as in {{- x }}, is left as written, since dropping the type would join what the - trims. H024 reports the same cases, also when the value is written without quotes or with spaces around =.
  • A default type is kept when the browser might not read it: when another type follows in the same tag, as in <script type="text/javascript" type="module">, since a browser reads the first one, and when a template tag that may write a type of its own follows, as in <script type="text/javascript" {{ attrs }}>. A template tag that is part of a value, as in src={{ url }} or data-x="{{ "a > b" }}", does not count, and neither does text inside a string of a template tag, as in {{ '}} type=text/javascript' }}. A default type written twice, as in type="text/javascript" type=text/javascript, is dropped both times in one run.
  • A template comment written after the last attribute of a tag, as in <div class="x" {# note #}>, is kept. With a profile that has {# #} comments, the formatter deleted it.
  • An unquoted attribute value next to a template tag written with -, as in class=x {{- suffix }} or class={{ c -}} x, stays unquoted. The - joins the text beyond it onto the value, and quoting the value left that text outside, which changed the attribute.
  • A template tag written against an attribute or against the tag name, as in <option value="x"{% if a %} selected{% endif %}> or <li{{ attrs }}>, stays there when the attributes are spread over several lines. A line break or space was put between them, which the page then rendered.
  • H056 no longer reads a src written inside a template tag, as in <img {% if src %}class="a"{% endif %} src="a.png">, as an empty src of the tag.

v1.49.3

Compare Source

Bug fixes
  • A {% set %} written across lines indents the arguments of a function call inside it, as it already did for the items of a list or dict (#​2819). Its last line stays at the level of the value when it holds part of the value, the lines after the tag are no longer one level too shallow when a bracket opened inside it closes on its last line, a bracket inside a quoted string no longer changes the indentation, and a line that goes on with a string started on the line before is no longer indented, which put spaces into the string.

v1.49.2

Compare Source

Performance
  • Checking or linting a folder of many templates takes about half the time, most of all on Windows. A small run no longer starts worker processes, which cost more than they saved.
  • The language server answers in about a third of the time when the editor sends its settings with every request, as the VS Code extension does, and its memory no longer grows over a long session.
  • Every run starts a little faster, unless it uses --use-gitignore.
  • A line of many inline tags before a block tag, which a stray quote such as "="" can leave in a template, no longer takes minutes to format.
  • A very large template no longer formats disproportionately slower than a small one: a 1.1 MB template formats in a third of the time.

v1.49.1

Compare Source

Packaging
  • Ship a py.typed marker, so type checkers read the annotations of djlint.api.
  • Importing djlint.api no longer builds the command line, which takes a little off the start of editors and other programs that use djLint from Python. The command line moved out of the djlint package itself, which still hands out main, process and process_stdin when they are asked for.

v1.49.0

Compare Source

Features
  • djlint --lsp runs a language server, for findings as you type and formatting in any editor that supports LSP. See Language server.
  • djlint.api.is_excluded() tells whether the configuration leaves out a file.
Bug fixes
  • With --stdin-filename, djLint formats the text it is given even if the configuration sets files. It formatted those files instead, so an editor formatting a template rewrote them and left the template as it was.
  • --stdin-filename honors exclude, extend-exclude and --use-gitignore: the text of an excluded file comes back unchanged, with no findings.

v1.48.1

Compare Source

Performance
  • A long run of $ before a tag no longer makes linting slow: a line of two hundred thousand of them went from 2.2 seconds to 0.15. Formatting such a line is still slow.

v1.48.0

Compare Source

Feature
  • Add djlint.api, a supported way to format and lint text from Python: load_config(), format_text() and lint_text(), which returns findings with numeric positions. See Python API.
  • A finding now knows where it ends. --linter-output-format takes {end}, SARIF reports endLine and endColumn, and GitHub annotations cover the whole finding. A custom rule's python_module can return end, and otherwise ends where its match does.
  • A custom rule's python_module is also looked for in the project root, after everything else on the path, so it works with the djlint command as well as with python -m djlint.
Changed
  • A python_module rule that returns a line that isn't a position now stops djLint with an error naming the rule, instead of a traceback from the report.
Fix
  • A tag whose attributes are spread over several lines, but that doesn't start its line, as in <li><a …> or Read the <a …>, is laid out from that line. The attributes line up under the first one, or with --single-attribute-per-line sit one indent in from the line with the closing > at the line's indent. They used to be indented as if the tag started the line, so they landed left of the tag, or a single space in after text.

v1.47.1

Compare Source

Fix
  • preserve-inline in the js setting brace_style takes effect, so { bubbles: true } stays on one line in a <script> or in an attribute formatted with --format-attribute-js-json. It used to be dropped before the code was formatted.
  • The json schema allows any option under css and js, so a strict validator such as Tombi no longer reports indent_size there.

v1.47.0

Compare Source

Feature
  • New option --sort-load-tags / sort_load_tags sorts the libraries in a {% load %} tag and drops the ones written twice, so {% load static i18n %} becomes {% load i18n static %}. In {% load a b from library %} the names before from are sorted. It is off by default: where two libraries define a tag or filter of the same name, the one loaded last wins, so sorting can change which one a template uses.
  • The formatter drops the spaces H012 reports around an attribute's =, so <div class = "a"> becomes <div class="a">.
Changed
  • H010 reports the names the formatter lowercases, in any mix of case, so Width="3" is now reported. A framework binding such as :itemID or @ID and a longer name such as data-ID no longer are, since the formatter leaves their case alone.
  • H018 is not reported under --close-void-tags, since the formatter then writes the /> ending the rule reports. --ignore-case already worked this way for H009 and H010.
Fix
  • H020 reports an empty pair whose end tag has whitespace before its >, such as <div></div\n>.
  • H026 reports a class or id holding only whitespace, such as class=" ", and one written with spaces around the =.
  • H033 reports an action padded at both ends once. It used to report it twice, unless an attribute before action happened to make the two reports look the same.
  • Markup written inside an attribute value, as in <p title="<img src='a'>">, is text, and H005, H008, H010, H012, D018, J018, H024, H026, H029 and H033 no longer report it. H046 and H051 read tabindex and role from the tag's own attributes, so tabindex=1 written in a value or in the page text is not reported either.
  • T001 and T027 read a tag holding a dict, such as {{ f({"a": {"b": 1}}) }}, up to the }} that closes it rather than the first }} inside it.
  • T032 steps over an escaped quote in a string, so the spaces in {{ x|default:"a \"b c\"" }} are not reported.
  • H015 reports a heading followed by a tag on the same line anywhere in the file. It used to look only at the last line.
  • The rules that read a tag's attributes step over a template tag written in it, including a handlebars {{{attrs}}} and a dict as in {{ {'class': 'x'}|xmlattr }}, so <img {{ attrs }} src='a'> is reported by H008, which used to stop reading at the {{.
  • T038 steps over a string in a block tag, so the {% in {% with a="{%" %} does not cut the tag short.
Performance
  • The rules that read a tag's attributes stop at a stray <, and H015, H030, H036, T001, T027, T038 and T039 no longer read the rest of the document again for each tag. A file holding thousands of unclosed tags or headings on one line is linted in a fraction of a second, where it used to take minutes.

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 added the dependencies Pull requests that update a dependency file label Oct 30, 2026
@renovate
renovate Bot requested a review from echoix as a code owner October 30, 2026 20:53
@renovate renovate Bot added the dependencies Pull requests that update a dependency file label Oct 30, 2026
@renovate
renovate Bot force-pushed the renovate/djlint-1.x branch from 4a2d46b to 9bddbd3 Compare November 16, 2026 00:32
@renovate renovate Bot changed the title chore(deps): update dependency djlint to v1.47.0 chore(deps): update dependency djlint to v1.49.10 Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants