Releases: marcoroth/herb
Releases · marcoroth/herb
v0.8.5
Lexer/Parser
- Add support for
<%graphql %>tags by @marcoroth in #973 - HTML tags treat as case-insensitive by @kudoas in #968
- Introduce
ERBMultipleBlocksInTagErrorby @marcoroth in #971 - Fix parsing
<and>characters in text content by @marcoroth in #974
Linter
- Account for
meta[media]inhtml-no-duplicate-meta-namesrule by @marcoroth in #958 - Lowercase both opening/closing tag when fixing
html-tag-name-lowercaseoffense by @kudoas in #976
Language Server
- Add
Unnecessarydiagnostics for all ERB nodes by @marcoroth in #947
Engine
- Ignore
<%graphql %>tags when compiling templates by @marcoroth in #988
Documentation
Dependencies
- Bump esbuild from 0.27.0 to 0.27.1 by @dependabot[bot] in #962
- Bump yaml from 2.8.1 to 2.8.2 by @dependabot[bot] in #960
- Bump vitepress-plugin-group-icons from 1.6.3 to 1.6.5 by @dependabot[bot] in #961
- Bump tsup from 8.5.0 to 8.5.1 by @dependabot[bot] in #963
- Bump rollup from 4.53.2 to 4.53.3 by @dependabot[bot] in #959
- Bump vite from 7.1.11 to 7.3.0 by @dependabot[bot] in #982
- Bump @typescript-eslint/eslint-plugin from 8.48.0 to 8.49.0 by @dependabot[bot] in #985
- Bump prettier from 3.6.2 to 3.7.4 by @dependabot[bot] in #984
- Bump @types/node from 24.10.4 to 25.0.2 in /javascript/packages/tailwind-class-sorter by @dependabot[bot] in #979
- Bump rimraf from 6.1.0 to 6.1.2 by @dependabot[bot] in #983
New Contributors
Commits
Full Changelog: v0.8.4...v0.8.5
v0.8.4
Formatter
- Disable formatter in default config by @marcoroth in #944
- Keep
herb:disableon same line as tag-opening by @marcoroth in #946
Linter
- Resolve custom rules from project root by @marcoroth in #945
Language Server
- Add
Unnecessarydiagnostic for<% case %>children by @marcoroth in #802
Engine
- Add more tests for left and right ERB Trimming by @marcoroth in #650
- Avoid applying debug spans inside
javascript_tagblocks by @kozy4324 in #953
libherb
- C: Deprecate
hb_array_sizeby @timkaechele in #885
Documentation
- Clean up references to old settings/configs by @marcoroth in #943
Dependencies
- Bump mdast-util-to-hast from 13.2.0 to 13.2.1 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #940
- Bump @jothepro/doxygen-awesome-css from v2.3.4 to v2.4.1 by @dependabot[bot] in #924
- Bump jws from 3.2.2 to 3.2.3 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #949
New Contributors
Commits
Full Changelog: v0.8.3...v0.8.4
v0.8.3
Parser
- Re-parse on
unexpected ";"error for more accurate errors by @marcoroth in #902
Ruby
- Compile with
-fvisibility=hiddenflag by @timkaechele in #906
Engine
libherb
- Compile with
-fvisibility=hiddenflag by @timkaechele in #906 - Add
HERB_EXPORTED_FUNCTIONmacro for symbol visibility control by @marcoroth in #933
Dependencies
See all
- Update
globandjs-yamlby @dependabot[bot] in #897 - Bump glob from 11.1.0 to 13.0.0 in /javascript/packages/config by @dependabot[bot] in #918
- Bump zod from 4.1.12 to 4.1.13 by @dependabot[bot] in #925
- Bump playwright from 1.55.1 to 1.56.1 by @dependabot[bot] in #922
- Bump glob from 11.1.0 to 13.0.0 in /javascript/packages/linter by @dependabot[bot] in #919
- Bump glob from 11.1.0 to 13.0.0 in /javascript/packages/printer by @dependabot[bot] in #920
- Bump typescript from 5.9.2 to 5.9.3 by @dependabot[bot] in #923
- Bump glob from 11.1.0 to 13.0.0 in /javascript/packages/rewriter by @dependabot[bot] in #921
- Bump body-parser from 2.2.0 to 2.2.1 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #927
- Bump nx from 21.1.2 to 22.1.3 by @dependabot[bot] in #934
- Bump monaco-editor from 0.52.2 to 0.55.1 by @dependabot[bot] in #936
- Bump playwright from 1.56.1 to 1.57.0 by @dependabot[bot] in #935
- Bump @typescript-eslint/eslint-plugin from 8.46.4 to 8.48.0 by @dependabot[bot] in #937
- Bump express from 5.1.0 to 5.2.0 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #938
New Contributors
Commits
Full Changelog: v0.8.2...v0.8.3
v0.8.2
Formatter
- Improve element and blank line spacing by @marcoroth in #886
- Respect Outlook Conditional HTML Comments by @marcoroth in #887
- Respect
maxLineLengthfor inline elements with ERB by @marcoroth in #889 - Fix support for Tailwind V4 projects by @marcoroth in #892
- Improve Formatter Performance on large documents by @marcoroth in #895
- Add
<%# herb:formatter ignore %>directives by @marcoroth in #891
Linter
- Add
<%# herb:linter ignore %>directives by @marcoroth in #891
Playground
- Deploy Previews for Pull Requests by @marcoroth in #890
Internal
- Setup Automated publishing for JavaScript and Rust and rework Ruby by @marcoroth in #888
libherb
- Use
hb_array_firstandhb_array_lastconsistently by @timkaechele in #884 - Add
hb_buffer_init_arenafor allocating a buffer using the arena allocator by @timkaechele in #862
Commits
Full Changelog: v0.8.1...v0.8.2
v0.8.1
Parser
- Fix nested control structures in
case/elseclauses by @marcoroth in #869 - Use location-based detection for ERB control types by @marcoroth in #871
Formatter
- Fix whitespace preservation around ERB tags and punctuation by @marcoroth in #864
Linter
- Linter Rule: Don't flag
meta[itemprop]forhtml-head-only-elementsby @marcoroth in #867
libherb
- C: Remove unused
hb_buffer_freefunction by @timkaechele in #863 - C: Prevent excessive copying in
match_tags_in_node_arrayfunction by @timkaechele in #866
Rust
- Rust: Vendor C sources for cargo publish by @marcoroth in #861
Commits
Full Changelog: v0.8.0...v0.8.1
v0.8.0
Herb v0.8
Check out the "What's new in Herb v0.8" post on the Herb Blog.
New Packages
- Introduce
@herb-tools/configand.herb.ymlconfiguration file by @marcoroth in #747 - Introduce
@herb-tools/rewriterpackage by @marcoroth in #759 - Add Herb Java JNI Bindings by @marcoroth in #766
- Add Herb Rust FFI Bindings by @marcoroth in #767
Core
- Add
didyoumeanandlevenshteinutils by @marcoroth in #734 - Add short-hand to construct
Location,Position, andRangeby @marcoroth in #731 - Introduce
HERB_FILES_GLOBto share HTML+ERB glob by @marcoroth in #672 - Update all HTML+ERB globs to include Action View Variants by @marcoroth in #620
Parser
- Allow
TOKEN_BACKSLASHin HTML Text Content by @marcoroth in #637 - Don't output
unexpected_token_close_contextfor<% if %>by @marcoroth in #824 - Fix exponential recursion in two-pass HTML tag matching by @marcoroth in #840
- Handle memory leak in
herb_parseby @marcoroth in #691 - Handle Memory Leaks in
analyze.cby @marcoroth in #698 - Improve
extract.cto strip<% # comments %>with space by @marcoroth in #825 - Introduce two-pass algorithm for matching HTML Elements by @marcoroth in #795
- Unskip tests that the parser supports now by @marcoroth in #723
- Bump Prism to
v1.5.2by @marcoroth in #603 - Bump Prism to
v1.6.0by @marcoroth in #669
Engine
- Add helpers to compare compiled/rendered outputs of the Engine by @marcoroth in #774
- Add support for customizing escape functions by @marcoroth in #720
- Add Support for ERB trimming by @marcoroth in #841
- Don't compile
<% # comments %>by @marcoroth in #826 - Don't use
sendforadd_postamblecalls by @marcoroth in #721 - Fix compiling
case/innodes in HTML+ERB templates by @marcoroth in #596 - Migrate Engine Tests to
assert_compiled_snapshotby @marcoroth in #722 - Support
<% =begin%>block comments with no space by @marcoroth in #712
Formatter
- Better respect and deal with whitespace and adjacent text by @marcoroth in #612
- Extract and refactor Format Helper Functions and Constants by @marcoroth in #597
- Fix Bug where
casechildren were lost by @marcoroth in #756 - Fix formatting
<% else %>in inline mode by @marcoroth in #809 - Fix punctuation splitting and content duplication issues by @marcoroth in #591
- Improve
tailwind-class-sorterrewriter experience by @marcoroth in #848 - Improve text content formatting and whitespace preservation by @marcoroth in #823
- Improve whitespace formatting on the root-level by @marcoroth in #763
- Integrate
tailwind-css-sorterrewriter by @marcoroth in #761 - Preserve Frontmatter when formatting documents by @marcoroth in #797
- Skip formatting Scaffold Templates by @marcoroth in #771
- Try to persist
<%# herb:disable %>nodes when formatting by @marcoroth in #762 - Allow Linter and Formatter CLIs to accept multiple inputs by @marcoroth in #807
Linter
- Add support for defining custom Linter rules by @marcoroth in #600
- Add test helpers to simplify linter rule tests by @marcoroth in #587
- Allow disabling offenses using
<%# herb:disable %>by @domingo2000 in #531 - Allow multiple rules to be ignored using
<%# herb:disable %>by @domingo2000 in #680 - Don't lint files with parser errors by @marcoroth in #614
- Exclude Action Mailer views for
html-no-self-closingby @marcoroth in #765 - Fix
html-no-empty-attributeswith top-level control flow by @marcoroth in #796 - Fix crash in
html-no-underscores-in-attribute-namesrule by @marcoroth in #602 - Fix false positive in
erb-right-trimwhen using<%-by @marcoroth in #629 - Remove
html-no-space-in-tagfrom default rules for now by @marcoroth in #697 - Rename
erb-require-trailing-newlinelinter rule by @marcoroth in #660 - Support auto-fixing linter offenses using
--fixby @marcoroth in #622 - Allow Linter and Formatter CLIs to accept multiple inputs by @marcoroth in #807
Linter Rules
New Rules
- Implement
erb-no-case-node-childrenlinter rule by @marcoroth in #598 - Implement
erb-no-extra-newlinelinter rule by @domingo2000 in #557 - Implement
erb-no-extra-whitespace-inside-tagslinter rule by @marcoroth in #764 - Implement
html-body-only-elementslinter rule by @nicogaldamez in #470 - Implement
html-head-only-elementslinter rule by @marcoroth in #382 - Implement
html-input-require-autocompletelinter rule by @domingo2000 in #565 - Implement
html-no-duplicate-meta-nameslinter rule by @marcoroth in #383 - Implement
html-no-space-in-html-taglinter rule by @domingo2000 in #559 - Implement
herb-disable-comment-*family of linter rules by @marcoroth in #735
Other Updates
- Allow head-only elements on top level by @marcoroth in #641
- Fix false positive for
yieldinerb-right-trimrule by @marcoroth in #644 - Implement
--ignore-disable-commentsCLI option by @marcoroth in #736 - Remove
Trimming with -%> on non-outputoffense by @marcoroth in #645
Autofixes
- Implement Aufofix for
erb-comment-syntaxrule by @marcoroth in #775 - Implement Autofix for
erb-right-trimlinter rule by @marcoroth in #630 - Implement Autofix for
html-no-space-in-taglinter rule by @marcoroth in #642
Language Server
- Herb Linter Fix-on-save by @marcoroth in #758
- Implement Disable Linter Rule Code Actions by @marcoroth in #739
Dev Tools
- Allow to select editor from dropdown by @marcoroth in #715
Playground
- Add Herb Linter Autofix Button by @marcoroth in #627
- Ensure
track_whitespaceparser option persists by @marcoroth in #713 - Improve Buttons/Tabs Layout on smaller screens by @marcoroth in #846
Rewriter
- Implement
tailwind-class-sorterbuilt-in rewriter by @marcoroth in #760 - Change
rewrite/rewriteStringto be synchronous by @marcoroth in #787 - Expose
rewrite/rewriteStringfunctions and refine types by @marcoroth in #786
Ruby
- Run
compilefor all files inanalyzecommand by @marcoroth in #621 - Add colored CLI output for the
parseandlexcommnads by @marcoroth in #776 - Add metadata and input to Ruby test snapshots by @marcoroth in #785
- Drop
rbs-inlinefork since it's now fixed upstream by @marcoroth in #757 - Introduce
depth_limitforNode#tree_inspectby @marcoroth in #839 - Print Parse Errors at the end of the
parseoutput by @marcoroth in #784 - Remove
libherbFFI Ruby Interface by @timkaechele in #751
Rust
- Add Herb Rust FFI Binding...
v0.7.5
Added
- Lexer: Support lexing and parsing
=%>ERB closing tag by @marcoroth in #568 - Engine: Support Ruby Block Comments when compiling templates by @marcoroth in #576
New Linter Rules
- Linter: Implement
erb-comment-syntaxlinter rule by @domingo2000 in #528 - Linter: Implement
erb-right-trimlinter rule by @domingo2000 in #556
Changed
- Dev Tools: Add Rubymine to list of Editors by @equivalent in #538
- C: Implement more efficient buffer resizing by @timkaechele in #539
- C: Localize token struct members by @timkaechele in #529
- Linter: Add test case for trailing boolean attribute in HTML element by @dzunk in #485
- Linter: Add
visitNodeandvisitERBNodemethods to improveerb-right-trimby @marcoroth in #569 - Linter: Refactor
erb-require-whitespace-inside-tagsto usevisitERBNodeby @marcoroth in #570
Fixed
- Parser: Fix parsing boolean attributes with
track_whitespaceby @marcoroth in #560 - Parser: Fix analysis of nested
case/whenandcase/inparsing by @marcoroth in #578 - Parser: Analyze
casestatements withyieldasERBCaseNodeby @marcoroth in #577 - Linter: fix rule generator template by @domingo2000 in #563
- Linter: Fix
--versionflag for CLI by @drewhoffer in #488 - Formatter: Print
Experimental Previewwarning onstderrby @marcoroth in #575
Documentation
Dependencies
- Bump tar-fs from 2.1.3 to 2.1.4 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #536
New Contributors
- @equivalent made their first contribution in #538
- @domingo2000 made their first contribution in #528
- @dzunk made their first contribution in #485
Commits
Full Changelog: v0.7.4...v0.7.5
v0.7.4
Changed
Fixed
- Engine: Add missing newline when compiling
<% # comment %>by @marcoroth in #530 - Parser: Namespace Parser C functions by @indirect in #534
New Contributors
Commits
Full Changelog: v0.7.3...v0.7.4
v0.7.3
Changed
- Parser: Analyze parse errors as
partial_scriptby @Earlopain in #503 - Rubygem: Add missing
filesand vendor Prism to allow compiling gem from source by @marcoroth in #515 - Parser: Don't treat guard clauses as
ERBIfNodeorERBUnlessNodeby @marcoroth in #517 - Linter: Allow empty data attributes with no value by @marcoroth in #518
Fixed
- Parser: Add
TOKEN_BACKTICKto list of text content tokens by @koddsson in #468 - Parser: Fix typo in pretty_print_analyzed_ruby method by @timkaechele in #512
- Formatter: Fix attribute spacing in content-preserving elements by @marcoroth in #522
- Formatter: Add spaces in
ERBContentNodewithin HTML attributes by @marcoroth in #523
Documentation
- Update README.md by @samuelpecher in #508
Dependencies
- Bump the npm_and_yarn group across 1 directory with 2 updates by @dependabot[bot] in #516
- Bump vite from 7.0.7 to 7.1.5 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #519
- Bump vite from 7.1.5 to 7.1.6 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #520
- Bump vite from 7.1.6 to 7.1.7 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #521
New Contributors
- @samuelpecher made their first contribution in #508
- @timkaechele made their first contribution in #512
- @koddsson made their first contribution in #468
Commits
Full Changelog: v0.7.2...v0.7.3
v0.7.2
Added
- Formatter: Add
--indent-widthand--max-line-lengthargs to the CLI by @LucasKuhn in #466 - Engine: Add
visitorsfor modifying AST before compiling by @marcoroth in #502
Changed
- Add Cursor as available editor to link source files by @JuanMiguelGM in #486
- Add Zed as available editor to link source files by @marcoroth in bfd36c7
Fixed
- Use
rb_utf8_str_new_cstr()in Ruby C-Extension by @marcoroth in #500 - Remove double HTML-escaping from error template by @coorasse in #487
- Parser: Fix
<div foo=>bar</div>skipping over the closing bracket from the opening div by @Earlopain in #501
New Contributors
- @coorasse made their first contribution in #487
- @LucasKuhn made their first contribution in #466
- @JuanMiguelGM made their first contribution in #486
- @Earlopain made their first contribution in #501
Commits
Full Changelog: v0.7.1...v0.7.2